@lcdp/api-react-rest-client 2.5.5-develop.6643075249 → 2.5.5-develop.6787497078

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.
@@ -22,12 +22,12 @@ export interface DeleteTagRequest {
22
22
  */
23
23
  export declare class ManageLexiconApi extends BaseAPI {
24
24
  /**
25
- * Tag should be register in this API to be reuse more easely Precondition : - Tag should not be null or an empty string - Tag should be less than 25 characters
25
+ * Tag should be register in this API to be reuse more easely Preconditions : - Tag should not be null or an empty string - Tag should be less than 25 characters
26
26
  * Create a new tag
27
27
  */
28
28
  createTagRaw(requestParameters: CreateTagRequest): Promise<ApiResponse<Tag | BlobWithMeta>>;
29
29
  /**
30
- * Tag should be register in this API to be reuse more easely Precondition : - Tag should not be null or an empty string - Tag should be less than 25 characters
30
+ * Tag should be register in this API to be reuse more easely Preconditions : - Tag should not be null or an empty string - Tag should be less than 25 characters
31
31
  * Create a new tag
32
32
  */
33
33
  createTag(requestParameters: CreateTagRequest): Promise<Tag | BlobWithMeta>;
@@ -76,7 +76,7 @@ var ManageLexiconApi = /** @class */ (function (_super) {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
78
  /**
79
- * Tag should be register in this API to be reuse more easely Precondition : - Tag should not be null or an empty string - Tag should be less than 25 characters
79
+ * Tag should be register in this API to be reuse more easely Preconditions : - Tag should not be null or an empty string - Tag should be less than 25 characters
80
80
  * Create a new tag
81
81
  */
82
82
  ManageLexiconApi.prototype.createTagRaw = function (requestParameters) {
@@ -135,7 +135,7 @@ var ManageLexiconApi = /** @class */ (function (_super) {
135
135
  });
136
136
  };
137
137
  /**
138
- * Tag should be register in this API to be reuse more easely Precondition : - Tag should not be null or an empty string - Tag should be less than 25 characters
138
+ * Tag should be register in this API to be reuse more easely Preconditions : - Tag should not be null or an empty string - Tag should be less than 25 characters
139
139
  * Create a new tag
140
140
  */
141
141
  ManageLexiconApi.prototype.createTag = function (requestParameters) {
@@ -118,12 +118,12 @@ export declare class ManageOrderApi extends BaseAPI {
118
118
  */
119
119
  updateOrderAnomalies(requestParameters: UpdateOrderAnomaliesRequest): Promise<void>;
120
120
  /**
121
- * # Preconditions : - \'released\' can not be greater than \'claimed\'
121
+ * # Preconditions : - \'released\' can not be greater than \'claimed\' - \'released\' can be modified only if \'limitedStock\' is true
122
122
  * Update order reservations
123
123
  */
124
124
  updateOrderReservationRaw(requestParameters: UpdateOrderReservationRequest): Promise<ApiResponse<Reservation | BlobWithMeta>>;
125
125
  /**
126
- * # Preconditions : - \'released\' can not be greater than \'claimed\'
126
+ * # Preconditions : - \'released\' can not be greater than \'claimed\' - \'released\' can be modified only if \'limitedStock\' is true
127
127
  * Update order reservations
128
128
  */
129
129
  updateOrderReservation(requestParameters: UpdateOrderReservationRequest): Promise<Reservation | BlobWithMeta>;
@@ -562,7 +562,7 @@ var ManageOrderApi = /** @class */ (function (_super) {
562
562
  });
563
563
  };
564
564
  /**
565
- * # Preconditions : - \'released\' can not be greater than \'claimed\'
565
+ * # Preconditions : - \'released\' can not be greater than \'claimed\' - \'released\' can be modified only if \'limitedStock\' is true
566
566
  * Update order reservations
567
567
  */
568
568
  ManageOrderApi.prototype.updateOrderReservationRaw = function (requestParameters) {
@@ -627,7 +627,7 @@ var ManageOrderApi = /** @class */ (function (_super) {
627
627
  });
628
628
  };
629
629
  /**
630
- * # Preconditions : - \'released\' can not be greater than \'claimed\'
630
+ * # Preconditions : - \'released\' can not be greater than \'claimed\' - \'released\' can be modified only if \'limitedStock\' is true
631
631
  * Update order reservations
632
632
  */
633
633
  ManageOrderApi.prototype.updateOrderReservation = function (requestParameters) {
@@ -65,10 +65,12 @@ export declare class SearchOrderApi extends BaseAPI {
65
65
  */
66
66
  getOrderDeliveryVoucher(requestParameters: GetOrderDeliveryVoucherRequest): Promise<BlobWithMeta>;
67
67
  /**
68
+ * Preconditions : - You are administrator, BUYER or SELLER
68
69
  * Get reservations for an order
69
70
  */
70
71
  getOrderReservationsRaw(requestParameters: GetOrderReservationsRequest): Promise<ApiResponse<Array<Reservation> | BlobWithMeta>>;
71
72
  /**
73
+ * Preconditions : - You are administrator, BUYER or SELLER
72
74
  * Get reservations for an order
73
75
  */
74
76
  getOrderReservations(requestParameters: GetOrderReservationsRequest): Promise<Array<Reservation> | BlobWithMeta>;
@@ -224,6 +224,7 @@ var SearchOrderApi = /** @class */ (function (_super) {
224
224
  });
225
225
  };
226
226
  /**
227
+ * Preconditions : - You are administrator, BUYER or SELLER
227
228
  * Get reservations for an order
228
229
  */
229
230
  SearchOrderApi.prototype.getOrderReservationsRaw = function (requestParameters) {
@@ -280,6 +281,7 @@ var SearchOrderApi = /** @class */ (function (_super) {
280
281
  });
281
282
  };
282
283
  /**
284
+ * Preconditions : - You are administrator, BUYER or SELLER
283
285
  * Get reservations for an order
284
286
  */
285
287
  SearchOrderApi.prototype.getOrderReservations = function (requestParameters) {
@@ -35,6 +35,12 @@ export interface Reservation {
35
35
  * @memberof Reservation
36
36
  */
37
37
  saleOffer?: SaleOfferLink;
38
+ /**
39
+ * True if the associated sale offer have a limited stock. False if not. Important note : You can not release claimed items for a non limited-stock sale offer.
40
+ * @type {boolean}
41
+ * @memberof Reservation
42
+ */
43
+ limitedStock?: boolean;
38
44
  /**
39
45
  * Total number of item linked to this order (claimed + released)
40
46
  * @type {number}
@@ -29,6 +29,7 @@ function ReservationFromJSONTyped(json, ignoreDiscriminator) {
29
29
  'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
30
30
  'product': !(0, runtime_1.exists)(json, 'product') ? undefined : (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
31
31
  'saleOffer': !(0, runtime_1.exists)(json, 'saleOffer') ? undefined : (0, SaleOfferLink_1.SaleOfferLinkFromJSON)(json['saleOffer']),
32
+ 'limitedStock': !(0, runtime_1.exists)(json, 'limitedStock') ? undefined : json['limitedStock'],
32
33
  'total': !(0, runtime_1.exists)(json, 'total') ? undefined : json['total'],
33
34
  'claimed': !(0, runtime_1.exists)(json, 'claimed') ? undefined : json['claimed'],
34
35
  'released': !(0, runtime_1.exists)(json, 'released') ? undefined : json['released'],
@@ -46,6 +47,7 @@ function ReservationToJSON(value) {
46
47
  'id': value.id,
47
48
  'product': (0, ProductLink_1.ProductLinkToJSON)(value.product),
48
49
  'saleOffer': (0, SaleOfferLink_1.SaleOfferLinkToJSON)(value.saleOffer),
50
+ 'limitedStock': value.limitedStock,
49
51
  'total': value.total,
50
52
  'claimed': value.claimed,
51
53
  'released': value.released,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lcdp/api-react-rest-client",
3
- "version": "2.5.5-develop.6643075249",
3
+ "version": "2.5.5-develop.6787497078",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -43,12 +43,12 @@ export interface UpdateSaleOffersRequest {
43
43
  */
44
44
  export declare class ManageSaleOfferApi extends BaseAPI {
45
45
  /**
46
- * Create a new sale offer. WARNING : There is some special restrictions according the user that create sale offer # All : - Owner should have a valid mangopay mandate - Unit price should be lower than product unitPrice # Pharmacy : - Can only create UNITARY sale offer - Sale offer should have at least one item in quantity - Can not set images on sale offers - Can not create sale offers without stock - Can create sale offer only for legal allowed products - Batch should be auhtorized by ANSM/DGCCRF - Lapsing date of stock must be after REQUIRED_LAPSING_MONTHS months # Laboratory : - Can not create a sale offer on a product that already have an existing non-disabled sale offer - Can create sale offer without lapsing - Can create sale offer without remaining quantity
46
+ * Create a new sale offer. WARNING : There is some special restrictions according the user that create sale offer # All : - Owner should have a valid mangopay mandate - Unit price should be lower than product unitPrice - For unitary sale offer, minimalQuantity should be lower than stock remainingQuantity # Pharmacy : - Can only create UNITARY sale offer - Sale offer should have at least one item in quantity - Can not set images on sale offers - Can not create sale offers without stock - Can create sale offer only for legal allowed products - Batch should be auhtorized by ANSM/DGCCRF - Lapsing date of stock must be after REQUIRED_LAPSING_MONTHS months # Laboratory : - Can not create a sale offer on a product that already have an existing non-disabled sale offer - Can create sale offer without lapsing - Can create sale offer without remaining quantity
47
47
  * Create a new sale offer
48
48
  */
49
49
  createSaleOfferRaw(requestParameters: CreateSaleOfferRequest): Promise<ApiResponse<SaleOffer | BlobWithMeta>>;
50
50
  /**
51
- * Create a new sale offer. WARNING : There is some special restrictions according the user that create sale offer # All : - Owner should have a valid mangopay mandate - Unit price should be lower than product unitPrice # Pharmacy : - Can only create UNITARY sale offer - Sale offer should have at least one item in quantity - Can not set images on sale offers - Can not create sale offers without stock - Can create sale offer only for legal allowed products - Batch should be auhtorized by ANSM/DGCCRF - Lapsing date of stock must be after REQUIRED_LAPSING_MONTHS months # Laboratory : - Can not create a sale offer on a product that already have an existing non-disabled sale offer - Can create sale offer without lapsing - Can create sale offer without remaining quantity
51
+ * Create a new sale offer. WARNING : There is some special restrictions according the user that create sale offer # All : - Owner should have a valid mangopay mandate - Unit price should be lower than product unitPrice - For unitary sale offer, minimalQuantity should be lower than stock remainingQuantity # Pharmacy : - Can only create UNITARY sale offer - Sale offer should have at least one item in quantity - Can not set images on sale offers - Can not create sale offers without stock - Can create sale offer only for legal allowed products - Batch should be auhtorized by ANSM/DGCCRF - Lapsing date of stock must be after REQUIRED_LAPSING_MONTHS months # Laboratory : - Can not create a sale offer on a product that already have an existing non-disabled sale offer - Can create sale offer without lapsing - Can create sale offer without remaining quantity
52
52
  * Create a new sale offer
53
53
  */
54
54
  createSaleOffer(requestParameters: CreateSaleOfferRequest): Promise<SaleOffer | BlobWithMeta>;
@@ -76,7 +76,7 @@ var ManageSaleOfferApi = /** @class */ (function (_super) {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
78
  /**
79
- * Create a new sale offer. WARNING : There is some special restrictions according the user that create sale offer # All : - Owner should have a valid mangopay mandate - Unit price should be lower than product unitPrice # Pharmacy : - Can only create UNITARY sale offer - Sale offer should have at least one item in quantity - Can not set images on sale offers - Can not create sale offers without stock - Can create sale offer only for legal allowed products - Batch should be auhtorized by ANSM/DGCCRF - Lapsing date of stock must be after REQUIRED_LAPSING_MONTHS months # Laboratory : - Can not create a sale offer on a product that already have an existing non-disabled sale offer - Can create sale offer without lapsing - Can create sale offer without remaining quantity
79
+ * Create a new sale offer. WARNING : There is some special restrictions according the user that create sale offer # All : - Owner should have a valid mangopay mandate - Unit price should be lower than product unitPrice - For unitary sale offer, minimalQuantity should be lower than stock remainingQuantity # Pharmacy : - Can only create UNITARY sale offer - Sale offer should have at least one item in quantity - Can not set images on sale offers - Can not create sale offers without stock - Can create sale offer only for legal allowed products - Batch should be auhtorized by ANSM/DGCCRF - Lapsing date of stock must be after REQUIRED_LAPSING_MONTHS months # Laboratory : - Can not create a sale offer on a product that already have an existing non-disabled sale offer - Can create sale offer without lapsing - Can create sale offer without remaining quantity
80
80
  * Create a new sale offer
81
81
  */
82
82
  ManageSaleOfferApi.prototype.createSaleOfferRaw = function (requestParameters) {
@@ -135,7 +135,7 @@ var ManageSaleOfferApi = /** @class */ (function (_super) {
135
135
  });
136
136
  };
137
137
  /**
138
- * Create a new sale offer. WARNING : There is some special restrictions according the user that create sale offer # All : - Owner should have a valid mangopay mandate - Unit price should be lower than product unitPrice # Pharmacy : - Can only create UNITARY sale offer - Sale offer should have at least one item in quantity - Can not set images on sale offers - Can not create sale offers without stock - Can create sale offer only for legal allowed products - Batch should be auhtorized by ANSM/DGCCRF - Lapsing date of stock must be after REQUIRED_LAPSING_MONTHS months # Laboratory : - Can not create a sale offer on a product that already have an existing non-disabled sale offer - Can create sale offer without lapsing - Can create sale offer without remaining quantity
138
+ * Create a new sale offer. WARNING : There is some special restrictions according the user that create sale offer # All : - Owner should have a valid mangopay mandate - Unit price should be lower than product unitPrice - For unitary sale offer, minimalQuantity should be lower than stock remainingQuantity # Pharmacy : - Can only create UNITARY sale offer - Sale offer should have at least one item in quantity - Can not set images on sale offers - Can not create sale offers without stock - Can create sale offer only for legal allowed products - Batch should be auhtorized by ANSM/DGCCRF - Lapsing date of stock must be after REQUIRED_LAPSING_MONTHS months # Laboratory : - Can not create a sale offer on a product that already have an existing non-disabled sale offer - Can create sale offer without lapsing - Can create sale offer without remaining quantity
139
139
  * Create a new sale offer
140
140
  */
141
141
  ManageSaleOfferApi.prototype.createSaleOffer = function (requestParameters) {
@@ -58,7 +58,7 @@ export interface SaleOffer {
58
58
  * @type {AnyIdentifiedDistributionMode}
59
59
  * @memberof SaleOffer
60
60
  */
61
- distributionMode?: AnyIdentifiedDistributionMode | null;
61
+ distributionMode?: AnyIdentifiedDistributionMode;
62
62
  /**
63
63
  * The minimal unit price for this sale offer.
64
64
  * @type {number}
@@ -37,7 +37,7 @@ function SaleOfferFromJSONTyped(json, ignoreDiscriminator) {
37
37
  'product': !(0, runtime_1.exists)(json, 'product') ? undefined : (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
38
38
  'stock': !(0, runtime_1.exists)(json, 'stock') ? undefined : (0, Stock_1.StockFromJSON)(json['stock']),
39
39
  'description': !(0, runtime_1.exists)(json, 'description') ? json['description'] : json['description'],
40
- 'distributionMode': !(0, runtime_1.exists)(json, 'distributionMode') ? json['distributionMode'] : (0, AnyIdentifiedDistributionMode_1.AnyIdentifiedDistributionModeFromJSON)(json['distributionMode']),
40
+ 'distributionMode': !(0, runtime_1.exists)(json, 'distributionMode') ? undefined : (0, AnyIdentifiedDistributionMode_1.AnyIdentifiedDistributionModeFromJSON)(json['distributionMode']),
41
41
  'minimalUnitPrice': !(0, runtime_1.exists)(json, 'minimalUnitPrice') ? undefined : json['minimalUnitPrice'],
42
42
  'bestRebate': !(0, runtime_1.exists)(json, 'bestRebate') ? undefined : json['bestRebate'],
43
43
  'owner': !(0, runtime_1.exists)(json, 'owner') ? undefined : (0, OwnerLink_1.OwnerLinkFromJSON)(json['owner']),
@@ -13,7 +13,7 @@ import { AnyDistributionMode } from './AnyDistributionMode';
13
13
  import { SaleOfferCreationImagesParameters } from './SaleOfferCreationImagesParameters';
14
14
  import { Stock } from './Stock';
15
15
  /**
16
- * All these fields are required for ad creation from scratch but optional when copying from an existing ad
16
+ * All these fields are optional when copying from an existing ad. List of fields required in case of sale offer creation from scratch : - ownerId - productId - distributionMode
17
17
  * @export
18
18
  * @interface SaleOfferCreationParameters
19
19
  */
@@ -41,7 +41,7 @@ export interface SaleOfferCreationParameters {
41
41
  * @type {AnyDistributionMode}
42
42
  * @memberof SaleOfferCreationParameters
43
43
  */
44
- distributionMode?: AnyDistributionMode | null;
44
+ distributionMode?: AnyDistributionMode;
45
45
  /**
46
46
  * Free text to describe this ad
47
47
  * @type {string}
@@ -30,7 +30,7 @@ function SaleOfferCreationParametersFromJSONTyped(json, ignoreDiscriminator) {
30
30
  'ownerId': !(0, runtime_1.exists)(json, 'ownerId') ? undefined : json['ownerId'],
31
31
  'productId': !(0, runtime_1.exists)(json, 'productId') ? undefined : json['productId'],
32
32
  'stock': !(0, runtime_1.exists)(json, 'stock') ? undefined : (0, Stock_1.StockFromJSON)(json['stock']),
33
- 'distributionMode': !(0, runtime_1.exists)(json, 'distributionMode') ? json['distributionMode'] : (0, AnyDistributionMode_1.AnyDistributionModeFromJSON)(json['distributionMode']),
33
+ 'distributionMode': !(0, runtime_1.exists)(json, 'distributionMode') ? undefined : (0, AnyDistributionMode_1.AnyDistributionModeFromJSON)(json['distributionMode']),
34
34
  'description': !(0, runtime_1.exists)(json, 'description') ? json['description'] : json['description'],
35
35
  'images': !(0, runtime_1.exists)(json, 'images') ? undefined : (0, SaleOfferCreationImagesParameters_1.SaleOfferCreationImagesParametersFromJSON)(json['images']),
36
36
  'rank': !(0, runtime_1.exists)(json, 'rank') ? json['rank'] : json['rank'],
@@ -20,7 +20,7 @@ export interface SaleOfferJournal {
20
20
  * @type {Date}
21
21
  * @memberof SaleOfferJournal
22
22
  */
23
- statusUpdatedAt?: Date;
23
+ statusUpdatedAt: Date;
24
24
  }
25
25
  export declare function SaleOfferJournalFromJSON(json: any): SaleOfferJournal;
26
26
  export declare function SaleOfferJournalFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaleOfferJournal;
@@ -14,7 +14,6 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.SaleOfferJournalToJSON = exports.SaleOfferJournalFromJSONTyped = exports.SaleOfferJournalFromJSON = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  function SaleOfferJournalFromJSON(json) {
19
18
  return SaleOfferJournalFromJSONTyped(json, false);
20
19
  }
@@ -24,7 +23,7 @@ function SaleOfferJournalFromJSONTyped(json, ignoreDiscriminator) {
24
23
  return json;
25
24
  }
26
25
  return {
27
- 'statusUpdatedAt': !(0, runtime_1.exists)(json, 'statusUpdatedAt') ? undefined : (new Date(json['statusUpdatedAt'])),
26
+ 'statusUpdatedAt': (new Date(json['statusUpdatedAt'])),
28
27
  };
29
28
  }
30
29
  exports.SaleOfferJournalFromJSONTyped = SaleOfferJournalFromJSONTyped;
@@ -36,7 +35,7 @@ function SaleOfferJournalToJSON(value) {
36
35
  return null;
37
36
  }
38
37
  return {
39
- 'statusUpdatedAt': value.statusUpdatedAt === undefined ? undefined : (value.statusUpdatedAt.toISOString()),
38
+ 'statusUpdatedAt': (value.statusUpdatedAt.toISOString()),
40
39
  };
41
40
  }
42
41
  exports.SaleOfferJournalToJSON = SaleOfferJournalToJSON;
@@ -29,7 +29,7 @@ export interface SaleOfferNewVersionParameters {
29
29
  * @type {AnyDistributionMode}
30
30
  * @memberof SaleOfferNewVersionParameters
31
31
  */
32
- distributionMode?: AnyDistributionMode | null;
32
+ distributionMode?: AnyDistributionMode;
33
33
  /**
34
34
  *
35
35
  * @type {SaleOfferCreationImagesParameters}
@@ -28,7 +28,7 @@ function SaleOfferNewVersionParametersFromJSONTyped(json, ignoreDiscriminator) {
28
28
  }
29
29
  return {
30
30
  'stock': !(0, runtime_1.exists)(json, 'stock') ? undefined : (0, Stock_1.StockFromJSON)(json['stock']),
31
- 'distributionMode': !(0, runtime_1.exists)(json, 'distributionMode') ? json['distributionMode'] : (0, AnyDistributionMode_1.AnyDistributionModeFromJSON)(json['distributionMode']),
31
+ 'distributionMode': !(0, runtime_1.exists)(json, 'distributionMode') ? undefined : (0, AnyDistributionMode_1.AnyDistributionModeFromJSON)(json['distributionMode']),
32
32
  'images': !(0, runtime_1.exists)(json, 'images') ? undefined : (0, SaleOfferCreationImagesParameters_1.SaleOfferCreationImagesParametersFromJSON)(json['images']),
33
33
  'description': !(0, runtime_1.exists)(json, 'description') ? json['description'] : json['description'],
34
34
  'rank': !(0, runtime_1.exists)(json, 'rank') ? json['rank'] : json['rank'],