@lcdp/api-react-rest-client 2.10.4-impl-controller.13972521484 → 2.10.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.
@@ -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, PaginatedUnderstockProducts, Statistics } from '../models/index';
13
+ import type { Inventory, PaginatedActiveProducts, PaginatedInventories, PaginatedMisalignedProducts, PaginatedOverstockProducts, Statistics } from '../models/index';
14
14
  export interface GetCurrentInventoryActiveProductsRequest {
15
15
  q?: string;
16
16
  labEq?: Array<number>;
@@ -44,12 +44,6 @@ 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
- }
53
47
  export interface GetInventoriesRequest {
54
48
  idEq?: Array<number>;
55
49
  p?: number;
@@ -95,13 +89,6 @@ export interface GetInventoryStatisticsRequest {
95
89
  overstockBlEq?: boolean;
96
90
  overstockForecastGte?: number;
97
91
  }
98
- export interface GetInventoryUnderstockProductsRequest {
99
- inventoryId: number;
100
- productIdEq?: Array<number>;
101
- orderBy?: GetInventoryUnderstockProductsOrderByEnum;
102
- p?: number;
103
- pp?: number;
104
- }
105
92
  /**
106
93
  *
107
94
  */
@@ -138,14 +125,6 @@ export declare class SearchInventoryApi extends runtime.BaseAPI {
138
125
  * Get advices statistics
139
126
  */
140
127
  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>;
149
128
  /**
150
129
  * Get all inventories
151
130
  */
@@ -194,14 +173,6 @@ export declare class SearchInventoryApi extends runtime.BaseAPI {
194
173
  * Get advices statistics
195
174
  */
196
175
  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>;
205
176
  }
206
177
  /**
207
178
  * @export
@@ -249,14 +220,6 @@ export declare const GetCurrentInventoryOverstockProductsOrderByEnum: {
249
220
  readonly FORECAST_ASC: "FORECAST:ASC";
250
221
  };
251
222
  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];
260
223
  /**
261
224
  * @export
262
225
  */
@@ -301,11 +264,3 @@ export declare const GetInventoryOverstockProductsOrderByEnum: {
301
264
  readonly FORECAST_ASC: "FORECAST:ASC";
302
265
  };
303
266
  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.GetInventoryUnderstockProductsOrderByEnum = exports.GetInventoryOverstockProductsOrderByEnum = exports.GetInventoryMisalignedProductsOrderByEnum = exports.GetInventoryActiveProductsOrderByEnum = exports.GetCurrentInventoryUnderstockProductsOrderByEnum = exports.GetCurrentInventoryOverstockProductsOrderByEnum = exports.GetCurrentInventoryMisalignedProductsOrderByEnum = exports.GetCurrentInventoryActiveProductsOrderByEnum = exports.SearchInventoryApi = void 0;
67
+ exports.GetInventoryOverstockProductsOrderByEnum = exports.GetInventoryMisalignedProductsOrderByEnum = exports.GetInventoryActiveProductsOrderByEnum = 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,101 +458,12 @@ 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
- };
550
461
  /**
551
462
  * Get all inventories
552
463
  */
553
464
  SearchInventoryApi.prototype.getInventoriesRaw = function (requestParameters, initOverrides) {
554
465
  return __awaiter(this, void 0, void 0, function () {
555
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_6;
466
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_5;
556
467
  return __generator(this, function (_c) {
557
468
  switch (_c.label) {
558
469
  case 0:
@@ -607,9 +518,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
607
518
  }
608
519
  return [3 /*break*/, 7];
609
520
  case 6:
610
- response_6 = _c.sent();
611
- console.debug(response_6);
612
- throw response_6;
521
+ response_5 = _c.sent();
522
+ console.debug(response_5);
523
+ throw response_5;
613
524
  case 7: return [2 /*return*/];
614
525
  }
615
526
  });
@@ -638,7 +549,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
638
549
  */
639
550
  SearchInventoryApi.prototype.getInventoryRaw = function (requestParameters, initOverrides) {
640
551
  return __awaiter(this, void 0, void 0, function () {
641
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_7;
552
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_6;
642
553
  return __generator(this, function (_c) {
643
554
  switch (_c.label) {
644
555
  case 0:
@@ -687,9 +598,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
687
598
  }
688
599
  return [3 /*break*/, 7];
689
600
  case 6:
690
- response_7 = _c.sent();
691
- console.debug(response_7);
692
- throw response_7;
601
+ response_6 = _c.sent();
602
+ console.debug(response_6);
603
+ throw response_6;
693
604
  case 7: return [2 /*return*/];
694
605
  }
695
606
  });
@@ -717,7 +628,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
717
628
  */
718
629
  SearchInventoryApi.prototype.getInventoryActiveProductsRaw = function (requestParameters, initOverrides) {
719
630
  return __awaiter(this, void 0, void 0, function () {
720
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_8;
631
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_7;
721
632
  return __generator(this, function (_c) {
722
633
  switch (_c.label) {
723
634
  case 0:
@@ -784,9 +695,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
784
695
  }
785
696
  return [3 /*break*/, 7];
786
697
  case 6:
787
- response_8 = _c.sent();
788
- console.debug(response_8);
789
- throw response_8;
698
+ response_7 = _c.sent();
699
+ console.debug(response_7);
700
+ throw response_7;
790
701
  case 7: return [2 /*return*/];
791
702
  }
792
703
  });
@@ -814,7 +725,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
814
725
  */
815
726
  SearchInventoryApi.prototype.getInventoryMisalignedProductsRaw = function (requestParameters, initOverrides) {
816
727
  return __awaiter(this, void 0, void 0, function () {
817
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_9;
728
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_8;
818
729
  return __generator(this, function (_c) {
819
730
  switch (_c.label) {
820
731
  case 0:
@@ -881,9 +792,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
881
792
  }
882
793
  return [3 /*break*/, 7];
883
794
  case 6:
884
- response_9 = _c.sent();
885
- console.debug(response_9);
886
- throw response_9;
795
+ response_8 = _c.sent();
796
+ console.debug(response_8);
797
+ throw response_8;
887
798
  case 7: return [2 /*return*/];
888
799
  }
889
800
  });
@@ -911,7 +822,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
911
822
  */
912
823
  SearchInventoryApi.prototype.getInventoryOverstockProductsRaw = function (requestParameters, initOverrides) {
913
824
  return __awaiter(this, void 0, void 0, function () {
914
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_10;
825
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_9;
915
826
  return __generator(this, function (_c) {
916
827
  switch (_c.label) {
917
828
  case 0:
@@ -993,9 +904,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
993
904
  }
994
905
  return [3 /*break*/, 7];
995
906
  case 6:
996
- response_10 = _c.sent();
997
- console.debug(response_10);
998
- throw response_10;
907
+ response_9 = _c.sent();
908
+ console.debug(response_9);
909
+ throw response_9;
999
910
  case 7: return [2 /*return*/];
1000
911
  }
1001
912
  });
@@ -1023,7 +934,7 @@ var SearchInventoryApi = /** @class */ (function (_super) {
1023
934
  */
1024
935
  SearchInventoryApi.prototype.getInventoryStatisticsRaw = function (requestParameters, initOverrides) {
1025
936
  return __awaiter(this, void 0, void 0, function () {
1026
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_11;
937
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_10;
1027
938
  return __generator(this, function (_c) {
1028
939
  switch (_c.label) {
1029
940
  case 0:
@@ -1078,9 +989,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
1078
989
  }
1079
990
  return [3 /*break*/, 7];
1080
991
  case 6:
1081
- response_11 = _c.sent();
1082
- console.debug(response_11);
1083
- throw response_11;
992
+ response_10 = _c.sent();
993
+ console.debug(response_10);
994
+ throw response_10;
1084
995
  case 7: return [2 /*return*/];
1085
996
  }
1086
997
  });
@@ -1103,97 +1014,6 @@ var SearchInventoryApi = /** @class */ (function (_super) {
1103
1014
  });
1104
1015
  });
1105
1016
  };
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
- };
1197
1017
  return SearchInventoryApi;
1198
1018
  }(runtime.BaseAPI));
1199
1019
  exports.SearchInventoryApi = SearchInventoryApi;
@@ -1240,13 +1060,6 @@ exports.GetCurrentInventoryOverstockProductsOrderByEnum = {
1240
1060
  FORECAST_DESC: 'FORECAST:DESC',
1241
1061
  FORECAST_ASC: 'FORECAST:ASC'
1242
1062
  };
1243
- /**
1244
- * @export
1245
- */
1246
- exports.GetCurrentInventoryUnderstockProductsOrderByEnum = {
1247
- ASC: 'CURRENT_UNDERSTOCK:ASC',
1248
- DESC: 'CURRENT_UNDERSTOCK:DESC'
1249
- };
1250
1063
  /**
1251
1064
  * @export
1252
1065
  */
@@ -1288,10 +1101,3 @@ exports.GetInventoryOverstockProductsOrderByEnum = {
1288
1101
  FORECAST_DESC: 'FORECAST:DESC',
1289
1102
  FORECAST_ASC: 'FORECAST:ASC'
1290
1103
  };
1291
- /**
1292
- * @export
1293
- */
1294
- exports.GetInventoryUnderstockProductsOrderByEnum = {
1295
- ASC: 'CURRENT_UNDERSTOCK:ASC',
1296
- DESC: 'CURRENT_UNDERSTOCK:DESC'
1297
- };
@@ -47,12 +47,6 @@ export interface Inventory {
47
47
  * @memberof Inventory
48
48
  */
49
49
  misalignedProducts?: HttpLink;
50
- /**
51
- *
52
- * @type {HttpLink}
53
- * @memberof Inventory
54
- */
55
- understockProducts?: HttpLink;
56
50
  /**
57
51
  *
58
52
  * @type {InventoryJournal}
@@ -37,7 +37,6 @@ 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']),
41
40
  'journal': (json['journal'] === null || json['journal'] === undefined) ? json['journal'] : (0, InventoryJournal_1.InventoryJournalFromJSON)(json['journal']),
42
41
  };
43
42
  }
@@ -52,7 +51,6 @@ function InventoryToJSON(value) {
52
51
  'activeProducts': (0, HttpLink_1.HttpLinkToJSON)(value['activeProducts']),
53
52
  'overstockProducts': (0, HttpLink_1.HttpLinkToJSON)(value['overstockProducts']),
54
53
  'misalignedProducts': (0, HttpLink_1.HttpLinkToJSON)(value['misalignedProducts']),
55
- 'understockProducts': (0, HttpLink_1.HttpLinkToJSON)(value['understockProducts']),
56
54
  'journal': (0, InventoryJournal_1.InventoryJournalToJSON)(value['journal']),
57
55
  };
58
56
  }
@@ -12,7 +12,6 @@ export * from './PaginatedInventories';
12
12
  export * from './PaginatedMisalignedProducts';
13
13
  export * from './PaginatedObject';
14
14
  export * from './PaginatedOverstockProducts';
15
- export * from './PaginatedUnderstockProducts';
16
15
  export * from './PagingMetadata';
17
16
  export * from './ProductLink';
18
17
  export * from './RestError';
@@ -21,4 +20,3 @@ export * from './StatisticsActiveProducts';
21
20
  export * from './StatisticsMisalignedProducts';
22
21
  export * from './StatisticsOverstockProducts';
23
22
  export * from './SynchronizationMode';
24
- export * from './UnderstockProduct';
@@ -30,7 +30,6 @@ __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);
34
33
  __exportStar(require("./PagingMetadata"), exports);
35
34
  __exportStar(require("./ProductLink"), exports);
36
35
  __exportStar(require("./RestError"), exports);
@@ -39,4 +38,3 @@ __exportStar(require("./StatisticsActiveProducts"), exports);
39
38
  __exportStar(require("./StatisticsMisalignedProducts"), exports);
40
39
  __exportStar(require("./StatisticsOverstockProducts"), exports);
41
40
  __exportStar(require("./SynchronizationMode"), exports);
42
- __exportStar(require("./UnderstockProduct"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lcdp/api-react-rest-client",
3
- "version": "2.10.4-impl-controller.13972521484",
3
+ "version": "2.10.4",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -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: Array<ProductRecommendationType>;
15
+ typeEq: ProductRecommendationType;
16
16
  userIdEq?: number;
17
17
  userIdPr?: boolean;
18
18
  orderBy?: Array<GetProductRecommendationsOrderByEnum>;
@@ -40,7 +40,5 @@ 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";
45
43
  };
46
44
  export declare type GetProductRecommendationsOrderByEnum = typeof GetProductRecommendationsOrderByEnum[keyof typeof GetProductRecommendationsOrderByEnum];
@@ -182,7 +182,5 @@ 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',
186
- TYPE_ASC: 'TYPE:asc',
187
- TYPE_DESC: 'TYPE:desc'
185
+ CREATED_AT_DESC: 'CREATED_AT:desc'
188
186
  };
@@ -11,7 +11,6 @@
11
11
  */
12
12
  import type { UserLink } from './UserLink';
13
13
  import type { ProductLink } from './ProductLink';
14
- import type { ProductRecommendationType } from './ProductRecommendationType';
15
14
  /**
16
15
  * If user is null : the recommendation is a default recommendation
17
16
  * if user is not null : the recommendation is personnalized for the user
@@ -38,12 +37,6 @@ export interface ProductRecommendation {
38
37
  * @memberof ProductRecommendation
39
38
  */
40
39
  product: ProductLink;
41
- /**
42
- *
43
- * @type {ProductRecommendationType}
44
- * @memberof ProductRecommendation
45
- */
46
- type?: ProductRecommendationType;
47
40
  /**
48
41
  * A number between 0 and 1 who determine how much relevant the recommendation is.
49
42
  * 1 : Best recommendation
@@ -16,7 +16,6 @@ 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");
20
19
  /**
21
20
  * Check if a given object implements the ProductRecommendation interface.
22
21
  */
@@ -40,7 +39,6 @@ function ProductRecommendationFromJSONTyped(json, ignoreDiscriminator) {
40
39
  'id': json['id'],
41
40
  'user': (json['user'] === null || json['user'] === undefined) ? json['user'] : (0, UserLink_1.UserLinkFromJSON)(json['user']),
42
41
  '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']),
44
42
  'score': json['score'],
45
43
  'createdAt': (json['createdAt'] === null || json['createdAt'] === undefined) ? json['createdAt'] : new Date(json['createdAt']),
46
44
  };
@@ -54,7 +52,6 @@ function ProductRecommendationToJSON(value) {
54
52
  'id': value['id'],
55
53
  'user': (0, UserLink_1.UserLinkToJSON)(value['user']),
56
54
  'product': (0, ProductLink_1.ProductLinkToJSON)(value['product']),
57
- 'type': (0, ProductRecommendationType_1.ProductRecommendationTypeToJSON)(value['type']),
58
55
  'score': value['score'],
59
56
  'createdAt': (value['createdAt'] === null || value['createdAt'] === undefined) ? value['createdAt'] : (value['createdAt']).toISOString(),
60
57
  };
@@ -13,7 +13,6 @@
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
17
16
  *
18
17
  * @export
19
18
  */
@@ -21,7 +20,6 @@ export declare const ProductRecommendationType: {
21
20
  readonly BUYING_HISTORY: "BUYING_HISTORY";
22
21
  readonly SELLING_SIMILARITY: "SELLING_SIMILARITY";
23
22
  readonly BUYING_SIMILARITY: "BUYING_SIMILARITY";
24
- readonly BUYING_UNDERSTOCK: "BUYING_UNDERSTOCK";
25
23
  };
26
24
  export declare type ProductRecommendationType = typeof ProductRecommendationType[keyof typeof ProductRecommendationType];
27
25
  export declare function instanceOfProductRecommendationType(value: any): boolean;
@@ -18,15 +18,13 @@ 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
22
21
  *
23
22
  * @export
24
23
  */
25
24
  exports.ProductRecommendationType = {
26
25
  BUYING_HISTORY: 'BUYING_HISTORY',
27
26
  SELLING_SIMILARITY: 'SELLING_SIMILARITY',
28
- BUYING_SIMILARITY: 'BUYING_SIMILARITY',
29
- BUYING_UNDERSTOCK: 'BUYING_UNDERSTOCK'
27
+ BUYING_SIMILARITY: 'BUYING_SIMILARITY'
30
28
  };
31
29
  function instanceOfProductRecommendationType(value) {
32
30
  for (var key in exports.ProductRecommendationType) {
@@ -17,7 +17,6 @@ export declare const SubscriptionPlanFeatureId: {
17
17
  readonly UPDATE: "UPDATE";
18
18
  readonly BUY: "BUY";
19
19
  readonly SELL: "SELL";
20
- readonly UNDERSTOCK: "UNDERSTOCK";
21
20
  };
22
21
  export declare type SubscriptionPlanFeatureId = typeof SubscriptionPlanFeatureId[keyof typeof SubscriptionPlanFeatureId];
23
22
  export declare function instanceOfSubscriptionPlanFeatureId(value: any): boolean;
@@ -21,8 +21,7 @@ exports.SubscriptionPlanFeatureIdToJSON = exports.SubscriptionPlanFeatureIdFromJ
21
21
  exports.SubscriptionPlanFeatureId = {
22
22
  UPDATE: 'UPDATE',
23
23
  BUY: 'BUY',
24
- SELL: 'SELL',
25
- UNDERSTOCK: 'UNDERSTOCK'
24
+ SELL: 'SELL'
26
25
  };
27
26
  function instanceOfSubscriptionPlanFeatureId(value) {
28
27
  for (var key in exports.SubscriptionPlanFeatureId) {
@@ -1,39 +0,0 @@
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;
@@ -1,53 +0,0 @@
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;
@@ -1,44 +0,0 @@
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;
@@ -1,50 +0,0 @@
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;