@zauru-sdk/services 2.0.83 → 2.0.85
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.
|
@@ -9,7 +9,12 @@ import { httpZauru } from "./httpZauru.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export async function createNewReception(headers, body, purchase_order_id) {
|
|
11
11
|
return handlePossibleAxiosErrors(async () => {
|
|
12
|
-
const
|
|
12
|
+
const sendBody = {
|
|
13
|
+
...body,
|
|
14
|
+
reception_details_attributes: arrayToObject(body.reception_details),
|
|
15
|
+
};
|
|
16
|
+
delete sendBody.reception_details;
|
|
17
|
+
const response = await httpZauru.post(`/purchases/purchase_orders/${purchase_order_id}/receptions.json`, { reception: sendBody }, { headers });
|
|
13
18
|
return response.data;
|
|
14
19
|
});
|
|
15
20
|
}
|
|
@@ -27,13 +32,14 @@ export async function deleteReception(headers, receptionId, poId) {
|
|
|
27
32
|
return true;
|
|
28
33
|
});
|
|
29
34
|
}
|
|
35
|
+
//TODO: PASARLO A UTILS
|
|
30
36
|
/**
|
|
31
37
|
*
|
|
32
38
|
* @param headers
|
|
33
39
|
* @param poId
|
|
34
40
|
* @returns
|
|
35
41
|
*/
|
|
36
|
-
export async function
|
|
42
|
+
export async function createNewLabPurchaseOrderReception(headers, session, body) {
|
|
37
43
|
return handlePossibleAxiosErrors(async () => {
|
|
38
44
|
const sendBody = {
|
|
39
45
|
reception: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Session } from "@remix-run/node";
|
|
2
|
-
import { AxiosUtilsResponse,
|
|
2
|
+
import { AxiosUtilsResponse, DeepPartial, PurchaseOrderGraphQL, ReceptionGraphQL } from "@zauru-sdk/types";
|
|
3
3
|
/**
|
|
4
4
|
* createNewReception
|
|
5
5
|
* @param headers
|
|
@@ -7,7 +7,7 @@ import { AxiosUtilsResponse, NewReceptionBody, PurchaseOrderGraphQL } from "@zau
|
|
|
7
7
|
* @param purchase_order_id
|
|
8
8
|
* @returns
|
|
9
9
|
*/
|
|
10
|
-
export declare function createNewReception(headers: any, body:
|
|
10
|
+
export declare function createNewReception(headers: any, body: DeepPartial<ReceptionGraphQL>, purchase_order_id: number | string): Promise<AxiosUtilsResponse<any>>;
|
|
11
11
|
/**
|
|
12
12
|
* deleteReception
|
|
13
13
|
* @param headers
|
|
@@ -21,4 +21,4 @@ export declare function deleteReception(headers: any, receptionId: string | numb
|
|
|
21
21
|
* @param poId
|
|
22
22
|
* @returns
|
|
23
23
|
*/
|
|
24
|
-
export declare function
|
|
24
|
+
export declare function createNewLabPurchaseOrderReception(headers: any, session: Session, body: Partial<PurchaseOrderGraphQL>): Promise<AxiosUtilsResponse<boolean>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/services",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.85",
|
|
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.85",
|
|
28
28
|
"@zauru-sdk/config": "^2.0.83",
|
|
29
29
|
"@zauru-sdk/graphql": "^2.0.69",
|
|
30
|
-
"@zauru-sdk/types": "^2.0.
|
|
30
|
+
"@zauru-sdk/types": "^2.0.85",
|
|
31
31
|
"axios": "^1.6.7",
|
|
32
32
|
"chalk": "5.3.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "3dfa4ddd49f3802212a062b367422fc187ca9004"
|
|
35
35
|
}
|