@pairsystems/goodmem-client 1.0.0-beta.1 → 1.0.0-dev.cb052d6
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 +100 -82
- package/dist/ApiClient.js +33 -52
- package/dist/api/APIKeysApi.js +72 -51
- package/dist/api/EmbeddersApi.js +93 -63
- package/dist/api/MemoriesApi.js +263 -80
- package/dist/api/RerankersApi.js +262 -0
- package/dist/api/SpacesApi.js +100 -66
- package/dist/api/SystemApi.js +24 -18
- package/dist/api/UsersApi.js +100 -26
- package/dist/client.js +26 -1
- package/dist/index.js +181 -0
- package/dist/model/AbstractReply.js +138 -0
- package/dist/model/ApiKeyResponse.js +5 -5
- package/dist/model/BatchMemoryCreationRequest.js +5 -5
- package/dist/model/BatchMemoryDeletionRequest.js +5 -5
- package/dist/model/BatchMemoryRetrievalRequest.js +5 -5
- package/dist/model/BinaryContent.js +129 -0
- package/dist/model/ChunkReference.js +152 -0
- package/dist/model/ChunkingConfiguration.js +115 -0
- package/dist/model/ContextItem.js +136 -0
- package/dist/model/CreateApiKeyRequest.js +5 -5
- package/dist/model/CreateApiKeyResponse.js +5 -5
- package/dist/model/DistributionType.js +58 -0
- package/dist/model/EmbedderCreationRequest.js +20 -9
- package/dist/model/EmbedderResponse.js +20 -9
- package/dist/model/EmbedderWeight.js +125 -0
- package/dist/model/GoodMemStatus.js +129 -0
- package/dist/model/LengthMeasurement.js +63 -0
- package/dist/model/ListApiKeysResponse.js +5 -5
- package/dist/model/ListEmbeddersResponse.js +5 -5
- package/dist/model/ListRerankersResponse.js +132 -0
- package/dist/model/ListSpacesResponse.js +5 -5
- package/dist/model/Memory.js +23 -15
- package/dist/model/MemoryChunkResponse.js +240 -0
- package/dist/model/MemoryCreationRequest.js +21 -9
- package/dist/model/MemoryListResponse.js +5 -5
- package/dist/model/Modality.js +4 -4
- package/dist/model/PostProcessor.js +125 -0
- package/dist/model/ProviderType.js +9 -4
- package/dist/model/RecursiveChunkingConfiguration.js +165 -0
- package/dist/model/RerankerCreationRequest.js +266 -0
- package/dist/model/RerankerResponse.js +316 -0
- package/dist/model/ResultSetBoundary.js +153 -0
- package/dist/model/RetrieveMemoryEvent.js +148 -0
- package/dist/model/RetrieveMemoryRequest.js +219 -0
- package/dist/model/RetrievedItem.js +106 -0
- package/dist/model/SentenceChunkingConfiguration.js +141 -0
- package/dist/model/SeparatorKeepStrategy.js +63 -0
- package/dist/model/Space.js +19 -5
- package/dist/model/SpaceCreationRequest.js +19 -5
- package/dist/model/SpaceEmbedder.js +5 -5
- package/dist/model/SpaceEmbedderConfig.js +5 -5
- package/dist/model/SpaceKey.js +145 -0
- package/dist/model/SystemInitResponse.js +5 -5
- package/dist/model/UpdateApiKeyRequest.js +5 -5
- package/dist/model/UpdateEmbedderRequest.js +5 -5
- package/dist/model/UpdateRerankerRequest.js +226 -0
- package/dist/model/UpdateSpaceRequest.js +22 -44
- package/dist/model/UserResponse.js +5 -5
- package/dist/streaming.js +649 -0
- package/package.json +4 -36
|
@@ -0,0 +1,219 @@
|
|
|
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
|
+
var _ContextItem = _interopRequireDefault(require("./ContextItem"));
|
|
9
|
+
var _PostProcessor = _interopRequireDefault(require("./PostProcessor"));
|
|
10
|
+
var _SpaceKey = _interopRequireDefault(require("./SpaceKey"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; } } }; }
|
|
14
|
+
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; } }
|
|
15
|
+
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; }
|
|
16
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
17
|
+
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); } }
|
|
18
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
19
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
20
|
+
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); } /**
|
|
21
|
+
*
|
|
22
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
23
|
+
*
|
|
24
|
+
* The version of the OpenAPI document:
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
28
|
+
* https://openapi-generator.tech
|
|
29
|
+
* Do not edit the class manually.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* The RetrieveMemoryRequest model module.
|
|
34
|
+
* @module model/RetrieveMemoryRequest
|
|
35
|
+
* @version 1.0.0
|
|
36
|
+
*/
|
|
37
|
+
var RetrieveMemoryRequest = /*#__PURE__*/function () {
|
|
38
|
+
/**
|
|
39
|
+
* Constructs a new <code>RetrieveMemoryRequest</code>.
|
|
40
|
+
* Request body for semantic memory retrieval with optional embedder weight overrides.
|
|
41
|
+
* @alias module:model/RetrieveMemoryRequest
|
|
42
|
+
* @param message {String} Primary query/message for semantic search.
|
|
43
|
+
* @param spaceKeys {Array.<module:model/SpaceKey>} List of spaces to search with optional per-embedder weight overrides.
|
|
44
|
+
*/
|
|
45
|
+
function RetrieveMemoryRequest(message, spaceKeys) {
|
|
46
|
+
_classCallCheck(this, RetrieveMemoryRequest);
|
|
47
|
+
RetrieveMemoryRequest.initialize(this, message, spaceKeys);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Initializes the fields of this object.
|
|
52
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
53
|
+
* Only for internal use.
|
|
54
|
+
*/
|
|
55
|
+
return _createClass(RetrieveMemoryRequest, null, [{
|
|
56
|
+
key: "initialize",
|
|
57
|
+
value: function initialize(obj, message, spaceKeys) {
|
|
58
|
+
obj['message'] = message;
|
|
59
|
+
obj['spaceKeys'] = spaceKeys;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Constructs a <code>RetrieveMemoryRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
|
64
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
65
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
66
|
+
* @param {module:model/RetrieveMemoryRequest} obj Optional instance to populate.
|
|
67
|
+
* @return {module:model/RetrieveMemoryRequest} The populated <code>RetrieveMemoryRequest</code> instance.
|
|
68
|
+
*/
|
|
69
|
+
}, {
|
|
70
|
+
key: "constructFromObject",
|
|
71
|
+
value: function constructFromObject(data, obj) {
|
|
72
|
+
if (data) {
|
|
73
|
+
obj = obj || new RetrieveMemoryRequest();
|
|
74
|
+
if (data.hasOwnProperty('message')) {
|
|
75
|
+
obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('context')) {
|
|
78
|
+
obj['context'] = _ApiClient["default"].convertToType(data['context'], [_ContextItem["default"]]);
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('spaceKeys')) {
|
|
81
|
+
obj['spaceKeys'] = _ApiClient["default"].convertToType(data['spaceKeys'], [_SpaceKey["default"]]);
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('requestedSize')) {
|
|
84
|
+
obj['requestedSize'] = _ApiClient["default"].convertToType(data['requestedSize'], 'Number');
|
|
85
|
+
}
|
|
86
|
+
if (data.hasOwnProperty('fetchMemory')) {
|
|
87
|
+
obj['fetchMemory'] = _ApiClient["default"].convertToType(data['fetchMemory'], 'Boolean');
|
|
88
|
+
}
|
|
89
|
+
if (data.hasOwnProperty('fetchMemoryContent')) {
|
|
90
|
+
obj['fetchMemoryContent'] = _ApiClient["default"].convertToType(data['fetchMemoryContent'], 'Boolean');
|
|
91
|
+
}
|
|
92
|
+
if (data.hasOwnProperty('postProcessor')) {
|
|
93
|
+
obj['postProcessor'] = _PostProcessor["default"].constructFromObject(data['postProcessor']);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return obj;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Validates the JSON data with respect to <code>RetrieveMemoryRequest</code>.
|
|
101
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
102
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>RetrieveMemoryRequest</code>.
|
|
103
|
+
*/
|
|
104
|
+
}, {
|
|
105
|
+
key: "validateJSON",
|
|
106
|
+
value: function validateJSON(data) {
|
|
107
|
+
// check to make sure all required properties are present in the JSON string
|
|
108
|
+
var _iterator = _createForOfIteratorHelper(RetrieveMemoryRequest.RequiredProperties),
|
|
109
|
+
_step;
|
|
110
|
+
try {
|
|
111
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
112
|
+
var property = _step.value;
|
|
113
|
+
if (!data.hasOwnProperty(property)) {
|
|
114
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
// ensure the json data is a string
|
|
118
|
+
} catch (err) {
|
|
119
|
+
_iterator.e(err);
|
|
120
|
+
} finally {
|
|
121
|
+
_iterator.f();
|
|
122
|
+
}
|
|
123
|
+
if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
|
|
124
|
+
throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
|
|
125
|
+
}
|
|
126
|
+
if (data['context']) {
|
|
127
|
+
// data not null
|
|
128
|
+
// ensure the json data is an array
|
|
129
|
+
if (!Array.isArray(data['context'])) {
|
|
130
|
+
throw new Error("Expected the field `context` to be an array in the JSON data but got " + data['context']);
|
|
131
|
+
}
|
|
132
|
+
// validate the optional field `context` (array)
|
|
133
|
+
var _iterator2 = _createForOfIteratorHelper(data['context']),
|
|
134
|
+
_step2;
|
|
135
|
+
try {
|
|
136
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
137
|
+
var item = _step2.value;
|
|
138
|
+
_ContextItem["default"].validateJSON(item);
|
|
139
|
+
}
|
|
140
|
+
} catch (err) {
|
|
141
|
+
_iterator2.e(err);
|
|
142
|
+
} finally {
|
|
143
|
+
_iterator2.f();
|
|
144
|
+
}
|
|
145
|
+
;
|
|
146
|
+
}
|
|
147
|
+
if (data['spaceKeys']) {
|
|
148
|
+
// data not null
|
|
149
|
+
// ensure the json data is an array
|
|
150
|
+
if (!Array.isArray(data['spaceKeys'])) {
|
|
151
|
+
throw new Error("Expected the field `spaceKeys` to be an array in the JSON data but got " + data['spaceKeys']);
|
|
152
|
+
}
|
|
153
|
+
// validate the optional field `spaceKeys` (array)
|
|
154
|
+
var _iterator3 = _createForOfIteratorHelper(data['spaceKeys']),
|
|
155
|
+
_step3;
|
|
156
|
+
try {
|
|
157
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
158
|
+
var _item = _step3.value;
|
|
159
|
+
_SpaceKey["default"].validateJSON(_item);
|
|
160
|
+
}
|
|
161
|
+
} catch (err) {
|
|
162
|
+
_iterator3.e(err);
|
|
163
|
+
} finally {
|
|
164
|
+
_iterator3.f();
|
|
165
|
+
}
|
|
166
|
+
;
|
|
167
|
+
}
|
|
168
|
+
// validate the optional field `postProcessor`
|
|
169
|
+
if (data['postProcessor']) {
|
|
170
|
+
// data not null
|
|
171
|
+
_PostProcessor["default"].validateJSON(data['postProcessor']);
|
|
172
|
+
}
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
}]);
|
|
176
|
+
}();
|
|
177
|
+
RetrieveMemoryRequest.RequiredProperties = ["message", "spaceKeys"];
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Primary query/message for semantic search.
|
|
181
|
+
* @member {String} message
|
|
182
|
+
*/
|
|
183
|
+
RetrieveMemoryRequest.prototype['message'] = undefined;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Optional context items (text or binary) to provide additional context for the search.
|
|
187
|
+
* @member {Array.<module:model/ContextItem>} context
|
|
188
|
+
*/
|
|
189
|
+
RetrieveMemoryRequest.prototype['context'] = undefined;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* List of spaces to search with optional per-embedder weight overrides.
|
|
193
|
+
* @member {Array.<module:model/SpaceKey>} spaceKeys
|
|
194
|
+
*/
|
|
195
|
+
RetrieveMemoryRequest.prototype['spaceKeys'] = undefined;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Maximum number of memories to retrieve.
|
|
199
|
+
* @member {Number} requestedSize
|
|
200
|
+
*/
|
|
201
|
+
RetrieveMemoryRequest.prototype['requestedSize'] = undefined;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Whether to include full Memory objects in the response.
|
|
205
|
+
* @member {Boolean} fetchMemory
|
|
206
|
+
*/
|
|
207
|
+
RetrieveMemoryRequest.prototype['fetchMemory'] = undefined;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Whether to include memory content in the response. Requires fetchMemory=true.
|
|
211
|
+
* @member {Boolean} fetchMemoryContent
|
|
212
|
+
*/
|
|
213
|
+
RetrieveMemoryRequest.prototype['fetchMemoryContent'] = undefined;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* @member {module:model/PostProcessor} postProcessor
|
|
217
|
+
*/
|
|
218
|
+
RetrieveMemoryRequest.prototype['postProcessor'] = undefined;
|
|
219
|
+
var _default = exports["default"] = RetrieveMemoryRequest;
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
var _ChunkReference = _interopRequireDefault(require("./ChunkReference"));
|
|
9
|
+
var _Memory = _interopRequireDefault(require("./Memory"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
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); }
|
|
12
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
13
|
+
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); } }
|
|
14
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
|
+
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); } /**
|
|
17
|
+
*
|
|
18
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
19
|
+
*
|
|
20
|
+
* The version of the OpenAPI document:
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
24
|
+
* https://openapi-generator.tech
|
|
25
|
+
* Do not edit the class manually.
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* The RetrievedItem model module.
|
|
30
|
+
* @module model/RetrievedItem
|
|
31
|
+
* @version 1.0.0
|
|
32
|
+
*/
|
|
33
|
+
var RetrievedItem = /*#__PURE__*/function () {
|
|
34
|
+
/**
|
|
35
|
+
* Constructs a new <code>RetrievedItem</code>.
|
|
36
|
+
* A retrieved result that can be either a Memory or MemoryChunk
|
|
37
|
+
* @alias module:model/RetrievedItem
|
|
38
|
+
*/
|
|
39
|
+
function RetrievedItem() {
|
|
40
|
+
_classCallCheck(this, RetrievedItem);
|
|
41
|
+
RetrievedItem.initialize(this);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Initializes the fields of this object.
|
|
46
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
47
|
+
* Only for internal use.
|
|
48
|
+
*/
|
|
49
|
+
return _createClass(RetrievedItem, null, [{
|
|
50
|
+
key: "initialize",
|
|
51
|
+
value: function initialize(obj) {}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Constructs a <code>RetrievedItem</code> from a plain JavaScript object, optionally creating a new instance.
|
|
55
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
56
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
57
|
+
* @param {module:model/RetrievedItem} obj Optional instance to populate.
|
|
58
|
+
* @return {module:model/RetrievedItem} The populated <code>RetrievedItem</code> instance.
|
|
59
|
+
*/
|
|
60
|
+
}, {
|
|
61
|
+
key: "constructFromObject",
|
|
62
|
+
value: function constructFromObject(data, obj) {
|
|
63
|
+
if (data) {
|
|
64
|
+
obj = obj || new RetrievedItem();
|
|
65
|
+
if (data.hasOwnProperty('memory')) {
|
|
66
|
+
obj['memory'] = _Memory["default"].constructFromObject(data['memory']);
|
|
67
|
+
}
|
|
68
|
+
if (data.hasOwnProperty('chunk')) {
|
|
69
|
+
obj['chunk'] = _ChunkReference["default"].constructFromObject(data['chunk']);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return obj;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Validates the JSON data with respect to <code>RetrievedItem</code>.
|
|
77
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
78
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>RetrievedItem</code>.
|
|
79
|
+
*/
|
|
80
|
+
}, {
|
|
81
|
+
key: "validateJSON",
|
|
82
|
+
value: function validateJSON(data) {
|
|
83
|
+
// validate the optional field `memory`
|
|
84
|
+
if (data['memory']) {
|
|
85
|
+
// data not null
|
|
86
|
+
_Memory["default"].validateJSON(data['memory']);
|
|
87
|
+
}
|
|
88
|
+
// validate the optional field `chunk`
|
|
89
|
+
if (data['chunk']) {
|
|
90
|
+
// data not null
|
|
91
|
+
_ChunkReference["default"].validateJSON(data['chunk']);
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
}]);
|
|
96
|
+
}();
|
|
97
|
+
/**
|
|
98
|
+
* @member {module:model/Memory} memory
|
|
99
|
+
*/
|
|
100
|
+
RetrievedItem.prototype['memory'] = undefined;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @member {module:model/ChunkReference} chunk
|
|
104
|
+
*/
|
|
105
|
+
RetrievedItem.prototype['chunk'] = undefined;
|
|
106
|
+
var _default = exports["default"] = RetrievedItem;
|
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
var _LengthMeasurement = _interopRequireDefault(require("./LengthMeasurement"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
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); }
|
|
11
|
+
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; } } }; }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
+
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); } }
|
|
16
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
+
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); } /**
|
|
19
|
+
*
|
|
20
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
21
|
+
*
|
|
22
|
+
* The version of the OpenAPI document:
|
|
23
|
+
*
|
|
24
|
+
*
|
|
25
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
+
* https://openapi-generator.tech
|
|
27
|
+
* Do not edit the class manually.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* The SentenceChunkingConfiguration model module.
|
|
32
|
+
* @module model/SentenceChunkingConfiguration
|
|
33
|
+
* @version 1.0.0
|
|
34
|
+
*/
|
|
35
|
+
var SentenceChunkingConfiguration = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new <code>SentenceChunkingConfiguration</code>.
|
|
38
|
+
* Sentence-based chunking strategy with language detection support
|
|
39
|
+
* @alias module:model/SentenceChunkingConfiguration
|
|
40
|
+
* @param maxChunkSize {Number} Maximum size of a chunk
|
|
41
|
+
* @param minChunkSize {Number} Minimum size before creating a new chunk
|
|
42
|
+
* @param lengthMeasurement {module:model/LengthMeasurement}
|
|
43
|
+
*/
|
|
44
|
+
function SentenceChunkingConfiguration(maxChunkSize, minChunkSize, lengthMeasurement) {
|
|
45
|
+
_classCallCheck(this, SentenceChunkingConfiguration);
|
|
46
|
+
SentenceChunkingConfiguration.initialize(this, maxChunkSize, minChunkSize, lengthMeasurement);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Initializes the fields of this object.
|
|
51
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
52
|
+
* Only for internal use.
|
|
53
|
+
*/
|
|
54
|
+
return _createClass(SentenceChunkingConfiguration, null, [{
|
|
55
|
+
key: "initialize",
|
|
56
|
+
value: function initialize(obj, maxChunkSize, minChunkSize, lengthMeasurement) {
|
|
57
|
+
obj['maxChunkSize'] = maxChunkSize;
|
|
58
|
+
obj['minChunkSize'] = minChunkSize;
|
|
59
|
+
obj['lengthMeasurement'] = lengthMeasurement;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Constructs a <code>SentenceChunkingConfiguration</code> from a plain JavaScript object, optionally creating a new instance.
|
|
64
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
65
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
66
|
+
* @param {module:model/SentenceChunkingConfiguration} obj Optional instance to populate.
|
|
67
|
+
* @return {module:model/SentenceChunkingConfiguration} The populated <code>SentenceChunkingConfiguration</code> instance.
|
|
68
|
+
*/
|
|
69
|
+
}, {
|
|
70
|
+
key: "constructFromObject",
|
|
71
|
+
value: function constructFromObject(data, obj) {
|
|
72
|
+
if (data) {
|
|
73
|
+
obj = obj || new SentenceChunkingConfiguration();
|
|
74
|
+
if (data.hasOwnProperty('maxChunkSize')) {
|
|
75
|
+
obj['maxChunkSize'] = _ApiClient["default"].convertToType(data['maxChunkSize'], 'Number');
|
|
76
|
+
}
|
|
77
|
+
if (data.hasOwnProperty('minChunkSize')) {
|
|
78
|
+
obj['minChunkSize'] = _ApiClient["default"].convertToType(data['minChunkSize'], 'Number');
|
|
79
|
+
}
|
|
80
|
+
if (data.hasOwnProperty('enableLanguageDetection')) {
|
|
81
|
+
obj['enableLanguageDetection'] = _ApiClient["default"].convertToType(data['enableLanguageDetection'], 'Boolean');
|
|
82
|
+
}
|
|
83
|
+
if (data.hasOwnProperty('lengthMeasurement')) {
|
|
84
|
+
obj['lengthMeasurement'] = _LengthMeasurement["default"].constructFromObject(data['lengthMeasurement']);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return obj;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Validates the JSON data with respect to <code>SentenceChunkingConfiguration</code>.
|
|
92
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
93
|
+
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>SentenceChunkingConfiguration</code>.
|
|
94
|
+
*/
|
|
95
|
+
}, {
|
|
96
|
+
key: "validateJSON",
|
|
97
|
+
value: function validateJSON(data) {
|
|
98
|
+
// check to make sure all required properties are present in the JSON string
|
|
99
|
+
var _iterator = _createForOfIteratorHelper(SentenceChunkingConfiguration.RequiredProperties),
|
|
100
|
+
_step;
|
|
101
|
+
try {
|
|
102
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
103
|
+
var property = _step.value;
|
|
104
|
+
if (!data.hasOwnProperty(property)) {
|
|
105
|
+
throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
} catch (err) {
|
|
109
|
+
_iterator.e(err);
|
|
110
|
+
} finally {
|
|
111
|
+
_iterator.f();
|
|
112
|
+
}
|
|
113
|
+
return true;
|
|
114
|
+
}
|
|
115
|
+
}]);
|
|
116
|
+
}();
|
|
117
|
+
SentenceChunkingConfiguration.RequiredProperties = ["maxChunkSize", "minChunkSize", "lengthMeasurement"];
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Maximum size of a chunk
|
|
121
|
+
* @member {Number} maxChunkSize
|
|
122
|
+
*/
|
|
123
|
+
SentenceChunkingConfiguration.prototype['maxChunkSize'] = undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Minimum size before creating a new chunk
|
|
127
|
+
* @member {Number} minChunkSize
|
|
128
|
+
*/
|
|
129
|
+
SentenceChunkingConfiguration.prototype['minChunkSize'] = undefined;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Whether to detect language for better segmentation
|
|
133
|
+
* @member {Boolean} enableLanguageDetection
|
|
134
|
+
*/
|
|
135
|
+
SentenceChunkingConfiguration.prototype['enableLanguageDetection'] = undefined;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @member {module:model/LengthMeasurement} lengthMeasurement
|
|
139
|
+
*/
|
|
140
|
+
SentenceChunkingConfiguration.prototype['lengthMeasurement'] = undefined;
|
|
141
|
+
var _default = exports["default"] = SentenceChunkingConfiguration;
|
|
@@ -0,0 +1,63 @@
|
|
|
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
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); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); } /**
|
|
16
|
+
*
|
|
17
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
18
|
+
*
|
|
19
|
+
* The version of the OpenAPI document:
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
/**
|
|
28
|
+
* Enum class SeparatorKeepStrategy.
|
|
29
|
+
* @enum {}
|
|
30
|
+
* @readonly
|
|
31
|
+
*/
|
|
32
|
+
var SeparatorKeepStrategy = exports["default"] = /*#__PURE__*/function () {
|
|
33
|
+
function SeparatorKeepStrategy() {
|
|
34
|
+
_classCallCheck(this, SeparatorKeepStrategy);
|
|
35
|
+
/**
|
|
36
|
+
* value: "KEEP_NONE"
|
|
37
|
+
* @const
|
|
38
|
+
*/
|
|
39
|
+
_defineProperty(this, "KEEP_NONE", "KEEP_NONE");
|
|
40
|
+
/**
|
|
41
|
+
* value: "KEEP_START"
|
|
42
|
+
* @const
|
|
43
|
+
*/
|
|
44
|
+
_defineProperty(this, "KEEP_START", "KEEP_START");
|
|
45
|
+
/**
|
|
46
|
+
* value: "KEEP_END"
|
|
47
|
+
* @const
|
|
48
|
+
*/
|
|
49
|
+
_defineProperty(this, "KEEP_END", "KEEP_END");
|
|
50
|
+
}
|
|
51
|
+
return _createClass(SeparatorKeepStrategy, null, [{
|
|
52
|
+
key: "constructFromObject",
|
|
53
|
+
value:
|
|
54
|
+
/**
|
|
55
|
+
* Returns a <code>SeparatorKeepStrategy</code> enum value from a Javascript object name.
|
|
56
|
+
* @param {Object} data The plain JavaScript object containing the name of the enum value.
|
|
57
|
+
* @return {module:model/SeparatorKeepStrategy} The enum <code>SeparatorKeepStrategy</code> value.
|
|
58
|
+
*/
|
|
59
|
+
function constructFromObject(object) {
|
|
60
|
+
return object;
|
|
61
|
+
}
|
|
62
|
+
}]);
|
|
63
|
+
}();
|
package/dist/model/Space.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _ChunkingConfiguration = _interopRequireDefault(require("./ChunkingConfiguration"));
|
|
8
9
|
var _SpaceEmbedder = _interopRequireDefault(require("./SpaceEmbedder"));
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
11
|
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); }
|
|
@@ -16,11 +17,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
16
17
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
19
|
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); } /**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
20
|
+
*
|
|
21
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
21
22
|
*
|
|
22
|
-
* The version of the OpenAPI document:
|
|
23
|
-
*
|
|
23
|
+
* The version of the OpenAPI document:
|
|
24
|
+
*
|
|
24
25
|
*
|
|
25
26
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
27
|
* https://openapi-generator.tech
|
|
@@ -30,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
31
|
/**
|
|
31
32
|
* The Space model module.
|
|
32
33
|
* @module model/Space
|
|
33
|
-
* @version
|
|
34
|
+
* @version 1.0.0
|
|
34
35
|
*/
|
|
35
36
|
var Space = /*#__PURE__*/function () {
|
|
36
37
|
/**
|
|
@@ -115,6 +116,9 @@ var Space = /*#__PURE__*/function () {
|
|
|
115
116
|
if (data.hasOwnProperty('publicRead')) {
|
|
116
117
|
obj['publicRead'] = _ApiClient["default"].convertToType(data['publicRead'], 'Boolean');
|
|
117
118
|
}
|
|
119
|
+
if (data.hasOwnProperty('defaultChunkingConfig')) {
|
|
120
|
+
obj['defaultChunkingConfig'] = _ChunkingConfiguration["default"].constructFromObject(data['defaultChunkingConfig']);
|
|
121
|
+
}
|
|
118
122
|
}
|
|
119
123
|
return obj;
|
|
120
124
|
}
|
|
@@ -183,6 +187,11 @@ var Space = /*#__PURE__*/function () {
|
|
|
183
187
|
if (data['updatedById'] && !(typeof data['updatedById'] === 'string' || data['updatedById'] instanceof String)) {
|
|
184
188
|
throw new Error("Expected the field `updatedById` to be a primitive type in the JSON string but got " + data['updatedById']);
|
|
185
189
|
}
|
|
190
|
+
// validate the optional field `defaultChunkingConfig`
|
|
191
|
+
if (data['defaultChunkingConfig']) {
|
|
192
|
+
// data not null
|
|
193
|
+
_ChunkingConfiguration["default"].validateJSON(data['defaultChunkingConfig']);
|
|
194
|
+
}
|
|
186
195
|
return true;
|
|
187
196
|
}
|
|
188
197
|
}]);
|
|
@@ -248,4 +257,9 @@ Space.prototype['updatedById'] = undefined;
|
|
|
248
257
|
* @member {Boolean} publicRead
|
|
249
258
|
*/
|
|
250
259
|
Space.prototype['publicRead'] = undefined;
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @member {module:model/ChunkingConfiguration} defaultChunkingConfig
|
|
263
|
+
*/
|
|
264
|
+
Space.prototype['defaultChunkingConfig'] = undefined;
|
|
251
265
|
var _default = exports["default"] = Space;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
+
var _ChunkingConfiguration = _interopRequireDefault(require("./ChunkingConfiguration"));
|
|
8
9
|
var _SpaceEmbedderConfig = _interopRequireDefault(require("./SpaceEmbedderConfig"));
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
11
|
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); }
|
|
@@ -16,11 +17,11 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
16
17
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
18
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
19
|
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); } /**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
20
|
+
*
|
|
21
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
21
22
|
*
|
|
22
|
-
* The version of the OpenAPI document:
|
|
23
|
-
*
|
|
23
|
+
* The version of the OpenAPI document:
|
|
24
|
+
*
|
|
24
25
|
*
|
|
25
26
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
27
|
* https://openapi-generator.tech
|
|
@@ -30,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
30
31
|
/**
|
|
31
32
|
* The SpaceCreationRequest model module.
|
|
32
33
|
* @module model/SpaceCreationRequest
|
|
33
|
-
* @version
|
|
34
|
+
* @version 1.0.0
|
|
34
35
|
*/
|
|
35
36
|
var SpaceCreationRequest = /*#__PURE__*/function () {
|
|
36
37
|
/**
|
|
@@ -84,6 +85,9 @@ var SpaceCreationRequest = /*#__PURE__*/function () {
|
|
|
84
85
|
if (data.hasOwnProperty('ownerId')) {
|
|
85
86
|
obj['ownerId'] = _ApiClient["default"].convertToType(data['ownerId'], 'String');
|
|
86
87
|
}
|
|
88
|
+
if (data.hasOwnProperty('defaultChunkingConfig')) {
|
|
89
|
+
obj['defaultChunkingConfig'] = _ChunkingConfiguration["default"].constructFromObject(data['defaultChunkingConfig']);
|
|
90
|
+
}
|
|
87
91
|
}
|
|
88
92
|
return obj;
|
|
89
93
|
}
|
|
@@ -140,6 +144,11 @@ var SpaceCreationRequest = /*#__PURE__*/function () {
|
|
|
140
144
|
if (data['ownerId'] && !(typeof data['ownerId'] === 'string' || data['ownerId'] instanceof String)) {
|
|
141
145
|
throw new Error("Expected the field `ownerId` to be a primitive type in the JSON string but got " + data['ownerId']);
|
|
142
146
|
}
|
|
147
|
+
// validate the optional field `defaultChunkingConfig`
|
|
148
|
+
if (data['defaultChunkingConfig']) {
|
|
149
|
+
// data not null
|
|
150
|
+
_ChunkingConfiguration["default"].validateJSON(data['defaultChunkingConfig']);
|
|
151
|
+
}
|
|
143
152
|
return true;
|
|
144
153
|
}
|
|
145
154
|
}]);
|
|
@@ -175,4 +184,9 @@ SpaceCreationRequest.prototype['publicRead'] = undefined;
|
|
|
175
184
|
* @member {String} ownerId
|
|
176
185
|
*/
|
|
177
186
|
SpaceCreationRequest.prototype['ownerId'] = undefined;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @member {module:model/ChunkingConfiguration} defaultChunkingConfig
|
|
190
|
+
*/
|
|
191
|
+
SpaceCreationRequest.prototype['defaultChunkingConfig'] = undefined;
|
|
178
192
|
var _default = exports["default"] = SpaceCreationRequest;
|