@lcdp/api-react-rest-client 2.13.9-LDS-4699-etape-1-no-more-archive-of-frid.17092299169 → 2.13.9-LDS-4699-etape-1-no-more-archive-of-frid.17125564147
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/catalog/src/models/ProductInsight.d.ts +4 -3
- package/catalog/src/models/ProductInsight.js +3 -2
- package/catalog/src/models/ProductInsightCreateOrUpdateParameters.d.ts +4 -3
- package/catalog/src/models/ProductInsightCreateOrUpdateParameters.js +3 -2
- package/catalog/src/models/ProductStorageType.d.ts +26 -0
- package/catalog/src/models/ProductStorageType.js +49 -0
- package/catalog/src/models/index.d.ts +1 -0
- package/catalog/src/models/index.js +1 -0
- package/magic-cart/src/models/ProductStorageType.d.ts +8 -19
- package/magic-cart/src/models/ProductStorageType.js +19 -17
- package/order/src/models/ProductStorageType.d.ts +8 -19
- package/order/src/models/ProductStorageType.js +19 -17
- package/package.json +1 -1
- package/product/src/apis/SearchProductMetadataApi.d.ts +0 -11
- package/product/src/apis/SearchProductMetadataApi.js +12 -91
- package/product/src/models/ProductCreationOrUpdateParameters.d.ts +4 -3
- package/product/src/models/ProductCreationOrUpdateParameters.js +3 -2
- package/product/src/models/ProductStorageType.d.ts +8 -19
- package/product/src/models/ProductStorageType.js +19 -17
- package/shopping-cart/src/models/ProductStorageType.d.ts +8 -19
- package/shopping-cart/src/models/ProductStorageType.js +19 -17
- package/user/src/apis/ManageUserRestrictionApi.d.ts +1 -25
- package/user/src/apis/ManageUserRestrictionApi.js +20 -160
- package/user/src/apis/SearchUserRestrictionApi.d.ts +1 -20
- package/user/src/apis/SearchUserRestrictionApi.js +12 -167
- package/user/src/models/ProductStorageType.d.ts +26 -0
- package/user/src/models/ProductStorageType.js +49 -0
- package/user/src/models/User.d.ts +3 -2
- package/user/src/models/User.js +3 -2
- package/user/src/models/UserUpdateParameters.d.ts +7 -0
- package/user/src/models/UserUpdateParameters.js +3 -0
- package/user/src/models/index.d.ts +1 -2
- package/user/src/models/index.js +1 -2
- package/user/src/models/ProductStorageTypeLink.d.ts +0 -43
- package/user/src/models/ProductStorageTypeLink.js +0 -51
- package/user/src/models/UserRestrictedProductStorageTypeCreationParameter.d.ts +0 -31
- package/user/src/models/UserRestrictedProductStorageTypeCreationParameter.js +0 -47
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import type { LaboratoryLink } from './LaboratoryLink';
|
|
13
13
|
import type { VatLink } from './VatLink';
|
|
14
|
+
import type { ProductStorageType } from './ProductStorageType';
|
|
14
15
|
import type { ProductInsightJournal } from './ProductInsightJournal';
|
|
15
16
|
import type { Barcodes } from './Barcodes';
|
|
16
17
|
import type { ProductTypeLink } from './ProductTypeLink';
|
|
@@ -95,11 +96,11 @@ export interface ProductInsight {
|
|
|
95
96
|
*/
|
|
96
97
|
vat?: VatLink | null;
|
|
97
98
|
/**
|
|
98
|
-
*
|
|
99
|
-
* @type {
|
|
99
|
+
*
|
|
100
|
+
* @type {ProductStorageType}
|
|
100
101
|
* @memberof ProductInsight
|
|
101
102
|
*/
|
|
102
|
-
storageType?:
|
|
103
|
+
storageType?: ProductStorageType | null;
|
|
103
104
|
/**
|
|
104
105
|
*
|
|
105
106
|
* @type {ProductInsightJournal}
|
|
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
16
16
|
exports.ProductInsightToJSON = exports.ProductInsightFromJSONTyped = exports.ProductInsightFromJSON = exports.instanceOfProductInsight = void 0;
|
|
17
17
|
var LaboratoryLink_1 = require("./LaboratoryLink");
|
|
18
18
|
var VatLink_1 = require("./VatLink");
|
|
19
|
+
var ProductStorageType_1 = require("./ProductStorageType");
|
|
19
20
|
var ProductInsightJournal_1 = require("./ProductInsightJournal");
|
|
20
21
|
var Barcodes_1 = require("./Barcodes");
|
|
21
22
|
var ProductTypeLink_1 = require("./ProductTypeLink");
|
|
@@ -53,7 +54,7 @@ function ProductInsightFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
53
54
|
'secondaryType': (json['secondaryType'] === null || json['secondaryType'] === undefined) ? json['secondaryType'] : (0, ProductSecondaryTypeLink_1.ProductSecondaryTypeLinkFromJSON)(json['secondaryType']),
|
|
54
55
|
'laboratory': (json['laboratory'] === null || json['laboratory'] === undefined) ? json['laboratory'] : (0, LaboratoryLink_1.LaboratoryLinkFromJSON)(json['laboratory']),
|
|
55
56
|
'vat': (json['vat'] === null || json['vat'] === undefined) ? json['vat'] : (0, VatLink_1.VatLinkFromJSON)(json['vat']),
|
|
56
|
-
'storageType': json['storageType'],
|
|
57
|
+
'storageType': (json['storageType'] === null || json['storageType'] === undefined) ? json['storageType'] : (0, ProductStorageType_1.ProductStorageTypeFromJSON)(json['storageType']),
|
|
57
58
|
'journal': (json['journal'] === null || json['journal'] === undefined) ? json['journal'] : (0, ProductInsightJournal_1.ProductInsightJournalFromJSON)(json['journal']),
|
|
58
59
|
};
|
|
59
60
|
}
|
|
@@ -74,7 +75,7 @@ function ProductInsightToJSON(value) {
|
|
|
74
75
|
'secondaryType': (0, ProductSecondaryTypeLink_1.ProductSecondaryTypeLinkToJSON)(value['secondaryType']),
|
|
75
76
|
'laboratory': (0, LaboratoryLink_1.LaboratoryLinkToJSON)(value['laboratory']),
|
|
76
77
|
'vat': (0, VatLink_1.VatLinkToJSON)(value['vat']),
|
|
77
|
-
'storageType': value['storageType'],
|
|
78
|
+
'storageType': (0, ProductStorageType_1.ProductStorageTypeToJSON)(value['storageType']),
|
|
78
79
|
'journal': (0, ProductInsightJournal_1.ProductInsightJournalToJSON)(value['journal']),
|
|
79
80
|
};
|
|
80
81
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ProductStorageType } from './ProductStorageType';
|
|
12
13
|
import type { Barcodes } from './Barcodes';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
@@ -77,11 +78,11 @@ export interface ProductInsightCreateOrUpdateParameters {
|
|
|
77
78
|
*/
|
|
78
79
|
vatId?: string | null;
|
|
79
80
|
/**
|
|
80
|
-
*
|
|
81
|
-
* @type {
|
|
81
|
+
*
|
|
82
|
+
* @type {ProductStorageType}
|
|
82
83
|
* @memberof ProductInsightCreateOrUpdateParameters
|
|
83
84
|
*/
|
|
84
|
-
storageType?:
|
|
85
|
+
storageType?: ProductStorageType | null;
|
|
85
86
|
}
|
|
86
87
|
/**
|
|
87
88
|
* Check if a given object implements the ProductInsightCreateOrUpdateParameters interface.
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.ProductInsightCreateOrUpdateParametersToJSON = exports.ProductInsightCreateOrUpdateParametersFromJSONTyped = exports.ProductInsightCreateOrUpdateParametersFromJSON = exports.instanceOfProductInsightCreateOrUpdateParameters = void 0;
|
|
17
|
+
var ProductStorageType_1 = require("./ProductStorageType");
|
|
17
18
|
var Barcodes_1 = require("./Barcodes");
|
|
18
19
|
/**
|
|
19
20
|
* Check if a given object implements the ProductInsightCreateOrUpdateParameters interface.
|
|
@@ -43,7 +44,7 @@ function ProductInsightCreateOrUpdateParametersFromJSONTyped(json, ignoreDiscrim
|
|
|
43
44
|
'secondaryTypeId': json['secondaryTypeId'],
|
|
44
45
|
'laboratoryId': json['laboratoryId'],
|
|
45
46
|
'vatId': json['vatId'],
|
|
46
|
-
'storageType': json['storageType'],
|
|
47
|
+
'storageType': (json['storageType'] === null || json['storageType'] === undefined) ? json['storageType'] : (0, ProductStorageType_1.ProductStorageTypeFromJSON)(json['storageType']),
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
exports.ProductInsightCreateOrUpdateParametersFromJSONTyped = ProductInsightCreateOrUpdateParametersFromJSONTyped;
|
|
@@ -62,7 +63,7 @@ function ProductInsightCreateOrUpdateParametersToJSON(value) {
|
|
|
62
63
|
'secondaryTypeId': value['secondaryTypeId'],
|
|
63
64
|
'laboratoryId': value['laboratoryId'],
|
|
64
65
|
'vatId': value['vatId'],
|
|
65
|
-
'storageType': value['storageType'],
|
|
66
|
+
'storageType': (0, ProductStorageType_1.ProductStorageTypeToJSON)(value['storageType']),
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
69
|
exports.ProductInsightCreateOrUpdateParametersToJSON = ProductInsightCreateOrUpdateParametersToJSON;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-catalog
|
|
3
|
+
* This is the REST API of LCDP catalog
|
|
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
|
+
*/
|
|
16
|
+
export declare const ProductStorageType: {
|
|
17
|
+
readonly FREE: "FREE";
|
|
18
|
+
readonly FRIDGE: "FRIDGE";
|
|
19
|
+
readonly FREEZER: "FREEZER";
|
|
20
|
+
readonly FRESH: "FRESH";
|
|
21
|
+
};
|
|
22
|
+
export declare type ProductStorageType = typeof ProductStorageType[keyof typeof ProductStorageType];
|
|
23
|
+
export declare function instanceOfProductStorageType(value: any): boolean;
|
|
24
|
+
export declare function ProductStorageTypeFromJSON(json: any): ProductStorageType;
|
|
25
|
+
export declare function ProductStorageTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductStorageType;
|
|
26
|
+
export declare function ProductStorageTypeToJSON(value?: ProductStorageType | null): any;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-catalog
|
|
6
|
+
* This is the REST API of LCDP catalog
|
|
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.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = exports.ProductStorageType = void 0;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
exports.ProductStorageType = {
|
|
22
|
+
FREE: 'FREE',
|
|
23
|
+
FRIDGE: 'FRIDGE',
|
|
24
|
+
FREEZER: 'FREEZER',
|
|
25
|
+
FRESH: 'FRESH'
|
|
26
|
+
};
|
|
27
|
+
function instanceOfProductStorageType(value) {
|
|
28
|
+
for (var key in exports.ProductStorageType) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(exports.ProductStorageType, key)) {
|
|
30
|
+
if (exports.ProductStorageType[key] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
exports.instanceOfProductStorageType = instanceOfProductStorageType;
|
|
38
|
+
function ProductStorageTypeFromJSON(json) {
|
|
39
|
+
return ProductStorageTypeFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
exports.ProductStorageTypeFromJSON = ProductStorageTypeFromJSON;
|
|
42
|
+
function ProductStorageTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
exports.ProductStorageTypeFromJSONTyped = ProductStorageTypeFromJSONTyped;
|
|
46
|
+
function ProductStorageTypeToJSON(value) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
exports.ProductStorageTypeToJSON = ProductStorageTypeToJSON;
|
|
@@ -8,6 +8,7 @@ export * from './ProductInsight';
|
|
|
8
8
|
export * from './ProductInsightCreateOrUpdateParameters';
|
|
9
9
|
export * from './ProductInsightJournal';
|
|
10
10
|
export * from './ProductSecondaryTypeLink';
|
|
11
|
+
export * from './ProductStorageType';
|
|
11
12
|
export * from './ProductTypeLink';
|
|
12
13
|
export * from './RestError';
|
|
13
14
|
export * from './VatLink';
|
|
@@ -26,6 +26,7 @@ __exportStar(require("./ProductInsight"), exports);
|
|
|
26
26
|
__exportStar(require("./ProductInsightCreateOrUpdateParameters"), exports);
|
|
27
27
|
__exportStar(require("./ProductInsightJournal"), exports);
|
|
28
28
|
__exportStar(require("./ProductSecondaryTypeLink"), exports);
|
|
29
|
+
__exportStar(require("./ProductStorageType"), exports);
|
|
29
30
|
__exportStar(require("./ProductTypeLink"), exports);
|
|
30
31
|
__exportStar(require("./RestError"), exports);
|
|
31
32
|
__exportStar(require("./VatLink"), exports);
|
|
@@ -12,26 +12,15 @@
|
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* @export
|
|
15
|
-
* @interface ProductStorageType
|
|
16
15
|
*/
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* Readable name for display
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof ProductStorageType
|
|
28
|
-
*/
|
|
29
|
-
name?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the ProductStorageType interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfProductStorageType(value: object): value is ProductStorageType;
|
|
16
|
+
export declare const ProductStorageType: {
|
|
17
|
+
readonly FREE: "FREE";
|
|
18
|
+
readonly FRIDGE: "FRIDGE";
|
|
19
|
+
readonly FREEZER: "FREEZER";
|
|
20
|
+
readonly FRESH: "FRESH";
|
|
21
|
+
};
|
|
22
|
+
export declare type ProductStorageType = typeof ProductStorageType[keyof typeof ProductStorageType];
|
|
23
|
+
export declare function instanceOfProductStorageType(value: any): boolean;
|
|
35
24
|
export declare function ProductStorageTypeFromJSON(json: any): ProductStorageType;
|
|
36
25
|
export declare function ProductStorageTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductStorageType;
|
|
37
26
|
export declare function ProductStorageTypeToJSON(value?: ProductStorageType | null): any;
|
|
@@ -13,12 +13,26 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = void 0;
|
|
16
|
+
exports.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = exports.ProductStorageType = void 0;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
19
20
|
*/
|
|
21
|
+
exports.ProductStorageType = {
|
|
22
|
+
FREE: 'FREE',
|
|
23
|
+
FRIDGE: 'FRIDGE',
|
|
24
|
+
FREEZER: 'FREEZER',
|
|
25
|
+
FRESH: 'FRESH'
|
|
26
|
+
};
|
|
20
27
|
function instanceOfProductStorageType(value) {
|
|
21
|
-
|
|
28
|
+
for (var key in exports.ProductStorageType) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(exports.ProductStorageType, key)) {
|
|
30
|
+
if (exports.ProductStorageType[key] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
22
36
|
}
|
|
23
37
|
exports.instanceOfProductStorageType = instanceOfProductStorageType;
|
|
24
38
|
function ProductStorageTypeFromJSON(json) {
|
|
@@ -26,22 +40,10 @@ function ProductStorageTypeFromJSON(json) {
|
|
|
26
40
|
}
|
|
27
41
|
exports.ProductStorageTypeFromJSON = ProductStorageTypeFromJSON;
|
|
28
42
|
function ProductStorageTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
-
|
|
30
|
-
return json;
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
'id': json['id'],
|
|
34
|
-
'name': json['name'],
|
|
35
|
-
};
|
|
43
|
+
return json;
|
|
36
44
|
}
|
|
37
45
|
exports.ProductStorageTypeFromJSONTyped = ProductStorageTypeFromJSONTyped;
|
|
38
46
|
function ProductStorageTypeToJSON(value) {
|
|
39
|
-
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
'id': value['id'],
|
|
44
|
-
'name': value['name'],
|
|
45
|
-
};
|
|
47
|
+
return value;
|
|
46
48
|
}
|
|
47
49
|
exports.ProductStorageTypeToJSON = ProductStorageTypeToJSON;
|
|
@@ -12,26 +12,15 @@
|
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* @export
|
|
15
|
-
* @interface ProductStorageType
|
|
16
15
|
*/
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* Readable name for display
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof ProductStorageType
|
|
28
|
-
*/
|
|
29
|
-
name?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the ProductStorageType interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfProductStorageType(value: object): value is ProductStorageType;
|
|
16
|
+
export declare const ProductStorageType: {
|
|
17
|
+
readonly FREE: "FREE";
|
|
18
|
+
readonly FRIDGE: "FRIDGE";
|
|
19
|
+
readonly FREEZER: "FREEZER";
|
|
20
|
+
readonly FRESH: "FRESH";
|
|
21
|
+
};
|
|
22
|
+
export declare type ProductStorageType = typeof ProductStorageType[keyof typeof ProductStorageType];
|
|
23
|
+
export declare function instanceOfProductStorageType(value: any): boolean;
|
|
35
24
|
export declare function ProductStorageTypeFromJSON(json: any): ProductStorageType;
|
|
36
25
|
export declare function ProductStorageTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductStorageType;
|
|
37
26
|
export declare function ProductStorageTypeToJSON(value?: ProductStorageType | null): any;
|
|
@@ -13,12 +13,26 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = void 0;
|
|
16
|
+
exports.ProductStorageTypeToJSON = exports.ProductStorageTypeFromJSONTyped = exports.ProductStorageTypeFromJSON = exports.instanceOfProductStorageType = exports.ProductStorageType = void 0;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
*
|
|
19
|
+
* @export
|
|
19
20
|
*/
|
|
21
|
+
exports.ProductStorageType = {
|
|
22
|
+
FREE: 'FREE',
|
|
23
|
+
FRIDGE: 'FRIDGE',
|
|
24
|
+
FREEZER: 'FREEZER',
|
|
25
|
+
FRESH: 'FRESH'
|
|
26
|
+
};
|
|
20
27
|
function instanceOfProductStorageType(value) {
|
|
21
|
-
|
|
28
|
+
for (var key in exports.ProductStorageType) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(exports.ProductStorageType, key)) {
|
|
30
|
+
if (exports.ProductStorageType[key] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
22
36
|
}
|
|
23
37
|
exports.instanceOfProductStorageType = instanceOfProductStorageType;
|
|
24
38
|
function ProductStorageTypeFromJSON(json) {
|
|
@@ -26,22 +40,10 @@ function ProductStorageTypeFromJSON(json) {
|
|
|
26
40
|
}
|
|
27
41
|
exports.ProductStorageTypeFromJSON = ProductStorageTypeFromJSON;
|
|
28
42
|
function ProductStorageTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
-
|
|
30
|
-
return json;
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
'id': json['id'],
|
|
34
|
-
'name': json['name'],
|
|
35
|
-
};
|
|
43
|
+
return json;
|
|
36
44
|
}
|
|
37
45
|
exports.ProductStorageTypeFromJSONTyped = ProductStorageTypeFromJSONTyped;
|
|
38
46
|
function ProductStorageTypeToJSON(value) {
|
|
39
|
-
|
|
40
|
-
return value;
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
'id': value['id'],
|
|
44
|
-
'name': value['name'],
|
|
45
|
-
};
|
|
47
|
+
return value;
|
|
46
48
|
}
|
|
47
49
|
exports.ProductStorageTypeToJSON = ProductStorageTypeToJSON;
|
package/package.json
CHANGED
|
@@ -14,9 +14,6 @@ import type { ProductSecondaryType, ProductStorageType, ProductType } from '../m
|
|
|
14
14
|
export interface GetProductSecondaryTypeRequest {
|
|
15
15
|
secondaryTypeId: string;
|
|
16
16
|
}
|
|
17
|
-
export interface GetProductStorageTypeRequest {
|
|
18
|
-
productStorageTypeId: string;
|
|
19
|
-
}
|
|
20
17
|
export interface GetProductTypeRequest {
|
|
21
18
|
typeId: string;
|
|
22
19
|
}
|
|
@@ -40,14 +37,6 @@ export declare class SearchProductMetadataApi extends runtime.BaseAPI {
|
|
|
40
37
|
* Get product secondary types
|
|
41
38
|
*/
|
|
42
39
|
getProductSecondaryTypes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ProductSecondaryType> | runtime.BlobWithMeta>;
|
|
43
|
-
/**
|
|
44
|
-
* Get product storage type
|
|
45
|
-
*/
|
|
46
|
-
getProductStorageTypeRaw(requestParameters: GetProductStorageTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ProductStorageType | runtime.BlobWithMeta>>;
|
|
47
|
-
/**
|
|
48
|
-
* Get product storage type
|
|
49
|
-
*/
|
|
50
|
-
getProductStorageType(requestParameters: GetProductStorageTypeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProductStorageType | runtime.BlobWithMeta>;
|
|
51
40
|
/**
|
|
52
41
|
* Get storage types relatives to a product
|
|
53
42
|
*/
|
|
@@ -230,91 +230,12 @@ var SearchProductMetadataApi = /** @class */ (function (_super) {
|
|
|
230
230
|
});
|
|
231
231
|
});
|
|
232
232
|
};
|
|
233
|
-
/**
|
|
234
|
-
* Get product storage type
|
|
235
|
-
*/
|
|
236
|
-
SearchProductMetadataApi.prototype.getProductStorageTypeRaw = function (requestParameters, initOverrides) {
|
|
237
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
238
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_3;
|
|
239
|
-
return __generator(this, function (_c) {
|
|
240
|
-
switch (_c.label) {
|
|
241
|
-
case 0:
|
|
242
|
-
if (requestParameters['productStorageTypeId'] == null) {
|
|
243
|
-
throw new runtime.RequiredError('productStorageTypeId', 'Required parameter "productStorageTypeId" was null or undefined when calling getProductStorageType().');
|
|
244
|
-
}
|
|
245
|
-
queryParameters = {};
|
|
246
|
-
headerParameters = {};
|
|
247
|
-
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
248
|
-
_a = headerParameters;
|
|
249
|
-
_b = "x-api-key";
|
|
250
|
-
return [4 /*yield*/, this.configuration.apiKey("x-api-key")];
|
|
251
|
-
case 1:
|
|
252
|
-
_a[_b] = _c.sent(); // apiKeyAuth authentication
|
|
253
|
-
_c.label = 2;
|
|
254
|
-
case 2:
|
|
255
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
256
|
-
token = this.configuration.accessToken;
|
|
257
|
-
return [4 /*yield*/, token("bearerAuth", [])];
|
|
258
|
-
case 3:
|
|
259
|
-
tokenString = _c.sent();
|
|
260
|
-
if (tokenString) {
|
|
261
|
-
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
262
|
-
}
|
|
263
|
-
_c.label = 4;
|
|
264
|
-
case 4:
|
|
265
|
-
_c.trys.push([4, 6, , 7]);
|
|
266
|
-
return [4 /*yield*/, this.request({
|
|
267
|
-
path: "/products/storage-types/{productStorageTypeId}".replace("{".concat("productStorageTypeId", "}"), encodeURIComponent(String(requestParameters['productStorageTypeId']))),
|
|
268
|
-
method: 'GET',
|
|
269
|
-
headers: headerParameters,
|
|
270
|
-
query: queryParameters,
|
|
271
|
-
}, initOverrides)];
|
|
272
|
-
case 5:
|
|
273
|
-
response = _c.sent();
|
|
274
|
-
contentType = response.headers.get("content-type");
|
|
275
|
-
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
276
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ProductStorageTypeFromJSON)(jsonValue); })];
|
|
277
|
-
}
|
|
278
|
-
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
279
|
-
return [2 /*return*/, new runtime.TextApiResponse(response)];
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
// TODO : Better handling of others application types
|
|
283
|
-
return [2 /*return*/, new runtime.BlobWithMetaApiResponse(response)];
|
|
284
|
-
}
|
|
285
|
-
return [3 /*break*/, 7];
|
|
286
|
-
case 6:
|
|
287
|
-
response_3 = _c.sent();
|
|
288
|
-
console.debug(response_3);
|
|
289
|
-
throw response_3;
|
|
290
|
-
case 7: return [2 /*return*/];
|
|
291
|
-
}
|
|
292
|
-
});
|
|
293
|
-
});
|
|
294
|
-
};
|
|
295
|
-
/**
|
|
296
|
-
* Get product storage type
|
|
297
|
-
*/
|
|
298
|
-
SearchProductMetadataApi.prototype.getProductStorageType = function (requestParameters, initOverrides) {
|
|
299
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
300
|
-
var response;
|
|
301
|
-
return __generator(this, function (_a) {
|
|
302
|
-
switch (_a.label) {
|
|
303
|
-
case 0: return [4 /*yield*/, this.getProductStorageTypeRaw(requestParameters, initOverrides)];
|
|
304
|
-
case 1:
|
|
305
|
-
response = _a.sent();
|
|
306
|
-
return [4 /*yield*/, response.value()];
|
|
307
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
});
|
|
311
|
-
};
|
|
312
233
|
/**
|
|
313
234
|
* Get storage types relatives to a product
|
|
314
235
|
*/
|
|
315
236
|
SearchProductMetadataApi.prototype.getProductStorageTypesRaw = function (initOverrides) {
|
|
316
237
|
return __awaiter(this, void 0, void 0, function () {
|
|
317
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
238
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_3;
|
|
318
239
|
return __generator(this, function (_c) {
|
|
319
240
|
switch (_c.label) {
|
|
320
241
|
case 0:
|
|
@@ -360,9 +281,9 @@ var SearchProductMetadataApi = /** @class */ (function (_super) {
|
|
|
360
281
|
}
|
|
361
282
|
return [3 /*break*/, 7];
|
|
362
283
|
case 6:
|
|
363
|
-
|
|
364
|
-
console.debug(
|
|
365
|
-
throw
|
|
284
|
+
response_3 = _c.sent();
|
|
285
|
+
console.debug(response_3);
|
|
286
|
+
throw response_3;
|
|
366
287
|
case 7: return [2 /*return*/];
|
|
367
288
|
}
|
|
368
289
|
});
|
|
@@ -390,7 +311,7 @@ var SearchProductMetadataApi = /** @class */ (function (_super) {
|
|
|
390
311
|
*/
|
|
391
312
|
SearchProductMetadataApi.prototype.getProductTypeRaw = function (requestParameters, initOverrides) {
|
|
392
313
|
return __awaiter(this, void 0, void 0, function () {
|
|
393
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
314
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_4;
|
|
394
315
|
return __generator(this, function (_c) {
|
|
395
316
|
switch (_c.label) {
|
|
396
317
|
case 0:
|
|
@@ -439,9 +360,9 @@ var SearchProductMetadataApi = /** @class */ (function (_super) {
|
|
|
439
360
|
}
|
|
440
361
|
return [3 /*break*/, 7];
|
|
441
362
|
case 6:
|
|
442
|
-
|
|
443
|
-
console.debug(
|
|
444
|
-
throw
|
|
363
|
+
response_4 = _c.sent();
|
|
364
|
+
console.debug(response_4);
|
|
365
|
+
throw response_4;
|
|
445
366
|
case 7: return [2 /*return*/];
|
|
446
367
|
}
|
|
447
368
|
});
|
|
@@ -469,7 +390,7 @@ var SearchProductMetadataApi = /** @class */ (function (_super) {
|
|
|
469
390
|
*/
|
|
470
391
|
SearchProductMetadataApi.prototype.getProductTypesRaw = function (initOverrides) {
|
|
471
392
|
return __awaiter(this, void 0, void 0, function () {
|
|
472
|
-
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType,
|
|
393
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response, contentType, response_5;
|
|
473
394
|
return __generator(this, function (_c) {
|
|
474
395
|
switch (_c.label) {
|
|
475
396
|
case 0:
|
|
@@ -515,9 +436,9 @@ var SearchProductMetadataApi = /** @class */ (function (_super) {
|
|
|
515
436
|
}
|
|
516
437
|
return [3 /*break*/, 7];
|
|
517
438
|
case 6:
|
|
518
|
-
|
|
519
|
-
console.debug(
|
|
520
|
-
throw
|
|
439
|
+
response_5 = _c.sent();
|
|
440
|
+
console.debug(response_5);
|
|
441
|
+
throw response_5;
|
|
521
442
|
case 7: return [2 /*return*/];
|
|
522
443
|
}
|
|
523
444
|
});
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ProductStorageType } from './ProductStorageType';
|
|
12
13
|
import type { ProductMarketStatus } from './ProductMarketStatus';
|
|
13
14
|
import type { ProductStatus } from './ProductStatus';
|
|
14
15
|
import type { Barcodes } from './Barcodes';
|
|
@@ -92,11 +93,11 @@ export interface ProductCreationOrUpdateParameters {
|
|
|
92
93
|
*/
|
|
93
94
|
narcoticPrescription?: boolean | null;
|
|
94
95
|
/**
|
|
95
|
-
*
|
|
96
|
-
* @type {
|
|
96
|
+
*
|
|
97
|
+
* @type {ProductStorageType}
|
|
97
98
|
* @memberof ProductCreationOrUpdateParameters
|
|
98
99
|
*/
|
|
99
|
-
|
|
100
|
+
storageType?: ProductStorageType | null;
|
|
100
101
|
/**
|
|
101
102
|
*
|
|
102
103
|
* @type {ProductMarketStatus}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
16
|
exports.ProductCreationOrUpdateParametersToJSON = exports.ProductCreationOrUpdateParametersFromJSONTyped = exports.ProductCreationOrUpdateParametersFromJSON = exports.instanceOfProductCreationOrUpdateParameters = void 0;
|
|
17
|
+
var ProductStorageType_1 = require("./ProductStorageType");
|
|
17
18
|
var ProductMarketStatus_1 = require("./ProductMarketStatus");
|
|
18
19
|
var ProductStatus_1 = require("./ProductStatus");
|
|
19
20
|
var Barcodes_1 = require("./Barcodes");
|
|
@@ -46,7 +47,7 @@ function ProductCreationOrUpdateParametersFromJSONTyped(json, ignoreDiscriminato
|
|
|
46
47
|
'laboratoryId': json['laboratoryId'],
|
|
47
48
|
'vatId': json['vatId'],
|
|
48
49
|
'narcoticPrescription': json['narcoticPrescription'],
|
|
49
|
-
'
|
|
50
|
+
'storageType': (json['storageType'] === null || json['storageType'] === undefined) ? json['storageType'] : (0, ProductStorageType_1.ProductStorageTypeFromJSON)(json['storageType']),
|
|
50
51
|
'marketStatus': (json['marketStatus'] === null || json['marketStatus'] === undefined) ? json['marketStatus'] : (0, ProductMarketStatus_1.ProductMarketStatusFromJSON)(json['marketStatus']),
|
|
51
52
|
'status': (json['status'] === null || json['status'] === undefined) ? json['status'] : (0, ProductStatus_1.ProductStatusFromJSON)(json['status']),
|
|
52
53
|
'dispensationPlace': (json['dispensationPlace'] === null || json['dispensationPlace'] === undefined) ? json['dispensationPlace'] : (0, ProductDispensationPlace_1.ProductDispensationPlaceFromJSON)(json['dispensationPlace']),
|
|
@@ -73,7 +74,7 @@ function ProductCreationOrUpdateParametersToJSON(value) {
|
|
|
73
74
|
'laboratoryId': value['laboratoryId'],
|
|
74
75
|
'vatId': value['vatId'],
|
|
75
76
|
'narcoticPrescription': value['narcoticPrescription'],
|
|
76
|
-
'
|
|
77
|
+
'storageType': (0, ProductStorageType_1.ProductStorageTypeToJSON)(value['storageType']),
|
|
77
78
|
'marketStatus': (0, ProductMarketStatus_1.ProductMarketStatusToJSON)(value['marketStatus']),
|
|
78
79
|
'status': (0, ProductStatus_1.ProductStatusToJSON)(value['status']),
|
|
79
80
|
'dispensationPlace': (0, ProductDispensationPlace_1.ProductDispensationPlaceToJSON)(value['dispensationPlace']),
|
|
@@ -12,26 +12,15 @@
|
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* @export
|
|
15
|
-
* @interface ProductStorageType
|
|
16
15
|
*/
|
|
17
|
-
export
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
* Readable name for display
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof ProductStorageType
|
|
28
|
-
*/
|
|
29
|
-
name?: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the ProductStorageType interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfProductStorageType(value: object): value is ProductStorageType;
|
|
16
|
+
export declare const ProductStorageType: {
|
|
17
|
+
readonly FREE: "FREE";
|
|
18
|
+
readonly FRIDGE: "FRIDGE";
|
|
19
|
+
readonly FREEZER: "FREEZER";
|
|
20
|
+
readonly FRESH: "FRESH";
|
|
21
|
+
};
|
|
22
|
+
export declare type ProductStorageType = typeof ProductStorageType[keyof typeof ProductStorageType];
|
|
23
|
+
export declare function instanceOfProductStorageType(value: any): boolean;
|
|
35
24
|
export declare function ProductStorageTypeFromJSON(json: any): ProductStorageType;
|
|
36
25
|
export declare function ProductStorageTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductStorageType;
|
|
37
26
|
export declare function ProductStorageTypeToJSON(value?: ProductStorageType | null): any;
|