@pairsystems/goodmem-client 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -4
- package/dist/api/EmbeddersApi.js +25 -10
- package/dist/api/LLMsApi.js +25 -10
- package/dist/api/MemoriesApi.js +186 -61
- package/dist/api/RerankersApi.js +25 -10
- package/dist/api/SpacesApi.js +31 -16
- package/dist/index.js +133 -7
- package/dist/model/ActiveLicenseMetadata.js +5 -1
- package/dist/model/AdminDrainRequest.js +3 -0
- package/dist/model/AdminDrainResponse.js +33 -2
- package/dist/model/AdminPurgeJobsRequest.js +4 -0
- package/dist/model/AdminPurgeJobsResponse.js +8 -4
- package/dist/model/AdminReloadLicenseResponse.js +4 -1
- package/dist/model/ApiKeyAuth.js +7 -3
- package/dist/model/ApiKeyResponse.js +67 -5
- package/dist/model/BackgroundJobSummary.js +35 -2
- package/dist/model/BatchDeleteMemorySelectorRequest.js +2 -1
- package/dist/model/BatchMemoryResult.js +4 -2
- package/dist/model/ChunkReference.js +3 -2
- package/dist/model/ChunkingConfiguration.js +109 -47
- package/dist/model/ChunkingConfigurationOneOf.js +109 -0
- package/dist/model/ChunkingConfigurationOneOf1.js +109 -0
- package/dist/model/ChunkingConfigurationOneOf2.js +109 -0
- package/dist/model/ContextItem.js +91 -73
- package/dist/model/ContextItemOneOf.js +109 -0
- package/dist/model/ContextItemOneOf1.js +109 -0
- package/dist/model/CreateApiKeyResponse.js +2 -1
- package/dist/model/CreateLLMResponse.js +3 -2
- package/dist/model/EmbedderCreationRequest.js +8 -5
- package/dist/model/EmbedderResponse.js +16 -11
- package/dist/model/EndpointAuthentication.js +7 -4
- package/dist/model/HnswOptions.js +2 -1
- package/dist/model/JsonBatchMemoryCreationRequest.js +132 -0
- package/dist/model/JsonMemoryCreationContentRequirement.js +151 -0
- package/dist/model/JsonMemoryCreationContentRequirementOneOf.js +109 -0
- package/dist/model/JsonMemoryCreationContentRequirementOneOf1.js +109 -0
- package/dist/model/JsonMemoryCreationRequest.js +289 -0
- package/dist/model/LLMCreationRequest.js +12 -6
- package/dist/model/LLMResponse.js +18 -12
- package/dist/model/LLMUpdateRequest.js +6 -3
- package/dist/model/LLMUpdateRequestNot.js +118 -0
- package/dist/model/ListApiKeysResponse.js +29 -9
- package/dist/model/ListMemoryPageImagesResponse.js +145 -0
- package/dist/model/ListSpacesResponse.js +29 -9
- package/dist/model/Memory.js +106 -10
- package/dist/model/MemoryChunkResponse.js +30 -2
- package/dist/model/MemoryCreationRequest.js +15 -3
- package/dist/model/MemoryPageImage.js +225 -0
- package/dist/model/OcrCell.js +5 -3
- package/dist/model/OcrDocumentRequest.js +2 -1
- package/dist/model/OcrDocumentResponse.js +6 -4
- package/dist/model/OcrPage.js +9 -6
- package/dist/model/OcrPageResult.js +4 -2
- package/dist/model/PingEndpointInfo.js +3 -2
- package/dist/model/PingEvent.js +108 -50
- package/dist/model/PingEventOneOf.js +109 -0
- package/dist/model/PingEventOneOf1.js +109 -0
- package/dist/model/PingEventOneOf2.js +109 -0
- package/dist/model/PingOnceRequest.js +4 -2
- package/dist/model/PingResult.js +6 -4
- package/dist/model/PingStreamRequest.js +7 -3
- package/dist/model/PingSummary.js +3 -2
- package/dist/model/ProcessingHistory.js +2 -1
- package/dist/model/RecursiveChunkingConfiguration.js +6 -4
- package/dist/model/RerankerCreationRequest.js +5 -3
- package/dist/model/RerankerResponse.js +13 -9
- package/dist/model/ResultSetBoundary.js +20 -2
- package/dist/model/RetrieveMemoryEvent.js +10 -5
- package/dist/model/RetrieveMemoryRequest.js +12 -6
- package/dist/model/RetrievedItem.js +91 -42
- package/dist/model/RetrievedItemOneOf.js +109 -0
- package/dist/model/RetrievedItemOneOf1.js +109 -0
- package/dist/model/SecretReference.js +27 -4
- package/dist/model/SentenceChunkingConfiguration.js +3 -2
- package/dist/model/SortOrder.js +63 -0
- package/dist/model/Space.js +8 -5
- package/dist/model/SpaceCreationRequest.js +13 -8
- package/dist/model/SpaceEmbedderConfig.js +3 -1
- package/dist/model/SystemInfoResponse.js +13 -4
- package/dist/model/UpdateApiKeyRequest.js +19 -9
- package/dist/model/UpdateEmbedderRequest.js +2 -9
- package/dist/model/UpdateRerankerRequest.js +2 -9
- package/dist/model/UpdateSpaceRequest.js +0 -22
- package/package.json +1 -1
|
@@ -88,10 +88,15 @@ var MemoryCreationRequest = /*#__PURE__*/function () {
|
|
|
88
88
|
obj['contentType'] = _ApiClient["default"].convertToType(data['contentType'], 'String');
|
|
89
89
|
}
|
|
90
90
|
if (data.hasOwnProperty('metadata')) {
|
|
91
|
-
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'],
|
|
91
|
+
obj['metadata'] = _ApiClient["default"].convertToType(data['metadata'], {
|
|
92
|
+
'String': Object
|
|
93
|
+
});
|
|
92
94
|
}
|
|
93
95
|
if (data.hasOwnProperty('chunkingConfig')) {
|
|
94
|
-
obj['chunkingConfig'] =
|
|
96
|
+
obj['chunkingConfig'] = _ApiClient["default"].convertToType(data['chunkingConfig'], _ChunkingConfiguration["default"]);
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('extractPageImages')) {
|
|
99
|
+
obj['extractPageImages'] = _ApiClient["default"].convertToType(data['extractPageImages'], 'Boolean');
|
|
95
100
|
}
|
|
96
101
|
if (data.hasOwnProperty('fileField')) {
|
|
97
102
|
obj['fileField'] = _ApiClient["default"].convertToType(data['fileField'], 'String');
|
|
@@ -200,15 +205,22 @@ MemoryCreationRequest.prototype['contentType'] = undefined;
|
|
|
200
205
|
|
|
201
206
|
/**
|
|
202
207
|
* Additional metadata for the memory
|
|
203
|
-
* @member {Object} metadata
|
|
208
|
+
* @member {Object.<String, Object>} metadata
|
|
204
209
|
*/
|
|
205
210
|
MemoryCreationRequest.prototype['metadata'] = undefined;
|
|
206
211
|
|
|
207
212
|
/**
|
|
213
|
+
* Chunking strategy for this memory (if not provided, uses space default)
|
|
208
214
|
* @member {module:model/ChunkingConfiguration} chunkingConfig
|
|
209
215
|
*/
|
|
210
216
|
MemoryCreationRequest.prototype['chunkingConfig'] = undefined;
|
|
211
217
|
|
|
218
|
+
/**
|
|
219
|
+
* Optional hint to extract page images for eligible document types (for example, PDFs)
|
|
220
|
+
* @member {Boolean} extractPageImages
|
|
221
|
+
*/
|
|
222
|
+
MemoryCreationRequest.prototype['extractPageImages'] = undefined;
|
|
223
|
+
|
|
212
224
|
/**
|
|
213
225
|
* Optional multipart file field name to bind binary content; required when multiple files are uploaded in a batch multipart request.
|
|
214
226
|
* @member {String} fileField
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
11
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
12
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
13
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
18
|
+
*
|
|
19
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
20
|
+
*
|
|
21
|
+
* The version of the OpenAPI document:
|
|
22
|
+
*
|
|
23
|
+
*
|
|
24
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
25
|
+
* https://openapi-generator.tech
|
|
26
|
+
* Do not edit the class manually.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The MemoryPageImage model module.
|
|
31
|
+
* @module model/MemoryPageImage
|
|
32
|
+
* @version 1.0.0
|
|
33
|
+
*/
|
|
34
|
+
var MemoryPageImage = /*#__PURE__*/function () {
|
|
35
|
+
/**
|
|
36
|
+
* Constructs a new <code>MemoryPageImage</code>.
|
|
37
|
+
* Metadata for one memory page-image rendition
|
|
38
|
+
* @alias module:model/MemoryPageImage
|
|
39
|
+
* @param memoryId {String} Memory UUID
|
|
40
|
+
* @param pageIndex {Number} 0-based page index
|
|
41
|
+
* @param dpi {Number} Render DPI
|
|
42
|
+
* @param contentType {String} Image MIME type
|
|
43
|
+
* @param createdAt {Number} Creation timestamp (milliseconds since epoch)
|
|
44
|
+
* @param updatedAt {Number} Last update timestamp (milliseconds since epoch)
|
|
45
|
+
* @param createdById {String} Creator user UUID
|
|
46
|
+
* @param updatedById {String} Last updater user UUID
|
|
47
|
+
*/
|
|
48
|
+
function MemoryPageImage(memoryId, pageIndex, dpi, contentType, createdAt, updatedAt, createdById, updatedById) {
|
|
49
|
+
_classCallCheck(this, MemoryPageImage);
|
|
50
|
+
MemoryPageImage.initialize(this, memoryId, pageIndex, dpi, contentType, createdAt, updatedAt, createdById, updatedById);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Initializes the fields of this object.
|
|
55
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
56
|
+
* Only for internal use.
|
|
57
|
+
*/
|
|
58
|
+
return _createClass(MemoryPageImage, null, [{
|
|
59
|
+
key: "initialize",
|
|
60
|
+
value: function initialize(obj, memoryId, pageIndex, dpi, contentType, createdAt, updatedAt, createdById, updatedById) {
|
|
61
|
+
obj['memoryId'] = memoryId;
|
|
62
|
+
obj['pageIndex'] = pageIndex;
|
|
63
|
+
obj['dpi'] = dpi;
|
|
64
|
+
obj['contentType'] = contentType;
|
|
65
|
+
obj['createdAt'] = createdAt;
|
|
66
|
+
obj['updatedAt'] = updatedAt;
|
|
67
|
+
obj['createdById'] = createdById;
|
|
68
|
+
obj['updatedById'] = updatedById;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Constructs a <code>MemoryPageImage</code> from a plain JavaScript object, optionally creating a new instance.
|
|
73
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
74
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
75
|
+
* @param {module:model/MemoryPageImage} obj Optional instance to populate.
|
|
76
|
+
* @return {module:model/MemoryPageImage} The populated <code>MemoryPageImage</code> instance.
|
|
77
|
+
*/
|
|
78
|
+
}, {
|
|
79
|
+
key: "constructFromObject",
|
|
80
|
+
value: function constructFromObject(data, obj) {
|
|
81
|
+
if (data) {
|
|
82
|
+
obj = obj || new MemoryPageImage();
|
|
83
|
+
if (data.hasOwnProperty('memoryId')) {
|
|
84
|
+
obj['memoryId'] = _ApiClient["default"].convertToType(data['memoryId'], 'String');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('pageIndex')) {
|
|
87
|
+
obj['pageIndex'] = _ApiClient["default"].convertToType(data['pageIndex'], 'Number');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('dpi')) {
|
|
90
|
+
obj['dpi'] = _ApiClient["default"].convertToType(data['dpi'], 'Number');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('contentType')) {
|
|
93
|
+
obj['contentType'] = _ApiClient["default"].convertToType(data['contentType'], 'String');
|
|
94
|
+
}
|
|
95
|
+
if (data.hasOwnProperty('imageContentLength')) {
|
|
96
|
+
obj['imageContentLength'] = _ApiClient["default"].convertToType(data['imageContentLength'], 'Number');
|
|
97
|
+
}
|
|
98
|
+
if (data.hasOwnProperty('imageContentSha256')) {
|
|
99
|
+
obj['imageContentSha256'] = _ApiClient["default"].convertToType(data['imageContentSha256'], 'String');
|
|
100
|
+
}
|
|
101
|
+
if (data.hasOwnProperty('createdAt')) {
|
|
102
|
+
obj['createdAt'] = _ApiClient["default"].convertToType(data['createdAt'], 'Number');
|
|
103
|
+
}
|
|
104
|
+
if (data.hasOwnProperty('updatedAt')) {
|
|
105
|
+
obj['updatedAt'] = _ApiClient["default"].convertToType(data['updatedAt'], 'Number');
|
|
106
|
+
}
|
|
107
|
+
if (data.hasOwnProperty('createdById')) {
|
|
108
|
+
obj['createdById'] = _ApiClient["default"].convertToType(data['createdById'], 'String');
|
|
109
|
+
}
|
|
110
|
+
if (data.hasOwnProperty('updatedById')) {
|
|
111
|
+
obj['updatedById'] = _ApiClient["default"].convertToType(data['updatedById'], 'String');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return obj;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Validates the JSON data with respect to <code>MemoryPageImage</code>.
|
|
119
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
120
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>MemoryPageImage</code>.
|
|
121
|
+
*/
|
|
122
|
+
}, {
|
|
123
|
+
key: "validateJSON",
|
|
124
|
+
value: function validateJSON(data) {
|
|
125
|
+
// check to make sure all required properties are present in the JSON string
|
|
126
|
+
var _iterator = _createForOfIteratorHelper(MemoryPageImage.RequiredProperties),
|
|
127
|
+
_step;
|
|
128
|
+
try {
|
|
129
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
130
|
+
var property = _step.value;
|
|
131
|
+
if (!data.hasOwnProperty(property)) {
|
|
132
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// ensure the json data is a string
|
|
136
|
+
} catch (err) {
|
|
137
|
+
_iterator.e(err);
|
|
138
|
+
} finally {
|
|
139
|
+
_iterator.f();
|
|
140
|
+
}
|
|
141
|
+
if (data['memoryId'] && !(typeof data['memoryId'] === 'string' || data['memoryId'] instanceof String)) {
|
|
142
|
+
throw new Error("Expected the field `memoryId` to be a primitive type in the JSON string but got " + data['memoryId']);
|
|
143
|
+
}
|
|
144
|
+
// ensure the json data is a string
|
|
145
|
+
if (data['contentType'] && !(typeof data['contentType'] === 'string' || data['contentType'] instanceof String)) {
|
|
146
|
+
throw new Error("Expected the field `contentType` to be a primitive type in the JSON string but got " + data['contentType']);
|
|
147
|
+
}
|
|
148
|
+
// ensure the json data is a string
|
|
149
|
+
if (data['imageContentSha256'] && !(typeof data['imageContentSha256'] === 'string' || data['imageContentSha256'] instanceof String)) {
|
|
150
|
+
throw new Error("Expected the field `imageContentSha256` to be a primitive type in the JSON string but got " + data['imageContentSha256']);
|
|
151
|
+
}
|
|
152
|
+
// ensure the json data is a string
|
|
153
|
+
if (data['createdById'] && !(typeof data['createdById'] === 'string' || data['createdById'] instanceof String)) {
|
|
154
|
+
throw new Error("Expected the field `createdById` to be a primitive type in the JSON string but got " + data['createdById']);
|
|
155
|
+
}
|
|
156
|
+
// ensure the json data is a string
|
|
157
|
+
if (data['updatedById'] && !(typeof data['updatedById'] === 'string' || data['updatedById'] instanceof String)) {
|
|
158
|
+
throw new Error("Expected the field `updatedById` to be a primitive type in the JSON string but got " + data['updatedById']);
|
|
159
|
+
}
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
}]);
|
|
163
|
+
}();
|
|
164
|
+
MemoryPageImage.RequiredProperties = ["memoryId", "pageIndex", "dpi", "contentType", "createdAt", "updatedAt", "createdById", "updatedById"];
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Memory UUID
|
|
168
|
+
* @member {String} memoryId
|
|
169
|
+
*/
|
|
170
|
+
MemoryPageImage.prototype['memoryId'] = undefined;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* 0-based page index
|
|
174
|
+
* @member {Number} pageIndex
|
|
175
|
+
*/
|
|
176
|
+
MemoryPageImage.prototype['pageIndex'] = undefined;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Render DPI
|
|
180
|
+
* @member {Number} dpi
|
|
181
|
+
*/
|
|
182
|
+
MemoryPageImage.prototype['dpi'] = undefined;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Image MIME type
|
|
186
|
+
* @member {String} contentType
|
|
187
|
+
*/
|
|
188
|
+
MemoryPageImage.prototype['contentType'] = undefined;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Image byte length
|
|
192
|
+
* @member {Number} imageContentLength
|
|
193
|
+
*/
|
|
194
|
+
MemoryPageImage.prototype['imageContentLength'] = undefined;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Hex-encoded SHA-256 digest of image content
|
|
198
|
+
* @member {String} imageContentSha256
|
|
199
|
+
*/
|
|
200
|
+
MemoryPageImage.prototype['imageContentSha256'] = undefined;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Creation timestamp (milliseconds since epoch)
|
|
204
|
+
* @member {Number} createdAt
|
|
205
|
+
*/
|
|
206
|
+
MemoryPageImage.prototype['createdAt'] = undefined;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Last update timestamp (milliseconds since epoch)
|
|
210
|
+
* @member {Number} updatedAt
|
|
211
|
+
*/
|
|
212
|
+
MemoryPageImage.prototype['updatedAt'] = undefined;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Creator user UUID
|
|
216
|
+
* @member {String} createdById
|
|
217
|
+
*/
|
|
218
|
+
MemoryPageImage.prototype['createdById'] = undefined;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Last updater user UUID
|
|
222
|
+
* @member {String} updatedById
|
|
223
|
+
*/
|
|
224
|
+
MemoryPageImage.prototype['updatedById'] = undefined;
|
|
225
|
+
var _default = exports["default"] = MemoryPageImage;
|
package/dist/model/OcrCell.js
CHANGED
|
@@ -39,7 +39,7 @@ var OcrCell = /*#__PURE__*/function () {
|
|
|
39
39
|
* Single OCR layout element.
|
|
40
40
|
* @alias module:model/OcrCell
|
|
41
41
|
* @param categoryLabel {String} Raw category label emitted by OCR
|
|
42
|
-
* @param category {module:model/OcrCategory}
|
|
42
|
+
* @param category {module:model/OcrCategory} Normalized OCR category
|
|
43
43
|
* @param text {String} OCR text content
|
|
44
44
|
*/
|
|
45
45
|
function OcrCell(categoryLabel, category, text) {
|
|
@@ -73,13 +73,13 @@ var OcrCell = /*#__PURE__*/function () {
|
|
|
73
73
|
if (data) {
|
|
74
74
|
obj = obj || new OcrCell();
|
|
75
75
|
if (data.hasOwnProperty('bbox')) {
|
|
76
|
-
obj['bbox'] =
|
|
76
|
+
obj['bbox'] = _ApiClient["default"].convertToType(data['bbox'], _BoundingBox["default"]);
|
|
77
77
|
}
|
|
78
78
|
if (data.hasOwnProperty('categoryLabel')) {
|
|
79
79
|
obj['categoryLabel'] = _ApiClient["default"].convertToType(data['categoryLabel'], 'String');
|
|
80
80
|
}
|
|
81
81
|
if (data.hasOwnProperty('category')) {
|
|
82
|
-
obj['category'] =
|
|
82
|
+
obj['category'] = _ApiClient["default"].convertToType(data['category'], _OcrCategory["default"]);
|
|
83
83
|
}
|
|
84
84
|
if (data.hasOwnProperty('text')) {
|
|
85
85
|
obj['text'] = _ApiClient["default"].convertToType(data['text'], 'String');
|
|
@@ -131,6 +131,7 @@ var OcrCell = /*#__PURE__*/function () {
|
|
|
131
131
|
OcrCell.RequiredProperties = ["categoryLabel", "category", "text"];
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
|
+
* Bounding box in page coordinates
|
|
134
135
|
* @member {module:model/BoundingBox} bbox
|
|
135
136
|
*/
|
|
136
137
|
OcrCell.prototype['bbox'] = undefined;
|
|
@@ -142,6 +143,7 @@ OcrCell.prototype['bbox'] = undefined;
|
|
|
142
143
|
OcrCell.prototype['categoryLabel'] = undefined;
|
|
143
144
|
|
|
144
145
|
/**
|
|
146
|
+
* Normalized OCR category
|
|
145
147
|
* @member {module:model/OcrCategory} category
|
|
146
148
|
*/
|
|
147
149
|
OcrCell.prototype['category'] = undefined;
|
|
@@ -71,7 +71,7 @@ var OcrDocumentRequest = /*#__PURE__*/function () {
|
|
|
71
71
|
obj['content'] = _ApiClient["default"].convertToType(data['content'], 'String');
|
|
72
72
|
}
|
|
73
73
|
if (data.hasOwnProperty('format')) {
|
|
74
|
-
obj['format'] =
|
|
74
|
+
obj['format'] = _ApiClient["default"].convertToType(data['format'], _OcrInputFormat["default"]);
|
|
75
75
|
}
|
|
76
76
|
if (data.hasOwnProperty('includeRawJson')) {
|
|
77
77
|
obj['includeRawJson'] = _ApiClient["default"].convertToType(data['includeRawJson'], 'Boolean');
|
|
@@ -129,6 +129,7 @@ OcrDocumentRequest.RequiredProperties = ["content"];
|
|
|
129
129
|
OcrDocumentRequest.prototype['content'] = undefined;
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
|
+
* Input format hint (AUTO, PDF, TIFF, PNG, JPEG, BMP)
|
|
132
133
|
* @member {module:model/OcrInputFormat} format
|
|
133
134
|
*/
|
|
134
135
|
OcrDocumentRequest.prototype['format'] = undefined;
|
|
@@ -39,10 +39,10 @@ var OcrDocumentResponse = /*#__PURE__*/function () {
|
|
|
39
39
|
* Constructs a new <code>OcrDocumentResponse</code>.
|
|
40
40
|
* Response containing page-ordered OCR results.
|
|
41
41
|
* @alias module:model/OcrDocumentResponse
|
|
42
|
-
* @param detectedFormat {module:model/OcrInputFormat}
|
|
42
|
+
* @param detectedFormat {module:model/OcrInputFormat} Detected input format
|
|
43
43
|
* @param pageCount {Number} Number of pages processed after applying the range
|
|
44
44
|
* @param pages {Array.<module:model/OcrPageResult>} Ordered per-page OCR results
|
|
45
|
-
* @param timings {module:model/DocumentTimings}
|
|
45
|
+
* @param timings {module:model/DocumentTimings} Aggregate timing statistics
|
|
46
46
|
*/
|
|
47
47
|
function OcrDocumentResponse(detectedFormat, pageCount, pages, timings) {
|
|
48
48
|
_classCallCheck(this, OcrDocumentResponse);
|
|
@@ -76,7 +76,7 @@ var OcrDocumentResponse = /*#__PURE__*/function () {
|
|
|
76
76
|
if (data) {
|
|
77
77
|
obj = obj || new OcrDocumentResponse();
|
|
78
78
|
if (data.hasOwnProperty('detectedFormat')) {
|
|
79
|
-
obj['detectedFormat'] =
|
|
79
|
+
obj['detectedFormat'] = _ApiClient["default"].convertToType(data['detectedFormat'], _OcrInputFormat["default"]);
|
|
80
80
|
}
|
|
81
81
|
if (data.hasOwnProperty('pageCount')) {
|
|
82
82
|
obj['pageCount'] = _ApiClient["default"].convertToType(data['pageCount'], 'Number');
|
|
@@ -85,7 +85,7 @@ var OcrDocumentResponse = /*#__PURE__*/function () {
|
|
|
85
85
|
obj['pages'] = _ApiClient["default"].convertToType(data['pages'], [_OcrPageResult["default"]]);
|
|
86
86
|
}
|
|
87
87
|
if (data.hasOwnProperty('timings')) {
|
|
88
|
-
obj['timings'] =
|
|
88
|
+
obj['timings'] = _ApiClient["default"].convertToType(data['timings'], _DocumentTimings["default"]);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
return obj;
|
|
@@ -147,6 +147,7 @@ var OcrDocumentResponse = /*#__PURE__*/function () {
|
|
|
147
147
|
OcrDocumentResponse.RequiredProperties = ["detectedFormat", "pageCount", "pages", "timings"];
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
|
+
* Detected input format
|
|
150
151
|
* @member {module:model/OcrInputFormat} detectedFormat
|
|
151
152
|
*/
|
|
152
153
|
OcrDocumentResponse.prototype['detectedFormat'] = undefined;
|
|
@@ -164,6 +165,7 @@ OcrDocumentResponse.prototype['pageCount'] = undefined;
|
|
|
164
165
|
OcrDocumentResponse.prototype['pages'] = undefined;
|
|
165
166
|
|
|
166
167
|
/**
|
|
168
|
+
* Aggregate timing statistics
|
|
167
169
|
* @member {module:model/DocumentTimings} timings
|
|
168
170
|
*/
|
|
169
171
|
OcrDocumentResponse.prototype['timings'] = undefined;
|
package/dist/model/OcrPage.js
CHANGED
|
@@ -39,9 +39,9 @@ var OcrPage = /*#__PURE__*/function () {
|
|
|
39
39
|
* Constructs a new <code>OcrPage</code>.
|
|
40
40
|
* OCR output for a single page.
|
|
41
41
|
* @alias module:model/OcrPage
|
|
42
|
-
* @param layout {module:model/OcrLayout}
|
|
43
|
-
* @param timings {module:model/PageTimings}
|
|
44
|
-
* @param image {module:model/ImageInfo}
|
|
42
|
+
* @param layout {module:model/OcrLayout} Parsed layout output
|
|
43
|
+
* @param timings {module:model/PageTimings} Timing breakdown for the page
|
|
44
|
+
* @param image {module:model/ImageInfo} Rendered image metadata
|
|
45
45
|
*/
|
|
46
46
|
function OcrPage(layout, timings, image) {
|
|
47
47
|
_classCallCheck(this, OcrPage);
|
|
@@ -80,13 +80,13 @@ var OcrPage = /*#__PURE__*/function () {
|
|
|
80
80
|
obj['markdown'] = _ApiClient["default"].convertToType(data['markdown'], 'String');
|
|
81
81
|
}
|
|
82
82
|
if (data.hasOwnProperty('layout')) {
|
|
83
|
-
obj['layout'] =
|
|
83
|
+
obj['layout'] = _ApiClient["default"].convertToType(data['layout'], _OcrLayout["default"]);
|
|
84
84
|
}
|
|
85
85
|
if (data.hasOwnProperty('timings')) {
|
|
86
|
-
obj['timings'] =
|
|
86
|
+
obj['timings'] = _ApiClient["default"].convertToType(data['timings'], _PageTimings["default"]);
|
|
87
87
|
}
|
|
88
88
|
if (data.hasOwnProperty('image')) {
|
|
89
|
-
obj['image'] =
|
|
89
|
+
obj['image'] = _ApiClient["default"].convertToType(data['image'], _ImageInfo["default"]);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
return obj;
|
|
@@ -157,16 +157,19 @@ OcrPage.prototype['rawJson'] = undefined;
|
|
|
157
157
|
OcrPage.prototype['markdown'] = undefined;
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
|
+
* Parsed layout output
|
|
160
161
|
* @member {module:model/OcrLayout} layout
|
|
161
162
|
*/
|
|
162
163
|
OcrPage.prototype['layout'] = undefined;
|
|
163
164
|
|
|
164
165
|
/**
|
|
166
|
+
* Timing breakdown for the page
|
|
165
167
|
* @member {module:model/PageTimings} timings
|
|
166
168
|
*/
|
|
167
169
|
OcrPage.prototype['timings'] = undefined;
|
|
168
170
|
|
|
169
171
|
/**
|
|
172
|
+
* Rendered image metadata
|
|
170
173
|
* @member {module:model/ImageInfo} image
|
|
171
174
|
*/
|
|
172
175
|
OcrPage.prototype['image'] = undefined;
|
|
@@ -72,10 +72,10 @@ var OcrPageResult = /*#__PURE__*/function () {
|
|
|
72
72
|
obj['pageIndex'] = _ApiClient["default"].convertToType(data['pageIndex'], 'Number');
|
|
73
73
|
}
|
|
74
74
|
if (data.hasOwnProperty('page')) {
|
|
75
|
-
obj['page'] =
|
|
75
|
+
obj['page'] = _ApiClient["default"].convertToType(data['page'], _OcrPage["default"]);
|
|
76
76
|
}
|
|
77
77
|
if (data.hasOwnProperty('status')) {
|
|
78
|
-
obj['status'] =
|
|
78
|
+
obj['status'] = _ApiClient["default"].convertToType(data['status'], _RpcStatus["default"]);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
return obj;
|
|
@@ -127,11 +127,13 @@ OcrPageResult.RequiredProperties = ["pageIndex"];
|
|
|
127
127
|
OcrPageResult.prototype['pageIndex'] = undefined;
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
+
* OCR output for the page
|
|
130
131
|
* @member {module:model/OcrPage} page
|
|
131
132
|
*/
|
|
132
133
|
OcrPageResult.prototype['page'] = undefined;
|
|
133
134
|
|
|
134
135
|
/**
|
|
136
|
+
* Error status for the page
|
|
135
137
|
* @member {module:model/RpcStatus} status
|
|
136
138
|
*/
|
|
137
139
|
OcrPageResult.prototype['status'] = undefined;
|
|
@@ -37,7 +37,7 @@ var PingEndpointInfo = /*#__PURE__*/function () {
|
|
|
37
37
|
* Constructs a new <code>PingEndpointInfo</code>.
|
|
38
38
|
* Resolved endpoint metadata for ping responses
|
|
39
39
|
* @alias module:model/PingEndpointInfo
|
|
40
|
-
* @param targetType {module:model/PingTargetType}
|
|
40
|
+
* @param targetType {module:model/PingTargetType} Resolved resource type
|
|
41
41
|
* @param targetId {String} Target resource ID (UUID)
|
|
42
42
|
* @param resolvedEndpoint {String} Fully resolved endpoint URL used for the probe
|
|
43
43
|
* @param provider {String} Provider name backing the resource
|
|
@@ -76,7 +76,7 @@ var PingEndpointInfo = /*#__PURE__*/function () {
|
|
|
76
76
|
if (data) {
|
|
77
77
|
obj = obj || new PingEndpointInfo();
|
|
78
78
|
if (data.hasOwnProperty('targetType')) {
|
|
79
|
-
obj['targetType'] =
|
|
79
|
+
obj['targetType'] = _ApiClient["default"].convertToType(data['targetType'], _PingTargetType["default"]);
|
|
80
80
|
}
|
|
81
81
|
if (data.hasOwnProperty('targetId')) {
|
|
82
82
|
obj['targetId'] = _ApiClient["default"].convertToType(data['targetId'], 'String');
|
|
@@ -140,6 +140,7 @@ var PingEndpointInfo = /*#__PURE__*/function () {
|
|
|
140
140
|
PingEndpointInfo.RequiredProperties = ["targetType", "targetId", "resolvedEndpoint", "provider", "modelIdentifier"];
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
|
+
* Resolved resource type
|
|
143
144
|
* @member {module:model/PingTargetType} targetType
|
|
144
145
|
*/
|
|
145
146
|
PingEndpointInfo.prototype['targetType'] = undefined;
|