washday-sdk 0.0.94 → 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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "washday-sdk",
3
- "version": "0.0.94",
3
+ "version": "0.0.95",
4
4
  "description": "Washday utilities functions and API",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -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;