@djust-b2b/djust-front-sdk 1.29.0 → 1.29.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.
package/lib/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const DjustSDK: {
|
|
|
6
6
|
createOrderLogisticIncident({ logisticOrderId, idType, customField, reasonCode, }: import("./services/incident/definitions").createOrderLogisticIncidentParameters): Promise<import("./services/incident/definitions").createOrderLogisticIncidentResponse>;
|
|
7
7
|
createOrderLogisticLineIncident({ logisticOrderId, idType, customFieldIdType, orderLines, reasonCode, }: import("./services/incident/definitions").createOrderLogisticLineIncidentParameters): Promise<import("./services/incident/definitions").createOrderLogisticLineIncidentResponse>;
|
|
8
8
|
createOrderLogisticIncidentThread({ logisticOrderId, incidentId, idType, customField, message, name, reasonCode, }: import("./services/incident/definitions").createOrderLogisticIncidentThreadParameters): Promise<import("./services/incident/definitions").createOrderLogisticIncidentThreadResponse>;
|
|
9
|
-
getCommercialOrders({ locale, nbPreviewLines, }: import("./interfaces").GetCommercialOrdersParameters): Promise<import("./interfaces").GetCommercialOrdersResponse>;
|
|
9
|
+
getCommercialOrders({ locale, nbPreviewLines, page, size, sort, connectedUserOnly, customerAccountIds, isValidated, }: import("./interfaces").GetCommercialOrdersParameters): Promise<import("./interfaces").GetCommercialOrdersResponse>;
|
|
10
10
|
createCommercialOrder({ nbPreviewLines, channel, customFields, locale, origin, originId, paymentInfo, }: import("./interfaces").CreateCommercialOrderParameters): Promise<import("./interfaces").CreateCommercialOrderResponse>;
|
|
11
11
|
createCommercialOrderV2({ customFieldIdType, customFields, }: import("./interfaces").CreateCommercialOrderV2Parameters): Promise<import("./interfaces").CreateCommercialOrderV2Response>;
|
|
12
12
|
getCommercialOrder({ orderId, idType, locale, nbPreviewLines, }: import("./interfaces").GetCommercialOrderParameters): Promise<import("./interfaces").GetCommercialOrderResponse>;
|
|
@@ -9,6 +9,12 @@ import { PaymentInfoRequest, PaymentOption, PaymentProvider } from "../../interf
|
|
|
9
9
|
export interface GetCommercialOrdersParameters {
|
|
10
10
|
locale: string;
|
|
11
11
|
nbPreviewLines?: number;
|
|
12
|
+
page?: number;
|
|
13
|
+
size?: number;
|
|
14
|
+
sort?: string[];
|
|
15
|
+
connectedUserOnly?: boolean;
|
|
16
|
+
customerAccountIds?: string[];
|
|
17
|
+
isValidated?: boolean;
|
|
12
18
|
}
|
|
13
19
|
export interface GetOrderCommercialLinesParameters {
|
|
14
20
|
commercialOrderId: string;
|
|
@@ -10,10 +10,16 @@ import { CreateCommercialOrderCardRegistrationParameters, CreateCommercialOrderC
|
|
|
10
10
|
*
|
|
11
11
|
* 🛠 **Endpoint**: `GET /v1/shop/commercial-orders [ORDER-560]`
|
|
12
12
|
*
|
|
13
|
-
* | Parameter
|
|
14
|
-
*
|
|
15
|
-
* | `locale`
|
|
16
|
-
* | `nbPreviewLines`
|
|
13
|
+
* | Parameter | Type | Required | Description |
|
|
14
|
+
* |------------------------|---------------------|----------|------------------------------------------|
|
|
15
|
+
* | `locale` | `string` | ✅ | The locale in which to return the commercial order. |
|
|
16
|
+
* | `nbPreviewLines` | `number` | ❌ | The number of lines to display in the commercial order. |
|
|
17
|
+
* | `page` | `number` | ❌ | The page number to retrieve. |
|
|
18
|
+
* | `size` | `number` | ❌ | The number of items per page. |
|
|
19
|
+
* | `sort` | `string[]` | ❌ | The sort to apply to the results. |
|
|
20
|
+
* | `connectedUserOnly` | `boolean` | ❌ | Filter to show only orders for the connected user. |
|
|
21
|
+
* | `customerAccountIds` | `string[]` | ❌ | Filter by customer account IDs. |
|
|
22
|
+
* | `isValidated` | `boolean` | ❌ | Filter by validation status. |
|
|
17
23
|
*
|
|
18
24
|
* 📤 **Returns**:
|
|
19
25
|
* A `Promise` resolving to a single `GetCommercialOrdersResponse` object representing the page of commercial orders.
|
|
@@ -22,6 +28,10 @@ import { CreateCommercialOrderCardRegistrationParameters, CreateCommercialOrderC
|
|
|
22
28
|
* ```ts
|
|
23
29
|
* const orders = await getCommercialOrders({
|
|
24
30
|
* locale: "fr",
|
|
31
|
+
* page: 0,
|
|
32
|
+
* size: 20,
|
|
33
|
+
* sort: ["createdAt,desc"],
|
|
34
|
+
* connectedUserOnly: true
|
|
25
35
|
* });
|
|
26
36
|
* ```
|
|
27
37
|
*
|
|
@@ -29,7 +39,7 @@ import { CreateCommercialOrderCardRegistrationParameters, CreateCommercialOrderC
|
|
|
29
39
|
* @throws {Error} If `locale` is missing.
|
|
30
40
|
* @returns {Promise<GetCommercialOrdersResponse>} A promise resolving to the response containing page object.
|
|
31
41
|
*/
|
|
32
|
-
export declare function getCommercialOrders({ locale, nbPreviewLines, }: GetCommercialOrdersParameters): Promise<GetCommercialOrdersResponse>;
|
|
42
|
+
export declare function getCommercialOrders({ locale, nbPreviewLines, page, size, sort, connectedUserOnly, customerAccountIds, isValidated, }: GetCommercialOrdersParameters): Promise<GetCommercialOrdersResponse>;
|
|
33
43
|
/**
|
|
34
44
|
* 🚚 Creates commercial orders.
|
|
35
45
|
*
|
|
@@ -32,10 +32,16 @@ const fetch_instance_1 = require("../../settings/fetch-instance");
|
|
|
32
32
|
*
|
|
33
33
|
* 🛠 **Endpoint**: `GET /v1/shop/commercial-orders [ORDER-560]`
|
|
34
34
|
*
|
|
35
|
-
* | Parameter
|
|
36
|
-
*
|
|
37
|
-
* | `locale`
|
|
38
|
-
* | `nbPreviewLines`
|
|
35
|
+
* | Parameter | Type | Required | Description |
|
|
36
|
+
* |------------------------|---------------------|----------|------------------------------------------|
|
|
37
|
+
* | `locale` | `string` | ✅ | The locale in which to return the commercial order. |
|
|
38
|
+
* | `nbPreviewLines` | `number` | ❌ | The number of lines to display in the commercial order. |
|
|
39
|
+
* | `page` | `number` | ❌ | The page number to retrieve. |
|
|
40
|
+
* | `size` | `number` | ❌ | The number of items per page. |
|
|
41
|
+
* | `sort` | `string[]` | ❌ | The sort to apply to the results. |
|
|
42
|
+
* | `connectedUserOnly` | `boolean` | ❌ | Filter to show only orders for the connected user. |
|
|
43
|
+
* | `customerAccountIds` | `string[]` | ❌ | Filter by customer account IDs. |
|
|
44
|
+
* | `isValidated` | `boolean` | ❌ | Filter by validation status. |
|
|
39
45
|
*
|
|
40
46
|
* 📤 **Returns**:
|
|
41
47
|
* A `Promise` resolving to a single `GetCommercialOrdersResponse` object representing the page of commercial orders.
|
|
@@ -44,6 +50,10 @@ const fetch_instance_1 = require("../../settings/fetch-instance");
|
|
|
44
50
|
* ```ts
|
|
45
51
|
* const orders = await getCommercialOrders({
|
|
46
52
|
* locale: "fr",
|
|
53
|
+
* page: 0,
|
|
54
|
+
* size: 20,
|
|
55
|
+
* sort: ["createdAt,desc"],
|
|
56
|
+
* connectedUserOnly: true
|
|
47
57
|
* });
|
|
48
58
|
* ```
|
|
49
59
|
*
|
|
@@ -51,7 +61,7 @@ const fetch_instance_1 = require("../../settings/fetch-instance");
|
|
|
51
61
|
* @throws {Error} If `locale` is missing.
|
|
52
62
|
* @returns {Promise<GetCommercialOrdersResponse>} A promise resolving to the response containing page object.
|
|
53
63
|
*/
|
|
54
|
-
async function getCommercialOrders({ locale, nbPreviewLines, }) {
|
|
64
|
+
async function getCommercialOrders({ locale, nbPreviewLines, page, size, sort, connectedUserOnly, customerAccountIds, isValidated, }) {
|
|
55
65
|
(0, parameters_validation_1.required)({ locale });
|
|
56
66
|
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
57
67
|
method: "GET",
|
|
@@ -59,6 +69,12 @@ async function getCommercialOrders({ locale, nbPreviewLines, }) {
|
|
|
59
69
|
params: {
|
|
60
70
|
locale,
|
|
61
71
|
nbPreviewLines,
|
|
72
|
+
page,
|
|
73
|
+
size,
|
|
74
|
+
sort,
|
|
75
|
+
connectedUserOnly,
|
|
76
|
+
customerAccountIds,
|
|
77
|
+
isValidated,
|
|
62
78
|
},
|
|
63
79
|
});
|
|
64
80
|
return data;
|