@arekstasko/plantcare-api-client 1.3.3 → 1.3.4
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 +6 -12
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +6 -12
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -421,21 +421,15 @@ var Client = /*#__PURE__*/ function() {
|
|
|
421
421
|
},
|
|
422
422
|
{
|
|
423
423
|
/**
|
|
424
|
-
* @param distributorIdQuery (optional)
|
|
425
|
-
* @param plantIdQuery (optional)
|
|
426
424
|
* @return OK
|
|
427
425
|
*/ key: "addPlantToDistributor",
|
|
428
|
-
value: function addPlantToDistributor(
|
|
426
|
+
value: function addPlantToDistributor(distributorId, plantId, cancelToken) {
|
|
429
427
|
var _this = this;
|
|
430
|
-
var url_ = this.baseUrl + "/api/distributor/{distributorId}/{plantId}/add
|
|
431
|
-
if (
|
|
432
|
-
url_ = url_.replace("{distributorId}", encodeURIComponent("" +
|
|
433
|
-
if (
|
|
434
|
-
url_ = url_.replace("{plantId}", encodeURIComponent("" +
|
|
435
|
-
if (distributorIdQuery === null) throw new globalThis.Error("The parameter 'distributorIdQuery' cannot be null.");
|
|
436
|
-
else if (distributorIdQuery !== void 0) url_ += "distributorId=" + encodeURIComponent("" + distributorIdQuery) + "&";
|
|
437
|
-
if (plantIdQuery === null) throw new globalThis.Error("The parameter 'plantIdQuery' cannot be null.");
|
|
438
|
-
else if (plantIdQuery !== void 0) url_ += "plantId=" + encodeURIComponent("" + plantIdQuery) + "&";
|
|
428
|
+
var url_ = this.baseUrl + "/api/distributor/{distributorId}/{plantId}/add";
|
|
429
|
+
if (distributorId === void 0 || distributorId === null) throw new globalThis.Error("The parameter 'distributorId' must be defined.");
|
|
430
|
+
url_ = url_.replace("{distributorId}", encodeURIComponent("" + distributorId));
|
|
431
|
+
if (plantId === void 0 || plantId === null) throw new globalThis.Error("The parameter 'plantId' must be defined.");
|
|
432
|
+
url_ = url_.replace("{plantId}", encodeURIComponent("" + plantId));
|
|
439
433
|
url_ = url_.replace(/[?&]$/, "");
|
|
440
434
|
var options_ = {
|
|
441
435
|
method: "POST",
|
package/dist/index.d.cts
CHANGED
|
@@ -22,11 +22,9 @@ declare class Client {
|
|
|
22
22
|
getDistributor(id: number, cancelToken?: CancelToken): Promise<Distributor>;
|
|
23
23
|
protected processGetDistributor(response: AxiosResponse): Promise<Distributor>;
|
|
24
24
|
/**
|
|
25
|
-
* @param distributorIdQuery (optional)
|
|
26
|
-
* @param plantIdQuery (optional)
|
|
27
25
|
* @return OK
|
|
28
26
|
*/
|
|
29
|
-
addPlantToDistributor(
|
|
27
|
+
addPlantToDistributor(distributorId: number, plantId: number, cancelToken?: CancelToken): Promise<boolean>;
|
|
30
28
|
protected processAddPlantToDistributor(response: AxiosResponse): Promise<boolean>;
|
|
31
29
|
/**
|
|
32
30
|
* @return OK
|
|
@@ -223,6 +221,7 @@ interface Plant {
|
|
|
223
221
|
id?: number;
|
|
224
222
|
placeId?: number;
|
|
225
223
|
moduleId?: number;
|
|
224
|
+
distributorId?: number;
|
|
226
225
|
name?: string | undefined;
|
|
227
226
|
description?: string | undefined;
|
|
228
227
|
minHumidity?: number | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -22,11 +22,9 @@ declare class Client {
|
|
|
22
22
|
getDistributor(id: number, cancelToken?: CancelToken): Promise<Distributor>;
|
|
23
23
|
protected processGetDistributor(response: AxiosResponse): Promise<Distributor>;
|
|
24
24
|
/**
|
|
25
|
-
* @param distributorIdQuery (optional)
|
|
26
|
-
* @param plantIdQuery (optional)
|
|
27
25
|
* @return OK
|
|
28
26
|
*/
|
|
29
|
-
addPlantToDistributor(
|
|
27
|
+
addPlantToDistributor(distributorId: number, plantId: number, cancelToken?: CancelToken): Promise<boolean>;
|
|
30
28
|
protected processAddPlantToDistributor(response: AxiosResponse): Promise<boolean>;
|
|
31
29
|
/**
|
|
32
30
|
* @return OK
|
|
@@ -223,6 +221,7 @@ interface Plant {
|
|
|
223
221
|
id?: number;
|
|
224
222
|
placeId?: number;
|
|
225
223
|
moduleId?: number;
|
|
224
|
+
distributorId?: number;
|
|
226
225
|
name?: string | undefined;
|
|
227
226
|
description?: string | undefined;
|
|
228
227
|
minHumidity?: number | undefined;
|
package/dist/index.js
CHANGED
|
@@ -310,21 +310,15 @@ var Client = /*#__PURE__*/ function() {
|
|
|
310
310
|
},
|
|
311
311
|
{
|
|
312
312
|
/**
|
|
313
|
-
* @param distributorIdQuery (optional)
|
|
314
|
-
* @param plantIdQuery (optional)
|
|
315
313
|
* @return OK
|
|
316
314
|
*/ key: "addPlantToDistributor",
|
|
317
|
-
value: function addPlantToDistributor(
|
|
315
|
+
value: function addPlantToDistributor(distributorId, plantId, cancelToken) {
|
|
318
316
|
var _this = this;
|
|
319
|
-
var url_ = this.baseUrl + "/api/distributor/{distributorId}/{plantId}/add
|
|
320
|
-
if (
|
|
321
|
-
url_ = url_.replace("{distributorId}", encodeURIComponent("" +
|
|
322
|
-
if (
|
|
323
|
-
url_ = url_.replace("{plantId}", encodeURIComponent("" +
|
|
324
|
-
if (distributorIdQuery === null) throw new globalThis.Error("The parameter 'distributorIdQuery' cannot be null.");
|
|
325
|
-
else if (distributorIdQuery !== void 0) url_ += "distributorId=" + encodeURIComponent("" + distributorIdQuery) + "&";
|
|
326
|
-
if (plantIdQuery === null) throw new globalThis.Error("The parameter 'plantIdQuery' cannot be null.");
|
|
327
|
-
else if (plantIdQuery !== void 0) url_ += "plantId=" + encodeURIComponent("" + plantIdQuery) + "&";
|
|
317
|
+
var url_ = this.baseUrl + "/api/distributor/{distributorId}/{plantId}/add";
|
|
318
|
+
if (distributorId === void 0 || distributorId === null) throw new globalThis.Error("The parameter 'distributorId' must be defined.");
|
|
319
|
+
url_ = url_.replace("{distributorId}", encodeURIComponent("" + distributorId));
|
|
320
|
+
if (plantId === void 0 || plantId === null) throw new globalThis.Error("The parameter 'plantId' must be defined.");
|
|
321
|
+
url_ = url_.replace("{plantId}", encodeURIComponent("" + plantId));
|
|
328
322
|
url_ = url_.replace(/[?&]$/, "");
|
|
329
323
|
var options_ = {
|
|
330
324
|
method: "POST",
|