@lcdp/api-react-rest-client 3.1.6-LDS-5436-api-modifications-routes-et-sch.23587674043 → 3.1.6-develop.23737431721

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.
Files changed (178) hide show
  1. package/auth/src/models/RestError.d.ts +5 -3
  2. package/auth/src/models/RestError.js +5 -3
  3. package/catalog/src/models/RestError.d.ts +5 -3
  4. package/catalog/src/models/RestError.js +5 -3
  5. package/chargebee-hook/src/models/RestError.d.ts +5 -3
  6. package/chargebee-hook/src/models/RestError.js +5 -3
  7. package/configuration/src/models/RestError.d.ts +5 -3
  8. package/configuration/src/models/RestError.js +5 -3
  9. package/content/src/models/RestError.d.ts +5 -3
  10. package/content/src/models/RestError.js +5 -3
  11. package/favorite/src/models/RestError.d.ts +5 -3
  12. package/favorite/src/models/RestError.js +5 -3
  13. package/inventory/src/models/RestError.d.ts +5 -3
  14. package/inventory/src/models/RestError.js +5 -3
  15. package/invoice/src/models/RestError.d.ts +5 -3
  16. package/invoice/src/models/RestError.js +5 -3
  17. package/laboratory-store/src/models/RestError.d.ts +5 -3
  18. package/laboratory-store/src/models/RestError.js +5 -3
  19. package/lexicon/src/models/RestError.d.ts +5 -3
  20. package/lexicon/src/models/RestError.js +5 -3
  21. package/litigation/src/models/RestError.d.ts +5 -3
  22. package/litigation/src/models/RestError.js +5 -3
  23. package/magic-cart/src/models/ExpressOrder.d.ts +3 -3
  24. package/magic-cart/src/models/ExpressOrder.js +3 -3
  25. package/magic-cart/src/models/SaleOfferProposal.d.ts +51 -0
  26. package/magic-cart/src/models/SaleOfferProposal.js +61 -0
  27. package/magic-cart/src/models/SellerProposal.d.ts +45 -0
  28. package/magic-cart/src/models/SellerProposal.js +57 -0
  29. package/magic-cart/src/models/index.d.ts +2 -1
  30. package/magic-cart/src/models/index.js +2 -1
  31. package/mangopay-hook/src/models/RestError.d.ts +5 -3
  32. package/mangopay-hook/src/models/RestError.js +5 -3
  33. package/notification/src/models/RestError.d.ts +5 -3
  34. package/notification/src/models/RestError.js +5 -3
  35. package/order/src/apis/ManageMetaOrderApi.d.ts +45 -0
  36. package/{shopping-cart/src/apis/SearchCartLineApi.js → order/src/apis/ManageMetaOrderApi.js} +41 -46
  37. package/order/src/apis/ManageOrderApi.d.ts +8 -8
  38. package/order/src/apis/ManageOrderApi.js +10 -9
  39. package/order/src/apis/index.d.ts +1 -2
  40. package/order/src/apis/index.js +1 -2
  41. package/order/src/models/AnyMetaOrderWarning.d.ts +26 -0
  42. package/order/src/models/AnyMetaOrderWarning.js +50 -0
  43. package/order/src/models/MetaOrder.d.ts +64 -0
  44. package/order/src/models/MetaOrder.js +70 -0
  45. package/order/src/models/MetaOrderCreationParameters.d.ts +38 -0
  46. package/order/src/models/MetaOrderCreationParameters.js +52 -0
  47. package/order/src/models/MetaOrderCreationSubCartParameters.d.ts +31 -0
  48. package/order/src/models/MetaOrderCreationSubCartParameters.js +47 -0
  49. package/order/src/models/MetaOrderPrices.d.ts +79 -0
  50. package/order/src/models/MetaOrderPrices.js +79 -0
  51. package/order/src/models/MetaOrderWarning.d.ts +31 -0
  52. package/order/src/models/MetaOrderWarning.js +47 -0
  53. package/order/src/models/MetaOrderWithWarnings.d.ts +39 -0
  54. package/order/src/models/MetaOrderWithWarnings.js +49 -0
  55. package/order/src/models/Order.d.ts +75 -80
  56. package/order/src/models/Order.js +48 -53
  57. package/order/src/models/OrderItemPrices.d.ts +3 -3
  58. package/order/src/models/{ForeorderItemWarning.d.ts → OrderItemWarning.d.ts} +18 -23
  59. package/order/src/models/{ForeorderItemWarning.js → OrderItemWarning.js} +15 -18
  60. package/order/src/models/OrderWarning.d.ts +51 -0
  61. package/order/src/models/{ForeorderWarning.js → OrderWarning.js} +12 -12
  62. package/order/src/models/RestError.d.ts +5 -3
  63. package/order/src/models/RestError.js +5 -3
  64. package/order/src/models/ShoppedOffer.d.ts +2 -2
  65. package/order/src/models/ShoppedOffer.js +2 -2
  66. package/order/src/models/index.d.ts +9 -17
  67. package/order/src/models/index.js +9 -17
  68. package/package.json +1 -1
  69. package/product/src/models/RestError.d.ts +5 -3
  70. package/product/src/models/RestError.js +5 -3
  71. package/pub/src/models/RestError.d.ts +5 -3
  72. package/pub/src/models/RestError.js +5 -3
  73. package/rfx/src/models/RestError.d.ts +5 -3
  74. package/rfx/src/models/RestError.js +5 -3
  75. package/sale-offer/src/models/RestError.d.ts +5 -3
  76. package/sale-offer/src/models/RestError.js +5 -3
  77. package/servant/src/models/RestError.d.ts +5 -3
  78. package/servant/src/models/RestError.js +5 -3
  79. package/shipment/src/models/RestError.d.ts +5 -3
  80. package/shipment/src/models/RestError.js +5 -3
  81. package/shopping-cart/src/apis/ManageCartApi.d.ts +24 -35
  82. package/shopping-cart/src/apis/ManageCartApi.js +120 -57
  83. package/shopping-cart/src/apis/ManageCartSubCartApi.d.ts +107 -0
  84. package/shopping-cart/src/apis/ManageCartSubCartApi.js +556 -0
  85. package/shopping-cart/src/apis/ManageCartSubCartLineApi.d.ts +151 -0
  86. package/shopping-cart/src/apis/ManageCartSubCartLineApi.js +879 -0
  87. package/shopping-cart/src/apis/index.d.ts +2 -3
  88. package/shopping-cart/src/apis/index.js +2 -3
  89. package/shopping-cart/src/models/Cart.d.ts +4 -61
  90. package/shopping-cart/src/models/Cart.js +2 -47
  91. package/shopping-cart/src/models/CartSubCart.d.ts +76 -0
  92. package/shopping-cart/src/models/CartSubCart.js +78 -0
  93. package/shopping-cart/src/models/{CartLine.d.ts → CartSubCartLine.d.ts} +13 -13
  94. package/shopping-cart/src/models/{CartLine.js → CartSubCartLine.js} +11 -11
  95. package/shopping-cart/src/models/CartSubCartLineUpdateParameters.d.ts +37 -0
  96. package/shopping-cart/src/models/CartSubCartLineUpdateParameters.js +49 -0
  97. package/shopping-cart/src/models/{CartTransport.d.ts → CartSubCartTransport.d.ts} +12 -12
  98. package/shopping-cart/src/models/{CartTransport.js → CartSubCartTransport.js} +11 -11
  99. package/shopping-cart/src/models/RestError.d.ts +5 -3
  100. package/shopping-cart/src/models/RestError.js +5 -3
  101. package/shopping-cart/src/models/ShoppedOffer.d.ts +2 -2
  102. package/shopping-cart/src/models/ShoppedOffer.js +2 -2
  103. package/shopping-cart/src/models/index.d.ts +4 -12
  104. package/shopping-cart/src/models/index.js +4 -12
  105. package/smuggler/src/models/RestError.d.ts +5 -3
  106. package/smuggler/src/models/RestError.js +5 -3
  107. package/statistic/src/models/RestError.d.ts +5 -3
  108. package/statistic/src/models/RestError.js +5 -3
  109. package/third-party/src/models/RestError.d.ts +5 -3
  110. package/third-party/src/models/RestError.js +5 -3
  111. package/ubo/src/models/RestError.d.ts +5 -3
  112. package/ubo/src/models/RestError.js +5 -3
  113. package/user/src/models/RestError.d.ts +5 -3
  114. package/user/src/models/RestError.js +5 -3
  115. package/wish/src/models/RestError.d.ts +5 -3
  116. package/wish/src/models/RestError.js +5 -3
  117. package/magic-cart/src/models/ShoppedOffer.d.ts +0 -43
  118. package/magic-cart/src/models/ShoppedOffer.js +0 -53
  119. package/order/src/apis/ManageForeorderApi.d.ts +0 -31
  120. package/order/src/apis/ManageForeorderApi.js +0 -163
  121. package/order/src/apis/SearchForeorderItemApi.d.ts +0 -44
  122. package/order/src/apis/SearchForeorderItemApi.js +0 -175
  123. package/order/src/models/AnyForeorderCreationParameters.d.ts +0 -23
  124. package/order/src/models/AnyForeorderCreationParameters.js +0 -45
  125. package/order/src/models/AnyForeorderWarning.d.ts +0 -26
  126. package/order/src/models/AnyForeorderWarning.js +0 -50
  127. package/order/src/models/AnyOrderCreationParameters.d.ts +0 -26
  128. package/order/src/models/AnyOrderCreationParameters.js +0 -50
  129. package/order/src/models/AnySource.d.ts +0 -26
  130. package/order/src/models/AnySource.js +0 -50
  131. package/order/src/models/CartForeorderCreationParameters.d.ts +0 -37
  132. package/order/src/models/CartForeorderCreationParameters.js +0 -51
  133. package/order/src/models/CartSource.d.ts +0 -37
  134. package/order/src/models/CartSource.js +0 -49
  135. package/order/src/models/CloneOrderCreationParameters.d.ts +0 -37
  136. package/order/src/models/CloneOrderCreationParameters.js +0 -51
  137. package/order/src/models/Foreorder.d.ts +0 -155
  138. package/order/src/models/Foreorder.js +0 -128
  139. package/order/src/models/ForeorderCreationParameters.d.ts +0 -31
  140. package/order/src/models/ForeorderCreationParameters.js +0 -47
  141. package/order/src/models/ForeorderCreationResponse.d.ts +0 -39
  142. package/order/src/models/ForeorderCreationResponse.js +0 -53
  143. package/order/src/models/ForeorderOrderCreationParameters.d.ts +0 -37
  144. package/order/src/models/ForeorderOrderCreationParameters.js +0 -51
  145. package/order/src/models/ForeorderWarning.d.ts +0 -51
  146. package/order/src/models/ForeorderWarningBase.d.ts +0 -37
  147. package/order/src/models/ForeorderWarningBase.js +0 -51
  148. package/order/src/models/OrderCreationParameters.d.ts +0 -31
  149. package/order/src/models/OrderCreationParameters.js +0 -47
  150. package/order/src/models/OrderSource.d.ts +0 -37
  151. package/order/src/models/OrderSource.js +0 -49
  152. package/order/src/models/Source.d.ts +0 -31
  153. package/order/src/models/Source.js +0 -45
  154. package/shopping-cart/src/apis/ManageCartLineApi.d.ts +0 -45
  155. package/shopping-cart/src/apis/ManageCartLineApi.js +0 -238
  156. package/shopping-cart/src/apis/SearchCartApi.d.ts +0 -59
  157. package/shopping-cart/src/apis/SearchCartApi.js +0 -267
  158. package/shopping-cart/src/apis/SearchCartLineApi.d.ts +0 -41
  159. package/shopping-cart/src/models/CartCreationParameters.d.ts +0 -44
  160. package/shopping-cart/src/models/CartCreationParameters.js +0 -56
  161. package/shopping-cart/src/models/CartLineUpdateParameters.d.ts +0 -37
  162. package/shopping-cart/src/models/CartLineUpdateParameters.js +0 -49
  163. package/shopping-cart/src/models/CartLineWithWarnings.d.ts +0 -39
  164. package/shopping-cart/src/models/CartLineWithWarnings.js +0 -49
  165. package/shopping-cart/src/models/CartSummary.d.ts +0 -31
  166. package/shopping-cart/src/models/CartSummary.js +0 -47
  167. package/shopping-cart/src/models/CartUpdateParameters.d.ts +0 -31
  168. package/shopping-cart/src/models/CartUpdateParameters.js +0 -45
  169. package/shopping-cart/src/models/CartWarning.d.ts +0 -70
  170. package/shopping-cart/src/models/CartWarning.js +0 -67
  171. package/shopping-cart/src/models/CartsWithWarnings.d.ts +0 -39
  172. package/shopping-cart/src/models/CartsWithWarnings.js +0 -49
  173. package/shopping-cart/src/models/OwnerLink.d.ts +0 -43
  174. package/shopping-cart/src/models/OwnerLink.js +0 -53
  175. package/shopping-cart/src/models/PaginatedCarts.d.ts +0 -46
  176. package/shopping-cart/src/models/PaginatedCarts.js +0 -58
  177. package/shopping-cart/src/models/PagingMetadata.d.ts +0 -49
  178. package/shopping-cart/src/models/PagingMetadata.js +0 -55
@@ -1,49 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * lcdp-monolith-service
6
- * This is the REST API of LCDP orders
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.OrderSourceToJSON = exports.OrderSourceFromJSONTyped = exports.OrderSourceFromJSON = exports.instanceOfOrderSource = void 0;
17
- /**
18
- * Check if a given object implements the OrderSource interface.
19
- */
20
- function instanceOfOrderSource(value) {
21
- if (!('reference' in value) || value['reference'] === undefined)
22
- return false;
23
- return true;
24
- }
25
- exports.instanceOfOrderSource = instanceOfOrderSource;
26
- function OrderSourceFromJSON(json) {
27
- return OrderSourceFromJSONTyped(json, false);
28
- }
29
- exports.OrderSourceFromJSON = OrderSourceFromJSON;
30
- function OrderSourceFromJSONTyped(json, ignoreDiscriminator) {
31
- if (json == null) {
32
- return json;
33
- }
34
- return {
35
- 'source': json['source'],
36
- 'reference': json['reference'],
37
- };
38
- }
39
- exports.OrderSourceFromJSONTyped = OrderSourceFromJSONTyped;
40
- function OrderSourceToJSON(value) {
41
- if (value == null) {
42
- return value;
43
- }
44
- return {
45
- 'source': value['source'],
46
- 'reference': value['reference'],
47
- };
48
- }
49
- exports.OrderSourceToJSON = OrderSourceToJSON;
@@ -1,31 +0,0 @@
1
- /**
2
- * lcdp-monolith-service
3
- * This is the REST API of LCDP orders
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
- /**
13
- *
14
- * @export
15
- * @interface Source
16
- */
17
- export interface Source {
18
- /**
19
- * Source from which the object have been created
20
- * @type {string}
21
- * @memberof Source
22
- */
23
- source?: string;
24
- }
25
- /**
26
- * Check if a given object implements the Source interface.
27
- */
28
- export declare function instanceOfSource(value: object): value is Source;
29
- export declare function SourceFromJSON(json: any): Source;
30
- export declare function SourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Source;
31
- export declare function SourceToJSON(value?: Source | null): any;
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * lcdp-monolith-service
6
- * This is the REST API of LCDP orders
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.SourceToJSON = exports.SourceFromJSONTyped = exports.SourceFromJSON = exports.instanceOfSource = void 0;
17
- /**
18
- * Check if a given object implements the Source interface.
19
- */
20
- function instanceOfSource(value) {
21
- return true;
22
- }
23
- exports.instanceOfSource = instanceOfSource;
24
- function SourceFromJSON(json) {
25
- return SourceFromJSONTyped(json, false);
26
- }
27
- exports.SourceFromJSON = SourceFromJSON;
28
- function SourceFromJSONTyped(json, ignoreDiscriminator) {
29
- if (json == null) {
30
- return json;
31
- }
32
- return {
33
- 'source': json['source'],
34
- };
35
- }
36
- exports.SourceFromJSONTyped = SourceFromJSONTyped;
37
- function SourceToJSON(value) {
38
- if (value == null) {
39
- return value;
40
- }
41
- return {
42
- 'source': value['source'],
43
- };
44
- }
45
- exports.SourceToJSON = SourceToJSON;
@@ -1,45 +0,0 @@
1
- /**
2
- * lcdp-monolith-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 * as runtime from '../runtime';
13
- import type { CartLineUpdateParameters, CartLineWithWarnings } from '../models/index';
14
- export interface DeleteCartLineRequest {
15
- cartId: number;
16
- lineId: number;
17
- }
18
- export interface UpdateCartLineRequest {
19
- cartId: number;
20
- lineId: number;
21
- cartLineUpdateParameters: CartLineUpdateParameters;
22
- }
23
- /**
24
- *
25
- */
26
- export declare class ManageCartLineApi extends runtime.BaseAPI {
27
- /**
28
- * Delete a shopping cart line. Note: Deleting a cart line does not delete the parent cart, even if it\'s the last line. The associated ad (sale offer) is not affected by this deletion.
29
- * Delete a cart line
30
- */
31
- deleteCartLineRaw(requestParameters: DeleteCartLineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
32
- /**
33
- * Delete a shopping cart line. Note: Deleting a cart line does not delete the parent cart, even if it\'s the last line. The associated ad (sale offer) is not affected by this deletion.
34
- * Delete a cart line
35
- */
36
- deleteCartLine(requestParameters: DeleteCartLineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
37
- /**
38
- * Update a cart line
39
- */
40
- updateCartLineRaw(requestParameters: UpdateCartLineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CartLineWithWarnings | runtime.BlobWithMeta>>;
41
- /**
42
- * Update a cart line
43
- */
44
- updateCartLine(requestParameters: UpdateCartLineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CartLineWithWarnings | runtime.BlobWithMeta>;
45
- }
@@ -1,238 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * lcdp-monolith-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
- var __extends = (this && this.__extends) || (function () {
16
- var extendStatics = function (d, b) {
17
- extendStatics = Object.setPrototypeOf ||
18
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
- return extendStatics(d, b);
21
- };
22
- return function (d, b) {
23
- if (typeof b !== "function" && b !== null)
24
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
- extendStatics(d, b);
26
- function __() { this.constructor = d; }
27
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
- };
29
- })();
30
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
- return new (P || (P = Promise))(function (resolve, reject) {
33
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
34
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
35
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36
- step((generator = generator.apply(thisArg, _arguments || [])).next());
37
- });
38
- };
39
- var __generator = (this && this.__generator) || function (thisArg, body) {
40
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
41
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
42
- function verb(n) { return function (v) { return step([n, v]); }; }
43
- function step(op) {
44
- if (f) throw new TypeError("Generator is already executing.");
45
- while (_) try {
46
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
47
- if (y = 0, t) op = [op[0] & 2, t.value];
48
- switch (op[0]) {
49
- case 0: case 1: t = op; break;
50
- case 4: _.label++; return { value: op[1], done: false };
51
- case 5: _.label++; y = op[1]; op = [0]; continue;
52
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
53
- default:
54
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
55
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
56
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
57
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
58
- if (t[2]) _.ops.pop();
59
- _.trys.pop(); continue;
60
- }
61
- op = body.call(thisArg, _);
62
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
63
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
64
- }
65
- };
66
- Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.ManageCartLineApi = void 0;
68
- var runtime = require("../runtime");
69
- var index_1 = require("../models/index");
70
- /**
71
- *
72
- */
73
- var ManageCartLineApi = /** @class */ (function (_super) {
74
- __extends(ManageCartLineApi, _super);
75
- function ManageCartLineApi() {
76
- return _super !== null && _super.apply(this, arguments) || this;
77
- }
78
- /**
79
- * Delete a shopping cart line. Note: Deleting a cart line does not delete the parent cart, even if it\'s the last line. The associated ad (sale offer) is not affected by this deletion.
80
- * Delete a cart line
81
- */
82
- ManageCartLineApi.prototype.deleteCartLineRaw = function (requestParameters, initOverrides) {
83
- return __awaiter(this, void 0, void 0, function () {
84
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_1;
85
- return __generator(this, function (_c) {
86
- switch (_c.label) {
87
- case 0:
88
- if (requestParameters['cartId'] == null) {
89
- throw new runtime.RequiredError('cartId', 'Required parameter "cartId" was null or undefined when calling deleteCartLine().');
90
- }
91
- if (requestParameters['lineId'] == null) {
92
- throw new runtime.RequiredError('lineId', 'Required parameter "lineId" was null or undefined when calling deleteCartLine().');
93
- }
94
- queryParameters = {};
95
- headerParameters = {};
96
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
97
- _a = headerParameters;
98
- _b = "x-api-key";
99
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
100
- case 1:
101
- _a[_b] = _c.sent(); // apiKeyAuth authentication
102
- _c.label = 2;
103
- case 2:
104
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
105
- token = this.configuration.accessToken;
106
- return [4 /*yield*/, token("bearerAuth", [])];
107
- case 3:
108
- tokenString = _c.sent();
109
- if (tokenString) {
110
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
111
- }
112
- _c.label = 4;
113
- case 4:
114
- _c.trys.push([4, 6, , 7]);
115
- return [4 /*yield*/, this.request({
116
- path: "/carts/{cartId}/lines/{lineId}".replace("{".concat("cartId", "}"), encodeURIComponent(String(requestParameters['cartId']))).replace("{".concat("lineId", "}"), encodeURIComponent(String(requestParameters['lineId']))),
117
- method: 'DELETE',
118
- headers: headerParameters,
119
- query: queryParameters,
120
- }, initOverrides)];
121
- case 5:
122
- response = _c.sent();
123
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
124
- case 6:
125
- response_1 = _c.sent();
126
- console.debug(response_1);
127
- throw response_1;
128
- case 7: return [2 /*return*/];
129
- }
130
- });
131
- });
132
- };
133
- /**
134
- * Delete a shopping cart line. Note: Deleting a cart line does not delete the parent cart, even if it\'s the last line. The associated ad (sale offer) is not affected by this deletion.
135
- * Delete a cart line
136
- */
137
- ManageCartLineApi.prototype.deleteCartLine = function (requestParameters, initOverrides) {
138
- return __awaiter(this, void 0, void 0, function () {
139
- return __generator(this, function (_a) {
140
- switch (_a.label) {
141
- case 0: return [4 /*yield*/, this.deleteCartLineRaw(requestParameters, initOverrides)];
142
- case 1:
143
- _a.sent();
144
- return [2 /*return*/];
145
- }
146
- });
147
- });
148
- };
149
- /**
150
- * Update a cart line
151
- */
152
- ManageCartLineApi.prototype.updateCartLineRaw = function (requestParameters, initOverrides) {
153
- return __awaiter(this, void 0, void 0, function () {
154
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_2;
155
- return __generator(this, function (_c) {
156
- switch (_c.label) {
157
- case 0:
158
- if (requestParameters['cartId'] == null) {
159
- throw new runtime.RequiredError('cartId', 'Required parameter "cartId" was null or undefined when calling updateCartLine().');
160
- }
161
- if (requestParameters['lineId'] == null) {
162
- throw new runtime.RequiredError('lineId', 'Required parameter "lineId" was null or undefined when calling updateCartLine().');
163
- }
164
- if (requestParameters['cartLineUpdateParameters'] == null) {
165
- throw new runtime.RequiredError('cartLineUpdateParameters', 'Required parameter "cartLineUpdateParameters" was null or undefined when calling updateCartLine().');
166
- }
167
- queryParameters = {};
168
- headerParameters = {};
169
- headerParameters['Content-Type'] = 'application/merge-patch+json';
170
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
171
- _a = headerParameters;
172
- _b = "x-api-key";
173
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
174
- case 1:
175
- _a[_b] = _c.sent(); // apiKeyAuth authentication
176
- _c.label = 2;
177
- case 2:
178
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
179
- token = this.configuration.accessToken;
180
- return [4 /*yield*/, token("bearerAuth", [])];
181
- case 3:
182
- tokenString = _c.sent();
183
- if (tokenString) {
184
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
185
- }
186
- _c.label = 4;
187
- case 4:
188
- _c.trys.push([4, 6, , 7]);
189
- return [4 /*yield*/, this.request({
190
- path: "/carts/{cartId}/lines/{lineId}".replace("{".concat("cartId", "}"), encodeURIComponent(String(requestParameters['cartId']))).replace("{".concat("lineId", "}"), encodeURIComponent(String(requestParameters['lineId']))),
191
- method: 'PATCH',
192
- headers: headerParameters,
193
- query: queryParameters,
194
- body: (0, index_1.CartLineUpdateParametersToJSON)(requestParameters['cartLineUpdateParameters']),
195
- }, initOverrides)];
196
- case 5:
197
- response = _c.sent();
198
- contentType = response.headers.get("content-type");
199
- if (contentType && contentType.indexOf("application/json") !== -1) {
200
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CartLineWithWarningsFromJSON)(jsonValue); })];
201
- }
202
- else if (contentType && contentType.indexOf("text/plain") !== -1) {
203
- return [2 /*return*/, new runtime.TextApiResponse(response)];
204
- }
205
- else {
206
- // TODO : Better handling of others application types
207
- return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
208
- }
209
- return [3 /*break*/, 7];
210
- case 6:
211
- response_2 = _c.sent();
212
- console.debug(response_2);
213
- throw response_2;
214
- case 7: return [2 /*return*/];
215
- }
216
- });
217
- });
218
- };
219
- /**
220
- * Update a cart line
221
- */
222
- ManageCartLineApi.prototype.updateCartLine = function (requestParameters, initOverrides) {
223
- return __awaiter(this, void 0, void 0, function () {
224
- var response;
225
- return __generator(this, function (_a) {
226
- switch (_a.label) {
227
- case 0: return [4 /*yield*/, this.updateCartLineRaw(requestParameters, initOverrides)];
228
- case 1:
229
- response = _a.sent();
230
- return [4 /*yield*/, response.value()];
231
- case 2: return [2 /*return*/, _a.sent()];
232
- }
233
- });
234
- });
235
- };
236
- return ManageCartLineApi;
237
- }(runtime.BaseAPI));
238
- exports.ManageCartLineApi = ManageCartLineApi;
@@ -1,59 +0,0 @@
1
- /**
2
- * lcdp-monolith-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 * as runtime from '../runtime';
13
- import type { Cart, PaginatedCarts } from '../models/index';
14
- export interface GetCartRequest {
15
- cartId: number;
16
- }
17
- export interface GetCartsRequest {
18
- oEq?: Array<number>;
19
- sEq?: Array<number>;
20
- channelEq?: Array<string>;
21
- orderBy?: GetCartsOrderByEnum;
22
- p?: number;
23
- pp?: number;
24
- }
25
- /**
26
- *
27
- */
28
- export declare class SearchCartApi extends runtime.BaseAPI {
29
- /**
30
- * Retrieve a single cart by its unique identifier.
31
- * Get a cart by ID
32
- */
33
- getCartRaw(requestParameters: GetCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Cart | runtime.BlobWithMeta>>;
34
- /**
35
- * Retrieve a single cart by its unique identifier.
36
- * Get a cart by ID
37
- */
38
- getCart(requestParameters: GetCartRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Cart | runtime.BlobWithMeta>;
39
- /**
40
- * Search and retrieve carts with filtering, sorting and pagination. Note: Empty carts (carts with no lines) are automatically excluded from results.
41
- * Search carts
42
- */
43
- getCartsRaw(requestParameters: GetCartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedCarts | runtime.BlobWithMeta>>;
44
- /**
45
- * Search and retrieve carts with filtering, sorting and pagination. Note: Empty carts (carts with no lines) are automatically excluded from results.
46
- * Search carts
47
- */
48
- getCarts(requestParameters?: GetCartsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedCarts | runtime.BlobWithMeta>;
49
- }
50
- /**
51
- * @export
52
- */
53
- export declare const GetCartsOrderByEnum: {
54
- readonly UPDATED_AT_ASC: "UPDATED_AT:asc";
55
- readonly UPDATED_AT_DESC: "UPDATED_AT:desc";
56
- readonly TOTAL_EXCLUDING_TAXES_ASC: "TOTAL_EXCLUDING_TAXES:asc";
57
- readonly TOTAL_EXCLUDING_TAXES_DESC: "TOTAL_EXCLUDING_TAXES:desc";
58
- };
59
- export declare type GetCartsOrderByEnum = typeof GetCartsOrderByEnum[keyof typeof GetCartsOrderByEnum];