@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,140 @@
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 _MemoryCreationRequest = _interopRequireDefault(require("./MemoryCreationRequest"));
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
+ * GoodMem API
20
+ * 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.
21
+ *
22
+ * The version of the OpenAPI document: v1
23
+ * Contact: support@goodmem.io
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 BatchMemoryCreationRequest model module.
32
+ * @module model/BatchMemoryCreationRequest
33
+ * @version v1
34
+ */
35
+ var BatchMemoryCreationRequest = /*#__PURE__*/function () {
36
+ /**
37
+ * Constructs a new <code>BatchMemoryCreationRequest</code>.
38
+ * Request body for creating multiple memories in a single batch operation
39
+ * @alias module:model/BatchMemoryCreationRequest
40
+ * @param requests {Array.<module:model/MemoryCreationRequest>} Array of memory creation requests
41
+ */
42
+ function BatchMemoryCreationRequest(requests) {
43
+ _classCallCheck(this, BatchMemoryCreationRequest);
44
+ BatchMemoryCreationRequest.initialize(this, requests);
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(BatchMemoryCreationRequest, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj, requests) {
55
+ obj['requests'] = requests;
56
+ }
57
+
58
+ /**
59
+ * Constructs a <code>BatchMemoryCreationRequest</code> from a plain JavaScript object, optionally creating a new instance.
60
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
61
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
62
+ * @param {module:model/BatchMemoryCreationRequest} obj Optional instance to populate.
63
+ * @return {module:model/BatchMemoryCreationRequest} The populated <code>BatchMemoryCreationRequest</code> instance.
64
+ */
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new BatchMemoryCreationRequest();
70
+ if (data.hasOwnProperty('validate')) {
71
+ obj['validate'] = _ApiClient["default"].convertToType(data['validate'], Object);
72
+ }
73
+ if (data.hasOwnProperty('requests')) {
74
+ obj['requests'] = _ApiClient["default"].convertToType(data['requests'], [_MemoryCreationRequest["default"]]);
75
+ }
76
+ }
77
+ return obj;
78
+ }
79
+
80
+ /**
81
+ * Validates the JSON data with respect to <code>BatchMemoryCreationRequest</code>.
82
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
83
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BatchMemoryCreationRequest</code>.
84
+ */
85
+ }, {
86
+ key: "validateJSON",
87
+ value: function validateJSON(data) {
88
+ // check to make sure all required properties are present in the JSON string
89
+ var _iterator = _createForOfIteratorHelper(BatchMemoryCreationRequest.RequiredProperties),
90
+ _step;
91
+ try {
92
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
+ var property = _step.value;
94
+ if (!data.hasOwnProperty(property)) {
95
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
96
+ }
97
+ }
98
+ } catch (err) {
99
+ _iterator.e(err);
100
+ } finally {
101
+ _iterator.f();
102
+ }
103
+ if (data['requests']) {
104
+ // data not null
105
+ // ensure the json data is an array
106
+ if (!Array.isArray(data['requests'])) {
107
+ throw new Error("Expected the field `requests` to be an array in the JSON data but got " + data['requests']);
108
+ }
109
+ // validate the optional field `requests` (array)
110
+ var _iterator2 = _createForOfIteratorHelper(data['requests']),
111
+ _step2;
112
+ try {
113
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
114
+ var item = _step2.value;
115
+ _MemoryCreationRequest["default"].validateJSON(item);
116
+ }
117
+ } catch (err) {
118
+ _iterator2.e(err);
119
+ } finally {
120
+ _iterator2.f();
121
+ }
122
+ ;
123
+ }
124
+ return true;
125
+ }
126
+ }]);
127
+ }();
128
+ BatchMemoryCreationRequest.RequiredProperties = ["requests"];
129
+
130
+ /**
131
+ * @member {Object} validate
132
+ */
133
+ BatchMemoryCreationRequest.prototype['validate'] = undefined;
134
+
135
+ /**
136
+ * Array of memory creation requests
137
+ * @member {Array.<module:model/MemoryCreationRequest>} requests
138
+ */
139
+ BatchMemoryCreationRequest.prototype['requests'] = undefined;
140
+ var _default = exports["default"] = BatchMemoryCreationRequest;
@@ -0,0 +1,122 @@
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 BatchMemoryDeletionRequest model module.
31
+ * @module model/BatchMemoryDeletionRequest
32
+ * @version v1
33
+ */
34
+ var BatchMemoryDeletionRequest = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>BatchMemoryDeletionRequest</code>.
37
+ * Request body for deleting multiple memories by their IDs
38
+ * @alias module:model/BatchMemoryDeletionRequest
39
+ * @param memoryIds {Array.<String>} Array of memory IDs to delete
40
+ */
41
+ function BatchMemoryDeletionRequest(memoryIds) {
42
+ _classCallCheck(this, BatchMemoryDeletionRequest);
43
+ BatchMemoryDeletionRequest.initialize(this, memoryIds);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(BatchMemoryDeletionRequest, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, memoryIds) {
54
+ obj['memoryIds'] = memoryIds;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>BatchMemoryDeletionRequest</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/BatchMemoryDeletionRequest} obj Optional instance to populate.
62
+ * @return {module:model/BatchMemoryDeletionRequest} The populated <code>BatchMemoryDeletionRequest</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new BatchMemoryDeletionRequest();
69
+ if (data.hasOwnProperty('validate')) {
70
+ obj['validate'] = _ApiClient["default"].convertToType(data['validate'], Object);
71
+ }
72
+ if (data.hasOwnProperty('memoryIds')) {
73
+ obj['memoryIds'] = _ApiClient["default"].convertToType(data['memoryIds'], ['String']);
74
+ }
75
+ }
76
+ return obj;
77
+ }
78
+
79
+ /**
80
+ * Validates the JSON data with respect to <code>BatchMemoryDeletionRequest</code>.
81
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
82
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BatchMemoryDeletionRequest</code>.
83
+ */
84
+ }, {
85
+ key: "validateJSON",
86
+ value: function validateJSON(data) {
87
+ // check to make sure all required properties are present in the JSON string
88
+ var _iterator = _createForOfIteratorHelper(BatchMemoryDeletionRequest.RequiredProperties),
89
+ _step;
90
+ try {
91
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
92
+ var property = _step.value;
93
+ if (!data.hasOwnProperty(property)) {
94
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
95
+ }
96
+ }
97
+ // ensure the json data is an array
98
+ } catch (err) {
99
+ _iterator.e(err);
100
+ } finally {
101
+ _iterator.f();
102
+ }
103
+ if (!Array.isArray(data['memoryIds'])) {
104
+ throw new Error("Expected the field `memoryIds` to be an array in the JSON data but got " + data['memoryIds']);
105
+ }
106
+ return true;
107
+ }
108
+ }]);
109
+ }();
110
+ BatchMemoryDeletionRequest.RequiredProperties = ["memoryIds"];
111
+
112
+ /**
113
+ * @member {Object} validate
114
+ */
115
+ BatchMemoryDeletionRequest.prototype['validate'] = undefined;
116
+
117
+ /**
118
+ * Array of memory IDs to delete
119
+ * @member {Array.<String>} memoryIds
120
+ */
121
+ BatchMemoryDeletionRequest.prototype['memoryIds'] = undefined;
122
+ var _default = exports["default"] = BatchMemoryDeletionRequest;
@@ -0,0 +1,131 @@
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 BatchMemoryRetrievalRequest model module.
31
+ * @module model/BatchMemoryRetrievalRequest
32
+ * @version v1
33
+ */
34
+ var BatchMemoryRetrievalRequest = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>BatchMemoryRetrievalRequest</code>.
37
+ * Request body for retrieving multiple memories by their IDs
38
+ * @alias module:model/BatchMemoryRetrievalRequest
39
+ * @param memoryIds {Array.<String>} Array of memory IDs to retrieve
40
+ */
41
+ function BatchMemoryRetrievalRequest(memoryIds) {
42
+ _classCallCheck(this, BatchMemoryRetrievalRequest);
43
+ BatchMemoryRetrievalRequest.initialize(this, memoryIds);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ return _createClass(BatchMemoryRetrievalRequest, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj, memoryIds) {
54
+ obj['memoryIds'] = memoryIds;
55
+ }
56
+
57
+ /**
58
+ * Constructs a <code>BatchMemoryRetrievalRequest</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/BatchMemoryRetrievalRequest} obj Optional instance to populate.
62
+ * @return {module:model/BatchMemoryRetrievalRequest} The populated <code>BatchMemoryRetrievalRequest</code> instance.
63
+ */
64
+ }, {
65
+ key: "constructFromObject",
66
+ value: function constructFromObject(data, obj) {
67
+ if (data) {
68
+ obj = obj || new BatchMemoryRetrievalRequest();
69
+ if (data.hasOwnProperty('validate')) {
70
+ obj['validate'] = _ApiClient["default"].convertToType(data['validate'], Object);
71
+ }
72
+ if (data.hasOwnProperty('memoryIds')) {
73
+ obj['memoryIds'] = _ApiClient["default"].convertToType(data['memoryIds'], ['String']);
74
+ }
75
+ if (data.hasOwnProperty('includeContent')) {
76
+ obj['includeContent'] = _ApiClient["default"].convertToType(data['includeContent'], 'Boolean');
77
+ }
78
+ }
79
+ return obj;
80
+ }
81
+
82
+ /**
83
+ * Validates the JSON data with respect to <code>BatchMemoryRetrievalRequest</code>.
84
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
85
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>BatchMemoryRetrievalRequest</code>.
86
+ */
87
+ }, {
88
+ key: "validateJSON",
89
+ value: function validateJSON(data) {
90
+ // check to make sure all required properties are present in the JSON string
91
+ var _iterator = _createForOfIteratorHelper(BatchMemoryRetrievalRequest.RequiredProperties),
92
+ _step;
93
+ try {
94
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
95
+ var property = _step.value;
96
+ if (!data.hasOwnProperty(property)) {
97
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
98
+ }
99
+ }
100
+ // ensure the json data is an array
101
+ } catch (err) {
102
+ _iterator.e(err);
103
+ } finally {
104
+ _iterator.f();
105
+ }
106
+ if (!Array.isArray(data['memoryIds'])) {
107
+ throw new Error("Expected the field `memoryIds` to be an array in the JSON data but got " + data['memoryIds']);
108
+ }
109
+ return true;
110
+ }
111
+ }]);
112
+ }();
113
+ BatchMemoryRetrievalRequest.RequiredProperties = ["memoryIds"];
114
+
115
+ /**
116
+ * @member {Object} validate
117
+ */
118
+ BatchMemoryRetrievalRequest.prototype['validate'] = undefined;
119
+
120
+ /**
121
+ * Array of memory IDs to retrieve
122
+ * @member {Array.<String>} memoryIds
123
+ */
124
+ BatchMemoryRetrievalRequest.prototype['memoryIds'] = undefined;
125
+
126
+ /**
127
+ * Whether to include the original content in the response
128
+ * @member {Boolean} includeContent
129
+ */
130
+ BatchMemoryRetrievalRequest.prototype['includeContent'] = undefined;
131
+ var _default = exports["default"] = BatchMemoryRetrievalRequest;
@@ -0,0 +1,98 @@
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 CreateApiKeyRequest model module.
28
+ * @module model/CreateApiKeyRequest
29
+ * @version v1
30
+ */
31
+ var CreateApiKeyRequest = /*#__PURE__*/function () {
32
+ /**
33
+ * Constructs a new <code>CreateApiKeyRequest</code>.
34
+ * Request parameters for creating a new API key.
35
+ * @alias module:model/CreateApiKeyRequest
36
+ */
37
+ function CreateApiKeyRequest() {
38
+ _classCallCheck(this, CreateApiKeyRequest);
39
+ CreateApiKeyRequest.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(CreateApiKeyRequest, null, [{
48
+ key: "initialize",
49
+ value: function initialize(obj) {}
50
+
51
+ /**
52
+ * Constructs a <code>CreateApiKeyRequest</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/CreateApiKeyRequest} obj Optional instance to populate.
56
+ * @return {module:model/CreateApiKeyRequest} The populated <code>CreateApiKeyRequest</code> instance.
57
+ */
58
+ }, {
59
+ key: "constructFromObject",
60
+ value: function constructFromObject(data, obj) {
61
+ if (data) {
62
+ obj = obj || new CreateApiKeyRequest();
63
+ if (data.hasOwnProperty('labels')) {
64
+ obj['labels'] = _ApiClient["default"].convertToType(data['labels'], {
65
+ 'String': 'String'
66
+ });
67
+ }
68
+ if (data.hasOwnProperty('expiresAt')) {
69
+ obj['expiresAt'] = _ApiClient["default"].convertToType(data['expiresAt'], 'Number');
70
+ }
71
+ }
72
+ return obj;
73
+ }
74
+
75
+ /**
76
+ * Validates the JSON data with respect to <code>CreateApiKeyRequest</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>CreateApiKeyRequest</code>.
79
+ */
80
+ }, {
81
+ key: "validateJSON",
82
+ value: function validateJSON(data) {
83
+ return true;
84
+ }
85
+ }]);
86
+ }();
87
+ /**
88
+ * Key-value pairs of metadata associated with the API key. Used for organization and filtering.
89
+ * @member {Object.<String, String>} labels
90
+ */
91
+ CreateApiKeyRequest.prototype['labels'] = undefined;
92
+
93
+ /**
94
+ * Expiration timestamp in milliseconds since epoch. If not provided, the key does not expire.
95
+ * @member {Number} expiresAt
96
+ */
97
+ CreateApiKeyRequest.prototype['expiresAt'] = undefined;
98
+ var _default = exports["default"] = CreateApiKeyRequest;
@@ -0,0 +1,105 @@
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 _ApiKeyResponse = _interopRequireDefault(require("./ApiKeyResponse"));
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 CreateApiKeyResponse model module.
29
+ * @module model/CreateApiKeyResponse
30
+ * @version v1
31
+ */
32
+ var CreateApiKeyResponse = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>CreateApiKeyResponse</code>.
35
+ * Response returned when creating a new API key.
36
+ * @alias module:model/CreateApiKeyResponse
37
+ */
38
+ function CreateApiKeyResponse() {
39
+ _classCallCheck(this, CreateApiKeyResponse);
40
+ CreateApiKeyResponse.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(CreateApiKeyResponse, null, [{
49
+ key: "initialize",
50
+ value: function initialize(obj) {}
51
+
52
+ /**
53
+ * Constructs a <code>CreateApiKeyResponse</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/CreateApiKeyResponse} obj Optional instance to populate.
57
+ * @return {module:model/CreateApiKeyResponse} The populated <code>CreateApiKeyResponse</code> instance.
58
+ */
59
+ }, {
60
+ key: "constructFromObject",
61
+ value: function constructFromObject(data, obj) {
62
+ if (data) {
63
+ obj = obj || new CreateApiKeyResponse();
64
+ if (data.hasOwnProperty('apiKeyMetadata')) {
65
+ obj['apiKeyMetadata'] = _ApiKeyResponse["default"].constructFromObject(data['apiKeyMetadata']);
66
+ }
67
+ if (data.hasOwnProperty('rawApiKey')) {
68
+ obj['rawApiKey'] = _ApiClient["default"].convertToType(data['rawApiKey'], 'String');
69
+ }
70
+ }
71
+ return obj;
72
+ }
73
+
74
+ /**
75
+ * Validates the JSON data with respect to <code>CreateApiKeyResponse</code>.
76
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
77
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateApiKeyResponse</code>.
78
+ */
79
+ }, {
80
+ key: "validateJSON",
81
+ value: function validateJSON(data) {
82
+ // validate the optional field `apiKeyMetadata`
83
+ if (data['apiKeyMetadata']) {
84
+ // data not null
85
+ _ApiKeyResponse["default"].validateJSON(data['apiKeyMetadata']);
86
+ }
87
+ // ensure the json data is a string
88
+ if (data['rawApiKey'] && !(typeof data['rawApiKey'] === 'string' || data['rawApiKey'] instanceof String)) {
89
+ throw new Error("Expected the field `rawApiKey` to be a primitive type in the JSON string but got " + data['rawApiKey']);
90
+ }
91
+ return true;
92
+ }
93
+ }]);
94
+ }();
95
+ /**
96
+ * @member {module:model/ApiKeyResponse} apiKeyMetadata
97
+ */
98
+ CreateApiKeyResponse.prototype['apiKeyMetadata'] = undefined;
99
+
100
+ /**
101
+ * The actual API key value. This is only returned once and cannot be retrieved again.
102
+ * @member {String} rawApiKey
103
+ */
104
+ CreateApiKeyResponse.prototype['rawApiKey'] = undefined;
105
+ var _default = exports["default"] = CreateApiKeyResponse;