@lcdp/api-react-rest-client 2.10.4 → 2.11.0-develop.14055817004
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/inventory/src/apis/SearchInventoryApi.d.ts +46 -1
- package/inventory/src/apis/SearchInventoryApi.js +219 -25
- package/inventory/src/models/Inventory.d.ts +6 -0
- package/inventory/src/models/Inventory.js +2 -0
- package/inventory/src/models/PaginatedUnderstockProducts.d.ts +39 -0
- package/inventory/src/models/PaginatedUnderstockProducts.js +53 -0
- package/inventory/src/models/UnderstockProduct.d.ts +44 -0
- package/inventory/src/models/UnderstockProduct.js +50 -0
- package/inventory/src/models/index.d.ts +2 -0
- package/inventory/src/models/index.js +2 -0
- package/package.json +1 -1
- package/recommendation/src/apis/SearchProductRecommendationApi.d.ts +3 -1
- package/recommendation/src/apis/SearchProductRecommendationApi.js +3 -1
- package/recommendation/src/models/ProductRecommendation.d.ts +7 -0
- package/recommendation/src/models/ProductRecommendation.js +3 -0
- package/recommendation/src/models/ProductRecommendationType.d.ts +2 -0
- package/recommendation/src/models/ProductRecommendationType.js +3 -1
- package/subscription/src/models/SubscriptionPlanFeatureId.d.ts +1 -0
- package/subscription/src/models/SubscriptionPlanFeatureId.js +2 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { Inventory, PaginatedActiveProducts, PaginatedInventories, PaginatedMisalignedProducts, PaginatedOverstockProducts, Statistics } from '../models/index';
|
|
13
|
+
import type { Inventory, PaginatedActiveProducts, PaginatedInventories, PaginatedMisalignedProducts, PaginatedOverstockProducts, PaginatedUnderstockProducts, Statistics } from '../models/index';
|
|
14
14
|
export interface GetCurrentInventoryActiveProductsRequest {
|
|
15
15
|
q?: string;
|
|
16
16
|
labEq?: Array<number>;
|
|
@@ -44,6 +44,12 @@ export interface GetCurrentInventoryStatisticsRequest {
|
|
|
44
44
|
overstockBlEq?: boolean;
|
|
45
45
|
overstockForecastGte?: number;
|
|
46
46
|
}
|
|
47
|
+
export interface GetCurrentInventoryUnderstockProductsRequest {
|
|
48
|
+
productIdEq?: Array<number>;
|
|
49
|
+
orderBy?: GetCurrentInventoryUnderstockProductsOrderByEnum;
|
|
50
|
+
p?: number;
|
|
51
|
+
pp?: number;
|
|
52
|
+
}
|
|
47
53
|
export interface GetInventoriesRequest {
|
|
48
54
|
idEq?: Array<number>;
|
|
49
55
|
p?: number;
|
|
@@ -89,6 +95,13 @@ export interface GetInventoryStatisticsRequest {
|
|
|
89
95
|
overstockBlEq?: boolean;
|
|
90
96
|
overstockForecastGte?: number;
|
|
91
97
|
}
|
|
98
|
+
export interface GetInventoryUnderstockProductsRequest {
|
|
99
|
+
inventoryId: number;
|
|
100
|
+
productIdEq?: Array<number>;
|
|
101
|
+
orderBy?: GetInventoryUnderstockProductsOrderByEnum;
|
|
102
|
+
p?: number;
|
|
103
|
+
pp?: number;
|
|
104
|
+
}
|
|
92
105
|
/**
|
|
93
106
|
*
|
|
94
107
|
*/
|
|
@@ -125,6 +138,14 @@ export declare class SearchInventoryApi extends runtime.BaseAPI {
|
|
|
125
138
|
* Get advices statistics
|
|
126
139
|
*/
|
|
127
140
|
getCurrentInventoryStatistics(requestParameters?: GetCurrentInventoryStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Statistics | runtime.BlobWithMeta>;
|
|
141
|
+
/**
|
|
142
|
+
* Get products that the pharmacian should buy
|
|
143
|
+
*/
|
|
144
|
+
getCurrentInventoryUnderstockProductsRaw(requestParameters: GetCurrentInventoryUnderstockProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedUnderstockProducts | runtime.BlobWithMeta>>;
|
|
145
|
+
/**
|
|
146
|
+
* Get products that the pharmacian should buy
|
|
147
|
+
*/
|
|
148
|
+
getCurrentInventoryUnderstockProducts(requestParameters?: GetCurrentInventoryUnderstockProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUnderstockProducts | runtime.BlobWithMeta>;
|
|
128
149
|
/**
|
|
129
150
|
* Get all inventories
|
|
130
151
|
*/
|
|
@@ -173,6 +194,14 @@ export declare class SearchInventoryApi extends runtime.BaseAPI {
|
|
|
173
194
|
* Get advices statistics
|
|
174
195
|
*/
|
|
175
196
|
getInventoryStatistics(requestParameters: GetInventoryStatisticsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Statistics | runtime.BlobWithMeta>;
|
|
197
|
+
/**
|
|
198
|
+
* Get products that the pharmacian should buy
|
|
199
|
+
*/
|
|
200
|
+
getInventoryUnderstockProductsRaw(requestParameters: GetInventoryUnderstockProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedUnderstockProducts | runtime.BlobWithMeta>>;
|
|
201
|
+
/**
|
|
202
|
+
* Get products that the pharmacian should buy
|
|
203
|
+
*/
|
|
204
|
+
getInventoryUnderstockProducts(requestParameters: GetInventoryUnderstockProductsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedUnderstockProducts | runtime.BlobWithMeta>;
|
|
176
205
|
}
|
|
177
206
|
/**
|
|
178
207
|
* @export
|
|
@@ -220,6 +249,14 @@ export declare const GetCurrentInventoryOverstockProductsOrderByEnum: {
|
|
|
220
249
|
readonly FORECAST_ASC: "FORECAST:ASC";
|
|
221
250
|
};
|
|
222
251
|
export declare type GetCurrentInventoryOverstockProductsOrderByEnum = typeof GetCurrentInventoryOverstockProductsOrderByEnum[keyof typeof GetCurrentInventoryOverstockProductsOrderByEnum];
|
|
252
|
+
/**
|
|
253
|
+
* @export
|
|
254
|
+
*/
|
|
255
|
+
export declare const GetCurrentInventoryUnderstockProductsOrderByEnum: {
|
|
256
|
+
readonly ASC: "CURRENT_UNDERSTOCK:ASC";
|
|
257
|
+
readonly DESC: "CURRENT_UNDERSTOCK:DESC";
|
|
258
|
+
};
|
|
259
|
+
export declare type GetCurrentInventoryUnderstockProductsOrderByEnum = typeof GetCurrentInventoryUnderstockProductsOrderByEnum[keyof typeof GetCurrentInventoryUnderstockProductsOrderByEnum];
|
|
223
260
|
/**
|
|
224
261
|
* @export
|
|
225
262
|
*/
|
|
@@ -264,3 +301,11 @@ export declare const GetInventoryOverstockProductsOrderByEnum: {
|
|
|
264
301
|
readonly FORECAST_ASC: "FORECAST:ASC";
|
|
265
302
|
};
|
|
266
303
|
export declare type GetInventoryOverstockProductsOrderByEnum = typeof GetInventoryOverstockProductsOrderByEnum[keyof typeof GetInventoryOverstockProductsOrderByEnum];
|
|
304
|
+
/**
|
|
305
|
+
* @export
|
|
306
|
+
*/
|
|
307
|
+
export declare const GetInventoryUnderstockProductsOrderByEnum: {
|
|
308
|
+
readonly ASC: "CURRENT_UNDERSTOCK:ASC";
|
|
309
|
+
readonly DESC: "CURRENT_UNDERSTOCK:DESC";
|
|
310
|
+
};
|
|
311
|
+
export declare type GetInventoryUnderstockProductsOrderByEnum = typeof GetInventoryUnderstockProductsOrderByEnum[keyof typeof GetInventoryUnderstockProductsOrderByEnum];
|
|
@@ -64,7 +64,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.GetInventoryOverstockProductsOrderByEnum = exports.GetInventoryMisalignedProductsOrderByEnum = exports.GetInventoryActiveProductsOrderByEnum = exports.GetCurrentInventoryOverstockProductsOrderByEnum = exports.GetCurrentInventoryMisalignedProductsOrderByEnum = exports.GetCurrentInventoryActiveProductsOrderByEnum = exports.SearchInventoryApi = void 0;
|
|
67
|
+
exports.GetInventoryUnderstockProductsOrderByEnum = exports.GetInventoryOverstockProductsOrderByEnum = exports.GetInventoryMisalignedProductsOrderByEnum = exports.GetInventoryActiveProductsOrderByEnum = exports.GetCurrentInventoryUnderstockProductsOrderByEnum = exports.GetCurrentInventoryOverstockProductsOrderByEnum = exports.GetCurrentInventoryMisalignedProductsOrderByEnum = exports.GetCurrentInventoryActiveProductsOrderByEnum = exports.SearchInventoryApi = void 0;
|
|
68
68
|
var runtime = require("../runtime");
|
|
69
69
|
var index_1 = require("../models/index");
|
|
70
70
|
/**
|
|
@@ -458,12 +458,101 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
458
458
|
});
|
|
459
459
|
});
|
|
460
460
|
};
|
|
461
|
+
/**
|
|
462
|
+
* Get products that the pharmacian should buy
|
|
463
|
+
*/
|
|
464
|
+
SearchInventoryApi.prototype.getCurrentInventoryUnderstockProductsRaw = function (requestParameters, initOverrides) {
|
|
465
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
466
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_5;
|
|
467
|
+
return __generator(this, function (_c) {
|
|
468
|
+
switch (_c.label) {
|
|
469
|
+
case 0:
|
|
470
|
+
queryParameters = {};
|
|
471
|
+
if (requestParameters['productIdEq'] != null) {
|
|
472
|
+
queryParameters['productId[eq]'] = requestParameters['productIdEq'];
|
|
473
|
+
}
|
|
474
|
+
if (requestParameters['orderBy'] != null) {
|
|
475
|
+
queryParameters['orderBy'] = requestParameters['orderBy'];
|
|
476
|
+
}
|
|
477
|
+
if (requestParameters['p'] != null) {
|
|
478
|
+
queryParameters['p'] = requestParameters['p'];
|
|
479
|
+
}
|
|
480
|
+
if (requestParameters['pp'] != null) {
|
|
481
|
+
queryParameters['pp'] = requestParameters['pp'];
|
|
482
|
+
}
|
|
483
|
+
headerParameters = {};
|
|
484
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
485
|
+
_a = headerParameters;
|
|
486
|
+
_b = "x-api-key";
|
|
487
|
+
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
488
|
+
case 1:
|
|
489
|
+
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
490
|
+
_c.label = 2;
|
|
491
|
+
case 2:
|
|
492
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
493
|
+
token = this.configuration.accessToken;
|
|
494
|
+
return [4 /*yield*/, token("bearerAuth", [])];
|
|
495
|
+
case 3:
|
|
496
|
+
tokenString = _c.sent();
|
|
497
|
+
if (tokenString) {
|
|
498
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
499
|
+
}
|
|
500
|
+
_c.label = 4;
|
|
501
|
+
case 4:
|
|
502
|
+
_c.trys.push([4, 6, , 7]);
|
|
503
|
+
return [4 /*yield*/, this.request({
|
|
504
|
+
path: "/inventories/me/understock-products",
|
|
505
|
+
method: 'GET',
|
|
506
|
+
headers: headerParameters,
|
|
507
|
+
query: queryParameters,
|
|
508
|
+
}, initOverrides)];
|
|
509
|
+
case 5:
|
|
510
|
+
response = _c.sent();
|
|
511
|
+
contentType = response.headers.get("content-type");
|
|
512
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
513
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedUnderstockProductsFromJSON)(jsonValue); })];
|
|
514
|
+
}
|
|
515
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
516
|
+
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
517
|
+
}
|
|
518
|
+
else {
|
|
519
|
+
// TODO : Better handling of others application types
|
|
520
|
+
return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
|
|
521
|
+
}
|
|
522
|
+
return [3 /*break*/, 7];
|
|
523
|
+
case 6:
|
|
524
|
+
response_5 = _c.sent();
|
|
525
|
+
console.debug(response_5);
|
|
526
|
+
throw response_5;
|
|
527
|
+
case 7: return [2 /*return*/];
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
});
|
|
531
|
+
};
|
|
532
|
+
/**
|
|
533
|
+
* Get products that the pharmacian should buy
|
|
534
|
+
*/
|
|
535
|
+
SearchInventoryApi.prototype.getCurrentInventoryUnderstockProducts = function (requestParameters, initOverrides) {
|
|
536
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
537
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
538
|
+
var response;
|
|
539
|
+
return __generator(this, function (_a) {
|
|
540
|
+
switch (_a.label) {
|
|
541
|
+
case 0: return [4 /*yield*/, this.getCurrentInventoryUnderstockProductsRaw(requestParameters, initOverrides)];
|
|
542
|
+
case 1:
|
|
543
|
+
response = _a.sent();
|
|
544
|
+
return [4 /*yield*/, response.value()];
|
|
545
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
546
|
+
}
|
|
547
|
+
});
|
|
548
|
+
});
|
|
549
|
+
};
|
|
461
550
|
/**
|
|
462
551
|
* Get all inventories
|
|
463
552
|
*/
|
|
464
553
|
SearchInventoryApi.prototype.getInventoriesRaw = function (requestParameters, initOverrides) {
|
|
465
554
|
return __awaiter(this, void 0, void 0, function () {
|
|
466
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
555
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_6;
|
|
467
556
|
return __generator(this, function (_c) {
|
|
468
557
|
switch (_c.label) {
|
|
469
558
|
case 0:
|
|
@@ -518,9 +607,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
518
607
|
}
|
|
519
608
|
return [3 /*break*/, 7];
|
|
520
609
|
case 6:
|
|
521
|
-
|
|
522
|
-
console.debug(
|
|
523
|
-
throw
|
|
610
|
+
response_6 = _c.sent();
|
|
611
|
+
console.debug(response_6);
|
|
612
|
+
throw response_6;
|
|
524
613
|
case 7: return [2 /*return*/];
|
|
525
614
|
}
|
|
526
615
|
});
|
|
@@ -549,7 +638,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
549
638
|
*/
|
|
550
639
|
SearchInventoryApi.prototype.getInventoryRaw = function (requestParameters, initOverrides) {
|
|
551
640
|
return __awaiter(this, void 0, void 0, function () {
|
|
552
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
641
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_7;
|
|
553
642
|
return __generator(this, function (_c) {
|
|
554
643
|
switch (_c.label) {
|
|
555
644
|
case 0:
|
|
@@ -598,9 +687,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
598
687
|
}
|
|
599
688
|
return [3 /*break*/, 7];
|
|
600
689
|
case 6:
|
|
601
|
-
|
|
602
|
-
console.debug(
|
|
603
|
-
throw
|
|
690
|
+
response_7 = _c.sent();
|
|
691
|
+
console.debug(response_7);
|
|
692
|
+
throw response_7;
|
|
604
693
|
case 7: return [2 /*return*/];
|
|
605
694
|
}
|
|
606
695
|
});
|
|
@@ -628,7 +717,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
628
717
|
*/
|
|
629
718
|
SearchInventoryApi.prototype.getInventoryActiveProductsRaw = function (requestParameters, initOverrides) {
|
|
630
719
|
return __awaiter(this, void 0, void 0, function () {
|
|
631
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
720
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_8;
|
|
632
721
|
return __generator(this, function (_c) {
|
|
633
722
|
switch (_c.label) {
|
|
634
723
|
case 0:
|
|
@@ -695,9 +784,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
695
784
|
}
|
|
696
785
|
return [3 /*break*/, 7];
|
|
697
786
|
case 6:
|
|
698
|
-
|
|
699
|
-
console.debug(
|
|
700
|
-
throw
|
|
787
|
+
response_8 = _c.sent();
|
|
788
|
+
console.debug(response_8);
|
|
789
|
+
throw response_8;
|
|
701
790
|
case 7: return [2 /*return*/];
|
|
702
791
|
}
|
|
703
792
|
});
|
|
@@ -725,7 +814,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
725
814
|
*/
|
|
726
815
|
SearchInventoryApi.prototype.getInventoryMisalignedProductsRaw = function (requestParameters, initOverrides) {
|
|
727
816
|
return __awaiter(this, void 0, void 0, function () {
|
|
728
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
817
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_9;
|
|
729
818
|
return __generator(this, function (_c) {
|
|
730
819
|
switch (_c.label) {
|
|
731
820
|
case 0:
|
|
@@ -792,9 +881,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
792
881
|
}
|
|
793
882
|
return [3 /*break*/, 7];
|
|
794
883
|
case 6:
|
|
795
|
-
|
|
796
|
-
console.debug(
|
|
797
|
-
throw
|
|
884
|
+
response_9 = _c.sent();
|
|
885
|
+
console.debug(response_9);
|
|
886
|
+
throw response_9;
|
|
798
887
|
case 7: return [2 /*return*/];
|
|
799
888
|
}
|
|
800
889
|
});
|
|
@@ -822,7 +911,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
822
911
|
*/
|
|
823
912
|
SearchInventoryApi.prototype.getInventoryOverstockProductsRaw = function (requestParameters, initOverrides) {
|
|
824
913
|
return __awaiter(this, void 0, void 0, function () {
|
|
825
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
914
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_10;
|
|
826
915
|
return __generator(this, function (_c) {
|
|
827
916
|
switch (_c.label) {
|
|
828
917
|
case 0:
|
|
@@ -904,9 +993,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
904
993
|
}
|
|
905
994
|
return [3 /*break*/, 7];
|
|
906
995
|
case 6:
|
|
907
|
-
|
|
908
|
-
console.debug(
|
|
909
|
-
throw
|
|
996
|
+
response_10 = _c.sent();
|
|
997
|
+
console.debug(response_10);
|
|
998
|
+
throw response_10;
|
|
910
999
|
case 7: return [2 /*return*/];
|
|
911
1000
|
}
|
|
912
1001
|
});
|
|
@@ -934,7 +1023,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
934
1023
|
*/
|
|
935
1024
|
SearchInventoryApi.prototype.getInventoryStatisticsRaw = function (requestParameters, initOverrides) {
|
|
936
1025
|
return __awaiter(this, void 0, void 0, function () {
|
|
937
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
1026
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_11;
|
|
938
1027
|
return __generator(this, function (_c) {
|
|
939
1028
|
switch (_c.label) {
|
|
940
1029
|
case 0:
|
|
@@ -989,9 +1078,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
989
1078
|
}
|
|
990
1079
|
return [3 /*break*/, 7];
|
|
991
1080
|
case 6:
|
|
992
|
-
|
|
993
|
-
console.debug(
|
|
994
|
-
throw
|
|
1081
|
+
response_11 = _c.sent();
|
|
1082
|
+
console.debug(response_11);
|
|
1083
|
+
throw response_11;
|
|
995
1084
|
case 7: return [2 /*return*/];
|
|
996
1085
|
}
|
|
997
1086
|
});
|
|
@@ -1014,6 +1103,97 @@ var SearchInventoryApi = /** @class */ (function (_super) {
|
|
|
1014
1103
|
});
|
|
1015
1104
|
});
|
|
1016
1105
|
};
|
|
1106
|
+
/**
|
|
1107
|
+
* Get products that the pharmacian should buy
|
|
1108
|
+
*/
|
|
1109
|
+
SearchInventoryApi.prototype.getInventoryUnderstockProductsRaw = function (requestParameters, initOverrides) {
|
|
1110
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1111
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_12;
|
|
1112
|
+
return __generator(this, function (_c) {
|
|
1113
|
+
switch (_c.label) {
|
|
1114
|
+
case 0:
|
|
1115
|
+
if (requestParameters['inventoryId'] == null) {
|
|
1116
|
+
throw new runtime.RequiredError('inventoryId', 'Required parameter "inventoryId" was null or undefined when calling getInventoryUnderstockProducts().');
|
|
1117
|
+
}
|
|
1118
|
+
queryParameters = {};
|
|
1119
|
+
if (requestParameters['productIdEq'] != null) {
|
|
1120
|
+
queryParameters['productId[eq]'] = requestParameters['productIdEq'];
|
|
1121
|
+
}
|
|
1122
|
+
if (requestParameters['orderBy'] != null) {
|
|
1123
|
+
queryParameters['orderBy'] = requestParameters['orderBy'];
|
|
1124
|
+
}
|
|
1125
|
+
if (requestParameters['p'] != null) {
|
|
1126
|
+
queryParameters['p'] = requestParameters['p'];
|
|
1127
|
+
}
|
|
1128
|
+
if (requestParameters['pp'] != null) {
|
|
1129
|
+
queryParameters['pp'] = requestParameters['pp'];
|
|
1130
|
+
}
|
|
1131
|
+
headerParameters = {};
|
|
1132
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1133
|
+
_a = headerParameters;
|
|
1134
|
+
_b = "x-api-key";
|
|
1135
|
+
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
1136
|
+
case 1:
|
|
1137
|
+
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
1138
|
+
_c.label = 2;
|
|
1139
|
+
case 2:
|
|
1140
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
1141
|
+
token = this.configuration.accessToken;
|
|
1142
|
+
return [4 /*yield*/, token("bearerAuth", [])];
|
|
1143
|
+
case 3:
|
|
1144
|
+
tokenString = _c.sent();
|
|
1145
|
+
if (tokenString) {
|
|
1146
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1147
|
+
}
|
|
1148
|
+
_c.label = 4;
|
|
1149
|
+
case 4:
|
|
1150
|
+
_c.trys.push([4, 6, , 7]);
|
|
1151
|
+
return [4 /*yield*/, this.request({
|
|
1152
|
+
path: "/inventories/{inventoryId}/understock-products".replace("{".concat("inventoryId", "}"), encodeURIComponent(String(requestParameters['inventoryId']))),
|
|
1153
|
+
method: 'GET',
|
|
1154
|
+
headers: headerParameters,
|
|
1155
|
+
query: queryParameters,
|
|
1156
|
+
}, initOverrides)];
|
|
1157
|
+
case 5:
|
|
1158
|
+
response = _c.sent();
|
|
1159
|
+
contentType = response.headers.get("content-type");
|
|
1160
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
1161
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedUnderstockProductsFromJSON)(jsonValue); })];
|
|
1162
|
+
}
|
|
1163
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
1164
|
+
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
1165
|
+
}
|
|
1166
|
+
else {
|
|
1167
|
+
// TODO : Better handling of others application types
|
|
1168
|
+
return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
|
|
1169
|
+
}
|
|
1170
|
+
return [3 /*break*/, 7];
|
|
1171
|
+
case 6:
|
|
1172
|
+
response_12 = _c.sent();
|
|
1173
|
+
console.debug(response_12);
|
|
1174
|
+
throw response_12;
|
|
1175
|
+
case 7: return [2 /*return*/];
|
|
1176
|
+
}
|
|
1177
|
+
});
|
|
1178
|
+
});
|
|
1179
|
+
};
|
|
1180
|
+
/**
|
|
1181
|
+
* Get products that the pharmacian should buy
|
|
1182
|
+
*/
|
|
1183
|
+
SearchInventoryApi.prototype.getInventoryUnderstockProducts = function (requestParameters, initOverrides) {
|
|
1184
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1185
|
+
var response;
|
|
1186
|
+
return __generator(this, function (_a) {
|
|
1187
|
+
switch (_a.label) {
|
|
1188
|
+
case 0: return [4 /*yield*/, this.getInventoryUnderstockProductsRaw(requestParameters, initOverrides)];
|
|
1189
|
+
case 1:
|
|
1190
|
+
response = _a.sent();
|
|
1191
|
+
return [4 /*yield*/, response.value()];
|
|
1192
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1193
|
+
}
|
|
1194
|
+
});
|
|
1195
|
+
});
|
|
1196
|
+
};
|
|
1017
1197
|
return SearchInventoryApi;
|
|
1018
1198
|
}(runtime.BaseAPI));
|
|
1019
1199
|
exports.SearchInventoryApi = SearchInventoryApi;
|
|
@@ -1060,6 +1240,13 @@ exports.GetCurrentInventoryOverstockProductsOrderByEnum = {
|
|
|
1060
1240
|
FORECAST_DESC: 'FORECAST:DESC',
|
|
1061
1241
|
FORECAST_ASC: 'FORECAST:ASC'
|
|
1062
1242
|
};
|
|
1243
|
+
/**
|
|
1244
|
+
* @export
|
|
1245
|
+
*/
|
|
1246
|
+
exports.GetCurrentInventoryUnderstockProductsOrderByEnum = {
|
|
1247
|
+
ASC: 'CURRENT_UNDERSTOCK:ASC',
|
|
1248
|
+
DESC: 'CURRENT_UNDERSTOCK:DESC'
|
|
1249
|
+
};
|
|
1063
1250
|
/**
|
|
1064
1251
|
* @export
|
|
1065
1252
|
*/
|
|
@@ -1101,3 +1288,10 @@ exports.GetInventoryOverstockProductsOrderByEnum = {
|
|
|
1101
1288
|
FORECAST_DESC: 'FORECAST:DESC',
|
|
1102
1289
|
FORECAST_ASC: 'FORECAST:ASC'
|
|
1103
1290
|
};
|
|
1291
|
+
/**
|
|
1292
|
+
* @export
|
|
1293
|
+
*/
|
|
1294
|
+
exports.GetInventoryUnderstockProductsOrderByEnum = {
|
|
1295
|
+
ASC: 'CURRENT_UNDERSTOCK:ASC',
|
|
1296
|
+
DESC: 'CURRENT_UNDERSTOCK:DESC'
|
|
1297
|
+
};
|
|
@@ -37,6 +37,7 @@ function InventoryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
37
|
'activeProducts': (json['activeProducts'] === null || json['activeProducts'] === undefined) ? json['activeProducts'] : (0, HttpLink_1.HttpLinkFromJSON)(json['activeProducts']),
|
|
38
38
|
'overstockProducts': (json['overstockProducts'] === null || json['overstockProducts'] === undefined) ? json['overstockProducts'] : (0, HttpLink_1.HttpLinkFromJSON)(json['overstockProducts']),
|
|
39
39
|
'misalignedProducts': (json['misalignedProducts'] === null || json['misalignedProducts'] === undefined) ? json['misalignedProducts'] : (0, HttpLink_1.HttpLinkFromJSON)(json['misalignedProducts']),
|
|
40
|
+
'understockProducts': (json['understockProducts'] === null || json['understockProducts'] === undefined) ? json['understockProducts'] : (0, HttpLink_1.HttpLinkFromJSON)(json['understockProducts']),
|
|
40
41
|
'journal': (json['journal'] === null || json['journal'] === undefined) ? json['journal'] : (0, InventoryJournal_1.InventoryJournalFromJSON)(json['journal']),
|
|
41
42
|
};
|
|
42
43
|
}
|
|
@@ -51,6 +52,7 @@ function InventoryToJSON(value) {
|
|
|
51
52
|
'activeProducts': (0, HttpLink_1.HttpLinkToJSON)(value['activeProducts']),
|
|
52
53
|
'overstockProducts': (0, HttpLink_1.HttpLinkToJSON)(value['overstockProducts']),
|
|
53
54
|
'misalignedProducts': (0, HttpLink_1.HttpLinkToJSON)(value['misalignedProducts']),
|
|
55
|
+
'understockProducts': (0, HttpLink_1.HttpLinkToJSON)(value['understockProducts']),
|
|
54
56
|
'journal': (0, InventoryJournal_1.InventoryJournalToJSON)(value['journal']),
|
|
55
57
|
};
|
|
56
58
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-pharmaide-service
|
|
3
|
+
* This is the REST API of LCDP products
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { PagingMetadata } from './PagingMetadata';
|
|
13
|
+
import type { UnderstockProduct } from './UnderstockProduct';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface PaginatedUnderstockProducts
|
|
18
|
+
*/
|
|
19
|
+
export interface PaginatedUnderstockProducts {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {PagingMetadata}
|
|
23
|
+
* @memberof PaginatedUnderstockProducts
|
|
24
|
+
*/
|
|
25
|
+
metadata: PagingMetadata;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {Array<UnderstockProduct>}
|
|
29
|
+
* @memberof PaginatedUnderstockProducts
|
|
30
|
+
*/
|
|
31
|
+
records: Array<UnderstockProduct>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the PaginatedUnderstockProducts interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfPaginatedUnderstockProducts(value: object): value is PaginatedUnderstockProducts;
|
|
37
|
+
export declare function PaginatedUnderstockProductsFromJSON(json: any): PaginatedUnderstockProducts;
|
|
38
|
+
export declare function PaginatedUnderstockProductsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUnderstockProducts;
|
|
39
|
+
export declare function PaginatedUnderstockProductsToJSON(value?: PaginatedUnderstockProducts | null): any;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-pharmaide-service
|
|
6
|
+
* This is the REST API of LCDP products
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.PaginatedUnderstockProductsToJSON = exports.PaginatedUnderstockProductsFromJSONTyped = exports.PaginatedUnderstockProductsFromJSON = exports.instanceOfPaginatedUnderstockProducts = void 0;
|
|
17
|
+
var PagingMetadata_1 = require("./PagingMetadata");
|
|
18
|
+
var UnderstockProduct_1 = require("./UnderstockProduct");
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the PaginatedUnderstockProducts interface.
|
|
21
|
+
*/
|
|
22
|
+
function instanceOfPaginatedUnderstockProducts(value) {
|
|
23
|
+
if (!('metadata' in value) || value['metadata'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('records' in value) || value['records'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
exports.instanceOfPaginatedUnderstockProducts = instanceOfPaginatedUnderstockProducts;
|
|
30
|
+
function PaginatedUnderstockProductsFromJSON(json) {
|
|
31
|
+
return PaginatedUnderstockProductsFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
exports.PaginatedUnderstockProductsFromJSON = PaginatedUnderstockProductsFromJSON;
|
|
34
|
+
function PaginatedUnderstockProductsFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'metadata': (json['metadata'] === null || json['metadata'] === undefined) ? json['metadata'] : (0, PagingMetadata_1.PagingMetadataFromJSON)(json['metadata']),
|
|
40
|
+
'records': (json['records'] === null || json['records'] === undefined) ? json['records'] : json['records'].map(UnderstockProduct_1.UnderstockProductFromJSON),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
exports.PaginatedUnderstockProductsFromJSONTyped = PaginatedUnderstockProductsFromJSONTyped;
|
|
44
|
+
function PaginatedUnderstockProductsToJSON(value) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'metadata': (0, PagingMetadata_1.PagingMetadataToJSON)(value['metadata']),
|
|
50
|
+
'records': (value['records'] === null || value['records'] === undefined) ? value['records'] : value['records'].map(UnderstockProduct_1.UnderstockProductToJSON),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.PaginatedUnderstockProductsToJSON = PaginatedUnderstockProductsToJSON;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-pharmaide-service
|
|
3
|
+
* This is the REST API of LCDP products
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ProductLink } from './ProductLink';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UnderstockProduct
|
|
17
|
+
*/
|
|
18
|
+
export interface UnderstockProduct {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {ProductLink}
|
|
22
|
+
* @memberof UnderstockProduct
|
|
23
|
+
*/
|
|
24
|
+
product?: ProductLink;
|
|
25
|
+
/**
|
|
26
|
+
* Quantity of product currently available in user stock
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof UnderstockProduct
|
|
29
|
+
*/
|
|
30
|
+
currentStock?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Stock the user should buy
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof UnderstockProduct
|
|
35
|
+
*/
|
|
36
|
+
currentUnderstock?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the UnderstockProduct interface.
|
|
40
|
+
*/
|
|
41
|
+
export declare function instanceOfUnderstockProduct(value: object): value is UnderstockProduct;
|
|
42
|
+
export declare function UnderstockProductFromJSON(json: any): UnderstockProduct;
|
|
43
|
+
export declare function UnderstockProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnderstockProduct;
|
|
44
|
+
export declare function UnderstockProductToJSON(value?: UnderstockProduct | null): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-pharmaide-service
|
|
6
|
+
* This is the REST API of LCDP products
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UnderstockProductToJSON = exports.UnderstockProductFromJSONTyped = exports.UnderstockProductFromJSON = exports.instanceOfUnderstockProduct = void 0;
|
|
17
|
+
var ProductLink_1 = require("./ProductLink");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the UnderstockProduct interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfUnderstockProduct(value) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
exports.instanceOfUnderstockProduct = instanceOfUnderstockProduct;
|
|
25
|
+
function UnderstockProductFromJSON(json) {
|
|
26
|
+
return UnderstockProductFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
exports.UnderstockProductFromJSON = UnderstockProductFromJSON;
|
|
29
|
+
function UnderstockProductFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
|
+
if (json == null) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'product': (json['product'] === null || json['product'] === undefined) ? json['product'] : (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
|
|
35
|
+
'currentStock': json['currentStock'],
|
|
36
|
+
'currentUnderstock': json['currentUnderstock'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.UnderstockProductFromJSONTyped = UnderstockProductFromJSONTyped;
|
|
40
|
+
function UnderstockProductToJSON(value) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'product': (0, ProductLink_1.ProductLinkToJSON)(value['product']),
|
|
46
|
+
'currentStock': value['currentStock'],
|
|
47
|
+
'currentUnderstock': value['currentUnderstock'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.UnderstockProductToJSON = UnderstockProductToJSON;
|
|
@@ -12,6 +12,7 @@ export * from './PaginatedInventories';
|
|
|
12
12
|
export * from './PaginatedMisalignedProducts';
|
|
13
13
|
export * from './PaginatedObject';
|
|
14
14
|
export * from './PaginatedOverstockProducts';
|
|
15
|
+
export * from './PaginatedUnderstockProducts';
|
|
15
16
|
export * from './PagingMetadata';
|
|
16
17
|
export * from './ProductLink';
|
|
17
18
|
export * from './RestError';
|
|
@@ -20,3 +21,4 @@ export * from './StatisticsActiveProducts';
|
|
|
20
21
|
export * from './StatisticsMisalignedProducts';
|
|
21
22
|
export * from './StatisticsOverstockProducts';
|
|
22
23
|
export * from './SynchronizationMode';
|
|
24
|
+
export * from './UnderstockProduct';
|
|
@@ -30,6 +30,7 @@ __exportStar(require("./PaginatedInventories"), exports);
|
|
|
30
30
|
__exportStar(require("./PaginatedMisalignedProducts"), exports);
|
|
31
31
|
__exportStar(require("./PaginatedObject"), exports);
|
|
32
32
|
__exportStar(require("./PaginatedOverstockProducts"), exports);
|
|
33
|
+
__exportStar(require("./PaginatedUnderstockProducts"), exports);
|
|
33
34
|
__exportStar(require("./PagingMetadata"), exports);
|
|
34
35
|
__exportStar(require("./ProductLink"), exports);
|
|
35
36
|
__exportStar(require("./RestError"), exports);
|
|
@@ -38,3 +39,4 @@ __exportStar(require("./StatisticsActiveProducts"), exports);
|
|
|
38
39
|
__exportStar(require("./StatisticsMisalignedProducts"), exports);
|
|
39
40
|
__exportStar(require("./StatisticsOverstockProducts"), exports);
|
|
40
41
|
__exportStar(require("./SynchronizationMode"), exports);
|
|
42
|
+
__exportStar(require("./UnderstockProduct"), exports);
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
13
|
import type { PaginatedProductRecommendations, ProductRecommendationType } from '../models/index';
|
|
14
14
|
export interface GetProductRecommendationsRequest {
|
|
15
|
-
typeEq: ProductRecommendationType
|
|
15
|
+
typeEq: Array<ProductRecommendationType>;
|
|
16
16
|
userIdEq?: number;
|
|
17
17
|
userIdPr?: boolean;
|
|
18
18
|
orderBy?: Array<GetProductRecommendationsOrderByEnum>;
|
|
@@ -40,5 +40,7 @@ export declare const GetProductRecommendationsOrderByEnum: {
|
|
|
40
40
|
readonly RELEVANCE_DESC: "RELEVANCE:desc";
|
|
41
41
|
readonly CREATED_AT_ASC: "CREATED_AT:asc";
|
|
42
42
|
readonly CREATED_AT_DESC: "CREATED_AT:desc";
|
|
43
|
+
readonly TYPE_ASC: "TYPE:asc";
|
|
44
|
+
readonly TYPE_DESC: "TYPE:desc";
|
|
43
45
|
};
|
|
44
46
|
export declare type GetProductRecommendationsOrderByEnum = typeof GetProductRecommendationsOrderByEnum[keyof typeof GetProductRecommendationsOrderByEnum];
|
|
@@ -182,5 +182,7 @@ exports.GetProductRecommendationsOrderByEnum = {
|
|
|
182
182
|
RELEVANCE_ASC: 'RELEVANCE:asc',
|
|
183
183
|
RELEVANCE_DESC: 'RELEVANCE:desc',
|
|
184
184
|
CREATED_AT_ASC: 'CREATED_AT:asc',
|
|
185
|
-
CREATED_AT_DESC: 'CREATED_AT:desc'
|
|
185
|
+
CREATED_AT_DESC: 'CREATED_AT:desc',
|
|
186
|
+
TYPE_ASC: 'TYPE:asc',
|
|
187
|
+
TYPE_DESC: 'TYPE:desc'
|
|
186
188
|
};
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { UserLink } from './UserLink';
|
|
13
13
|
import type { ProductLink } from './ProductLink';
|
|
14
|
+
import type { ProductRecommendationType } from './ProductRecommendationType';
|
|
14
15
|
/**
|
|
15
16
|
* If user is null : the recommendation is a default recommendation
|
|
16
17
|
* if user is not null : the recommendation is personnalized for the user
|
|
@@ -37,6 +38,12 @@ export interface ProductRecommendation {
|
|
|
37
38
|
* @memberof ProductRecommendation
|
|
38
39
|
*/
|
|
39
40
|
product: ProductLink;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {ProductRecommendationType}
|
|
44
|
+
* @memberof ProductRecommendation
|
|
45
|
+
*/
|
|
46
|
+
type?: ProductRecommendationType;
|
|
40
47
|
/**
|
|
41
48
|
* A number between 0 and 1 who determine how much relevant the recommendation is.
|
|
42
49
|
* 1 : Best recommendation
|
|
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.ProductRecommendationToJSON = exports.ProductRecommendationFromJSONTyped = exports.ProductRecommendationFromJSON = exports.instanceOfProductRecommendation = void 0;
|
|
17
17
|
var UserLink_1 = require("./UserLink");
|
|
18
18
|
var ProductLink_1 = require("./ProductLink");
|
|
19
|
+
var ProductRecommendationType_1 = require("./ProductRecommendationType");
|
|
19
20
|
/**
|
|
20
21
|
* Check if a given object implements the ProductRecommendation interface.
|
|
21
22
|
*/
|
|
@@ -39,6 +40,7 @@ function ProductRecommendationFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
39
40
|
'id': json['id'],
|
|
40
41
|
'user': (json['user'] === null || json['user'] === undefined) ? json['user'] : (0, UserLink_1.UserLinkFromJSON)(json['user']),
|
|
41
42
|
'product': (json['product'] === null || json['product'] === undefined) ? json['product'] : (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
|
|
43
|
+
'type': (json['type'] === null || json['type'] === undefined) ? json['type'] : (0, ProductRecommendationType_1.ProductRecommendationTypeFromJSON)(json['type']),
|
|
42
44
|
'score': json['score'],
|
|
43
45
|
'createdAt': (json['createdAt'] === null || json['createdAt'] === undefined) ? json['createdAt'] : new Date(json['createdAt']),
|
|
44
46
|
};
|
|
@@ -52,6 +54,7 @@ function ProductRecommendationToJSON(value) {
|
|
|
52
54
|
'id': value['id'],
|
|
53
55
|
'user': (0, UserLink_1.UserLinkToJSON)(value['user']),
|
|
54
56
|
'product': (0, ProductLink_1.ProductLinkToJSON)(value['product']),
|
|
57
|
+
'type': (0, ProductRecommendationType_1.ProductRecommendationTypeToJSON)(value['type']),
|
|
55
58
|
'score': value['score'],
|
|
56
59
|
'createdAt': (value['createdAt'] === null || value['createdAt'] === undefined) ? value['createdAt'] : (value['createdAt']).toISOString(),
|
|
57
60
|
};
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* - BUYING_HISTORY : Based on user buying history
|
|
14
14
|
* - BUYING_SIMILARITY : Based on similarity with other user purchases
|
|
15
15
|
* - SELLING_SIMILARITY : Based on similarity with other user sales
|
|
16
|
+
* - BUYING_UNDERSTOCK : Based on the needs of products to be bought by a user
|
|
16
17
|
*
|
|
17
18
|
* @export
|
|
18
19
|
*/
|
|
@@ -20,6 +21,7 @@ export declare const ProductRecommendationType: {
|
|
|
20
21
|
readonly BUYING_HISTORY: "BUYING_HISTORY";
|
|
21
22
|
readonly SELLING_SIMILARITY: "SELLING_SIMILARITY";
|
|
22
23
|
readonly BUYING_SIMILARITY: "BUYING_SIMILARITY";
|
|
24
|
+
readonly BUYING_UNDERSTOCK: "BUYING_UNDERSTOCK";
|
|
23
25
|
};
|
|
24
26
|
export declare type ProductRecommendationType = typeof ProductRecommendationType[keyof typeof ProductRecommendationType];
|
|
25
27
|
export declare function instanceOfProductRecommendationType(value: any): boolean;
|
|
@@ -18,13 +18,15 @@ exports.ProductRecommendationTypeToJSON = exports.ProductRecommendationTypeFromJ
|
|
|
18
18
|
* - BUYING_HISTORY : Based on user buying history
|
|
19
19
|
* - BUYING_SIMILARITY : Based on similarity with other user purchases
|
|
20
20
|
* - SELLING_SIMILARITY : Based on similarity with other user sales
|
|
21
|
+
* - BUYING_UNDERSTOCK : Based on the needs of products to be bought by a user
|
|
21
22
|
*
|
|
22
23
|
* @export
|
|
23
24
|
*/
|
|
24
25
|
exports.ProductRecommendationType = {
|
|
25
26
|
BUYING_HISTORY: 'BUYING_HISTORY',
|
|
26
27
|
SELLING_SIMILARITY: 'SELLING_SIMILARITY',
|
|
27
|
-
BUYING_SIMILARITY: 'BUYING_SIMILARITY'
|
|
28
|
+
BUYING_SIMILARITY: 'BUYING_SIMILARITY',
|
|
29
|
+
BUYING_UNDERSTOCK: 'BUYING_UNDERSTOCK'
|
|
28
30
|
};
|
|
29
31
|
function instanceOfProductRecommendationType(value) {
|
|
30
32
|
for (var key in exports.ProductRecommendationType) {
|
|
@@ -17,6 +17,7 @@ export declare const SubscriptionPlanFeatureId: {
|
|
|
17
17
|
readonly UPDATE: "UPDATE";
|
|
18
18
|
readonly BUY: "BUY";
|
|
19
19
|
readonly SELL: "SELL";
|
|
20
|
+
readonly UNDERSTOCK: "UNDERSTOCK";
|
|
20
21
|
};
|
|
21
22
|
export declare type SubscriptionPlanFeatureId = typeof SubscriptionPlanFeatureId[keyof typeof SubscriptionPlanFeatureId];
|
|
22
23
|
export declare function instanceOfSubscriptionPlanFeatureId(value: any): boolean;
|
|
@@ -21,7 +21,8 @@ exports.SubscriptionPlanFeatureIdToJSON = exports.SubscriptionPlanFeatureIdFromJ
|
|
|
21
21
|
exports.SubscriptionPlanFeatureId = {
|
|
22
22
|
UPDATE: 'UPDATE',
|
|
23
23
|
BUY: 'BUY',
|
|
24
|
-
SELL: 'SELL'
|
|
24
|
+
SELL: 'SELL',
|
|
25
|
+
UNDERSTOCK: 'UNDERSTOCK'
|
|
25
26
|
};
|
|
26
27
|
function instanceOfSubscriptionPlanFeatureId(value) {
|
|
27
28
|
for (var key in exports.SubscriptionPlanFeatureId) {
|