@lcdp/api-react-rest-client 2.0.2-develop.0 → 2.0.2-develop.3996675706

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.
@@ -22,19 +22,37 @@ export interface UserLink extends HttpLink {
22
22
  * @type {number}
23
23
  * @memberof UserLink
24
24
  */
25
- id?: number;
25
+ id: number;
26
+ /**
27
+ * User firstname
28
+ * @type {string}
29
+ * @memberof UserLink
30
+ */
31
+ firstname?: string;
32
+ /**
33
+ * User lastname
34
+ * @type {string}
35
+ * @memberof UserLink
36
+ */
37
+ lastname?: string;
38
+ /**
39
+ * An email in conformity with pattern
40
+ * @type {string}
41
+ * @memberof UserLink
42
+ */
43
+ email?: string;
26
44
  /**
27
45
  * User nickname
28
46
  * @type {string}
29
47
  * @memberof UserLink
30
48
  */
31
- nickname?: string;
49
+ nickname: string;
32
50
  /**
33
51
  *
34
52
  * @type {UserLinkAllOfCompany}
35
53
  * @memberof UserLink
36
54
  */
37
- company?: UserLinkAllOfCompany;
55
+ company: UserLinkAllOfCompany;
38
56
  }
39
57
  export declare function UserLinkFromJSON(json: any): UserLink;
40
58
  export declare function UserLinkFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLink;
@@ -36,7 +36,7 @@ function UserLinkFromJSONTyped(json, ignoreDiscriminator) {
36
36
  if ((json === undefined) || (json === null)) {
37
37
  return json;
38
38
  }
39
- return __assign(__assign({}, (0, HttpLink_1.HttpLinkFromJSONTyped)(json, ignoreDiscriminator)), { 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'], 'nickname': !(0, runtime_1.exists)(json, 'nickname') ? undefined : json['nickname'], 'company': !(0, runtime_1.exists)(json, 'company') ? undefined : (0, UserLinkAllOfCompany_1.UserLinkAllOfCompanyFromJSON)(json['company']) });
39
+ return __assign(__assign({}, (0, HttpLink_1.HttpLinkFromJSONTyped)(json, ignoreDiscriminator)), { 'id': json['id'], 'firstname': !(0, runtime_1.exists)(json, 'firstname') ? undefined : json['firstname'], 'lastname': !(0, runtime_1.exists)(json, 'lastname') ? undefined : json['lastname'], 'email': !(0, runtime_1.exists)(json, 'email') ? undefined : json['email'], 'nickname': json['nickname'], 'company': (0, UserLinkAllOfCompany_1.UserLinkAllOfCompanyFromJSON)(json['company']) });
40
40
  }
41
41
  exports.UserLinkFromJSONTyped = UserLinkFromJSONTyped;
42
42
  function UserLinkToJSON(value) {
@@ -46,6 +46,6 @@ function UserLinkToJSON(value) {
46
46
  if (value === null) {
47
47
  return null;
48
48
  }
49
- return __assign(__assign({}, (0, HttpLink_1.HttpLinkToJSON)(value)), { 'id': value.id, 'nickname': value.nickname, 'company': (0, UserLinkAllOfCompany_1.UserLinkAllOfCompanyToJSON)(value.company) });
49
+ return __assign(__assign({}, (0, HttpLink_1.HttpLinkToJSON)(value)), { 'id': value.id, 'firstname': value.firstname, 'lastname': value.lastname, 'email': value.email, 'nickname': value.nickname, 'company': (0, UserLinkAllOfCompany_1.UserLinkAllOfCompanyToJSON)(value.company) });
50
50
  }
51
51
  exports.UserLinkToJSON = UserLinkToJSON;
@@ -21,19 +21,37 @@ export interface UserLinkAllOf {
21
21
  * @type {number}
22
22
  * @memberof UserLinkAllOf
23
23
  */
24
- id?: number;
24
+ id: number;
25
+ /**
26
+ * User firstname
27
+ * @type {string}
28
+ * @memberof UserLinkAllOf
29
+ */
30
+ firstname?: string;
31
+ /**
32
+ * User lastname
33
+ * @type {string}
34
+ * @memberof UserLinkAllOf
35
+ */
36
+ lastname?: string;
37
+ /**
38
+ * An email in conformity with pattern
39
+ * @type {string}
40
+ * @memberof UserLinkAllOf
41
+ */
42
+ email?: string;
25
43
  /**
26
44
  * User nickname
27
45
  * @type {string}
28
46
  * @memberof UserLinkAllOf
29
47
  */
30
- nickname?: string;
48
+ nickname: string;
31
49
  /**
32
50
  *
33
51
  * @type {UserLinkAllOfCompany}
34
52
  * @memberof UserLinkAllOf
35
53
  */
36
- company?: UserLinkAllOfCompany;
54
+ company: UserLinkAllOfCompany;
37
55
  }
38
56
  export declare function UserLinkAllOfFromJSON(json: any): UserLinkAllOf;
39
57
  export declare function UserLinkAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserLinkAllOf;
@@ -25,9 +25,12 @@ function UserLinkAllOfFromJSONTyped(json, ignoreDiscriminator) {
25
25
  return json;
26
26
  }
27
27
  return {
28
- 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
29
- 'nickname': !(0, runtime_1.exists)(json, 'nickname') ? undefined : json['nickname'],
30
- 'company': !(0, runtime_1.exists)(json, 'company') ? undefined : (0, UserLinkAllOfCompany_1.UserLinkAllOfCompanyFromJSON)(json['company']),
28
+ 'id': json['id'],
29
+ 'firstname': !(0, runtime_1.exists)(json, 'firstname') ? undefined : json['firstname'],
30
+ 'lastname': !(0, runtime_1.exists)(json, 'lastname') ? undefined : json['lastname'],
31
+ 'email': !(0, runtime_1.exists)(json, 'email') ? undefined : json['email'],
32
+ 'nickname': json['nickname'],
33
+ 'company': (0, UserLinkAllOfCompany_1.UserLinkAllOfCompanyFromJSON)(json['company']),
31
34
  };
32
35
  }
33
36
  exports.UserLinkAllOfFromJSONTyped = UserLinkAllOfFromJSONTyped;
@@ -40,6 +43,9 @@ function UserLinkAllOfToJSON(value) {
40
43
  }
41
44
  return {
42
45
  'id': value.id,
46
+ 'firstname': value.firstname,
47
+ 'lastname': value.lastname,
48
+ 'email': value.email,
43
49
  'nickname': value.nickname,
44
50
  'company': (0, UserLinkAllOfCompany_1.UserLinkAllOfCompanyToJSON)(value.company),
45
51
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lcdp/api-react-rest-client",
3
- "version": "2.0.2-develop.0",
3
+ "version": "2.0.2-develop.3996675706",
4
4
  "scripts": {
5
5
  "build": "tsc"
6
6
  },
@@ -22,6 +22,7 @@ export interface GetProductsRequest {
22
22
  ptEq?: string;
23
23
  sptEq?: string;
24
24
  labEq?: Array<number>;
25
+ nameIeq?: string;
25
26
  sWaitingSaleOfferCountGte?: number;
26
27
  tagCo?: Array<string>;
27
28
  orderBy?: GetProductsOrderByEnum;
@@ -179,6 +179,9 @@ var SearchProductApi = /** @class */ (function (_super) {
179
179
  if (requestParameters.labEq) {
180
180
  queryParameters['lab[eq]'] = requestParameters.labEq;
181
181
  }
182
+ if (requestParameters.nameIeq !== undefined) {
183
+ queryParameters['name[ieq]'] = requestParameters.nameIeq;
184
+ }
182
185
  if (requestParameters.sWaitingSaleOfferCountGte !== undefined) {
183
186
  queryParameters['sWaitingSaleOfferCount[gte]'] = requestParameters.sWaitingSaleOfferCountGte;
184
187
  }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
13
- import { UserDocument } from '../models';
13
+ import { UserDocument, UserDocumentStatus } from '../models';
14
14
  export interface GetCurrentUserDocumentRequest {
15
15
  documentType: GetCurrentUserDocumentDocumentTypeEnum;
16
16
  }
@@ -25,6 +25,10 @@ export interface GetUserDocumentMetadataRequest {
25
25
  userId: number;
26
26
  documentType: GetUserDocumentMetadataDocumentTypeEnum;
27
27
  }
28
+ export interface GetUserDocumentStatusRequest {
29
+ userId: number;
30
+ documentType: GetUserDocumentStatusDocumentTypeEnum;
31
+ }
28
32
  export interface GetUserDocumentsRequest {
29
33
  userId: number;
30
34
  }
@@ -72,6 +76,16 @@ export declare class SearchUserDocumentApi extends BaseAPI {
72
76
  * Get metadata of document associated to given user
73
77
  */
74
78
  getUserDocumentMetadata(requestParameters: GetUserDocumentMetadataRequest): Promise<void>;
79
+ /**
80
+ * Get document status
81
+ * Get document status
82
+ */
83
+ getUserDocumentStatusRaw(requestParameters: GetUserDocumentStatusRequest): Promise<ApiResponse<UserDocumentStatus | BlobWithMeta>>;
84
+ /**
85
+ * Get document status
86
+ * Get document status
87
+ */
88
+ getUserDocumentStatus(requestParameters: GetUserDocumentStatusRequest): Promise<UserDocumentStatus | BlobWithMeta>;
75
89
  /**
76
90
  * Get all user documents
77
91
  */
@@ -129,3 +143,15 @@ export declare enum GetUserDocumentMetadataDocumentTypeEnum {
129
143
  CGV = "CGV",
130
144
  GMP = "GMP"
131
145
  }
146
+ /**
147
+ * @export
148
+ * @enum {string}
149
+ */
150
+ export declare enum GetUserDocumentStatusDocumentTypeEnum {
151
+ KBIS = "KBIS",
152
+ ID = "ID",
153
+ SHAREHOLDER = "SHARE_HOLDER",
154
+ STATUS = "STATUS",
155
+ CGV = "CGV",
156
+ GMP = "GMP"
157
+ }
@@ -64,7 +64,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
64
64
  }
65
65
  };
66
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
- exports.GetUserDocumentMetadataDocumentTypeEnum = exports.GetUserDocumentDocumentTypeEnum = exports.GetCurrentUserDocumentMetadataDocumentTypeEnum = exports.GetCurrentUserDocumentDocumentTypeEnum = exports.SearchUserDocumentApi = void 0;
67
+ exports.GetUserDocumentStatusDocumentTypeEnum = exports.GetUserDocumentMetadataDocumentTypeEnum = exports.GetUserDocumentDocumentTypeEnum = exports.GetCurrentUserDocumentMetadataDocumentTypeEnum = exports.GetCurrentUserDocumentDocumentTypeEnum = exports.SearchUserDocumentApi = void 0;
68
68
  var runtime_1 = require("../runtime");
69
69
  var models_1 = require("../models");
70
70
  /**
@@ -417,12 +417,90 @@ var SearchUserDocumentApi = /** @class */ (function (_super) {
417
417
  });
418
418
  });
419
419
  };
420
+ /**
421
+ * Get document status
422
+ * Get document status
423
+ */
424
+ SearchUserDocumentApi.prototype.getUserDocumentStatusRaw = function (requestParameters) {
425
+ return __awaiter(this, void 0, void 0, function () {
426
+ var queryParameters, headerParameters, token, tokenString, response, contentType, response_6;
427
+ return __generator(this, function (_a) {
428
+ switch (_a.label) {
429
+ case 0:
430
+ if (requestParameters.userId === null || requestParameters.userId === undefined) {
431
+ throw new runtime_1.RequiredError('userId', 'Required parameter requestParameters.userId was null or undefined when calling getUserDocumentStatus.');
432
+ }
433
+ if (requestParameters.documentType === null || requestParameters.documentType === undefined) {
434
+ throw new runtime_1.RequiredError('documentType', 'Required parameter requestParameters.documentType was null or undefined when calling getUserDocumentStatus.');
435
+ }
436
+ queryParameters = {};
437
+ headerParameters = {};
438
+ if (this.configuration && this.configuration.apiKey) {
439
+ headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
440
+ }
441
+ if (this.configuration && this.configuration.accessToken) {
442
+ token = this.configuration.accessToken;
443
+ tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
444
+ if (tokenString) {
445
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
446
+ }
447
+ }
448
+ _a.label = 1;
449
+ case 1:
450
+ _a.trys.push([1, 3, , 4]);
451
+ return [4 /*yield*/, this.request({
452
+ path: "/users/{userId}/documents/{documentType}/status".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters.userId))).replace("{".concat("documentType", "}"), encodeURIComponent(String(requestParameters.documentType))),
453
+ method: 'GET',
454
+ headers: headerParameters,
455
+ query: queryParameters,
456
+ })];
457
+ case 2:
458
+ response = _a.sent();
459
+ contentType = response.headers.get("content-type");
460
+ if (contentType && contentType.indexOf("application/json") !== -1) {
461
+ return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.UserDocumentStatusFromJSON)(jsonValue); })];
462
+ }
463
+ else if (contentType && contentType.indexOf("text/plain") !== -1) {
464
+ return [2 /*return*/, new runtime_1.TextApiResponse(response)];
465
+ }
466
+ else {
467
+ // TODO : Better handling of others application types
468
+ return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
469
+ }
470
+ return [3 /*break*/, 4];
471
+ case 3:
472
+ response_6 = _a.sent();
473
+ console.debug(response_6);
474
+ throw response_6;
475
+ case 4: return [2 /*return*/];
476
+ }
477
+ });
478
+ });
479
+ };
480
+ /**
481
+ * Get document status
482
+ * Get document status
483
+ */
484
+ SearchUserDocumentApi.prototype.getUserDocumentStatus = function (requestParameters) {
485
+ return __awaiter(this, void 0, void 0, function () {
486
+ var response;
487
+ return __generator(this, function (_a) {
488
+ switch (_a.label) {
489
+ case 0: return [4 /*yield*/, this.getUserDocumentStatusRaw(requestParameters)];
490
+ case 1:
491
+ response = _a.sent();
492
+ return [4 /*yield*/, response.value()];
493
+ case 2: return [2 /*return*/, _a.sent()];
494
+ }
495
+ });
496
+ });
497
+ };
420
498
  /**
421
499
  * Get all user documents
422
500
  */
423
501
  SearchUserDocumentApi.prototype.getUserDocumentsRaw = function (requestParameters) {
424
502
  return __awaiter(this, void 0, void 0, function () {
425
- var queryParameters, headerParameters, token, tokenString, response, contentType, response_6;
503
+ var queryParameters, headerParameters, token, tokenString, response, contentType, response_7;
426
504
  return __generator(this, function (_a) {
427
505
  switch (_a.label) {
428
506
  case 0:
@@ -465,9 +543,9 @@ var SearchUserDocumentApi = /** @class */ (function (_super) {
465
543
  }
466
544
  return [3 /*break*/, 4];
467
545
  case 3:
468
- response_6 = _a.sent();
469
- console.debug(response_6);
470
- throw response_6;
546
+ response_7 = _a.sent();
547
+ console.debug(response_7);
548
+ throw response_7;
471
549
  case 4: return [2 /*return*/];
472
550
  }
473
551
  });
@@ -545,3 +623,16 @@ var GetUserDocumentMetadataDocumentTypeEnum;
545
623
  GetUserDocumentMetadataDocumentTypeEnum["CGV"] = "CGV";
546
624
  GetUserDocumentMetadataDocumentTypeEnum["GMP"] = "GMP";
547
625
  })(GetUserDocumentMetadataDocumentTypeEnum = exports.GetUserDocumentMetadataDocumentTypeEnum || (exports.GetUserDocumentMetadataDocumentTypeEnum = {}));
626
+ /**
627
+ * @export
628
+ * @enum {string}
629
+ */
630
+ var GetUserDocumentStatusDocumentTypeEnum;
631
+ (function (GetUserDocumentStatusDocumentTypeEnum) {
632
+ GetUserDocumentStatusDocumentTypeEnum["KBIS"] = "KBIS";
633
+ GetUserDocumentStatusDocumentTypeEnum["ID"] = "ID";
634
+ GetUserDocumentStatusDocumentTypeEnum["SHAREHOLDER"] = "SHARE_HOLDER";
635
+ GetUserDocumentStatusDocumentTypeEnum["STATUS"] = "STATUS";
636
+ GetUserDocumentStatusDocumentTypeEnum["CGV"] = "CGV";
637
+ GetUserDocumentStatusDocumentTypeEnum["GMP"] = "GMP";
638
+ })(GetUserDocumentStatusDocumentTypeEnum = exports.GetUserDocumentStatusDocumentTypeEnum || (exports.GetUserDocumentStatusDocumentTypeEnum = {}));