@djust-b2b/djust-front-sdk 1.12.0 → 1.14.0
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/lib/index.d.ts +13 -8
- package/lib/interfaces/models/customer-user.d.ts +6 -0
- package/lib/interfaces/models/offer.d.ts +1 -1
- package/lib/interfaces/models/order.d.ts +96 -0
- package/lib/interfaces/models/quote.d.ts +13 -1
- package/lib/services/auth/index.d.ts +124 -10
- package/lib/services/auth/index.js +124 -10
- package/lib/services/commercial-order/definitions.d.ts +20 -3
- package/lib/services/commercial-order/index.d.ts +361 -15
- package/lib/services/commercial-order/index.js +397 -33
- package/lib/services/customer-account/index.d.ts +1781 -23
- package/lib/services/customer-account/index.js +1780 -45
- package/lib/services/customer-user/definitions.d.ts +3 -4
- package/lib/services/customer-user/index.d.ts +263 -14
- package/lib/services/customer-user/index.js +264 -20
- package/lib/services/logistic-order/definitions.d.ts +16 -1
- package/lib/services/logistic-order/index.d.ts +799 -28
- package/lib/services/logistic-order/index.js +823 -28
- package/lib/services/navigation-category/index.d.ts +122 -3
- package/lib/services/navigation-category/index.js +122 -3
- package/lib/services/quote/definitions.d.ts +25 -1
- package/lib/services/quote/index.d.ts +349 -10
- package/lib/services/quote/index.js +382 -11
- package/lib/services/supplier/definitions.d.ts +3 -0
- package/lib/services/supplier/index.d.ts +92 -4
- package/lib/services/supplier/index.js +96 -5
- package/package.json +1 -1
|
@@ -1,13 +1,132 @@
|
|
|
1
1
|
import { GetNavigationCategoriesParameters, GetNavigationCategoriesResponse, GetNavigationCategoryBreadcrumbsParameters, GetNavigationCategoryBreadcrumbsResponse, GetNavigationCategoryParameters, GetNavigationCategoryResponse } from "./definitions";
|
|
2
2
|
/**
|
|
3
|
-
* Get all navigation categories
|
|
3
|
+
* ## Get all navigation categories
|
|
4
|
+
* ### APICODE(NAVCAT-550)
|
|
5
|
+
* @returns {Promise<GetNavigationCategoriesResponse>} - The response with the navigation categories
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ### input
|
|
9
|
+
* ```typescript
|
|
10
|
+
* const response = await getNavigationCategories({ locale: 'string' });
|
|
11
|
+
* ```
|
|
12
|
+
* ### output
|
|
13
|
+
* Response - <strong style={{ color: 'green' }}>200</strong> - OK
|
|
14
|
+
* ```json
|
|
15
|
+
* [
|
|
16
|
+
* {
|
|
17
|
+
* "active": true,
|
|
18
|
+
* "childrenCategories": [
|
|
19
|
+
* string
|
|
20
|
+
* ],
|
|
21
|
+
* "customFieldValues": [
|
|
22
|
+
* {
|
|
23
|
+
* "customField": {
|
|
24
|
+
* "externalId": "string",
|
|
25
|
+
* "id": "string",
|
|
26
|
+
* "name": {
|
|
27
|
+
* "additionalProp1": "string",
|
|
28
|
+
* "additionalProp2": "string",
|
|
29
|
+
* "additionalProp3": "string"
|
|
30
|
+
* },
|
|
31
|
+
* "type": "LONG_TEXT"
|
|
32
|
+
* },
|
|
33
|
+
* "value": {}
|
|
34
|
+
* }
|
|
35
|
+
* ],
|
|
36
|
+
* "externalId": "string",
|
|
37
|
+
* "id": "string",
|
|
38
|
+
* "name": "string"
|
|
39
|
+
* }
|
|
40
|
+
* ]
|
|
4
41
|
*/
|
|
5
42
|
export declare function getNavigationCategories({ locale, }: GetNavigationCategoriesParameters): Promise<GetNavigationCategoriesResponse>;
|
|
6
43
|
/**
|
|
7
|
-
* Get navigation category
|
|
44
|
+
* ## Get navigation category
|
|
45
|
+
* ### APICODE(NAVCAT-501)
|
|
46
|
+
* @param {GetNavigationCategoryParameters} params - The parameters for the function
|
|
47
|
+
* #### locale - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
48
|
+
* #### idType - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
49
|
+
* #### navigationCategoryId - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
50
|
+
*
|
|
51
|
+
* @returns {Promise<GetNavigationCategoryResponse>} - The response with the navigation category
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ### input
|
|
55
|
+
* ```typescript
|
|
56
|
+
* const response = await getNavigationCategory({ locale: 'string', idType: 'string', navigationCategoryId: 'string' });
|
|
57
|
+
* ```
|
|
58
|
+
* ### output
|
|
59
|
+
* Response - <strong style={{ color: 'green' }}>200</strong> - OK
|
|
60
|
+
* ```json
|
|
61
|
+
* {
|
|
62
|
+
* "active": true,
|
|
63
|
+
* "childrenCategories": [
|
|
64
|
+
* string
|
|
65
|
+
* ],
|
|
66
|
+
* "customFieldValues": [
|
|
67
|
+
* {
|
|
68
|
+
* "customField": {
|
|
69
|
+
* "externalId": "string",
|
|
70
|
+
* "id": "string",
|
|
71
|
+
* "name": {
|
|
72
|
+
* "additionalProp1": "string",
|
|
73
|
+
* "additionalProp2": "string",
|
|
74
|
+
* "additionalProp3": "string"
|
|
75
|
+
* },
|
|
76
|
+
* "type": "LONG_TEXT"
|
|
77
|
+
* },
|
|
78
|
+
* "value": {}
|
|
79
|
+
* }
|
|
80
|
+
* ],
|
|
81
|
+
* "externalId": "string",
|
|
82
|
+
* "id": "string",
|
|
83
|
+
* "name": "string",
|
|
84
|
+
* }
|
|
8
85
|
*/
|
|
9
86
|
export declare function getNavigationCategory({ locale, idType, navigationCategoryId, }: GetNavigationCategoryParameters): Promise<GetNavigationCategoryResponse>;
|
|
10
87
|
/**
|
|
11
|
-
* Get navigation category breadcrumbs
|
|
88
|
+
* ## Get navigation category breadcrumbs
|
|
89
|
+
* ### APICODE(NAVCAT-502)
|
|
90
|
+
* @param {GetNavigationCategoryBreadcrumbsParameters} params - The parameters for the function
|
|
91
|
+
* #### locale - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
92
|
+
* #### idType - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
93
|
+
* #### navigationCategoryId - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
94
|
+
*
|
|
95
|
+
* @returns {Promise<GetNavigationCategoryBreadcrumbsResponse>} - The response with the navigation category breadcrumbs
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ### input
|
|
99
|
+
* ```typescript
|
|
100
|
+
* const response = await getNavigationCategoryBreadcrumbs({ locale: 'string', idType: 'string', navigationCategoryId: 'string' });
|
|
101
|
+
* ```
|
|
102
|
+
* ### output
|
|
103
|
+
* Response - <strong style={{ color: 'green' }}>200</strong> - OK
|
|
104
|
+
* ```json
|
|
105
|
+
* [
|
|
106
|
+
* {
|
|
107
|
+
* "active": true,
|
|
108
|
+
* "childrenCategories": [
|
|
109
|
+
* string
|
|
110
|
+
* ],
|
|
111
|
+
* "customFieldValues": [
|
|
112
|
+
* {
|
|
113
|
+
* "customField": {
|
|
114
|
+
* "externalId": "string",
|
|
115
|
+
* "id": "string",
|
|
116
|
+
* "name": {
|
|
117
|
+
* "additionalProp1": "string",
|
|
118
|
+
* "additionalProp2": "string",
|
|
119
|
+
* "additionalProp3": "string"
|
|
120
|
+
* },
|
|
121
|
+
* "type": "LONG_TEXT"
|
|
122
|
+
* },
|
|
123
|
+
* "value": {}
|
|
124
|
+
* }
|
|
125
|
+
* ],
|
|
126
|
+
* "externalId": "string",
|
|
127
|
+
* "id": "string",
|
|
128
|
+
* "name": "string",
|
|
129
|
+
* "parent": "string"
|
|
130
|
+
* }
|
|
12
131
|
*/
|
|
13
132
|
export declare function getNavigationCategoryBreadcrumbs({ locale, idType, navigationCategoryId, }: GetNavigationCategoryBreadcrumbsParameters): Promise<GetNavigationCategoryBreadcrumbsResponse>;
|
|
@@ -6,7 +6,44 @@ exports.getNavigationCategoryBreadcrumbs = getNavigationCategoryBreadcrumbs;
|
|
|
6
6
|
const parameters_validation_1 = require("../../helpers/parameters-validation");
|
|
7
7
|
const fetch_instance_1 = require("../../settings/fetch-instance");
|
|
8
8
|
/**
|
|
9
|
-
* Get all navigation categories
|
|
9
|
+
* ## Get all navigation categories
|
|
10
|
+
* ### APICODE(NAVCAT-550)
|
|
11
|
+
* @returns {Promise<GetNavigationCategoriesResponse>} - The response with the navigation categories
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ### input
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const response = await getNavigationCategories({ locale: 'string' });
|
|
17
|
+
* ```
|
|
18
|
+
* ### output
|
|
19
|
+
* Response - <strong style={{ color: 'green' }}>200</strong> - OK
|
|
20
|
+
* ```json
|
|
21
|
+
* [
|
|
22
|
+
* {
|
|
23
|
+
* "active": true,
|
|
24
|
+
* "childrenCategories": [
|
|
25
|
+
* string
|
|
26
|
+
* ],
|
|
27
|
+
* "customFieldValues": [
|
|
28
|
+
* {
|
|
29
|
+
* "customField": {
|
|
30
|
+
* "externalId": "string",
|
|
31
|
+
* "id": "string",
|
|
32
|
+
* "name": {
|
|
33
|
+
* "additionalProp1": "string",
|
|
34
|
+
* "additionalProp2": "string",
|
|
35
|
+
* "additionalProp3": "string"
|
|
36
|
+
* },
|
|
37
|
+
* "type": "LONG_TEXT"
|
|
38
|
+
* },
|
|
39
|
+
* "value": {}
|
|
40
|
+
* }
|
|
41
|
+
* ],
|
|
42
|
+
* "externalId": "string",
|
|
43
|
+
* "id": "string",
|
|
44
|
+
* "name": "string"
|
|
45
|
+
* }
|
|
46
|
+
* ]
|
|
10
47
|
*/
|
|
11
48
|
async function getNavigationCategories({ locale, }) {
|
|
12
49
|
(0, parameters_validation_1.required)({ locale });
|
|
@@ -20,7 +57,47 @@ async function getNavigationCategories({ locale, }) {
|
|
|
20
57
|
return data;
|
|
21
58
|
}
|
|
22
59
|
/**
|
|
23
|
-
* Get navigation category
|
|
60
|
+
* ## Get navigation category
|
|
61
|
+
* ### APICODE(NAVCAT-501)
|
|
62
|
+
* @param {GetNavigationCategoryParameters} params - The parameters for the function
|
|
63
|
+
* #### locale - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
64
|
+
* #### idType - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
65
|
+
* #### navigationCategoryId - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
66
|
+
*
|
|
67
|
+
* @returns {Promise<GetNavigationCategoryResponse>} - The response with the navigation category
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ### input
|
|
71
|
+
* ```typescript
|
|
72
|
+
* const response = await getNavigationCategory({ locale: 'string', idType: 'string', navigationCategoryId: 'string' });
|
|
73
|
+
* ```
|
|
74
|
+
* ### output
|
|
75
|
+
* Response - <strong style={{ color: 'green' }}>200</strong> - OK
|
|
76
|
+
* ```json
|
|
77
|
+
* {
|
|
78
|
+
* "active": true,
|
|
79
|
+
* "childrenCategories": [
|
|
80
|
+
* string
|
|
81
|
+
* ],
|
|
82
|
+
* "customFieldValues": [
|
|
83
|
+
* {
|
|
84
|
+
* "customField": {
|
|
85
|
+
* "externalId": "string",
|
|
86
|
+
* "id": "string",
|
|
87
|
+
* "name": {
|
|
88
|
+
* "additionalProp1": "string",
|
|
89
|
+
* "additionalProp2": "string",
|
|
90
|
+
* "additionalProp3": "string"
|
|
91
|
+
* },
|
|
92
|
+
* "type": "LONG_TEXT"
|
|
93
|
+
* },
|
|
94
|
+
* "value": {}
|
|
95
|
+
* }
|
|
96
|
+
* ],
|
|
97
|
+
* "externalId": "string",
|
|
98
|
+
* "id": "string",
|
|
99
|
+
* "name": "string",
|
|
100
|
+
* }
|
|
24
101
|
*/
|
|
25
102
|
async function getNavigationCategory({ locale, idType, navigationCategoryId, }) {
|
|
26
103
|
(0, parameters_validation_1.required)({ idType, navigationCategoryId });
|
|
@@ -35,7 +112,49 @@ async function getNavigationCategory({ locale, idType, navigationCategoryId, })
|
|
|
35
112
|
return data;
|
|
36
113
|
}
|
|
37
114
|
/**
|
|
38
|
-
* Get navigation category breadcrumbs
|
|
115
|
+
* ## Get navigation category breadcrumbs
|
|
116
|
+
* ### APICODE(NAVCAT-502)
|
|
117
|
+
* @param {GetNavigationCategoryBreadcrumbsParameters} params - The parameters for the function
|
|
118
|
+
* #### locale - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
119
|
+
* #### idType - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
120
|
+
* #### navigationCategoryId - `string` | <strong style={{ color: 'red' }}>required</strong>
|
|
121
|
+
*
|
|
122
|
+
* @returns {Promise<GetNavigationCategoryBreadcrumbsResponse>} - The response with the navigation category breadcrumbs
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* ### input
|
|
126
|
+
* ```typescript
|
|
127
|
+
* const response = await getNavigationCategoryBreadcrumbs({ locale: 'string', idType: 'string', navigationCategoryId: 'string' });
|
|
128
|
+
* ```
|
|
129
|
+
* ### output
|
|
130
|
+
* Response - <strong style={{ color: 'green' }}>200</strong> - OK
|
|
131
|
+
* ```json
|
|
132
|
+
* [
|
|
133
|
+
* {
|
|
134
|
+
* "active": true,
|
|
135
|
+
* "childrenCategories": [
|
|
136
|
+
* string
|
|
137
|
+
* ],
|
|
138
|
+
* "customFieldValues": [
|
|
139
|
+
* {
|
|
140
|
+
* "customField": {
|
|
141
|
+
* "externalId": "string",
|
|
142
|
+
* "id": "string",
|
|
143
|
+
* "name": {
|
|
144
|
+
* "additionalProp1": "string",
|
|
145
|
+
* "additionalProp2": "string",
|
|
146
|
+
* "additionalProp3": "string"
|
|
147
|
+
* },
|
|
148
|
+
* "type": "LONG_TEXT"
|
|
149
|
+
* },
|
|
150
|
+
* "value": {}
|
|
151
|
+
* }
|
|
152
|
+
* ],
|
|
153
|
+
* "externalId": "string",
|
|
154
|
+
* "id": "string",
|
|
155
|
+
* "name": "string",
|
|
156
|
+
* "parent": "string"
|
|
157
|
+
* }
|
|
39
158
|
*/
|
|
40
159
|
async function getNavigationCategoryBreadcrumbs({ locale, idType, navigationCategoryId, }) {
|
|
41
160
|
(0, parameters_validation_1.required)({ idType, navigationCategoryId });
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { MasterQuote, PageMasterQuote, SupplierQuoteDto } from "../../interfaces/models/quote";
|
|
1
|
+
import { MasterQuote, PageMasterQuote, SupplierQuoteDto, SupplierQuoteIdType } from "../../interfaces/models/quote";
|
|
2
|
+
import { OrderCommercialDto } from "../../interfaces/models/order";
|
|
2
3
|
import { PageableParameters } from "../../interfaces/models/common";
|
|
4
|
+
import { CustomFieldValueRequest } from "../../interfaces/models/custom-field";
|
|
3
5
|
/**
|
|
4
6
|
* Request parameters type definitions
|
|
5
7
|
*/
|
|
@@ -46,6 +48,9 @@ export interface CreateSupplierQuotesParameters {
|
|
|
46
48
|
export interface GetSupplierQuoteParameters {
|
|
47
49
|
supplierQuoteId: string;
|
|
48
50
|
}
|
|
51
|
+
export interface AcceptSupplierQuoteParameters {
|
|
52
|
+
supplierQuoteId: string;
|
|
53
|
+
}
|
|
49
54
|
export interface DeclineSupplierQuoteParameters {
|
|
50
55
|
supplierQuoteId: string;
|
|
51
56
|
}
|
|
@@ -54,6 +59,19 @@ export interface PostMessageToSupplierQuoteParameters {
|
|
|
54
59
|
message: string;
|
|
55
60
|
username: string;
|
|
56
61
|
}
|
|
62
|
+
export interface UpdateSupplierQuoteCustomFieldsParameters {
|
|
63
|
+
supplierQuoteId: string;
|
|
64
|
+
customFieldValues: CustomFieldValueRequest[];
|
|
65
|
+
idType: SupplierQuoteIdType;
|
|
66
|
+
}
|
|
67
|
+
export interface InitializeOrderFromSupplierQuoteParameters {
|
|
68
|
+
supplierQuoteId: string;
|
|
69
|
+
nbPreviewLines: number;
|
|
70
|
+
quoteLineIdsAndQuantities: {
|
|
71
|
+
quantity: number;
|
|
72
|
+
quoteLineId: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
57
75
|
/**
|
|
58
76
|
* Response type definitions
|
|
59
77
|
*/
|
|
@@ -71,5 +89,11 @@ export interface GetSupplierQuoteResponse extends SupplierQuoteDto {
|
|
|
71
89
|
}
|
|
72
90
|
export interface DeclineSupplierQuoteResponse extends SupplierQuoteDto {
|
|
73
91
|
}
|
|
92
|
+
export interface AcceptSupplierQuoteResponse extends SupplierQuoteDto {
|
|
93
|
+
}
|
|
74
94
|
export interface PostMessageToSupplierQuoteResponse extends SupplierQuoteDto {
|
|
75
95
|
}
|
|
96
|
+
export interface UpdateSupplierQuoteCustomFieldsResponse extends SupplierQuoteDto {
|
|
97
|
+
}
|
|
98
|
+
export interface InitializeOrderFromSupplierQuoteResponse extends OrderCommercialDto {
|
|
99
|
+
}
|