@horpynka/api-sdk 1.0.11 → 1.0.12

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/index.cjs CHANGED
@@ -297,6 +297,31 @@ var CategoriesApiAxiosParamCreator = function(configuration) {
297
297
  url: toPathString(localVarUrlObj),
298
298
  options: localVarRequestOptions
299
299
  };
300
+ },
301
+ /**
302
+ *
303
+ * @param {number} id
304
+ * @param {*} [options] Override http request option.
305
+ * @throws {RequiredError}
306
+ */
307
+ findOne: async (id, options = {}) => {
308
+ assertParamExists("findOne", "id", id);
309
+ const localVarPath = `/categories/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
310
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
311
+ let baseOptions;
312
+ if (configuration) {
313
+ baseOptions = configuration.baseOptions;
314
+ }
315
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
316
+ const localVarHeaderParameter = {};
317
+ const localVarQueryParameter = {};
318
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
319
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
320
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
321
+ return {
322
+ url: toPathString(localVarUrlObj),
323
+ options: localVarRequestOptions
324
+ };
300
325
  }
301
326
  };
302
327
  };
@@ -313,6 +338,18 @@ var CategoriesApiFp = function(configuration) {
313
338
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
314
339
  const localVarOperationServerBasePath = operationServerMap["CategoriesApi.findAll"]?.[localVarOperationServerIndex]?.url;
315
340
  return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
341
+ },
342
+ /**
343
+ *
344
+ * @param {number} id
345
+ * @param {*} [options] Override http request option.
346
+ * @throws {RequiredError}
347
+ */
348
+ async findOne(id, options) {
349
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
350
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
351
+ const localVarOperationServerBasePath = operationServerMap["CategoriesApi.findOne"]?.[localVarOperationServerIndex]?.url;
352
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
316
353
  }
317
354
  };
318
355
  };
@@ -326,6 +363,16 @@ var CategoriesApi = class extends BaseAPI {
326
363
  findAll(options) {
327
364
  return CategoriesApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
328
365
  }
366
+ /**
367
+ *
368
+ * @param {number} id
369
+ * @param {*} [options] Override http request option.
370
+ * @throws {RequiredError}
371
+ * @memberof CategoriesApi
372
+ */
373
+ findOne(id, options) {
374
+ return CategoriesApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
375
+ }
329
376
  };
330
377
  var DishesApiAxiosParamCreator = function(configuration) {
331
378
  return {
@@ -720,6 +767,31 @@ var ProductsApiAxiosParamCreator = function(configuration) {
720
767
  url: toPathString(localVarUrlObj),
721
768
  options: localVarRequestOptions
722
769
  };
770
+ },
771
+ /**
772
+ *
773
+ * @param {number} id
774
+ * @param {*} [options] Override http request option.
775
+ * @throws {RequiredError}
776
+ */
777
+ findOne: async (id, options = {}) => {
778
+ assertParamExists("findOne", "id", id);
779
+ const localVarPath = `/products/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
780
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
781
+ let baseOptions;
782
+ if (configuration) {
783
+ baseOptions = configuration.baseOptions;
784
+ }
785
+ const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
786
+ const localVarHeaderParameter = {};
787
+ const localVarQueryParameter = {};
788
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
789
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
790
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
791
+ return {
792
+ url: toPathString(localVarUrlObj),
793
+ options: localVarRequestOptions
794
+ };
723
795
  }
724
796
  };
725
797
  };
@@ -736,6 +808,18 @@ var ProductsApiFp = function(configuration) {
736
808
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
737
809
  const localVarOperationServerBasePath = operationServerMap["ProductsApi.findAll"]?.[localVarOperationServerIndex]?.url;
738
810
  return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
811
+ },
812
+ /**
813
+ *
814
+ * @param {number} id
815
+ * @param {*} [options] Override http request option.
816
+ * @throws {RequiredError}
817
+ */
818
+ async findOne(id, options) {
819
+ const localVarAxiosArgs = await localVarAxiosParamCreator.findOne(id, options);
820
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
821
+ const localVarOperationServerBasePath = operationServerMap["ProductsApi.findOne"]?.[localVarOperationServerIndex]?.url;
822
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
739
823
  }
740
824
  };
741
825
  };
@@ -749,6 +833,16 @@ var ProductsApi = class extends BaseAPI {
749
833
  findAll(options) {
750
834
  return ProductsApiFp(this.configuration).findAll(options).then((request) => request(this.axios, this.basePath));
751
835
  }
836
+ /**
837
+ *
838
+ * @param {number} id
839
+ * @param {*} [options] Override http request option.
840
+ * @throws {RequiredError}
841
+ * @memberof ProductsApi
842
+ */
843
+ findOne(id, options) {
844
+ return ProductsApiFp(this.configuration).findOne(id, options).then((request) => request(this.axios, this.basePath));
845
+ }
752
846
  };
753
847
 
754
848
  // src/api/generated/configuration.ts