@lcdp/api-react-rest-client 2.6.2-LDS-3491-api-ajouter-route-pour-generer.8281786178 → 2.6.2-LDS-3445-api-ajouter-statitiques-user.8283473705

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/order/src/models/OrderJournal.d.ts +24 -0
  2. package/order/src/models/OrderJournal.js +8 -0
  3. package/package.json +1 -1
  4. package/statistic/src/apis/SearchUserStatisticsApi.d.ts +42 -0
  5. package/{third-party/src/apis/ManageThirdPartyLinkApi.js → statistic/src/apis/SearchUserStatisticsApi.js} +104 -19
  6. package/statistic/src/apis/index.d.ts +1 -0
  7. package/statistic/src/apis/index.js +1 -0
  8. package/statistic/src/models/PaginatedUserStatistics.d.ts +29 -0
  9. package/statistic/src/models/PaginatedUserStatistics.js +50 -0
  10. package/statistic/src/models/PaginatedUserStatisticsAllOf.d.ts +28 -0
  11. package/statistic/src/models/PaginatedUserStatisticsAllOf.js +42 -0
  12. package/statistic/src/models/UserStatistic.d.ts +70 -0
  13. package/statistic/src/models/UserStatistic.js +57 -0
  14. package/statistic/src/models/index.d.ts +3 -0
  15. package/statistic/src/models/index.js +3 -0
  16. package/user/src/models/User.d.ts +13 -0
  17. package/user/src/models/User.js +5 -0
  18. package/user/src/models/UserStatisticLink.d.ts +58 -0
  19. package/user/src/models/UserStatisticLink.js +50 -0
  20. package/user/src/models/UserStatisticLinkAllOf.d.ts +57 -0
  21. package/user/src/models/UserStatisticLinkAllOf.js +52 -0
  22. package/user/src/models/index.d.ts +2 -0
  23. package/user/src/models/index.js +2 -0
  24. package/third-party/index.d.ts +0 -1
  25. package/third-party/index.js +0 -17
  26. package/third-party/src/apis/ManageThirdPartyLinkApi.d.ts +0 -29
  27. package/third-party/src/apis/index.d.ts +0 -1
  28. package/third-party/src/apis/index.js +0 -17
  29. package/third-party/src/index.d.ts +0 -3
  30. package/third-party/src/index.js +0 -19
  31. package/third-party/src/models/RestError.d.ts +0 -87
  32. package/third-party/src/models/RestError.js +0 -99
  33. package/third-party/src/models/ThirdPartyLink.d.ts +0 -27
  34. package/third-party/src/models/ThirdPartyLink.js +0 -42
  35. package/third-party/src/models/ThirdPartyLinkCreationParameters.d.ts +0 -33
  36. package/third-party/src/models/ThirdPartyLinkCreationParameters.js +0 -43
  37. package/third-party/src/models/index.d.ts +0 -3
  38. package/third-party/src/models/index.js +0 -19
  39. package/third-party/src/runtime.d.ts +0 -149
  40. package/third-party/src/runtime.js +0 -480
@@ -40,6 +40,30 @@ export interface OrderJournal {
40
40
  * @memberof OrderJournal
41
41
  */
42
42
  freeCarriageThresholdReachedDate: Date | null;
43
+ /**
44
+ * Date when the order have been officially created by the buyer and so received by the seller
45
+ * @type {Date}
46
+ * @memberof OrderJournal
47
+ */
48
+ purchasedAt?: Date;
49
+ /**
50
+ * Date when the order have been delivered to the buyer. Important Note : If the transport is not delegated to LCDP, we can not provide this field value.
51
+ * @type {Date}
52
+ * @memberof OrderJournal
53
+ */
54
+ deliveredAt?: Date;
55
+ /**
56
+ * Date when the seller announced that he is in capability to fulfill the items in order according to their quantities and expiration date.
57
+ * @type {Date}
58
+ * @memberof OrderJournal
59
+ */
60
+ committedAt?: Date;
61
+ /**
62
+ * Date when the seller modified the order by lowering some quantities due to stock / expiration dates.
63
+ * @type {Date}
64
+ * @memberof OrderJournal
65
+ */
66
+ counterProposalAt?: Date;
43
67
  }
44
68
  export declare function OrderJournalFromJSON(json: any): OrderJournal;
45
69
  export declare function OrderJournalFromJSONTyped(json: any, ignoreDiscriminator: boolean): OrderJournal;
@@ -29,6 +29,10 @@ function OrderJournalFromJSONTyped(json, ignoreDiscriminator) {
29
29
  'statusUpdatedBy': json['statusUpdatedBy'],
30
30
  'statusUpdatedAt': (new Date(json['statusUpdatedAt'])),
31
31
  'freeCarriageThresholdReachedDate': (json['freeCarriageThresholdReachedDate'] === null ? null : new Date(json['freeCarriageThresholdReachedDate'])),
32
+ 'purchasedAt': !(0, runtime_1.exists)(json, 'purchasedAt') ? undefined : (new Date(json['purchasedAt'])),
33
+ 'deliveredAt': !(0, runtime_1.exists)(json, 'deliveredAt') ? undefined : (new Date(json['deliveredAt'])),
34
+ 'committedAt': !(0, runtime_1.exists)(json, 'committedAt') ? undefined : (new Date(json['committedAt'])),
35
+ 'counterProposalAt': !(0, runtime_1.exists)(json, 'counterProposalAt') ? undefined : (new Date(json['counterProposalAt'])),
32
36
  };
33
37
  }
34
38
  exports.OrderJournalFromJSONTyped = OrderJournalFromJSONTyped;
@@ -44,6 +48,10 @@ function OrderJournalToJSON(value) {
44
48
  'statusUpdatedBy': value.statusUpdatedBy,
45
49
  'statusUpdatedAt': (value.statusUpdatedAt.toISOString()),
46
50
  'freeCarriageThresholdReachedDate': (value.freeCarriageThresholdReachedDate === null ? null : value.freeCarriageThresholdReachedDate.toISOString()),
51
+ 'purchasedAt': value.purchasedAt === undefined ? undefined : (value.purchasedAt.toISOString()),
52
+ 'deliveredAt': value.deliveredAt === undefined ? undefined : (value.deliveredAt.toISOString()),
53
+ 'committedAt': value.committedAt === undefined ? undefined : (value.committedAt.toISOString()),
54
+ 'counterProposalAt': value.counterProposalAt === undefined ? undefined : (value.counterProposalAt.toISOString()),
47
55
  };
48
56
  }
49
57
  exports.OrderJournalToJSON = OrderJournalToJSON;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lcdp/api-react-rest-client",
3
- "version": "2.6.2-LDS-3491-api-ajouter-route-pour-generer.8281786178",
3
+ "version": "2.6.2-LDS-3445-api-ajouter-statitiques-user.8283473705",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -0,0 +1,42 @@
1
+ /**
2
+ * lcdp-pharmaide-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 { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
13
+ import { PaginatedUserStatistics, UserStatistic } from '../models';
14
+ export interface GetUserStatisticRequest {
15
+ userStatisticId: string;
16
+ }
17
+ export interface GetUserStatisticsRequest {
18
+ userIdEq?: Array<number>;
19
+ p?: number;
20
+ pp?: number;
21
+ }
22
+ /**
23
+ * no description
24
+ */
25
+ export declare class SearchUserStatisticsApi extends BaseAPI {
26
+ /**
27
+ * Get a user statistic
28
+ */
29
+ getUserStatisticRaw(requestParameters: GetUserStatisticRequest): Promise<ApiResponse<UserStatistic | BlobWithMeta>>;
30
+ /**
31
+ * Get a user statistic
32
+ */
33
+ getUserStatistic(requestParameters: GetUserStatisticRequest): Promise<UserStatistic | BlobWithMeta>;
34
+ /**
35
+ * Search users statistics
36
+ */
37
+ getUserStatisticsRaw(requestParameters: GetUserStatisticsRequest): Promise<ApiResponse<PaginatedUserStatistics | BlobWithMeta>>;
38
+ /**
39
+ * Search users statistics
40
+ */
41
+ getUserStatistics(requestParameters: GetUserStatisticsRequest): Promise<PaginatedUserStatistics | BlobWithMeta>;
42
+ }
@@ -2,7 +2,7 @@
2
2
  /* tslint:disable */
3
3
  /* eslint-disable */
4
4
  /**
5
- * lcdp-monolith-service
5
+ * lcdp-pharmaide-service
6
6
  * This is the REST API of LCDP products
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0.0
@@ -64,32 +64,31 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  }
65
65
  };
66
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.ManageThirdPartyLinkApi = void 0;
67
+ exports.SearchUserStatisticsApi = void 0;
68
68
  var runtime_1 = require("../runtime");
69
69
  var models_1 = require("../models");
70
70
  /**
71
71
  * no description
72
72
  */
73
- var ManageThirdPartyLinkApi = /** @class */ (function (_super) {
74
- __extends(ManageThirdPartyLinkApi, _super);
75
- function ManageThirdPartyLinkApi() {
73
+ var SearchUserStatisticsApi = /** @class */ (function (_super) {
74
+ __extends(SearchUserStatisticsApi, _super);
75
+ function SearchUserStatisticsApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
78
  /**
79
- * Generate link to access a third party for the user on the requested slug
79
+ * Get a user statistic
80
80
  */
81
- ManageThirdPartyLinkApi.prototype.createThirdPartyLinkRaw = function (requestParameters) {
81
+ SearchUserStatisticsApi.prototype.getUserStatisticRaw = function (requestParameters) {
82
82
  return __awaiter(this, void 0, void 0, function () {
83
83
  var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_1;
84
84
  return __generator(this, function (_b) {
85
85
  switch (_b.label) {
86
86
  case 0:
87
- if (requestParameters.thirdPartyLinkCreationParameters === null || requestParameters.thirdPartyLinkCreationParameters === undefined) {
88
- throw new runtime_1.RequiredError('thirdPartyLinkCreationParameters', 'Required parameter requestParameters.thirdPartyLinkCreationParameters was null or undefined when calling createThirdPartyLink.');
87
+ if (requestParameters.userStatisticId === null || requestParameters.userStatisticId === undefined) {
88
+ throw new runtime_1.RequiredError('userStatisticId', 'Required parameter requestParameters.userStatisticId was null or undefined when calling getUserStatistic.');
89
89
  }
90
90
  queryParameters = {};
91
91
  headerParameters = {};
92
- headerParameters['Content-Type'] = 'application/json';
93
92
  if (this.configuration && this.configuration.apiKey) {
94
93
  headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
95
94
  }
@@ -112,17 +111,16 @@ var ManageThirdPartyLinkApi = /** @class */ (function (_super) {
112
111
  case 4:
113
112
  _b.trys.push([4, 6, , 7]);
114
113
  return [4 /*yield*/, this.request({
115
- path: "/third-party-links",
116
- method: 'POST',
114
+ path: "/user-statistics/{userStatisticId}".replace("{".concat("userStatisticId", "}"), encodeURIComponent(String(requestParameters.userStatisticId))),
115
+ method: 'GET',
117
116
  headers: headerParameters,
118
117
  query: queryParameters,
119
- body: (0, models_1.ThirdPartyLinkCreationParametersToJSON)(requestParameters.thirdPartyLinkCreationParameters),
120
118
  })];
121
119
  case 5:
122
120
  response = _b.sent();
123
121
  contentType = response.headers.get("content-type");
124
122
  if (contentType && contentType.indexOf("application/json") !== -1) {
125
- return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.ThirdPartyLinkFromJSON)(jsonValue); })];
123
+ return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.UserStatisticFromJSON)(jsonValue); })];
126
124
  }
127
125
  else if (contentType && contentType.indexOf("text/plain") !== -1) {
128
126
  return [2 /*return*/, new runtime_1.TextApiResponse(response)];
@@ -142,14 +140,14 @@ var ManageThirdPartyLinkApi = /** @class */ (function (_super) {
142
140
  });
143
141
  };
144
142
  /**
145
- * Generate link to access a third party for the user on the requested slug
143
+ * Get a user statistic
146
144
  */
147
- ManageThirdPartyLinkApi.prototype.createThirdPartyLink = function (requestParameters) {
145
+ SearchUserStatisticsApi.prototype.getUserStatistic = function (requestParameters) {
148
146
  return __awaiter(this, void 0, void 0, function () {
149
147
  var response;
150
148
  return __generator(this, function (_a) {
151
149
  switch (_a.label) {
152
- case 0: return [4 /*yield*/, this.createThirdPartyLinkRaw(requestParameters)];
150
+ case 0: return [4 /*yield*/, this.getUserStatisticRaw(requestParameters)];
153
151
  case 1:
154
152
  response = _a.sent();
155
153
  return [4 /*yield*/, response.value()];
@@ -158,6 +156,93 @@ var ManageThirdPartyLinkApi = /** @class */ (function (_super) {
158
156
  });
159
157
  });
160
158
  };
161
- return ManageThirdPartyLinkApi;
159
+ /**
160
+ * Search users statistics
161
+ */
162
+ SearchUserStatisticsApi.prototype.getUserStatisticsRaw = function (requestParameters) {
163
+ return __awaiter(this, void 0, void 0, function () {
164
+ var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_2;
165
+ return __generator(this, function (_b) {
166
+ switch (_b.label) {
167
+ case 0:
168
+ queryParameters = {};
169
+ if (requestParameters.userIdEq) {
170
+ queryParameters['userId[eq]'] = requestParameters.userIdEq;
171
+ }
172
+ if (requestParameters.p !== undefined) {
173
+ queryParameters['p'] = requestParameters.p;
174
+ }
175
+ if (requestParameters.pp !== undefined) {
176
+ queryParameters['pp'] = requestParameters.pp;
177
+ }
178
+ headerParameters = {};
179
+ if (this.configuration && this.configuration.apiKey) {
180
+ headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
181
+ }
182
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
183
+ token = this.configuration.accessToken;
184
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
185
+ return [4 /*yield*/, token("bearerAuth", [])];
186
+ case 1:
187
+ _a = _b.sent();
188
+ return [3 /*break*/, 3];
189
+ case 2:
190
+ _a = token;
191
+ _b.label = 3;
192
+ case 3:
193
+ tokenString = _a;
194
+ if (tokenString) {
195
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
196
+ }
197
+ _b.label = 4;
198
+ case 4:
199
+ _b.trys.push([4, 6, , 7]);
200
+ return [4 /*yield*/, this.request({
201
+ path: "/user-statistics",
202
+ method: 'GET',
203
+ headers: headerParameters,
204
+ query: queryParameters,
205
+ })];
206
+ case 5:
207
+ response = _b.sent();
208
+ contentType = response.headers.get("content-type");
209
+ if (contentType && contentType.indexOf("application/json") !== -1) {
210
+ return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.PaginatedUserStatisticsFromJSON)(jsonValue); })];
211
+ }
212
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
213
+ return [2 /*return*/, new runtime_1.TextApiResponse(response)];
214
+ }
215
+ else {
216
+ // TODO : Better handling of others application types
217
+ return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
218
+ }
219
+ return [3 /*break*/, 7];
220
+ case 6:
221
+ response_2 = _b.sent();
222
+ console.debug(response_2);
223
+ throw response_2;
224
+ case 7: return [2 /*return*/];
225
+ }
226
+ });
227
+ });
228
+ };
229
+ /**
230
+ * Search users statistics
231
+ */
232
+ SearchUserStatisticsApi.prototype.getUserStatistics = function (requestParameters) {
233
+ return __awaiter(this, void 0, void 0, function () {
234
+ var response;
235
+ return __generator(this, function (_a) {
236
+ switch (_a.label) {
237
+ case 0: return [4 /*yield*/, this.getUserStatisticsRaw(requestParameters)];
238
+ case 1:
239
+ response = _a.sent();
240
+ return [4 /*yield*/, response.value()];
241
+ case 2: return [2 /*return*/, _a.sent()];
242
+ }
243
+ });
244
+ });
245
+ };
246
+ return SearchUserStatisticsApi;
162
247
  }(runtime_1.BaseAPI));
163
- exports.ManageThirdPartyLinkApi = ManageThirdPartyLinkApi;
248
+ exports.SearchUserStatisticsApi = SearchUserStatisticsApi;
@@ -1 +1,2 @@
1
1
  export * from './SearchSaleOfferStatisticsApi';
2
+ export * from './SearchUserStatisticsApi';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./SearchSaleOfferStatisticsApi"), exports);
18
+ __exportStar(require("./SearchUserStatisticsApi"), exports);
@@ -0,0 +1,29 @@
1
+ /**
2
+ * lcdp-pharmaide-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 { PaginatedObject } from './PaginatedObject';
13
+ import { UserStatistic } from './UserStatistic';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface PaginatedUserStatistics
18
+ */
19
+ export interface PaginatedUserStatistics extends PaginatedObject {
20
+ /**
21
+ *
22
+ * @type {Array<UserStatistic>}
23
+ * @memberof PaginatedUserStatistics
24
+ */
25
+ records: Array<UserStatistic>;
26
+ }
27
+ export declare function PaginatedUserStatisticsFromJSON(json: any): PaginatedUserStatistics;
28
+ export declare function PaginatedUserStatisticsFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserStatistics;
29
+ export declare function PaginatedUserStatisticsToJSON(value?: PaginatedUserStatistics | null): any;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-pharmaide-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 __assign = (this && this.__assign) || function () {
16
+ __assign = Object.assign || function(t) {
17
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
18
+ s = arguments[i];
19
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
20
+ t[p] = s[p];
21
+ }
22
+ return t;
23
+ };
24
+ return __assign.apply(this, arguments);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.PaginatedUserStatisticsToJSON = exports.PaginatedUserStatisticsFromJSONTyped = exports.PaginatedUserStatisticsFromJSON = void 0;
28
+ var PaginatedObject_1 = require("./PaginatedObject");
29
+ var UserStatistic_1 = require("./UserStatistic");
30
+ function PaginatedUserStatisticsFromJSON(json) {
31
+ return PaginatedUserStatisticsFromJSONTyped(json, false);
32
+ }
33
+ exports.PaginatedUserStatisticsFromJSON = PaginatedUserStatisticsFromJSON;
34
+ function PaginatedUserStatisticsFromJSONTyped(json, ignoreDiscriminator) {
35
+ if ((json === undefined) || (json === null)) {
36
+ return json;
37
+ }
38
+ return __assign(__assign({}, (0, PaginatedObject_1.PaginatedObjectFromJSONTyped)(json, ignoreDiscriminator)), { 'records': (json['records'].map(UserStatistic_1.UserStatisticFromJSON)) });
39
+ }
40
+ exports.PaginatedUserStatisticsFromJSONTyped = PaginatedUserStatisticsFromJSONTyped;
41
+ function PaginatedUserStatisticsToJSON(value) {
42
+ if (value === undefined) {
43
+ return undefined;
44
+ }
45
+ if (value === null) {
46
+ return null;
47
+ }
48
+ return __assign(__assign({}, (0, PaginatedObject_1.PaginatedObjectToJSON)(value)), { 'records': (value.records.map(UserStatistic_1.UserStatisticToJSON)) });
49
+ }
50
+ exports.PaginatedUserStatisticsToJSON = PaginatedUserStatisticsToJSON;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * lcdp-pharmaide-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 { UserStatistic } from './UserStatistic';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PaginatedUserStatisticsAllOf
17
+ */
18
+ export interface PaginatedUserStatisticsAllOf {
19
+ /**
20
+ *
21
+ * @type {Array<UserStatistic>}
22
+ * @memberof PaginatedUserStatisticsAllOf
23
+ */
24
+ records: Array<UserStatistic>;
25
+ }
26
+ export declare function PaginatedUserStatisticsAllOfFromJSON(json: any): PaginatedUserStatisticsAllOf;
27
+ export declare function PaginatedUserStatisticsAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedUserStatisticsAllOf;
28
+ export declare function PaginatedUserStatisticsAllOfToJSON(value?: PaginatedUserStatisticsAllOf | null): any;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-pharmaide-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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PaginatedUserStatisticsAllOfToJSON = exports.PaginatedUserStatisticsAllOfFromJSONTyped = exports.PaginatedUserStatisticsAllOfFromJSON = void 0;
17
+ var UserStatistic_1 = require("./UserStatistic");
18
+ function PaginatedUserStatisticsAllOfFromJSON(json) {
19
+ return PaginatedUserStatisticsAllOfFromJSONTyped(json, false);
20
+ }
21
+ exports.PaginatedUserStatisticsAllOfFromJSON = PaginatedUserStatisticsAllOfFromJSON;
22
+ function PaginatedUserStatisticsAllOfFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'records': (json['records'].map(UserStatistic_1.UserStatisticFromJSON)),
28
+ };
29
+ }
30
+ exports.PaginatedUserStatisticsAllOfFromJSONTyped = PaginatedUserStatisticsAllOfFromJSONTyped;
31
+ function PaginatedUserStatisticsAllOfToJSON(value) {
32
+ if (value === undefined) {
33
+ return undefined;
34
+ }
35
+ if (value === null) {
36
+ return null;
37
+ }
38
+ return {
39
+ 'records': (value.records.map(UserStatistic_1.UserStatisticToJSON)),
40
+ };
41
+ }
42
+ exports.PaginatedUserStatisticsAllOfToJSON = PaginatedUserStatisticsAllOfToJSON;
@@ -0,0 +1,70 @@
1
+ /**
2
+ * lcdp-pharmaide-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 { UserLink } from './UserLink';
13
+ /**
14
+ * All these statistics are computed based on a sampling taking the last [Variable] \'user.statistics.sampling_days\' days
15
+ * @export
16
+ * @interface UserStatistic
17
+ */
18
+ export interface UserStatistic {
19
+ /**
20
+ * Unique id representing this statistic
21
+ * @type {string}
22
+ * @memberof UserStatistic
23
+ */
24
+ id?: string;
25
+ /**
26
+ *
27
+ * @type {UserLink}
28
+ * @memberof UserStatistic
29
+ */
30
+ user?: UserLink;
31
+ /**
32
+ * Number of sales
33
+ * @type {number}
34
+ * @memberof UserStatistic
35
+ */
36
+ numberOfSales?: number;
37
+ /**
38
+ * Rate of sales that have at least one removed or refunded item
39
+ * @type {number}
40
+ * @memberof UserStatistic
41
+ */
42
+ salesErrorRate?: number;
43
+ /**
44
+ * Rate of sales that have been canceled, ignoring cancellation issued by the buyer without any reason
45
+ * @type {number}
46
+ * @memberof UserStatistic
47
+ */
48
+ salesCanceledRate?: number;
49
+ /**
50
+ * Rate of sales that are associated to a litigation
51
+ * @type {number}
52
+ * @memberof UserStatistic
53
+ */
54
+ salesLitigationRate?: number;
55
+ /**
56
+ * Average delay of responsiveness for sales (delay between order created by buyer and accepted/modified/canceled by seller or administrator)
57
+ * @type {number}
58
+ * @memberof UserStatistic
59
+ */
60
+ salesResponsivenessDelay?: number;
61
+ /**
62
+ * Average delay of delivery for sales
63
+ * @type {number}
64
+ * @memberof UserStatistic
65
+ */
66
+ deliveryDelay?: number;
67
+ }
68
+ export declare function UserStatisticFromJSON(json: any): UserStatistic;
69
+ export declare function UserStatisticFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserStatistic;
70
+ export declare function UserStatisticToJSON(value?: UserStatistic | null): any;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * lcdp-pharmaide-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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.UserStatisticToJSON = exports.UserStatisticFromJSONTyped = exports.UserStatisticFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ var UserLink_1 = require("./UserLink");
19
+ function UserStatisticFromJSON(json) {
20
+ return UserStatisticFromJSONTyped(json, false);
21
+ }
22
+ exports.UserStatisticFromJSON = UserStatisticFromJSON;
23
+ function UserStatisticFromJSONTyped(json, ignoreDiscriminator) {
24
+ if ((json === undefined) || (json === null)) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
29
+ 'user': !(0, runtime_1.exists)(json, 'user') ? undefined : (0, UserLink_1.UserLinkFromJSON)(json['user']),
30
+ 'numberOfSales': !(0, runtime_1.exists)(json, 'numberOfSales') ? undefined : json['numberOfSales'],
31
+ 'salesErrorRate': !(0, runtime_1.exists)(json, 'salesErrorRate') ? undefined : json['salesErrorRate'],
32
+ 'salesCanceledRate': !(0, runtime_1.exists)(json, 'salesCanceledRate') ? undefined : json['salesCanceledRate'],
33
+ 'salesLitigationRate': !(0, runtime_1.exists)(json, 'salesLitigationRate') ? undefined : json['salesLitigationRate'],
34
+ 'salesResponsivenessDelay': !(0, runtime_1.exists)(json, 'salesResponsivenessDelay') ? undefined : json['salesResponsivenessDelay'],
35
+ 'deliveryDelay': !(0, runtime_1.exists)(json, 'deliveryDelay') ? undefined : json['deliveryDelay'],
36
+ };
37
+ }
38
+ exports.UserStatisticFromJSONTyped = UserStatisticFromJSONTyped;
39
+ function UserStatisticToJSON(value) {
40
+ if (value === undefined) {
41
+ return undefined;
42
+ }
43
+ if (value === null) {
44
+ return null;
45
+ }
46
+ return {
47
+ 'id': value.id,
48
+ 'user': (0, UserLink_1.UserLinkToJSON)(value.user),
49
+ 'numberOfSales': value.numberOfSales,
50
+ 'salesErrorRate': value.salesErrorRate,
51
+ 'salesCanceledRate': value.salesCanceledRate,
52
+ 'salesLitigationRate': value.salesLitigationRate,
53
+ 'salesResponsivenessDelay': value.salesResponsivenessDelay,
54
+ 'deliveryDelay': value.deliveryDelay,
55
+ };
56
+ }
57
+ exports.UserStatisticToJSON = UserStatisticToJSON;
@@ -2,8 +2,11 @@ export * from './HttpLink';
2
2
  export * from './PaginatedObject';
3
3
  export * from './PaginatedSaleOfferStatistics';
4
4
  export * from './PaginatedSaleOfferStatisticsAllOf';
5
+ export * from './PaginatedUserStatistics';
6
+ export * from './PaginatedUserStatisticsAllOf';
5
7
  export * from './PagingMetadata';
6
8
  export * from './RestError';
7
9
  export * from './SaleOfferStatistic';
8
10
  export * from './UserLink';
9
11
  export * from './UserLinkAllOf';
12
+ export * from './UserStatistic';
@@ -18,8 +18,11 @@ __exportStar(require("./HttpLink"), exports);
18
18
  __exportStar(require("./PaginatedObject"), exports);
19
19
  __exportStar(require("./PaginatedSaleOfferStatistics"), exports);
20
20
  __exportStar(require("./PaginatedSaleOfferStatisticsAllOf"), exports);
21
+ __exportStar(require("./PaginatedUserStatistics"), exports);
22
+ __exportStar(require("./PaginatedUserStatisticsAllOf"), exports);
21
23
  __exportStar(require("./PagingMetadata"), exports);
22
24
  __exportStar(require("./RestError"), exports);
23
25
  __exportStar(require("./SaleOfferStatistic"), exports);
24
26
  __exportStar(require("./UserLink"), exports);
25
27
  __exportStar(require("./UserLinkAllOf"), exports);
28
+ __exportStar(require("./UserStatistic"), exports);
@@ -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
  /**
@@ -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;
@@ -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) {
@@ -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, runtime_1.exists)(json, 'statistic') ? undefined : (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;