@equos/node-sdk 3.0.2-rc.9 → 3.1.1-rc.0

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 (127) hide show
  1. package/dist/client.d.ts +3 -5
  2. package/dist/client.js +12 -17
  3. package/dist/index.d.ts +1 -2
  4. package/dist/index.js +1 -2
  5. package/package.json +3 -4
  6. package/dist/api/apis/AgentApi.d.ts +0 -86
  7. package/dist/api/apis/AgentApi.js +0 -223
  8. package/dist/api/apis/AvatarApi.d.ts +0 -86
  9. package/dist/api/apis/AvatarApi.js +0 -223
  10. package/dist/api/apis/BrainApi.d.ts +0 -64
  11. package/dist/api/apis/BrainApi.js +0 -179
  12. package/dist/api/apis/CharacterApi.d.ts +0 -76
  13. package/dist/api/apis/CharacterApi.js +0 -213
  14. package/dist/api/apis/ConversationApi.d.ts +0 -64
  15. package/dist/api/apis/ConversationApi.js +0 -179
  16. package/dist/api/apis/FaceApi.d.ts +0 -64
  17. package/dist/api/apis/FaceApi.js +0 -179
  18. package/dist/api/apis/HealthApi.d.ts +0 -26
  19. package/dist/api/apis/HealthApi.js +0 -79
  20. package/dist/api/apis/KnowledgeBaseApi.d.ts +0 -100
  21. package/dist/api/apis/KnowledgeBaseApi.js +0 -279
  22. package/dist/api/apis/SessionPassesApi.d.ts +0 -44
  23. package/dist/api/apis/SessionPassesApi.js +0 -128
  24. package/dist/api/apis/SessionsApi.d.ts +0 -72
  25. package/dist/api/apis/SessionsApi.js +0 -187
  26. package/dist/api/apis/VoiceApi.d.ts +0 -64
  27. package/dist/api/apis/VoiceApi.js +0 -179
  28. package/dist/api/apis/index.d.ts +0 -11
  29. package/dist/api/apis/index.js +0 -29
  30. package/dist/api/index.d.ts +0 -3
  31. package/dist/api/index.js +0 -21
  32. package/dist/api/models/CreateDocumentRequest.d.ts +0 -44
  33. package/dist/api/models/CreateDocumentRequest.js +0 -58
  34. package/dist/api/models/CreateDocumentResponse.d.ts +0 -45
  35. package/dist/api/models/CreateDocumentResponse.js +0 -59
  36. package/dist/api/models/CreateEquosAgentRequest.d.ts +0 -144
  37. package/dist/api/models/CreateEquosAgentRequest.js +0 -120
  38. package/dist/api/models/CreateEquosAvatarRequest.d.ts +0 -56
  39. package/dist/api/models/CreateEquosAvatarRequest.js +0 -64
  40. package/dist/api/models/CreateEquosBrainRequest.d.ts +0 -50
  41. package/dist/api/models/CreateEquosBrainRequest.js +0 -60
  42. package/dist/api/models/CreateEquosCharacterRequest.d.ts +0 -80
  43. package/dist/api/models/CreateEquosCharacterRequest.js +0 -68
  44. package/dist/api/models/CreateEquosConversationRequest.d.ts +0 -84
  45. package/dist/api/models/CreateEquosConversationRequest.js +0 -70
  46. package/dist/api/models/CreateEquosConversationResponse.d.ts +0 -45
  47. package/dist/api/models/CreateEquosConversationResponse.js +0 -55
  48. package/dist/api/models/CreateEquosFaceRequest.d.ts +0 -53
  49. package/dist/api/models/CreateEquosFaceRequest.js +0 -67
  50. package/dist/api/models/CreateEquosSessionRequest.d.ts +0 -90
  51. package/dist/api/models/CreateEquosSessionRequest.js +0 -74
  52. package/dist/api/models/CreateEquosSessionRequestAgent.d.ts +0 -23
  53. package/dist/api/models/CreateEquosSessionRequestAgent.js +0 -57
  54. package/dist/api/models/CreateEquosSessionRequestAvatar.d.ts +0 -23
  55. package/dist/api/models/CreateEquosSessionRequestAvatar.js +0 -57
  56. package/dist/api/models/CreateEquosSessionResponse.d.ts +0 -45
  57. package/dist/api/models/CreateEquosSessionResponse.js +0 -55
  58. package/dist/api/models/CreateEquosVoiceRequest.d.ts +0 -80
  59. package/dist/api/models/CreateEquosVoiceRequest.js +0 -90
  60. package/dist/api/models/CreateKnowledgeBaseRequest.d.ts +0 -44
  61. package/dist/api/models/CreateKnowledgeBaseRequest.js +0 -56
  62. package/dist/api/models/CreateSessionPassRequest.d.ts +0 -76
  63. package/dist/api/models/CreateSessionPassRequest.js +0 -72
  64. package/dist/api/models/EquosAgent.d.ts +0 -180
  65. package/dist/api/models/EquosAgent.js +0 -154
  66. package/dist/api/models/EquosAvatar.d.ts +0 -92
  67. package/dist/api/models/EquosAvatar.js +0 -84
  68. package/dist/api/models/EquosBrain.d.ts +0 -68
  69. package/dist/api/models/EquosBrain.js +0 -72
  70. package/dist/api/models/EquosCharacter.d.ts +0 -132
  71. package/dist/api/models/EquosCharacter.js +0 -98
  72. package/dist/api/models/EquosConversation.d.ts +0 -177
  73. package/dist/api/models/EquosConversation.js +0 -129
  74. package/dist/api/models/EquosConversationHost.d.ts +0 -38
  75. package/dist/api/models/EquosConversationHost.js +0 -54
  76. package/dist/api/models/EquosConversationTranscriptMessage.d.ts +0 -58
  77. package/dist/api/models/EquosConversationTranscriptMessage.js +0 -70
  78. package/dist/api/models/EquosDocument.d.ts +0 -74
  79. package/dist/api/models/EquosDocument.js +0 -78
  80. package/dist/api/models/EquosFace.d.ts +0 -95
  81. package/dist/api/models/EquosFace.js +0 -89
  82. package/dist/api/models/EquosKnowledgeBase.d.ts +0 -75
  83. package/dist/api/models/EquosKnowledgeBase.js +0 -77
  84. package/dist/api/models/EquosParticipantIdentity.d.ts +0 -38
  85. package/dist/api/models/EquosParticipantIdentity.js +0 -54
  86. package/dist/api/models/EquosResourceReference.d.ts +0 -32
  87. package/dist/api/models/EquosResourceReference.js +0 -50
  88. package/dist/api/models/EquosSession.d.ts +0 -168
  89. package/dist/api/models/EquosSession.js +0 -118
  90. package/dist/api/models/EquosSessionHost.d.ts +0 -38
  91. package/dist/api/models/EquosSessionHost.js +0 -54
  92. package/dist/api/models/EquosSessionServer.d.ts +0 -32
  93. package/dist/api/models/EquosSessionServer.js +0 -50
  94. package/dist/api/models/EquosVoice.d.ts +0 -104
  95. package/dist/api/models/EquosVoice.js +0 -106
  96. package/dist/api/models/HealthResponse.d.ts +0 -38
  97. package/dist/api/models/HealthResponse.js +0 -54
  98. package/dist/api/models/ListEquosAgentsResponse.d.ts +0 -51
  99. package/dist/api/models/ListEquosAgentsResponse.js +0 -63
  100. package/dist/api/models/ListEquosAvatarsResponse.d.ts +0 -51
  101. package/dist/api/models/ListEquosAvatarsResponse.js +0 -63
  102. package/dist/api/models/ListEquosBrainsResponse.d.ts +0 -51
  103. package/dist/api/models/ListEquosBrainsResponse.js +0 -63
  104. package/dist/api/models/ListEquosCharactersResponse.d.ts +0 -51
  105. package/dist/api/models/ListEquosCharactersResponse.js +0 -63
  106. package/dist/api/models/ListEquosConversationsResponse.d.ts +0 -51
  107. package/dist/api/models/ListEquosConversationsResponse.js +0 -63
  108. package/dist/api/models/ListEquosFacesResponse.d.ts +0 -51
  109. package/dist/api/models/ListEquosFacesResponse.js +0 -63
  110. package/dist/api/models/ListEquosKnowledgeBasesResponse.d.ts +0 -51
  111. package/dist/api/models/ListEquosKnowledgeBasesResponse.js +0 -63
  112. package/dist/api/models/ListEquosSessionsResponse.d.ts +0 -51
  113. package/dist/api/models/ListEquosSessionsResponse.js +0 -63
  114. package/dist/api/models/ListEquosVoicesResponse.d.ts +0 -51
  115. package/dist/api/models/ListEquosVoicesResponse.js +0 -63
  116. package/dist/api/models/UpdateEquosAgentRequest.d.ts +0 -156
  117. package/dist/api/models/UpdateEquosAgentRequest.js +0 -128
  118. package/dist/api/models/UpdateEquosAvatarRequest.d.ts +0 -68
  119. package/dist/api/models/UpdateEquosAvatarRequest.js +0 -72
  120. package/dist/api/models/UpdateEquosCharacterRequest.d.ts +0 -68
  121. package/dist/api/models/UpdateEquosCharacterRequest.js +0 -60
  122. package/dist/api/models/index.d.ts +0 -45
  123. package/dist/api/models/index.js +0 -63
  124. package/dist/api/runtime.d.ts +0 -184
  125. package/dist/api/runtime.js +0 -349
  126. package/dist/options.d.ts +0 -7
  127. package/dist/options.js +0 -2
@@ -1,349 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Equos.ai API
6
- * API documentation for Equos.ai live platform.
7
- *
8
- * The version of the OpenAPI document: 3.0
9
- *
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
17
- exports.querystring = querystring;
18
- exports.exists = exists;
19
- exports.mapValues = mapValues;
20
- exports.canConsumeForm = canConsumeForm;
21
- exports.BASE_PATH = "http://localhost:3001".replace(/\/+$/, "");
22
- class Configuration {
23
- configuration;
24
- constructor(configuration = {}) {
25
- this.configuration = configuration;
26
- }
27
- set config(configuration) {
28
- this.configuration = configuration;
29
- }
30
- get basePath() {
31
- return this.configuration.basePath != null ? this.configuration.basePath : exports.BASE_PATH;
32
- }
33
- get fetchApi() {
34
- return this.configuration.fetchApi;
35
- }
36
- get middleware() {
37
- return this.configuration.middleware || [];
38
- }
39
- get queryParamsStringify() {
40
- return this.configuration.queryParamsStringify || querystring;
41
- }
42
- get username() {
43
- return this.configuration.username;
44
- }
45
- get password() {
46
- return this.configuration.password;
47
- }
48
- get apiKey() {
49
- const apiKey = this.configuration.apiKey;
50
- if (apiKey) {
51
- return typeof apiKey === 'function' ? apiKey : () => apiKey;
52
- }
53
- return undefined;
54
- }
55
- get accessToken() {
56
- const accessToken = this.configuration.accessToken;
57
- if (accessToken) {
58
- return typeof accessToken === 'function' ? accessToken : async () => accessToken;
59
- }
60
- return undefined;
61
- }
62
- get headers() {
63
- return this.configuration.headers;
64
- }
65
- get credentials() {
66
- return this.configuration.credentials;
67
- }
68
- }
69
- exports.Configuration = Configuration;
70
- exports.DefaultConfig = new Configuration();
71
- /**
72
- * This is the base class for all generated API classes.
73
- */
74
- class BaseAPI {
75
- configuration;
76
- static jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
77
- middleware;
78
- constructor(configuration = exports.DefaultConfig) {
79
- this.configuration = configuration;
80
- this.middleware = configuration.middleware;
81
- }
82
- withMiddleware(...middlewares) {
83
- const next = this.clone();
84
- next.middleware = next.middleware.concat(...middlewares);
85
- return next;
86
- }
87
- withPreMiddleware(...preMiddlewares) {
88
- const middlewares = preMiddlewares.map((pre) => ({ pre }));
89
- return this.withMiddleware(...middlewares);
90
- }
91
- withPostMiddleware(...postMiddlewares) {
92
- const middlewares = postMiddlewares.map((post) => ({ post }));
93
- return this.withMiddleware(...middlewares);
94
- }
95
- /**
96
- * Check if the given MIME is a JSON MIME.
97
- * JSON MIME examples:
98
- * application/json
99
- * application/json; charset=UTF8
100
- * APPLICATION/JSON
101
- * application/vnd.company+json
102
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
103
- * @return True if the given MIME is JSON, false otherwise.
104
- */
105
- isJsonMime(mime) {
106
- if (!mime) {
107
- return false;
108
- }
109
- return BaseAPI.jsonRegex.test(mime);
110
- }
111
- async request(context, initOverrides) {
112
- const { url, init } = await this.createFetchParams(context, initOverrides);
113
- const response = await this.fetchApi(url, init);
114
- if (response && (response.status >= 200 && response.status < 300)) {
115
- return response;
116
- }
117
- throw new ResponseError(response, 'Response returned an error code');
118
- }
119
- async createFetchParams(context, initOverrides) {
120
- let url = this.configuration.basePath + context.path;
121
- if (context.query !== undefined && Object.keys(context.query).length !== 0) {
122
- // only add the querystring to the URL if there are query parameters.
123
- // this is done to avoid urls ending with a "?" character which buggy webservers
124
- // do not handle correctly sometimes.
125
- url += '?' + this.configuration.queryParamsStringify(context.query);
126
- }
127
- const headers = Object.assign({}, this.configuration.headers, context.headers);
128
- Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
129
- const initOverrideFn = typeof initOverrides === "function"
130
- ? initOverrides
131
- : async () => initOverrides;
132
- const initParams = {
133
- method: context.method,
134
- headers,
135
- body: context.body,
136
- credentials: this.configuration.credentials,
137
- };
138
- const overriddenInit = {
139
- ...initParams,
140
- ...(await initOverrideFn({
141
- init: initParams,
142
- context,
143
- }))
144
- };
145
- let body;
146
- if (isFormData(overriddenInit.body)
147
- || (overriddenInit.body instanceof URLSearchParams)
148
- || isBlob(overriddenInit.body)) {
149
- body = overriddenInit.body;
150
- }
151
- else if (this.isJsonMime(headers['Content-Type'])) {
152
- body = JSON.stringify(overriddenInit.body);
153
- }
154
- else {
155
- body = overriddenInit.body;
156
- }
157
- const init = {
158
- ...overriddenInit,
159
- body
160
- };
161
- return { url, init };
162
- }
163
- fetchApi = async (url, init) => {
164
- let fetchParams = { url, init };
165
- for (const middleware of this.middleware) {
166
- if (middleware.pre) {
167
- fetchParams = await middleware.pre({
168
- fetch: this.fetchApi,
169
- ...fetchParams,
170
- }) || fetchParams;
171
- }
172
- }
173
- let response = undefined;
174
- try {
175
- response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
176
- }
177
- catch (e) {
178
- for (const middleware of this.middleware) {
179
- if (middleware.onError) {
180
- response = await middleware.onError({
181
- fetch: this.fetchApi,
182
- url: fetchParams.url,
183
- init: fetchParams.init,
184
- error: e,
185
- response: response ? response.clone() : undefined,
186
- }) || response;
187
- }
188
- }
189
- if (response === undefined) {
190
- if (e instanceof Error) {
191
- throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
192
- }
193
- else {
194
- throw e;
195
- }
196
- }
197
- }
198
- for (const middleware of this.middleware) {
199
- if (middleware.post) {
200
- response = await middleware.post({
201
- fetch: this.fetchApi,
202
- url: fetchParams.url,
203
- init: fetchParams.init,
204
- response: response.clone(),
205
- }) || response;
206
- }
207
- }
208
- return response;
209
- };
210
- /**
211
- * Create a shallow clone of `this` by constructing a new instance
212
- * and then shallow cloning data members.
213
- */
214
- clone() {
215
- const constructor = this.constructor;
216
- const next = new constructor(this.configuration);
217
- next.middleware = this.middleware.slice();
218
- return next;
219
- }
220
- }
221
- exports.BaseAPI = BaseAPI;
222
- ;
223
- function isBlob(value) {
224
- return typeof Blob !== 'undefined' && value instanceof Blob;
225
- }
226
- function isFormData(value) {
227
- return typeof FormData !== "undefined" && value instanceof FormData;
228
- }
229
- class ResponseError extends Error {
230
- response;
231
- name = "ResponseError";
232
- constructor(response, msg) {
233
- super(msg);
234
- this.response = response;
235
- }
236
- }
237
- exports.ResponseError = ResponseError;
238
- class FetchError extends Error {
239
- cause;
240
- name = "FetchError";
241
- constructor(cause, msg) {
242
- super(msg);
243
- this.cause = cause;
244
- }
245
- }
246
- exports.FetchError = FetchError;
247
- class RequiredError extends Error {
248
- field;
249
- name = "RequiredError";
250
- constructor(field, msg) {
251
- super(msg);
252
- this.field = field;
253
- }
254
- }
255
- exports.RequiredError = RequiredError;
256
- exports.COLLECTION_FORMATS = {
257
- csv: ",",
258
- ssv: " ",
259
- tsv: "\t",
260
- pipes: "|",
261
- };
262
- function querystring(params, prefix = '') {
263
- return Object.keys(params)
264
- .map(key => querystringSingleKey(key, params[key], prefix))
265
- .filter(part => part.length > 0)
266
- .join('&');
267
- }
268
- function querystringSingleKey(key, value, keyPrefix = '') {
269
- const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
270
- if (value instanceof Array) {
271
- const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
272
- .join(`&${encodeURIComponent(fullKey)}=`);
273
- return `${encodeURIComponent(fullKey)}=${multiValue}`;
274
- }
275
- if (value instanceof Set) {
276
- const valueAsArray = Array.from(value);
277
- return querystringSingleKey(key, valueAsArray, keyPrefix);
278
- }
279
- if (value instanceof Date) {
280
- return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
281
- }
282
- if (value instanceof Object) {
283
- return querystring(value, fullKey);
284
- }
285
- return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
286
- }
287
- function exists(json, key) {
288
- const value = json[key];
289
- return value !== null && value !== undefined;
290
- }
291
- function mapValues(data, fn) {
292
- const result = {};
293
- for (const key of Object.keys(data)) {
294
- result[key] = fn(data[key]);
295
- }
296
- return result;
297
- }
298
- function canConsumeForm(consumes) {
299
- for (const consume of consumes) {
300
- if ('multipart/form-data' === consume.contentType) {
301
- return true;
302
- }
303
- }
304
- return false;
305
- }
306
- class JSONApiResponse {
307
- raw;
308
- transformer;
309
- constructor(raw, transformer = (jsonValue) => jsonValue) {
310
- this.raw = raw;
311
- this.transformer = transformer;
312
- }
313
- async value() {
314
- return this.transformer(await this.raw.json());
315
- }
316
- }
317
- exports.JSONApiResponse = JSONApiResponse;
318
- class VoidApiResponse {
319
- raw;
320
- constructor(raw) {
321
- this.raw = raw;
322
- }
323
- async value() {
324
- return undefined;
325
- }
326
- }
327
- exports.VoidApiResponse = VoidApiResponse;
328
- class BlobApiResponse {
329
- raw;
330
- constructor(raw) {
331
- this.raw = raw;
332
- }
333
- async value() {
334
- return await this.raw.blob();
335
- }
336
- ;
337
- }
338
- exports.BlobApiResponse = BlobApiResponse;
339
- class TextApiResponse {
340
- raw;
341
- constructor(raw) {
342
- this.raw = raw;
343
- }
344
- async value() {
345
- return await this.raw.text();
346
- }
347
- ;
348
- }
349
- exports.TextApiResponse = TextApiResponse;
package/dist/options.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export interface EquosOptions {
2
- /**
3
- * API endpoint to use (default: https://api.equos.ai)
4
- * Can leave blank to use the default endpoint.
5
- */
6
- endpoint?: string;
7
- }
package/dist/options.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });