@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,125 @@
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
+ * GoodMem API
19
+ * 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.
20
+ *
21
+ * The version of the OpenAPI document: v1
22
+ * Contact: support@goodmem.io
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 SpaceEmbedderConfig model module.
31
+ * @module model/SpaceEmbedderConfig
32
+ * @version v1
33
+ */
34
+ var SpaceEmbedderConfig = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>SpaceEmbedderConfig</code>.
37
+ * Configuration for associating an embedder with a space.
38
+ * @alias module:model/SpaceEmbedderConfig
39
+ * @param embedderId {String} The unique identifier for the embedder to associate with the space.
40
+ * @param defaultRetrievalWeight {Number} The default weight for this embedder during retrieval operations.
41
+ */
42
+ function SpaceEmbedderConfig(embedderId, defaultRetrievalWeight) {
43
+ _classCallCheck(this, SpaceEmbedderConfig);
44
+ SpaceEmbedderConfig.initialize(this, embedderId, defaultRetrievalWeight);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(SpaceEmbedderConfig, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, embedderId, defaultRetrievalWeight) {
55
+ obj['embedderId'] = embedderId;
56
+ obj['defaultRetrievalWeight'] = defaultRetrievalWeight;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>SpaceEmbedderConfig</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/SpaceEmbedderConfig} obj Optional instance to populate.
64
+ * @return {module:model/SpaceEmbedderConfig} The populated <code>SpaceEmbedderConfig</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new SpaceEmbedderConfig();
71
+ if (data.hasOwnProperty('embedderId')) {
72
+ obj['embedderId'] = _ApiClient["default"].convertToType(data['embedderId'], 'String');
73
+ }
74
+ if (data.hasOwnProperty('defaultRetrievalWeight')) {
75
+ obj['defaultRetrievalWeight'] = _ApiClient["default"].convertToType(data['defaultRetrievalWeight'], 'Number');
76
+ }
77
+ }
78
+ return obj;
79
+ }
80
+
81
+ /**
82
+ * Validates the JSON data with respect to <code>SpaceEmbedderConfig</code>.
83
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
84
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SpaceEmbedderConfig</code>.
85
+ */
86
+ }, {
87
+ key: "validateJSON",
88
+ value: function validateJSON(data) {
89
+ // check to make sure all required properties are present in the JSON string
90
+ var _iterator = _createForOfIteratorHelper(SpaceEmbedderConfig.RequiredProperties),
91
+ _step;
92
+ try {
93
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
94
+ var property = _step.value;
95
+ if (!data.hasOwnProperty(property)) {
96
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
97
+ }
98
+ }
99
+ // ensure the json data is a string
100
+ } catch (err) {
101
+ _iterator.e(err);
102
+ } finally {
103
+ _iterator.f();
104
+ }
105
+ if (data['embedderId'] && !(typeof data['embedderId'] === 'string' || data['embedderId'] instanceof String)) {
106
+ throw new Error("Expected the field `embedderId` to be a primitive type in the JSON string but got " + data['embedderId']);
107
+ }
108
+ return true;
109
+ }
110
+ }]);
111
+ }();
112
+ SpaceEmbedderConfig.RequiredProperties = ["embedderId", "defaultRetrievalWeight"];
113
+
114
+ /**
115
+ * The unique identifier for the embedder to associate with the space.
116
+ * @member {String} embedderId
117
+ */
118
+ SpaceEmbedderConfig.prototype['embedderId'] = undefined;
119
+
120
+ /**
121
+ * The default weight for this embedder during retrieval operations.
122
+ * @member {Number} defaultRetrievalWeight
123
+ */
124
+ SpaceEmbedderConfig.prototype['defaultRetrievalWeight'] = undefined;
125
+ var _default = exports["default"] = SpaceEmbedderConfig;
@@ -0,0 +1,151 @@
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
+ * GoodMem API
19
+ * 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.
20
+ *
21
+ * The version of the OpenAPI document: v1
22
+ * Contact: support@goodmem.io
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 SystemInitResponse model module.
31
+ * @module model/SystemInitResponse
32
+ * @version v1
33
+ */
34
+ var SystemInitResponse = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>SystemInitResponse</code>.
37
+ * Response from the system initialization endpoint.
38
+ * @alias module:model/SystemInitResponse
39
+ * @param alreadyInitialized {Boolean} Indicates whether the system was already initialized before this request.
40
+ * @param message {String} A human-readable message about the initialization status.
41
+ */
42
+ function SystemInitResponse(alreadyInitialized, message) {
43
+ _classCallCheck(this, SystemInitResponse);
44
+ SystemInitResponse.initialize(this, alreadyInitialized, message);
45
+ }
46
+
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+ return _createClass(SystemInitResponse, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, alreadyInitialized, message) {
55
+ obj['alreadyInitialized'] = alreadyInitialized;
56
+ obj['message'] = message;
57
+ }
58
+
59
+ /**
60
+ * Constructs a <code>SystemInitResponse</code> from a plain JavaScript object, optionally creating a new instance.
61
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
62
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
63
+ * @param {module:model/SystemInitResponse} obj Optional instance to populate.
64
+ * @return {module:model/SystemInitResponse} The populated <code>SystemInitResponse</code> instance.
65
+ */
66
+ }, {
67
+ key: "constructFromObject",
68
+ value: function constructFromObject(data, obj) {
69
+ if (data) {
70
+ obj = obj || new SystemInitResponse();
71
+ if (data.hasOwnProperty('alreadyInitialized')) {
72
+ obj['alreadyInitialized'] = _ApiClient["default"].convertToType(data['alreadyInitialized'], 'Boolean');
73
+ }
74
+ if (data.hasOwnProperty('message')) {
75
+ obj['message'] = _ApiClient["default"].convertToType(data['message'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('rootApiKey')) {
78
+ obj['rootApiKey'] = _ApiClient["default"].convertToType(data['rootApiKey'], 'String');
79
+ }
80
+ if (data.hasOwnProperty('userId')) {
81
+ obj['userId'] = _ApiClient["default"].convertToType(data['userId'], 'String');
82
+ }
83
+ }
84
+ return obj;
85
+ }
86
+
87
+ /**
88
+ * Validates the JSON data with respect to <code>SystemInitResponse</code>.
89
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
90
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>SystemInitResponse</code>.
91
+ */
92
+ }, {
93
+ key: "validateJSON",
94
+ value: function validateJSON(data) {
95
+ // check to make sure all required properties are present in the JSON string
96
+ var _iterator = _createForOfIteratorHelper(SystemInitResponse.RequiredProperties),
97
+ _step;
98
+ try {
99
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
100
+ var property = _step.value;
101
+ if (!data.hasOwnProperty(property)) {
102
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
103
+ }
104
+ }
105
+ // ensure the json data is a string
106
+ } catch (err) {
107
+ _iterator.e(err);
108
+ } finally {
109
+ _iterator.f();
110
+ }
111
+ if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) {
112
+ throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']);
113
+ }
114
+ // ensure the json data is a string
115
+ if (data['rootApiKey'] && !(typeof data['rootApiKey'] === 'string' || data['rootApiKey'] instanceof String)) {
116
+ throw new Error("Expected the field `rootApiKey` to be a primitive type in the JSON string but got " + data['rootApiKey']);
117
+ }
118
+ // ensure the json data is a string
119
+ if (data['userId'] && !(typeof data['userId'] === 'string' || data['userId'] instanceof String)) {
120
+ throw new Error("Expected the field `userId` to be a primitive type in the JSON string but got " + data['userId']);
121
+ }
122
+ return true;
123
+ }
124
+ }]);
125
+ }();
126
+ SystemInitResponse.RequiredProperties = ["alreadyInitialized", "message"];
127
+
128
+ /**
129
+ * Indicates whether the system was already initialized before this request.
130
+ * @member {Boolean} alreadyInitialized
131
+ */
132
+ SystemInitResponse.prototype['alreadyInitialized'] = undefined;
133
+
134
+ /**
135
+ * A human-readable message about the initialization status.
136
+ * @member {String} message
137
+ */
138
+ SystemInitResponse.prototype['message'] = undefined;
139
+
140
+ /**
141
+ * The API key for the root user. Only present if system was just initialized (not previously initialized).
142
+ * @member {String} rootApiKey
143
+ */
144
+ SystemInitResponse.prototype['rootApiKey'] = undefined;
145
+
146
+ /**
147
+ * The user ID of the root user. Only present if system was just initialized (not previously initialized).
148
+ * @member {String} userId
149
+ */
150
+ SystemInitResponse.prototype['userId'] = undefined;
151
+ var _default = exports["default"] = SystemInitResponse;
@@ -0,0 +1,121 @@
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 _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
+ 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); } /**
15
+ * GoodMem API
16
+ * 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.
17
+ *
18
+ * The version of the OpenAPI document: v1
19
+ * Contact: support@goodmem.io
20
+ *
21
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
+ * https://openapi-generator.tech
23
+ * Do not edit the class manually.
24
+ *
25
+ */
26
+ /**
27
+ * The UpdateApiKeyRequest model module.
28
+ * @module model/UpdateApiKeyRequest
29
+ * @version v1
30
+ */
31
+ var UpdateApiKeyRequest = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>UpdateApiKeyRequest</code>.
34
+ * Request parameters for updating an API key.
35
+ * @alias module:model/UpdateApiKeyRequest
36
+ */
37
+ function UpdateApiKeyRequest() {
38
+ _classCallCheck(this, UpdateApiKeyRequest);
39
+ UpdateApiKeyRequest.initialize(this);
40
+ }
41
+
42
+ /**
43
+ * Initializes the fields of this object.
44
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
45
+ * Only for internal use.
46
+ */
47
+ return _createClass(UpdateApiKeyRequest, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>UpdateApiKeyRequest</code> from a plain JavaScript object, optionally creating a new instance.
53
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
54
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
55
+ * @param {module:model/UpdateApiKeyRequest} obj Optional instance to populate.
56
+ * @return {module:model/UpdateApiKeyRequest} The populated <code>UpdateApiKeyRequest</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new UpdateApiKeyRequest();
63
+ if (data.hasOwnProperty('validateLabelStrategy')) {
64
+ obj['validateLabelStrategy'] = _ApiClient["default"].convertToType(data['validateLabelStrategy'], Object);
65
+ }
66
+ if (data.hasOwnProperty('status')) {
67
+ obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
68
+ }
69
+ if (data.hasOwnProperty('replaceLabels')) {
70
+ obj['replaceLabels'] = _ApiClient["default"].convertToType(data['replaceLabels'], {
71
+ 'String': 'String'
72
+ });
73
+ }
74
+ if (data.hasOwnProperty('mergeLabels')) {
75
+ obj['mergeLabels'] = _ApiClient["default"].convertToType(data['mergeLabels'], {
76
+ 'String': 'String'
77
+ });
78
+ }
79
+ }
80
+ return obj;
81
+ }
82
+
83
+ /**
84
+ * Validates the JSON data with respect to <code>UpdateApiKeyRequest</code>.
85
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
86
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UpdateApiKeyRequest</code>.
87
+ */
88
+ }, {
89
+ key: "validateJSON",
90
+ value: function validateJSON(data) {
91
+ // ensure the json data is a string
92
+ if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) {
93
+ throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']);
94
+ }
95
+ return true;
96
+ }
97
+ }]);
98
+ }();
99
+ /**
100
+ * @member {Object} validateLabelStrategy
101
+ */
102
+ UpdateApiKeyRequest.prototype['validateLabelStrategy'] = undefined;
103
+
104
+ /**
105
+ * New status for the API key. Allowed values: ACTIVE, INACTIVE.
106
+ * @member {String} status
107
+ */
108
+ UpdateApiKeyRequest.prototype['status'] = undefined;
109
+
110
+ /**
111
+ * Replace all existing labels with this set. Mutually exclusive with mergeLabels.
112
+ * @member {Object.<String, String>} replaceLabels
113
+ */
114
+ UpdateApiKeyRequest.prototype['replaceLabels'] = undefined;
115
+
116
+ /**
117
+ * Merge these labels with existing ones. Mutually exclusive with replaceLabels.
118
+ * @member {Object.<String, String>} mergeLabels
119
+ */
120
+ UpdateApiKeyRequest.prototype['mergeLabels'] = undefined;
121
+ var _default = exports["default"] = UpdateApiKeyRequest;
@@ -0,0 +1,244 @@
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
+ 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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
+ 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); } }
13
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), 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
+ * GoodMem API
17
+ * 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.
18
+ *
19
+ * The version of the OpenAPI document: v1
20
+ * Contact: support@goodmem.io
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
+ * The UpdateEmbedderRequest model module.
29
+ * @module model/UpdateEmbedderRequest
30
+ * @version v1
31
+ */
32
+ var UpdateEmbedderRequest = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>UpdateEmbedderRequest</code>.
35
+ * Request body for updating an existing Embedder. Only fields that should be updated need to be included.
36
+ * @alias module:model/UpdateEmbedderRequest
37
+ */
38
+ function UpdateEmbedderRequest() {
39
+ _classCallCheck(this, UpdateEmbedderRequest);
40
+ UpdateEmbedderRequest.initialize(this);
41
+ }
42
+
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+ return _createClass(UpdateEmbedderRequest, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>UpdateEmbedderRequest</code> from a plain JavaScript object, optionally creating a new instance.
54
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
55
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
56
+ * @param {module:model/UpdateEmbedderRequest} obj Optional instance to populate.
57
+ * @return {module:model/UpdateEmbedderRequest} The populated <code>UpdateEmbedderRequest</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new UpdateEmbedderRequest();
64
+ if (data.hasOwnProperty('validateLabelStrategy')) {
65
+ obj['validateLabelStrategy'] = _ApiClient["default"].convertToType(data['validateLabelStrategy'], Object);
66
+ }
67
+ if (data.hasOwnProperty('displayName')) {
68
+ obj['displayName'] = _ApiClient["default"].convertToType(data['displayName'], 'String');
69
+ }
70
+ if (data.hasOwnProperty('description')) {
71
+ obj['description'] = _ApiClient["default"].convertToType(data['description'], 'String');
72
+ }
73
+ if (data.hasOwnProperty('endpointUrl')) {
74
+ obj['endpointUrl'] = _ApiClient["default"].convertToType(data['endpointUrl'], 'String');
75
+ }
76
+ if (data.hasOwnProperty('apiPath')) {
77
+ obj['apiPath'] = _ApiClient["default"].convertToType(data['apiPath'], 'String');
78
+ }
79
+ if (data.hasOwnProperty('modelIdentifier')) {
80
+ obj['modelIdentifier'] = _ApiClient["default"].convertToType(data['modelIdentifier'], 'String');
81
+ }
82
+ if (data.hasOwnProperty('dimensionality')) {
83
+ obj['dimensionality'] = _ApiClient["default"].convertToType(data['dimensionality'], 'Number');
84
+ }
85
+ if (data.hasOwnProperty('maxSequenceLength')) {
86
+ obj['maxSequenceLength'] = _ApiClient["default"].convertToType(data['maxSequenceLength'], 'Number');
87
+ }
88
+ if (data.hasOwnProperty('supportedModalities')) {
89
+ obj['supportedModalities'] = _ApiClient["default"].convertToType(data['supportedModalities'], [_Modality["default"]]);
90
+ }
91
+ if (data.hasOwnProperty('credentials')) {
92
+ obj['credentials'] = _ApiClient["default"].convertToType(data['credentials'], 'String');
93
+ }
94
+ if (data.hasOwnProperty('replaceLabels')) {
95
+ obj['replaceLabels'] = _ApiClient["default"].convertToType(data['replaceLabels'], {
96
+ 'String': 'String'
97
+ });
98
+ }
99
+ if (data.hasOwnProperty('mergeLabels')) {
100
+ obj['mergeLabels'] = _ApiClient["default"].convertToType(data['mergeLabels'], {
101
+ 'String': 'String'
102
+ });
103
+ }
104
+ if (data.hasOwnProperty('version')) {
105
+ obj['version'] = _ApiClient["default"].convertToType(data['version'], 'String');
106
+ }
107
+ if (data.hasOwnProperty('monitoringEndpoint')) {
108
+ obj['monitoringEndpoint'] = _ApiClient["default"].convertToType(data['monitoringEndpoint'], 'String');
109
+ }
110
+ }
111
+ return obj;
112
+ }
113
+
114
+ /**
115
+ * Validates the JSON data with respect to <code>UpdateEmbedderRequest</code>.
116
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
117
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UpdateEmbedderRequest</code>.
118
+ */
119
+ }, {
120
+ key: "validateJSON",
121
+ value: function validateJSON(data) {
122
+ // ensure the json data is a string
123
+ if (data['displayName'] && !(typeof data['displayName'] === 'string' || data['displayName'] instanceof String)) {
124
+ throw new Error("Expected the field `displayName` to be a primitive type in the JSON string but got " + data['displayName']);
125
+ }
126
+ // ensure the json data is a string
127
+ if (data['description'] && !(typeof data['description'] === 'string' || data['description'] instanceof String)) {
128
+ throw new Error("Expected the field `description` to be a primitive type in the JSON string but got " + data['description']);
129
+ }
130
+ // ensure the json data is a string
131
+ if (data['endpointUrl'] && !(typeof data['endpointUrl'] === 'string' || data['endpointUrl'] instanceof String)) {
132
+ throw new Error("Expected the field `endpointUrl` to be a primitive type in the JSON string but got " + data['endpointUrl']);
133
+ }
134
+ // ensure the json data is a string
135
+ if (data['apiPath'] && !(typeof data['apiPath'] === 'string' || data['apiPath'] instanceof String)) {
136
+ throw new Error("Expected the field `apiPath` to be a primitive type in the JSON string but got " + data['apiPath']);
137
+ }
138
+ // ensure the json data is a string
139
+ if (data['modelIdentifier'] && !(typeof data['modelIdentifier'] === 'string' || data['modelIdentifier'] instanceof String)) {
140
+ throw new Error("Expected the field `modelIdentifier` to be a primitive type in the JSON string but got " + data['modelIdentifier']);
141
+ }
142
+ // ensure the json data is an array
143
+ if (!Array.isArray(data['supportedModalities'])) {
144
+ throw new Error("Expected the field `supportedModalities` to be an array in the JSON data but got " + data['supportedModalities']);
145
+ }
146
+ // ensure the json data is a string
147
+ if (data['credentials'] && !(typeof data['credentials'] === 'string' || data['credentials'] instanceof String)) {
148
+ throw new Error("Expected the field `credentials` to be a primitive type in the JSON string but got " + data['credentials']);
149
+ }
150
+ // ensure the json data is a string
151
+ if (data['version'] && !(typeof data['version'] === 'string' || data['version'] instanceof String)) {
152
+ throw new Error("Expected the field `version` to be a primitive type in the JSON string but got " + data['version']);
153
+ }
154
+ // ensure the json data is a string
155
+ if (data['monitoringEndpoint'] && !(typeof data['monitoringEndpoint'] === 'string' || data['monitoringEndpoint'] instanceof String)) {
156
+ throw new Error("Expected the field `monitoringEndpoint` to be a primitive type in the JSON string but got " + data['monitoringEndpoint']);
157
+ }
158
+ return true;
159
+ }
160
+ }]);
161
+ }();
162
+ /**
163
+ * @member {Object} validateLabelStrategy
164
+ */
165
+ UpdateEmbedderRequest.prototype['validateLabelStrategy'] = undefined;
166
+
167
+ /**
168
+ * User-facing name of the embedder
169
+ * @member {String} displayName
170
+ */
171
+ UpdateEmbedderRequest.prototype['displayName'] = undefined;
172
+
173
+ /**
174
+ * Description of the embedder
175
+ * @member {String} description
176
+ */
177
+ UpdateEmbedderRequest.prototype['description'] = undefined;
178
+
179
+ /**
180
+ * API endpoint URL
181
+ * @member {String} endpointUrl
182
+ */
183
+ UpdateEmbedderRequest.prototype['endpointUrl'] = undefined;
184
+
185
+ /**
186
+ * API path for embeddings request
187
+ * @member {String} apiPath
188
+ */
189
+ UpdateEmbedderRequest.prototype['apiPath'] = undefined;
190
+
191
+ /**
192
+ * Model identifier
193
+ * @member {String} modelIdentifier
194
+ */
195
+ UpdateEmbedderRequest.prototype['modelIdentifier'] = undefined;
196
+
197
+ /**
198
+ * Output vector dimensions
199
+ * @member {Number} dimensionality
200
+ */
201
+ UpdateEmbedderRequest.prototype['dimensionality'] = undefined;
202
+
203
+ /**
204
+ * Maximum input sequence length
205
+ * @member {Number} maxSequenceLength
206
+ */
207
+ UpdateEmbedderRequest.prototype['maxSequenceLength'] = undefined;
208
+
209
+ /**
210
+ * Supported content modalities
211
+ * @member {Array.<module:model/Modality>} supportedModalities
212
+ */
213
+ UpdateEmbedderRequest.prototype['supportedModalities'] = undefined;
214
+
215
+ /**
216
+ * API credentials
217
+ * @member {String} credentials
218
+ */
219
+ UpdateEmbedderRequest.prototype['credentials'] = undefined;
220
+
221
+ /**
222
+ * Replace all existing labels with these (mutually exclusive with mergeLabels)
223
+ * @member {Object.<String, String>} replaceLabels
224
+ */
225
+ UpdateEmbedderRequest.prototype['replaceLabels'] = undefined;
226
+
227
+ /**
228
+ * Merge these labels with existing ones (mutually exclusive with replaceLabels)
229
+ * @member {Object.<String, String>} mergeLabels
230
+ */
231
+ UpdateEmbedderRequest.prototype['mergeLabels'] = undefined;
232
+
233
+ /**
234
+ * Version information
235
+ * @member {String} version
236
+ */
237
+ UpdateEmbedderRequest.prototype['version'] = undefined;
238
+
239
+ /**
240
+ * Monitoring endpoint URL
241
+ * @member {String} monitoringEndpoint
242
+ */
243
+ UpdateEmbedderRequest.prototype['monitoringEndpoint'] = undefined;
244
+ var _default = exports["default"] = UpdateEmbedderRequest;