@arekstasko/plantcare-api-client 1.3.1 → 1.3.2
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 +20 -20
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +20 -20
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -242,8 +242,8 @@ var Client = /*#__PURE__*/ function() {
|
|
|
242
242
|
{
|
|
243
243
|
/**
|
|
244
244
|
* @return OK
|
|
245
|
-
*/ key: "
|
|
246
|
-
value: function
|
|
245
|
+
*/ key: "getDistributors",
|
|
246
|
+
value: function getDistributors(cancelToken) {
|
|
247
247
|
var _this = this;
|
|
248
248
|
var url_ = this.baseUrl + "/api/distributor";
|
|
249
249
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -262,13 +262,13 @@ var Client = /*#__PURE__*/ function() {
|
|
|
262
262
|
throw _error;
|
|
263
263
|
}
|
|
264
264
|
}).then(function(_response) {
|
|
265
|
-
return _this.
|
|
265
|
+
return _this.processGetDistributors(_response);
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
|
-
key: "
|
|
271
|
-
value: function
|
|
270
|
+
key: "processGetDistributors",
|
|
271
|
+
value: function processGetDistributors(response) {
|
|
272
272
|
var status = response.status;
|
|
273
273
|
var _headers = {};
|
|
274
274
|
if (response.headers && _type_of(response.headers) === "object") {
|
|
@@ -301,8 +301,8 @@ var Client = /*#__PURE__*/ function() {
|
|
|
301
301
|
/**
|
|
302
302
|
* @param body (optional)
|
|
303
303
|
* @return OK
|
|
304
|
-
*/ key: "
|
|
305
|
-
value: function
|
|
304
|
+
*/ key: "createDistributor",
|
|
305
|
+
value: function createDistributor(body, cancelToken) {
|
|
306
306
|
var _this = this;
|
|
307
307
|
var url_ = this.baseUrl + "/api/distributor";
|
|
308
308
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -324,13 +324,13 @@ var Client = /*#__PURE__*/ function() {
|
|
|
324
324
|
throw _error;
|
|
325
325
|
}
|
|
326
326
|
}).then(function(_response) {
|
|
327
|
-
return _this.
|
|
327
|
+
return _this.processCreateDistributor(_response);
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
330
|
},
|
|
331
331
|
{
|
|
332
|
-
key: "
|
|
333
|
-
value: function
|
|
332
|
+
key: "processCreateDistributor",
|
|
333
|
+
value: function processCreateDistributor(response) {
|
|
334
334
|
var status = response.status;
|
|
335
335
|
var _headers = {};
|
|
336
336
|
if (response.headers && _type_of(response.headers) === "object") {
|
|
@@ -362,8 +362,8 @@ var Client = /*#__PURE__*/ function() {
|
|
|
362
362
|
{
|
|
363
363
|
/**
|
|
364
364
|
* @return OK
|
|
365
|
-
*/ key: "
|
|
366
|
-
value: function
|
|
365
|
+
*/ key: "getDistributor",
|
|
366
|
+
value: function getDistributor(id, cancelToken) {
|
|
367
367
|
var _this = this;
|
|
368
368
|
var url_ = this.baseUrl + "/api/distributor/{id}";
|
|
369
369
|
if (id === void 0 || id === null) throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
@@ -384,13 +384,13 @@ var Client = /*#__PURE__*/ function() {
|
|
|
384
384
|
throw _error;
|
|
385
385
|
}
|
|
386
386
|
}).then(function(_response) {
|
|
387
|
-
return _this.
|
|
387
|
+
return _this.processGetDistributor(_response);
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
390
|
},
|
|
391
391
|
{
|
|
392
|
-
key: "
|
|
393
|
-
value: function
|
|
392
|
+
key: "processGetDistributor",
|
|
393
|
+
value: function processGetDistributor(response) {
|
|
394
394
|
var status = response.status;
|
|
395
395
|
var _headers = {};
|
|
396
396
|
if (response.headers && _type_of(response.headers) === "object") {
|
|
@@ -424,8 +424,8 @@ var Client = /*#__PURE__*/ function() {
|
|
|
424
424
|
* @param distributorIdQuery (optional)
|
|
425
425
|
* @param plantIdQuery (optional)
|
|
426
426
|
* @return OK
|
|
427
|
-
*/ key: "
|
|
428
|
-
value: function
|
|
427
|
+
*/ key: "addPlantToDistributor",
|
|
428
|
+
value: function addPlantToDistributor(distributorIdQuery, plantIdQuery, distributorIdPath, plantIdPath, cancelToken) {
|
|
429
429
|
var _this = this;
|
|
430
430
|
var url_ = this.baseUrl + "/api/distributor/{distributorId}/{plantId}/add?";
|
|
431
431
|
if (distributorIdPath === void 0 || distributorIdPath === null) throw new globalThis.Error("The parameter 'distributorIdPath' must be defined.");
|
|
@@ -452,13 +452,13 @@ var Client = /*#__PURE__*/ function() {
|
|
|
452
452
|
throw _error;
|
|
453
453
|
}
|
|
454
454
|
}).then(function(_response) {
|
|
455
|
-
return _this.
|
|
455
|
+
return _this.processAddPlantToDistributor(_response);
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
458
|
},
|
|
459
459
|
{
|
|
460
|
-
key: "
|
|
461
|
-
value: function
|
|
460
|
+
key: "processAddPlantToDistributor",
|
|
461
|
+
value: function processAddPlantToDistributor(response) {
|
|
462
462
|
var status = response.status;
|
|
463
463
|
var _headers = {};
|
|
464
464
|
if (response.headers && _type_of(response.headers) === "object") {
|
package/dist/index.d.cts
CHANGED
|
@@ -8,26 +8,26 @@ declare class Client {
|
|
|
8
8
|
/**
|
|
9
9
|
* @return OK
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
protected
|
|
11
|
+
getDistributors(cancelToken?: CancelToken): Promise<Distributor[]>;
|
|
12
|
+
protected processGetDistributors(response: AxiosResponse): Promise<Distributor[]>;
|
|
13
13
|
/**
|
|
14
14
|
* @param body (optional)
|
|
15
15
|
* @return OK
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
protected
|
|
17
|
+
createDistributor(body: CreateDistributorRequest | undefined, cancelToken?: CancelToken): Promise<boolean>;
|
|
18
|
+
protected processCreateDistributor(response: AxiosResponse): Promise<boolean>;
|
|
19
19
|
/**
|
|
20
20
|
* @return OK
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
|
-
protected
|
|
22
|
+
getDistributor(id: number, cancelToken?: CancelToken): Promise<Distributor>;
|
|
23
|
+
protected processGetDistributor(response: AxiosResponse): Promise<Distributor>;
|
|
24
24
|
/**
|
|
25
25
|
* @param distributorIdQuery (optional)
|
|
26
26
|
* @param plantIdQuery (optional)
|
|
27
27
|
* @return OK
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
protected
|
|
29
|
+
addPlantToDistributor(distributorIdQuery: number | undefined, plantIdQuery: number | undefined, distributorIdPath: string, plantIdPath: string, cancelToken?: CancelToken): Promise<boolean>;
|
|
30
|
+
protected processAddPlantToDistributor(response: AxiosResponse): Promise<boolean>;
|
|
31
31
|
/**
|
|
32
32
|
* @return OK
|
|
33
33
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -8,26 +8,26 @@ declare class Client {
|
|
|
8
8
|
/**
|
|
9
9
|
* @return OK
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
protected
|
|
11
|
+
getDistributors(cancelToken?: CancelToken): Promise<Distributor[]>;
|
|
12
|
+
protected processGetDistributors(response: AxiosResponse): Promise<Distributor[]>;
|
|
13
13
|
/**
|
|
14
14
|
* @param body (optional)
|
|
15
15
|
* @return OK
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
protected
|
|
17
|
+
createDistributor(body: CreateDistributorRequest | undefined, cancelToken?: CancelToken): Promise<boolean>;
|
|
18
|
+
protected processCreateDistributor(response: AxiosResponse): Promise<boolean>;
|
|
19
19
|
/**
|
|
20
20
|
* @return OK
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
|
-
protected
|
|
22
|
+
getDistributor(id: number, cancelToken?: CancelToken): Promise<Distributor>;
|
|
23
|
+
protected processGetDistributor(response: AxiosResponse): Promise<Distributor>;
|
|
24
24
|
/**
|
|
25
25
|
* @param distributorIdQuery (optional)
|
|
26
26
|
* @param plantIdQuery (optional)
|
|
27
27
|
* @return OK
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
protected
|
|
29
|
+
addPlantToDistributor(distributorIdQuery: number | undefined, plantIdQuery: number | undefined, distributorIdPath: string, plantIdPath: string, cancelToken?: CancelToken): Promise<boolean>;
|
|
30
|
+
protected processAddPlantToDistributor(response: AxiosResponse): Promise<boolean>;
|
|
31
31
|
/**
|
|
32
32
|
* @return OK
|
|
33
33
|
*/
|
package/dist/index.js
CHANGED
|
@@ -131,8 +131,8 @@ var Client = /*#__PURE__*/ function() {
|
|
|
131
131
|
{
|
|
132
132
|
/**
|
|
133
133
|
* @return OK
|
|
134
|
-
*/ key: "
|
|
135
|
-
value: function
|
|
134
|
+
*/ key: "getDistributors",
|
|
135
|
+
value: function getDistributors(cancelToken) {
|
|
136
136
|
var _this = this;
|
|
137
137
|
var url_ = this.baseUrl + "/api/distributor";
|
|
138
138
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -151,13 +151,13 @@ var Client = /*#__PURE__*/ function() {
|
|
|
151
151
|
throw _error;
|
|
152
152
|
}
|
|
153
153
|
}).then(function(_response) {
|
|
154
|
-
return _this.
|
|
154
|
+
return _this.processGetDistributors(_response);
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
key: "
|
|
160
|
-
value: function
|
|
159
|
+
key: "processGetDistributors",
|
|
160
|
+
value: function processGetDistributors(response) {
|
|
161
161
|
var status = response.status;
|
|
162
162
|
var _headers = {};
|
|
163
163
|
if (response.headers && _type_of(response.headers) === "object") {
|
|
@@ -190,8 +190,8 @@ var Client = /*#__PURE__*/ function() {
|
|
|
190
190
|
/**
|
|
191
191
|
* @param body (optional)
|
|
192
192
|
* @return OK
|
|
193
|
-
*/ key: "
|
|
194
|
-
value: function
|
|
193
|
+
*/ key: "createDistributor",
|
|
194
|
+
value: function createDistributor(body, cancelToken) {
|
|
195
195
|
var _this = this;
|
|
196
196
|
var url_ = this.baseUrl + "/api/distributor";
|
|
197
197
|
url_ = url_.replace(/[?&]$/, "");
|
|
@@ -213,13 +213,13 @@ var Client = /*#__PURE__*/ function() {
|
|
|
213
213
|
throw _error;
|
|
214
214
|
}
|
|
215
215
|
}).then(function(_response) {
|
|
216
|
-
return _this.
|
|
216
|
+
return _this.processCreateDistributor(_response);
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
219
|
},
|
|
220
220
|
{
|
|
221
|
-
key: "
|
|
222
|
-
value: function
|
|
221
|
+
key: "processCreateDistributor",
|
|
222
|
+
value: function processCreateDistributor(response) {
|
|
223
223
|
var status = response.status;
|
|
224
224
|
var _headers = {};
|
|
225
225
|
if (response.headers && _type_of(response.headers) === "object") {
|
|
@@ -251,8 +251,8 @@ var Client = /*#__PURE__*/ function() {
|
|
|
251
251
|
{
|
|
252
252
|
/**
|
|
253
253
|
* @return OK
|
|
254
|
-
*/ key: "
|
|
255
|
-
value: function
|
|
254
|
+
*/ key: "getDistributor",
|
|
255
|
+
value: function getDistributor(id, cancelToken) {
|
|
256
256
|
var _this = this;
|
|
257
257
|
var url_ = this.baseUrl + "/api/distributor/{id}";
|
|
258
258
|
if (id === void 0 || id === null) throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
@@ -273,13 +273,13 @@ var Client = /*#__PURE__*/ function() {
|
|
|
273
273
|
throw _error;
|
|
274
274
|
}
|
|
275
275
|
}).then(function(_response) {
|
|
276
|
-
return _this.
|
|
276
|
+
return _this.processGetDistributor(_response);
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
|
-
key: "
|
|
282
|
-
value: function
|
|
281
|
+
key: "processGetDistributor",
|
|
282
|
+
value: function processGetDistributor(response) {
|
|
283
283
|
var status = response.status;
|
|
284
284
|
var _headers = {};
|
|
285
285
|
if (response.headers && _type_of(response.headers) === "object") {
|
|
@@ -313,8 +313,8 @@ var Client = /*#__PURE__*/ function() {
|
|
|
313
313
|
* @param distributorIdQuery (optional)
|
|
314
314
|
* @param plantIdQuery (optional)
|
|
315
315
|
* @return OK
|
|
316
|
-
*/ key: "
|
|
317
|
-
value: function
|
|
316
|
+
*/ key: "addPlantToDistributor",
|
|
317
|
+
value: function addPlantToDistributor(distributorIdQuery, plantIdQuery, distributorIdPath, plantIdPath, cancelToken) {
|
|
318
318
|
var _this = this;
|
|
319
319
|
var url_ = this.baseUrl + "/api/distributor/{distributorId}/{plantId}/add?";
|
|
320
320
|
if (distributorIdPath === void 0 || distributorIdPath === null) throw new globalThis.Error("The parameter 'distributorIdPath' must be defined.");
|
|
@@ -341,13 +341,13 @@ var Client = /*#__PURE__*/ function() {
|
|
|
341
341
|
throw _error;
|
|
342
342
|
}
|
|
343
343
|
}).then(function(_response) {
|
|
344
|
-
return _this.
|
|
344
|
+
return _this.processAddPlantToDistributor(_response);
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
},
|
|
348
348
|
{
|
|
349
|
-
key: "
|
|
350
|
-
value: function
|
|
349
|
+
key: "processAddPlantToDistributor",
|
|
350
|
+
value: function processAddPlantToDistributor(response) {
|
|
351
351
|
var status = response.status;
|
|
352
352
|
var _headers = {};
|
|
353
353
|
if (response.headers && _type_of(response.headers) === "object") {
|