@pairsystems/goodmem-client 1.0.0-beta.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.
Files changed (36) hide show
  1. package/README.md +200 -0
  2. package/dist/ApiClient.js +718 -0
  3. package/dist/api/APIKeysApi.js +188 -0
  4. package/dist/api/EmbeddersApi.js +232 -0
  5. package/dist/api/MemoriesApi.js +290 -0
  6. package/dist/api/SpacesApi.js +240 -0
  7. package/dist/api/SystemApi.js +77 -0
  8. package/dist/api/UsersApi.js +86 -0
  9. package/dist/client.js +150 -0
  10. package/dist/index.js +230 -0
  11. package/dist/model/ApiKeyResponse.js +203 -0
  12. package/dist/model/BatchMemoryCreationRequest.js +140 -0
  13. package/dist/model/BatchMemoryDeletionRequest.js +122 -0
  14. package/dist/model/BatchMemoryRetrievalRequest.js +131 -0
  15. package/dist/model/CreateApiKeyRequest.js +98 -0
  16. package/dist/model/CreateApiKeyResponse.js +105 -0
  17. package/dist/model/EmbedderCreationRequest.js +288 -0
  18. package/dist/model/EmbedderResponse.js +336 -0
  19. package/dist/model/ListApiKeysResponse.js +112 -0
  20. package/dist/model/ListEmbeddersResponse.js +132 -0
  21. package/dist/model/ListSpacesResponse.js +125 -0
  22. package/dist/model/Memory.js +248 -0
  23. package/dist/model/MemoryCreationRequest.js +187 -0
  24. package/dist/model/MemoryListResponse.js +145 -0
  25. package/dist/model/Modality.js +68 -0
  26. package/dist/model/ProviderType.js +63 -0
  27. package/dist/model/Space.js +251 -0
  28. package/dist/model/SpaceCreationRequest.js +178 -0
  29. package/dist/model/SpaceEmbedder.js +192 -0
  30. package/dist/model/SpaceEmbedderConfig.js +125 -0
  31. package/dist/model/SystemInitResponse.js +151 -0
  32. package/dist/model/UpdateApiKeyRequest.js +121 -0
  33. package/dist/model/UpdateEmbedderRequest.js +244 -0
  34. package/dist/model/UpdateSpaceRequest.js +166 -0
  35. package/dist/model/UserResponse.js +179 -0
  36. package/package.json +78 -0
@@ -0,0 +1,288 @@
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 _Modality = _interopRequireDefault(require("./Modality"));
9
+ var _ProviderType = _interopRequireDefault(require("./ProviderType"));
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 _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; } } }; }
13
+ 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; } }
14
+ 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; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ 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); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
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); } /**
20
+ * GoodMem API
21
+ * API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support. The service enables creation of memory spaces, storing memories with vector representations, and efficient similarity-based retrieval.
22
+ *
23
+ * The version of the OpenAPI document: v1
24
+ * Contact: support@goodmem.io
25
+ *
26
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
+ * https://openapi-generator.tech
28
+ * Do not edit the class manually.
29
+ *
30
+ */
31
+ /**
32
+ * The EmbedderCreationRequest model module.
33
+ * @module model/EmbedderCreationRequest
34
+ * @version v1
35
+ */
36
+ var EmbedderCreationRequest = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>EmbedderCreationRequest</code>.
39
+ * Request body for creating a new Embedder. An Embedder represents a configuration for vectorizing content.
40
+ * @alias module:model/EmbedderCreationRequest
41
+ * @param displayName {String} User-facing name of the embedder
42
+ * @param providerType {module:model/ProviderType}
43
+ * @param endpointUrl {String} API endpoint URL
44
+ * @param modelIdentifier {String} Model identifier
45
+ * @param dimensionality {Number} Output vector dimensions
46
+ * @param credentials {String} API credentials (required)
47
+ */
48
+ function EmbedderCreationRequest(displayName, providerType, endpointUrl, modelIdentifier, dimensionality, credentials) {
49
+ _classCallCheck(this, EmbedderCreationRequest);
50
+ EmbedderCreationRequest.initialize(this, displayName, providerType, endpointUrl, modelIdentifier, dimensionality, credentials);
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(EmbedderCreationRequest, null, [{
59
+ key: "initialize",
60
+ value: function initialize(obj, displayName, providerType, endpointUrl, modelIdentifier, dimensionality, credentials) {
61
+ obj['displayName'] = displayName;
62
+ obj['providerType'] = providerType;
63
+ obj['endpointUrl'] = endpointUrl;
64
+ obj['modelIdentifier'] = modelIdentifier;
65
+ obj['dimensionality'] = dimensionality;
66
+ obj['credentials'] = credentials;
67
+ }
68
+
69
+ /**
70
+ * Constructs a <code>EmbedderCreationRequest</code> from a plain JavaScript object, optionally creating a new instance.
71
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
72
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
73
+ * @param {module:model/EmbedderCreationRequest} obj Optional instance to populate.
74
+ * @return {module:model/EmbedderCreationRequest} The populated <code>EmbedderCreationRequest</code> instance.
75
+ */
76
+ }, {
77
+ key: "constructFromObject",
78
+ value: function constructFromObject(data, obj) {
79
+ if (data) {
80
+ obj = obj || new EmbedderCreationRequest();
81
+ if (data.hasOwnProperty('validate')) {
82
+ obj['validate'] = _ApiClient["default"].convertToType(data['validate'], Object);
83
+ }
84
+ if (data.hasOwnProperty('displayName')) {
85
+ obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String');
86
+ }
87
+ if (data.hasOwnProperty('description')) {
88
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
89
+ }
90
+ if (data.hasOwnProperty('providerType')) {
91
+ obj['providerType'] = _ProviderType["default"].constructFromObject(data['providerType']);
92
+ }
93
+ if (data.hasOwnProperty('endpointUrl')) {
94
+ obj['endpointUrl'] = _ApiClient["default"].convertToType(data['endpointUrl'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('apiPath')) {
97
+ obj['apiPath'] = _ApiClient["default"].convertToType(data['apiPath'], 'String');
98
+ }
99
+ if (data.hasOwnProperty('modelIdentifier')) {
100
+ obj['modelIdentifier'] = _ApiClient["default"].convertToType(data['modelIdentifier'], 'String');
101
+ }
102
+ if (data.hasOwnProperty('dimensionality')) {
103
+ obj['dimensionality'] = _ApiClient["default"].convertToType(data['dimensionality'], 'Number');
104
+ }
105
+ if (data.hasOwnProperty('maxSequenceLength')) {
106
+ obj['maxSequenceLength'] = _ApiClient["default"].convertToType(data['maxSequenceLength'], 'Number');
107
+ }
108
+ if (data.hasOwnProperty('supportedModalities')) {
109
+ obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
110
+ }
111
+ if (data.hasOwnProperty('credentials')) {
112
+ obj['credentials'] = _ApiClient["default"].convertToType(data['credentials'], 'String');
113
+ }
114
+ if (data.hasOwnProperty('labels')) {
115
+ obj['labels'] = _ApiClient["default"].convertToType(data['labels'], {
116
+ 'String': 'String'
117
+ });
118
+ }
119
+ if (data.hasOwnProperty('version')) {
120
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
121
+ }
122
+ if (data.hasOwnProperty('monitoringEndpoint')) {
123
+ obj['monitoringEndpoint'] = _ApiClient["default"].convertToType(data['monitoringEndpoint'], 'String');
124
+ }
125
+ if (data.hasOwnProperty('ownerId')) {
126
+ obj['ownerId'] = _ApiClient["default"].convertToType(data['ownerId'], 'String');
127
+ }
128
+ }
129
+ return obj;
130
+ }
131
+
132
+ /**
133
+ * Validates the JSON data with respect to <code>EmbedderCreationRequest</code>.
134
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
135
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>EmbedderCreationRequest</code>.
136
+ */
137
+ }, {
138
+ key: "validateJSON",
139
+ value: function validateJSON(data) {
140
+ // check to make sure all required properties are present in the JSON string
141
+ var _iterator = _createForOfIteratorHelper(EmbedderCreationRequest.RequiredProperties),
142
+ _step;
143
+ try {
144
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
145
+ var property = _step.value;
146
+ if (!data.hasOwnProperty(property)) {
147
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
148
+ }
149
+ }
150
+ // ensure the json data is a string
151
+ } catch (err) {
152
+ _iterator.e(err);
153
+ } finally {
154
+ _iterator.f();
155
+ }
156
+ if (data['displayName'] && !(typeof data['displayName'] === 'string' || data['displayName'] instanceof String)) {
157
+ throw new Error("Expected the field `displayName` to be a primitive type in the JSON string but got " + data['displayName']);
158
+ }
159
+ // ensure the json data is a string
160
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
161
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
162
+ }
163
+ // ensure the json data is a string
164
+ if (data['endpointUrl'] && !(typeof data['endpointUrl'] === 'string' || data['endpointUrl'] instanceof String)) {
165
+ throw new Error("Expected the field `endpointUrl` to be a primitive type in the JSON string but got " + data['endpointUrl']);
166
+ }
167
+ // ensure the json data is a string
168
+ if (data['apiPath'] && !(typeof data['apiPath'] === 'string' || data['apiPath'] instanceof String)) {
169
+ throw new Error("Expected the field `apiPath` to be a primitive type in the JSON string but got " + data['apiPath']);
170
+ }
171
+ // ensure the json data is a string
172
+ if (data['modelIdentifier'] && !(typeof data['modelIdentifier'] === 'string' || data['modelIdentifier'] instanceof String)) {
173
+ throw new Error("Expected the field `modelIdentifier` to be a primitive type in the JSON string but got " + data['modelIdentifier']);
174
+ }
175
+ // ensure the json data is an array
176
+ if (!Array.isArray(data['supportedModalities'])) {
177
+ throw new Error("Expected the field `supportedModalities` to be an array in the JSON data but got " + data['supportedModalities']);
178
+ }
179
+ // ensure the json data is a string
180
+ if (data['credentials'] && !(typeof data['credentials'] === 'string' || data['credentials'] instanceof String)) {
181
+ throw new Error("Expected the field `credentials` to be a primitive type in the JSON string but got " + data['credentials']);
182
+ }
183
+ // ensure the json data is a string
184
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
185
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
186
+ }
187
+ // ensure the json data is a string
188
+ if (data['monitoringEndpoint'] && !(typeof data['monitoringEndpoint'] === 'string' || data['monitoringEndpoint'] instanceof String)) {
189
+ throw new Error("Expected the field `monitoringEndpoint` to be a primitive type in the JSON string but got " + data['monitoringEndpoint']);
190
+ }
191
+ // ensure the json data is a string
192
+ if (data['ownerId'] && !(typeof data['ownerId'] === 'string' || data['ownerId'] instanceof String)) {
193
+ throw new Error("Expected the field `ownerId` to be a primitive type in the JSON string but got " + data['ownerId']);
194
+ }
195
+ return true;
196
+ }
197
+ }]);
198
+ }();
199
+ EmbedderCreationRequest.RequiredProperties = ["displayName", "providerType", "endpointUrl", "modelIdentifier", "dimensionality", "credentials"];
200
+
201
+ /**
202
+ * @member {Object} validate
203
+ */
204
+ EmbedderCreationRequest.prototype['validate'] = undefined;
205
+
206
+ /**
207
+ * User-facing name of the embedder
208
+ * @member {String} displayName
209
+ */
210
+ EmbedderCreationRequest.prototype['displayName'] = undefined;
211
+
212
+ /**
213
+ * Description of the embedder
214
+ * @member {String} description
215
+ */
216
+ EmbedderCreationRequest.prototype['description'] = undefined;
217
+
218
+ /**
219
+ * @member {module:model/ProviderType} providerType
220
+ */
221
+ EmbedderCreationRequest.prototype['providerType'] = undefined;
222
+
223
+ /**
224
+ * API endpoint URL
225
+ * @member {String} endpointUrl
226
+ */
227
+ EmbedderCreationRequest.prototype['endpointUrl'] = undefined;
228
+
229
+ /**
230
+ * API path for embeddings request (defaults to /embeddings if not provided)
231
+ * @member {String} apiPath
232
+ */
233
+ EmbedderCreationRequest.prototype['apiPath'] = undefined;
234
+
235
+ /**
236
+ * Model identifier
237
+ * @member {String} modelIdentifier
238
+ */
239
+ EmbedderCreationRequest.prototype['modelIdentifier'] = undefined;
240
+
241
+ /**
242
+ * Output vector dimensions
243
+ * @member {Number} dimensionality
244
+ */
245
+ EmbedderCreationRequest.prototype['dimensionality'] = undefined;
246
+
247
+ /**
248
+ * Maximum input sequence length
249
+ * @member {Number} maxSequenceLength
250
+ */
251
+ EmbedderCreationRequest.prototype['maxSequenceLength'] = undefined;
252
+
253
+ /**
254
+ * Supported content modalities (defaults to TEXT if not provided)
255
+ * @member {Array.<module:model/Modality>} supportedModalities
256
+ */
257
+ EmbedderCreationRequest.prototype['supportedModalities'] = undefined;
258
+
259
+ /**
260
+ * API credentials (required)
261
+ * @member {String} credentials
262
+ */
263
+ EmbedderCreationRequest.prototype['credentials'] = undefined;
264
+
265
+ /**
266
+ * User-defined labels for categorization
267
+ * @member {Object.<String, String>} labels
268
+ */
269
+ EmbedderCreationRequest.prototype['labels'] = undefined;
270
+
271
+ /**
272
+ * Version information
273
+ * @member {String} version
274
+ */
275
+ EmbedderCreationRequest.prototype['version'] = undefined;
276
+
277
+ /**
278
+ * Monitoring endpoint URL
279
+ * @member {String} monitoringEndpoint
280
+ */
281
+ EmbedderCreationRequest.prototype['monitoringEndpoint'] = undefined;
282
+
283
+ /**
284
+ * Optional owner ID. If not provided, derived from the authentication context. Requires CREATE_EMBEDDER_ANY permission if specified.
285
+ * @member {String} ownerId
286
+ */
287
+ EmbedderCreationRequest.prototype['ownerId'] = undefined;
288
+ var _default = exports["default"] = EmbedderCreationRequest;
@@ -0,0 +1,336 @@
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 _Modality = _interopRequireDefault(require("./Modality"));
9
+ var _ProviderType = _interopRequireDefault(require("./ProviderType"));
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 _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; } } }; }
13
+ 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; } }
14
+ 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; }
15
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
+ 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); } }
17
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
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); } /**
20
+ * GoodMem API
21
+ * API for interacting with the GoodMem service, providing vector-based memory storage and retrieval with multiple embedder support. The service enables creation of memory spaces, storing memories with vector representations, and efficient similarity-based retrieval.
22
+ *
23
+ * The version of the OpenAPI document: v1
24
+ * Contact: support@goodmem.io
25
+ *
26
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
27
+ * https://openapi-generator.tech
28
+ * Do not edit the class manually.
29
+ *
30
+ */
31
+ /**
32
+ * The EmbedderResponse model module.
33
+ * @module model/EmbedderResponse
34
+ * @version v1
35
+ */
36
+ var EmbedderResponse = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>EmbedderResponse</code>.
39
+ * Embedder configuration information
40
+ * @alias module:model/EmbedderResponse
41
+ * @param embedderId {String} Unique identifier of the embedder
42
+ * @param displayName {String} User-facing name of the embedder
43
+ * @param providerType {module:model/ProviderType}
44
+ * @param endpointUrl {String} API endpoint URL
45
+ * @param apiPath {String} API path for embeddings request
46
+ * @param modelIdentifier {String} Model identifier
47
+ * @param dimensionality {Number} Output vector dimensions
48
+ * @param ownerId {String} Owner ID of the embedder
49
+ * @param createdAt {Number} Creation timestamp (milliseconds since epoch)
50
+ * @param updatedAt {Number} Last update timestamp (milliseconds since epoch)
51
+ * @param createdById {String} ID of the user who created the embedder
52
+ * @param updatedById {String} ID of the user who last updated the embedder
53
+ */
54
+ function EmbedderResponse(embedderId, displayName, providerType, endpointUrl, apiPath, modelIdentifier, dimensionality, ownerId, createdAt, updatedAt, createdById, updatedById) {
55
+ _classCallCheck(this, EmbedderResponse);
56
+ EmbedderResponse.initialize(this, embedderId, displayName, providerType, endpointUrl, apiPath, modelIdentifier, dimensionality, ownerId, createdAt, updatedAt, createdById, updatedById);
57
+ }
58
+
59
+ /**
60
+ * Initializes the fields of this object.
61
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
62
+ * Only for internal use.
63
+ */
64
+ return _createClass(EmbedderResponse, null, [{
65
+ key: "initialize",
66
+ value: function initialize(obj, embedderId, displayName, providerType, endpointUrl, apiPath, modelIdentifier, dimensionality, ownerId, createdAt, updatedAt, createdById, updatedById) {
67
+ obj['embedderId'] = embedderId;
68
+ obj['displayName'] = displayName;
69
+ obj['providerType'] = providerType;
70
+ obj['endpointUrl'] = endpointUrl;
71
+ obj['apiPath'] = apiPath;
72
+ obj['modelIdentifier'] = modelIdentifier;
73
+ obj['dimensionality'] = dimensionality;
74
+ obj['ownerId'] = ownerId;
75
+ obj['createdAt'] = createdAt;
76
+ obj['updatedAt'] = updatedAt;
77
+ obj['createdById'] = createdById;
78
+ obj['updatedById'] = updatedById;
79
+ }
80
+
81
+ /**
82
+ * Constructs a <code>EmbedderResponse</code> from a plain JavaScript object, optionally creating a new instance.
83
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
84
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
85
+ * @param {module:model/EmbedderResponse} obj Optional instance to populate.
86
+ * @return {module:model/EmbedderResponse} The populated <code>EmbedderResponse</code> instance.
87
+ */
88
+ }, {
89
+ key: "constructFromObject",
90
+ value: function constructFromObject(data, obj) {
91
+ if (data) {
92
+ obj = obj || new EmbedderResponse();
93
+ if (data.hasOwnProperty('embedderId')) {
94
+ obj['embedderId'] = _ApiClient["default"].convertToType(data['embedderId'], 'String');
95
+ }
96
+ if (data.hasOwnProperty('displayName')) {
97
+ obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String');
98
+ }
99
+ if (data.hasOwnProperty('description')) {
100
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
101
+ }
102
+ if (data.hasOwnProperty('providerType')) {
103
+ obj['providerType'] = _ProviderType["default"].constructFromObject(data['providerType']);
104
+ }
105
+ if (data.hasOwnProperty('endpointUrl')) {
106
+ obj['endpointUrl'] = _ApiClient["default"].convertToType(data['endpointUrl'], 'String');
107
+ }
108
+ if (data.hasOwnProperty('apiPath')) {
109
+ obj['apiPath'] = _ApiClient["default"].convertToType(data['apiPath'], 'String');
110
+ }
111
+ if (data.hasOwnProperty('modelIdentifier')) {
112
+ obj['modelIdentifier'] = _ApiClient["default"].convertToType(data['modelIdentifier'], 'String');
113
+ }
114
+ if (data.hasOwnProperty('dimensionality')) {
115
+ obj['dimensionality'] = _ApiClient["default"].convertToType(data['dimensionality'], 'Number');
116
+ }
117
+ if (data.hasOwnProperty('maxSequenceLength')) {
118
+ obj['maxSequenceLength'] = _ApiClient["default"].convertToType(data['maxSequenceLength'], 'Number');
119
+ }
120
+ if (data.hasOwnProperty('supportedModalities')) {
121
+ obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
122
+ }
123
+ if (data.hasOwnProperty('labels')) {
124
+ obj['labels'] = _ApiClient["default"].convertToType(data['labels'], {
125
+ 'String': 'String'
126
+ });
127
+ }
128
+ if (data.hasOwnProperty('version')) {
129
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
130
+ }
131
+ if (data.hasOwnProperty('monitoringEndpoint')) {
132
+ obj['monitoringEndpoint'] = _ApiClient["default"].convertToType(data['monitoringEndpoint'], 'String');
133
+ }
134
+ if (data.hasOwnProperty('ownerId')) {
135
+ obj['ownerId'] = _ApiClient["default"].convertToType(data['ownerId'], 'String');
136
+ }
137
+ if (data.hasOwnProperty('createdAt')) {
138
+ obj['createdAt'] = _ApiClient["default"].convertToType(data['createdAt'], 'Number');
139
+ }
140
+ if (data.hasOwnProperty('updatedAt')) {
141
+ obj['updatedAt'] = _ApiClient["default"].convertToType(data['updatedAt'], 'Number');
142
+ }
143
+ if (data.hasOwnProperty('createdById')) {
144
+ obj['createdById'] = _ApiClient["default"].convertToType(data['createdById'], 'String');
145
+ }
146
+ if (data.hasOwnProperty('updatedById')) {
147
+ obj['updatedById'] = _ApiClient["default"].convertToType(data['updatedById'], 'String');
148
+ }
149
+ }
150
+ return obj;
151
+ }
152
+
153
+ /**
154
+ * Validates the JSON data with respect to <code>EmbedderResponse</code>.
155
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
156
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>EmbedderResponse</code>.
157
+ */
158
+ }, {
159
+ key: "validateJSON",
160
+ value: function validateJSON(data) {
161
+ // check to make sure all required properties are present in the JSON string
162
+ var _iterator = _createForOfIteratorHelper(EmbedderResponse.RequiredProperties),
163
+ _step;
164
+ try {
165
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
166
+ var property = _step.value;
167
+ if (!data.hasOwnProperty(property)) {
168
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
169
+ }
170
+ }
171
+ // ensure the json data is a string
172
+ } catch (err) {
173
+ _iterator.e(err);
174
+ } finally {
175
+ _iterator.f();
176
+ }
177
+ if (data['embedderId'] && !(typeof data['embedderId'] === 'string' || data['embedderId'] instanceof String)) {
178
+ throw new Error("Expected the field `embedderId` to be a primitive type in the JSON string but got " + data['embedderId']);
179
+ }
180
+ // ensure the json data is a string
181
+ if (data['displayName'] && !(typeof data['displayName'] === 'string' || data['displayName'] instanceof String)) {
182
+ throw new Error("Expected the field `displayName` to be a primitive type in the JSON string but got " + data['displayName']);
183
+ }
184
+ // ensure the json data is a string
185
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
186
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
187
+ }
188
+ // ensure the json data is a string
189
+ if (data['endpointUrl'] && !(typeof data['endpointUrl'] === 'string' || data['endpointUrl'] instanceof String)) {
190
+ throw new Error("Expected the field `endpointUrl` to be a primitive type in the JSON string but got " + data['endpointUrl']);
191
+ }
192
+ // ensure the json data is a string
193
+ if (data['apiPath'] && !(typeof data['apiPath'] === 'string' || data['apiPath'] instanceof String)) {
194
+ throw new Error("Expected the field `apiPath` to be a primitive type in the JSON string but got " + data['apiPath']);
195
+ }
196
+ // ensure the json data is a string
197
+ if (data['modelIdentifier'] && !(typeof data['modelIdentifier'] === 'string' || data['modelIdentifier'] instanceof String)) {
198
+ throw new Error("Expected the field `modelIdentifier` to be a primitive type in the JSON string but got " + data['modelIdentifier']);
199
+ }
200
+ // ensure the json data is an array
201
+ if (!Array.isArray(data['supportedModalities'])) {
202
+ throw new Error("Expected the field `supportedModalities` to be an array in the JSON data but got " + data['supportedModalities']);
203
+ }
204
+ // ensure the json data is a string
205
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
206
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
207
+ }
208
+ // ensure the json data is a string
209
+ if (data['monitoringEndpoint'] && !(typeof data['monitoringEndpoint'] === 'string' || data['monitoringEndpoint'] instanceof String)) {
210
+ throw new Error("Expected the field `monitoringEndpoint` to be a primitive type in the JSON string but got " + data['monitoringEndpoint']);
211
+ }
212
+ // ensure the json data is a string
213
+ if (data['ownerId'] && !(typeof data['ownerId'] === 'string' || data['ownerId'] instanceof String)) {
214
+ throw new Error("Expected the field `ownerId` to be a primitive type in the JSON string but got " + data['ownerId']);
215
+ }
216
+ // ensure the json data is a string
217
+ if (data['createdById'] && !(typeof data['createdById'] === 'string' || data['createdById'] instanceof String)) {
218
+ throw new Error("Expected the field `createdById` to be a primitive type in the JSON string but got " + data['createdById']);
219
+ }
220
+ // ensure the json data is a string
221
+ if (data['updatedById'] && !(typeof data['updatedById'] === 'string' || data['updatedById'] instanceof String)) {
222
+ throw new Error("Expected the field `updatedById` to be a primitive type in the JSON string but got " + data['updatedById']);
223
+ }
224
+ return true;
225
+ }
226
+ }]);
227
+ }();
228
+ EmbedderResponse.RequiredProperties = ["embedderId", "displayName", "providerType", "endpointUrl", "apiPath", "modelIdentifier", "dimensionality", "ownerId", "createdAt", "updatedAt", "createdById", "updatedById"];
229
+
230
+ /**
231
+ * Unique identifier of the embedder
232
+ * @member {String} embedderId
233
+ */
234
+ EmbedderResponse.prototype['embedderId'] = undefined;
235
+
236
+ /**
237
+ * User-facing name of the embedder
238
+ * @member {String} displayName
239
+ */
240
+ EmbedderResponse.prototype['displayName'] = undefined;
241
+
242
+ /**
243
+ * Description of the embedder
244
+ * @member {String} description
245
+ */
246
+ EmbedderResponse.prototype['description'] = undefined;
247
+
248
+ /**
249
+ * @member {module:model/ProviderType} providerType
250
+ */
251
+ EmbedderResponse.prototype['providerType'] = undefined;
252
+
253
+ /**
254
+ * API endpoint URL
255
+ * @member {String} endpointUrl
256
+ */
257
+ EmbedderResponse.prototype['endpointUrl'] = undefined;
258
+
259
+ /**
260
+ * API path for embeddings request
261
+ * @member {String} apiPath
262
+ */
263
+ EmbedderResponse.prototype['apiPath'] = undefined;
264
+
265
+ /**
266
+ * Model identifier
267
+ * @member {String} modelIdentifier
268
+ */
269
+ EmbedderResponse.prototype['modelIdentifier'] = undefined;
270
+
271
+ /**
272
+ * Output vector dimensions
273
+ * @member {Number} dimensionality
274
+ */
275
+ EmbedderResponse.prototype['dimensionality'] = undefined;
276
+
277
+ /**
278
+ * Maximum input sequence length
279
+ * @member {Number} maxSequenceLength
280
+ */
281
+ EmbedderResponse.prototype['maxSequenceLength'] = undefined;
282
+
283
+ /**
284
+ * Supported content modalities
285
+ * @member {Array.<module:model/Modality>} supportedModalities
286
+ */
287
+ EmbedderResponse.prototype['supportedModalities'] = undefined;
288
+
289
+ /**
290
+ * User-defined labels for categorization
291
+ * @member {Object.<String, String>} labels
292
+ */
293
+ EmbedderResponse.prototype['labels'] = undefined;
294
+
295
+ /**
296
+ * Version information
297
+ * @member {String} version
298
+ */
299
+ EmbedderResponse.prototype['version'] = undefined;
300
+
301
+ /**
302
+ * Monitoring endpoint URL
303
+ * @member {String} monitoringEndpoint
304
+ */
305
+ EmbedderResponse.prototype['monitoringEndpoint'] = undefined;
306
+
307
+ /**
308
+ * Owner ID of the embedder
309
+ * @member {String} ownerId
310
+ */
311
+ EmbedderResponse.prototype['ownerId'] = undefined;
312
+
313
+ /**
314
+ * Creation timestamp (milliseconds since epoch)
315
+ * @member {Number} createdAt
316
+ */
317
+ EmbedderResponse.prototype['createdAt'] = undefined;
318
+
319
+ /**
320
+ * Last update timestamp (milliseconds since epoch)
321
+ * @member {Number} updatedAt
322
+ */
323
+ EmbedderResponse.prototype['updatedAt'] = undefined;
324
+
325
+ /**
326
+ * ID of the user who created the embedder
327
+ * @member {String} createdById
328
+ */
329
+ EmbedderResponse.prototype['createdById'] = undefined;
330
+
331
+ /**
332
+ * ID of the user who last updated the embedder
333
+ * @member {String} updatedById
334
+ */
335
+ EmbedderResponse.prototype['updatedById'] = undefined;
336
+ var _default = exports["default"] = EmbedderResponse;