@zauru-sdk/services 2.0.31 → 2.0.32

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,12 +11,14 @@ export async function getShipments(session, config) {
11
11
  const headers = await getGraphQLAPIHeaders(session);
12
12
  const query = getLast100ShipmentsStringQuery({
13
13
  agency_to_id: Number(config.agency_to_id),
14
+ agency_from_id: config.agency_from_id
15
+ ? Number(config.agency_from_id)
16
+ : undefined,
14
17
  suffix: config.suffix,
15
18
  id_number: config.id_number,
16
19
  id_number_not_null: config.id_number_not_null,
17
20
  id_number_not_empty: config.id_number_not_empty,
18
21
  });
19
- console.log("query", query);
20
22
  const response = await httpGraphQLAPI.post("", {
21
23
  query,
22
24
  }, { headers });
@@ -42,6 +44,20 @@ export async function receiveShipment_booking(headers, id) {
42
44
  return true;
43
45
  });
44
46
  }
47
+ /**
48
+ * despacharShipment_booking
49
+ * Esta función cambia el atributo 'shipment' de los envíos a 'true', lo que indica que el envío está en tránsito.
50
+ * Esto es utilizado para marcar los envíos que necesitan ser entregados en las tablas como "En tránsito".
51
+ * @param headers
52
+ * @param id
53
+ * @returns
54
+ */
55
+ export async function despacharShipment_booking(headers, id) {
56
+ return handlePossibleAxiosErrors(async () => {
57
+ await httpZauru.get(`/inventories/bookings/${id}/ship`, { headers });
58
+ return true;
59
+ });
60
+ }
45
61
  /**
46
62
  * deleteShipment_booking
47
63
  * @param headers
@@ -5,6 +5,7 @@ import { AxiosUtilsResponse, ShipmentGraphQL } from "@zauru-sdk/types";
5
5
  */
6
6
  export declare function getShipments(session: Session, config: {
7
7
  agency_to_id: string | number;
8
+ agency_from_id?: string | number;
8
9
  suffix?: string;
9
10
  id_number?: string;
10
11
  id_number_not_null?: boolean;
@@ -17,6 +18,15 @@ export declare function getShipments(session: Session, config: {
17
18
  * @returns
18
19
  */
19
20
  export declare function receiveShipment_booking(headers: any, id: string | number): Promise<AxiosUtilsResponse<boolean>>;
21
+ /**
22
+ * despacharShipment_booking
23
+ * Esta función cambia el atributo 'shipment' de los envíos a 'true', lo que indica que el envío está en tránsito.
24
+ * Esto es utilizado para marcar los envíos que necesitan ser entregados en las tablas como "En tránsito".
25
+ * @param headers
26
+ * @param id
27
+ * @returns
28
+ */
29
+ export declare function despacharShipment_booking(headers: any, id: string | number): Promise<AxiosUtilsResponse<boolean>>;
20
30
  /**
21
31
  * deleteShipment_booking
22
32
  * @param headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "2.0.31",
3
+ "version": "2.0.32",
4
4
  "description": "Servicios de consulta a Zauru",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -26,10 +26,10 @@
26
26
  "@remix-run/node": "^2.8.1",
27
27
  "@zauru-sdk/common": "^2.0.24",
28
28
  "@zauru-sdk/config": "^2.0.0",
29
- "@zauru-sdk/graphql": "^2.0.31",
29
+ "@zauru-sdk/graphql": "^2.0.32",
30
30
  "@zauru-sdk/types": "^2.0.24",
31
31
  "axios": "^1.6.7",
32
32
  "chalk": "5.3.0"
33
33
  },
34
- "gitHead": "06b14f4fc6a5a06dba2e0ad910afbc57c9448d7d"
34
+ "gitHead": "a8ae6ccbcb3c0f52ec84250385dcc9d04008489f"
35
35
  }