@lcdp/api-react-rest-client 2.14.3 → 2.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/chargebee-hook/index.d.ts +1 -0
  2. package/chargebee-hook/index.js +17 -0
  3. package/chargebee-hook/src/apis/ChargebeeHookApi.d.ts +31 -0
  4. package/chargebee-hook/src/apis/ChargebeeHookApi.js +134 -0
  5. package/chargebee-hook/src/apis/index.d.ts +1 -0
  6. package/chargebee-hook/src/apis/index.js +19 -0
  7. package/chargebee-hook/src/index.d.ts +3 -0
  8. package/chargebee-hook/src/index.js +21 -0
  9. package/chargebee-hook/src/models/HookRequest.d.ts +85 -0
  10. package/chargebee-hook/src/models/HookRequest.js +67 -0
  11. package/{subscription → chargebee-hook}/src/models/RestError.d.ts +1 -1
  12. package/{subscription → chargebee-hook}/src/models/RestError.js +1 -1
  13. package/chargebee-hook/src/models/index.d.ts +2 -0
  14. package/chargebee-hook/src/models/index.js +20 -0
  15. package/chargebee-hook/src/runtime.d.ts +190 -0
  16. package/chargebee-hook/src/runtime.js +598 -0
  17. package/invoice/src/apis/SearchInvoiceApi.d.ts +2 -2
  18. package/invoice/src/apis/SearchInvoiceApi.js +2 -2
  19. package/invoice/src/models/InvoiceType.d.ts +0 -1
  20. package/invoice/src/models/InvoiceType.js +0 -1
  21. package/notification/src/models/NotificationTypeId.d.ts +1 -2
  22. package/notification/src/models/NotificationTypeId.js +1 -2
  23. package/package.json +1 -1
  24. package/rfx/src/apis/ManageRffApi.d.ts +29 -0
  25. package/{subscription/src/apis/ManageSubscriptionPlanApi.js → rfx/src/apis/ManageRffApi.js} +21 -39
  26. package/rfx/src/apis/index.d.ts +1 -0
  27. package/rfx/src/apis/index.js +1 -0
  28. package/rfx/src/models/RffCreationParameters.d.ts +37 -0
  29. package/rfx/src/models/RffCreationParameters.js +51 -0
  30. package/rfx/src/models/index.d.ts +1 -0
  31. package/rfx/src/models/index.js +1 -0
  32. package/subscription/src/apis/SearchSubscriptionsApi.d.ts +29 -0
  33. package/subscription/src/apis/{SearchSubscriptionPlanFeatureApi.js → SearchSubscriptionsApi.js} +19 -13
  34. package/subscription/src/apis/index.d.ts +1 -5
  35. package/subscription/src/apis/index.js +1 -5
  36. package/subscription/src/models/Subscription.d.ts +23 -18
  37. package/subscription/src/models/Subscription.js +29 -19
  38. package/subscription/src/models/SubscriptionStatus.d.ts +39 -0
  39. package/subscription/src/models/SubscriptionStatus.js +62 -0
  40. package/subscription/src/models/index.d.ts +1 -14
  41. package/subscription/src/models/index.js +1 -14
  42. package/third-party/src/models/ThirdPartyLinkCreationParameters.d.ts +5 -2
  43. package/third-party/src/models/ThirdPartyLinkCreationParameters.js +5 -2
  44. package/user/src/models/NotificationTypeId.d.ts +1 -2
  45. package/user/src/models/NotificationTypeId.js +1 -2
  46. package/user/src/models/OffisanteStatus.d.ts +3 -1
  47. package/user/src/models/OffisanteStatus.js +4 -2
  48. package/user/src/models/User.d.ts +8 -0
  49. package/user/src/models/User.js +2 -0
  50. package/subscription/src/apis/ManageSubscriptionApi.d.ts +0 -56
  51. package/subscription/src/apis/ManageSubscriptionApi.js +0 -315
  52. package/subscription/src/apis/ManageSubscriptionPlanApi.d.ts +0 -30
  53. package/subscription/src/apis/SearchSubscriptionApi.d.ts +0 -53
  54. package/subscription/src/apis/SearchSubscriptionApi.js +0 -208
  55. package/subscription/src/apis/SearchSubscriptionPlanApi.d.ts +0 -49
  56. package/subscription/src/apis/SearchSubscriptionPlanApi.js +0 -249
  57. package/subscription/src/apis/SearchSubscriptionPlanFeatureApi.d.ts +0 -26
  58. package/subscription/src/models/HttpLink.d.ts +0 -31
  59. package/subscription/src/models/HttpLink.js +0 -47
  60. package/subscription/src/models/PaginatedObject.d.ts +0 -32
  61. package/subscription/src/models/PaginatedObject.js +0 -48
  62. package/subscription/src/models/PaginatedSubscriptions.d.ts +0 -39
  63. package/subscription/src/models/PaginatedSubscriptions.js +0 -51
  64. package/subscription/src/models/PagingMetadata.d.ts +0 -49
  65. package/subscription/src/models/PagingMetadata.js +0 -55
  66. package/subscription/src/models/SubscriberLink.d.ts +0 -37
  67. package/subscription/src/models/SubscriberLink.js +0 -49
  68. package/subscription/src/models/SubscriptionCreationParameters.d.ts +0 -44
  69. package/subscription/src/models/SubscriptionCreationParameters.js +0 -56
  70. package/subscription/src/models/SubscriptionPlan.d.ts +0 -69
  71. package/subscription/src/models/SubscriptionPlan.js +0 -59
  72. package/subscription/src/models/SubscriptionPlanFeature.d.ts +0 -44
  73. package/subscription/src/models/SubscriptionPlanFeature.js +0 -50
  74. package/subscription/src/models/SubscriptionPlanFeatureId.d.ts +0 -26
  75. package/subscription/src/models/SubscriptionPlanFeatureId.js +0 -49
  76. package/subscription/src/models/SubscriptionPlanId.d.ts +0 -25
  77. package/subscription/src/models/SubscriptionPlanId.js +0 -48
  78. package/subscription/src/models/SubscriptionPlanLink.d.ts +0 -38
  79. package/subscription/src/models/SubscriptionPlanLink.js +0 -50
  80. package/subscription/src/models/SubscriptionPlanUpdateParameters.d.ts +0 -62
  81. package/subscription/src/models/SubscriptionPlanUpdateParameters.js +0 -56
  82. package/subscription/src/models/SubscriptionUpdateParameters.d.ts +0 -62
  83. package/subscription/src/models/SubscriptionUpdateParameters.js +0 -57
@@ -0,0 +1,29 @@
1
+ /**
2
+ * lcdp-monolith-service
3
+ * This is the REST API of RFx (Request For X)
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 { RffCreationParameters } from '../models/index';
14
+ export interface CreateRffRequest {
15
+ rffCreationParameters?: RffCreationParameters;
16
+ }
17
+ /**
18
+ *
19
+ */
20
+ export declare class ManageRffApi extends runtime.BaseAPI {
21
+ /**
22
+ * Create request for feature
23
+ */
24
+ createRffRaw(requestParameters: CreateRffRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
25
+ /**
26
+ * Create request for feature
27
+ */
28
+ createRff(requestParameters?: CreateRffRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
29
+ }
@@ -3,7 +3,7 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * lcdp-monolith-service
6
- * This is the REST API of LCDP products
6
+ * This is the REST API of RFx (Request For X)
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0.0
9
9
  * Contact: contact@lecomptoirdespharmacies.fr
@@ -64,35 +64,29 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  }
65
65
  };
66
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.ManageSubscriptionPlanApi = void 0;
67
+ exports.ManageRffApi = void 0;
68
68
  var runtime = require("../runtime");
69
69
  var index_1 = require("../models/index");
70
70
  /**
71
71
  *
72
72
  */
73
- var ManageSubscriptionPlanApi = /** @class */ (function (_super) {
74
- __extends(ManageSubscriptionPlanApi, _super);
75
- function ManageSubscriptionPlanApi() {
73
+ var ManageRffApi = /** @class */ (function (_super) {
74
+ __extends(ManageRffApi, _super);
75
+ function ManageRffApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
78
  /**
79
- * Update subscription plan
79
+ * Create request for feature
80
80
  */
81
- ManageSubscriptionPlanApi.prototype.updateSubscriptionPlanRaw = function (requestParameters, initOverrides) {
81
+ ManageRffApi.prototype.createRffRaw = function (requestParameters, initOverrides) {
82
82
  return __awaiter(this, void 0, void 0, function () {
83
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
83
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_1;
84
84
  return __generator(this, function (_c) {
85
85
  switch (_c.label) {
86
86
  case 0:
87
- if (requestParameters['subscriptionPlanId'] == null) {
88
- throw new runtime.RequiredError('subscriptionPlanId', 'Required parameter "subscriptionPlanId" was null or undefined when calling updateSubscriptionPlan().');
89
- }
90
- if (requestParameters['subscriptionPlanUpdateParameters'] == null) {
91
- throw new runtime.RequiredError('subscriptionPlanUpdateParameters', 'Required parameter "subscriptionPlanUpdateParameters" was null or undefined when calling updateSubscriptionPlan().');
92
- }
93
87
  queryParameters = {};
94
88
  headerParameters = {};
95
- headerParameters['Content-Type'] = 'application/merge-patch+json';
89
+ headerParameters['Content-Type'] = 'application/json';
96
90
  if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
97
91
  _a = headerParameters;
98
92
  _b = "x-api-key";
@@ -113,26 +107,15 @@ var ManageSubscriptionPlanApi = /** @class */ (function (_super) {
113
107
  case 4:
114
108
  _c.trys.push([4, 6, , 7]);
115
109
  return [4 /*yield*/, this.request({
116
- path: "/subscriptions/plans/{subscriptionPlanId}".replace("{".concat("subscriptionPlanId", "}"), encodeURIComponent(String(requestParameters['subscriptionPlanId']))),
117
- method: 'PATCH',
110
+ path: "/rffs",
111
+ method: 'POST',
118
112
  headers: headerParameters,
119
113
  query: queryParameters,
120
- body: (0, index_1.SubscriptionPlanUpdateParametersToJSON)(requestParameters['subscriptionPlanUpdateParameters']),
114
+ body: (0, index_1.RffCreationParametersToJSON)(requestParameters['rffCreationParameters']),
121
115
  }, initOverrides)];
122
116
  case 5:
123
117
  response = _c.sent();
124
- contentType = response.headers.get("content-type");
125
- if (contentType && contentType.indexOf("application/json") !== -1) {
126
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.SubscriptionPlanFromJSON)(jsonValue); })];
127
- }
128
- else if (contentType && contentType.indexOf("text/plain") !== -1) {
129
- return [2 /*return*/, new runtime.TextApiResponse(response)];
130
- }
131
- else {
132
- // TODO : Better handling of others application types
133
- return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
134
- }
135
- return [3 /*break*/, 7];
118
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
136
119
  case 6:
137
120
  response_1 = _c.sent();
138
121
  console.debug(response_1);
@@ -143,22 +126,21 @@ var ManageSubscriptionPlanApi = /** @class */ (function (_super) {
143
126
  });
144
127
  };
145
128
  /**
146
- * Update subscription plan
129
+ * Create request for feature
147
130
  */
148
- ManageSubscriptionPlanApi.prototype.updateSubscriptionPlan = function (requestParameters, initOverrides) {
131
+ ManageRffApi.prototype.createRff = function (requestParameters, initOverrides) {
132
+ if (requestParameters === void 0) { requestParameters = {}; }
149
133
  return __awaiter(this, void 0, void 0, function () {
150
- var response;
151
134
  return __generator(this, function (_a) {
152
135
  switch (_a.label) {
153
- case 0: return [4 /*yield*/, this.updateSubscriptionPlanRaw(requestParameters, initOverrides)];
136
+ case 0: return [4 /*yield*/, this.createRffRaw(requestParameters, initOverrides)];
154
137
  case 1:
155
- response = _a.sent();
156
- return [4 /*yield*/, response.value()];
157
- case 2: return [2 /*return*/, _a.sent()];
138
+ _a.sent();
139
+ return [2 /*return*/];
158
140
  }
159
141
  });
160
142
  });
161
143
  };
162
- return ManageSubscriptionPlanApi;
144
+ return ManageRffApi;
163
145
  }(runtime.BaseAPI));
164
- exports.ManageSubscriptionPlanApi = ManageSubscriptionPlanApi;
146
+ exports.ManageRffApi = ManageRffApi;
@@ -1,3 +1,4 @@
1
+ export * from './ManageRffApi';
1
2
  export * from './ManageRfiApi';
2
3
  export * from './ManageRfilApi';
3
4
  export * from './ManageRfoiApi';
@@ -16,6 +16,7 @@ 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("./ManageRffApi"), exports);
19
20
  __exportStar(require("./ManageRfiApi"), exports);
20
21
  __exportStar(require("./ManageRfilApi"), exports);
21
22
  __exportStar(require("./ManageRfoiApi"), exports);
@@ -0,0 +1,37 @@
1
+ /**
2
+ * lcdp-monolith-service
3
+ * This is the REST API of RFx (Request For X)
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 RffCreationParameters
16
+ */
17
+ export interface RffCreationParameters {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof RffCreationParameters
22
+ */
23
+ userId: number;
24
+ /**
25
+ * Name of the feature the user is interested in
26
+ * @type {string}
27
+ * @memberof RffCreationParameters
28
+ */
29
+ featureName: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the RffCreationParameters interface.
33
+ */
34
+ export declare function instanceOfRffCreationParameters(value: object): value is RffCreationParameters;
35
+ export declare function RffCreationParametersFromJSON(json: any): RffCreationParameters;
36
+ export declare function RffCreationParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): RffCreationParameters;
37
+ export declare function RffCreationParametersToJSON(value?: RffCreationParameters | null): any;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-monolith-service
6
+ * This is the REST API of RFx (Request For X)
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.RffCreationParametersToJSON = exports.RffCreationParametersFromJSONTyped = exports.RffCreationParametersFromJSON = exports.instanceOfRffCreationParameters = void 0;
17
+ /**
18
+ * Check if a given object implements the RffCreationParameters interface.
19
+ */
20
+ function instanceOfRffCreationParameters(value) {
21
+ if (!('userId' in value) || value['userId'] === undefined)
22
+ return false;
23
+ if (!('featureName' in value) || value['featureName'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ exports.instanceOfRffCreationParameters = instanceOfRffCreationParameters;
28
+ function RffCreationParametersFromJSON(json) {
29
+ return RffCreationParametersFromJSONTyped(json, false);
30
+ }
31
+ exports.RffCreationParametersFromJSON = RffCreationParametersFromJSON;
32
+ function RffCreationParametersFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'userId': json['userId'],
38
+ 'featureName': json['featureName'],
39
+ };
40
+ }
41
+ exports.RffCreationParametersFromJSONTyped = RffCreationParametersFromJSONTyped;
42
+ function RffCreationParametersToJSON(value) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'userId': value['userId'],
48
+ 'featureName': value['featureName'],
49
+ };
50
+ }
51
+ exports.RffCreationParametersToJSON = RffCreationParametersToJSON;
@@ -4,6 +4,7 @@ export * from './PaginatedObject';
4
4
  export * from './PaginatedRfois';
5
5
  export * from './PagingMetadata';
6
6
  export * from './RestError';
7
+ export * from './RffCreationParameters';
7
8
  export * from './RfiCreationParameters';
8
9
  export * from './RfilCreationParameters';
9
10
  export * from './RfoCreationParameters';
@@ -22,6 +22,7 @@ __exportStar(require("./PaginatedObject"), exports);
22
22
  __exportStar(require("./PaginatedRfois"), exports);
23
23
  __exportStar(require("./PagingMetadata"), exports);
24
24
  __exportStar(require("./RestError"), exports);
25
+ __exportStar(require("./RffCreationParameters"), exports);
25
26
  __exportStar(require("./RfiCreationParameters"), exports);
26
27
  __exportStar(require("./RfilCreationParameters"), exports);
27
28
  __exportStar(require("./RfoCreationParameters"), exports);
@@ -0,0 +1,29 @@
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 { Subscription } from '../models/index';
14
+ export interface GetSubscriptionsRequest {
15
+ ownerIdEq: number;
16
+ }
17
+ /**
18
+ *
19
+ */
20
+ export declare class SearchSubscriptionsApi extends runtime.BaseAPI {
21
+ /**
22
+ * Get subscriptions
23
+ */
24
+ getSubscriptionsRaw(requestParameters: GetSubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Subscription> | runtime.BlobWithMeta>>;
25
+ /**
26
+ * Get subscriptions
27
+ */
28
+ getSubscriptions(requestParameters: GetSubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Subscription> | runtime.BlobWithMeta>;
29
+ }
@@ -64,27 +64,33 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  }
65
65
  };
66
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.SearchSubscriptionPlanFeatureApi = void 0;
67
+ exports.SearchSubscriptionsApi = void 0;
68
68
  var runtime = require("../runtime");
69
69
  var index_1 = require("../models/index");
70
70
  /**
71
71
  *
72
72
  */
73
- var SearchSubscriptionPlanFeatureApi = /** @class */ (function (_super) {
74
- __extends(SearchSubscriptionPlanFeatureApi, _super);
75
- function SearchSubscriptionPlanFeatureApi() {
73
+ var SearchSubscriptionsApi = /** @class */ (function (_super) {
74
+ __extends(SearchSubscriptionsApi, _super);
75
+ function SearchSubscriptionsApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
78
  /**
79
- * Get all subscription plan features
79
+ * Get subscriptions
80
80
  */
81
- SearchSubscriptionPlanFeatureApi.prototype.getSubscriptionPlanFeaturesRaw = function (initOverrides) {
81
+ SearchSubscriptionsApi.prototype.getSubscriptionsRaw = function (requestParameters, 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
+ }
87
90
  queryParameters = {};
91
+ if (requestParameters['ownerIdEq'] != null) {
92
+ queryParameters['ownerId[eq]'] = requestParameters['ownerIdEq'];
93
+ }
88
94
  headerParameters = {};
89
95
  if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
90
96
  _a = headerParameters;
@@ -106,7 +112,7 @@ var SearchSubscriptionPlanFeatureApi = /** @class */ (function (_super) {
106
112
  case 4:
107
113
  _c.trys.push([4, 6, , 7]);
108
114
  return [4 /*yield*/, this.request({
109
- path: "/subscriptions/plans/features",
115
+ path: "/subscriptions",
110
116
  method: 'GET',
111
117
  headers: headerParameters,
112
118
  query: queryParameters,
@@ -115,7 +121,7 @@ var SearchSubscriptionPlanFeatureApi = /** @class */ (function (_super) {
115
121
  response = _c.sent();
116
122
  contentType = response.headers.get("content-type");
117
123
  if (contentType && contentType.indexOf("application/json") !== -1) {
118
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.SubscriptionPlanFeatureFromJSON); })];
124
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.SubscriptionFromJSON); })];
119
125
  }
120
126
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
121
127
  return [2 /*return*/, new runtime.TextApiResponse(response)];
@@ -135,14 +141,14 @@ var SearchSubscriptionPlanFeatureApi = /** @class */ (function (_super) {
135
141
  });
136
142
  };
137
143
  /**
138
- * Get all subscription plan features
144
+ * Get subscriptions
139
145
  */
140
- SearchSubscriptionPlanFeatureApi.prototype.getSubscriptionPlanFeatures = function (initOverrides) {
146
+ SearchSubscriptionsApi.prototype.getSubscriptions = function (requestParameters, initOverrides) {
141
147
  return __awaiter(this, void 0, void 0, function () {
142
148
  var response;
143
149
  return __generator(this, function (_a) {
144
150
  switch (_a.label) {
145
- case 0: return [4 /*yield*/, this.getSubscriptionPlanFeaturesRaw(initOverrides)];
151
+ case 0: return [4 /*yield*/, this.getSubscriptionsRaw(requestParameters, initOverrides)];
146
152
  case 1:
147
153
  response = _a.sent();
148
154
  return [4 /*yield*/, response.value()];
@@ -151,6 +157,6 @@ var SearchSubscriptionPlanFeatureApi = /** @class */ (function (_super) {
151
157
  });
152
158
  });
153
159
  };
154
- return SearchSubscriptionPlanFeatureApi;
160
+ return SearchSubscriptionsApi;
155
161
  }(runtime.BaseAPI));
156
- exports.SearchSubscriptionPlanFeatureApi = SearchSubscriptionPlanFeatureApi;
162
+ exports.SearchSubscriptionsApi = SearchSubscriptionsApi;
@@ -1,5 +1 @@
1
- export * from './ManageSubscriptionApi';
2
- export * from './ManageSubscriptionPlanApi';
3
- export * from './SearchSubscriptionApi';
4
- export * from './SearchSubscriptionPlanApi';
5
- export * from './SearchSubscriptionPlanFeatureApi';
1
+ export * from './SearchSubscriptionsApi';
@@ -16,8 +16,4 @@ 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("./ManageSubscriptionApi"), exports);
20
- __exportStar(require("./ManageSubscriptionPlanApi"), exports);
21
- __exportStar(require("./SearchSubscriptionApi"), exports);
22
- __exportStar(require("./SearchSubscriptionPlanApi"), exports);
23
- __exportStar(require("./SearchSubscriptionPlanFeatureApi"), exports);
19
+ __exportStar(require("./SearchSubscriptionsApi"), exports);
@@ -9,8 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { SubscriberLink } from './SubscriberLink';
13
- import type { SubscriptionPlanLink } from './SubscriptionPlanLink';
12
+ import type { SubscriptionStatus } from './SubscriptionStatus';
14
13
  /**
15
14
  *
16
15
  * @export
@@ -19,52 +18,58 @@ import type { SubscriptionPlanLink } from './SubscriptionPlanLink';
19
18
  export interface Subscription {
20
19
  /**
21
20
  *
22
- * @type {number}
21
+ * @type {string}
23
22
  * @memberof Subscription
24
23
  */
25
- id?: number;
24
+ familyId: string;
26
25
  /**
27
26
  *
28
- * @type {SubscriberLink}
27
+ * @type {string}
29
28
  * @memberof Subscription
30
29
  */
31
- subscriber?: SubscriberLink;
30
+ familyName: string;
32
31
  /**
33
32
  *
34
- * @type {SubscriptionPlanLink}
33
+ * @type {string}
35
34
  * @memberof Subscription
36
35
  */
37
- plan?: SubscriptionPlanLink;
36
+ name: string;
38
37
  /**
39
38
  *
40
- * @type {number}
39
+ * @type {SubscriptionStatus}
41
40
  * @memberof Subscription
42
41
  */
43
- billingPrice?: number;
42
+ status: SubscriptionStatus;
44
43
  /**
45
- * Date since when the subscription is active. Ex : 12-02-2025 means that subscription is active from this date (INCLUDED)
44
+ *
46
45
  * @type {Date}
47
46
  * @memberof Subscription
48
47
  */
49
- validFrom?: Date;
48
+ startedAt: Date;
50
49
  /**
51
- * Date until when the subscription is active. Ex : 12-02-2025 means that subscription is active until this date (EXCLUDED)
50
+ *
52
51
  * @type {Date}
53
52
  * @memberof Subscription
54
53
  */
55
- validTo?: Date | null;
54
+ nextBillingAt?: Date;
56
55
  /**
57
56
  *
58
57
  * @type {Date}
59
58
  * @memberof Subscription
60
59
  */
61
- nextBillingDate?: Date | null;
60
+ currentTermEnd?: Date;
62
61
  /**
63
- * True if this subscription is a trial, False if not
64
- * @type {boolean}
62
+ *
63
+ * @type {Date}
64
+ * @memberof Subscription
65
+ */
66
+ trialStart?: Date;
67
+ /**
68
+ *
69
+ * @type {Date}
65
70
  * @memberof Subscription
66
71
  */
67
- isTrial?: boolean;
72
+ trialEnd?: Date;
68
73
  }
69
74
  /**
70
75
  * Check if a given object implements the Subscription interface.
@@ -14,13 +14,21 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.SubscriptionToJSON = exports.SubscriptionFromJSONTyped = exports.SubscriptionFromJSON = exports.instanceOfSubscription = void 0;
17
- var runtime_1 = require("../runtime");
18
- var SubscriberLink_1 = require("./SubscriberLink");
19
- var SubscriptionPlanLink_1 = require("./SubscriptionPlanLink");
17
+ var SubscriptionStatus_1 = require("./SubscriptionStatus");
20
18
  /**
21
19
  * Check if a given object implements the Subscription interface.
22
20
  */
23
21
  function instanceOfSubscription(value) {
22
+ if (!('familyId' in value) || value['familyId'] === undefined)
23
+ return false;
24
+ if (!('familyName' in value) || value['familyName'] === undefined)
25
+ return false;
26
+ if (!('name' in value) || value['name'] === undefined)
27
+ return false;
28
+ if (!('status' in value) || value['status'] === undefined)
29
+ return false;
30
+ if (!('startedAt' in value) || value['startedAt'] === undefined)
31
+ return false;
24
32
  return true;
25
33
  }
26
34
  exports.instanceOfSubscription = instanceOfSubscription;
@@ -33,14 +41,15 @@ function SubscriptionFromJSONTyped(json, ignoreDiscriminator) {
33
41
  return json;
34
42
  }
35
43
  return {
36
- 'id': json['id'],
37
- 'subscriber': (json['subscriber'] === null || json['subscriber'] === undefined) ? json['subscriber'] : (0, SubscriberLink_1.SubscriberLinkFromJSON)(json['subscriber']),
38
- 'plan': (json['plan'] === null || json['plan'] === undefined) ? json['plan'] : (0, SubscriptionPlanLink_1.SubscriptionPlanLinkFromJSON)(json['plan']),
39
- 'billingPrice': json['billingPrice'],
40
- 'validFrom': (json['validFrom'] === null || json['validFrom'] === undefined) ? json['validFrom'] : new Date(json['validFrom']),
41
- 'validTo': (json['validTo'] === null || json['validTo'] === undefined) ? json['validTo'] : new Date(json['validTo']),
42
- 'nextBillingDate': (json['nextBillingDate'] === null || json['nextBillingDate'] === undefined) ? json['nextBillingDate'] : new Date(json['nextBillingDate']),
43
- 'isTrial': json['isTrial'],
44
+ 'familyId': json['familyId'],
45
+ 'familyName': json['familyName'],
46
+ 'name': json['name'],
47
+ 'status': (json['status'] === null || json['status'] === undefined) ? json['status'] : (0, SubscriptionStatus_1.SubscriptionStatusFromJSON)(json['status']),
48
+ 'startedAt': (json['startedAt'] === null || json['startedAt'] === undefined) ? json['startedAt'] : new Date(json['startedAt']),
49
+ 'nextBillingAt': (json['nextBillingAt'] === null || json['nextBillingAt'] === undefined) ? json['nextBillingAt'] : new Date(json['nextBillingAt']),
50
+ 'currentTermEnd': (json['currentTermEnd'] === null || json['currentTermEnd'] === undefined) ? json['currentTermEnd'] : new Date(json['currentTermEnd']),
51
+ 'trialStart': (json['trialStart'] === null || json['trialStart'] === undefined) ? json['trialStart'] : new Date(json['trialStart']),
52
+ 'trialEnd': (json['trialEnd'] === null || json['trialEnd'] === undefined) ? json['trialEnd'] : new Date(json['trialEnd']),
44
53
  };
45
54
  }
46
55
  exports.SubscriptionFromJSONTyped = SubscriptionFromJSONTyped;
@@ -49,14 +58,15 @@ function SubscriptionToJSON(value) {
49
58
  return value;
50
59
  }
51
60
  return {
52
- 'id': value['id'],
53
- 'subscriber': (0, SubscriberLink_1.SubscriberLinkToJSON)(value['subscriber']),
54
- 'plan': (0, SubscriptionPlanLink_1.SubscriptionPlanLinkToJSON)(value['plan']),
55
- 'billingPrice': value['billingPrice'],
56
- 'validFrom': (value['validFrom'] === null || value['validFrom'] === undefined) ? value['validFrom'] : (0, runtime_1.toDateISOString)(value['validFrom']),
57
- 'validTo': (value['validTo'] === null || value['validTo'] === undefined) ? value['validTo'] : (0, runtime_1.toDateISOString)(value['validTo']),
58
- 'nextBillingDate': (value['nextBillingDate'] === null || value['nextBillingDate'] === undefined) ? value['nextBillingDate'] : (0, runtime_1.toDateISOString)(value['nextBillingDate']),
59
- 'isTrial': value['isTrial'],
61
+ 'familyId': value['familyId'],
62
+ 'familyName': value['familyName'],
63
+ 'name': value['name'],
64
+ 'status': (0, SubscriptionStatus_1.SubscriptionStatusToJSON)(value['status']),
65
+ 'startedAt': (value['startedAt'] === null || value['startedAt'] === undefined) ? value['startedAt'] : (value['startedAt']).toISOString(),
66
+ 'nextBillingAt': (value['nextBillingAt'] === null || value['nextBillingAt'] === undefined) ? value['nextBillingAt'] : (value['nextBillingAt']).toISOString(),
67
+ 'currentTermEnd': (value['currentTermEnd'] === null || value['currentTermEnd'] === undefined) ? value['currentTermEnd'] : (value['currentTermEnd']).toISOString(),
68
+ 'trialStart': (value['trialStart'] === null || value['trialStart'] === undefined) ? value['trialStart'] : (value['trialStart']).toISOString(),
69
+ 'trialEnd': (value['trialEnd'] === null || value['trialEnd'] === undefined) ? value['trialEnd'] : (value['trialEnd']).toISOString(),
60
70
  };
61
71
  }
62
72
  exports.SubscriptionToJSON = SubscriptionToJSON;
@@ -0,0 +1,39 @@
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
+ /**
13
+ * Status of the subscription
14
+ * - FUTURE: The subscription is scheduled to start at a future date.
15
+ * - IN_TRIAL: The subscription is in trial.
16
+ * - ACTIVE: The subscription is active and will be charged for automatically based on the items in it.
17
+ * - NON_RENEWING: The subscription will be canceled at the end of the current term.
18
+ * - PAUSED: The subscription is paused. The subscription will not renew while in this state.
19
+ * - CANCELLED: The subscription has been canceled and is no longer in service.
20
+ * - TRANSFERRED: The subscription has been transferred to another business entity within the organization.
21
+ * - _UNKNOWN: Indicates unexpected value for this enum.
22
+ *
23
+ * @export
24
+ */
25
+ export declare const SubscriptionStatus: {
26
+ readonly FUTURE: "FUTURE";
27
+ readonly IN_TRIAL: "IN_TRIAL";
28
+ readonly ACTIVE: "ACTIVE";
29
+ readonly NON_RENEWING: "NON_RENEWING";
30
+ readonly PAUSED: "PAUSED";
31
+ readonly CANCELLED: "CANCELLED";
32
+ readonly TRANSFERRED: "TRANSFERRED";
33
+ readonly UNKNOWN: "_UNKNOWN";
34
+ };
35
+ export declare type SubscriptionStatus = typeof SubscriptionStatus[keyof typeof SubscriptionStatus];
36
+ export declare function instanceOfSubscriptionStatus(value: any): boolean;
37
+ export declare function SubscriptionStatusFromJSON(json: any): SubscriptionStatus;
38
+ export declare function SubscriptionStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionStatus;
39
+ export declare function SubscriptionStatusToJSON(value?: SubscriptionStatus | null): any;