@zauru-sdk/services 2.23.1 → 2.24.0
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.
|
@@ -11,6 +11,7 @@ axiosInstance.interceptors.request.use(function (request) {
|
|
|
11
11
|
request.timeout = 200000;
|
|
12
12
|
request.metadata = { startTime: Date.now() };
|
|
13
13
|
if (config.debugHTTP) {
|
|
14
|
+
console.log(chalk.cyan(`[DEBUG] REQUEST METHOD: ${request.method?.toUpperCase()}`));
|
|
14
15
|
console.log(chalk.cyan("[DEBUG] REQUEST BODY:"), JSON.stringify(request.data, null, 2));
|
|
15
16
|
}
|
|
16
17
|
return request;
|
|
@@ -11,6 +11,7 @@ axiosInstance.interceptors.request.use(function (request) {
|
|
|
11
11
|
request.timeout = 200000;
|
|
12
12
|
request.metadata = { startTime: Date.now() };
|
|
13
13
|
if (config.debugHTTP) {
|
|
14
|
+
console.log(chalk.cyan(`[DEBUG] REQUEST METHOD: ${request.method?.toUpperCase()}`));
|
|
14
15
|
console.log(chalk.cyan("[DEBUG] REQUEST BODY:"), JSON.stringify(request.data, null, 2));
|
|
15
16
|
}
|
|
16
17
|
return request;
|
|
@@ -11,6 +11,7 @@ axiosInstance.interceptors.request.use(function (request) {
|
|
|
11
11
|
request.timeout = 200000;
|
|
12
12
|
request.metadata = { startTime: Date.now() };
|
|
13
13
|
if (config.debugHTTP) {
|
|
14
|
+
console.log(chalk.cyan(`[DEBUG] REQUEST METHOD: ${request.method?.toUpperCase()}`));
|
|
14
15
|
console.log(chalk.cyan("[DEBUG] REQUEST BODY:"), JSON.stringify(request.data, null, 2));
|
|
15
16
|
}
|
|
16
17
|
return request;
|
|
@@ -11,6 +11,7 @@ axiosInstance.interceptors.request.use(function (request) {
|
|
|
11
11
|
request.timeout = 200000;
|
|
12
12
|
request.metadata = { startTime: Date.now() };
|
|
13
13
|
if (config.debugHTTP) {
|
|
14
|
+
console.log(chalk.cyan(`[DEBUG] REQUEST METHOD: ${request.method?.toUpperCase()}`));
|
|
14
15
|
console.log(chalk.cyan("[DEBUG] REQUEST BODY:"), JSON.stringify(request.data, null, 2));
|
|
15
16
|
}
|
|
16
17
|
return request;
|
|
@@ -149,37 +149,6 @@ export async function createInvoicePOS(headers, body) {
|
|
|
149
149
|
return response.data;
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
/**
|
|
153
|
-
* updateInvoicePOS
|
|
154
|
-
* @param headers
|
|
155
|
-
* @param body
|
|
156
|
-
* @returns
|
|
157
|
-
*/
|
|
158
|
-
/*
|
|
159
|
-
export async function updateInvoicePOS(
|
|
160
|
-
headers: any,
|
|
161
|
-
body: Partial<InvoiceGraphQL>,
|
|
162
|
-
): Promise<AxiosUtilsResponse<InvoiceGraphQL>> {
|
|
163
|
-
return handlePossibleAxiosErrors(async () => {
|
|
164
|
-
const sendBody = {
|
|
165
|
-
...body,
|
|
166
|
-
invoice_details_attributes: arrayToObject(body.invoice_details),
|
|
167
|
-
} as any;
|
|
168
|
-
if (sendBody.deleted_invoice_details)
|
|
169
|
-
delete sendBody.deleted_invoice_details;
|
|
170
|
-
if (sendBody.__rvfInternalFormId) delete sendBody.__rvfInternalFormId;
|
|
171
|
-
if (sendBody.invoice_details) delete sendBody.invoice_details;
|
|
172
|
-
|
|
173
|
-
const response = await httpZauru.patch<InvoiceGraphQL>(
|
|
174
|
-
`/pos/invoices/${body.id}.json`,
|
|
175
|
-
{ invoice: sendBody },
|
|
176
|
-
{ headers },
|
|
177
|
-
);
|
|
178
|
-
|
|
179
|
-
return response.data;
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
*/
|
|
183
152
|
/**
|
|
184
153
|
* deleteInvoicePOS
|
|
185
154
|
* @param headers
|
|
@@ -44,12 +44,6 @@ export declare function deleteInvoiceOrder(headers: any, id: string | number): P
|
|
|
44
44
|
* @returns
|
|
45
45
|
*/
|
|
46
46
|
export declare function createInvoicePOS(headers: any, body: Partial<InvoiceGraphQL>): Promise<AxiosUtilsResponse<InvoiceGraphQL>>;
|
|
47
|
-
/**
|
|
48
|
-
* updateInvoicePOS
|
|
49
|
-
* @param headers
|
|
50
|
-
* @param body
|
|
51
|
-
* @returns
|
|
52
|
-
*/
|
|
53
47
|
/**
|
|
54
48
|
* deleteInvoicePOS
|
|
55
49
|
* @param headers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/services",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.0",
|
|
4
4
|
"description": "Servicios de consulta a Zauru",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"axios": "^1.6.7",
|
|
33
33
|
"chalk": "5.3.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "799053c918c45098292942718cc1836090536466"
|
|
36
36
|
}
|