@lcdp/api-react-rest-client 2.6.13 → 2.6.14-LDS-3653-api-permettre-filtrer-par-date-.9568296361

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.
@@ -35,6 +35,7 @@ export interface GetCurrentInventoryOverstockProductsRequest {
35
35
  forecastGte?: number;
36
36
  forecastLte?: number;
37
37
  forecastPr?: boolean;
38
+ isUnsoldEq?: boolean;
38
39
  orderBy?: GetCurrentInventoryOverstockProductsOrderByEnum;
39
40
  p?: number;
40
41
  pp?: number;
@@ -66,6 +67,7 @@ export interface GetInventoryOverstockProductsRequest {
66
67
  forecastGte?: number;
67
68
  forecastLte?: number;
68
69
  forecastPr?: boolean;
70
+ isUnsoldEq?: boolean;
69
71
  orderBy?: GetInventoryOverstockProductsOrderByEnum;
70
72
  p?: number;
71
73
  pp?: number;
@@ -298,6 +298,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
298
298
  if (requestParameters.forecastPr !== undefined) {
299
299
  queryParameters['forecast[pr]'] = requestParameters.forecastPr;
300
300
  }
301
+ if (requestParameters.isUnsoldEq !== undefined) {
302
+ queryParameters['isUnsold[eq]'] = requestParameters.isUnsoldEq;
303
+ }
301
304
  if (requestParameters.orderBy !== undefined) {
302
305
  queryParameters['orderBy'] = requestParameters.orderBy;
303
306
  }
@@ -765,6 +768,9 @@ var SearchInventoryApi = /** @class */ (function (_super) {
765
768
  if (requestParameters.forecastPr !== undefined) {
766
769
  queryParameters['forecast[pr]'] = requestParameters.forecastPr;
767
770
  }
771
+ if (requestParameters.isUnsoldEq !== undefined) {
772
+ queryParameters['isUnsold[eq]'] = requestParameters.isUnsoldEq;
773
+ }
768
774
  if (requestParameters.orderBy !== undefined) {
769
775
  queryParameters['orderBy'] = requestParameters.orderBy;
770
776
  }
@@ -21,43 +21,49 @@ export interface OverstockProduct {
21
21
  * @type {ProductLink}
22
22
  * @memberof OverstockProduct
23
23
  */
24
- product?: ProductLink;
24
+ product: ProductLink;
25
25
  /**
26
26
  * Details about overstock (in French)
27
27
  * @type {string}
28
28
  * @memberof OverstockProduct
29
29
  */
30
- details?: string;
30
+ details: string;
31
31
  /**
32
32
  * Quantity of product currently available in user stock
33
33
  * @type {number}
34
34
  * @memberof OverstockProduct
35
35
  */
36
- currentStock?: number;
36
+ currentStock: number;
37
37
  /**
38
38
  * Stock the user should take out of stock
39
39
  * @type {number}
40
40
  * @memberof OverstockProduct
41
41
  */
42
- currentOverstock?: number;
42
+ currentOverstock: number;
43
43
  /**
44
44
  * Retail value of the overstock ( overstock quantity * product price )
45
45
  * @type {number}
46
46
  * @memberof OverstockProduct
47
47
  */
48
- opportunity?: number;
48
+ opportunity: number;
49
49
  /**
50
50
  * If product is in the black listed product
51
51
  * @type {boolean}
52
52
  * @memberof OverstockProduct
53
53
  */
54
- blacklisted?: boolean;
54
+ blacklisted: boolean;
55
55
  /**
56
56
  * The forecast is the number of days client will take to get rid of all his product stock. Important note : If forecast is \'null\', it means that we can not compute this value as product was unsold since more than one year.
57
57
  * @type {number}
58
58
  * @memberof OverstockProduct
59
59
  */
60
- forecast?: number | null;
60
+ forecast: number | null;
61
+ /**
62
+ * True if the product has not been sold by the pharmacist within a year.
63
+ * @type {boolean}
64
+ * @memberof OverstockProduct
65
+ */
66
+ isUnsold: boolean;
61
67
  }
62
68
  export declare function OverstockProductFromJSON(json: any): OverstockProduct;
63
69
  export declare function OverstockProductFromJSONTyped(json: any, ignoreDiscriminator: boolean): OverstockProduct;
@@ -14,7 +14,6 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OverstockProductToJSON = exports.OverstockProductFromJSONTyped = exports.OverstockProductFromJSON = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  var ProductLink_1 = require("./ProductLink");
19
18
  function OverstockProductFromJSON(json) {
20
19
  return OverstockProductFromJSONTyped(json, false);
@@ -25,13 +24,14 @@ function OverstockProductFromJSONTyped(json, ignoreDiscriminator) {
25
24
  return json;
26
25
  }
27
26
  return {
28
- 'product': !(0, runtime_1.exists)(json, 'product') ? undefined : (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
29
- 'details': !(0, runtime_1.exists)(json, 'details') ? undefined : json['details'],
30
- 'currentStock': !(0, runtime_1.exists)(json, 'currentStock') ? undefined : json['currentStock'],
31
- 'currentOverstock': !(0, runtime_1.exists)(json, 'currentOverstock') ? undefined : json['currentOverstock'],
32
- 'opportunity': !(0, runtime_1.exists)(json, 'opportunity') ? undefined : json['opportunity'],
33
- 'blacklisted': !(0, runtime_1.exists)(json, 'blacklisted') ? undefined : json['blacklisted'],
34
- 'forecast': !(0, runtime_1.exists)(json, 'forecast') ? json['forecast'] : json['forecast'],
27
+ 'product': (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
28
+ 'details': json['details'],
29
+ 'currentStock': json['currentStock'],
30
+ 'currentOverstock': json['currentOverstock'],
31
+ 'opportunity': json['opportunity'],
32
+ 'blacklisted': json['blacklisted'],
33
+ 'forecast': json['forecast'],
34
+ 'isUnsold': json['isUnsold'],
35
35
  };
36
36
  }
37
37
  exports.OverstockProductFromJSONTyped = OverstockProductFromJSONTyped;
@@ -50,6 +50,7 @@ function OverstockProductToJSON(value) {
50
50
  'opportunity': value.opportunity,
51
51
  'blacklisted': value.blacklisted,
52
52
  'forecast': value.forecast,
53
+ 'isUnsold': value.isUnsold,
53
54
  };
54
55
  }
55
56
  exports.OverstockProductToJSON = OverstockProductToJSON;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lcdp/api-react-rest-client",
3
- "version": "2.6.13",
3
+ "version": "2.6.14-LDS-3653-api-permettre-filtrer-par-date-.9568296361",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -37,6 +37,9 @@ export interface GetSaleOffersRequest {
37
37
  stReasonEq?: SaleOfferStatusReason;
38
38
  stockRemainingQuantityGte?: number;
39
39
  stockRemainingQuantityLte?: number;
40
+ stockLapsingDateLte?: Date;
41
+ stockLapsingDateGte?: Date;
42
+ sDepletedSoonEq?: boolean;
40
43
  orderBy?: Array<GetSaleOffersOrderByEnum>;
41
44
  distinctBy?: GetSaleOffersDistinctByEnum;
42
45
  p?: number;
@@ -232,6 +232,15 @@ var SearchSaleOfferApi = /** @class */ (function (_super) {
232
232
  if (requestParameters.stockRemainingQuantityLte !== undefined) {
233
233
  queryParameters['stockRemainingQuantity[lte]'] = requestParameters.stockRemainingQuantityLte;
234
234
  }
235
+ if (requestParameters.stockLapsingDateLte !== undefined) {
236
+ queryParameters['stockLapsingDate[lte]'] = requestParameters.stockLapsingDateLte.toISOString();
237
+ }
238
+ if (requestParameters.stockLapsingDateGte !== undefined) {
239
+ queryParameters['stockLapsingDate[gte]'] = requestParameters.stockLapsingDateGte.toISOString();
240
+ }
241
+ if (requestParameters.sDepletedSoonEq !== undefined) {
242
+ queryParameters['sDepletedSoon[eq]'] = requestParameters.sDepletedSoonEq;
243
+ }
235
244
  if (requestParameters.orderBy) {
236
245
  queryParameters['orderBy'] = requestParameters.orderBy;
237
246
  }
@@ -28,6 +28,18 @@ export interface SaleOfferStatisticLink extends HttpLink {
28
28
  * @memberof SaleOfferStatisticLink
29
29
  */
30
30
  numberOfSales?: number;
31
+ /**
32
+ * True if the stock is depleted soon
33
+ * @type {boolean}
34
+ * @memberof SaleOfferStatisticLink
35
+ */
36
+ depletedSoon?: boolean;
37
+ /**
38
+ * Forecast of the stock depletion (see https://www.digi.com/resources/documentation/digidocs/90001488-13/reference/r_iso_8601_duration_format.htm)
39
+ * @type {string}
40
+ * @memberof SaleOfferStatisticLink
41
+ */
42
+ depletionForecast?: string;
31
43
  }
32
44
  export declare function SaleOfferStatisticLinkFromJSON(json: any): SaleOfferStatisticLink;
33
45
  export declare function SaleOfferStatisticLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaleOfferStatisticLink;
@@ -35,7 +35,7 @@ function SaleOfferStatisticLinkFromJSONTyped(json, ignoreDiscriminator) {
35
35
  if ((json === undefined) || (json === null)) {
36
36
  return json;
37
37
  }
38
- return __assign(__assign({}, (0, HttpLink_1.HttpLinkFromJSONTyped)(json, ignoreDiscriminator)), { 'lastSaleDate': !(0, runtime_1.exists)(json, 'lastSaleDate') ? undefined : (new Date(json['lastSaleDate'])), 'numberOfSales': !(0, runtime_1.exists)(json, 'numberOfSales') ? undefined : json['numberOfSales'] });
38
+ return __assign(__assign({}, (0, HttpLink_1.HttpLinkFromJSONTyped)(json, ignoreDiscriminator)), { 'lastSaleDate': !(0, runtime_1.exists)(json, 'lastSaleDate') ? undefined : (new Date(json['lastSaleDate'])), 'numberOfSales': !(0, runtime_1.exists)(json, 'numberOfSales') ? undefined : json['numberOfSales'], 'depletedSoon': !(0, runtime_1.exists)(json, 'depletedSoon') ? undefined : json['depletedSoon'], 'depletionForecast': !(0, runtime_1.exists)(json, 'depletionForecast') ? undefined : json['depletionForecast'] });
39
39
  }
40
40
  exports.SaleOfferStatisticLinkFromJSONTyped = SaleOfferStatisticLinkFromJSONTyped;
41
41
  function SaleOfferStatisticLinkToJSON(value) {
@@ -45,6 +45,6 @@ function SaleOfferStatisticLinkToJSON(value) {
45
45
  if (value === null) {
46
46
  return null;
47
47
  }
48
- return __assign(__assign({}, (0, HttpLink_1.HttpLinkToJSON)(value)), { 'lastSaleDate': value.lastSaleDate === undefined ? undefined : (value.lastSaleDate.toISOString()), 'numberOfSales': value.numberOfSales });
48
+ return __assign(__assign({}, (0, HttpLink_1.HttpLinkToJSON)(value)), { 'lastSaleDate': value.lastSaleDate === undefined ? undefined : (value.lastSaleDate.toISOString()), 'numberOfSales': value.numberOfSales, 'depletedSoon': value.depletedSoon, 'depletionForecast': value.depletionForecast });
49
49
  }
50
50
  exports.SaleOfferStatisticLinkToJSON = SaleOfferStatisticLinkToJSON;
@@ -27,6 +27,18 @@ export interface SaleOfferStatisticLinkAllOf {
27
27
  * @memberof SaleOfferStatisticLinkAllOf
28
28
  */
29
29
  numberOfSales?: number;
30
+ /**
31
+ * True if the stock is depleted soon
32
+ * @type {boolean}
33
+ * @memberof SaleOfferStatisticLinkAllOf
34
+ */
35
+ depletedSoon?: boolean;
36
+ /**
37
+ * Forecast of the stock depletion (see https://www.digi.com/resources/documentation/digidocs/90001488-13/reference/r_iso_8601_duration_format.htm)
38
+ * @type {string}
39
+ * @memberof SaleOfferStatisticLinkAllOf
40
+ */
41
+ depletionForecast?: string;
30
42
  }
31
43
  export declare function SaleOfferStatisticLinkAllOfFromJSON(json: any): SaleOfferStatisticLinkAllOf;
32
44
  export declare function SaleOfferStatisticLinkAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaleOfferStatisticLinkAllOf;
@@ -26,6 +26,8 @@ function SaleOfferStatisticLinkAllOfFromJSONTyped(json, ignoreDiscriminator) {
26
26
  return {
27
27
  'lastSaleDate': !(0, runtime_1.exists)(json, 'lastSaleDate') ? undefined : (new Date(json['lastSaleDate'])),
28
28
  'numberOfSales': !(0, runtime_1.exists)(json, 'numberOfSales') ? undefined : json['numberOfSales'],
29
+ 'depletedSoon': !(0, runtime_1.exists)(json, 'depletedSoon') ? undefined : json['depletedSoon'],
30
+ 'depletionForecast': !(0, runtime_1.exists)(json, 'depletionForecast') ? undefined : json['depletionForecast'],
29
31
  };
30
32
  }
31
33
  exports.SaleOfferStatisticLinkAllOfFromJSONTyped = SaleOfferStatisticLinkAllOfFromJSONTyped;
@@ -39,6 +41,8 @@ function SaleOfferStatisticLinkAllOfToJSON(value) {
39
41
  return {
40
42
  'lastSaleDate': value.lastSaleDate === undefined ? undefined : (value.lastSaleDate.toISOString()),
41
43
  'numberOfSales': value.numberOfSales,
44
+ 'depletedSoon': value.depletedSoon,
45
+ 'depletionForecast': value.depletionForecast,
42
46
  };
43
47
  }
44
48
  exports.SaleOfferStatisticLinkAllOfToJSON = SaleOfferStatisticLinkAllOfToJSON;
@@ -40,6 +40,18 @@ export interface SaleOfferStatistic {
40
40
  * @memberof SaleOfferStatistic
41
41
  */
42
42
  numberOfSales?: number;
43
+ /**
44
+ * True when sale offer is near sold out
45
+ * @type {boolean}
46
+ * @memberof SaleOfferStatistic
47
+ */
48
+ soldOutSoon?: boolean;
49
+ /**
50
+ * Forecast to sold out sale offer
51
+ * @type {string}
52
+ * @memberof SaleOfferStatistic
53
+ */
54
+ soldOutForecast?: string;
43
55
  /**
44
56
  *
45
57
  * @type {UserLink}
@@ -29,6 +29,8 @@ function SaleOfferStatisticFromJSONTyped(json, ignoreDiscriminator) {
29
29
  'reference': !(0, runtime_1.exists)(json, 'reference') ? undefined : json['reference'],
30
30
  'lastSaleDate': !(0, runtime_1.exists)(json, 'lastSaleDate') ? undefined : (new Date(json['lastSaleDate'])),
31
31
  'numberOfSales': !(0, runtime_1.exists)(json, 'numberOfSales') ? undefined : json['numberOfSales'],
32
+ 'soldOutSoon': !(0, runtime_1.exists)(json, 'soldOutSoon') ? undefined : json['soldOutSoon'],
33
+ 'soldOutForecast': !(0, runtime_1.exists)(json, 'soldOutForecast') ? undefined : json['soldOutForecast'],
32
34
  'owner': !(0, runtime_1.exists)(json, 'owner') ? undefined : (0, UserLink_1.UserLinkFromJSON)(json['owner']),
33
35
  };
34
36
  }
@@ -45,6 +47,8 @@ function SaleOfferStatisticToJSON(value) {
45
47
  'reference': value.reference,
46
48
  'lastSaleDate': value.lastSaleDate === undefined ? undefined : (value.lastSaleDate.toISOString()),
47
49
  'numberOfSales': value.numberOfSales,
50
+ 'soldOutSoon': value.soldOutSoon,
51
+ 'soldOutForecast': value.soldOutForecast,
48
52
  'owner': (0, UserLink_1.UserLinkToJSON)(value.owner),
49
53
  };
50
54
  }