washday-sdk 0.0.92 → 0.0.94
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/dist/api/cfdi/get.js +1 -1
- package/dist/api/order/get.js +2 -1
- package/package.json +1 -1
- package/src/api/cfdi/get.ts +2 -2
- package/src/api/order/get.ts +2 -1
package/dist/api/cfdi/get.js
CHANGED
|
@@ -91,7 +91,7 @@ export const getGlobalCFDIPreview = function (params) {
|
|
|
91
91
|
};
|
|
92
92
|
const queryParams = generateQueryParamsStr([
|
|
93
93
|
'ordersID',
|
|
94
|
-
'
|
|
94
|
+
'customer',
|
|
95
95
|
], params);
|
|
96
96
|
return yield axiosInstance.get(`${GET_SET_CFDI}/global/preview?${queryParams}`, config);
|
|
97
97
|
}
|
package/dist/api/order/get.js
CHANGED
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { generateQueryParamsStr } from "../../utils/apiUtils";
|
|
11
11
|
import axiosInstance from "../axiosInstance";
|
|
12
12
|
const GET_SET_ORDER = 'api/v2/order';
|
|
13
|
+
const GET_SET_ORDER_CFDI = 'api/v2/orders';
|
|
13
14
|
export const getList = function (params) {
|
|
14
15
|
return __awaiter(this, void 0, void 0, function* () {
|
|
15
16
|
try {
|
|
@@ -82,7 +83,7 @@ export const fetchOrdersForCFDI = function (params) {
|
|
|
82
83
|
"storeID",
|
|
83
84
|
"customerID"
|
|
84
85
|
], params);
|
|
85
|
-
return yield axiosInstance.get(`${
|
|
86
|
+
return yield axiosInstance.get(`${GET_SET_ORDER_CFDI}/cfdiPreview?${queryParams}`, config);
|
|
86
87
|
}
|
|
87
88
|
catch (error) {
|
|
88
89
|
console.error('Error fetching:', error);
|
package/package.json
CHANGED
package/src/api/cfdi/get.ts
CHANGED
|
@@ -80,7 +80,7 @@ export const sendCFDIByEmail = async function (this: WashdayClientInstance, id:
|
|
|
80
80
|
// THIS IS FOR WHEN MODAL OPENS AND WE WANT TO GET PREVIEW DATA
|
|
81
81
|
export const getGlobalCFDIPreview = async function (this: WashdayClientInstance, params: {
|
|
82
82
|
ordersID?: string[];
|
|
83
|
-
|
|
83
|
+
customer?: string
|
|
84
84
|
}): Promise<any> {
|
|
85
85
|
try {
|
|
86
86
|
const config = {
|
|
@@ -88,7 +88,7 @@ export const getGlobalCFDIPreview = async function (this: WashdayClientInstance,
|
|
|
88
88
|
};
|
|
89
89
|
const queryParams = generateQueryParamsStr([
|
|
90
90
|
'ordersID',
|
|
91
|
-
'
|
|
91
|
+
'customer',
|
|
92
92
|
], params);
|
|
93
93
|
return await axiosInstance.get(`${GET_SET_CFDI}/global/preview?${queryParams}`, config);
|
|
94
94
|
} catch (error) {
|
package/src/api/order/get.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { IOrder } from "../../interfaces/Order";
|
|
|
3
3
|
import { generateQueryParamsStr } from "../../utils/apiUtils";
|
|
4
4
|
import axiosInstance from "../axiosInstance";
|
|
5
5
|
const GET_SET_ORDER = 'api/v2/order';
|
|
6
|
+
const GET_SET_ORDER_CFDI = 'api/v2/orders';
|
|
6
7
|
|
|
7
8
|
export const getList = async function (this: WashdayClientInstance, params: {
|
|
8
9
|
store: string | undefined,
|
|
@@ -91,7 +92,7 @@ export const fetchOrdersForCFDI = async function (this: WashdayClientInstance, p
|
|
|
91
92
|
"storeID",
|
|
92
93
|
"customerID"
|
|
93
94
|
], params);
|
|
94
|
-
return await axiosInstance.get(`${
|
|
95
|
+
return await axiosInstance.get(`${GET_SET_ORDER_CFDI}/cfdiPreview?${queryParams}`, config);
|
|
95
96
|
} catch (error) {
|
|
96
97
|
console.error('Error fetching:', error);
|
|
97
98
|
throw error;
|