@lcdp/api-react-rest-client 2.14.2-LDS-4911-migration-franco-custom-vers-ma.18038374439 → 2.14.2-LDS-4911-migration-franco-custom-vers-ma.18038534788

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 (157) hide show
  1. package/package.json +1 -1
  2. package/user/index.d.ts +0 -1
  3. package/user/index.js +0 -17
  4. package/user/src/apis/ManagePasswordApi.d.ts +0 -41
  5. package/user/src/apis/ManagePasswordApi.js +0 -214
  6. package/user/src/apis/ManageUserApi.d.ts +0 -143
  7. package/user/src/apis/ManageUserApi.js +0 -777
  8. package/user/src/apis/ManageUserBankAccountApi.d.ts +0 -45
  9. package/user/src/apis/ManageUserBankAccountApi.js +0 -249
  10. package/user/src/apis/ManageUserDocumentApi.d.ts +0 -98
  11. package/user/src/apis/ManageUserDocumentApi.js +0 -419
  12. package/user/src/apis/ManageUserFavoriteLaboratoryStoreApi.d.ts +0 -64
  13. package/user/src/apis/ManageUserFavoriteLaboratoryStoreApi.js +0 -354
  14. package/user/src/apis/ManageUserRestrictionApi.d.ts +0 -112
  15. package/user/src/apis/ManageUserRestrictionApi.js +0 -618
  16. package/user/src/apis/ManageUserRuleApi.d.ts +0 -44
  17. package/user/src/apis/ManageUserRuleApi.js +0 -235
  18. package/user/src/apis/ManageUserSocialNetworksApi.d.ts +0 -45
  19. package/user/src/apis/ManageUserSocialNetworksApi.js +0 -249
  20. package/user/src/apis/ManageUserTransportApi.d.ts +0 -32
  21. package/user/src/apis/ManageUserTransportApi.js +0 -166
  22. package/user/src/apis/SearchUserApi.d.ts +0 -130
  23. package/user/src/apis/SearchUserApi.js +0 -628
  24. package/user/src/apis/SearchUserDocumentApi.d.ts +0 -165
  25. package/user/src/apis/SearchUserDocumentApi.js +0 -688
  26. package/user/src/apis/SearchUserFavoriteLaboratoryStoreApi.d.ts +0 -37
  27. package/user/src/apis/SearchUserFavoriteLaboratoryStoreApi.js +0 -235
  28. package/user/src/apis/SearchUserFeatureApi.d.ts +0 -26
  29. package/user/src/apis/SearchUserFeatureApi.js +0 -156
  30. package/user/src/apis/SearchUserRestrictionApi.d.ts +0 -59
  31. package/user/src/apis/SearchUserRestrictionApi.js +0 -393
  32. package/user/src/apis/SearchUserRuleApi.d.ts +0 -29
  33. package/user/src/apis/SearchUserRuleApi.js +0 -159
  34. package/user/src/apis/SearchUserSocialNetworksApi.d.ts +0 -41
  35. package/user/src/apis/SearchUserSocialNetworksApi.js +0 -239
  36. package/user/src/apis/SearchUserTransportApi.d.ts +0 -37
  37. package/user/src/apis/SearchUserTransportApi.js +0 -235
  38. package/user/src/apis/index.d.ts +0 -17
  39. package/user/src/apis/index.js +0 -35
  40. package/user/src/index.d.ts +0 -3
  41. package/user/src/index.js +0 -21
  42. package/user/src/models/Address.d.ts +0 -49
  43. package/user/src/models/Address.js +0 -51
  44. package/user/src/models/Gender.d.ts +0 -24
  45. package/user/src/models/Gender.js +0 -47
  46. package/user/src/models/HttpLink.d.ts +0 -31
  47. package/user/src/models/HttpLink.js +0 -47
  48. package/user/src/models/KycLevel.d.ts +0 -24
  49. package/user/src/models/KycLevel.js +0 -47
  50. package/user/src/models/MyPasswordUpdateParameters.d.ts +0 -37
  51. package/user/src/models/MyPasswordUpdateParameters.js +0 -47
  52. package/user/src/models/NotificationTypeId.d.ts +0 -69
  53. package/user/src/models/NotificationTypeId.js +0 -92
  54. package/user/src/models/NotificationTypeLink.d.ts +0 -38
  55. package/user/src/models/NotificationTypeLink.js +0 -50
  56. package/user/src/models/OffisanteStatus.d.ts +0 -29
  57. package/user/src/models/OffisanteStatus.js +0 -52
  58. package/user/src/models/PaginatedObject.d.ts +0 -32
  59. package/user/src/models/PaginatedObject.js +0 -48
  60. package/user/src/models/PaginatedUsers.d.ts +0 -39
  61. package/user/src/models/PaginatedUsers.js +0 -51
  62. package/user/src/models/PagingMetadata.d.ts +0 -49
  63. package/user/src/models/PagingMetadata.js +0 -55
  64. package/user/src/models/PasswordResetCompletionParameters.d.ts +0 -31
  65. package/user/src/models/PasswordResetCompletionParameters.js +0 -47
  66. package/user/src/models/PasswordResetCreationParameters.d.ts +0 -31
  67. package/user/src/models/PasswordResetCreationParameters.js +0 -47
  68. package/user/src/models/ProductStorageType.d.ts +0 -26
  69. package/user/src/models/ProductStorageType.js +0 -49
  70. package/user/src/models/ProductTypeLink.d.ts +0 -43
  71. package/user/src/models/ProductTypeLink.js +0 -51
  72. package/user/src/models/RestError.d.ts +0 -103
  73. package/user/src/models/RestError.js +0 -113
  74. package/user/src/models/RestrictedProductStorageType.d.ts +0 -46
  75. package/user/src/models/RestrictedProductStorageType.js +0 -55
  76. package/user/src/models/ScaEnrollmentStatus.d.ts +0 -31
  77. package/user/src/models/ScaEnrollmentStatus.js +0 -54
  78. package/user/src/models/SomeonePasswordUpdateParameters.d.ts +0 -31
  79. package/user/src/models/SomeonePasswordUpdateParameters.js +0 -45
  80. package/user/src/models/ThreadLink.d.ts +0 -37
  81. package/user/src/models/ThreadLink.js +0 -51
  82. package/user/src/models/Transport.d.ts +0 -55
  83. package/user/src/models/Transport.js +0 -63
  84. package/user/src/models/User.d.ts +0 -349
  85. package/user/src/models/User.js +0 -180
  86. package/user/src/models/UserBankAccountCreationParameters.d.ts +0 -31
  87. package/user/src/models/UserBankAccountCreationParameters.js +0 -45
  88. package/user/src/models/UserBankAccountLink.d.ts +0 -53
  89. package/user/src/models/UserBankAccountLink.js +0 -60
  90. package/user/src/models/UserChargebeeTarget.d.ts +0 -37
  91. package/user/src/models/UserChargebeeTarget.js +0 -49
  92. package/user/src/models/UserCompany.d.ts +0 -118
  93. package/user/src/models/UserCompany.js +0 -75
  94. package/user/src/models/UserCreationParameters.d.ts +0 -68
  95. package/user/src/models/UserCreationParameters.js +0 -71
  96. package/user/src/models/UserCustomCommissions.d.ts +0 -37
  97. package/user/src/models/UserCustomCommissions.js +0 -47
  98. package/user/src/models/UserCustomCommissionsUpdateParameters.d.ts +0 -37
  99. package/user/src/models/UserCustomCommissionsUpdateParameters.js +0 -47
  100. package/user/src/models/UserDelegatedServices.d.ts +0 -52
  101. package/user/src/models/UserDelegatedServices.js +0 -49
  102. package/user/src/models/UserDocument.d.ts +0 -66
  103. package/user/src/models/UserDocument.js +0 -68
  104. package/user/src/models/UserDocumentStatus.d.ts +0 -27
  105. package/user/src/models/UserDocumentStatus.js +0 -50
  106. package/user/src/models/UserFavoriteLaboratoryStoreCreationParameter.d.ts +0 -31
  107. package/user/src/models/UserFavoriteLaboratoryStoreCreationParameter.js +0 -47
  108. package/user/src/models/UserFavoriteLaboratoryStoreLink.d.ts +0 -37
  109. package/user/src/models/UserFavoriteLaboratoryStoreLink.js +0 -49
  110. package/user/src/models/UserFeature.d.ts +0 -37
  111. package/user/src/models/UserFeature.js +0 -47
  112. package/user/src/models/UserForbiddenSellerLink.d.ts +0 -37
  113. package/user/src/models/UserForbiddenSellerLink.js +0 -49
  114. package/user/src/models/UserJournal.d.ts +0 -39
  115. package/user/src/models/UserJournal.js +0 -47
  116. package/user/src/models/UserJournalUpdateParameters.d.ts +0 -31
  117. package/user/src/models/UserJournalUpdateParameters.js +0 -45
  118. package/user/src/models/UserMangopayTarget.d.ts +0 -37
  119. package/user/src/models/UserMangopayTarget.js +0 -49
  120. package/user/src/models/UserRestrictedFeatureCreationParameter.d.ts +0 -31
  121. package/user/src/models/UserRestrictedFeatureCreationParameter.js +0 -47
  122. package/user/src/models/UserRestrictedNotificationTypeCreationParameter.d.ts +0 -32
  123. package/user/src/models/UserRestrictedNotificationTypeCreationParameter.js +0 -48
  124. package/user/src/models/UserRestrictedProductTypeCreationParameter.d.ts +0 -31
  125. package/user/src/models/UserRestrictedProductTypeCreationParameter.js +0 -47
  126. package/user/src/models/UserRole.d.ts +0 -29
  127. package/user/src/models/UserRole.js +0 -52
  128. package/user/src/models/UserRule.d.ts +0 -58
  129. package/user/src/models/UserRule.js +0 -56
  130. package/user/src/models/UserRuleActionEnum.d.ts +0 -23
  131. package/user/src/models/UserRuleActionEnum.js +0 -46
  132. package/user/src/models/UserRuleAttributeEnum.d.ts +0 -24
  133. package/user/src/models/UserRuleAttributeEnum.js +0 -47
  134. package/user/src/models/UserRuleComparatorEnum.d.ts +0 -24
  135. package/user/src/models/UserRuleComparatorEnum.js +0 -47
  136. package/user/src/models/UserRuleCreationParameters.d.ts +0 -52
  137. package/user/src/models/UserRuleCreationParameters.js +0 -62
  138. package/user/src/models/UserSocialNetwork.d.ts +0 -67
  139. package/user/src/models/UserSocialNetwork.js +0 -57
  140. package/user/src/models/UserStatisticLink.d.ts +0 -45
  141. package/user/src/models/UserStatisticLink.js +0 -53
  142. package/user/src/models/UserStatisticLinkAllOfLongTermQoS.d.ts +0 -61
  143. package/user/src/models/UserStatisticLinkAllOfLongTermQoS.js +0 -55
  144. package/user/src/models/UserStatisticLinkAllOfShortTermQoS.d.ts +0 -43
  145. package/user/src/models/UserStatisticLinkAllOfShortTermQoS.js +0 -49
  146. package/user/src/models/UserThreads.d.ts +0 -32
  147. package/user/src/models/UserThreads.js +0 -46
  148. package/user/src/models/UserUpdateParameters.d.ts +0 -164
  149. package/user/src/models/UserUpdateParameters.js +0 -95
  150. package/user/src/models/UserWalletLink.d.ts +0 -37
  151. package/user/src/models/UserWalletLink.js +0 -49
  152. package/user/src/models/UserWallets.d.ts +0 -50
  153. package/user/src/models/UserWallets.js +0 -52
  154. package/user/src/models/index.d.ts +0 -56
  155. package/user/src/models/index.js +0 -74
  156. package/user/src/runtime.d.ts +0 -190
  157. package/user/src/runtime.js +0 -598
@@ -1,618 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * lcdp-monolith-service
6
- * This is the REST API of LCDP products
7
- *
8
- * The version of the OpenAPI document: 1.0.0
9
- * Contact: contact@lecomptoirdespharmacies.fr
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- var __extends = (this && this.__extends) || (function () {
16
- var extendStatics = function (d, b) {
17
- extendStatics = Object.setPrototypeOf ||
18
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
- return extendStatics(d, b);
21
- };
22
- return function (d, b) {
23
- if (typeof b !== "function" && b !== null)
24
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
- extendStatics(d, b);
26
- function __() { this.constructor = d; }
27
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
- };
29
- })();
30
- var __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.ManageUserRestrictionApi = void 0;
68
- var runtime = require("../runtime");
69
- var index_1 = require("../models/index");
70
- /**
71
- *
72
- */
73
- var ManageUserRestrictionApi = /** @class */ (function (_super) {
74
- __extends(ManageUserRestrictionApi, _super);
75
- function ManageUserRestrictionApi() {
76
- return _super !== null && _super.apply(this, arguments) || this;
77
- }
78
- /**
79
- * Add this notification type in restricted user notification types
80
- */
81
- ManageUserRestrictionApi.prototype.createCurrentUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
82
- return __awaiter(this, void 0, void 0, function () {
83
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_1;
84
- return __generator(this, function (_c) {
85
- switch (_c.label) {
86
- case 0:
87
- if (requestParameters['userRestrictedNotificationTypeCreationParameter'] == null) {
88
- throw new runtime.RequiredError('userRestrictedNotificationTypeCreationParameter', 'Required parameter "userRestrictedNotificationTypeCreationParameter" was null or undefined when calling createCurrentUserRestrictedNotificationType().');
89
- }
90
- queryParameters = {};
91
- headerParameters = {};
92
- headerParameters['Content-Type'] = 'application/json';
93
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
94
- _a = headerParameters;
95
- _b = "x-api-key";
96
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
97
- case 1:
98
- _a[_b] = _c.sent(); // apiKeyAuth authentication
99
- _c.label = 2;
100
- case 2:
101
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
102
- token = this.configuration.accessToken;
103
- return [4 /*yield*/, token("bearerAuth", [])];
104
- case 3:
105
- tokenString = _c.sent();
106
- if (tokenString) {
107
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
108
- }
109
- _c.label = 4;
110
- case 4:
111
- _c.trys.push([4, 6, , 7]);
112
- return [4 /*yield*/, this.request({
113
- path: "/users/me/restricted-notification-types",
114
- method: 'POST',
115
- headers: headerParameters,
116
- query: queryParameters,
117
- body: (0, index_1.UserRestrictedNotificationTypeCreationParameterToJSON)(requestParameters['userRestrictedNotificationTypeCreationParameter']),
118
- }, initOverrides)];
119
- case 5:
120
- response = _c.sent();
121
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
122
- case 6:
123
- response_1 = _c.sent();
124
- console.debug(response_1);
125
- throw response_1;
126
- case 7: return [2 /*return*/];
127
- }
128
- });
129
- });
130
- };
131
- /**
132
- * Add this notification type in restricted user notification types
133
- */
134
- ManageUserRestrictionApi.prototype.createCurrentUserRestrictedNotificationType = function (requestParameters, initOverrides) {
135
- return __awaiter(this, void 0, void 0, function () {
136
- return __generator(this, function (_a) {
137
- switch (_a.label) {
138
- case 0: return [4 /*yield*/, this.createCurrentUserRestrictedNotificationTypeRaw(requestParameters, initOverrides)];
139
- case 1:
140
- _a.sent();
141
- return [2 /*return*/];
142
- }
143
- });
144
- });
145
- };
146
- /**
147
- * Add this feature in restricted user features
148
- */
149
- ManageUserRestrictionApi.prototype.createUserRestrictedFeatureRaw = function (requestParameters, initOverrides) {
150
- return __awaiter(this, void 0, void 0, function () {
151
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_2;
152
- return __generator(this, function (_c) {
153
- switch (_c.label) {
154
- case 0:
155
- if (requestParameters['userId'] == null) {
156
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling createUserRestrictedFeature().');
157
- }
158
- if (requestParameters['userRestrictedFeatureCreationParameter'] == null) {
159
- throw new runtime.RequiredError('userRestrictedFeatureCreationParameter', 'Required parameter "userRestrictedFeatureCreationParameter" was null or undefined when calling createUserRestrictedFeature().');
160
- }
161
- queryParameters = {};
162
- headerParameters = {};
163
- headerParameters['Content-Type'] = 'application/json';
164
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
165
- _a = headerParameters;
166
- _b = "x-api-key";
167
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
168
- case 1:
169
- _a[_b] = _c.sent(); // apiKeyAuth authentication
170
- _c.label = 2;
171
- case 2:
172
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
173
- token = this.configuration.accessToken;
174
- return [4 /*yield*/, token("bearerAuth", [])];
175
- case 3:
176
- tokenString = _c.sent();
177
- if (tokenString) {
178
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
179
- }
180
- _c.label = 4;
181
- case 4:
182
- _c.trys.push([4, 6, , 7]);
183
- return [4 /*yield*/, this.request({
184
- path: "/users/{userId}/restricted-features".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))),
185
- method: 'POST',
186
- headers: headerParameters,
187
- query: queryParameters,
188
- body: (0, index_1.UserRestrictedFeatureCreationParameterToJSON)(requestParameters['userRestrictedFeatureCreationParameter']),
189
- }, initOverrides)];
190
- case 5:
191
- response = _c.sent();
192
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
193
- case 6:
194
- response_2 = _c.sent();
195
- console.debug(response_2);
196
- throw response_2;
197
- case 7: return [2 /*return*/];
198
- }
199
- });
200
- });
201
- };
202
- /**
203
- * Add this feature in restricted user features
204
- */
205
- ManageUserRestrictionApi.prototype.createUserRestrictedFeature = function (requestParameters, initOverrides) {
206
- return __awaiter(this, void 0, void 0, function () {
207
- return __generator(this, function (_a) {
208
- switch (_a.label) {
209
- case 0: return [4 /*yield*/, this.createUserRestrictedFeatureRaw(requestParameters, initOverrides)];
210
- case 1:
211
- _a.sent();
212
- return [2 /*return*/];
213
- }
214
- });
215
- });
216
- };
217
- /**
218
- * Add this notification type in restricted user notification types
219
- */
220
- ManageUserRestrictionApi.prototype.createUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
221
- return __awaiter(this, void 0, void 0, function () {
222
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_3;
223
- return __generator(this, function (_c) {
224
- switch (_c.label) {
225
- case 0:
226
- if (requestParameters['userId'] == null) {
227
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling createUserRestrictedNotificationType().');
228
- }
229
- if (requestParameters['userRestrictedNotificationTypeCreationParameter'] == null) {
230
- throw new runtime.RequiredError('userRestrictedNotificationTypeCreationParameter', 'Required parameter "userRestrictedNotificationTypeCreationParameter" was null or undefined when calling createUserRestrictedNotificationType().');
231
- }
232
- queryParameters = {};
233
- headerParameters = {};
234
- headerParameters['Content-Type'] = 'application/json';
235
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
236
- _a = headerParameters;
237
- _b = "x-api-key";
238
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
239
- case 1:
240
- _a[_b] = _c.sent(); // apiKeyAuth authentication
241
- _c.label = 2;
242
- case 2:
243
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
244
- token = this.configuration.accessToken;
245
- return [4 /*yield*/, token("bearerAuth", [])];
246
- case 3:
247
- tokenString = _c.sent();
248
- if (tokenString) {
249
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
250
- }
251
- _c.label = 4;
252
- case 4:
253
- _c.trys.push([4, 6, , 7]);
254
- return [4 /*yield*/, this.request({
255
- path: "/users/{userId}/restricted-notification-types".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))),
256
- method: 'POST',
257
- headers: headerParameters,
258
- query: queryParameters,
259
- body: (0, index_1.UserRestrictedNotificationTypeCreationParameterToJSON)(requestParameters['userRestrictedNotificationTypeCreationParameter']),
260
- }, initOverrides)];
261
- case 5:
262
- response = _c.sent();
263
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
264
- case 6:
265
- response_3 = _c.sent();
266
- console.debug(response_3);
267
- throw response_3;
268
- case 7: return [2 /*return*/];
269
- }
270
- });
271
- });
272
- };
273
- /**
274
- * Add this notification type in restricted user notification types
275
- */
276
- ManageUserRestrictionApi.prototype.createUserRestrictedNotificationType = function (requestParameters, initOverrides) {
277
- return __awaiter(this, void 0, void 0, function () {
278
- return __generator(this, function (_a) {
279
- switch (_a.label) {
280
- case 0: return [4 /*yield*/, this.createUserRestrictedNotificationTypeRaw(requestParameters, initOverrides)];
281
- case 1:
282
- _a.sent();
283
- return [2 /*return*/];
284
- }
285
- });
286
- });
287
- };
288
- /**
289
- * Add this product type in restricted user product types
290
- */
291
- ManageUserRestrictionApi.prototype.createUserRestrictedProductTypeRaw = function (requestParameters, initOverrides) {
292
- return __awaiter(this, void 0, void 0, function () {
293
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_4;
294
- return __generator(this, function (_c) {
295
- switch (_c.label) {
296
- case 0:
297
- if (requestParameters['userId'] == null) {
298
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling createUserRestrictedProductType().');
299
- }
300
- if (requestParameters['userRestrictedProductTypeCreationParameter'] == null) {
301
- throw new runtime.RequiredError('userRestrictedProductTypeCreationParameter', 'Required parameter "userRestrictedProductTypeCreationParameter" was null or undefined when calling createUserRestrictedProductType().');
302
- }
303
- queryParameters = {};
304
- headerParameters = {};
305
- headerParameters['Content-Type'] = 'application/json';
306
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
307
- _a = headerParameters;
308
- _b = "x-api-key";
309
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
310
- case 1:
311
- _a[_b] = _c.sent(); // apiKeyAuth authentication
312
- _c.label = 2;
313
- case 2:
314
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
315
- token = this.configuration.accessToken;
316
- return [4 /*yield*/, token("bearerAuth", [])];
317
- case 3:
318
- tokenString = _c.sent();
319
- if (tokenString) {
320
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
321
- }
322
- _c.label = 4;
323
- case 4:
324
- _c.trys.push([4, 6, , 7]);
325
- return [4 /*yield*/, this.request({
326
- path: "/users/{userId}/restricted-product-types".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))),
327
- method: 'POST',
328
- headers: headerParameters,
329
- query: queryParameters,
330
- body: (0, index_1.UserRestrictedProductTypeCreationParameterToJSON)(requestParameters['userRestrictedProductTypeCreationParameter']),
331
- }, initOverrides)];
332
- case 5:
333
- response = _c.sent();
334
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
335
- case 6:
336
- response_4 = _c.sent();
337
- console.debug(response_4);
338
- throw response_4;
339
- case 7: return [2 /*return*/];
340
- }
341
- });
342
- });
343
- };
344
- /**
345
- * Add this product type in restricted user product types
346
- */
347
- ManageUserRestrictionApi.prototype.createUserRestrictedProductType = function (requestParameters, initOverrides) {
348
- return __awaiter(this, void 0, void 0, function () {
349
- return __generator(this, function (_a) {
350
- switch (_a.label) {
351
- case 0: return [4 /*yield*/, this.createUserRestrictedProductTypeRaw(requestParameters, initOverrides)];
352
- case 1:
353
- _a.sent();
354
- return [2 /*return*/];
355
- }
356
- });
357
- });
358
- };
359
- /**
360
- * Delete this notification type from restricted user notification types
361
- */
362
- ManageUserRestrictionApi.prototype.deleteCurrentUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
363
- return __awaiter(this, void 0, void 0, function () {
364
- var queryParameters, headerParameters, token, tokenString, response, response_5;
365
- return __generator(this, function (_a) {
366
- switch (_a.label) {
367
- case 0:
368
- if (requestParameters['notificationTypeId'] == null) {
369
- throw new runtime.RequiredError('notificationTypeId', 'Required parameter "notificationTypeId" was null or undefined when calling deleteCurrentUserRestrictedNotificationType().');
370
- }
371
- queryParameters = {};
372
- headerParameters = {};
373
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
374
- token = this.configuration.accessToken;
375
- return [4 /*yield*/, token("bearerAuth", [])];
376
- case 1:
377
- tokenString = _a.sent();
378
- if (tokenString) {
379
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
380
- }
381
- _a.label = 2;
382
- case 2:
383
- _a.trys.push([2, 4, , 5]);
384
- return [4 /*yield*/, this.request({
385
- path: "/users/me/restricted-notification-types/{notificationTypeId}".replace("{".concat("notificationTypeId", "}"), encodeURIComponent(String(requestParameters['notificationTypeId']))),
386
- method: 'DELETE',
387
- headers: headerParameters,
388
- query: queryParameters,
389
- }, initOverrides)];
390
- case 3:
391
- response = _a.sent();
392
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
393
- case 4:
394
- response_5 = _a.sent();
395
- console.debug(response_5);
396
- throw response_5;
397
- case 5: return [2 /*return*/];
398
- }
399
- });
400
- });
401
- };
402
- /**
403
- * Delete this notification type from restricted user notification types
404
- */
405
- ManageUserRestrictionApi.prototype.deleteCurrentUserRestrictedNotificationType = function (requestParameters, initOverrides) {
406
- return __awaiter(this, void 0, void 0, function () {
407
- return __generator(this, function (_a) {
408
- switch (_a.label) {
409
- case 0: return [4 /*yield*/, this.deleteCurrentUserRestrictedNotificationTypeRaw(requestParameters, initOverrides)];
410
- case 1:
411
- _a.sent();
412
- return [2 /*return*/];
413
- }
414
- });
415
- });
416
- };
417
- /**
418
- * Delete this feature from restricted user features
419
- */
420
- ManageUserRestrictionApi.prototype.deleteUserRestrictedFeatureRaw = function (requestParameters, initOverrides) {
421
- return __awaiter(this, void 0, void 0, function () {
422
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_6;
423
- return __generator(this, function (_c) {
424
- switch (_c.label) {
425
- case 0:
426
- if (requestParameters['userId'] == null) {
427
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteUserRestrictedFeature().');
428
- }
429
- if (requestParameters['featureId'] == null) {
430
- throw new runtime.RequiredError('featureId', 'Required parameter "featureId" was null or undefined when calling deleteUserRestrictedFeature().');
431
- }
432
- queryParameters = {};
433
- headerParameters = {};
434
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
435
- _a = headerParameters;
436
- _b = "x-api-key";
437
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
438
- case 1:
439
- _a[_b] = _c.sent(); // apiKeyAuth authentication
440
- _c.label = 2;
441
- case 2:
442
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
443
- token = this.configuration.accessToken;
444
- return [4 /*yield*/, token("bearerAuth", [])];
445
- case 3:
446
- tokenString = _c.sent();
447
- if (tokenString) {
448
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
449
- }
450
- _c.label = 4;
451
- case 4:
452
- _c.trys.push([4, 6, , 7]);
453
- return [4 /*yield*/, this.request({
454
- path: "/users/{userId}/restricted-features/{featureId}".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))).replace("{".concat("featureId", "}"), encodeURIComponent(String(requestParameters['featureId']))),
455
- method: 'DELETE',
456
- headers: headerParameters,
457
- query: queryParameters,
458
- }, initOverrides)];
459
- case 5:
460
- response = _c.sent();
461
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
462
- case 6:
463
- response_6 = _c.sent();
464
- console.debug(response_6);
465
- throw response_6;
466
- case 7: return [2 /*return*/];
467
- }
468
- });
469
- });
470
- };
471
- /**
472
- * Delete this feature from restricted user features
473
- */
474
- ManageUserRestrictionApi.prototype.deleteUserRestrictedFeature = function (requestParameters, initOverrides) {
475
- return __awaiter(this, void 0, void 0, function () {
476
- return __generator(this, function (_a) {
477
- switch (_a.label) {
478
- case 0: return [4 /*yield*/, this.deleteUserRestrictedFeatureRaw(requestParameters, initOverrides)];
479
- case 1:
480
- _a.sent();
481
- return [2 /*return*/];
482
- }
483
- });
484
- });
485
- };
486
- /**
487
- * Delete this notification type from restricted user notification types
488
- */
489
- ManageUserRestrictionApi.prototype.deleteUserRestrictedNotificationTypeRaw = function (requestParameters, initOverrides) {
490
- return __awaiter(this, void 0, void 0, function () {
491
- var queryParameters, headerParameters, token, tokenString, response, response_7;
492
- return __generator(this, function (_a) {
493
- switch (_a.label) {
494
- case 0:
495
- if (requestParameters['userId'] == null) {
496
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteUserRestrictedNotificationType().');
497
- }
498
- if (requestParameters['notificationTypeId'] == null) {
499
- throw new runtime.RequiredError('notificationTypeId', 'Required parameter "notificationTypeId" was null or undefined when calling deleteUserRestrictedNotificationType().');
500
- }
501
- queryParameters = {};
502
- headerParameters = {};
503
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
504
- token = this.configuration.accessToken;
505
- return [4 /*yield*/, token("bearerAuth", [])];
506
- case 1:
507
- tokenString = _a.sent();
508
- if (tokenString) {
509
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
510
- }
511
- _a.label = 2;
512
- case 2:
513
- _a.trys.push([2, 4, , 5]);
514
- return [4 /*yield*/, this.request({
515
- path: "/users/{userId}/restricted-notification-types/{notificationTypeId}".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))).replace("{".concat("notificationTypeId", "}"), encodeURIComponent(String(requestParameters['notificationTypeId']))),
516
- method: 'DELETE',
517
- headers: headerParameters,
518
- query: queryParameters,
519
- }, initOverrides)];
520
- case 3:
521
- response = _a.sent();
522
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
523
- case 4:
524
- response_7 = _a.sent();
525
- console.debug(response_7);
526
- throw response_7;
527
- case 5: return [2 /*return*/];
528
- }
529
- });
530
- });
531
- };
532
- /**
533
- * Delete this notification type from restricted user notification types
534
- */
535
- ManageUserRestrictionApi.prototype.deleteUserRestrictedNotificationType = function (requestParameters, initOverrides) {
536
- return __awaiter(this, void 0, void 0, function () {
537
- return __generator(this, function (_a) {
538
- switch (_a.label) {
539
- case 0: return [4 /*yield*/, this.deleteUserRestrictedNotificationTypeRaw(requestParameters, initOverrides)];
540
- case 1:
541
- _a.sent();
542
- return [2 /*return*/];
543
- }
544
- });
545
- });
546
- };
547
- /**
548
- * Delete this product type from restricted user product types
549
- */
550
- ManageUserRestrictionApi.prototype.deleteUserRestrictedProductTypeRaw = function (requestParameters, initOverrides) {
551
- return __awaiter(this, void 0, void 0, function () {
552
- var queryParameters, headerParameters, _a, _b, token, tokenString, response, response_8;
553
- return __generator(this, function (_c) {
554
- switch (_c.label) {
555
- case 0:
556
- if (requestParameters['userId'] == null) {
557
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling deleteUserRestrictedProductType().');
558
- }
559
- if (requestParameters['productTypeId'] == null) {
560
- throw new runtime.RequiredError('productTypeId', 'Required parameter "productTypeId" was null or undefined when calling deleteUserRestrictedProductType().');
561
- }
562
- queryParameters = {};
563
- headerParameters = {};
564
- if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
565
- _a = headerParameters;
566
- _b = "x-api-key";
567
- return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
568
- case 1:
569
- _a[_b] = _c.sent(); // apiKeyAuth authentication
570
- _c.label = 2;
571
- case 2:
572
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
573
- token = this.configuration.accessToken;
574
- return [4 /*yield*/, token("bearerAuth", [])];
575
- case 3:
576
- tokenString = _c.sent();
577
- if (tokenString) {
578
- headerParameters["Authorization"] = "Bearer ".concat(tokenString);
579
- }
580
- _c.label = 4;
581
- case 4:
582
- _c.trys.push([4, 6, , 7]);
583
- return [4 /*yield*/, this.request({
584
- path: "/users/{userId}/restricted-product-types/{productTypeId}".replace("{".concat("userId", "}"), encodeURIComponent(String(requestParameters['userId']))).replace("{".concat("productTypeId", "}"), encodeURIComponent(String(requestParameters['productTypeId']))),
585
- method: 'DELETE',
586
- headers: headerParameters,
587
- query: queryParameters,
588
- }, initOverrides)];
589
- case 5:
590
- response = _c.sent();
591
- return [2 /*return*/, new runtime.VoidApiResponse(response)];
592
- case 6:
593
- response_8 = _c.sent();
594
- console.debug(response_8);
595
- throw response_8;
596
- case 7: return [2 /*return*/];
597
- }
598
- });
599
- });
600
- };
601
- /**
602
- * Delete this product type from restricted user product types
603
- */
604
- ManageUserRestrictionApi.prototype.deleteUserRestrictedProductType = function (requestParameters, initOverrides) {
605
- return __awaiter(this, void 0, void 0, function () {
606
- return __generator(this, function (_a) {
607
- switch (_a.label) {
608
- case 0: return [4 /*yield*/, this.deleteUserRestrictedProductTypeRaw(requestParameters, initOverrides)];
609
- case 1:
610
- _a.sent();
611
- return [2 /*return*/];
612
- }
613
- });
614
- });
615
- };
616
- return ManageUserRestrictionApi;
617
- }(runtime.BaseAPI));
618
- exports.ManageUserRestrictionApi = ManageUserRestrictionApi;
@@ -1,44 +0,0 @@
1
- /**
2
- * lcdp-monolith-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 * as runtime from '../runtime';
13
- import type { UserRule, UserRuleCreationParameters } from '../models/index';
14
- export interface CreateUserRuleRequest {
15
- userId: number;
16
- userRuleCreationParameters: UserRuleCreationParameters;
17
- }
18
- export interface DeleteUserRuleRequest {
19
- userId: number;
20
- ruleId: number;
21
- }
22
- /**
23
- *
24
- */
25
- export declare class ManageUserRuleApi extends runtime.BaseAPI {
26
- /**
27
- * Limitations : - Can not use \"USER\" attribute with \"START_WITH\" comparator
28
- * Create new user rule
29
- */
30
- createUserRuleRaw(requestParameters: CreateUserRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserRule | runtime.BlobWithMeta>>;
31
- /**
32
- * Limitations : - Can not use \"USER\" attribute with \"START_WITH\" comparator
33
- * Create new user rule
34
- */
35
- createUserRule(requestParameters: CreateUserRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserRule | runtime.BlobWithMeta>;
36
- /**
37
- * Delete existing user rule
38
- */
39
- deleteUserRuleRaw(requestParameters: DeleteUserRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
40
- /**
41
- * Delete existing user rule
42
- */
43
- deleteUserRule(requestParameters: DeleteUserRuleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
44
- }