@lcdp/api-react-rest-client 2.6.2-develop.8330105881 → 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.
Files changed (43) 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/sale-offer/src/models/SaleOffer.d.ts +17 -17
  5. package/sale-offer/src/models/SaleOffer.js +18 -19
  6. package/statistic/src/apis/SearchUserStatisticsApi.d.ts +42 -0
  7. package/statistic/src/apis/SearchUserStatisticsApi.js +248 -0
  8. package/statistic/src/apis/index.d.ts +1 -0
  9. package/statistic/src/apis/index.js +1 -0
  10. package/statistic/src/models/PaginatedUserStatistics.d.ts +29 -0
  11. package/statistic/src/models/PaginatedUserStatistics.js +50 -0
  12. package/statistic/src/models/PaginatedUserStatisticsAllOf.d.ts +28 -0
  13. package/statistic/src/models/PaginatedUserStatisticsAllOf.js +42 -0
  14. package/statistic/src/models/UserStatistic.d.ts +70 -0
  15. package/statistic/src/models/UserStatistic.js +57 -0
  16. package/statistic/src/models/index.d.ts +3 -0
  17. package/statistic/src/models/index.js +3 -0
  18. package/third-party/index.d.ts +1 -0
  19. package/third-party/index.js +17 -0
  20. package/third-party/src/apis/ManageThirdPartyLinkApi.d.ts +29 -0
  21. package/third-party/src/apis/ManageThirdPartyLinkApi.js +163 -0
  22. package/third-party/src/apis/index.d.ts +1 -0
  23. package/third-party/src/apis/index.js +17 -0
  24. package/third-party/src/index.d.ts +3 -0
  25. package/third-party/src/index.js +19 -0
  26. package/third-party/src/models/RestError.d.ts +87 -0
  27. package/third-party/src/models/RestError.js +99 -0
  28. package/third-party/src/models/ThirdPartyLink.d.ts +27 -0
  29. package/third-party/src/models/ThirdPartyLink.js +42 -0
  30. package/third-party/src/models/ThirdPartyLinkCreationParameters.d.ts +33 -0
  31. package/third-party/src/models/ThirdPartyLinkCreationParameters.js +43 -0
  32. package/third-party/src/models/index.d.ts +3 -0
  33. package/third-party/src/models/index.js +19 -0
  34. package/third-party/src/runtime.d.ts +149 -0
  35. package/third-party/src/runtime.js +480 -0
  36. package/user/src/models/User.d.ts +21 -8
  37. package/user/src/models/User.js +13 -8
  38. package/user/src/models/UserStatisticLink.d.ts +58 -0
  39. package/user/src/models/UserStatisticLink.js +50 -0
  40. package/user/src/models/UserStatisticLinkAllOf.d.ts +57 -0
  41. package/user/src/models/UserStatisticLinkAllOf.js +52 -0
  42. package/user/src/models/index.d.ts +2 -0
  43. package/user/src/models/index.js +2 -0
@@ -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-develop.8330105881",
3
+ "version": "2.6.2-develop.8356314138",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -28,97 +28,97 @@ export interface SaleOffer {
28
28
  * @type {string}
29
29
  * @memberof SaleOffer
30
30
  */
31
- reference?: string;
31
+ reference: string;
32
32
  /**
33
33
  *
34
34
  * @type {SaleOfferStatus}
35
35
  * @memberof SaleOffer
36
36
  */
37
- status?: SaleOfferStatus;
37
+ status: SaleOfferStatus;
38
38
  /**
39
39
  *
40
40
  * @type {ProductLink}
41
41
  * @memberof SaleOffer
42
42
  */
43
- product?: ProductLink;
43
+ product: ProductLink;
44
44
  /**
45
45
  *
46
46
  * @type {Stock}
47
47
  * @memberof SaleOffer
48
48
  */
49
- stock?: Stock;
49
+ stock: Stock;
50
50
  /**
51
51
  * Description of the sale offer
52
52
  * @type {string}
53
53
  * @memberof SaleOffer
54
54
  */
55
- description?: string | null;
55
+ description: string | null;
56
56
  /**
57
57
  *
58
58
  * @type {AnyIdentifiedDistributionMode}
59
59
  * @memberof SaleOffer
60
60
  */
61
- distributionMode?: AnyIdentifiedDistributionMode;
61
+ distributionMode: AnyIdentifiedDistributionMode;
62
62
  /**
63
63
  * The minimal unit price for this sale offer.
64
64
  * @type {number}
65
65
  * @memberof SaleOffer
66
66
  */
67
- minimalUnitPrice?: number;
67
+ minimalUnitPrice: number;
68
68
  /**
69
- * Best Rebate for this sale offer
69
+ * Best Rebate for this sale offer Zero in case of \'QUOTATION\' distribution mode
70
70
  * @type {number}
71
71
  * @memberof SaleOffer
72
72
  */
73
- bestRebate?: number;
73
+ bestRebate: number;
74
74
  /**
75
75
  *
76
76
  * @type {OwnerLink}
77
77
  * @memberof SaleOffer
78
78
  */
79
- owner?: OwnerLink;
79
+ owner: OwnerLink;
80
80
  /**
81
81
  * Last update date time (RFC 3339, section 5.6)
82
82
  * @type {Date}
83
83
  * @memberof SaleOffer
84
84
  */
85
- updateDate?: Date;
85
+ updateDate: Date;
86
86
  /**
87
87
  * Creation date of this Content
88
88
  * @type {Date}
89
89
  * @memberof SaleOffer
90
90
  */
91
- createdAt?: Date;
91
+ createdAt: Date;
92
92
  /**
93
93
  *
94
94
  * @type {Images}
95
95
  * @memberof SaleOffer
96
96
  */
97
- images?: Images;
97
+ images: Images;
98
98
  /**
99
99
  * Rank of this ad. Only useful for laboratories ad yet
100
100
  * @type {number}
101
101
  * @memberof SaleOffer
102
102
  */
103
- rank?: number | null;
103
+ rank: number | null;
104
104
  /**
105
105
  * Labels of the sale offer
106
106
  * @type {Array<string>}
107
107
  * @memberof SaleOffer
108
108
  */
109
- tags?: Array<string>;
109
+ tags: Array<string>;
110
110
  /**
111
111
  *
112
112
  * @type {SaleOfferJournal}
113
113
  * @memberof SaleOffer
114
114
  */
115
- journal?: SaleOfferJournal;
115
+ journal: SaleOfferJournal;
116
116
  /**
117
117
  *
118
118
  * @type {SaleOfferStatisticLink}
119
119
  * @memberof SaleOffer
120
120
  */
121
- statistic?: SaleOfferStatisticLink;
121
+ statistic: SaleOfferStatisticLink;
122
122
  }
123
123
  export declare function SaleOfferFromJSON(json: any): SaleOffer;
124
124
  export declare function SaleOfferFromJSONTyped(json: any, ignoreDiscriminator: boolean): SaleOffer;
@@ -14,7 +14,6 @@
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.SaleOfferToJSON = exports.SaleOfferFromJSONTyped = exports.SaleOfferFromJSON = void 0;
17
- var runtime_1 = require("../runtime");
18
17
  var AnyIdentifiedDistributionMode_1 = require("./AnyIdentifiedDistributionMode");
19
18
  var Images_1 = require("./Images");
20
19
  var OwnerLink_1 = require("./OwnerLink");
@@ -32,22 +31,22 @@ function SaleOfferFromJSONTyped(json, ignoreDiscriminator) {
32
31
  return json;
33
32
  }
34
33
  return {
35
- 'reference': !(0, runtime_1.exists)(json, 'reference') ? undefined : json['reference'],
36
- 'status': !(0, runtime_1.exists)(json, 'status') ? undefined : (0, SaleOfferStatus_1.SaleOfferStatusFromJSON)(json['status']),
37
- 'product': !(0, runtime_1.exists)(json, 'product') ? undefined : (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
38
- 'stock': !(0, runtime_1.exists)(json, 'stock') ? undefined : (0, Stock_1.StockFromJSON)(json['stock']),
39
- 'description': !(0, runtime_1.exists)(json, 'description') ? json['description'] : json['description'],
40
- 'distributionMode': !(0, runtime_1.exists)(json, 'distributionMode') ? undefined : (0, AnyIdentifiedDistributionMode_1.AnyIdentifiedDistributionModeFromJSON)(json['distributionMode']),
41
- 'minimalUnitPrice': !(0, runtime_1.exists)(json, 'minimalUnitPrice') ? undefined : json['minimalUnitPrice'],
42
- 'bestRebate': !(0, runtime_1.exists)(json, 'bestRebate') ? undefined : json['bestRebate'],
43
- 'owner': !(0, runtime_1.exists)(json, 'owner') ? undefined : (0, OwnerLink_1.OwnerLinkFromJSON)(json['owner']),
44
- 'updateDate': !(0, runtime_1.exists)(json, 'updateDate') ? undefined : (new Date(json['updateDate'])),
45
- 'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
46
- 'images': !(0, runtime_1.exists)(json, 'images') ? undefined : (0, Images_1.ImagesFromJSON)(json['images']),
47
- 'rank': !(0, runtime_1.exists)(json, 'rank') ? json['rank'] : json['rank'],
48
- 'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : json['tags'],
49
- 'journal': !(0, runtime_1.exists)(json, 'journal') ? undefined : (0, SaleOfferJournal_1.SaleOfferJournalFromJSON)(json['journal']),
50
- 'statistic': !(0, runtime_1.exists)(json, 'statistic') ? undefined : (0, SaleOfferStatisticLink_1.SaleOfferStatisticLinkFromJSON)(json['statistic']),
34
+ 'reference': json['reference'],
35
+ 'status': (0, SaleOfferStatus_1.SaleOfferStatusFromJSON)(json['status']),
36
+ 'product': (0, ProductLink_1.ProductLinkFromJSON)(json['product']),
37
+ 'stock': (0, Stock_1.StockFromJSON)(json['stock']),
38
+ 'description': json['description'],
39
+ 'distributionMode': (0, AnyIdentifiedDistributionMode_1.AnyIdentifiedDistributionModeFromJSON)(json['distributionMode']),
40
+ 'minimalUnitPrice': json['minimalUnitPrice'],
41
+ 'bestRebate': json['bestRebate'],
42
+ 'owner': (0, OwnerLink_1.OwnerLinkFromJSON)(json['owner']),
43
+ 'updateDate': (new Date(json['updateDate'])),
44
+ 'createdAt': (new Date(json['createdAt'])),
45
+ 'images': (0, Images_1.ImagesFromJSON)(json['images']),
46
+ 'rank': json['rank'],
47
+ 'tags': json['tags'],
48
+ 'journal': (0, SaleOfferJournal_1.SaleOfferJournalFromJSON)(json['journal']),
49
+ 'statistic': (0, SaleOfferStatisticLink_1.SaleOfferStatisticLinkFromJSON)(json['statistic']),
51
50
  };
52
51
  }
53
52
  exports.SaleOfferFromJSONTyped = SaleOfferFromJSONTyped;
@@ -68,8 +67,8 @@ function SaleOfferToJSON(value) {
68
67
  'minimalUnitPrice': value.minimalUnitPrice,
69
68
  'bestRebate': value.bestRebate,
70
69
  'owner': (0, OwnerLink_1.OwnerLinkToJSON)(value.owner),
71
- 'updateDate': value.updateDate === undefined ? undefined : (value.updateDate.toISOString()),
72
- 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
70
+ 'updateDate': (value.updateDate.toISOString()),
71
+ 'createdAt': (value.createdAt.toISOString()),
73
72
  'images': (0, Images_1.ImagesToJSON)(value.images),
74
73
  'rank': value.rank,
75
74
  'tags': value.tags,
@@ -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
+ }
@@ -0,0 +1,248 @@
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 __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
+ return new (P || (P = Promise))(function (resolve, reject) {
33
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
34
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
35
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
37
+ });
38
+ };
39
+ var __generator = (this && this.__generator) || function (thisArg, body) {
40
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
41
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
42
+ function verb(n) { return function (v) { return step([n, v]); }; }
43
+ function step(op) {
44
+ if (f) throw new TypeError("Generator is already executing.");
45
+ while (_) try {
46
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
47
+ if (y = 0, t) op = [op[0] & 2, t.value];
48
+ switch (op[0]) {
49
+ case 0: case 1: t = op; break;
50
+ case 4: _.label++; return { value: op[1], done: false };
51
+ case 5: _.label++; y = op[1]; op = [0]; continue;
52
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
53
+ default:
54
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
55
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
56
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
57
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
58
+ if (t[2]) _.ops.pop();
59
+ _.trys.pop(); continue;
60
+ }
61
+ op = body.call(thisArg, _);
62
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
63
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
64
+ }
65
+ };
66
+ Object.defineProperty(exports, "__esModule", { value: true });
67
+ exports.SearchUserStatisticsApi = void 0;
68
+ var runtime_1 = require("../runtime");
69
+ var models_1 = require("../models");
70
+ /**
71
+ * no description
72
+ */
73
+ var SearchUserStatisticsApi = /** @class */ (function (_super) {
74
+ __extends(SearchUserStatisticsApi, _super);
75
+ function SearchUserStatisticsApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ * Get a user statistic
80
+ */
81
+ SearchUserStatisticsApi.prototype.getUserStatisticRaw = function (requestParameters) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_1;
84
+ return __generator(this, function (_b) {
85
+ switch (_b.label) {
86
+ case 0:
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
+ }
90
+ queryParameters = {};
91
+ headerParameters = {};
92
+ if (this.configuration && this.configuration.apiKey) {
93
+ headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
94
+ }
95
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
96
+ token = this.configuration.accessToken;
97
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
98
+ return [4 /*yield*/, token("bearerAuth", [])];
99
+ case 1:
100
+ _a = _b.sent();
101
+ return [3 /*break*/, 3];
102
+ case 2:
103
+ _a = token;
104
+ _b.label = 3;
105
+ case 3:
106
+ tokenString = _a;
107
+ if (tokenString) {
108
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
109
+ }
110
+ _b.label = 4;
111
+ case 4:
112
+ _b.trys.push([4, 6, , 7]);
113
+ return [4 /*yield*/, this.request({
114
+ path: "/user-statistics/{userStatisticId}".replace("{".concat("userStatisticId", "}"), encodeURIComponent(String(requestParameters.userStatisticId))),
115
+ method: 'GET',
116
+ headers: headerParameters,
117
+ query: queryParameters,
118
+ })];
119
+ case 5:
120
+ response = _b.sent();
121
+ contentType = response.headers.get("content-type");
122
+ if (contentType && contentType.indexOf("application/json") !== -1) {
123
+ return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.UserStatisticFromJSON)(jsonValue); })];
124
+ }
125
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
126
+ return [2 /*return*/, new runtime_1.TextApiResponse(response)];
127
+ }
128
+ else {
129
+ // TODO : Better handling of others application types
130
+ return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
131
+ }
132
+ return [3 /*break*/, 7];
133
+ case 6:
134
+ response_1 = _b.sent();
135
+ console.debug(response_1);
136
+ throw response_1;
137
+ case 7: return [2 /*return*/];
138
+ }
139
+ });
140
+ });
141
+ };
142
+ /**
143
+ * Get a user statistic
144
+ */
145
+ SearchUserStatisticsApi.prototype.getUserStatistic = function (requestParameters) {
146
+ return __awaiter(this, void 0, void 0, function () {
147
+ var response;
148
+ return __generator(this, function (_a) {
149
+ switch (_a.label) {
150
+ case 0: return [4 /*yield*/, this.getUserStatisticRaw(requestParameters)];
151
+ case 1:
152
+ response = _a.sent();
153
+ return [4 /*yield*/, response.value()];
154
+ case 2: return [2 /*return*/, _a.sent()];
155
+ }
156
+ });
157
+ });
158
+ };
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;
247
+ }(runtime_1.BaseAPI));
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;