@lcdp/api-react-rest-client 2.7.1-LDS-3824-api-modification-factory.yml.10474477903 → 2.7.1-LDS-3815-smuggler-implementation-api-fac.10487546295
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/factory/src/apis/ManageAssemblyApi.d.ts +5 -3
- package/factory/src/apis/ManageAssemblyApi.js +51 -10
- package/factory/src/apis/ManageAssemblyOperationApi.d.ts +30 -0
- package/{smuggler/src/apis/ManageSmugglersApi.js → factory/src/apis/ManageAssemblyOperationApi.js} +67 -27
- package/factory/src/apis/SearchAssemblyApi.d.ts +9 -9
- package/factory/src/apis/SearchAssemblyLineApi.d.ts +37 -0
- package/factory/src/apis/SearchAssemblyLineApi.js +239 -0
- package/factory/src/apis/SearchAssemblyOperationApi.d.ts +41 -0
- package/factory/src/apis/SearchAssemblyOperationApi.js +245 -0
- package/factory/src/apis/index.d.ts +3 -0
- package/factory/src/apis/index.js +3 -0
- package/factory/src/models/Assembly.d.ts +17 -11
- package/factory/src/models/Assembly.js +8 -6
- package/factory/src/models/AssemblyCreationParameters.d.ts +10 -5
- package/factory/src/models/AssemblyCreationParameters.js +4 -3
- package/factory/src/models/AssemblyLine.d.ts +39 -0
- package/factory/src/models/AssemblyLine.js +46 -0
- package/factory/src/models/AssemblyLineLink.d.ts +28 -0
- package/factory/src/models/{ProductUpsertFactory.js → AssemblyLineLink.js} +12 -11
- package/factory/src/models/AssemblyLineLinkAllOf.d.ts +27 -0
- package/factory/src/models/AssemblyLineLinkAllOf.js +42 -0
- package/factory/src/models/AssemblyOperation.d.ts +41 -0
- package/factory/src/models/AssemblyOperation.js +48 -0
- package/factory/src/models/AssemblyOperationStatus.d.ts +25 -0
- package/factory/src/models/AssemblyOperationStatus.js +40 -0
- package/factory/src/models/AssemblyOperationType.d.ts +25 -0
- package/factory/src/models/AssemblyOperationType.js +40 -0
- package/factory/src/models/AssemblyStatus.d.ts +6 -7
- package/factory/src/models/AssemblyStatus.js +6 -7
- package/factory/src/models/index.d.ts +6 -10
- package/factory/src/models/index.js +6 -10
- package/package.json +1 -1
- package/factory/src/models/AnyFactory.d.ts +0 -28
- package/factory/src/models/AnyFactory.js +0 -69
- package/factory/src/models/Factory.d.ts +0 -27
- package/factory/src/models/Factory.js +0 -41
- package/factory/src/models/FactoryTypeEnum.d.ts +0 -24
- package/factory/src/models/FactoryTypeEnum.js +0 -39
- package/factory/src/models/OfferPlanificationFactory.d.ts +0 -34
- package/factory/src/models/OfferPlanificationFactory.js +0 -49
- package/factory/src/models/OfferPlanificationFactoryAllOf.d.ts +0 -33
- package/factory/src/models/OfferPlanificationFactoryAllOf.js +0 -43
- package/factory/src/models/ProductUpsertFactory.d.ts +0 -28
- package/factory/src/models/ProductUpsertFactoryAllOf.d.ts +0 -27
- package/factory/src/models/ProductUpsertFactoryAllOf.js +0 -41
- package/factory/src/models/SaleOfferUpsertFactory.d.ts +0 -28
- package/factory/src/models/SaleOfferUpsertFactory.js +0 -49
- package/factory/src/models/SaleOfferUpsertFactoryAllOf.d.ts +0 -27
- package/factory/src/models/SaleOfferUpsertFactoryAllOf.js +0 -41
- package/factory/src/models/StatusEnum.d.ts +0 -29
- package/factory/src/models/StatusEnum.js +0 -44
- package/smuggler/index.d.ts +0 -1
- package/smuggler/index.js +0 -17
- package/smuggler/src/apis/ManageSmugglersApi.d.ts +0 -25
- package/smuggler/src/apis/index.d.ts +0 -1
- package/smuggler/src/apis/index.js +0 -17
- package/smuggler/src/index.d.ts +0 -3
- package/smuggler/src/index.js +0 -19
- package/smuggler/src/models/RestError.d.ts +0 -89
- package/smuggler/src/models/RestError.js +0 -101
- package/smuggler/src/models/index.d.ts +0 -1
- package/smuggler/src/models/index.js +0 -17
- package/smuggler/src/runtime.d.ts +0 -149
- package/smuggler/src/runtime.js +0 -480
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
|
|
13
|
-
import { Assembly
|
|
13
|
+
import { Assembly } from '../models';
|
|
14
14
|
export interface CreateAssemblyRequest {
|
|
15
|
-
|
|
15
|
+
input: object;
|
|
16
|
+
assemblyLineId: string;
|
|
17
|
+
ownerId: number;
|
|
16
18
|
}
|
|
17
19
|
export interface DeleteAssemblyRequest {
|
|
18
|
-
assemblyId:
|
|
20
|
+
assemblyId: number;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* no description
|
|
@@ -80,16 +80,21 @@ var ManageAssemblyApi = /** @class */ (function (_super) {
|
|
|
80
80
|
*/
|
|
81
81
|
ManageAssemblyApi.prototype.createAssemblyRaw = function (requestParameters) {
|
|
82
82
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_1;
|
|
83
|
+
var queryParameters, headerParameters, token, tokenString, _a, consumes, formParams, useForm, response, contentType, response_1;
|
|
84
84
|
return __generator(this, function (_b) {
|
|
85
85
|
switch (_b.label) {
|
|
86
86
|
case 0:
|
|
87
|
-
if (requestParameters.
|
|
88
|
-
throw new runtime_1.RequiredError('
|
|
87
|
+
if (requestParameters.input === null || requestParameters.input === undefined) {
|
|
88
|
+
throw new runtime_1.RequiredError('input', 'Required parameter requestParameters.input was null or undefined when calling createAssembly.');
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters.assemblyLineId === null || requestParameters.assemblyLineId === undefined) {
|
|
91
|
+
throw new runtime_1.RequiredError('assemblyLineId', 'Required parameter requestParameters.assemblyLineId was null or undefined when calling createAssembly.');
|
|
92
|
+
}
|
|
93
|
+
if (requestParameters.ownerId === null || requestParameters.ownerId === undefined) {
|
|
94
|
+
throw new runtime_1.RequiredError('ownerId', 'Required parameter requestParameters.ownerId was null or undefined when calling createAssembly.');
|
|
89
95
|
}
|
|
90
96
|
queryParameters = {};
|
|
91
97
|
headerParameters = {};
|
|
92
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
93
98
|
if (this.configuration && this.configuration.apiKey) {
|
|
94
99
|
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
|
|
95
100
|
}
|
|
@@ -110,15 +115,51 @@ var ManageAssemblyApi = /** @class */ (function (_super) {
|
|
|
110
115
|
}
|
|
111
116
|
_b.label = 4;
|
|
112
117
|
case 4:
|
|
113
|
-
|
|
118
|
+
consumes = [
|
|
119
|
+
{ contentType: 'multipart/form-data' },
|
|
120
|
+
];
|
|
121
|
+
useForm = false;
|
|
122
|
+
if (useForm) {
|
|
123
|
+
formParams = new FormData();
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
formParams = new URLSearchParams();
|
|
127
|
+
}
|
|
128
|
+
if (requestParameters.input !== undefined) {
|
|
129
|
+
if (useForm && (0, runtime_1.instanceOfBlobWithMeta)(requestParameters.input)) {
|
|
130
|
+
formParams.append('input', requestParameters.input.blob, requestParameters.input.filename);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
formParams.append('input', requestParameters.input);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (requestParameters.assemblyLineId !== undefined) {
|
|
137
|
+
if (useForm && (0, runtime_1.instanceOfBlobWithMeta)(requestParameters.assemblyLineId)) {
|
|
138
|
+
formParams.append('assemblyLineId', requestParameters.assemblyLineId.blob, requestParameters.assemblyLineId.filename);
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
formParams.append('assemblyLineId', requestParameters.assemblyLineId);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (requestParameters.ownerId !== undefined) {
|
|
145
|
+
if (useForm && (0, runtime_1.instanceOfBlobWithMeta)(requestParameters.ownerId)) {
|
|
146
|
+
formParams.append('ownerId', requestParameters.ownerId.blob, requestParameters.ownerId.filename);
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
formParams.append('ownerId', requestParameters.ownerId);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
_b.label = 5;
|
|
153
|
+
case 5:
|
|
154
|
+
_b.trys.push([5, 7, , 8]);
|
|
114
155
|
return [4 /*yield*/, this.request({
|
|
115
156
|
path: "/assemblies",
|
|
116
157
|
method: 'POST',
|
|
117
158
|
headers: headerParameters,
|
|
118
159
|
query: queryParameters,
|
|
119
|
-
body:
|
|
160
|
+
body: formParams,
|
|
120
161
|
})];
|
|
121
|
-
case
|
|
162
|
+
case 6:
|
|
122
163
|
response = _b.sent();
|
|
123
164
|
contentType = response.headers.get("content-type");
|
|
124
165
|
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
@@ -131,12 +172,12 @@ var ManageAssemblyApi = /** @class */ (function (_super) {
|
|
|
131
172
|
// TODO : Better handling of others application types
|
|
132
173
|
return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
|
|
133
174
|
}
|
|
134
|
-
return [3 /*break*/,
|
|
135
|
-
case
|
|
175
|
+
return [3 /*break*/, 8];
|
|
176
|
+
case 7:
|
|
136
177
|
response_1 = _b.sent();
|
|
137
178
|
console.debug(response_1);
|
|
138
179
|
throw response_1;
|
|
139
|
-
case
|
|
180
|
+
case 8: return [2 /*return*/];
|
|
140
181
|
}
|
|
141
182
|
});
|
|
142
183
|
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-factory-service
|
|
3
|
+
* This is the REST API of LCDP factory
|
|
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 { AssemblyOperation } from '../models';
|
|
14
|
+
export interface CreateAssemblyOperationRequest {
|
|
15
|
+
assemblyId: number;
|
|
16
|
+
body: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* no description
|
|
20
|
+
*/
|
|
21
|
+
export declare class ManageAssemblyOperationApi extends BaseAPI {
|
|
22
|
+
/**
|
|
23
|
+
* Create assembly operation
|
|
24
|
+
*/
|
|
25
|
+
createAssemblyOperationRaw(requestParameters: CreateAssemblyOperationRequest): Promise<ApiResponse<Array<AssemblyOperation> | BlobWithMeta>>;
|
|
26
|
+
/**
|
|
27
|
+
* Create assembly operation
|
|
28
|
+
*/
|
|
29
|
+
createAssemblyOperation(requestParameters: CreateAssemblyOperationRequest): Promise<Array<AssemblyOperation> | BlobWithMeta>;
|
|
30
|
+
}
|
package/{smuggler/src/apis/ManageSmugglersApi.js → factory/src/apis/ManageAssemblyOperationApi.js}
RENAMED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/* tslint:disable */
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
|
-
* lcdp-
|
|
6
|
-
* This is the REST API of LCDP
|
|
5
|
+
* lcdp-factory-service
|
|
6
|
+
* This is the REST API of LCDP factory
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: 1.0.0
|
|
9
9
|
* Contact: contact@lecomptoirdespharmacies.fr
|
|
@@ -64,63 +64,103 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.
|
|
67
|
+
exports.ManageAssemblyOperationApi = void 0;
|
|
68
68
|
var runtime_1 = require("../runtime");
|
|
69
|
+
var models_1 = require("../models");
|
|
69
70
|
/**
|
|
70
71
|
* no description
|
|
71
72
|
*/
|
|
72
|
-
var
|
|
73
|
-
__extends(
|
|
74
|
-
function
|
|
73
|
+
var ManageAssemblyOperationApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(ManageAssemblyOperationApi, _super);
|
|
75
|
+
function ManageAssemblyOperationApi() {
|
|
75
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
76
77
|
}
|
|
77
78
|
/**
|
|
78
|
-
*
|
|
79
|
+
* Create assembly operation
|
|
79
80
|
*/
|
|
80
|
-
|
|
81
|
+
ManageAssemblyOperationApi.prototype.createAssemblyOperationRaw = function (requestParameters) {
|
|
81
82
|
return __awaiter(this, void 0, void 0, function () {
|
|
82
|
-
var queryParameters, headerParameters, response, response_1;
|
|
83
|
-
return __generator(this, function (
|
|
84
|
-
switch (
|
|
83
|
+
var queryParameters, headerParameters, token, tokenString, _a, response, contentType, response_1;
|
|
84
|
+
return __generator(this, function (_b) {
|
|
85
|
+
switch (_b.label) {
|
|
85
86
|
case 0:
|
|
87
|
+
if (requestParameters.assemblyId === null || requestParameters.assemblyId === undefined) {
|
|
88
|
+
throw new runtime_1.RequiredError('assemblyId', 'Required parameter requestParameters.assemblyId was null or undefined when calling createAssemblyOperation.');
|
|
89
|
+
}
|
|
90
|
+
if (requestParameters.body === null || requestParameters.body === undefined) {
|
|
91
|
+
throw new runtime_1.RequiredError('body', 'Required parameter requestParameters.body was null or undefined when calling createAssemblyOperation.');
|
|
92
|
+
}
|
|
86
93
|
queryParameters = {};
|
|
87
94
|
headerParameters = {};
|
|
88
|
-
|
|
95
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
96
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
97
|
+
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
|
|
98
|
+
}
|
|
99
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
100
|
+
token = this.configuration.accessToken;
|
|
101
|
+
if (!(typeof token === 'function')) return [3 /*break*/, 2];
|
|
102
|
+
return [4 /*yield*/, token("bearerAuth", [])];
|
|
89
103
|
case 1:
|
|
90
|
-
_a.
|
|
104
|
+
_a = _b.sent();
|
|
105
|
+
return [3 /*break*/, 3];
|
|
106
|
+
case 2:
|
|
107
|
+
_a = token;
|
|
108
|
+
_b.label = 3;
|
|
109
|
+
case 3:
|
|
110
|
+
tokenString = _a;
|
|
111
|
+
if (tokenString) {
|
|
112
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
113
|
+
}
|
|
114
|
+
_b.label = 4;
|
|
115
|
+
case 4:
|
|
116
|
+
_b.trys.push([4, 6, , 7]);
|
|
91
117
|
return [4 /*yield*/, this.request({
|
|
92
|
-
path: "/
|
|
118
|
+
path: "/assemblies/{assemblyId}/operations".replace("{".concat("assemblyId", "}"), encodeURIComponent(String(requestParameters.assemblyId))),
|
|
93
119
|
method: 'POST',
|
|
94
120
|
headers: headerParameters,
|
|
95
121
|
query: queryParameters,
|
|
122
|
+
body: requestParameters.body,
|
|
96
123
|
})];
|
|
97
|
-
case
|
|
98
|
-
response =
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
124
|
+
case 5:
|
|
125
|
+
response = _b.sent();
|
|
126
|
+
contentType = response.headers.get("content-type");
|
|
127
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
128
|
+
return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.AssemblyOperationFromJSON); })];
|
|
129
|
+
}
|
|
130
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
131
|
+
return [2 /*return*/, new runtime_1.TextApiResponse(response)];
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
// TODO : Better handling of others application types
|
|
135
|
+
return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
|
|
136
|
+
}
|
|
137
|
+
return [3 /*break*/, 7];
|
|
138
|
+
case 6:
|
|
139
|
+
response_1 = _b.sent();
|
|
102
140
|
console.debug(response_1);
|
|
103
141
|
throw response_1;
|
|
104
|
-
case
|
|
142
|
+
case 7: return [2 /*return*/];
|
|
105
143
|
}
|
|
106
144
|
});
|
|
107
145
|
});
|
|
108
146
|
};
|
|
109
147
|
/**
|
|
110
|
-
*
|
|
148
|
+
* Create assembly operation
|
|
111
149
|
*/
|
|
112
|
-
|
|
150
|
+
ManageAssemblyOperationApi.prototype.createAssemblyOperation = function (requestParameters) {
|
|
113
151
|
return __awaiter(this, void 0, void 0, function () {
|
|
152
|
+
var response;
|
|
114
153
|
return __generator(this, function (_a) {
|
|
115
154
|
switch (_a.label) {
|
|
116
|
-
case 0: return [4 /*yield*/, this.
|
|
155
|
+
case 0: return [4 /*yield*/, this.createAssemblyOperationRaw(requestParameters)];
|
|
117
156
|
case 1:
|
|
118
|
-
_a.sent();
|
|
119
|
-
return [
|
|
157
|
+
response = _a.sent();
|
|
158
|
+
return [4 /*yield*/, response.value()];
|
|
159
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
120
160
|
}
|
|
121
161
|
});
|
|
122
162
|
});
|
|
123
163
|
};
|
|
124
|
-
return
|
|
164
|
+
return ManageAssemblyOperationApi;
|
|
125
165
|
}(runtime_1.BaseAPI));
|
|
126
|
-
exports.
|
|
166
|
+
exports.ManageAssemblyOperationApi = ManageAssemblyOperationApi;
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
import { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
|
|
13
13
|
import { Assembly, AssemblyStatus, PaginatedAssemblies } from '../models';
|
|
14
14
|
export interface GetAssembliesRequest {
|
|
15
|
-
alidEq?: Array<
|
|
16
|
-
alidNeq?: Array<
|
|
15
|
+
alidEq?: Array<number>;
|
|
16
|
+
alidNeq?: Array<number>;
|
|
17
17
|
oEq?: Array<number>;
|
|
18
18
|
oNeq?: Array<number>;
|
|
19
19
|
stEq?: Array<AssemblyStatus>;
|
|
@@ -27,13 +27,13 @@ export interface GetAssembliesRequest {
|
|
|
27
27
|
pp?: number;
|
|
28
28
|
}
|
|
29
29
|
export interface GetAssemblyRequest {
|
|
30
|
-
assemblyId:
|
|
30
|
+
assemblyId: number;
|
|
31
31
|
}
|
|
32
32
|
export interface GetAssemblyInputRequest {
|
|
33
|
-
assemblyId:
|
|
33
|
+
assemblyId: number;
|
|
34
34
|
}
|
|
35
35
|
export interface GetAssemblyOutputRequest {
|
|
36
|
-
assemblyId:
|
|
36
|
+
assemblyId: number;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* no description
|
|
@@ -58,19 +58,19 @@ export declare class SearchAssemblyApi extends BaseAPI {
|
|
|
58
58
|
/**
|
|
59
59
|
* Download a assembly input Restrictions : - You must be owner of the assembly (except role \'ADMINISTRATOR\')
|
|
60
60
|
*/
|
|
61
|
-
getAssemblyInputRaw(requestParameters: GetAssemblyInputRequest): Promise<ApiResponse<
|
|
61
|
+
getAssemblyInputRaw(requestParameters: GetAssemblyInputRequest): Promise<ApiResponse<BlobWithMeta>>;
|
|
62
62
|
/**
|
|
63
63
|
* Download a assembly input Restrictions : - You must be owner of the assembly (except role \'ADMINISTRATOR\')
|
|
64
64
|
*/
|
|
65
|
-
getAssemblyInput(requestParameters: GetAssemblyInputRequest): Promise<
|
|
65
|
+
getAssemblyInput(requestParameters: GetAssemblyInputRequest): Promise<BlobWithMeta>;
|
|
66
66
|
/**
|
|
67
67
|
* Download a assembly output Restrictions : - You must be owner of the assembly (except role \'ADMINISTRATOR\')
|
|
68
68
|
*/
|
|
69
|
-
getAssemblyOutputRaw(requestParameters: GetAssemblyOutputRequest): Promise<ApiResponse<
|
|
69
|
+
getAssemblyOutputRaw(requestParameters: GetAssemblyOutputRequest): Promise<ApiResponse<BlobWithMeta>>;
|
|
70
70
|
/**
|
|
71
71
|
* Download a assembly output Restrictions : - You must be owner of the assembly (except role \'ADMINISTRATOR\')
|
|
72
72
|
*/
|
|
73
|
-
getAssemblyOutput(requestParameters: GetAssemblyOutputRequest): Promise<
|
|
73
|
+
getAssemblyOutput(requestParameters: GetAssemblyOutputRequest): Promise<BlobWithMeta>;
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* @export
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-factory-service
|
|
3
|
+
* This is the REST API of LCDP factory
|
|
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 { AssemblyLine } from '../models';
|
|
14
|
+
export interface GetAssemblyLineRequest {
|
|
15
|
+
assemblyLineId: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* no description
|
|
19
|
+
*/
|
|
20
|
+
export declare class SearchAssemblyLineApi extends BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Get an assembly line
|
|
23
|
+
*/
|
|
24
|
+
getAssemblyLineRaw(requestParameters: GetAssemblyLineRequest): Promise<ApiResponse<AssemblyLine | BlobWithMeta>>;
|
|
25
|
+
/**
|
|
26
|
+
* Get an assembly line
|
|
27
|
+
*/
|
|
28
|
+
getAssemblyLine(requestParameters: GetAssemblyLineRequest): Promise<AssemblyLine | BlobWithMeta>;
|
|
29
|
+
/**
|
|
30
|
+
* Get assembly lines
|
|
31
|
+
*/
|
|
32
|
+
getAssemblyLinesRaw(): Promise<ApiResponse<Array<AssemblyLine> | BlobWithMeta>>;
|
|
33
|
+
/**
|
|
34
|
+
* Get assembly lines
|
|
35
|
+
*/
|
|
36
|
+
getAssemblyLines(): Promise<Array<AssemblyLine> | BlobWithMeta>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-factory-service
|
|
6
|
+
* This is the REST API of LCDP factory
|
|
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.SearchAssemblyLineApi = void 0;
|
|
68
|
+
var runtime_1 = require("../runtime");
|
|
69
|
+
var models_1 = require("../models");
|
|
70
|
+
/**
|
|
71
|
+
* no description
|
|
72
|
+
*/
|
|
73
|
+
var SearchAssemblyLineApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(SearchAssemblyLineApi, _super);
|
|
75
|
+
function SearchAssemblyLineApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get an assembly line
|
|
80
|
+
*/
|
|
81
|
+
SearchAssemblyLineApi.prototype.getAssemblyLineRaw = 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.assemblyLineId === null || requestParameters.assemblyLineId === undefined) {
|
|
88
|
+
throw new runtime_1.RequiredError('assemblyLineId', 'Required parameter requestParameters.assemblyLineId was null or undefined when calling getAssemblyLine.');
|
|
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: "/assembly-lines/{assemblyLineId}".replace("{".concat("assemblyLineId", "}"), encodeURIComponent(String(requestParameters.assemblyLineId))),
|
|
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.AssemblyLineFromJSON)(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 an assembly line
|
|
144
|
+
*/
|
|
145
|
+
SearchAssemblyLineApi.prototype.getAssemblyLine = 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.getAssemblyLineRaw(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
|
+
* Get assembly lines
|
|
161
|
+
*/
|
|
162
|
+
SearchAssemblyLineApi.prototype.getAssemblyLinesRaw = function () {
|
|
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
|
+
headerParameters = {};
|
|
170
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
171
|
+
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
|
|
172
|
+
}
|
|
173
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
174
|
+
token = this.configuration.accessToken;
|
|
175
|
+
if (!(typeof token === 'function')) return [3 /*break*/, 2];
|
|
176
|
+
return [4 /*yield*/, token("bearerAuth", [])];
|
|
177
|
+
case 1:
|
|
178
|
+
_a = _b.sent();
|
|
179
|
+
return [3 /*break*/, 3];
|
|
180
|
+
case 2:
|
|
181
|
+
_a = token;
|
|
182
|
+
_b.label = 3;
|
|
183
|
+
case 3:
|
|
184
|
+
tokenString = _a;
|
|
185
|
+
if (tokenString) {
|
|
186
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
187
|
+
}
|
|
188
|
+
_b.label = 4;
|
|
189
|
+
case 4:
|
|
190
|
+
_b.trys.push([4, 6, , 7]);
|
|
191
|
+
return [4 /*yield*/, this.request({
|
|
192
|
+
path: "/assembly-lines",
|
|
193
|
+
method: 'GET',
|
|
194
|
+
headers: headerParameters,
|
|
195
|
+
query: queryParameters,
|
|
196
|
+
})];
|
|
197
|
+
case 5:
|
|
198
|
+
response = _b.sent();
|
|
199
|
+
contentType = response.headers.get("content-type");
|
|
200
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
201
|
+
return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(models_1.AssemblyLineFromJSON); })];
|
|
202
|
+
}
|
|
203
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
204
|
+
return [2 /*return*/, new runtime_1.TextApiResponse(response)];
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
// TODO : Better handling of others application types
|
|
208
|
+
return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
|
|
209
|
+
}
|
|
210
|
+
return [3 /*break*/, 7];
|
|
211
|
+
case 6:
|
|
212
|
+
response_2 = _b.sent();
|
|
213
|
+
console.debug(response_2);
|
|
214
|
+
throw response_2;
|
|
215
|
+
case 7: return [2 /*return*/];
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Get assembly lines
|
|
222
|
+
*/
|
|
223
|
+
SearchAssemblyLineApi.prototype.getAssemblyLines = function () {
|
|
224
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
225
|
+
var response;
|
|
226
|
+
return __generator(this, function (_a) {
|
|
227
|
+
switch (_a.label) {
|
|
228
|
+
case 0: return [4 /*yield*/, this.getAssemblyLinesRaw()];
|
|
229
|
+
case 1:
|
|
230
|
+
response = _a.sent();
|
|
231
|
+
return [4 /*yield*/, response.value()];
|
|
232
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
return SearchAssemblyLineApi;
|
|
238
|
+
}(runtime_1.BaseAPI));
|
|
239
|
+
exports.SearchAssemblyLineApi = SearchAssemblyLineApi;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-factory-service
|
|
3
|
+
* This is the REST API of LCDP factory
|
|
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 { AssemblyOperation } from '../models';
|
|
14
|
+
export interface GetAssemblyOperationRequest {
|
|
15
|
+
assemblyId: number;
|
|
16
|
+
assemblyOperationId: number;
|
|
17
|
+
}
|
|
18
|
+
export interface GetAssemblyOperationsRequest {
|
|
19
|
+
assemblyId: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* no description
|
|
23
|
+
*/
|
|
24
|
+
export declare class SearchAssemblyOperationApi extends BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* Get assembly operation Restrictions : - You must be owner of the assembly (except role \'ADMINISTRATOR\')
|
|
27
|
+
*/
|
|
28
|
+
getAssemblyOperationRaw(requestParameters: GetAssemblyOperationRequest): Promise<ApiResponse<AssemblyOperation | BlobWithMeta>>;
|
|
29
|
+
/**
|
|
30
|
+
* Get assembly operation Restrictions : - You must be owner of the assembly (except role \'ADMINISTRATOR\')
|
|
31
|
+
*/
|
|
32
|
+
getAssemblyOperation(requestParameters: GetAssemblyOperationRequest): Promise<AssemblyOperation | BlobWithMeta>;
|
|
33
|
+
/**
|
|
34
|
+
* Get assembly operations Restrictions : - You must be owner of the assembly (except role \'ADMINISTRATOR\')
|
|
35
|
+
*/
|
|
36
|
+
getAssemblyOperationsRaw(requestParameters: GetAssemblyOperationsRequest): Promise<ApiResponse<Array<AssemblyOperation> | BlobWithMeta>>;
|
|
37
|
+
/**
|
|
38
|
+
* Get assembly operations Restrictions : - You must be owner of the assembly (except role \'ADMINISTRATOR\')
|
|
39
|
+
*/
|
|
40
|
+
getAssemblyOperations(requestParameters: GetAssemblyOperationsRequest): Promise<Array<AssemblyOperation> | BlobWithMeta>;
|
|
41
|
+
}
|