@zauru-sdk/services 2.0.77 → 2.0.79
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.
|
@@ -36,7 +36,7 @@ export const createNewPurchaseOrder = (headers, body) => {
|
|
|
36
36
|
purchase_order_details_attributes: arrayToObject(body?.purchase_order_details),
|
|
37
37
|
tag_ids: [
|
|
38
38
|
"",
|
|
39
|
-
...(body?.taggings?.map((x) => x
|
|
39
|
+
...(body?.taggings?.map((x) => x?.tag_id?.toString()) ?? []),
|
|
40
40
|
],
|
|
41
41
|
};
|
|
42
42
|
delete headers["Content-type"];
|
|
@@ -78,6 +78,18 @@ export const createNewAuthorizedPurchaseOrder = (headers, body, withReceive = tr
|
|
|
78
78
|
return response.data;
|
|
79
79
|
});
|
|
80
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* authorizePurchaseOrder
|
|
83
|
+
* @param headers
|
|
84
|
+
* @param id
|
|
85
|
+
* @returns
|
|
86
|
+
*/
|
|
87
|
+
export const authorizePurchaseOrder = (headers, id) => {
|
|
88
|
+
return handlePossibleAxiosErrors(async () => {
|
|
89
|
+
await httpZauru.get(`/purchases/purchase_orders/${id}/authorize.json`, { headers });
|
|
90
|
+
return true;
|
|
91
|
+
});
|
|
92
|
+
};
|
|
81
93
|
/**
|
|
82
94
|
* receiveLotPurchaseOrder
|
|
83
95
|
* @param headers
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Session } from "@remix-run/node";
|
|
2
|
-
import { AxiosUtilsResponse, BasketSchema, CreateNewPurchaseOrderBody, DataTablesFilterBody, HTMLPurchasesListSchema, NewPurchaseOrderResponse, PurchaseOrderGraphQL, PurchasesListResponseSchema, UpdatePurchaseOrderBody } from "@zauru-sdk/types";
|
|
2
|
+
import { AxiosUtilsResponse, BasketSchema, CreateNewPurchaseOrderBody, DataTablesFilterBody, DeepPartial, HTMLPurchasesListSchema, NewPurchaseOrderResponse, PurchaseOrderGraphQL, PurchasesListResponseSchema, UpdatePurchaseOrderBody } from "@zauru-sdk/types";
|
|
3
3
|
/**
|
|
4
4
|
* markAsReceivePurchaseOrder
|
|
5
5
|
* Esta función sólo se utiliza cuando se van a marcar como recibida toda la órden de compra, se recibe todo lo que se envío
|
|
@@ -17,7 +17,7 @@ export declare const markAsReceivePurchaseOrder: (headers: any, body: Partial<Pu
|
|
|
17
17
|
* @param body
|
|
18
18
|
* @returns
|
|
19
19
|
*/
|
|
20
|
-
export declare const createNewPurchaseOrder: (headers: any, body:
|
|
20
|
+
export declare const createNewPurchaseOrder: (headers: any, body: DeepPartial<PurchaseOrderGraphQL>) => Promise<AxiosUtilsResponse<PurchaseOrderGraphQL>>;
|
|
21
21
|
/**
|
|
22
22
|
*
|
|
23
23
|
* @param headers
|
|
@@ -25,6 +25,13 @@ export declare const createNewPurchaseOrder: (headers: any, body: Partial<Purcha
|
|
|
25
25
|
* @returns
|
|
26
26
|
*/
|
|
27
27
|
export declare const createNewAuthorizedPurchaseOrder: (headers: any, body: CreateNewPurchaseOrderBody, withReceive?: boolean) => Promise<AxiosUtilsResponse<PurchaseOrderGraphQL>>;
|
|
28
|
+
/**
|
|
29
|
+
* authorizePurchaseOrder
|
|
30
|
+
* @param headers
|
|
31
|
+
* @param id
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
export declare const authorizePurchaseOrder: (headers: any, id: number | string) => Promise<AxiosUtilsResponse<boolean>>;
|
|
28
35
|
/**
|
|
29
36
|
* receiveLotPurchaseOrder
|
|
30
37
|
* @param headers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/services",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.79",
|
|
4
4
|
"description": "Servicios de consulta a Zauru",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@remix-run/node": "^2.8.1",
|
|
27
|
-
"@zauru-sdk/common": "^2.0.
|
|
27
|
+
"@zauru-sdk/common": "^2.0.78",
|
|
28
28
|
"@zauru-sdk/config": "^2.0.73",
|
|
29
29
|
"@zauru-sdk/graphql": "^2.0.69",
|
|
30
|
-
"@zauru-sdk/types": "^2.0.
|
|
30
|
+
"@zauru-sdk/types": "^2.0.78",
|
|
31
31
|
"axios": "^1.6.7",
|
|
32
32
|
"chalk": "5.3.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "4055b172e4a8813f86234a8038303d759740cd6f"
|
|
35
35
|
}
|