@lcdp/api-react-rest-client 3.5.3-LDS-5772-api-ajouter-pharmaidegeneratedc.27015201959 → 3.5.3-LDS-5772-api-ajouter-pharmaidegeneratedc.27015495861
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.
- package/magic-cart/src/models/ExpressOrderNeed.d.ts +2 -2
- package/magic-cart/src/models/ExpressOrderNeed.js +2 -2
- package/package.json +1 -1
- package/recommendation/src/models/ProductRecommendationType.d.ts +2 -0
- package/recommendation/src/models/ProductRecommendationType.js +3 -1
- package/shopping-cart/src/apis/SearchCartApi.d.ts +3 -0
- package/shopping-cart/src/apis/SearchCartApi.js +6 -1
- package/storage/index.d.ts +1 -0
- package/storage/index.js +17 -0
- package/storage/src/apis/SearchStorageApi.d.ts +32 -0
- package/storage/src/apis/SearchStorageApi.js +169 -0
- package/storage/src/apis/index.d.ts +1 -0
- package/storage/src/apis/index.js +19 -0
- package/storage/src/index.d.ts +3 -0
- package/storage/src/index.js +21 -0
- package/storage/src/models/HttpLink.d.ts +31 -0
- package/storage/src/models/HttpLink.js +47 -0
- package/storage/src/models/OwnerLink.d.ts +37 -0
- package/storage/src/models/OwnerLink.js +49 -0
- package/storage/src/models/PaginatedObject.d.ts +32 -0
- package/storage/src/models/PaginatedObject.js +48 -0
- package/storage/src/models/PaginatedStocks.d.ts +39 -0
- package/storage/src/models/PaginatedStocks.js +53 -0
- package/storage/src/models/PagingMetadata.d.ts +49 -0
- package/storage/src/models/PagingMetadata.js +55 -0
- package/storage/src/models/ProductLink.d.ts +37 -0
- package/storage/src/models/ProductLink.js +49 -0
- package/storage/src/models/Stock.d.ts +93 -0
- package/storage/src/models/Stock.js +67 -0
- package/storage/src/models/index.d.ts +7 -0
- package/storage/src/models/index.js +25 -0
- package/storage/src/runtime.d.ts +190 -0
- package/storage/src/runtime.js +594 -0
- package/supply/index.d.ts +1 -0
- package/supply/index.js +17 -0
- package/supply/src/apis/ManageSupplyApi.d.ts +29 -0
- package/supply/src/apis/ManageSupplyApi.js +161 -0
- package/supply/src/apis/index.d.ts +1 -0
- package/supply/src/apis/index.js +19 -0
- package/supply/src/index.d.ts +3 -0
- package/supply/src/index.js +21 -0
- package/supply/src/models/ExpressOrderNeed.d.ts +49 -0
- package/supply/src/models/ExpressOrderNeed.js +55 -0
- package/supply/src/models/SupplyNeedsCreationParameters.d.ts +31 -0
- package/supply/src/models/SupplyNeedsCreationParameters.js +47 -0
- package/supply/src/models/index.d.ts +2 -0
- package/supply/src/models/index.js +20 -0
- package/supply/src/runtime.d.ts +190 -0
- package/supply/src/runtime.js +594 -0
- package/user/src/models/UserJournal.d.ts +1 -1
- package/user/src/models/UserJournalUpdateParameters.d.ts +1 -1
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-pharmaide-service
|
|
6
|
+
* This is the REST API of LCDP pharmaide supply
|
|
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.ManageSupplyApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var ManageSupplyApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(ManageSupplyApi, _super);
|
|
75
|
+
function ManageSupplyApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get supply needs for a user
|
|
80
|
+
*/
|
|
81
|
+
ManageSupplyApi.prototype.createSupplyNeedsRaw = function (requestParameters, initOverrides) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_1;
|
|
84
|
+
return __generator(this, function (_c) {
|
|
85
|
+
switch (_c.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters['supplyNeedsCreationParameters'] == null) {
|
|
88
|
+
throw new runtime.RequiredError('supplyNeedsCreationParameters', 'Required parameter "supplyNeedsCreationParameters" was null or undefined when calling createSupplyNeeds().');
|
|
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: "/supply-needs",
|
|
114
|
+
method: 'POST',
|
|
115
|
+
headers: headerParameters,
|
|
116
|
+
query: queryParameters,
|
|
117
|
+
body: (0, index_1.SupplyNeedsCreationParametersToJSON)(requestParameters['supplyNeedsCreationParameters']),
|
|
118
|
+
}, initOverrides)];
|
|
119
|
+
case 5:
|
|
120
|
+
response = _c.sent();
|
|
121
|
+
contentType = response.headers.get("content-type");
|
|
122
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
123
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ExpressOrderNeedFromJSON); })];
|
|
124
|
+
}
|
|
125
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
126
|
+
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
// TODO : Better handling of others application types
|
|
130
|
+
return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
|
|
131
|
+
}
|
|
132
|
+
return [3 /*break*/, 7];
|
|
133
|
+
case 6:
|
|
134
|
+
response_1 = _c.sent();
|
|
135
|
+
console.debug(response_1);
|
|
136
|
+
throw response_1;
|
|
137
|
+
case 7: return [2 /*return*/];
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Get supply needs for a user
|
|
144
|
+
*/
|
|
145
|
+
ManageSupplyApi.prototype.createSupplyNeeds = function (requestParameters, initOverrides) {
|
|
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.createSupplyNeedsRaw(requestParameters, initOverrides)];
|
|
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
|
+
return ManageSupplyApi;
|
|
160
|
+
}(runtime.BaseAPI));
|
|
161
|
+
exports.ManageSupplyApi = ManageSupplyApi;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ManageSupplyApi';
|
|
@@ -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
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./ManageSupplyApi"), exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./runtime"), exports);
|
|
20
|
+
__exportStar(require("./apis/index"), exports);
|
|
21
|
+
__exportStar(require("./models/index"), exports);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-pharmaide-service
|
|
3
|
+
* This is the REST API of LCDP pharmaide supply
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ExpressOrderNeed
|
|
16
|
+
*/
|
|
17
|
+
export interface ExpressOrderNeed {
|
|
18
|
+
/**
|
|
19
|
+
* Concerned product
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ExpressOrderNeed
|
|
22
|
+
*/
|
|
23
|
+
productId: number;
|
|
24
|
+
/**
|
|
25
|
+
* Minimal quantity needed
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ExpressOrderNeed
|
|
28
|
+
*/
|
|
29
|
+
quantity: number;
|
|
30
|
+
/**
|
|
31
|
+
* Maximum unit price acceptable for the product
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof ExpressOrderNeed
|
|
34
|
+
*/
|
|
35
|
+
maximalUnitPrice?: number | null;
|
|
36
|
+
/**
|
|
37
|
+
* The lapsing date must be reached after this date. (see ISO-8601 https://tc39.es/proposal-temporal/docs/duration.html)
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ExpressOrderNeed
|
|
40
|
+
*/
|
|
41
|
+
minimalLapsingDuration?: string | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the ExpressOrderNeed interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfExpressOrderNeed(value: object): value is ExpressOrderNeed;
|
|
47
|
+
export declare function ExpressOrderNeedFromJSON(json: any): ExpressOrderNeed;
|
|
48
|
+
export declare function ExpressOrderNeedFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExpressOrderNeed;
|
|
49
|
+
export declare function ExpressOrderNeedToJSON(value?: ExpressOrderNeed | null): any;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-pharmaide-service
|
|
6
|
+
* This is the REST API of LCDP pharmaide supply
|
|
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.ExpressOrderNeedToJSON = exports.ExpressOrderNeedFromJSONTyped = exports.ExpressOrderNeedFromJSON = exports.instanceOfExpressOrderNeed = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the ExpressOrderNeed interface.
|
|
19
|
+
*/
|
|
20
|
+
function instanceOfExpressOrderNeed(value) {
|
|
21
|
+
if (!('productId' in value) || value['productId'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('quantity' in value) || value['quantity'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
exports.instanceOfExpressOrderNeed = instanceOfExpressOrderNeed;
|
|
28
|
+
function ExpressOrderNeedFromJSON(json) {
|
|
29
|
+
return ExpressOrderNeedFromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
exports.ExpressOrderNeedFromJSON = ExpressOrderNeedFromJSON;
|
|
32
|
+
function ExpressOrderNeedFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'productId': json['productId'],
|
|
38
|
+
'quantity': json['quantity'],
|
|
39
|
+
'maximalUnitPrice': json['maximalUnitPrice'],
|
|
40
|
+
'minimalLapsingDuration': json['minimalLapsingDuration'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
exports.ExpressOrderNeedFromJSONTyped = ExpressOrderNeedFromJSONTyped;
|
|
44
|
+
function ExpressOrderNeedToJSON(value) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'productId': value['productId'],
|
|
50
|
+
'quantity': value['quantity'],
|
|
51
|
+
'maximalUnitPrice': value['maximalUnitPrice'],
|
|
52
|
+
'minimalLapsingDuration': value['minimalLapsingDuration'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
exports.ExpressOrderNeedToJSON = ExpressOrderNeedToJSON;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-pharmaide-service
|
|
3
|
+
* This is the REST API of LCDP pharmaide supply
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SupplyNeedsCreationParameters
|
|
16
|
+
*/
|
|
17
|
+
export interface SupplyNeedsCreationParameters {
|
|
18
|
+
/**
|
|
19
|
+
* User id to compute supply needs for
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof SupplyNeedsCreationParameters
|
|
22
|
+
*/
|
|
23
|
+
userId: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the SupplyNeedsCreationParameters interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfSupplyNeedsCreationParameters(value: object): value is SupplyNeedsCreationParameters;
|
|
29
|
+
export declare function SupplyNeedsCreationParametersFromJSON(json: any): SupplyNeedsCreationParameters;
|
|
30
|
+
export declare function SupplyNeedsCreationParametersFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupplyNeedsCreationParameters;
|
|
31
|
+
export declare function SupplyNeedsCreationParametersToJSON(value?: SupplyNeedsCreationParameters | null): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-pharmaide-service
|
|
6
|
+
* This is the REST API of LCDP pharmaide supply
|
|
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.SupplyNeedsCreationParametersToJSON = exports.SupplyNeedsCreationParametersFromJSONTyped = exports.SupplyNeedsCreationParametersFromJSON = exports.instanceOfSupplyNeedsCreationParameters = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the SupplyNeedsCreationParameters interface.
|
|
19
|
+
*/
|
|
20
|
+
function instanceOfSupplyNeedsCreationParameters(value) {
|
|
21
|
+
if (!('userId' in value) || value['userId'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfSupplyNeedsCreationParameters = instanceOfSupplyNeedsCreationParameters;
|
|
26
|
+
function SupplyNeedsCreationParametersFromJSON(json) {
|
|
27
|
+
return SupplyNeedsCreationParametersFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.SupplyNeedsCreationParametersFromJSON = SupplyNeedsCreationParametersFromJSON;
|
|
30
|
+
function SupplyNeedsCreationParametersFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'userId': json['userId'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.SupplyNeedsCreationParametersFromJSONTyped = SupplyNeedsCreationParametersFromJSONTyped;
|
|
39
|
+
function SupplyNeedsCreationParametersToJSON(value) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'userId': value['userId'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
exports.SupplyNeedsCreationParametersToJSON = SupplyNeedsCreationParametersToJSON;
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./ExpressOrderNeed"), exports);
|
|
20
|
+
__exportStar(require("./SupplyNeedsCreationParameters"), exports);
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-pharmaide-service
|
|
3
|
+
* This is the REST API of LCDP pharmaide supply
|
|
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
|
+
export declare const BASE_PATH = "/v1";
|
|
13
|
+
export interface ConfigurationParameters {
|
|
14
|
+
basePath?: string;
|
|
15
|
+
fetchApi?: FetchAPI;
|
|
16
|
+
middleware?: Middleware[];
|
|
17
|
+
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
18
|
+
username?: string;
|
|
19
|
+
password?: string;
|
|
20
|
+
apiKey?: string | Promise<string> | ((name: string) => string | Promise<string>);
|
|
21
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
|
|
22
|
+
headers?: HTTPHeaders;
|
|
23
|
+
credentials?: RequestCredentials;
|
|
24
|
+
referrerPolicy?: ReferrerPolicy;
|
|
25
|
+
}
|
|
26
|
+
export declare class Configuration {
|
|
27
|
+
private configuration;
|
|
28
|
+
constructor(configuration?: ConfigurationParameters);
|
|
29
|
+
set config(configuration: Configuration);
|
|
30
|
+
get basePath(): string;
|
|
31
|
+
get fetchApi(): FetchAPI | undefined;
|
|
32
|
+
get middleware(): Middleware[];
|
|
33
|
+
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
34
|
+
get username(): string | undefined;
|
|
35
|
+
get password(): string | undefined;
|
|
36
|
+
get apiKey(): ((name: string) => string | Promise<string>) | undefined;
|
|
37
|
+
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
|
|
38
|
+
get headers(): HTTPHeaders | undefined;
|
|
39
|
+
get credentials(): RequestCredentials | undefined;
|
|
40
|
+
get referrerPolicy(): ReferrerPolicy | undefined;
|
|
41
|
+
}
|
|
42
|
+
export declare const DefaultConfig: Configuration;
|
|
43
|
+
/**
|
|
44
|
+
* This is the base class for all generated API classes.
|
|
45
|
+
*/
|
|
46
|
+
export declare class BaseAPI {
|
|
47
|
+
protected configuration: Configuration;
|
|
48
|
+
private static readonly jsonRegex;
|
|
49
|
+
private middleware;
|
|
50
|
+
constructor(configuration?: Configuration);
|
|
51
|
+
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
52
|
+
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
|
|
53
|
+
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
|
|
54
|
+
/**
|
|
55
|
+
* Check if the given MIME is a JSON MIME.
|
|
56
|
+
* JSON MIME examples:
|
|
57
|
+
* application/json
|
|
58
|
+
* application/json; charset=UTF8
|
|
59
|
+
* APPLICATION/JSON
|
|
60
|
+
* application/vnd.company+json
|
|
61
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
62
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
63
|
+
*/
|
|
64
|
+
protected isJsonMime(mime: string | null | undefined): boolean;
|
|
65
|
+
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
|
|
66
|
+
private createFetchParams;
|
|
67
|
+
private fetchApi;
|
|
68
|
+
/**
|
|
69
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
70
|
+
* and then shallow cloning data members.
|
|
71
|
+
*/
|
|
72
|
+
private clone;
|
|
73
|
+
}
|
|
74
|
+
export declare class ResponseError extends Error {
|
|
75
|
+
response: Response;
|
|
76
|
+
name: "ResponseError";
|
|
77
|
+
constructor(response: Response, msg?: string);
|
|
78
|
+
}
|
|
79
|
+
export declare class FetchError extends Error {
|
|
80
|
+
cause: Error;
|
|
81
|
+
name: "FetchError";
|
|
82
|
+
constructor(cause: Error, msg?: string);
|
|
83
|
+
}
|
|
84
|
+
export declare class RequiredError extends Error {
|
|
85
|
+
field: string;
|
|
86
|
+
name: "RequiredError";
|
|
87
|
+
constructor(field: string, msg?: string);
|
|
88
|
+
}
|
|
89
|
+
export declare const COLLECTION_FORMATS: {
|
|
90
|
+
csv: string;
|
|
91
|
+
ssv: string;
|
|
92
|
+
tsv: string;
|
|
93
|
+
pipes: string;
|
|
94
|
+
};
|
|
95
|
+
export declare type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
96
|
+
export declare type Json = any;
|
|
97
|
+
export declare type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
98
|
+
export declare type HTTPHeaders = {
|
|
99
|
+
[key: string]: string;
|
|
100
|
+
};
|
|
101
|
+
export declare type HTTPQuery = {
|
|
102
|
+
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
|
|
103
|
+
};
|
|
104
|
+
export declare type HTTPBody = Json | FormData | URLSearchParams;
|
|
105
|
+
export declare type HTTPRequestInit = {
|
|
106
|
+
headers?: HTTPHeaders;
|
|
107
|
+
method: HTTPMethod;
|
|
108
|
+
credentials?: RequestCredentials;
|
|
109
|
+
body?: HTTPBody;
|
|
110
|
+
};
|
|
111
|
+
export declare type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
112
|
+
export declare type InitOverrideFunction = (requestContext: {
|
|
113
|
+
init: HTTPRequestInit;
|
|
114
|
+
context: RequestOpts;
|
|
115
|
+
}) => Promise<RequestInit>;
|
|
116
|
+
export interface FetchParams {
|
|
117
|
+
url: string;
|
|
118
|
+
init: RequestInit;
|
|
119
|
+
}
|
|
120
|
+
export interface RequestOpts {
|
|
121
|
+
path: string;
|
|
122
|
+
method: HTTPMethod;
|
|
123
|
+
headers: HTTPHeaders;
|
|
124
|
+
query?: HTTPQuery;
|
|
125
|
+
body?: HTTPBody;
|
|
126
|
+
}
|
|
127
|
+
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
128
|
+
export declare function mapValues(data: any, fn: (item: any) => any): {};
|
|
129
|
+
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
130
|
+
export declare function toDateISOString<D extends Date | null | undefined>(date: D): D extends Date ? string : D;
|
|
131
|
+
export interface Consume {
|
|
132
|
+
contentType: string;
|
|
133
|
+
}
|
|
134
|
+
export interface RequestContext {
|
|
135
|
+
fetch: FetchAPI;
|
|
136
|
+
url: string;
|
|
137
|
+
init: RequestInit;
|
|
138
|
+
}
|
|
139
|
+
export interface ResponseContext {
|
|
140
|
+
fetch: FetchAPI;
|
|
141
|
+
url: string;
|
|
142
|
+
init: RequestInit;
|
|
143
|
+
response: Response;
|
|
144
|
+
}
|
|
145
|
+
export interface ErrorContext {
|
|
146
|
+
fetch: FetchAPI;
|
|
147
|
+
url: string;
|
|
148
|
+
init: RequestInit;
|
|
149
|
+
error: unknown;
|
|
150
|
+
response?: Response;
|
|
151
|
+
}
|
|
152
|
+
export interface Middleware {
|
|
153
|
+
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
154
|
+
post?(context: ResponseContext): Promise<Response | void>;
|
|
155
|
+
onError?(context: ErrorContext): Promise<Response | void>;
|
|
156
|
+
}
|
|
157
|
+
export interface ApiResponse<T> {
|
|
158
|
+
raw: Response;
|
|
159
|
+
value(): Promise<T>;
|
|
160
|
+
}
|
|
161
|
+
export interface ResponseTransformer<T> {
|
|
162
|
+
(json: any): T;
|
|
163
|
+
}
|
|
164
|
+
export declare class JSONApiResponse<T> {
|
|
165
|
+
raw: Response;
|
|
166
|
+
private transformer;
|
|
167
|
+
constructor(raw: Response, transformer?: ResponseTransformer<T>);
|
|
168
|
+
value(): Promise<T>;
|
|
169
|
+
}
|
|
170
|
+
export declare class VoidApiResponse {
|
|
171
|
+
raw: Response;
|
|
172
|
+
constructor(raw: Response);
|
|
173
|
+
value(): Promise<void>;
|
|
174
|
+
}
|
|
175
|
+
export interface BlobWithMeta {
|
|
176
|
+
blob: Blob;
|
|
177
|
+
filename?: string;
|
|
178
|
+
}
|
|
179
|
+
export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
|
|
180
|
+
export declare class BlobWithMetaApiResponse {
|
|
181
|
+
raw: Response;
|
|
182
|
+
constructor(raw: Response);
|
|
183
|
+
value(): Promise<BlobWithMeta>;
|
|
184
|
+
private extractFilename;
|
|
185
|
+
}
|
|
186
|
+
export declare class TextApiResponse {
|
|
187
|
+
raw: Response;
|
|
188
|
+
constructor(raw: Response);
|
|
189
|
+
value(): Promise<string>;
|
|
190
|
+
}
|