@closerplatform/spinner-openapi 0.12.605 → 0.12.607

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
@@ -3428,12 +3428,19 @@ export interface KnowledgeBaseCreateForm {
3428
3428
  * @memberof KnowledgeBaseCreateForm
3429
3429
  */
3430
3430
  name: string;
3431
+ }
3432
+ /**
3433
+ *
3434
+ * @export
3435
+ * @interface KnowledgeBaseUpdateForm
3436
+ */
3437
+ export interface KnowledgeBaseUpdateForm {
3431
3438
  /**
3432
3439
  *
3433
3440
  * @type {string}
3434
- * @memberof KnowledgeBaseCreateForm
3441
+ * @memberof KnowledgeBaseUpdateForm
3435
3442
  */
3436
- description?: string;
3443
+ name: string;
3437
3444
  }
3438
3445
  /**
3439
3446
  *
@@ -9387,6 +9394,14 @@ export declare class InviteesApi extends BaseAPI {
9387
9394
  * @export
9388
9395
  */
9389
9396
  export declare const KnowledgeBasesApiFetchParamCreator: (configuration?: Configuration) => {
9397
+ /**
9398
+ *
9399
+ * @summary Delete knowledge base with its files
9400
+ * @param {string} id
9401
+ * @param {*} [options] Override http request option.
9402
+ * @throws {RequiredError}
9403
+ */
9404
+ _delete(id: string, options?: any): FetchArgs;
9390
9405
  /**
9391
9406
  *
9392
9407
  * @summary Create knowledge base
@@ -9431,16 +9446,25 @@ export declare const KnowledgeBasesApiFetchParamCreator: (configuration?: Config
9431
9446
  *
9432
9447
  * @summary Update knowledge base
9433
9448
  * @param {string} id
9449
+ * @param {KnowledgeBaseUpdateForm} [body]
9434
9450
  * @param {*} [options] Override http request option.
9435
9451
  * @throws {RequiredError}
9436
9452
  */
9437
- update(id: string, options?: any): FetchArgs;
9453
+ update(id: string, body?: KnowledgeBaseUpdateForm, options?: any): FetchArgs;
9438
9454
  };
9439
9455
  /**
9440
9456
  * KnowledgeBasesApi - functional programming interface
9441
9457
  * @export
9442
9458
  */
9443
9459
  export declare const KnowledgeBasesApiFp: (configuration?: Configuration) => {
9460
+ /**
9461
+ *
9462
+ * @summary Delete knowledge base with its files
9463
+ * @param {string} id
9464
+ * @param {*} [options] Override http request option.
9465
+ * @throws {RequiredError}
9466
+ */
9467
+ _delete(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response>;
9444
9468
  /**
9445
9469
  *
9446
9470
  * @summary Create knowledge base
@@ -9485,16 +9509,25 @@ export declare const KnowledgeBasesApiFp: (configuration?: Configuration) => {
9485
9509
  *
9486
9510
  * @summary Update knowledge base
9487
9511
  * @param {string} id
9512
+ * @param {KnowledgeBaseUpdateForm} [body]
9488
9513
  * @param {*} [options] Override http request option.
9489
9514
  * @throws {RequiredError}
9490
9515
  */
9491
- update(id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response>;
9516
+ update(id: string, body?: KnowledgeBaseUpdateForm, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response>;
9492
9517
  };
9493
9518
  /**
9494
9519
  * KnowledgeBasesApi - factory interface
9495
9520
  * @export
9496
9521
  */
9497
9522
  export declare const KnowledgeBasesApiFactory: (configuration?: Configuration, fetch?: FetchAPI, basePath?: string) => {
9523
+ /**
9524
+ *
9525
+ * @summary Delete knowledge base with its files
9526
+ * @param {string} id
9527
+ * @param {*} [options] Override http request option.
9528
+ * @throws {RequiredError}
9529
+ */
9530
+ _delete(id: string, options?: any): Promise<Response>;
9498
9531
  /**
9499
9532
  *
9500
9533
  * @summary Create knowledge base
@@ -9539,10 +9572,11 @@ export declare const KnowledgeBasesApiFactory: (configuration?: Configuration, f
9539
9572
  *
9540
9573
  * @summary Update knowledge base
9541
9574
  * @param {string} id
9575
+ * @param {KnowledgeBaseUpdateForm} [body]
9542
9576
  * @param {*} [options] Override http request option.
9543
9577
  * @throws {RequiredError}
9544
9578
  */
9545
- update(id: string, options?: any): Promise<Response>;
9579
+ update(id: string, body?: KnowledgeBaseUpdateForm, options?: any): Promise<Response>;
9546
9580
  };
9547
9581
  /**
9548
9582
  * KnowledgeBasesApi - object-oriented interface
@@ -9551,6 +9585,15 @@ export declare const KnowledgeBasesApiFactory: (configuration?: Configuration, f
9551
9585
  * @extends {BaseAPI}
9552
9586
  */
9553
9587
  export declare class KnowledgeBasesApi extends BaseAPI {
9588
+ /**
9589
+ *
9590
+ * @summary Delete knowledge base with its files
9591
+ * @param {string} id
9592
+ * @param {*} [options] Override http request option.
9593
+ * @throws {RequiredError}
9594
+ * @memberof KnowledgeBasesApi
9595
+ */
9596
+ _delete(id: string, options?: any): Promise<Response>;
9554
9597
  /**
9555
9598
  *
9556
9599
  * @summary Create knowledge base
@@ -9600,11 +9643,12 @@ export declare class KnowledgeBasesApi extends BaseAPI {
9600
9643
  *
9601
9644
  * @summary Update knowledge base
9602
9645
  * @param {string} id
9646
+ * @param {KnowledgeBaseUpdateForm} [body]
9603
9647
  * @param {*} [options] Override http request option.
9604
9648
  * @throws {RequiredError}
9605
9649
  * @memberof KnowledgeBasesApi
9606
9650
  */
9607
- update(id: string, options?: any): Promise<Response>;
9651
+ update(id: string, body?: KnowledgeBaseUpdateForm, options?: any): Promise<Response>;
9608
9652
  }
9609
9653
  /**
9610
9654
  * MainNotificationsApi - fetch parameter creator
package/dist/api.js CHANGED
@@ -4956,6 +4956,40 @@ exports.InviteesApi = InviteesApi;
4956
4956
  */
4957
4957
  const KnowledgeBasesApiFetchParamCreator = function (configuration) {
4958
4958
  return {
4959
+ /**
4960
+ *
4961
+ * @summary Delete knowledge base with its files
4962
+ * @param {string} id
4963
+ * @param {*} [options] Override http request option.
4964
+ * @throws {RequiredError}
4965
+ */
4966
+ _delete(id, options = {}) {
4967
+ // verify required parameter 'id' is not null or undefined
4968
+ if (id === null || id === undefined) {
4969
+ throw new RequiredError('id', 'Required parameter id was null or undefined when calling _delete.');
4970
+ }
4971
+ const localVarPath = `/knowledge-bases/{id}`
4972
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
4973
+ const localVarUrlObj = url.parse(localVarPath, true);
4974
+ const localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
4975
+ const localVarHeaderParameter = {};
4976
+ const localVarQueryParameter = {};
4977
+ // authentication apiKey required
4978
+ if (configuration && configuration.apiKey) {
4979
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
4980
+ ? configuration.apiKey("X-Api-Key")
4981
+ : configuration.apiKey;
4982
+ localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
4983
+ }
4984
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
4985
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
4986
+ delete localVarUrlObj.search;
4987
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
4988
+ return {
4989
+ url: url.format(localVarUrlObj),
4990
+ options: localVarRequestOptions,
4991
+ };
4992
+ },
4959
4993
  /**
4960
4994
  *
4961
4995
  * @summary Create knowledge base
@@ -5132,10 +5166,11 @@ const KnowledgeBasesApiFetchParamCreator = function (configuration) {
5132
5166
  *
5133
5167
  * @summary Update knowledge base
5134
5168
  * @param {string} id
5169
+ * @param {KnowledgeBaseUpdateForm} [body]
5135
5170
  * @param {*} [options] Override http request option.
5136
5171
  * @throws {RequiredError}
5137
5172
  */
5138
- update(id, options = {}) {
5173
+ update(id, body, options = {}) {
5139
5174
  // verify required parameter 'id' is not null or undefined
5140
5175
  if (id === null || id === undefined) {
5141
5176
  throw new RequiredError('id', 'Required parameter id was null or undefined when calling update.');
@@ -5153,10 +5188,13 @@ const KnowledgeBasesApiFetchParamCreator = function (configuration) {
5153
5188
  : configuration.apiKey;
5154
5189
  localVarHeaderParameter["X-Api-Key"] = localVarApiKeyValue;
5155
5190
  }
5191
+ localVarHeaderParameter['Content-Type'] = 'application/json';
5156
5192
  localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
5157
5193
  // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
5158
5194
  delete localVarUrlObj.search;
5159
5195
  localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
5196
+ const needsSerialization = ("KnowledgeBaseUpdateForm" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
5197
+ localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || "");
5160
5198
  return {
5161
5199
  url: url.format(localVarUrlObj),
5162
5200
  options: localVarRequestOptions,
@@ -5171,6 +5209,26 @@ exports.KnowledgeBasesApiFetchParamCreator = KnowledgeBasesApiFetchParamCreator;
5171
5209
  */
5172
5210
  const KnowledgeBasesApiFp = function (configuration) {
5173
5211
  return {
5212
+ /**
5213
+ *
5214
+ * @summary Delete knowledge base with its files
5215
+ * @param {string} id
5216
+ * @param {*} [options] Override http request option.
5217
+ * @throws {RequiredError}
5218
+ */
5219
+ _delete(id, options) {
5220
+ const localVarFetchArgs = (0, exports.KnowledgeBasesApiFetchParamCreator)(configuration)._delete(id, options);
5221
+ return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
5222
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
5223
+ if (response.status >= 200 && response.status < 300) {
5224
+ return response;
5225
+ }
5226
+ else {
5227
+ throw response;
5228
+ }
5229
+ });
5230
+ };
5231
+ },
5174
5232
  /**
5175
5233
  *
5176
5234
  * @summary Create knowledge base
@@ -5275,11 +5333,12 @@ const KnowledgeBasesApiFp = function (configuration) {
5275
5333
  *
5276
5334
  * @summary Update knowledge base
5277
5335
  * @param {string} id
5336
+ * @param {KnowledgeBaseUpdateForm} [body]
5278
5337
  * @param {*} [options] Override http request option.
5279
5338
  * @throws {RequiredError}
5280
5339
  */
5281
- update(id, options) {
5282
- const localVarFetchArgs = (0, exports.KnowledgeBasesApiFetchParamCreator)(configuration).update(id, options);
5340
+ update(id, body, options) {
5341
+ const localVarFetchArgs = (0, exports.KnowledgeBasesApiFetchParamCreator)(configuration).update(id, body, options);
5283
5342
  return (fetch = isomorphicFetch, basePath = BASE_PATH) => {
5284
5343
  return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
5285
5344
  if (response.status >= 200 && response.status < 300) {
@@ -5300,6 +5359,16 @@ exports.KnowledgeBasesApiFp = KnowledgeBasesApiFp;
5300
5359
  */
5301
5360
  const KnowledgeBasesApiFactory = function (configuration, fetch, basePath) {
5302
5361
  return {
5362
+ /**
5363
+ *
5364
+ * @summary Delete knowledge base with its files
5365
+ * @param {string} id
5366
+ * @param {*} [options] Override http request option.
5367
+ * @throws {RequiredError}
5368
+ */
5369
+ _delete(id, options) {
5370
+ return (0, exports.KnowledgeBasesApiFp)(configuration)._delete(id, options)(fetch, basePath);
5371
+ },
5303
5372
  /**
5304
5373
  *
5305
5374
  * @summary Create knowledge base
@@ -5354,11 +5423,12 @@ const KnowledgeBasesApiFactory = function (configuration, fetch, basePath) {
5354
5423
  *
5355
5424
  * @summary Update knowledge base
5356
5425
  * @param {string} id
5426
+ * @param {KnowledgeBaseUpdateForm} [body]
5357
5427
  * @param {*} [options] Override http request option.
5358
5428
  * @throws {RequiredError}
5359
5429
  */
5360
- update(id, options) {
5361
- return (0, exports.KnowledgeBasesApiFp)(configuration).update(id, options)(fetch, basePath);
5430
+ update(id, body, options) {
5431
+ return (0, exports.KnowledgeBasesApiFp)(configuration).update(id, body, options)(fetch, basePath);
5362
5432
  },
5363
5433
  };
5364
5434
  };
@@ -5370,6 +5440,17 @@ exports.KnowledgeBasesApiFactory = KnowledgeBasesApiFactory;
5370
5440
  * @extends {BaseAPI}
5371
5441
  */
5372
5442
  class KnowledgeBasesApi extends BaseAPI {
5443
+ /**
5444
+ *
5445
+ * @summary Delete knowledge base with its files
5446
+ * @param {string} id
5447
+ * @param {*} [options] Override http request option.
5448
+ * @throws {RequiredError}
5449
+ * @memberof KnowledgeBasesApi
5450
+ */
5451
+ _delete(id, options) {
5452
+ return (0, exports.KnowledgeBasesApiFp)(this.configuration)._delete(id, options)(this.fetch, this.basePath);
5453
+ }
5373
5454
  /**
5374
5455
  *
5375
5456
  * @summary Create knowledge base
@@ -5429,12 +5510,13 @@ class KnowledgeBasesApi extends BaseAPI {
5429
5510
  *
5430
5511
  * @summary Update knowledge base
5431
5512
  * @param {string} id
5513
+ * @param {KnowledgeBaseUpdateForm} [body]
5432
5514
  * @param {*} [options] Override http request option.
5433
5515
  * @throws {RequiredError}
5434
5516
  * @memberof KnowledgeBasesApi
5435
5517
  */
5436
- update(id, options) {
5437
- return (0, exports.KnowledgeBasesApiFp)(this.configuration).update(id, options)(this.fetch, this.basePath);
5518
+ update(id, body, options) {
5519
+ return (0, exports.KnowledgeBasesApiFp)(this.configuration).update(id, body, options)(this.fetch, this.basePath);
5438
5520
  }
5439
5521
  }
5440
5522
  exports.KnowledgeBasesApi = KnowledgeBasesApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@closerplatform/spinner-openapi",
3
- "version": "0.12.605",
3
+ "version": "0.12.607",
4
4
  "description": "swagger client for @closerplatform/spinner-openapi",
5
5
  "author": "Swagger Codegen Contributors",
6
6
  "keywords": [