@lcdp/api-react-rest-client 2.6.2-LDS-3445-api-ajouter-statitiques-user.8247649388 → 2.6.2-LDS-3445-api-ajouter-statitiques-user.8249214622

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 (39) hide show
  1. package/package.json +1 -1
  2. package/statistic/index.d.ts +1 -0
  3. package/statistic/index.js +17 -0
  4. package/statistic/src/apis/SearchSaleOfferStatisticsApi.d.ts +52 -0
  5. package/statistic/src/apis/SearchSaleOfferStatisticsApi.js +263 -0
  6. package/statistic/src/apis/SearchUserStatisticsApi.d.ts +31 -0
  7. package/statistic/src/apis/SearchUserStatisticsApi.js +167 -0
  8. package/statistic/src/apis/index.d.ts +2 -0
  9. package/statistic/src/apis/index.js +18 -0
  10. package/statistic/src/index.d.ts +3 -0
  11. package/statistic/src/index.js +19 -0
  12. package/statistic/src/models/HttpLink.d.ts +27 -0
  13. package/statistic/src/models/HttpLink.js +41 -0
  14. package/statistic/src/models/PaginatedObject.d.ts +28 -0
  15. package/statistic/src/models/PaginatedObject.js +42 -0
  16. package/statistic/src/models/PaginatedSaleOfferStatistics.d.ts +29 -0
  17. package/statistic/src/models/PaginatedSaleOfferStatistics.js +50 -0
  18. package/statistic/src/models/PaginatedSaleOfferStatisticsAllOf.d.ts +28 -0
  19. package/statistic/src/models/PaginatedSaleOfferStatisticsAllOf.js +42 -0
  20. package/statistic/src/models/PaginatedUserStatistics.d.ts +29 -0
  21. package/statistic/src/models/PaginatedUserStatistics.js +50 -0
  22. package/statistic/src/models/PaginatedUserStatisticsAllOf.d.ts +28 -0
  23. package/statistic/src/models/PaginatedUserStatisticsAllOf.js +42 -0
  24. package/statistic/src/models/PagingMetadata.d.ts +45 -0
  25. package/statistic/src/models/PagingMetadata.js +47 -0
  26. package/statistic/src/models/RestError.d.ts +87 -0
  27. package/statistic/src/models/RestError.js +99 -0
  28. package/statistic/src/models/SaleOfferStatistic.d.ts +52 -0
  29. package/statistic/src/models/SaleOfferStatistic.js +51 -0
  30. package/statistic/src/models/UserLink.d.ts +28 -0
  31. package/statistic/src/models/UserLink.js +50 -0
  32. package/statistic/src/models/UserLinkAllOf.d.ts +27 -0
  33. package/statistic/src/models/UserLinkAllOf.js +42 -0
  34. package/statistic/src/models/UserStatistic.d.ts +70 -0
  35. package/statistic/src/models/UserStatistic.js +57 -0
  36. package/statistic/src/models/index.d.ts +12 -0
  37. package/statistic/src/models/index.js +28 -0
  38. package/statistic/src/runtime.d.ts +149 -0
  39. package/statistic/src/runtime.js +480 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lcdp/api-react-rest-client",
3
- "version": "2.6.2-LDS-3445-api-ajouter-statitiques-user.8247649388",
3
+ "version": "2.6.2-LDS-3445-api-ajouter-statitiques-user.8249214622",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -0,0 +1 @@
1
+ export * from './src';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./src"), exports);
@@ -0,0 +1,52 @@
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 { PaginatedSaleOfferStatistics, SaleOfferStatistic } from '../models';
14
+ export interface GetSaleOfferStatisticRequest {
15
+ saleOfferStatisticId: string;
16
+ }
17
+ export interface GetSaleOfferStatisticsRequest {
18
+ refEq?: Array<string>;
19
+ oEq?: Array<number>;
20
+ orderBy?: Array<GetSaleOfferStatisticsOrderByEnum>;
21
+ p?: number;
22
+ pp?: number;
23
+ }
24
+ /**
25
+ * no description
26
+ */
27
+ export declare class SearchSaleOfferStatisticsApi extends BaseAPI {
28
+ /**
29
+ * Get a sale offer statistic
30
+ */
31
+ getSaleOfferStatisticRaw(requestParameters: GetSaleOfferStatisticRequest): Promise<ApiResponse<SaleOfferStatistic | BlobWithMeta>>;
32
+ /**
33
+ * Get a sale offer statistic
34
+ */
35
+ getSaleOfferStatistic(requestParameters: GetSaleOfferStatisticRequest): Promise<SaleOfferStatistic | BlobWithMeta>;
36
+ /**
37
+ * Search sale offers statistics
38
+ */
39
+ getSaleOfferStatisticsRaw(requestParameters: GetSaleOfferStatisticsRequest): Promise<ApiResponse<PaginatedSaleOfferStatistics | BlobWithMeta>>;
40
+ /**
41
+ * Search sale offers statistics
42
+ */
43
+ getSaleOfferStatistics(requestParameters: GetSaleOfferStatisticsRequest): Promise<PaginatedSaleOfferStatistics | BlobWithMeta>;
44
+ }
45
+ /**
46
+ * @export
47
+ * @enum {string}
48
+ */
49
+ export declare enum GetSaleOfferStatisticsOrderByEnum {
50
+ Asc = "REFERENCE:asc",
51
+ Desc = "REFERENCE:desc"
52
+ }
@@ -0,0 +1,263 @@
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.GetSaleOfferStatisticsOrderByEnum = exports.SearchSaleOfferStatisticsApi = void 0;
68
+ var runtime_1 = require("../runtime");
69
+ var models_1 = require("../models");
70
+ /**
71
+ * no description
72
+ */
73
+ var SearchSaleOfferStatisticsApi = /** @class */ (function (_super) {
74
+ __extends(SearchSaleOfferStatisticsApi, _super);
75
+ function SearchSaleOfferStatisticsApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ * Get a sale offer statistic
80
+ */
81
+ SearchSaleOfferStatisticsApi.prototype.getSaleOfferStatisticRaw = 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.saleOfferStatisticId === null || requestParameters.saleOfferStatisticId === undefined) {
88
+ throw new runtime_1.RequiredError('saleOfferStatisticId', 'Required parameter requestParameters.saleOfferStatisticId was null or undefined when calling getSaleOfferStatistic.');
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: "/sale-offer-statistics/{saleOfferStatisticId}".replace("{".concat("saleOfferStatisticId", "}"), encodeURIComponent(String(requestParameters.saleOfferStatisticId))),
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.SaleOfferStatisticFromJSON)(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 sale offer statistic
144
+ */
145
+ SearchSaleOfferStatisticsApi.prototype.getSaleOfferStatistic = 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.getSaleOfferStatisticRaw(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 sale offers statistics
161
+ */
162
+ SearchSaleOfferStatisticsApi.prototype.getSaleOfferStatisticsRaw = 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.refEq) {
170
+ queryParameters['ref[eq]'] = requestParameters.refEq;
171
+ }
172
+ if (requestParameters.oEq) {
173
+ queryParameters['o[eq]'] = requestParameters.oEq;
174
+ }
175
+ if (requestParameters.orderBy) {
176
+ queryParameters['orderBy'] = requestParameters.orderBy;
177
+ }
178
+ if (requestParameters.p !== undefined) {
179
+ queryParameters['p'] = requestParameters.p;
180
+ }
181
+ if (requestParameters.pp !== undefined) {
182
+ queryParameters['pp'] = requestParameters.pp;
183
+ }
184
+ headerParameters = {};
185
+ if (this.configuration && this.configuration.apiKey) {
186
+ headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
187
+ }
188
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
189
+ token = this.configuration.accessToken;
190
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
191
+ return [4 /*yield*/, token("bearerAuth", [])];
192
+ case 1:
193
+ _a = _b.sent();
194
+ return [3 /*break*/, 3];
195
+ case 2:
196
+ _a = token;
197
+ _b.label = 3;
198
+ case 3:
199
+ tokenString = _a;
200
+ if (tokenString) {
201
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
202
+ }
203
+ _b.label = 4;
204
+ case 4:
205
+ _b.trys.push([4, 6, , 7]);
206
+ return [4 /*yield*/, this.request({
207
+ path: "/sale-offer-statistics",
208
+ method: 'GET',
209
+ headers: headerParameters,
210
+ query: queryParameters,
211
+ })];
212
+ case 5:
213
+ response = _b.sent();
214
+ contentType = response.headers.get("content-type");
215
+ if (contentType && contentType.indexOf("application/json") !== -1) {
216
+ return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.PaginatedSaleOfferStatisticsFromJSON)(jsonValue); })];
217
+ }
218
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
219
+ return [2 /*return*/, new runtime_1.TextApiResponse(response)];
220
+ }
221
+ else {
222
+ // TODO : Better handling of others application types
223
+ return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
224
+ }
225
+ return [3 /*break*/, 7];
226
+ case 6:
227
+ response_2 = _b.sent();
228
+ console.debug(response_2);
229
+ throw response_2;
230
+ case 7: return [2 /*return*/];
231
+ }
232
+ });
233
+ });
234
+ };
235
+ /**
236
+ * Search sale offers statistics
237
+ */
238
+ SearchSaleOfferStatisticsApi.prototype.getSaleOfferStatistics = function (requestParameters) {
239
+ return __awaiter(this, void 0, void 0, function () {
240
+ var response;
241
+ return __generator(this, function (_a) {
242
+ switch (_a.label) {
243
+ case 0: return [4 /*yield*/, this.getSaleOfferStatisticsRaw(requestParameters)];
244
+ case 1:
245
+ response = _a.sent();
246
+ return [4 /*yield*/, response.value()];
247
+ case 2: return [2 /*return*/, _a.sent()];
248
+ }
249
+ });
250
+ });
251
+ };
252
+ return SearchSaleOfferStatisticsApi;
253
+ }(runtime_1.BaseAPI));
254
+ exports.SearchSaleOfferStatisticsApi = SearchSaleOfferStatisticsApi;
255
+ /**
256
+ * @export
257
+ * @enum {string}
258
+ */
259
+ var GetSaleOfferStatisticsOrderByEnum;
260
+ (function (GetSaleOfferStatisticsOrderByEnum) {
261
+ GetSaleOfferStatisticsOrderByEnum["Asc"] = "REFERENCE:asc";
262
+ GetSaleOfferStatisticsOrderByEnum["Desc"] = "REFERENCE:desc";
263
+ })(GetSaleOfferStatisticsOrderByEnum = exports.GetSaleOfferStatisticsOrderByEnum || (exports.GetSaleOfferStatisticsOrderByEnum = {}));
@@ -0,0 +1,31 @@
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 } from '../models';
14
+ export interface GetUserStatisticsRequest {
15
+ userIdEq?: Array<number>;
16
+ p?: number;
17
+ pp?: number;
18
+ }
19
+ /**
20
+ * no description
21
+ */
22
+ export declare class SearchUserStatisticsApi extends BaseAPI {
23
+ /**
24
+ * Search users statistics
25
+ */
26
+ getUserStatisticsRaw(requestParameters: GetUserStatisticsRequest): Promise<ApiResponse<PaginatedUserStatistics | BlobWithMeta>>;
27
+ /**
28
+ * Search users statistics
29
+ */
30
+ getUserStatistics(requestParameters: GetUserStatisticsRequest): Promise<PaginatedUserStatistics | BlobWithMeta>;
31
+ }
@@ -0,0 +1,167 @@
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
+ * Search users statistics
80
+ */
81
+ SearchUserStatisticsApi.prototype.getUserStatisticsRaw = 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
+ queryParameters = {};
88
+ if (requestParameters.userIdEq) {
89
+ queryParameters['userId[eq]'] = requestParameters.userIdEq;
90
+ }
91
+ if (requestParameters.p !== undefined) {
92
+ queryParameters['p'] = requestParameters.p;
93
+ }
94
+ if (requestParameters.pp !== undefined) {
95
+ queryParameters['pp'] = requestParameters.pp;
96
+ }
97
+ headerParameters = {};
98
+ if (this.configuration && this.configuration.apiKey) {
99
+ headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
100
+ }
101
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
102
+ token = this.configuration.accessToken;
103
+ if (!(typeof token === 'function')) return [3 /*break*/, 2];
104
+ return [4 /*yield*/, token("bearerAuth", [])];
105
+ case 1:
106
+ _a = _b.sent();
107
+ return [3 /*break*/, 3];
108
+ case 2:
109
+ _a = token;
110
+ _b.label = 3;
111
+ case 3:
112
+ tokenString = _a;
113
+ if (tokenString) {
114
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
115
+ }
116
+ _b.label = 4;
117
+ case 4:
118
+ _b.trys.push([4, 6, , 7]);
119
+ return [4 /*yield*/, this.request({
120
+ path: "/user-statistics",
121
+ method: 'GET',
122
+ headers: headerParameters,
123
+ query: queryParameters,
124
+ })];
125
+ case 5:
126
+ response = _b.sent();
127
+ contentType = response.headers.get("content-type");
128
+ if (contentType && contentType.indexOf("application/json") !== -1) {
129
+ return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.PaginatedUserStatisticsFromJSON)(jsonValue); })];
130
+ }
131
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
132
+ return [2 /*return*/, new runtime_1.TextApiResponse(response)];
133
+ }
134
+ else {
135
+ // TODO : Better handling of others application types
136
+ return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
137
+ }
138
+ return [3 /*break*/, 7];
139
+ case 6:
140
+ response_1 = _b.sent();
141
+ console.debug(response_1);
142
+ throw response_1;
143
+ case 7: return [2 /*return*/];
144
+ }
145
+ });
146
+ });
147
+ };
148
+ /**
149
+ * Search users statistics
150
+ */
151
+ SearchUserStatisticsApi.prototype.getUserStatistics = function (requestParameters) {
152
+ return __awaiter(this, void 0, void 0, function () {
153
+ var response;
154
+ return __generator(this, function (_a) {
155
+ switch (_a.label) {
156
+ case 0: return [4 /*yield*/, this.getUserStatisticsRaw(requestParameters)];
157
+ case 1:
158
+ response = _a.sent();
159
+ return [4 /*yield*/, response.value()];
160
+ case 2: return [2 /*return*/, _a.sent()];
161
+ }
162
+ });
163
+ });
164
+ };
165
+ return SearchUserStatisticsApi;
166
+ }(runtime_1.BaseAPI));
167
+ exports.SearchUserStatisticsApi = SearchUserStatisticsApi;
@@ -0,0 +1,2 @@
1
+ export * from './SearchSaleOfferStatisticsApi';
2
+ export * from './SearchUserStatisticsApi';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./SearchSaleOfferStatisticsApi"), exports);
18
+ __exportStar(require("./SearchUserStatisticsApi"), exports);
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis';
3
+ export * from './models';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./runtime"), exports);
18
+ __exportStar(require("./apis"), exports);
19
+ __exportStar(require("./models"), exports);
@@ -0,0 +1,27 @@
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
+ /**
13
+ * A base type of objects representing links to resources.
14
+ * @export
15
+ * @interface HttpLink
16
+ */
17
+ export interface HttpLink {
18
+ /**
19
+ * Any URL that is using http or https protocol
20
+ * @type {string}
21
+ * @memberof HttpLink
22
+ */
23
+ href: string;
24
+ }
25
+ export declare function HttpLinkFromJSON(json: any): HttpLink;
26
+ export declare function HttpLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): HttpLink;
27
+ export declare function HttpLinkToJSON(value?: HttpLink | null): any;
@@ -0,0 +1,41 @@
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.HttpLinkToJSON = exports.HttpLinkFromJSONTyped = exports.HttpLinkFromJSON = void 0;
17
+ function HttpLinkFromJSON(json) {
18
+ return HttpLinkFromJSONTyped(json, false);
19
+ }
20
+ exports.HttpLinkFromJSON = HttpLinkFromJSON;
21
+ function HttpLinkFromJSONTyped(json, ignoreDiscriminator) {
22
+ if ((json === undefined) || (json === null)) {
23
+ return json;
24
+ }
25
+ return {
26
+ 'href': json['href'],
27
+ };
28
+ }
29
+ exports.HttpLinkFromJSONTyped = HttpLinkFromJSONTyped;
30
+ function HttpLinkToJSON(value) {
31
+ if (value === undefined) {
32
+ return undefined;
33
+ }
34
+ if (value === null) {
35
+ return null;
36
+ }
37
+ return {
38
+ 'href': value.href,
39
+ };
40
+ }
41
+ exports.HttpLinkToJSON = HttpLinkToJSON;