@lcdp/api-react-rest-client 2.14.3-LDS-4892.18154750151 → 2.14.3-LDS-4918-avoid-infinite-error-on-smuggle.18157164080

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 (69) hide show
  1. package/package.json +1 -1
  2. package/rfx/src/apis/index.d.ts +0 -1
  3. package/rfx/src/apis/index.js +0 -1
  4. package/rfx/src/models/index.d.ts +0 -1
  5. package/rfx/src/models/index.js +0 -1
  6. package/subscription/src/apis/ManageSubscriptionApi.d.ts +56 -0
  7. package/subscription/src/apis/ManageSubscriptionApi.js +315 -0
  8. package/subscription/src/apis/ManageSubscriptionPlanApi.d.ts +30 -0
  9. package/{rfx/src/apis/ManageRffApi.js → subscription/src/apis/ManageSubscriptionPlanApi.js} +39 -21
  10. package/subscription/src/apis/SearchSubscriptionApi.d.ts +53 -0
  11. package/subscription/src/apis/SearchSubscriptionApi.js +208 -0
  12. package/subscription/src/apis/SearchSubscriptionPlanApi.d.ts +49 -0
  13. package/subscription/src/apis/SearchSubscriptionPlanApi.js +249 -0
  14. package/subscription/src/apis/SearchSubscriptionPlanFeatureApi.d.ts +26 -0
  15. package/subscription/src/apis/{SearchSubscriptionsApi.js → SearchSubscriptionPlanFeatureApi.js} +13 -19
  16. package/subscription/src/apis/index.d.ts +5 -1
  17. package/subscription/src/apis/index.js +5 -1
  18. package/subscription/src/models/HttpLink.d.ts +31 -0
  19. package/subscription/src/models/HttpLink.js +47 -0
  20. package/subscription/src/models/PaginatedObject.d.ts +32 -0
  21. package/subscription/src/models/PaginatedObject.js +48 -0
  22. package/subscription/src/models/PaginatedSubscriptions.d.ts +39 -0
  23. package/subscription/src/models/PaginatedSubscriptions.js +51 -0
  24. package/subscription/src/models/PagingMetadata.d.ts +49 -0
  25. package/subscription/src/models/PagingMetadata.js +55 -0
  26. package/{chargebee-hook → subscription}/src/models/RestError.d.ts +1 -1
  27. package/{chargebee-hook → subscription}/src/models/RestError.js +1 -1
  28. package/subscription/src/models/SubscriberLink.d.ts +37 -0
  29. package/subscription/src/models/SubscriberLink.js +49 -0
  30. package/subscription/src/models/Subscription.d.ts +38 -6
  31. package/subscription/src/models/Subscription.js +19 -6
  32. package/subscription/src/models/SubscriptionCreationParameters.d.ts +44 -0
  33. package/subscription/src/models/SubscriptionCreationParameters.js +56 -0
  34. package/subscription/src/models/SubscriptionPlan.d.ts +69 -0
  35. package/subscription/src/models/SubscriptionPlan.js +59 -0
  36. package/subscription/src/models/SubscriptionPlanFeature.d.ts +44 -0
  37. package/subscription/src/models/SubscriptionPlanFeature.js +50 -0
  38. package/subscription/src/models/SubscriptionPlanFeatureId.d.ts +26 -0
  39. package/subscription/src/models/SubscriptionPlanFeatureId.js +49 -0
  40. package/subscription/src/models/SubscriptionPlanId.d.ts +25 -0
  41. package/subscription/src/models/SubscriptionPlanId.js +48 -0
  42. package/subscription/src/models/SubscriptionPlanLink.d.ts +38 -0
  43. package/subscription/src/models/SubscriptionPlanLink.js +50 -0
  44. package/subscription/src/models/SubscriptionPlanUpdateParameters.d.ts +62 -0
  45. package/subscription/src/models/SubscriptionPlanUpdateParameters.js +56 -0
  46. package/subscription/src/models/SubscriptionUpdateParameters.d.ts +62 -0
  47. package/subscription/src/models/SubscriptionUpdateParameters.js +57 -0
  48. package/subscription/src/models/index.d.ts +14 -0
  49. package/subscription/src/models/index.js +14 -0
  50. package/third-party/src/models/ThirdPartyLinkCreationParameters.d.ts +2 -5
  51. package/third-party/src/models/ThirdPartyLinkCreationParameters.js +2 -5
  52. package/chargebee-hook/index.d.ts +0 -1
  53. package/chargebee-hook/index.js +0 -17
  54. package/chargebee-hook/src/apis/ChargebeeHookApi.d.ts +0 -31
  55. package/chargebee-hook/src/apis/ChargebeeHookApi.js +0 -134
  56. package/chargebee-hook/src/apis/index.d.ts +0 -1
  57. package/chargebee-hook/src/apis/index.js +0 -19
  58. package/chargebee-hook/src/index.d.ts +0 -3
  59. package/chargebee-hook/src/index.js +0 -21
  60. package/chargebee-hook/src/models/HookRequest.d.ts +0 -85
  61. package/chargebee-hook/src/models/HookRequest.js +0 -67
  62. package/chargebee-hook/src/models/index.d.ts +0 -2
  63. package/chargebee-hook/src/models/index.js +0 -20
  64. package/chargebee-hook/src/runtime.d.ts +0 -190
  65. package/chargebee-hook/src/runtime.js +0 -598
  66. package/rfx/src/apis/ManageRffApi.d.ts +0 -29
  67. package/rfx/src/models/RffCreationParameters.d.ts +0 -37
  68. package/rfx/src/models/RffCreationParameters.js +0 -51
  69. package/subscription/src/apis/SearchSubscriptionsApi.d.ts +0 -29
@@ -0,0 +1,208 @@
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.GetSubscriptionsOrderByEnum = exports.SearchSubscriptionApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var SearchSubscriptionApi = /** @class */ (function (_super) {
74
+ __extends(SearchSubscriptionApi, _super);
75
+ function SearchSubscriptionApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ * Get subscriptions
80
+ */
81
+ SearchSubscriptionApi.prototype.getSubscriptionsRaw = function (requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
84
+ return __generator(this, function (_c) {
85
+ switch (_c.label) {
86
+ case 0:
87
+ if (requestParameters['p'] == null) {
88
+ throw new runtime.RequiredError('p', 'Required parameter "p" was null or undefined when calling getSubscriptions().');
89
+ }
90
+ if (requestParameters['pp'] == null) {
91
+ throw new runtime.RequiredError('pp', 'Required parameter "pp" was null or undefined when calling getSubscriptions().');
92
+ }
93
+ queryParameters = {};
94
+ if (requestParameters['sEq'] != null) {
95
+ queryParameters['s[eq]'] = requestParameters['sEq'];
96
+ }
97
+ if (requestParameters['idEq'] != null) {
98
+ queryParameters['id[eq]'] = requestParameters['idEq'];
99
+ }
100
+ if (requestParameters['isTrialEq'] != null) {
101
+ queryParameters['isTrial[eq]'] = requestParameters['isTrialEq'];
102
+ }
103
+ if (requestParameters['validFromLte'] != null) {
104
+ queryParameters['validFrom[lte]'] = runtime.toDateISOString(requestParameters['validFromLte']);
105
+ }
106
+ if (requestParameters['validFromGt'] != null) {
107
+ queryParameters['validFrom[gt]'] = runtime.toDateISOString(requestParameters['validFromGt']);
108
+ }
109
+ if (requestParameters['validToLte'] != null) {
110
+ queryParameters['validTo[lte]'] = runtime.toDateISOString(requestParameters['validToLte']);
111
+ }
112
+ if (requestParameters['validToGt'] != null) {
113
+ queryParameters['validTo[gt]'] = runtime.toDateISOString(requestParameters['validToGt']);
114
+ }
115
+ if (requestParameters['pEq'] != null) {
116
+ queryParameters['p[eq]'] = requestParameters['pEq'];
117
+ }
118
+ if (requestParameters['orderBy'] != null) {
119
+ queryParameters['orderBy'] = requestParameters['orderBy'];
120
+ }
121
+ if (requestParameters['p'] != null) {
122
+ queryParameters['p'] = requestParameters['p'];
123
+ }
124
+ if (requestParameters['pp'] != null) {
125
+ queryParameters['pp'] = requestParameters['pp'];
126
+ }
127
+ headerParameters = {};
128
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
129
+ _a = headerParameters;
130
+ _b = "x-api-key";
131
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
132
+ case 1:
133
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
134
+ _c.label = 2;
135
+ case 2:
136
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
137
+ token = this.configuration.accessToken;
138
+ return [4 /*yield*/, token("bearerAuth", [])];
139
+ case 3:
140
+ tokenString = _c.sent();
141
+ if (tokenString) {
142
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
143
+ }
144
+ _c.label = 4;
145
+ case 4:
146
+ _c.trys.push([4, 6, , 7]);
147
+ return [4 /*yield*/, this.request({
148
+ path: "/subscriptions",
149
+ method: 'GET',
150
+ headers: headerParameters,
151
+ query: queryParameters,
152
+ }, initOverrides)];
153
+ case 5:
154
+ response = _c.sent();
155
+ contentType = response.headers.get("content-type");
156
+ if (contentType && contentType.indexOf("application/json") !== -1) {
157
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PaginatedSubscriptionsFromJSON)(jsonValue); })];
158
+ }
159
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
160
+ return [2 /*return*/, new runtime.TextApiResponse(response)];
161
+ }
162
+ else {
163
+ // TODO : Better handling of others application types
164
+ return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
165
+ }
166
+ return [3 /*break*/, 7];
167
+ case 6:
168
+ response_1 = _c.sent();
169
+ console.debug(response_1);
170
+ throw response_1;
171
+ case 7: return [2 /*return*/];
172
+ }
173
+ });
174
+ });
175
+ };
176
+ /**
177
+ * Get subscriptions
178
+ */
179
+ SearchSubscriptionApi.prototype.getSubscriptions = function (requestParameters, initOverrides) {
180
+ return __awaiter(this, void 0, void 0, function () {
181
+ var response;
182
+ return __generator(this, function (_a) {
183
+ switch (_a.label) {
184
+ case 0: return [4 /*yield*/, this.getSubscriptionsRaw(requestParameters, initOverrides)];
185
+ case 1:
186
+ response = _a.sent();
187
+ return [4 /*yield*/, response.value()];
188
+ case 2: return [2 /*return*/, _a.sent()];
189
+ }
190
+ });
191
+ });
192
+ };
193
+ return SearchSubscriptionApi;
194
+ }(runtime.BaseAPI));
195
+ exports.SearchSubscriptionApi = SearchSubscriptionApi;
196
+ /**
197
+ * @export
198
+ */
199
+ exports.GetSubscriptionsOrderByEnum = {
200
+ VALID_FROM_ASC: 'VALID_FROM:ASC',
201
+ VALID_FROM_DESC: 'VALID_FROM:DESC',
202
+ VALID_TO_ASC: 'VALID_TO:ASC',
203
+ VALID_TO_DESC: 'VALID_TO:DESC',
204
+ NEXT_BILLING_DATE_ASC: 'NEXT_BILLING_DATE:ASC',
205
+ NEXT_BILLING_DATE_DESC: 'NEXT_BILLING_DATE:DESC',
206
+ PLAN_ID_ASC: 'PLAN_ID:ASC',
207
+ PLAN_ID_DESC: 'PLAN_ID:DESC'
208
+ };
@@ -0,0 +1,49 @@
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 { SubscriptionPlan, SubscriptionPlanId } from '../models/index';
14
+ export interface GetSubscriptionPlanRequest {
15
+ subscriptionPlanId: SubscriptionPlanId;
16
+ }
17
+ export interface GetSubscriptionPlansRequest {
18
+ activeEq?: boolean;
19
+ orderBy?: GetSubscriptionPlansOrderByEnum;
20
+ }
21
+ /**
22
+ *
23
+ */
24
+ export declare class SearchSubscriptionPlanApi extends runtime.BaseAPI {
25
+ /**
26
+ * Get subscription plan
27
+ */
28
+ getSubscriptionPlanRaw(requestParameters: GetSubscriptionPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionPlan | runtime.BlobWithMeta>>;
29
+ /**
30
+ * Get subscription plan
31
+ */
32
+ getSubscriptionPlan(requestParameters: GetSubscriptionPlanRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionPlan | runtime.BlobWithMeta>;
33
+ /**
34
+ * Get all subscription plans
35
+ */
36
+ getSubscriptionPlansRaw(requestParameters: GetSubscriptionPlansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SubscriptionPlan> | runtime.BlobWithMeta>>;
37
+ /**
38
+ * Get all subscription plans
39
+ */
40
+ getSubscriptionPlans(requestParameters?: GetSubscriptionPlansRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SubscriptionPlan> | runtime.BlobWithMeta>;
41
+ }
42
+ /**
43
+ * @export
44
+ */
45
+ export declare const GetSubscriptionPlansOrderByEnum: {
46
+ readonly ASC: "POSITION:asc";
47
+ readonly DESC: "POSITION:desc";
48
+ };
49
+ export declare type GetSubscriptionPlansOrderByEnum = typeof GetSubscriptionPlansOrderByEnum[keyof typeof GetSubscriptionPlansOrderByEnum];
@@ -0,0 +1,249 @@
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.GetSubscriptionPlansOrderByEnum = exports.SearchSubscriptionPlanApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var SearchSubscriptionPlanApi = /** @class */ (function (_super) {
74
+ __extends(SearchSubscriptionPlanApi, _super);
75
+ function SearchSubscriptionPlanApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ * Get subscription plan
80
+ */
81
+ SearchSubscriptionPlanApi.prototype.getSubscriptionPlanRaw = function (requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
84
+ return __generator(this, function (_c) {
85
+ switch (_c.label) {
86
+ case 0:
87
+ if (requestParameters['subscriptionPlanId'] == null) {
88
+ throw new runtime.RequiredError('subscriptionPlanId', 'Required parameter "subscriptionPlanId" was null or undefined when calling getSubscriptionPlan().');
89
+ }
90
+ queryParameters = {};
91
+ headerParameters = {};
92
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
93
+ _a = headerParameters;
94
+ _b = "x-api-key";
95
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
96
+ case 1:
97
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
98
+ _c.label = 2;
99
+ case 2:
100
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
101
+ token = this.configuration.accessToken;
102
+ return [4 /*yield*/, token("bearerAuth", [])];
103
+ case 3:
104
+ tokenString = _c.sent();
105
+ if (tokenString) {
106
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
107
+ }
108
+ _c.label = 4;
109
+ case 4:
110
+ _c.trys.push([4, 6, , 7]);
111
+ return [4 /*yield*/, this.request({
112
+ path: "/subscriptions/plans/{subscriptionPlanId}".replace("{".concat("subscriptionPlanId", "}"), encodeURIComponent(String(requestParameters['subscriptionPlanId']))),
113
+ method: 'GET',
114
+ headers: headerParameters,
115
+ query: queryParameters,
116
+ }, initOverrides)];
117
+ case 5:
118
+ response = _c.sent();
119
+ contentType = response.headers.get("content-type");
120
+ if (contentType && contentType.indexOf("application/json") !== -1) {
121
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SubscriptionPlanFromJSON)(jsonValue); })];
122
+ }
123
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
124
+ return [2 /*return*/, new runtime.TextApiResponse(response)];
125
+ }
126
+ else {
127
+ // TODO : Better handling of others application types
128
+ return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
129
+ }
130
+ return [3 /*break*/, 7];
131
+ case 6:
132
+ response_1 = _c.sent();
133
+ console.debug(response_1);
134
+ throw response_1;
135
+ case 7: return [2 /*return*/];
136
+ }
137
+ });
138
+ });
139
+ };
140
+ /**
141
+ * Get subscription plan
142
+ */
143
+ SearchSubscriptionPlanApi.prototype.getSubscriptionPlan = function (requestParameters, initOverrides) {
144
+ return __awaiter(this, void 0, void 0, function () {
145
+ var response;
146
+ return __generator(this, function (_a) {
147
+ switch (_a.label) {
148
+ case 0: return [4 /*yield*/, this.getSubscriptionPlanRaw(requestParameters, initOverrides)];
149
+ case 1:
150
+ response = _a.sent();
151
+ return [4 /*yield*/, response.value()];
152
+ case 2: return [2 /*return*/, _a.sent()];
153
+ }
154
+ });
155
+ });
156
+ };
157
+ /**
158
+ * Get all subscription plans
159
+ */
160
+ SearchSubscriptionPlanApi.prototype.getSubscriptionPlansRaw = function (requestParameters, initOverrides) {
161
+ return __awaiter(this, void 0, void 0, function () {
162
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_2;
163
+ return __generator(this, function (_c) {
164
+ switch (_c.label) {
165
+ case 0:
166
+ queryParameters = {};
167
+ if (requestParameters['activeEq'] != null) {
168
+ queryParameters['active[eq]'] = requestParameters['activeEq'];
169
+ }
170
+ if (requestParameters['orderBy'] != null) {
171
+ queryParameters['orderBy'] = requestParameters['orderBy'];
172
+ }
173
+ headerParameters = {};
174
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
175
+ _a = headerParameters;
176
+ _b = "x-api-key";
177
+ return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
178
+ case 1:
179
+ _a[_b] = _c.sent(); // apiKeyAuth authentication
180
+ _c.label = 2;
181
+ case 2:
182
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
183
+ token = this.configuration.accessToken;
184
+ return [4 /*yield*/, token("bearerAuth", [])];
185
+ case 3:
186
+ tokenString = _c.sent();
187
+ if (tokenString) {
188
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
189
+ }
190
+ _c.label = 4;
191
+ case 4:
192
+ _c.trys.push([4, 6, , 7]);
193
+ return [4 /*yield*/, this.request({
194
+ path: "/subscriptions/plans",
195
+ method: 'GET',
196
+ headers: headerParameters,
197
+ query: queryParameters,
198
+ }, initOverrides)];
199
+ case 5:
200
+ response = _c.sent();
201
+ contentType = response.headers.get("content-type");
202
+ if (contentType && contentType.indexOf("application/json") !== -1) {
203
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.SubscriptionPlanFromJSON); })];
204
+ }
205
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
206
+ return [2 /*return*/, new runtime.TextApiResponse(response)];
207
+ }
208
+ else {
209
+ // TODO : Better handling of others application types
210
+ return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
211
+ }
212
+ return [3 /*break*/, 7];
213
+ case 6:
214
+ response_2 = _c.sent();
215
+ console.debug(response_2);
216
+ throw response_2;
217
+ case 7: return [2 /*return*/];
218
+ }
219
+ });
220
+ });
221
+ };
222
+ /**
223
+ * Get all subscription plans
224
+ */
225
+ SearchSubscriptionPlanApi.prototype.getSubscriptionPlans = function (requestParameters, initOverrides) {
226
+ if (requestParameters === void 0) { requestParameters = {}; }
227
+ return __awaiter(this, void 0, void 0, function () {
228
+ var response;
229
+ return __generator(this, function (_a) {
230
+ switch (_a.label) {
231
+ case 0: return [4 /*yield*/, this.getSubscriptionPlansRaw(requestParameters, initOverrides)];
232
+ case 1:
233
+ response = _a.sent();
234
+ return [4 /*yield*/, response.value()];
235
+ case 2: return [2 /*return*/, _a.sent()];
236
+ }
237
+ });
238
+ });
239
+ };
240
+ return SearchSubscriptionPlanApi;
241
+ }(runtime.BaseAPI));
242
+ exports.SearchSubscriptionPlanApi = SearchSubscriptionPlanApi;
243
+ /**
244
+ * @export
245
+ */
246
+ exports.GetSubscriptionPlansOrderByEnum = {
247
+ ASC: 'POSITION:asc',
248
+ DESC: 'POSITION:desc'
249
+ };
@@ -0,0 +1,26 @@
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 { SubscriptionPlanFeature } from '../models/index';
14
+ /**
15
+ *
16
+ */
17
+ export declare class SearchSubscriptionPlanFeatureApi extends runtime.BaseAPI {
18
+ /**
19
+ * Get all subscription plan features
20
+ */
21
+ getSubscriptionPlanFeaturesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SubscriptionPlanFeature> | runtime.BlobWithMeta>>;
22
+ /**
23
+ * Get all subscription plan features
24
+ */
25
+ getSubscriptionPlanFeatures(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SubscriptionPlanFeature> | runtime.BlobWithMeta>;
26
+ }
@@ -64,33 +64,27 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  }
65
65
  };
66
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.SearchSubscriptionsApi = void 0;
67
+ exports.SearchSubscriptionPlanFeatureApi = void 0;
68
68
  var runtime = require("../runtime");
69
69
  var index_1 = require("../models/index");
70
70
  /**
71
71
  *
72
72
  */
73
- var SearchSubscriptionsApi = /** @class */ (function (_super) {
74
- __extends(SearchSubscriptionsApi, _super);
75
- function SearchSubscriptionsApi() {
73
+ var SearchSubscriptionPlanFeatureApi = /** @class */ (function (_super) {
74
+ __extends(SearchSubscriptionPlanFeatureApi, _super);
75
+ function SearchSubscriptionPlanFeatureApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
78
  /**
79
- * Get subscriptions
79
+ * Get all subscription plan features
80
80
  */
81
- SearchSubscriptionsApi.prototype.getSubscriptionsRaw = function (requestParameters, initOverrides) {
81
+ SearchSubscriptionPlanFeatureApi.prototype.getSubscriptionPlanFeaturesRaw = function (initOverrides) {
82
82
  return __awaiter(this, void 0, void 0, function () {
83
83
  var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
84
84
  return __generator(this, function (_c) {
85
85
  switch (_c.label) {
86
86
  case 0:
87
- if (requestParameters['ownerIdEq'] == null) {
88
- throw new runtime.RequiredError('ownerIdEq', 'Required parameter "ownerIdEq" was null or undefined when calling getSubscriptions().');
89
- }
90
87
  queryParameters = {};
91
- if (requestParameters['ownerIdEq'] != null) {
92
- queryParameters['ownerId[eq]'] = requestParameters['ownerIdEq'];
93
- }
94
88
  headerParameters = {};
95
89
  if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
96
90
  _a = headerParameters;
@@ -112,7 +106,7 @@ var SearchSubscriptionsApi = /** @class */ (function (_super) {
112
106
  case 4:
113
107
  _c.trys.push([4, 6, , 7]);
114
108
  return [4 /*yield*/, this.request({
115
- path: "/subscriptions",
109
+ path: "/subscriptions/plans/features",
116
110
  method: 'GET',
117
111
  headers: headerParameters,
118
112
  query: queryParameters,
@@ -121,7 +115,7 @@ var SearchSubscriptionsApi = /** @class */ (function (_super) {
121
115
  response = _c.sent();
122
116
  contentType = response.headers.get("content-type");
123
117
  if (contentType && contentType.indexOf("application/json") !== -1) {
124
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.SubscriptionFromJSON); })];
118
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.SubscriptionPlanFeatureFromJSON); })];
125
119
  }
126
120
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
127
121
  return [2 /*return*/, new runtime.TextApiResponse(response)];
@@ -141,14 +135,14 @@ var SearchSubscriptionsApi = /** @class */ (function (_super) {
141
135
  });
142
136
  };
143
137
  /**
144
- * Get subscriptions
138
+ * Get all subscription plan features
145
139
  */
146
- SearchSubscriptionsApi.prototype.getSubscriptions = function (requestParameters, initOverrides) {
140
+ SearchSubscriptionPlanFeatureApi.prototype.getSubscriptionPlanFeatures = function (initOverrides) {
147
141
  return __awaiter(this, void 0, void 0, function () {
148
142
  var response;
149
143
  return __generator(this, function (_a) {
150
144
  switch (_a.label) {
151
- case 0: return [4 /*yield*/, this.getSubscriptionsRaw(requestParameters, initOverrides)];
145
+ case 0: return [4 /*yield*/, this.getSubscriptionPlanFeaturesRaw(initOverrides)];
152
146
  case 1:
153
147
  response = _a.sent();
154
148
  return [4 /*yield*/, response.value()];
@@ -157,6 +151,6 @@ var SearchSubscriptionsApi = /** @class */ (function (_super) {
157
151
  });
158
152
  });
159
153
  };
160
- return SearchSubscriptionsApi;
154
+ return SearchSubscriptionPlanFeatureApi;
161
155
  }(runtime.BaseAPI));
162
- exports.SearchSubscriptionsApi = SearchSubscriptionsApi;
156
+ exports.SearchSubscriptionPlanFeatureApi = SearchSubscriptionPlanFeatureApi;
@@ -1 +1,5 @@
1
- export * from './SearchSubscriptionsApi';
1
+ export * from './ManageSubscriptionApi';
2
+ export * from './ManageSubscriptionPlanApi';
3
+ export * from './SearchSubscriptionApi';
4
+ export * from './SearchSubscriptionPlanApi';
5
+ export * from './SearchSubscriptionPlanFeatureApi';
@@ -16,4 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
- __exportStar(require("./SearchSubscriptionsApi"), exports);
19
+ __exportStar(require("./ManageSubscriptionApi"), exports);
20
+ __exportStar(require("./ManageSubscriptionPlanApi"), exports);
21
+ __exportStar(require("./SearchSubscriptionApi"), exports);
22
+ __exportStar(require("./SearchSubscriptionPlanApi"), exports);
23
+ __exportStar(require("./SearchSubscriptionPlanFeatureApi"), exports);