@djust-b2b/djust-front-sdk 1.15.0 → 1.16.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 +7 -7
- package/lib/services/auth/definitions.requests.d.ts +21 -0
- package/lib/services/auth/definitions.requests.js +2 -0
- package/lib/services/auth/index.d.ts +146 -120
- package/lib/services/auth/index.js +144 -119
- package/lib/services/cart/index.d.ts +185 -254
- package/lib/services/cart/index.js +198 -257
- package/lib/services/custom-field/index.d.ts +55 -100
- package/lib/services/custom-field/index.js +55 -105
- package/lib/services/customer-user/index.d.ts +107 -125
- package/lib/services/customer-user/index.js +107 -125
- package/lib/services/navigation-category/index.d.ts +68 -119
- package/lib/services/navigation-category/index.js +68 -119
- package/lib/services/product/index.d.ts +296 -1687
- package/lib/services/product/index.js +312 -1706
- package/lib/services/product-variant/index.d.ts +53 -160
- package/lib/services/product-variant/index.js +53 -160
- package/package.json +1 -1
|
@@ -6,44 +6,27 @@ 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
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
9
|
+
* 📄 Gets all navigation categories.
|
|
10
|
+
*
|
|
11
|
+
* Retrieves a list of all navigation categories available for the shop.
|
|
12
|
+
*
|
|
13
|
+
* 🛠 **Endpoint**: `GET /v1/shop/navigation-category/online`
|
|
14
|
+
*
|
|
15
|
+
* | Parameter | Type | Required | Description |
|
|
16
|
+
* |-----------------------|-------------------------------|------------|---------------------------------------------------------------|
|
|
17
|
+
* | `locale` | `string` | ✅ | Locale of the navigation categories to fetch. |
|
|
18
|
+
*
|
|
19
|
+
* 📤 **Returns**:
|
|
20
|
+
* A `Promise<GetNavigationCategoriesResponse>` containing a list of navigation categories.
|
|
21
|
+
*
|
|
22
|
+
* 🛠 **Example usage**:
|
|
23
|
+
* ```ts
|
|
24
|
+
* const categories = await getNavigationCategories({
|
|
25
|
+
* locale: 'en-US',
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* console.log(categories);
|
|
17
29
|
* ```
|
|
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
|
-
* ]
|
|
47
30
|
*/
|
|
48
31
|
async function getNavigationCategories({ locale, }) {
|
|
49
32
|
(0, parameters_validation_1.required)({ locale });
|
|
@@ -57,47 +40,31 @@ async function getNavigationCategories({ locale, }) {
|
|
|
57
40
|
return data;
|
|
58
41
|
}
|
|
59
42
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
43
|
+
* 📄 Gets a specific navigation category.
|
|
44
|
+
*
|
|
45
|
+
* Retrieves a specific navigation category based on its ID.
|
|
46
|
+
*
|
|
47
|
+
* 🛠 **Endpoint**: `GET /v1/shop/navigation-category/{navigationCategoryId}`
|
|
48
|
+
*
|
|
49
|
+
* | Parameter | Type | Required | Description |
|
|
50
|
+
* |-----------------------|-------------------------------|------------|---------------------------------------------------------------|
|
|
51
|
+
* | `locale` | `string` | ✅ | Locale of the navigation category. |
|
|
52
|
+
* | `idType` | `string` | ✅ | Type of the ID used to identify the category (e.g., `id`, `slug`). |
|
|
53
|
+
* | `navigationCategoryId`| `string` | ✅ | ID of the navigation category to fetch. |
|
|
54
|
+
*
|
|
55
|
+
* 📤 **Returns**:
|
|
56
|
+
* A `Promise<GetNavigationCategoryResponse>` containing the specific navigation category.
|
|
57
|
+
*
|
|
58
|
+
* 🛠 **Example usage**:
|
|
59
|
+
* ```ts
|
|
60
|
+
* const category = await getNavigationCategory({
|
|
61
|
+
* locale: 'en-US',
|
|
62
|
+
* idType: 'id',
|
|
63
|
+
* navigationCategoryId: '123',
|
|
64
|
+
* });
|
|
65
|
+
*
|
|
66
|
+
* console.log(category);
|
|
73
67
|
* ```
|
|
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
|
-
* }
|
|
101
68
|
*/
|
|
102
69
|
async function getNavigationCategory({ locale, idType, navigationCategoryId, }) {
|
|
103
70
|
(0, parameters_validation_1.required)({ idType, navigationCategoryId });
|
|
@@ -112,49 +79,31 @@ async function getNavigationCategory({ locale, idType, navigationCategoryId, })
|
|
|
112
79
|
return data;
|
|
113
80
|
}
|
|
114
81
|
/**
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
82
|
+
* 📄 Gets breadcrumbs for a specific navigation category.
|
|
83
|
+
*
|
|
84
|
+
* Retrieves the breadcrumb trail for a specific navigation category, showing its hierarchy.
|
|
85
|
+
*
|
|
86
|
+
* 🛠 **Endpoint**: `GET /v1/shop/navigation-category/{navigationCategoryId}/breadcrumb`
|
|
87
|
+
*
|
|
88
|
+
* | Parameter | Type | Required | Description |
|
|
89
|
+
* |-----------------------|-------------------------------|------------|---------------------------------------------------------------|
|
|
90
|
+
* | `locale` | `string` | ✅ | Locale of the navigation category breadcrumbs. |
|
|
91
|
+
* | `idType` | `string` | ✅ | Type of the ID used to identify the category (e.g., `id`, `slug`). |
|
|
92
|
+
* | `navigationCategoryId`| `string` | ✅ | ID of the navigation category to fetch breadcrumbs for. |
|
|
93
|
+
*
|
|
94
|
+
* 📤 **Returns**:
|
|
95
|
+
* A `Promise<GetNavigationCategoryBreadcrumbsResponse>` containing the breadcrumb trail for the navigation category.
|
|
96
|
+
*
|
|
97
|
+
* 🛠 **Example usage**:
|
|
98
|
+
* ```ts
|
|
99
|
+
* const breadcrumbs = await getNavigationCategoryBreadcrumbs({
|
|
100
|
+
* locale: 'en-US',
|
|
101
|
+
* idType: 'id',
|
|
102
|
+
* navigationCategoryId: '123',
|
|
103
|
+
* });
|
|
104
|
+
*
|
|
105
|
+
* console.log(breadcrumbs);
|
|
128
106
|
* ```
|
|
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
|
-
* }
|
|
158
107
|
*/
|
|
159
108
|
async function getNavigationCategoryBreadcrumbs({ locale, idType, navigationCategoryId, }) {
|
|
160
109
|
(0, parameters_validation_1.required)({ idType, navigationCategoryId });
|