@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
|
@@ -1,598 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* lcdp-monolith-service
|
|
6
|
-
* This is the REST API of LCDP Chargebee hook
|
|
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 __assign = (this && this.__assign) || function () {
|
|
31
|
-
__assign = Object.assign || function(t) {
|
|
32
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
-
s = arguments[i];
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
return __assign.apply(this, arguments);
|
|
40
|
-
};
|
|
41
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
-
function step(op) {
|
|
55
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
-
while (_) try {
|
|
57
|
-
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;
|
|
58
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
-
switch (op[0]) {
|
|
60
|
-
case 0: case 1: t = op; break;
|
|
61
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
-
default:
|
|
65
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
-
if (t[2]) _.ops.pop();
|
|
70
|
-
_.trys.pop(); continue;
|
|
71
|
-
}
|
|
72
|
-
op = body.call(thisArg, _);
|
|
73
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
|
-
exports.TextApiResponse = exports.BlobWithMetaApiResponse = exports.instanceOfBlobWithMeta = exports.VoidApiResponse = exports.JSONApiResponse = exports.toDateISOString = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0;
|
|
79
|
-
exports.BASE_PATH = "/api/v1";
|
|
80
|
-
var Configuration = /** @class */ (function () {
|
|
81
|
-
function Configuration(configuration) {
|
|
82
|
-
if (configuration === void 0) { configuration = {}; }
|
|
83
|
-
this.configuration = configuration;
|
|
84
|
-
}
|
|
85
|
-
Object.defineProperty(Configuration.prototype, "config", {
|
|
86
|
-
set: function (configuration) {
|
|
87
|
-
this.configuration = configuration;
|
|
88
|
-
},
|
|
89
|
-
enumerable: false,
|
|
90
|
-
configurable: true
|
|
91
|
-
});
|
|
92
|
-
Object.defineProperty(Configuration.prototype, "basePath", {
|
|
93
|
-
get: function () {
|
|
94
|
-
return this.configuration.basePath != null ? this.configuration.basePath : exports.BASE_PATH;
|
|
95
|
-
},
|
|
96
|
-
enumerable: false,
|
|
97
|
-
configurable: true
|
|
98
|
-
});
|
|
99
|
-
Object.defineProperty(Configuration.prototype, "fetchApi", {
|
|
100
|
-
get: function () {
|
|
101
|
-
return this.configuration.fetchApi;
|
|
102
|
-
},
|
|
103
|
-
enumerable: false,
|
|
104
|
-
configurable: true
|
|
105
|
-
});
|
|
106
|
-
Object.defineProperty(Configuration.prototype, "middleware", {
|
|
107
|
-
get: function () {
|
|
108
|
-
return this.configuration.middleware || [];
|
|
109
|
-
},
|
|
110
|
-
enumerable: false,
|
|
111
|
-
configurable: true
|
|
112
|
-
});
|
|
113
|
-
Object.defineProperty(Configuration.prototype, "queryParamsStringify", {
|
|
114
|
-
get: function () {
|
|
115
|
-
return this.configuration.queryParamsStringify || querystring;
|
|
116
|
-
},
|
|
117
|
-
enumerable: false,
|
|
118
|
-
configurable: true
|
|
119
|
-
});
|
|
120
|
-
Object.defineProperty(Configuration.prototype, "username", {
|
|
121
|
-
get: function () {
|
|
122
|
-
return this.configuration.username;
|
|
123
|
-
},
|
|
124
|
-
enumerable: false,
|
|
125
|
-
configurable: true
|
|
126
|
-
});
|
|
127
|
-
Object.defineProperty(Configuration.prototype, "password", {
|
|
128
|
-
get: function () {
|
|
129
|
-
return this.configuration.password;
|
|
130
|
-
},
|
|
131
|
-
enumerable: false,
|
|
132
|
-
configurable: true
|
|
133
|
-
});
|
|
134
|
-
Object.defineProperty(Configuration.prototype, "apiKey", {
|
|
135
|
-
get: function () {
|
|
136
|
-
var apiKey = this.configuration.apiKey;
|
|
137
|
-
if (apiKey) {
|
|
138
|
-
return typeof apiKey === 'function' ? apiKey : function () { return apiKey; };
|
|
139
|
-
}
|
|
140
|
-
return undefined;
|
|
141
|
-
},
|
|
142
|
-
enumerable: false,
|
|
143
|
-
configurable: true
|
|
144
|
-
});
|
|
145
|
-
Object.defineProperty(Configuration.prototype, "accessToken", {
|
|
146
|
-
get: function () {
|
|
147
|
-
var _this = this;
|
|
148
|
-
var accessToken = this.configuration.accessToken;
|
|
149
|
-
if (accessToken) {
|
|
150
|
-
return typeof accessToken === 'function' ? accessToken : function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
151
|
-
return [2 /*return*/, accessToken];
|
|
152
|
-
}); }); };
|
|
153
|
-
}
|
|
154
|
-
return undefined;
|
|
155
|
-
},
|
|
156
|
-
enumerable: false,
|
|
157
|
-
configurable: true
|
|
158
|
-
});
|
|
159
|
-
Object.defineProperty(Configuration.prototype, "headers", {
|
|
160
|
-
get: function () {
|
|
161
|
-
return this.configuration.headers;
|
|
162
|
-
},
|
|
163
|
-
enumerable: false,
|
|
164
|
-
configurable: true
|
|
165
|
-
});
|
|
166
|
-
Object.defineProperty(Configuration.prototype, "credentials", {
|
|
167
|
-
get: function () {
|
|
168
|
-
var _a;
|
|
169
|
-
return (_a = this.configuration.credentials) !== null && _a !== void 0 ? _a : "omit";
|
|
170
|
-
},
|
|
171
|
-
enumerable: false,
|
|
172
|
-
configurable: true
|
|
173
|
-
});
|
|
174
|
-
Object.defineProperty(Configuration.prototype, "referrerPolicy", {
|
|
175
|
-
get: function () {
|
|
176
|
-
var _a;
|
|
177
|
-
return (_a = this.configuration.referrerPolicy) !== null && _a !== void 0 ? _a : "origin";
|
|
178
|
-
},
|
|
179
|
-
enumerable: false,
|
|
180
|
-
configurable: true
|
|
181
|
-
});
|
|
182
|
-
return Configuration;
|
|
183
|
-
}());
|
|
184
|
-
exports.Configuration = Configuration;
|
|
185
|
-
exports.DefaultConfig = new Configuration();
|
|
186
|
-
/**
|
|
187
|
-
* This is the base class for all generated API classes.
|
|
188
|
-
*/
|
|
189
|
-
var BaseAPI = /** @class */ (function () {
|
|
190
|
-
function BaseAPI(configuration) {
|
|
191
|
-
if (configuration === void 0) { configuration = exports.DefaultConfig; }
|
|
192
|
-
var _this = this;
|
|
193
|
-
this.configuration = configuration;
|
|
194
|
-
this.fetchApi = function (url, init) { return __awaiter(_this, void 0, void 0, function () {
|
|
195
|
-
var fetchParams, _i, _a, middleware, response, e_1, _b, _c, middleware, _d, _e, middleware;
|
|
196
|
-
return __generator(this, function (_f) {
|
|
197
|
-
switch (_f.label) {
|
|
198
|
-
case 0:
|
|
199
|
-
fetchParams = { url: url, init: init };
|
|
200
|
-
_i = 0, _a = this.middleware;
|
|
201
|
-
_f.label = 1;
|
|
202
|
-
case 1:
|
|
203
|
-
if (!(_i < _a.length)) return [3 /*break*/, 4];
|
|
204
|
-
middleware = _a[_i];
|
|
205
|
-
if (!middleware.pre) return [3 /*break*/, 3];
|
|
206
|
-
return [4 /*yield*/, middleware.pre(__assign({ fetch: this.fetchApi }, fetchParams))];
|
|
207
|
-
case 2:
|
|
208
|
-
fetchParams = (_f.sent()) || fetchParams;
|
|
209
|
-
_f.label = 3;
|
|
210
|
-
case 3:
|
|
211
|
-
_i++;
|
|
212
|
-
return [3 /*break*/, 1];
|
|
213
|
-
case 4:
|
|
214
|
-
response = undefined;
|
|
215
|
-
_f.label = 5;
|
|
216
|
-
case 5:
|
|
217
|
-
_f.trys.push([5, 7, , 12]);
|
|
218
|
-
return [4 /*yield*/, (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init)];
|
|
219
|
-
case 6:
|
|
220
|
-
response = _f.sent();
|
|
221
|
-
return [3 /*break*/, 12];
|
|
222
|
-
case 7:
|
|
223
|
-
e_1 = _f.sent();
|
|
224
|
-
_b = 0, _c = this.middleware;
|
|
225
|
-
_f.label = 8;
|
|
226
|
-
case 8:
|
|
227
|
-
if (!(_b < _c.length)) return [3 /*break*/, 11];
|
|
228
|
-
middleware = _c[_b];
|
|
229
|
-
if (!middleware.onError) return [3 /*break*/, 10];
|
|
230
|
-
return [4 /*yield*/, middleware.onError({
|
|
231
|
-
fetch: this.fetchApi,
|
|
232
|
-
url: fetchParams.url,
|
|
233
|
-
init: fetchParams.init,
|
|
234
|
-
error: e_1,
|
|
235
|
-
response: response ? response.clone() : undefined,
|
|
236
|
-
})];
|
|
237
|
-
case 9:
|
|
238
|
-
response = (_f.sent()) || response;
|
|
239
|
-
_f.label = 10;
|
|
240
|
-
case 10:
|
|
241
|
-
_b++;
|
|
242
|
-
return [3 /*break*/, 8];
|
|
243
|
-
case 11: throw e_1;
|
|
244
|
-
case 12:
|
|
245
|
-
_d = 0, _e = this.middleware;
|
|
246
|
-
_f.label = 13;
|
|
247
|
-
case 13:
|
|
248
|
-
if (!(_d < _e.length)) return [3 /*break*/, 16];
|
|
249
|
-
middleware = _e[_d];
|
|
250
|
-
if (!middleware.post) return [3 /*break*/, 15];
|
|
251
|
-
return [4 /*yield*/, middleware.post({
|
|
252
|
-
fetch: this.fetchApi,
|
|
253
|
-
url: fetchParams.url,
|
|
254
|
-
init: fetchParams.init,
|
|
255
|
-
response: response.clone(),
|
|
256
|
-
})];
|
|
257
|
-
case 14:
|
|
258
|
-
response = (_f.sent()) || response;
|
|
259
|
-
_f.label = 15;
|
|
260
|
-
case 15:
|
|
261
|
-
_d++;
|
|
262
|
-
return [3 /*break*/, 13];
|
|
263
|
-
case 16: return [2 /*return*/, response];
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
}); };
|
|
267
|
-
this.middleware = configuration.middleware;
|
|
268
|
-
}
|
|
269
|
-
BaseAPI.prototype.withMiddleware = function () {
|
|
270
|
-
var _a;
|
|
271
|
-
var middlewares = [];
|
|
272
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
273
|
-
middlewares[_i] = arguments[_i];
|
|
274
|
-
}
|
|
275
|
-
var next = this.clone();
|
|
276
|
-
next.middleware = (_a = next.middleware).concat.apply(_a, middlewares);
|
|
277
|
-
return next;
|
|
278
|
-
};
|
|
279
|
-
BaseAPI.prototype.withPreMiddleware = function () {
|
|
280
|
-
var preMiddlewares = [];
|
|
281
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
282
|
-
preMiddlewares[_i] = arguments[_i];
|
|
283
|
-
}
|
|
284
|
-
var middlewares = preMiddlewares.map(function (pre) { return ({ pre: pre }); });
|
|
285
|
-
return this.withMiddleware.apply(this, middlewares);
|
|
286
|
-
};
|
|
287
|
-
BaseAPI.prototype.withPostMiddleware = function () {
|
|
288
|
-
var postMiddlewares = [];
|
|
289
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
290
|
-
postMiddlewares[_i] = arguments[_i];
|
|
291
|
-
}
|
|
292
|
-
var middlewares = postMiddlewares.map(function (post) { return ({ post: post }); });
|
|
293
|
-
return this.withMiddleware.apply(this, middlewares);
|
|
294
|
-
};
|
|
295
|
-
/**
|
|
296
|
-
* Check if the given MIME is a JSON MIME.
|
|
297
|
-
* JSON MIME examples:
|
|
298
|
-
* application/json
|
|
299
|
-
* application/json; charset=UTF8
|
|
300
|
-
* APPLICATION/JSON
|
|
301
|
-
* application/vnd.company+json
|
|
302
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
303
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
304
|
-
*/
|
|
305
|
-
BaseAPI.prototype.isJsonMime = function (mime) {
|
|
306
|
-
if (!mime) {
|
|
307
|
-
return false;
|
|
308
|
-
}
|
|
309
|
-
return BaseAPI.jsonRegex.test(mime);
|
|
310
|
-
};
|
|
311
|
-
BaseAPI.prototype.request = function (context, initOverrides) {
|
|
312
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
313
|
-
var _a, url, init, response;
|
|
314
|
-
return __generator(this, function (_b) {
|
|
315
|
-
switch (_b.label) {
|
|
316
|
-
case 0: return [4 /*yield*/, this.createFetchParams(context, initOverrides)];
|
|
317
|
-
case 1:
|
|
318
|
-
_a = _b.sent(), url = _a.url, init = _a.init;
|
|
319
|
-
return [4 /*yield*/, this.fetchApi(url, init)];
|
|
320
|
-
case 2:
|
|
321
|
-
response = _b.sent();
|
|
322
|
-
if (response && (response.status >= 200 && response.status < 300)) {
|
|
323
|
-
return [2 /*return*/, response];
|
|
324
|
-
}
|
|
325
|
-
throw response;
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
});
|
|
329
|
-
};
|
|
330
|
-
BaseAPI.prototype.createFetchParams = function (context, initOverrides) {
|
|
331
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
332
|
-
var url, headers, initOverrideFn, initParams, overriddenInit, _a, body, init;
|
|
333
|
-
var _this = this;
|
|
334
|
-
return __generator(this, function (_b) {
|
|
335
|
-
switch (_b.label) {
|
|
336
|
-
case 0:
|
|
337
|
-
url = this.configuration.basePath + context.path;
|
|
338
|
-
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
339
|
-
// only add the querystring to the URL if there are query parameters.
|
|
340
|
-
// this is done to avoid urls ending with a "?" character which buggy webservers
|
|
341
|
-
// do not handle correctly sometimes.
|
|
342
|
-
url += '?' + this.configuration.queryParamsStringify(context.query);
|
|
343
|
-
}
|
|
344
|
-
headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
345
|
-
Object.keys(headers).forEach(function (key) { return headers[key] === undefined ? delete headers[key] : {}; });
|
|
346
|
-
initOverrideFn = typeof initOverrides === "function"
|
|
347
|
-
? initOverrides
|
|
348
|
-
: function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
349
|
-
return [2 /*return*/, initOverrides];
|
|
350
|
-
}); }); };
|
|
351
|
-
initParams = {
|
|
352
|
-
method: context.method,
|
|
353
|
-
headers: headers,
|
|
354
|
-
body: context.body,
|
|
355
|
-
credentials: this.configuration.credentials,
|
|
356
|
-
referrerPolicy: this.configuration.referrerPolicy,
|
|
357
|
-
};
|
|
358
|
-
_a = [__assign({}, initParams)];
|
|
359
|
-
return [4 /*yield*/, initOverrideFn({
|
|
360
|
-
init: initParams,
|
|
361
|
-
context: context,
|
|
362
|
-
})];
|
|
363
|
-
case 1:
|
|
364
|
-
overriddenInit = __assign.apply(void 0, _a.concat([(_b.sent())]));
|
|
365
|
-
if (isFormData(overriddenInit.body)
|
|
366
|
-
|| (overriddenInit.body instanceof URLSearchParams)
|
|
367
|
-
|| isBlob(overriddenInit.body)) {
|
|
368
|
-
body = overriddenInit.body;
|
|
369
|
-
}
|
|
370
|
-
else if (this.isJsonMime(headers['Content-Type'])) {
|
|
371
|
-
body = JSON.stringify(overriddenInit.body);
|
|
372
|
-
}
|
|
373
|
-
else {
|
|
374
|
-
body = overriddenInit.body;
|
|
375
|
-
}
|
|
376
|
-
init = __assign(__assign({}, overriddenInit), { body: body });
|
|
377
|
-
return [2 /*return*/, { url: url, init: init }];
|
|
378
|
-
}
|
|
379
|
-
});
|
|
380
|
-
});
|
|
381
|
-
};
|
|
382
|
-
/**
|
|
383
|
-
* Create a shallow clone of `this` by constructing a new instance
|
|
384
|
-
* and then shallow cloning data members.
|
|
385
|
-
*/
|
|
386
|
-
BaseAPI.prototype.clone = function () {
|
|
387
|
-
var constructor = this.constructor;
|
|
388
|
-
var next = new constructor(this.configuration);
|
|
389
|
-
next.middleware = this.middleware.slice();
|
|
390
|
-
return next;
|
|
391
|
-
};
|
|
392
|
-
BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
|
|
393
|
-
return BaseAPI;
|
|
394
|
-
}());
|
|
395
|
-
exports.BaseAPI = BaseAPI;
|
|
396
|
-
;
|
|
397
|
-
function isBlob(value) {
|
|
398
|
-
return typeof Blob !== 'undefined' && value instanceof Blob;
|
|
399
|
-
}
|
|
400
|
-
function isFormData(value) {
|
|
401
|
-
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
402
|
-
}
|
|
403
|
-
var ResponseError = /** @class */ (function (_super) {
|
|
404
|
-
__extends(ResponseError, _super);
|
|
405
|
-
function ResponseError(response, msg) {
|
|
406
|
-
var _this = _super.call(this, msg) || this;
|
|
407
|
-
_this.response = response;
|
|
408
|
-
_this.name = "ResponseError";
|
|
409
|
-
return _this;
|
|
410
|
-
}
|
|
411
|
-
return ResponseError;
|
|
412
|
-
}(Error));
|
|
413
|
-
exports.ResponseError = ResponseError;
|
|
414
|
-
var FetchError = /** @class */ (function (_super) {
|
|
415
|
-
__extends(FetchError, _super);
|
|
416
|
-
function FetchError(cause, msg) {
|
|
417
|
-
var _this = _super.call(this, msg) || this;
|
|
418
|
-
_this.cause = cause;
|
|
419
|
-
_this.name = "FetchError";
|
|
420
|
-
return _this;
|
|
421
|
-
}
|
|
422
|
-
return FetchError;
|
|
423
|
-
}(Error));
|
|
424
|
-
exports.FetchError = FetchError;
|
|
425
|
-
var RequiredError = /** @class */ (function (_super) {
|
|
426
|
-
__extends(RequiredError, _super);
|
|
427
|
-
function RequiredError(field, msg) {
|
|
428
|
-
var _this = _super.call(this, msg) || this;
|
|
429
|
-
_this.field = field;
|
|
430
|
-
_this.name = "RequiredError";
|
|
431
|
-
return _this;
|
|
432
|
-
}
|
|
433
|
-
return RequiredError;
|
|
434
|
-
}(Error));
|
|
435
|
-
exports.RequiredError = RequiredError;
|
|
436
|
-
exports.COLLECTION_FORMATS = {
|
|
437
|
-
csv: ",",
|
|
438
|
-
ssv: " ",
|
|
439
|
-
tsv: "\t",
|
|
440
|
-
pipes: "|",
|
|
441
|
-
};
|
|
442
|
-
function querystring(params, prefix) {
|
|
443
|
-
if (prefix === void 0) { prefix = ''; }
|
|
444
|
-
return Object.keys(params)
|
|
445
|
-
.map(function (key) { return querystringSingleKey(key, params[key], prefix); })
|
|
446
|
-
.filter(function (part) { return part.length > 0; })
|
|
447
|
-
.join('&');
|
|
448
|
-
}
|
|
449
|
-
exports.querystring = querystring;
|
|
450
|
-
function querystringSingleKey(key, value, keyPrefix) {
|
|
451
|
-
if (keyPrefix === void 0) { keyPrefix = ''; }
|
|
452
|
-
var fullKey = keyPrefix + (keyPrefix.length ? "[".concat(key, "]") : key);
|
|
453
|
-
if (value instanceof Array) {
|
|
454
|
-
var multiValue = value.map(function (singleValue) { return encodeURIComponent(String(singleValue)); })
|
|
455
|
-
.join("&".concat(encodeURIComponent(fullKey), "="));
|
|
456
|
-
return "".concat(encodeURIComponent(fullKey), "=").concat(multiValue);
|
|
457
|
-
}
|
|
458
|
-
if (value instanceof Set) {
|
|
459
|
-
var valueAsArray = Array.from(value);
|
|
460
|
-
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
|
461
|
-
}
|
|
462
|
-
if (value instanceof Date) {
|
|
463
|
-
return "".concat(encodeURIComponent(fullKey), "=").concat(encodeURIComponent(value.toISOString()));
|
|
464
|
-
}
|
|
465
|
-
if (value instanceof Object) {
|
|
466
|
-
return querystring(value, fullKey);
|
|
467
|
-
}
|
|
468
|
-
return "".concat(encodeURIComponent(fullKey), "=").concat(encodeURIComponent(String(value)));
|
|
469
|
-
}
|
|
470
|
-
function mapValues(data, fn) {
|
|
471
|
-
return Object.keys(data).reduce(function (acc, key) {
|
|
472
|
-
var _a;
|
|
473
|
-
return (__assign(__assign({}, acc), (_a = {}, _a[key] = fn(data[key]), _a)));
|
|
474
|
-
}, {});
|
|
475
|
-
}
|
|
476
|
-
exports.mapValues = mapValues;
|
|
477
|
-
function canConsumeForm(consumes) {
|
|
478
|
-
for (var _i = 0, consumes_1 = consumes; _i < consumes_1.length; _i++) {
|
|
479
|
-
var consume = consumes_1[_i];
|
|
480
|
-
if ('multipart/form-data' === consume.contentType) {
|
|
481
|
-
return true;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
return false;
|
|
485
|
-
}
|
|
486
|
-
exports.canConsumeForm = canConsumeForm;
|
|
487
|
-
function toDateISOString(date) {
|
|
488
|
-
if (date === undefined) {
|
|
489
|
-
return undefined;
|
|
490
|
-
}
|
|
491
|
-
if (date === null) {
|
|
492
|
-
return null;
|
|
493
|
-
}
|
|
494
|
-
return date.toLocaleDateString('ja-JP', {
|
|
495
|
-
year: 'numeric',
|
|
496
|
-
month: '2-digit',
|
|
497
|
-
day: '2-digit'
|
|
498
|
-
}).replace(/\//gi, '-');
|
|
499
|
-
}
|
|
500
|
-
exports.toDateISOString = toDateISOString;
|
|
501
|
-
var JSONApiResponse = /** @class */ (function () {
|
|
502
|
-
function JSONApiResponse(raw, transformer) {
|
|
503
|
-
if (transformer === void 0) { transformer = function (jsonValue) { return jsonValue; }; }
|
|
504
|
-
this.raw = raw;
|
|
505
|
-
this.transformer = transformer;
|
|
506
|
-
}
|
|
507
|
-
JSONApiResponse.prototype.value = function () {
|
|
508
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
509
|
-
var _a;
|
|
510
|
-
return __generator(this, function (_b) {
|
|
511
|
-
switch (_b.label) {
|
|
512
|
-
case 0:
|
|
513
|
-
_a = this.transformer;
|
|
514
|
-
return [4 /*yield*/, this.raw.json()];
|
|
515
|
-
case 1: return [2 /*return*/, _a.apply(this, [_b.sent()])];
|
|
516
|
-
}
|
|
517
|
-
});
|
|
518
|
-
});
|
|
519
|
-
};
|
|
520
|
-
return JSONApiResponse;
|
|
521
|
-
}());
|
|
522
|
-
exports.JSONApiResponse = JSONApiResponse;
|
|
523
|
-
var VoidApiResponse = /** @class */ (function () {
|
|
524
|
-
function VoidApiResponse(raw) {
|
|
525
|
-
this.raw = raw;
|
|
526
|
-
}
|
|
527
|
-
VoidApiResponse.prototype.value = function () {
|
|
528
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
529
|
-
return __generator(this, function (_a) {
|
|
530
|
-
return [2 /*return*/, undefined];
|
|
531
|
-
});
|
|
532
|
-
});
|
|
533
|
-
};
|
|
534
|
-
return VoidApiResponse;
|
|
535
|
-
}());
|
|
536
|
-
exports.VoidApiResponse = VoidApiResponse;
|
|
537
|
-
function instanceOfBlobWithMeta(object) {
|
|
538
|
-
return 'filename' in object && 'blob' in object;
|
|
539
|
-
}
|
|
540
|
-
exports.instanceOfBlobWithMeta = instanceOfBlobWithMeta;
|
|
541
|
-
var BlobWithMetaApiResponse = /** @class */ (function () {
|
|
542
|
-
function BlobWithMetaApiResponse(raw) {
|
|
543
|
-
this.raw = raw;
|
|
544
|
-
}
|
|
545
|
-
BlobWithMetaApiResponse.prototype.value = function () {
|
|
546
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
547
|
-
var _a;
|
|
548
|
-
return __generator(this, function (_b) {
|
|
549
|
-
switch (_b.label) {
|
|
550
|
-
case 0:
|
|
551
|
-
_a = {};
|
|
552
|
-
return [4 /*yield*/, this.raw.blob()];
|
|
553
|
-
case 1: return [2 /*return*/, (_a.blob = _b.sent(),
|
|
554
|
-
_a.filename = this.extractFilename(this.raw.headers),
|
|
555
|
-
_a)];
|
|
556
|
-
}
|
|
557
|
-
});
|
|
558
|
-
});
|
|
559
|
-
};
|
|
560
|
-
;
|
|
561
|
-
BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
|
|
562
|
-
var headerName = 'Content-Disposition';
|
|
563
|
-
if (headers.has(headerName)) {
|
|
564
|
-
var headerValue = headers.get(headerName);
|
|
565
|
-
var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
|
|
566
|
-
var matches = filenameRegex.exec(headerValue);
|
|
567
|
-
if (matches != null && matches[1]) {
|
|
568
|
-
return matches[1];
|
|
569
|
-
}
|
|
570
|
-
else {
|
|
571
|
-
return undefined;
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
else {
|
|
575
|
-
return undefined;
|
|
576
|
-
}
|
|
577
|
-
};
|
|
578
|
-
return BlobWithMetaApiResponse;
|
|
579
|
-
}());
|
|
580
|
-
exports.BlobWithMetaApiResponse = BlobWithMetaApiResponse;
|
|
581
|
-
var TextApiResponse = /** @class */ (function () {
|
|
582
|
-
function TextApiResponse(raw) {
|
|
583
|
-
this.raw = raw;
|
|
584
|
-
}
|
|
585
|
-
TextApiResponse.prototype.value = function () {
|
|
586
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
587
|
-
return __generator(this, function (_a) {
|
|
588
|
-
switch (_a.label) {
|
|
589
|
-
case 0: return [4 /*yield*/, this.raw.text()];
|
|
590
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
591
|
-
}
|
|
592
|
-
});
|
|
593
|
-
});
|
|
594
|
-
};
|
|
595
|
-
;
|
|
596
|
-
return TextApiResponse;
|
|
597
|
-
}());
|
|
598
|
-
exports.TextApiResponse = TextApiResponse;
|
|
@@ -1,29 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
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;
|