@closerplatform/spinner-openapi 0.12.962 → 0.12.963

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/dist/api.d.ts CHANGED
@@ -3309,6 +3309,19 @@ export interface KnowledgeBaseFileDto {
3309
3309
  */
3310
3310
  uploadedAt: number;
3311
3311
  }
3312
+ /**
3313
+ *
3314
+ * @export
3315
+ * @interface KnowledgeBaseFileUploadRequest
3316
+ */
3317
+ export interface KnowledgeBaseFileUploadRequest {
3318
+ /**
3319
+ *
3320
+ * @type {string}
3321
+ * @memberof KnowledgeBaseFileUploadRequest
3322
+ */
3323
+ token: string;
3324
+ }
3312
3325
  /**
3313
3326
  *
3314
3327
  * @export
@@ -9268,6 +9281,16 @@ export declare const KnowledgeBasesApiFetchParamCreator: (configuration?: Config
9268
9281
  * @throws {RequiredError}
9269
9282
  */
9270
9283
  update(id: string, body?: KnowledgeBaseUpdateRequest, options?: any): FetchArgs;
9284
+ /**
9285
+ *
9286
+ * @summary Uploaded knowledge base's file to LLM
9287
+ * @param {string} knowledgeBaseId
9288
+ * @param {string} fileId
9289
+ * @param {KnowledgeBaseFileUploadRequest} [body]
9290
+ * @param {*} [options] Override http request option.
9291
+ * @throws {RequiredError}
9292
+ */
9293
+ uploadFile(knowledgeBaseId: string, fileId: string, body?: KnowledgeBaseFileUploadRequest, options?: any): FetchArgs;
9271
9294
  };
9272
9295
  /**
9273
9296
  * KnowledgeBasesApi - functional programming interface
@@ -9332,6 +9355,16 @@ export declare const KnowledgeBasesApiFp: (configuration?: Configuration) => {
9332
9355
  * @throws {RequiredError}
9333
9356
  */
9334
9357
  update(id: string, body?: KnowledgeBaseUpdateRequest, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<KnowledgeBaseDto>;
9358
+ /**
9359
+ *
9360
+ * @summary Uploaded knowledge base's file to LLM
9361
+ * @param {string} knowledgeBaseId
9362
+ * @param {string} fileId
9363
+ * @param {KnowledgeBaseFileUploadRequest} [body]
9364
+ * @param {*} [options] Override http request option.
9365
+ * @throws {RequiredError}
9366
+ */
9367
+ uploadFile(knowledgeBaseId: string, fileId: string, body?: KnowledgeBaseFileUploadRequest, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<KnowledgeBaseFileDto>;
9335
9368
  };
9336
9369
  /**
9337
9370
  * KnowledgeBasesApi - factory interface
@@ -9396,6 +9429,16 @@ export declare const KnowledgeBasesApiFactory: (configuration?: Configuration, f
9396
9429
  * @throws {RequiredError}
9397
9430
  */
9398
9431
  update(id: string, body?: KnowledgeBaseUpdateRequest, options?: any): Promise<KnowledgeBaseDto>;
9432
+ /**
9433
+ *
9434
+ * @summary Uploaded knowledge base's file to LLM
9435
+ * @param {string} knowledgeBaseId
9436
+ * @param {string} fileId
9437
+ * @param {KnowledgeBaseFileUploadRequest} [body]
9438
+ * @param {*} [options] Override http request option.
9439
+ * @throws {RequiredError}
9440
+ */
9441
+ uploadFile(knowledgeBaseId: string, fileId: string, body?: KnowledgeBaseFileUploadRequest, options?: any): Promise<KnowledgeBaseFileDto>;
9399
9442
  };
9400
9443
  /**
9401
9444
  * KnowledgeBasesApi - object-oriented interface
@@ -9469,6 +9512,17 @@ export declare class KnowledgeBasesApi extends BaseAPI {
9469
9512
  * @memberof KnowledgeBasesApi
9470
9513
  */
9471
9514
  update(id: string, body?: KnowledgeBaseUpdateRequest, options?: any): Promise<KnowledgeBaseDto>;
9515
+ /**
9516
+ *
9517
+ * @summary Uploaded knowledge base's file to LLM
9518
+ * @param {string} knowledgeBaseId
9519
+ * @param {string} fileId
9520
+ * @param {KnowledgeBaseFileUploadRequest} [body]
9521
+ * @param {*} [options] Override http request option.
9522
+ * @throws {RequiredError}
9523
+ * @memberof KnowledgeBasesApi
9524
+ */
9525
+ uploadFile(knowledgeBaseId: string, fileId: string, body?: KnowledgeBaseFileUploadRequest, options?: any): Promise<KnowledgeBaseFileDto>;
9472
9526
  }
9473
9527
  /**
9474
9528
  * MainNotificationsApi - fetch parameter creator
package/dist/api.js CHANGED
@@ -5204,6 +5204,50 @@ const KnowledgeBasesApiFetchParamCreator = function (configuration) {
5204
5204
  options: localVarRequestOptions,
5205
5205
  };
5206
5206
  },
5207
+ /**
5208
+ *
5209
+ * @summary Uploaded knowledge base's file to LLM
5210
+ * @param {string} knowledgeBaseId
5211
+ * @param {string} fileId
5212
+ * @param {KnowledgeBaseFileUploadRequest} [body]
5213
+ * @param {*} [options] Override http request option.
5214
+ * @throws {RequiredError}
5215
+ */
5216
+ uploadFile(knowledgeBaseId, fileId, body, options = {}) {
5217
+ // verify required parameter 'knowledgeBaseId' is not null or undefined
5218
+ if (knowledgeBaseId === null || knowledgeBaseId === undefined) {
5219
+ throw new RequiredError('knowledgeBaseId', 'Required parameter knowledgeBaseId was null or undefined when calling uploadFile.');
5220
+ }
5221
+ // verify required parameter 'fileId' is not null or undefined
5222
+ if (fileId === null || fileId === undefined) {
5223
+ throw new RequiredError('fileId', 'Required parameter fileId was null or undefined when calling uploadFile.');
5224
+ }
5225
+ const localVarPath = `/knowledge-bases/{knowledgeBaseId}/files/{fileId}`
5226
+ .replace(`{${"knowledgeBaseId"}}`, encodeURIComponent(String(knowledgeBaseId)))
5227
+ .replace(`{${"fileId"}}`, encodeURIComponent(String(fileId)));
5228
+ const localVarUrlObj = url.parse(localVarPath, true);
5229
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
5230
+ const localVarHeaderParameter = {};
5231
+ const localVarQueryParameter = {};
5232
+ // authentication apiKey required
5233
+ if (configuration && configuration.apiKey) {
5234
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
5235
+ ? configuration.apiKey("X-Api-Key")
5236
+ : configuration.apiKey;
5237
+ localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
5238
+ }
5239
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5240
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
5241
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
5242
+ delete localVarUrlObj.search;
5243
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
5244
+ const needsSerialization = ("KnowledgeBaseFileUploadRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
5245
+ localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
5246
+ return {
5247
+ url: url.format(localVarUrlObj),
5248
+ options: localVarRequestOptions,
5249
+ };
5250
+ },
5207
5251
  };
5208
5252
  };
5209
5253
  exports.KnowledgeBasesApiFetchParamCreator = KnowledgeBasesApiFetchParamCreator;
@@ -5355,6 +5399,28 @@ const KnowledgeBasesApiFp = function (configuration) {
5355
5399
  });
5356
5400
  };
5357
5401
  },
5402
+ /**
5403
+ *
5404
+ * @summary Uploaded knowledge base's file to LLM
5405
+ * @param {string} knowledgeBaseId
5406
+ * @param {string} fileId
5407
+ * @param {KnowledgeBaseFileUploadRequest} [body]
5408
+ * @param {*} [options] Override http request option.
5409
+ * @throws {RequiredError}
5410
+ */
5411
+ uploadFile(knowledgeBaseId, fileId, body, options) {
5412
+ const localVarFetchArgs = (0, exports.KnowledgeBasesApiFetchParamCreator)(configuration).uploadFile(knowledgeBaseId, fileId, body, options);
5413
+ return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
5414
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
5415
+ if (response.status >= 200 && response.status < 300) {
5416
+ return response.json();
5417
+ }
5418
+ else {
5419
+ throw response;
5420
+ }
5421
+ });
5422
+ };
5423
+ },
5358
5424
  };
5359
5425
  };
5360
5426
  exports.KnowledgeBasesApiFp = KnowledgeBasesApiFp;
@@ -5436,6 +5502,18 @@ const KnowledgeBasesApiFactory = function (configuration, fetch, basePath) {
5436
5502
  update(id, body, options) {
5437
5503
  return (0, exports.KnowledgeBasesApiFp)(configuration).update(id, body, options)(fetch, basePath);
5438
5504
  },
5505
+ /**
5506
+ *
5507
+ * @summary Uploaded knowledge base's file to LLM
5508
+ * @param {string} knowledgeBaseId
5509
+ * @param {string} fileId
5510
+ * @param {KnowledgeBaseFileUploadRequest} [body]
5511
+ * @param {*} [options] Override http request option.
5512
+ * @throws {RequiredError}
5513
+ */
5514
+ uploadFile(knowledgeBaseId, fileId, body, options) {
5515
+ return (0, exports.KnowledgeBasesApiFp)(configuration).uploadFile(knowledgeBaseId, fileId, body, options)(fetch, basePath);
5516
+ },
5439
5517
  };
5440
5518
  };
5441
5519
  exports.KnowledgeBasesApiFactory = KnowledgeBasesApiFactory;
@@ -5525,6 +5603,19 @@ class KnowledgeBasesApi extends BaseAPI {
5525
5603
  update(id, body, options) {
5526
5604
  return (0, exports.KnowledgeBasesApiFp)(this.configuration).update(id, body, options)(this.fetch, this.basePath);
5527
5605
  }
5606
+ /**
5607
+ *
5608
+ * @summary Uploaded knowledge base's file to LLM
5609
+ * @param {string} knowledgeBaseId
5610
+ * @param {string} fileId
5611
+ * @param {KnowledgeBaseFileUploadRequest} [body]
5612
+ * @param {*} [options] Override http request option.
5613
+ * @throws {RequiredError}
5614
+ * @memberof KnowledgeBasesApi
5615
+ */
5616
+ uploadFile(knowledgeBaseId, fileId, body, options) {
5617
+ return (0, exports.KnowledgeBasesApiFp)(this.configuration).uploadFile(knowledgeBaseId, fileId, body, options)(this.fetch, this.basePath);
5618
+ }
5528
5619
  }
5529
5620
  exports.KnowledgeBasesApi = KnowledgeBasesApi;
5530
5621
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@closerplatform/spinner-openapi",
3
- "version": "0.12.962",
3
+ "version": "0.12.963",
4
4
  "description": "swagger client for @closerplatform/spinner-openapi",
5
5
  "author": "Swagger Codegen Contributors",
6
6
  "keywords": [