@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.
- package/README.md +200 -0
- package/dist/ApiClient.js +718 -0
- package/dist/api/APIKeysApi.js +188 -0
- package/dist/api/EmbeddersApi.js +232 -0
- package/dist/api/MemoriesApi.js +290 -0
- package/dist/api/SpacesApi.js +240 -0
- package/dist/api/SystemApi.js +77 -0
- package/dist/api/UsersApi.js +86 -0
- package/dist/client.js +150 -0
- package/dist/index.js +230 -0
- package/dist/model/ApiKeyResponse.js +203 -0
- package/dist/model/BatchMemoryCreationRequest.js +140 -0
- package/dist/model/BatchMemoryDeletionRequest.js +122 -0
- package/dist/model/BatchMemoryRetrievalRequest.js +131 -0
- package/dist/model/CreateApiKeyRequest.js +98 -0
- package/dist/model/CreateApiKeyResponse.js +105 -0
- package/dist/model/EmbedderCreationRequest.js +288 -0
- package/dist/model/EmbedderResponse.js +336 -0
- package/dist/model/ListApiKeysResponse.js +112 -0
- package/dist/model/ListEmbeddersResponse.js +132 -0
- package/dist/model/ListSpacesResponse.js +125 -0
- package/dist/model/Memory.js +248 -0
- package/dist/model/MemoryCreationRequest.js +187 -0
- package/dist/model/MemoryListResponse.js +145 -0
- package/dist/model/Modality.js +68 -0
- package/dist/model/ProviderType.js +63 -0
- package/dist/model/Space.js +251 -0
- package/dist/model/SpaceCreationRequest.js +178 -0
- package/dist/model/SpaceEmbedder.js +192 -0
- package/dist/model/SpaceEmbedderConfig.js +125 -0
- package/dist/model/SystemInitResponse.js +151 -0
- package/dist/model/UpdateApiKeyRequest.js +121 -0
- package/dist/model/UpdateEmbedderRequest.js +244 -0
- package/dist/model/UpdateSpaceRequest.js +166 -0
- package/dist/model/UserResponse.js +179 -0
- package/package.json +78 -0
|
@@ -0,0 +1,188 @@
|
|
|
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("../model/ApiKeyResponse"));
|
|
9
|
+
var _CreateApiKeyRequest = _interopRequireDefault(require("../model/CreateApiKeyRequest"));
|
|
10
|
+
var _CreateApiKeyResponse = _interopRequireDefault(require("../model/CreateApiKeyResponse"));
|
|
11
|
+
var _ListApiKeysResponse = _interopRequireDefault(require("../model/ListApiKeysResponse"));
|
|
12
|
+
var _UpdateApiKeyRequest = _interopRequireDefault(require("../model/UpdateApiKeyRequest"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
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); }
|
|
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
|
+
* APIKeys service.
|
|
33
|
+
* @module api/APIKeysApi
|
|
34
|
+
* @version v1
|
|
35
|
+
*/
|
|
36
|
+
var APIKeysApi = exports["default"] = /*#__PURE__*/function () {
|
|
37
|
+
/**
|
|
38
|
+
* Constructs a new APIKeysApi.
|
|
39
|
+
* @alias module:api/APIKeysApi
|
|
40
|
+
* @class
|
|
41
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
42
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
43
|
+
*/
|
|
44
|
+
function APIKeysApi(apiClient) {
|
|
45
|
+
_classCallCheck(this, APIKeysApi);
|
|
46
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Callback function to receive the result of the createApiKey operation.
|
|
51
|
+
* @callback module:api/APIKeysApi~createApiKeyCallback
|
|
52
|
+
* @param {String} error Error message, if any.
|
|
53
|
+
* @param {module:model/CreateApiKeyResponse} data The data returned by the service call.
|
|
54
|
+
* @param {String} response The complete HTTP response.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Create a new API key
|
|
59
|
+
* Creates a new API key for authenticating with the API. The response includes the one-time raw API key value which will not be retrievable later.
|
|
60
|
+
* @param {module:model/CreateApiKeyRequest} createApiKeyRequest API key configuration
|
|
61
|
+
* @param {module:api/APIKeysApi~createApiKeyCallback} callback The callback function, accepting three arguments: error, data, response
|
|
62
|
+
* data is of type: {@link module:model/CreateApiKeyResponse}
|
|
63
|
+
*/
|
|
64
|
+
return _createClass(APIKeysApi, [{
|
|
65
|
+
key: "createApiKey",
|
|
66
|
+
value: function createApiKey(createApiKeyRequest, callback) {
|
|
67
|
+
var postBody = createApiKeyRequest;
|
|
68
|
+
// verify the required parameter 'createApiKeyRequest' is set
|
|
69
|
+
if (createApiKeyRequest === undefined || createApiKeyRequest === null) {
|
|
70
|
+
throw new Error("Missing the required parameter 'createApiKeyRequest' when calling createApiKey");
|
|
71
|
+
}
|
|
72
|
+
var pathParams = {};
|
|
73
|
+
var queryParams = {};
|
|
74
|
+
var headerParams = {};
|
|
75
|
+
var formParams = {};
|
|
76
|
+
var authNames = [];
|
|
77
|
+
var contentTypes = ['application/json'];
|
|
78
|
+
var accepts = ['application/json'];
|
|
79
|
+
var returnType = _CreateApiKeyResponse["default"];
|
|
80
|
+
return this.apiClient.callApi('/v1/apikeys', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Callback function to receive the result of the deleteApiKey operation.
|
|
85
|
+
* @callback module:api/APIKeysApi~deleteApiKeyCallback
|
|
86
|
+
* @param {String} error Error message, if any.
|
|
87
|
+
* @param data This operation does not return a value.
|
|
88
|
+
* @param {String} response The complete HTTP response.
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Delete an API key
|
|
93
|
+
* Deletes (revokes) an API key. This operation cannot be undone.
|
|
94
|
+
* @param {String} id The unique identifier of the API key to delete
|
|
95
|
+
* @param {module:api/APIKeysApi~deleteApiKeyCallback} callback The callback function, accepting three arguments: error, data, response
|
|
96
|
+
*/
|
|
97
|
+
}, {
|
|
98
|
+
key: "deleteApiKey",
|
|
99
|
+
value: function deleteApiKey(id, callback) {
|
|
100
|
+
var postBody = null;
|
|
101
|
+
// verify the required parameter 'id' is set
|
|
102
|
+
if (id === undefined || id === null) {
|
|
103
|
+
throw new Error("Missing the required parameter 'id' when calling deleteApiKey");
|
|
104
|
+
}
|
|
105
|
+
var pathParams = {
|
|
106
|
+
'id': id
|
|
107
|
+
};
|
|
108
|
+
var queryParams = {};
|
|
109
|
+
var headerParams = {};
|
|
110
|
+
var formParams = {};
|
|
111
|
+
var authNames = [];
|
|
112
|
+
var contentTypes = [];
|
|
113
|
+
var accepts = [];
|
|
114
|
+
var returnType = null;
|
|
115
|
+
return this.apiClient.callApi('/v1/apikeys/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Callback function to receive the result of the listApiKeys operation.
|
|
120
|
+
* @callback module:api/APIKeysApi~listApiKeysCallback
|
|
121
|
+
* @param {String} error Error message, if any.
|
|
122
|
+
* @param {module:model/ListApiKeysResponse} data The data returned by the service call.
|
|
123
|
+
* @param {String} response The complete HTTP response.
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* List API keys
|
|
128
|
+
* Retrieves a list of API keys belonging to the authenticated user. The list includes metadata about each key but not the actual key values.
|
|
129
|
+
* @param {module:api/APIKeysApi~listApiKeysCallback} callback The callback function, accepting three arguments: error, data, response
|
|
130
|
+
* data is of type: {@link module:model/ListApiKeysResponse}
|
|
131
|
+
*/
|
|
132
|
+
}, {
|
|
133
|
+
key: "listApiKeys",
|
|
134
|
+
value: function listApiKeys(callback) {
|
|
135
|
+
var postBody = null;
|
|
136
|
+
var pathParams = {};
|
|
137
|
+
var queryParams = {};
|
|
138
|
+
var headerParams = {};
|
|
139
|
+
var formParams = {};
|
|
140
|
+
var authNames = [];
|
|
141
|
+
var contentTypes = [];
|
|
142
|
+
var accepts = ['application/json'];
|
|
143
|
+
var returnType = _ListApiKeysResponse["default"];
|
|
144
|
+
return this.apiClient.callApi('/v1/apikeys', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Callback function to receive the result of the updateApiKey operation.
|
|
149
|
+
* @callback module:api/APIKeysApi~updateApiKeyCallback
|
|
150
|
+
* @param {String} error Error message, if any.
|
|
151
|
+
* @param {module:model/ApiKeyResponse} data The data returned by the service call.
|
|
152
|
+
* @param {String} response The complete HTTP response.
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Update an API key
|
|
157
|
+
* Updates an existing API key with new values for status or labels.
|
|
158
|
+
* @param {String} id The unique identifier of the API key to update
|
|
159
|
+
* @param {module:model/UpdateApiKeyRequest} updateApiKeyRequest API key update details
|
|
160
|
+
* @param {module:api/APIKeysApi~updateApiKeyCallback} callback The callback function, accepting three arguments: error, data, response
|
|
161
|
+
* data is of type: {@link module:model/ApiKeyResponse}
|
|
162
|
+
*/
|
|
163
|
+
}, {
|
|
164
|
+
key: "updateApiKey",
|
|
165
|
+
value: function updateApiKey(id, updateApiKeyRequest, callback) {
|
|
166
|
+
var postBody = updateApiKeyRequest;
|
|
167
|
+
// verify the required parameter 'id' is set
|
|
168
|
+
if (id === undefined || id === null) {
|
|
169
|
+
throw new Error("Missing the required parameter 'id' when calling updateApiKey");
|
|
170
|
+
}
|
|
171
|
+
// verify the required parameter 'updateApiKeyRequest' is set
|
|
172
|
+
if (updateApiKeyRequest === undefined || updateApiKeyRequest === null) {
|
|
173
|
+
throw new Error("Missing the required parameter 'updateApiKeyRequest' when calling updateApiKey");
|
|
174
|
+
}
|
|
175
|
+
var pathParams = {
|
|
176
|
+
'id': id
|
|
177
|
+
};
|
|
178
|
+
var queryParams = {};
|
|
179
|
+
var headerParams = {};
|
|
180
|
+
var formParams = {};
|
|
181
|
+
var authNames = [];
|
|
182
|
+
var contentTypes = ['application/json'];
|
|
183
|
+
var accepts = ['application/json'];
|
|
184
|
+
var returnType = _ApiKeyResponse["default"];
|
|
185
|
+
return this.apiClient.callApi('/v1/apikeys/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
186
|
+
}
|
|
187
|
+
}]);
|
|
188
|
+
}();
|
|
@@ -0,0 +1,232 @@
|
|
|
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 _EmbedderCreationRequest = _interopRequireDefault(require("../model/EmbedderCreationRequest"));
|
|
9
|
+
var _EmbedderResponse = _interopRequireDefault(require("../model/EmbedderResponse"));
|
|
10
|
+
var _ListEmbeddersResponse = _interopRequireDefault(require("../model/ListEmbeddersResponse"));
|
|
11
|
+
var _UpdateEmbedderRequest = _interopRequireDefault(require("../model/UpdateEmbedderRequest"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
+
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); }
|
|
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
|
+
* Embedders service.
|
|
32
|
+
* @module api/EmbeddersApi
|
|
33
|
+
* @version v1
|
|
34
|
+
*/
|
|
35
|
+
var EmbeddersApi = exports["default"] = /*#__PURE__*/function () {
|
|
36
|
+
/**
|
|
37
|
+
* Constructs a new EmbeddersApi.
|
|
38
|
+
* @alias module:api/EmbeddersApi
|
|
39
|
+
* @class
|
|
40
|
+
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
41
|
+
* default to {@link module:ApiClient#instance} if unspecified.
|
|
42
|
+
*/
|
|
43
|
+
function EmbeddersApi(apiClient) {
|
|
44
|
+
_classCallCheck(this, EmbeddersApi);
|
|
45
|
+
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Callback function to receive the result of the createEmbedder operation.
|
|
50
|
+
* @callback module:api/EmbeddersApi~createEmbedderCallback
|
|
51
|
+
* @param {String} error Error message, if any.
|
|
52
|
+
* @param {module:model/EmbedderResponse} data The data returned by the service call.
|
|
53
|
+
* @param {String} response The complete HTTP response.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Create a new embedder
|
|
58
|
+
* Creates a new embedder configuration for vectorizing content. Embedders represent connections to different embedding API services (like OpenAI, vLLM, etc.) and include all the necessary configuration to use them with memory spaces.
|
|
59
|
+
* @param {module:model/EmbedderCreationRequest} embedderCreationRequest Embedder configuration details
|
|
60
|
+
* @param {module:api/EmbeddersApi~createEmbedderCallback} callback The callback function, accepting three arguments: error, data, response
|
|
61
|
+
* data is of type: {@link module:model/EmbedderResponse}
|
|
62
|
+
*/
|
|
63
|
+
return _createClass(EmbeddersApi, [{
|
|
64
|
+
key: "createEmbedder",
|
|
65
|
+
value: function createEmbedder(embedderCreationRequest, callback) {
|
|
66
|
+
var postBody = embedderCreationRequest;
|
|
67
|
+
// verify the required parameter 'embedderCreationRequest' is set
|
|
68
|
+
if (embedderCreationRequest === undefined || embedderCreationRequest === null) {
|
|
69
|
+
throw new Error("Missing the required parameter 'embedderCreationRequest' when calling createEmbedder");
|
|
70
|
+
}
|
|
71
|
+
var pathParams = {};
|
|
72
|
+
var queryParams = {};
|
|
73
|
+
var headerParams = {};
|
|
74
|
+
var formParams = {};
|
|
75
|
+
var authNames = [];
|
|
76
|
+
var contentTypes = ['application/json'];
|
|
77
|
+
var accepts = ['application/json'];
|
|
78
|
+
var returnType = _EmbedderResponse["default"];
|
|
79
|
+
return this.apiClient.callApi('/v1/embedders', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Callback function to receive the result of the deleteEmbedder operation.
|
|
84
|
+
* @callback module:api/EmbeddersApi~deleteEmbedderCallback
|
|
85
|
+
* @param {String} error Error message, if any.
|
|
86
|
+
* @param data This operation does not return a value.
|
|
87
|
+
* @param {String} response The complete HTTP response.
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Delete an embedder
|
|
92
|
+
* Deletes an embedder configuration. This operation cannot be undone.
|
|
93
|
+
* @param {String} id The unique identifier of the embedder to delete
|
|
94
|
+
* @param {module:api/EmbeddersApi~deleteEmbedderCallback} callback The callback function, accepting three arguments: error, data, response
|
|
95
|
+
*/
|
|
96
|
+
}, {
|
|
97
|
+
key: "deleteEmbedder",
|
|
98
|
+
value: function deleteEmbedder(id, callback) {
|
|
99
|
+
var postBody = null;
|
|
100
|
+
// verify the required parameter 'id' is set
|
|
101
|
+
if (id === undefined || id === null) {
|
|
102
|
+
throw new Error("Missing the required parameter 'id' when calling deleteEmbedder");
|
|
103
|
+
}
|
|
104
|
+
var pathParams = {
|
|
105
|
+
'id': id
|
|
106
|
+
};
|
|
107
|
+
var queryParams = {};
|
|
108
|
+
var headerParams = {};
|
|
109
|
+
var formParams = {};
|
|
110
|
+
var authNames = [];
|
|
111
|
+
var contentTypes = [];
|
|
112
|
+
var accepts = [];
|
|
113
|
+
var returnType = null;
|
|
114
|
+
return this.apiClient.callApi('/v1/embedders/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Callback function to receive the result of the getEmbedder operation.
|
|
119
|
+
* @callback module:api/EmbeddersApi~getEmbedderCallback
|
|
120
|
+
* @param {String} error Error message, if any.
|
|
121
|
+
* @param {module:model/EmbedderResponse} data The data returned by the service call.
|
|
122
|
+
* @param {String} response The complete HTTP response.
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Get an embedder by ID
|
|
127
|
+
* Retrieves the details of a specific embedder configuration by its unique identifier.
|
|
128
|
+
* @param {String} id The unique identifier of the embedder to retrieve
|
|
129
|
+
* @param {module:api/EmbeddersApi~getEmbedderCallback} callback The callback function, accepting three arguments: error, data, response
|
|
130
|
+
* data is of type: {@link module:model/EmbedderResponse}
|
|
131
|
+
*/
|
|
132
|
+
}, {
|
|
133
|
+
key: "getEmbedder",
|
|
134
|
+
value: function getEmbedder(id, callback) {
|
|
135
|
+
var postBody = null;
|
|
136
|
+
// verify the required parameter 'id' is set
|
|
137
|
+
if (id === undefined || id === null) {
|
|
138
|
+
throw new Error("Missing the required parameter 'id' when calling getEmbedder");
|
|
139
|
+
}
|
|
140
|
+
var pathParams = {
|
|
141
|
+
'id': id
|
|
142
|
+
};
|
|
143
|
+
var queryParams = {};
|
|
144
|
+
var headerParams = {};
|
|
145
|
+
var formParams = {};
|
|
146
|
+
var authNames = [];
|
|
147
|
+
var contentTypes = [];
|
|
148
|
+
var accepts = ['application/json'];
|
|
149
|
+
var returnType = _EmbedderResponse["default"];
|
|
150
|
+
return this.apiClient.callApi('/v1/embedders/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Callback function to receive the result of the listEmbedders operation.
|
|
155
|
+
* @callback module:api/EmbeddersApi~listEmbeddersCallback
|
|
156
|
+
* @param {String} error Error message, if any.
|
|
157
|
+
* @param {module:model/ListEmbeddersResponse} data The data returned by the service call.
|
|
158
|
+
* @param {String} response The complete HTTP response.
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* List embedders
|
|
163
|
+
* Retrieves a list of embedder configurations accessible to the caller, with optional filtering.
|
|
164
|
+
* @param {Object} opts Optional parameters
|
|
165
|
+
* @param {String} [ownerId] Filter embedders by owner ID. If not provided, shows embedders based on permissions.
|
|
166
|
+
* @param {String} [providerType] Filter embedders by provider type (e.g., OPENAI, OPENAI_COMPATIBLE, COHERE, etc.)
|
|
167
|
+
* @param {String} [label] Filter by label value. Multiple label filters can be specified (e.g., ?label.environment=production&label.team=nlp)
|
|
168
|
+
* @param {module:api/EmbeddersApi~listEmbeddersCallback} callback The callback function, accepting three arguments: error, data, response
|
|
169
|
+
* data is of type: {@link module:model/ListEmbeddersResponse}
|
|
170
|
+
*/
|
|
171
|
+
}, {
|
|
172
|
+
key: "listEmbedders",
|
|
173
|
+
value: function listEmbedders(opts, callback) {
|
|
174
|
+
opts = opts || {};
|
|
175
|
+
var postBody = null;
|
|
176
|
+
var pathParams = {};
|
|
177
|
+
var queryParams = {
|
|
178
|
+
'owner_id': opts['ownerId'],
|
|
179
|
+
'provider_type': opts['providerType'],
|
|
180
|
+
'label.*': opts['label']
|
|
181
|
+
};
|
|
182
|
+
var headerParams = {};
|
|
183
|
+
var formParams = {};
|
|
184
|
+
var authNames = [];
|
|
185
|
+
var contentTypes = [];
|
|
186
|
+
var accepts = ['application/json'];
|
|
187
|
+
var returnType = _ListEmbeddersResponse["default"];
|
|
188
|
+
return this.apiClient.callApi('/v1/embedders', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Callback function to receive the result of the updateEmbedder operation.
|
|
193
|
+
* @callback module:api/EmbeddersApi~updateEmbedderCallback
|
|
194
|
+
* @param {String} error Error message, if any.
|
|
195
|
+
* @param {module:model/EmbedderResponse} data The data returned by the service call.
|
|
196
|
+
* @param {String} response The complete HTTP response.
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Update an embedder
|
|
201
|
+
* Updates an existing embedder configuration with new values for the specified fields.
|
|
202
|
+
* @param {String} id The unique identifier of the embedder to update
|
|
203
|
+
* @param {module:model/UpdateEmbedderRequest} updateEmbedderRequest Embedder update details
|
|
204
|
+
* @param {module:api/EmbeddersApi~updateEmbedderCallback} callback The callback function, accepting three arguments: error, data, response
|
|
205
|
+
* data is of type: {@link module:model/EmbedderResponse}
|
|
206
|
+
*/
|
|
207
|
+
}, {
|
|
208
|
+
key: "updateEmbedder",
|
|
209
|
+
value: function updateEmbedder(id, updateEmbedderRequest, callback) {
|
|
210
|
+
var postBody = updateEmbedderRequest;
|
|
211
|
+
// verify the required parameter 'id' is set
|
|
212
|
+
if (id === undefined || id === null) {
|
|
213
|
+
throw new Error("Missing the required parameter 'id' when calling updateEmbedder");
|
|
214
|
+
}
|
|
215
|
+
// verify the required parameter 'updateEmbedderRequest' is set
|
|
216
|
+
if (updateEmbedderRequest === undefined || updateEmbedderRequest === null) {
|
|
217
|
+
throw new Error("Missing the required parameter 'updateEmbedderRequest' when calling updateEmbedder");
|
|
218
|
+
}
|
|
219
|
+
var pathParams = {
|
|
220
|
+
'id': id
|
|
221
|
+
};
|
|
222
|
+
var queryParams = {};
|
|
223
|
+
var headerParams = {};
|
|
224
|
+
var formParams = {};
|
|
225
|
+
var authNames = [];
|
|
226
|
+
var contentTypes = ['application/json'];
|
|
227
|
+
var accepts = ['application/json'];
|
|
228
|
+
var returnType = _EmbedderResponse["default"];
|
|
229
|
+
return this.apiClient.callApi('/v1/embedders/{id}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null, callback);
|
|
230
|
+
}
|
|
231
|
+
}]);
|
|
232
|
+
}();
|