@lcdp/api-react-rest-client 2.14.3-develop.18775084447 → 2.14.3
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.
- package/invoice/src/apis/SearchInvoiceApi.d.ts +2 -2
- package/invoice/src/apis/SearchInvoiceApi.js +2 -2
- package/invoice/src/models/InvoiceType.d.ts +1 -0
- package/invoice/src/models/InvoiceType.js +1 -0
- package/notification/src/models/NotificationTypeId.d.ts +2 -1
- package/notification/src/models/NotificationTypeId.js +2 -1
- package/package.json +1 -1
- package/rfx/src/apis/index.d.ts +0 -1
- package/rfx/src/apis/index.js +0 -1
- package/rfx/src/models/index.d.ts +0 -1
- package/rfx/src/models/index.js +0 -1
- package/subscription/src/apis/ManageSubscriptionApi.d.ts +56 -0
- package/subscription/src/apis/ManageSubscriptionApi.js +315 -0
- package/subscription/src/apis/ManageSubscriptionPlanApi.d.ts +30 -0
- package/{rfx/src/apis/ManageRffApi.js → subscription/src/apis/ManageSubscriptionPlanApi.js} +39 -21
- package/subscription/src/apis/SearchSubscriptionApi.d.ts +53 -0
- package/subscription/src/apis/SearchSubscriptionApi.js +208 -0
- package/subscription/src/apis/SearchSubscriptionPlanApi.d.ts +49 -0
- package/subscription/src/apis/SearchSubscriptionPlanApi.js +249 -0
- package/subscription/src/apis/SearchSubscriptionPlanFeatureApi.d.ts +26 -0
- package/subscription/src/apis/{SearchSubscriptionsApi.js → SearchSubscriptionPlanFeatureApi.js} +13 -19
- package/subscription/src/apis/index.d.ts +5 -1
- package/subscription/src/apis/index.js +5 -1
- package/subscription/src/models/HttpLink.d.ts +31 -0
- package/subscription/src/models/HttpLink.js +47 -0
- package/subscription/src/models/PaginatedObject.d.ts +32 -0
- package/subscription/src/models/PaginatedObject.js +48 -0
- package/subscription/src/models/PaginatedSubscriptions.d.ts +39 -0
- package/subscription/src/models/PaginatedSubscriptions.js +51 -0
- package/subscription/src/models/PagingMetadata.d.ts +49 -0
- package/subscription/src/models/PagingMetadata.js +55 -0
- package/{chargebee-hook → subscription}/src/models/RestError.d.ts +1 -1
- package/{chargebee-hook → subscription}/src/models/RestError.js +1 -1
- package/subscription/src/models/SubscriberLink.d.ts +37 -0
- package/subscription/src/models/SubscriberLink.js +49 -0
- package/subscription/src/models/Subscription.d.ts +18 -23
- package/subscription/src/models/Subscription.js +19 -29
- package/subscription/src/models/SubscriptionCreationParameters.d.ts +44 -0
- package/subscription/src/models/SubscriptionCreationParameters.js +56 -0
- package/subscription/src/models/SubscriptionPlan.d.ts +69 -0
- package/subscription/src/models/SubscriptionPlan.js +59 -0
- package/subscription/src/models/SubscriptionPlanFeature.d.ts +44 -0
- package/subscription/src/models/SubscriptionPlanFeature.js +50 -0
- package/subscription/src/models/SubscriptionPlanFeatureId.d.ts +26 -0
- package/subscription/src/models/SubscriptionPlanFeatureId.js +49 -0
- package/subscription/src/models/SubscriptionPlanId.d.ts +25 -0
- package/subscription/src/models/SubscriptionPlanId.js +48 -0
- package/subscription/src/models/SubscriptionPlanLink.d.ts +38 -0
- package/subscription/src/models/SubscriptionPlanLink.js +50 -0
- package/subscription/src/models/SubscriptionPlanUpdateParameters.d.ts +62 -0
- package/subscription/src/models/SubscriptionPlanUpdateParameters.js +56 -0
- package/subscription/src/models/SubscriptionUpdateParameters.d.ts +62 -0
- package/subscription/src/models/SubscriptionUpdateParameters.js +57 -0
- package/subscription/src/models/index.d.ts +14 -1
- package/subscription/src/models/index.js +14 -1
- package/third-party/src/models/ThirdPartyLinkCreationParameters.d.ts +2 -5
- package/third-party/src/models/ThirdPartyLinkCreationParameters.js +2 -5
- package/user/src/models/NotificationTypeId.d.ts +2 -1
- package/user/src/models/NotificationTypeId.js +2 -1
- package/user/src/models/OffisanteStatus.d.ts +1 -3
- package/user/src/models/OffisanteStatus.js +2 -4
- package/user/src/models/User.d.ts +0 -8
- package/user/src/models/User.js +0 -2
- package/chargebee-hook/index.d.ts +0 -1
- package/chargebee-hook/index.js +0 -17
- package/chargebee-hook/src/apis/ChargebeeHookApi.d.ts +0 -31
- package/chargebee-hook/src/apis/ChargebeeHookApi.js +0 -134
- package/chargebee-hook/src/apis/index.d.ts +0 -1
- package/chargebee-hook/src/apis/index.js +0 -19
- package/chargebee-hook/src/index.d.ts +0 -3
- package/chargebee-hook/src/index.js +0 -21
- package/chargebee-hook/src/models/HookRequest.d.ts +0 -85
- package/chargebee-hook/src/models/HookRequest.js +0 -67
- package/chargebee-hook/src/models/index.d.ts +0 -2
- package/chargebee-hook/src/models/index.js +0 -20
- package/chargebee-hook/src/runtime.d.ts +0 -190
- package/chargebee-hook/src/runtime.js +0 -598
- package/rfx/src/apis/ManageRffApi.d.ts +0 -29
- package/rfx/src/models/RffCreationParameters.d.ts +0 -37
- package/rfx/src/models/RffCreationParameters.js +0 -51
- package/subscription/src/apis/SearchSubscriptionsApi.d.ts +0 -29
- package/subscription/src/models/SubscriptionStatus.d.ts +0 -39
- package/subscription/src/models/SubscriptionStatus.js +0 -62
|
@@ -0,0 +1,53 @@
|
|
|
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 { PaginatedSubscriptions, SubscriptionPlanId } from '../models/index';
|
|
14
|
+
export interface GetSubscriptionsRequest {
|
|
15
|
+
p: number;
|
|
16
|
+
pp: number;
|
|
17
|
+
sEq?: Array<number>;
|
|
18
|
+
idEq?: Array<number>;
|
|
19
|
+
isTrialEq?: boolean;
|
|
20
|
+
validFromLte?: Date;
|
|
21
|
+
validFromGt?: Date;
|
|
22
|
+
validToLte?: Date;
|
|
23
|
+
validToGt?: Date;
|
|
24
|
+
pEq?: Array<SubscriptionPlanId>;
|
|
25
|
+
orderBy?: GetSubscriptionsOrderByEnum;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export declare class SearchSubscriptionApi extends runtime.BaseAPI {
|
|
31
|
+
/**
|
|
32
|
+
* Get subscriptions
|
|
33
|
+
*/
|
|
34
|
+
getSubscriptionsRaw(requestParameters: GetSubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedSubscriptions | runtime.BlobWithMeta>>;
|
|
35
|
+
/**
|
|
36
|
+
* Get subscriptions
|
|
37
|
+
*/
|
|
38
|
+
getSubscriptions(requestParameters: GetSubscriptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedSubscriptions | runtime.BlobWithMeta>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @export
|
|
42
|
+
*/
|
|
43
|
+
export declare const GetSubscriptionsOrderByEnum: {
|
|
44
|
+
readonly VALID_FROM_ASC: "VALID_FROM:ASC";
|
|
45
|
+
readonly VALID_FROM_DESC: "VALID_FROM:DESC";
|
|
46
|
+
readonly VALID_TO_ASC: "VALID_TO:ASC";
|
|
47
|
+
readonly VALID_TO_DESC: "VALID_TO:DESC";
|
|
48
|
+
readonly NEXT_BILLING_DATE_ASC: "NEXT_BILLING_DATE:ASC";
|
|
49
|
+
readonly NEXT_BILLING_DATE_DESC: "NEXT_BILLING_DATE:DESC";
|
|
50
|
+
readonly PLAN_ID_ASC: "PLAN_ID:ASC";
|
|
51
|
+
readonly PLAN_ID_DESC: "PLAN_ID:DESC";
|
|
52
|
+
};
|
|
53
|
+
export declare type GetSubscriptionsOrderByEnum = typeof GetSubscriptionsOrderByEnum[keyof typeof GetSubscriptionsOrderByEnum];
|
|
@@ -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
|
+
}
|