@horpynka/api-sdk 1.0.13 → 1.0.15

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
@@ -1156,6 +1156,33 @@ var OrdersApi = class extends BaseAPI {
1156
1156
  };
1157
1157
  var ProductsApiAxiosParamCreator = function(configuration) {
1158
1158
  return {
1159
+ /**
1160
+ *
1161
+ * @param {CreateProductDto} createProductDto
1162
+ * @param {*} [options] Override http request option.
1163
+ * @throws {RequiredError}
1164
+ */
1165
+ create: async (createProductDto, options = {}) => {
1166
+ assertParamExists("create", "createProductDto", createProductDto);
1167
+ const localVarPath = `/products`;
1168
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1169
+ let baseOptions;
1170
+ if (configuration) {
1171
+ baseOptions = configuration.baseOptions;
1172
+ }
1173
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
1174
+ const localVarHeaderParameter = {};
1175
+ const localVarQueryParameter = {};
1176
+ localVarHeaderParameter["Content-Type"] = "application/json";
1177
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1178
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1179
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1180
+ localVarRequestOptions.data = serializeDataIfNeeded(createProductDto, localVarRequestOptions, configuration);
1181
+ return {
1182
+ url: toPathString(localVarUrlObj),
1183
+ options: localVarRequestOptions
1184
+ };
1185
+ },
1159
1186
  /**
1160
1187
  *
1161
1188
  * @param {*} [options] Override http request option.
@@ -1209,6 +1236,18 @@ var ProductsApiAxiosParamCreator = function(configuration) {
1209
1236
  var ProductsApiFp = function(configuration) {
1210
1237
  const localVarAxiosParamCreator = ProductsApiAxiosParamCreator(configuration);
1211
1238
  return {
1239
+ /**
1240
+ *
1241
+ * @param {CreateProductDto} createProductDto
1242
+ * @param {*} [options] Override http request option.
1243
+ * @throws {RequiredError}
1244
+ */
1245
+ async create(createProductDto, options) {
1246
+ const localVarAxiosArgs = await localVarAxiosParamCreator.create(createProductDto, options);
1247
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1248
+ const localVarOperationServerBasePath = operationServerMap["ProductsApi.create"]?.[localVarOperationServerIndex]?.url;
1249
+ return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2__default.default, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
1250
+ },
1212
1251
  /**
1213
1252
  *
1214
1253
  * @param {*} [options] Override http request option.
@@ -1235,6 +1274,16 @@ var ProductsApiFp = function(configuration) {
1235
1274
  };
1236
1275
  };
1237
1276
  var ProductsApi = class extends BaseAPI {
1277
+ /**
1278
+ *
1279
+ * @param {CreateProductDto} createProductDto
1280
+ * @param {*} [options] Override http request option.
1281
+ * @throws {RequiredError}
1282
+ * @memberof ProductsApi
1283
+ */
1284
+ create(createProductDto, options) {
1285
+ return ProductsApiFp(this.configuration).create(createProductDto, options).then((request) => request(this.axios, this.basePath));
1286
+ }
1238
1287
  /**
1239
1288
  *
1240
1289
  * @param {*} [options] Override http request option.