washday-sdk 0.0.93 → 0.0.95
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/cfdi/post.js +2 -1
- package/package.json +1 -1
- package/src/api/cfdi/get.ts +2 -2
- package/src/api/cfdi/post.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/cfdi/post.js
CHANGED
|
@@ -26,11 +26,12 @@ export const createCFDI = function (id, data) {
|
|
|
26
26
|
};
|
|
27
27
|
export const createGlobalCFDI = function (data) {
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
var _a;
|
|
29
30
|
try {
|
|
30
31
|
const config = {
|
|
31
32
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
32
33
|
};
|
|
33
|
-
return yield axiosInstance.post(`${GET_SET_CFDI}/global`, data, config);
|
|
34
|
+
return yield axiosInstance.post(`${GET_SET_CFDI}/global`, Object.assign(Object.assign({}, data), { ordersID: (_a = data.ordersID) === null || _a === void 0 ? void 0 : _a.join(',') }), config);
|
|
34
35
|
}
|
|
35
36
|
catch (error) {
|
|
36
37
|
console.error('Error fetching create:', 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/cfdi/post.ts
CHANGED
|
@@ -25,6 +25,7 @@ export const createCFDI = async function (this: WashdayClientInstance, id: strin
|
|
|
25
25
|
export const createGlobalCFDI = async function (this: WashdayClientInstance, data: {
|
|
26
26
|
ordersID: string[],
|
|
27
27
|
CFDIInfo: {
|
|
28
|
+
sendEmailInvoice: boolean
|
|
28
29
|
use: string
|
|
29
30
|
payment_method: string
|
|
30
31
|
payment_form: string
|
|
@@ -42,7 +43,7 @@ export const createGlobalCFDI = async function (this: WashdayClientInstance, dat
|
|
|
42
43
|
const config = {
|
|
43
44
|
headers: { Authorization: `Bearer ${this.apiToken}` }
|
|
44
45
|
};
|
|
45
|
-
return await axiosInstance.post(`${GET_SET_CFDI}/global`, data, config);
|
|
46
|
+
return await axiosInstance.post(`${GET_SET_CFDI}/global`, { ...data, ordersID: data.ordersID?.join(',') }, config);
|
|
46
47
|
} catch (error) {
|
|
47
48
|
console.error('Error fetching create:', error);
|
|
48
49
|
throw error;
|