@djust-b2b/djust-front-sdk 1.26.2 → 1.27.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
|
@@ -23,6 +23,7 @@ export declare const DjustSDK: {
|
|
|
23
23
|
deleteCommercialOrder(commercialOrderId: string): Promise<void>;
|
|
24
24
|
updateCommercialOrderLines({ commercialOrderId, customFieldIdType, lineIdType, lineType, updateOrderCommercialLines, updateOrderLineIdType, updateOrderLineType, }: import("./interfaces").UpdateCommercialOrderLinesParameters): Promise<import("./interfaces").UpdateCommercialOrderLinesResponse>;
|
|
25
25
|
deleteCommercialOrderLines({ commercialOrderId, body, }: import("./interfaces").DeleteCommercialOrderLinesParameters): Promise<import("./interfaces").DeleteCommercialOrderLinesResponse>;
|
|
26
|
+
punchoutOciCommercialOrder({ tenantConfigurationKey, commercialOrderId, locale, }: import("./interfaces").PunchoutOciCommercialOrderParameters): Promise<any>;
|
|
26
27
|
getLogisticOrders({ approvalIds, locale, logisticStatus, incident, paymentOptions, nbPreviewLines, page, size, sort, }: import("./interfaces").GetLogisticOrdersParameters): Promise<import("./interfaces").GetLogisticOrdersResponse>;
|
|
27
28
|
logisticOrdersPaginatedList({ page, size, sort, nbPreviewLines, accountCustomFieldValueCriteria, approvalIds, connectedUserOnly, creationDateFrom, creationDateTo, customerAccountIds, incident, locale, logisticStatus, offerCustomFieldValueCriteria, orderLogisticCustomFieldValueCriteria, paymentOptions, supplierIds, updateDateFrom, updateDateTo, }: import("./interfaces").GetPaginatedLogisticOrdersParameters): Promise<import("./interfaces").GetPaginatedLogisticOrdersResponse>;
|
|
28
29
|
getLogisticOrderCustomFields({ customFieldIds, page, size, sort, }: import("./interfaces").GetLogisticOrderCustomFieldsParameters): Promise<import("./interfaces").GetLogisticOrderCustomFieldsResponse>;
|
|
@@ -82,6 +82,11 @@ export interface UpdateOrderLogisticCustomFieldParameters {
|
|
|
82
82
|
orderLogisticId: string;
|
|
83
83
|
customFieldsValues: CustomFieldValueRequest[];
|
|
84
84
|
}
|
|
85
|
+
export interface PunchoutOciCommercialOrderParameters {
|
|
86
|
+
tenantConfigurationKey: string;
|
|
87
|
+
commercialOrderId: string;
|
|
88
|
+
locale: string;
|
|
89
|
+
}
|
|
85
90
|
/**
|
|
86
91
|
* Response type definitions
|
|
87
92
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateCommercialOrderCardRegistrationParameters, CreateCommercialOrderCardRegistrationResponse, CreateCommercialOrderParameters, CreateCommercialOrderResponse, CreateCommercialOrderV2Parameters, CreateCommercialOrderV2Response, UpdateCommercialOrderParameters, DeleteCommercialOrderLinesParameters, DeleteCommercialOrderLinesResponse, UpdateCommercialOrderLinesParameters, UpdateCommercialOrderLinesResponse, CreateCommercialOrderPreauthorizationParameters, CreateCommercialOrderPreauthorizationResponse, GetCommercialOrderParameters, GetCommercialOrderPaymentPageUrlParameters, GetCommercialOrderResponse, GetCommercialOrdersParameters, GetCommercialOrdersResponse, SetCommercialOrderStatusAsCreatedParameters, SetCommercialOrderStatusAsOnHoldParameters, UpdateCommercialOrderBillingInformationParameters, UpdateCommercialOrderShippingAddressParameters, UpdateCommercialOrderShippingInformationParameters, UpdateCommercialOrderShippingTypeParameters } from "./definitions";
|
|
1
|
+
import { CreateCommercialOrderCardRegistrationParameters, CreateCommercialOrderCardRegistrationResponse, CreateCommercialOrderParameters, CreateCommercialOrderResponse, CreateCommercialOrderV2Parameters, CreateCommercialOrderV2Response, UpdateCommercialOrderParameters, DeleteCommercialOrderLinesParameters, DeleteCommercialOrderLinesResponse, UpdateCommercialOrderLinesParameters, UpdateCommercialOrderLinesResponse, CreateCommercialOrderPreauthorizationParameters, CreateCommercialOrderPreauthorizationResponse, GetCommercialOrderParameters, GetCommercialOrderPaymentPageUrlParameters, GetCommercialOrderResponse, GetCommercialOrdersParameters, GetCommercialOrdersResponse, SetCommercialOrderStatusAsCreatedParameters, SetCommercialOrderStatusAsOnHoldParameters, UpdateCommercialOrderBillingInformationParameters, UpdateCommercialOrderShippingAddressParameters, UpdateCommercialOrderShippingInformationParameters, UpdateCommercialOrderShippingTypeParameters, PunchoutOciCommercialOrderParameters } from "./definitions";
|
|
2
2
|
/**
|
|
3
3
|
* COMMERCIAL ORDER ENDPOINT
|
|
4
4
|
*/
|
|
@@ -555,3 +555,35 @@ export declare function updateCommercialOrderLines({ commercialOrderId, customFi
|
|
|
555
555
|
* @returns {Promise<DeleteCommercialOrderLinesResponse>} A promise resolving when the commercial order lines are successfully deleted.
|
|
556
556
|
*/
|
|
557
557
|
export declare function deleteCommercialOrderLines({ commercialOrderId, body, }: DeleteCommercialOrderLinesParameters): Promise<DeleteCommercialOrderLinesResponse>;
|
|
558
|
+
/**
|
|
559
|
+
* 🚚 Punchout for specific commercial order.
|
|
560
|
+
*
|
|
561
|
+
* This function retrieves commercial order's data needed for the punchout, with order identified by the `commercialOrderId`.
|
|
562
|
+
* This `commercialOrderId` parameter is required and validated before the request is executed.
|
|
563
|
+
*
|
|
564
|
+
* 🛠 **Endpoint**: `GET /punchout/oci/${tenantConfigurationKey}/commercial-orders/${commercialOrderId}` [ORDER-150]
|
|
565
|
+
*
|
|
566
|
+
* | Parameter | Type | Required | Description |
|
|
567
|
+
* |------------------------------------|--------------------------------------|-----------------|----------------------------------------------------------------|
|
|
568
|
+
* | `tenantConfigurationKey` | `string` | ✅ | The combination of tenant id and tenant OCI |
|
|
569
|
+
* | `commercialOrderId` | `string` | ✅ | The ID of the commercial order whose lines are to be deleted |
|
|
570
|
+
* | `locale` | `string` | ✅ | The locale in which to return the commercial order. |
|
|
571
|
+
|
|
572
|
+
*
|
|
573
|
+
* 📤 **Returns**:
|
|
574
|
+
* A `Promise` resolving when the punchout data are successfully retrieved
|
|
575
|
+
*
|
|
576
|
+
* 🛠 **Example usage**:
|
|
577
|
+
* ```ts
|
|
578
|
+
* const response = await punchoutOciCommercialOrder({
|
|
579
|
+
* tenantConfigurationKey: "0000000300-0000000001",
|
|
580
|
+
* commercialOrderId: "commercialOrder123",
|
|
581
|
+
* locale: "EN",
|
|
582
|
+
* });
|
|
583
|
+
* ```
|
|
584
|
+
*
|
|
585
|
+
* @param {PunchoutOciCommercialOrderParameters} params - The parameters for the request.
|
|
586
|
+
* @throws {Error} If `commercialOrderId` or `tenantConfigurationKey` is missing.
|
|
587
|
+
* @returns {Promise<Map(<string,string>)>} A promise resolving when the punchout data are successfully retrieved.
|
|
588
|
+
*/
|
|
589
|
+
export declare function punchoutOciCommercialOrder({ tenantConfigurationKey, commercialOrderId, locale, }: PunchoutOciCommercialOrderParameters): Promise<any>;
|
|
@@ -17,6 +17,7 @@ exports.updateCommercialOrderShippingType = updateCommercialOrderShippingType;
|
|
|
17
17
|
exports.deleteCommercialOrder = deleteCommercialOrder;
|
|
18
18
|
exports.updateCommercialOrderLines = updateCommercialOrderLines;
|
|
19
19
|
exports.deleteCommercialOrderLines = deleteCommercialOrderLines;
|
|
20
|
+
exports.punchoutOciCommercialOrder = punchoutOciCommercialOrder;
|
|
20
21
|
const parameters_validation_1 = require("../../helpers/parameters-validation");
|
|
21
22
|
const fetch_instance_1 = require("../../settings/fetch-instance");
|
|
22
23
|
/**
|
|
@@ -752,3 +753,45 @@ async function deleteCommercialOrderLines({ commercialOrderId, body, }) {
|
|
|
752
753
|
});
|
|
753
754
|
return data;
|
|
754
755
|
}
|
|
756
|
+
/**
|
|
757
|
+
* 🚚 Punchout for specific commercial order.
|
|
758
|
+
*
|
|
759
|
+
* This function retrieves commercial order's data needed for the punchout, with order identified by the `commercialOrderId`.
|
|
760
|
+
* This `commercialOrderId` parameter is required and validated before the request is executed.
|
|
761
|
+
*
|
|
762
|
+
* 🛠 **Endpoint**: `GET /punchout/oci/${tenantConfigurationKey}/commercial-orders/${commercialOrderId}` [ORDER-150]
|
|
763
|
+
*
|
|
764
|
+
* | Parameter | Type | Required | Description |
|
|
765
|
+
* |------------------------------------|--------------------------------------|-----------------|----------------------------------------------------------------|
|
|
766
|
+
* | `tenantConfigurationKey` | `string` | ✅ | The combination of tenant id and tenant OCI |
|
|
767
|
+
* | `commercialOrderId` | `string` | ✅ | The ID of the commercial order whose lines are to be deleted |
|
|
768
|
+
* | `locale` | `string` | ✅ | The locale in which to return the commercial order. |
|
|
769
|
+
|
|
770
|
+
*
|
|
771
|
+
* 📤 **Returns**:
|
|
772
|
+
* A `Promise` resolving when the punchout data are successfully retrieved
|
|
773
|
+
*
|
|
774
|
+
* 🛠 **Example usage**:
|
|
775
|
+
* ```ts
|
|
776
|
+
* const response = await punchoutOciCommercialOrder({
|
|
777
|
+
* tenantConfigurationKey: "0000000300-0000000001",
|
|
778
|
+
* commercialOrderId: "commercialOrder123",
|
|
779
|
+
* locale: "EN",
|
|
780
|
+
* });
|
|
781
|
+
* ```
|
|
782
|
+
*
|
|
783
|
+
* @param {PunchoutOciCommercialOrderParameters} params - The parameters for the request.
|
|
784
|
+
* @throws {Error} If `commercialOrderId` or `tenantConfigurationKey` is missing.
|
|
785
|
+
* @returns {Promise<Map(<string,string>)>} A promise resolving when the punchout data are successfully retrieved.
|
|
786
|
+
*/
|
|
787
|
+
async function punchoutOciCommercialOrder({ tenantConfigurationKey, commercialOrderId, locale, }) {
|
|
788
|
+
(0, parameters_validation_1.required)({ commercialOrderId, tenantConfigurationKey });
|
|
789
|
+
const { data } = await (0, fetch_instance_1.enhancedFetch)({
|
|
790
|
+
method: "GET",
|
|
791
|
+
path: `/cxml/punchout/oci/${tenantConfigurationKey}/commercial-orders/${commercialOrderId}`,
|
|
792
|
+
params: {
|
|
793
|
+
locale,
|
|
794
|
+
},
|
|
795
|
+
});
|
|
796
|
+
return data;
|
|
797
|
+
}
|