@lcdp/api-react-rest-client 2.6.2-develop.8265310705 → 2.6.2-develop.8356314138
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/order/src/models/OrderJournal.d.ts +24 -0
- package/order/src/models/OrderJournal.js +8 -0
- package/package.json +1 -1
- package/sale-offer/src/models/SaleOffer.d.ts +17 -17
- package/sale-offer/src/models/SaleOffer.js +18 -19
- package/statistic/src/apis/SearchUserStatisticsApi.d.ts +42 -0
- package/statistic/src/apis/SearchUserStatisticsApi.js +248 -0
- package/statistic/src/apis/index.d.ts +1 -0
- package/statistic/src/apis/index.js +1 -0
- package/statistic/src/models/PaginatedUserStatistics.d.ts +29 -0
- package/statistic/src/models/PaginatedUserStatistics.js +50 -0
- package/statistic/src/models/PaginatedUserStatisticsAllOf.d.ts +28 -0
- package/statistic/src/models/PaginatedUserStatisticsAllOf.js +42 -0
- package/statistic/src/models/UserStatistic.d.ts +70 -0
- package/statistic/src/models/UserStatistic.js +57 -0
- package/statistic/src/models/index.d.ts +3 -0
- package/statistic/src/models/index.js +3 -0
- package/third-party/index.d.ts +1 -0
- package/third-party/index.js +17 -0
- package/third-party/src/apis/ManageThirdPartyLinkApi.d.ts +29 -0
- package/third-party/src/apis/ManageThirdPartyLinkApi.js +163 -0
- package/third-party/src/apis/index.d.ts +1 -0
- package/third-party/src/apis/index.js +17 -0
- package/third-party/src/index.d.ts +3 -0
- package/third-party/src/index.js +19 -0
- package/third-party/src/models/RestError.d.ts +87 -0
- package/third-party/src/models/RestError.js +99 -0
- package/third-party/src/models/ThirdPartyLink.d.ts +27 -0
- package/third-party/src/models/ThirdPartyLink.js +42 -0
- package/third-party/src/models/ThirdPartyLinkCreationParameters.d.ts +33 -0
- package/third-party/src/models/ThirdPartyLinkCreationParameters.js +43 -0
- package/third-party/src/models/index.d.ts +3 -0
- package/third-party/src/models/index.js +19 -0
- package/third-party/src/runtime.d.ts +149 -0
- package/third-party/src/runtime.js +480 -0
- package/user/src/models/User.d.ts +21 -8
- package/user/src/models/User.js +13 -8
- package/user/src/models/UserStatisticLink.d.ts +58 -0
- package/user/src/models/UserStatisticLink.js +50 -0
- package/user/src/models/UserStatisticLinkAllOf.d.ts +57 -0
- package/user/src/models/UserStatisticLinkAllOf.js +52 -0
- package/user/src/models/index.d.ts +2 -0
- package/user/src/models/index.js +2 -0
|
@@ -0,0 +1,480 @@
|
|
|
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 __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.exists = exports.Configuration = exports.COLLECTION_FORMATS = exports.RequiredError = exports.BaseAPI = exports.BASE_PATH = void 0;
|
|
79
|
+
exports.BASE_PATH = "/api/v1";
|
|
80
|
+
var isBlob = function (value) { return typeof Blob !== 'undefined' && value instanceof Blob; };
|
|
81
|
+
/**
|
|
82
|
+
* This is the base class for all generated API classes.
|
|
83
|
+
*/
|
|
84
|
+
var BaseAPI = /** @class */ (function () {
|
|
85
|
+
function BaseAPI(configuration) {
|
|
86
|
+
if (configuration === void 0) { configuration = new Configuration(); }
|
|
87
|
+
var _this = this;
|
|
88
|
+
this.configuration = configuration;
|
|
89
|
+
this.fetchApi = function (url, init) { return __awaiter(_this, void 0, void 0, function () {
|
|
90
|
+
var fetchParams, _i, _a, middleware, response, _b, _c, middleware;
|
|
91
|
+
return __generator(this, function (_d) {
|
|
92
|
+
switch (_d.label) {
|
|
93
|
+
case 0:
|
|
94
|
+
fetchParams = { url: url, init: init };
|
|
95
|
+
_i = 0, _a = this.middleware;
|
|
96
|
+
_d.label = 1;
|
|
97
|
+
case 1:
|
|
98
|
+
if (!(_i < _a.length)) return [3 /*break*/, 4];
|
|
99
|
+
middleware = _a[_i];
|
|
100
|
+
if (!middleware.pre) return [3 /*break*/, 3];
|
|
101
|
+
return [4 /*yield*/, middleware.pre(__assign({ fetch: this.fetchApi }, fetchParams))];
|
|
102
|
+
case 2:
|
|
103
|
+
fetchParams = (_d.sent()) || fetchParams;
|
|
104
|
+
_d.label = 3;
|
|
105
|
+
case 3:
|
|
106
|
+
_i++;
|
|
107
|
+
return [3 /*break*/, 1];
|
|
108
|
+
case 4: return [4 /*yield*/, this.configuration.fetchApi(fetchParams.url, fetchParams.init)];
|
|
109
|
+
case 5:
|
|
110
|
+
response = _d.sent();
|
|
111
|
+
_b = 0, _c = this.middleware;
|
|
112
|
+
_d.label = 6;
|
|
113
|
+
case 6:
|
|
114
|
+
if (!(_b < _c.length)) return [3 /*break*/, 9];
|
|
115
|
+
middleware = _c[_b];
|
|
116
|
+
if (!middleware.post) return [3 /*break*/, 8];
|
|
117
|
+
return [4 /*yield*/, middleware.post({
|
|
118
|
+
fetch: this.fetchApi,
|
|
119
|
+
url: url,
|
|
120
|
+
init: init,
|
|
121
|
+
response: response.clone(),
|
|
122
|
+
})];
|
|
123
|
+
case 7:
|
|
124
|
+
response = (_d.sent()) || response;
|
|
125
|
+
_d.label = 8;
|
|
126
|
+
case 8:
|
|
127
|
+
_b++;
|
|
128
|
+
return [3 /*break*/, 6];
|
|
129
|
+
case 9: return [2 /*return*/, response];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}); };
|
|
133
|
+
this.middleware = configuration.middleware;
|
|
134
|
+
}
|
|
135
|
+
BaseAPI.prototype.withMiddleware = function () {
|
|
136
|
+
var _a;
|
|
137
|
+
var middlewares = [];
|
|
138
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
139
|
+
middlewares[_i] = arguments[_i];
|
|
140
|
+
}
|
|
141
|
+
var next = this.clone();
|
|
142
|
+
next.middleware = (_a = next.middleware).concat.apply(_a, middlewares);
|
|
143
|
+
return next;
|
|
144
|
+
};
|
|
145
|
+
BaseAPI.prototype.withPreMiddleware = function () {
|
|
146
|
+
var preMiddlewares = [];
|
|
147
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
148
|
+
preMiddlewares[_i] = arguments[_i];
|
|
149
|
+
}
|
|
150
|
+
var middlewares = preMiddlewares.map(function (pre) { return ({ pre: pre }); });
|
|
151
|
+
return this.withMiddleware.apply(this, middlewares);
|
|
152
|
+
};
|
|
153
|
+
BaseAPI.prototype.withPostMiddleware = function () {
|
|
154
|
+
var postMiddlewares = [];
|
|
155
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
156
|
+
postMiddlewares[_i] = arguments[_i];
|
|
157
|
+
}
|
|
158
|
+
var middlewares = postMiddlewares.map(function (post) { return ({ post: post }); });
|
|
159
|
+
return this.withMiddleware.apply(this, middlewares);
|
|
160
|
+
};
|
|
161
|
+
BaseAPI.prototype.request = function (context) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
163
|
+
var _a, url, init, response;
|
|
164
|
+
return __generator(this, function (_b) {
|
|
165
|
+
switch (_b.label) {
|
|
166
|
+
case 0:
|
|
167
|
+
_a = this.createFetchParams(context), url = _a.url, init = _a.init;
|
|
168
|
+
return [4 /*yield*/, this.fetchApi(url, init)];
|
|
169
|
+
case 1:
|
|
170
|
+
response = _b.sent();
|
|
171
|
+
if (response.status >= 200 && response.status < 300) {
|
|
172
|
+
return [2 /*return*/, response];
|
|
173
|
+
}
|
|
174
|
+
throw response;
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
BaseAPI.prototype.createFetchParams = function (context) {
|
|
180
|
+
var url = this.configuration.basePath + context.path;
|
|
181
|
+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
182
|
+
// only add the querystring to the URL if there are query parameters.
|
|
183
|
+
// this is done to avoid urls ending with a "?" character which buggy webservers
|
|
184
|
+
// do not handle correctly sometimes.
|
|
185
|
+
url += '?' + this.configuration.queryParamsStringify(context.query);
|
|
186
|
+
}
|
|
187
|
+
var body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body))
|
|
188
|
+
? context.body
|
|
189
|
+
: JSON.stringify(context.body);
|
|
190
|
+
var headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
191
|
+
Object.keys(headers).forEach(function (key) { return headers[key] === undefined ? delete headers[key] : {}; });
|
|
192
|
+
var init = {
|
|
193
|
+
method: context.method,
|
|
194
|
+
headers: headers,
|
|
195
|
+
body: body,
|
|
196
|
+
credentials: this.configuration.credentials,
|
|
197
|
+
referrerPolicy: this.configuration.referrerPolicy,
|
|
198
|
+
};
|
|
199
|
+
return { url: url, init: init };
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
203
|
+
* and then shallow cloning data members.
|
|
204
|
+
*/
|
|
205
|
+
BaseAPI.prototype.clone = function () {
|
|
206
|
+
var constructor = this.constructor;
|
|
207
|
+
var next = new constructor(this.configuration);
|
|
208
|
+
next.middleware = this.middleware.slice();
|
|
209
|
+
return next;
|
|
210
|
+
};
|
|
211
|
+
return BaseAPI;
|
|
212
|
+
}());
|
|
213
|
+
exports.BaseAPI = BaseAPI;
|
|
214
|
+
;
|
|
215
|
+
var RequiredError = /** @class */ (function (_super) {
|
|
216
|
+
__extends(RequiredError, _super);
|
|
217
|
+
function RequiredError(field, msg) {
|
|
218
|
+
var _this = _super.call(this, msg) || this;
|
|
219
|
+
_this.field = field;
|
|
220
|
+
_this.name = "RequiredError";
|
|
221
|
+
return _this;
|
|
222
|
+
}
|
|
223
|
+
return RequiredError;
|
|
224
|
+
}(Error));
|
|
225
|
+
exports.RequiredError = RequiredError;
|
|
226
|
+
exports.COLLECTION_FORMATS = {
|
|
227
|
+
csv: ",",
|
|
228
|
+
ssv: " ",
|
|
229
|
+
tsv: "\t",
|
|
230
|
+
pipes: "|",
|
|
231
|
+
};
|
|
232
|
+
var Configuration = /** @class */ (function () {
|
|
233
|
+
function Configuration(configuration) {
|
|
234
|
+
if (configuration === void 0) { configuration = {}; }
|
|
235
|
+
this.configuration = configuration;
|
|
236
|
+
}
|
|
237
|
+
Object.defineProperty(Configuration.prototype, "basePath", {
|
|
238
|
+
get: function () {
|
|
239
|
+
return this.configuration.basePath != null ? this.configuration.basePath : exports.BASE_PATH;
|
|
240
|
+
},
|
|
241
|
+
enumerable: false,
|
|
242
|
+
configurable: true
|
|
243
|
+
});
|
|
244
|
+
Object.defineProperty(Configuration.prototype, "fetchApi", {
|
|
245
|
+
get: function () {
|
|
246
|
+
return this.configuration.fetchApi || window.fetch.bind(window);
|
|
247
|
+
},
|
|
248
|
+
enumerable: false,
|
|
249
|
+
configurable: true
|
|
250
|
+
});
|
|
251
|
+
Object.defineProperty(Configuration.prototype, "middleware", {
|
|
252
|
+
get: function () {
|
|
253
|
+
return this.configuration.middleware || [];
|
|
254
|
+
},
|
|
255
|
+
enumerable: false,
|
|
256
|
+
configurable: true
|
|
257
|
+
});
|
|
258
|
+
Object.defineProperty(Configuration.prototype, "queryParamsStringify", {
|
|
259
|
+
get: function () {
|
|
260
|
+
return this.configuration.queryParamsStringify || querystring;
|
|
261
|
+
},
|
|
262
|
+
enumerable: false,
|
|
263
|
+
configurable: true
|
|
264
|
+
});
|
|
265
|
+
Object.defineProperty(Configuration.prototype, "username", {
|
|
266
|
+
get: function () {
|
|
267
|
+
return this.configuration.username;
|
|
268
|
+
},
|
|
269
|
+
enumerable: false,
|
|
270
|
+
configurable: true
|
|
271
|
+
});
|
|
272
|
+
Object.defineProperty(Configuration.prototype, "password", {
|
|
273
|
+
get: function () {
|
|
274
|
+
return this.configuration.password;
|
|
275
|
+
},
|
|
276
|
+
enumerable: false,
|
|
277
|
+
configurable: true
|
|
278
|
+
});
|
|
279
|
+
Object.defineProperty(Configuration.prototype, "apiKey", {
|
|
280
|
+
get: function () {
|
|
281
|
+
var apiKey = this.configuration.apiKey;
|
|
282
|
+
if (apiKey) {
|
|
283
|
+
return typeof apiKey === 'function' ? apiKey : function () { return apiKey; };
|
|
284
|
+
}
|
|
285
|
+
return undefined;
|
|
286
|
+
},
|
|
287
|
+
enumerable: false,
|
|
288
|
+
configurable: true
|
|
289
|
+
});
|
|
290
|
+
Object.defineProperty(Configuration.prototype, "accessToken", {
|
|
291
|
+
get: function () {
|
|
292
|
+
var accessToken = this.configuration.accessToken;
|
|
293
|
+
if (accessToken) {
|
|
294
|
+
return typeof accessToken === 'function' ? accessToken : function () { return Promise.resolve(accessToken); };
|
|
295
|
+
}
|
|
296
|
+
return undefined;
|
|
297
|
+
},
|
|
298
|
+
enumerable: false,
|
|
299
|
+
configurable: true
|
|
300
|
+
});
|
|
301
|
+
Object.defineProperty(Configuration.prototype, "headers", {
|
|
302
|
+
get: function () {
|
|
303
|
+
return this.configuration.headers;
|
|
304
|
+
},
|
|
305
|
+
enumerable: false,
|
|
306
|
+
configurable: true
|
|
307
|
+
});
|
|
308
|
+
Object.defineProperty(Configuration.prototype, "credentials", {
|
|
309
|
+
get: function () {
|
|
310
|
+
var _a;
|
|
311
|
+
return (_a = this.configuration.credentials) !== null && _a !== void 0 ? _a : "omit";
|
|
312
|
+
},
|
|
313
|
+
enumerable: false,
|
|
314
|
+
configurable: true
|
|
315
|
+
});
|
|
316
|
+
Object.defineProperty(Configuration.prototype, "referrerPolicy", {
|
|
317
|
+
get: function () {
|
|
318
|
+
var _a;
|
|
319
|
+
return (_a = this.configuration.referrerPolicy) !== null && _a !== void 0 ? _a : "origin";
|
|
320
|
+
},
|
|
321
|
+
enumerable: false,
|
|
322
|
+
configurable: true
|
|
323
|
+
});
|
|
324
|
+
return Configuration;
|
|
325
|
+
}());
|
|
326
|
+
exports.Configuration = Configuration;
|
|
327
|
+
function exists(json, key) {
|
|
328
|
+
var value = json[key];
|
|
329
|
+
return value !== null && value !== undefined;
|
|
330
|
+
}
|
|
331
|
+
exports.exists = exists;
|
|
332
|
+
function querystring(params, prefix) {
|
|
333
|
+
if (prefix === void 0) { prefix = ''; }
|
|
334
|
+
return Object.keys(params)
|
|
335
|
+
.map(function (key) {
|
|
336
|
+
var fullKey = prefix + (prefix.length ? "[".concat(key, "]") : key);
|
|
337
|
+
var value = params[key];
|
|
338
|
+
if (value instanceof Array) {
|
|
339
|
+
var multiValue = value.map(function (singleValue) { return encodeURIComponent(String(singleValue)); })
|
|
340
|
+
.join("&".concat(encodeURIComponent(fullKey), "="));
|
|
341
|
+
return "".concat(encodeURIComponent(fullKey), "=").concat(multiValue);
|
|
342
|
+
}
|
|
343
|
+
if (value instanceof Object) {
|
|
344
|
+
return querystring(value, fullKey);
|
|
345
|
+
}
|
|
346
|
+
return "".concat(encodeURIComponent(fullKey), "=").concat(encodeURIComponent(String(value)));
|
|
347
|
+
})
|
|
348
|
+
.filter(function (part) { return part.length > 0; })
|
|
349
|
+
.join('&');
|
|
350
|
+
}
|
|
351
|
+
exports.querystring = querystring;
|
|
352
|
+
function mapValues(data, fn) {
|
|
353
|
+
return Object.keys(data).reduce(function (acc, key) {
|
|
354
|
+
var _a;
|
|
355
|
+
return (__assign(__assign({}, acc), (_a = {}, _a[key] = fn(data[key]), _a)));
|
|
356
|
+
}, {});
|
|
357
|
+
}
|
|
358
|
+
exports.mapValues = mapValues;
|
|
359
|
+
function canConsumeForm(consumes) {
|
|
360
|
+
for (var _i = 0, consumes_1 = consumes; _i < consumes_1.length; _i++) {
|
|
361
|
+
var consume = consumes_1[_i];
|
|
362
|
+
if ('multipart/form-data' === consume.contentType) {
|
|
363
|
+
return true;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
exports.canConsumeForm = canConsumeForm;
|
|
369
|
+
function toDateISOString(date) {
|
|
370
|
+
if (date === undefined) {
|
|
371
|
+
return undefined;
|
|
372
|
+
}
|
|
373
|
+
if (date === null) {
|
|
374
|
+
return null;
|
|
375
|
+
}
|
|
376
|
+
return date.toLocaleDateString('ja-JP', {
|
|
377
|
+
year: 'numeric',
|
|
378
|
+
month: '2-digit',
|
|
379
|
+
day: '2-digit'
|
|
380
|
+
}).replace(/\//gi, '-');
|
|
381
|
+
}
|
|
382
|
+
exports.toDateISOString = toDateISOString;
|
|
383
|
+
var JSONApiResponse = /** @class */ (function () {
|
|
384
|
+
function JSONApiResponse(raw, transformer) {
|
|
385
|
+
if (transformer === void 0) { transformer = function (jsonValue) { return jsonValue; }; }
|
|
386
|
+
this.raw = raw;
|
|
387
|
+
this.transformer = transformer;
|
|
388
|
+
}
|
|
389
|
+
JSONApiResponse.prototype.value = function () {
|
|
390
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
391
|
+
var _a;
|
|
392
|
+
return __generator(this, function (_b) {
|
|
393
|
+
switch (_b.label) {
|
|
394
|
+
case 0:
|
|
395
|
+
_a = this.transformer;
|
|
396
|
+
return [4 /*yield*/, this.raw.json()];
|
|
397
|
+
case 1: return [2 /*return*/, _a.apply(this, [_b.sent()])];
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
};
|
|
402
|
+
return JSONApiResponse;
|
|
403
|
+
}());
|
|
404
|
+
exports.JSONApiResponse = JSONApiResponse;
|
|
405
|
+
var VoidApiResponse = /** @class */ (function () {
|
|
406
|
+
function VoidApiResponse(raw) {
|
|
407
|
+
this.raw = raw;
|
|
408
|
+
}
|
|
409
|
+
VoidApiResponse.prototype.value = function () {
|
|
410
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
411
|
+
return __generator(this, function (_a) {
|
|
412
|
+
return [2 /*return*/, undefined];
|
|
413
|
+
});
|
|
414
|
+
});
|
|
415
|
+
};
|
|
416
|
+
return VoidApiResponse;
|
|
417
|
+
}());
|
|
418
|
+
exports.VoidApiResponse = VoidApiResponse;
|
|
419
|
+
function instanceOfBlobWithMeta(object) {
|
|
420
|
+
return 'filename' in object && 'blob' in object;
|
|
421
|
+
}
|
|
422
|
+
exports.instanceOfBlobWithMeta = instanceOfBlobWithMeta;
|
|
423
|
+
var BlobWithMetaApiResponse = /** @class */ (function () {
|
|
424
|
+
function BlobWithMetaApiResponse(raw) {
|
|
425
|
+
this.raw = raw;
|
|
426
|
+
}
|
|
427
|
+
BlobWithMetaApiResponse.prototype.value = function () {
|
|
428
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
429
|
+
var _a;
|
|
430
|
+
return __generator(this, function (_b) {
|
|
431
|
+
switch (_b.label) {
|
|
432
|
+
case 0:
|
|
433
|
+
_a = {};
|
|
434
|
+
return [4 /*yield*/, this.raw.blob()];
|
|
435
|
+
case 1: return [2 /*return*/, (_a.blob = _b.sent(),
|
|
436
|
+
_a.filename = this.extractFilename(this.raw.headers),
|
|
437
|
+
_a)];
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
});
|
|
441
|
+
};
|
|
442
|
+
;
|
|
443
|
+
BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
|
|
444
|
+
var headerName = 'Content-Disposition';
|
|
445
|
+
if (headers.has(headerName)) {
|
|
446
|
+
var headerValue = headers.get(headerName);
|
|
447
|
+
var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
|
|
448
|
+
var matches = filenameRegex.exec(headerValue);
|
|
449
|
+
if (matches != null && matches[1]) {
|
|
450
|
+
return matches[1];
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
return undefined;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
return undefined;
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
return BlobWithMetaApiResponse;
|
|
461
|
+
}());
|
|
462
|
+
exports.BlobWithMetaApiResponse = BlobWithMetaApiResponse;
|
|
463
|
+
var TextApiResponse = /** @class */ (function () {
|
|
464
|
+
function TextApiResponse(raw) {
|
|
465
|
+
this.raw = raw;
|
|
466
|
+
}
|
|
467
|
+
TextApiResponse.prototype.value = function () {
|
|
468
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
469
|
+
return __generator(this, function (_a) {
|
|
470
|
+
switch (_a.label) {
|
|
471
|
+
case 0: return [4 /*yield*/, this.raw.text()];
|
|
472
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
});
|
|
476
|
+
};
|
|
477
|
+
;
|
|
478
|
+
return TextApiResponse;
|
|
479
|
+
}());
|
|
480
|
+
exports.TextApiResponse = TextApiResponse;
|
|
@@ -19,6 +19,7 @@ import { UserDelegatedServices } from './UserDelegatedServices';
|
|
|
19
19
|
import { UserJournal } from './UserJournal';
|
|
20
20
|
import { UserMangopayTarget } from './UserMangopayTarget';
|
|
21
21
|
import { UserRole } from './UserRole';
|
|
22
|
+
import { UserStatisticLink } from './UserStatisticLink';
|
|
22
23
|
import { UserThreads } from './UserThreads';
|
|
23
24
|
import { UserWallets } from './UserWallets';
|
|
24
25
|
/**
|
|
@@ -32,7 +33,7 @@ export interface User {
|
|
|
32
33
|
* @type {number}
|
|
33
34
|
* @memberof User
|
|
34
35
|
*/
|
|
35
|
-
id
|
|
36
|
+
id: number;
|
|
36
37
|
/**
|
|
37
38
|
*
|
|
38
39
|
* @type {UserMangopayTarget}
|
|
@@ -44,7 +45,7 @@ export interface User {
|
|
|
44
45
|
* @type {UserRole}
|
|
45
46
|
* @memberof User
|
|
46
47
|
*/
|
|
47
|
-
role
|
|
48
|
+
role: UserRole;
|
|
48
49
|
/**
|
|
49
50
|
* True if the user have unpaid invoice
|
|
50
51
|
* @type {boolean}
|
|
@@ -56,13 +57,13 @@ export interface User {
|
|
|
56
57
|
* @type {boolean}
|
|
57
58
|
* @memberof User
|
|
58
59
|
*/
|
|
59
|
-
holidayModeEnabled
|
|
60
|
+
holidayModeEnabled: boolean;
|
|
60
61
|
/**
|
|
61
62
|
* User nickname
|
|
62
63
|
* @type {string}
|
|
63
64
|
* @memberof User
|
|
64
65
|
*/
|
|
65
|
-
nickname
|
|
66
|
+
nickname: string;
|
|
66
67
|
/**
|
|
67
68
|
*
|
|
68
69
|
* @type {boolean}
|
|
@@ -170,7 +171,7 @@ export interface User {
|
|
|
170
171
|
* @type {HttpLink}
|
|
171
172
|
* @memberof User
|
|
172
173
|
*/
|
|
173
|
-
socialNetworks
|
|
174
|
+
socialNetworks: HttpLink;
|
|
174
175
|
/**
|
|
175
176
|
*
|
|
176
177
|
* @type {string}
|
|
@@ -194,7 +195,7 @@ export interface User {
|
|
|
194
195
|
* @type {UserDelegatedServices}
|
|
195
196
|
* @memberof User
|
|
196
197
|
*/
|
|
197
|
-
delegatedServices
|
|
198
|
+
delegatedServices: UserDelegatedServices;
|
|
198
199
|
/**
|
|
199
200
|
*
|
|
200
201
|
* @type {HttpLink}
|
|
@@ -206,13 +207,13 @@ export interface User {
|
|
|
206
207
|
* @type {HttpLink}
|
|
207
208
|
* @memberof User
|
|
208
209
|
*/
|
|
209
|
-
transport
|
|
210
|
+
transport: HttpLink;
|
|
210
211
|
/**
|
|
211
212
|
* Payment delay in days
|
|
212
213
|
* @type {number}
|
|
213
214
|
* @memberof User
|
|
214
215
|
*/
|
|
215
|
-
paymentDelay
|
|
216
|
+
paymentDelay: number | null;
|
|
216
217
|
/**
|
|
217
218
|
*
|
|
218
219
|
* @type {HttpLink}
|
|
@@ -291,6 +292,18 @@ export interface User {
|
|
|
291
292
|
* @memberof User
|
|
292
293
|
*/
|
|
293
294
|
journal?: UserJournal;
|
|
295
|
+
/**
|
|
296
|
+
*
|
|
297
|
+
* @type {Array<string>}
|
|
298
|
+
* @memberof User
|
|
299
|
+
*/
|
|
300
|
+
badges?: Array<string>;
|
|
301
|
+
/**
|
|
302
|
+
*
|
|
303
|
+
* @type {UserStatisticLink}
|
|
304
|
+
* @memberof User
|
|
305
|
+
*/
|
|
306
|
+
statistic: UserStatisticLink;
|
|
294
307
|
}
|
|
295
308
|
export declare function UserFromJSON(json: any): User;
|
|
296
309
|
export declare function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User;
|
package/user/src/models/User.js
CHANGED
|
@@ -25,6 +25,7 @@ var UserDelegatedServices_1 = require("./UserDelegatedServices");
|
|
|
25
25
|
var UserJournal_1 = require("./UserJournal");
|
|
26
26
|
var UserMangopayTarget_1 = require("./UserMangopayTarget");
|
|
27
27
|
var UserRole_1 = require("./UserRole");
|
|
28
|
+
var UserStatisticLink_1 = require("./UserStatisticLink");
|
|
28
29
|
var UserThreads_1 = require("./UserThreads");
|
|
29
30
|
var UserWallets_1 = require("./UserWallets");
|
|
30
31
|
function UserFromJSON(json) {
|
|
@@ -36,12 +37,12 @@ function UserFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
36
37
|
return json;
|
|
37
38
|
}
|
|
38
39
|
return {
|
|
39
|
-
'id':
|
|
40
|
+
'id': json['id'],
|
|
40
41
|
'mangopayTarget': !(0, runtime_1.exists)(json, 'mangopayTarget') ? undefined : (0, UserMangopayTarget_1.UserMangopayTargetFromJSON)(json['mangopayTarget']),
|
|
41
|
-
'role':
|
|
42
|
+
'role': (0, UserRole_1.UserRoleFromJSON)(json['role']),
|
|
42
43
|
'haveUnpaid': !(0, runtime_1.exists)(json, 'haveUnpaid') ? undefined : json['haveUnpaid'],
|
|
43
|
-
'holidayModeEnabled':
|
|
44
|
-
'nickname':
|
|
44
|
+
'holidayModeEnabled': json['holidayModeEnabled'],
|
|
45
|
+
'nickname': json['nickname'],
|
|
45
46
|
'soletrader': !(0, runtime_1.exists)(json, 'soletrader') ? undefined : json['soletrader'],
|
|
46
47
|
'gender': !(0, runtime_1.exists)(json, 'gender') ? json['gender'] : (0, Gender_1.GenderFromJSON)(json['gender']),
|
|
47
48
|
'firstname': !(0, runtime_1.exists)(json, 'firstname') ? undefined : json['firstname'],
|
|
@@ -59,14 +60,14 @@ function UserFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
59
60
|
'kycLevel': !(0, runtime_1.exists)(json, 'kycLevel') ? undefined : (0, KycLevel_1.KycLevelFromJSON)(json['kycLevel']),
|
|
60
61
|
'comment': !(0, runtime_1.exists)(json, 'comment') ? undefined : json['comment'],
|
|
61
62
|
'company': !(0, runtime_1.exists)(json, 'company') ? undefined : (0, UserCompany_1.UserCompanyFromJSON)(json['company']),
|
|
62
|
-
'socialNetworks':
|
|
63
|
+
'socialNetworks': (0, HttpLink_1.HttpLinkFromJSON)(json['socialNetworks']),
|
|
63
64
|
'accountantEmail': !(0, runtime_1.exists)(json, 'accountantEmail') ? json['accountantEmail'] : json['accountantEmail'],
|
|
64
65
|
'additionalEmails': !(0, runtime_1.exists)(json, 'additionalEmails') ? undefined : json['additionalEmails'],
|
|
65
66
|
'documents': !(0, runtime_1.exists)(json, 'documents') ? undefined : (0, HttpLink_1.HttpLinkFromJSON)(json['documents']),
|
|
66
|
-
'delegatedServices':
|
|
67
|
+
'delegatedServices': (0, UserDelegatedServices_1.UserDelegatedServicesFromJSON)(json['delegatedServices']),
|
|
67
68
|
'forbiddenSellers': !(0, runtime_1.exists)(json, 'forbiddenSellers') ? undefined : (0, HttpLink_1.HttpLinkFromJSON)(json['forbiddenSellers']),
|
|
68
|
-
'transport':
|
|
69
|
-
'paymentDelay':
|
|
69
|
+
'transport': (0, HttpLink_1.HttpLinkFromJSON)(json['transport']),
|
|
70
|
+
'paymentDelay': json['paymentDelay'],
|
|
70
71
|
'favoriteLaboratoryStores': !(0, runtime_1.exists)(json, 'favoriteLaboratoryStores') ? undefined : (0, HttpLink_1.HttpLinkFromJSON)(json['favoriteLaboratoryStores']),
|
|
71
72
|
'pickupEnabled': !(0, runtime_1.exists)(json, 'pickupEnabled') ? undefined : json['pickupEnabled'],
|
|
72
73
|
'threads': !(0, runtime_1.exists)(json, 'threads') ? undefined : (0, UserThreads_1.UserThreadsFromJSON)(json['threads']),
|
|
@@ -80,6 +81,8 @@ function UserFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
80
81
|
'updatedAt': !(0, runtime_1.exists)(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
|
|
81
82
|
'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
|
|
82
83
|
'journal': !(0, runtime_1.exists)(json, 'journal') ? undefined : (0, UserJournal_1.UserJournalFromJSON)(json['journal']),
|
|
84
|
+
'badges': !(0, runtime_1.exists)(json, 'badges') ? undefined : json['badges'],
|
|
85
|
+
'statistic': (0, UserStatisticLink_1.UserStatisticLinkFromJSON)(json['statistic']),
|
|
83
86
|
};
|
|
84
87
|
}
|
|
85
88
|
exports.UserFromJSONTyped = UserFromJSONTyped;
|
|
@@ -135,6 +138,8 @@ function UserToJSON(value) {
|
|
|
135
138
|
'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
|
|
136
139
|
'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
|
|
137
140
|
'journal': (0, UserJournal_1.UserJournalToJSON)(value.journal),
|
|
141
|
+
'badges': value.badges,
|
|
142
|
+
'statistic': (0, UserStatisticLink_1.UserStatisticLinkToJSON)(value.statistic),
|
|
138
143
|
};
|
|
139
144
|
}
|
|
140
145
|
exports.UserToJSON = UserToJSON;
|