@djust-b2b/djust-front-sdk 1.15.0 → 1.15.1

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.
@@ -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
- * ## 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' });
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
- * ## 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' });
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
- * ## 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' });
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 });