@zauru-sdk/services 2.0.24 → 2.0.26

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.
@@ -1,16 +1,19 @@
1
1
  import { handlePossibleAxiosErrors } from "@zauru-sdk/common";
2
2
  import { getGraphQLAPIHeaders } from "../common.js";
3
3
  import httpGraphQLAPI from "./httpGraphQL.js";
4
- import { getShipmentsByToAgencyLast100StringQuery } from "@zauru-sdk/graphql";
4
+ import { getLast100ShipmentsStringQuery } from "@zauru-sdk/graphql";
5
5
  import httpZauru from "./httpZauru.js";
6
6
  /**
7
- * getShipmentsByToAgencyLast100Id_booking
7
+ * getShipments
8
8
  */
9
- export async function getShipmentsByToAgencyLast100Id_booking(session, agency_to_id) {
9
+ export async function getShipments(session, agency_to_id, suffix) {
10
10
  return handlePossibleAxiosErrors(async () => {
11
11
  const headers = await getGraphQLAPIHeaders(session);
12
12
  const response = await httpGraphQLAPI.post("", {
13
- query: getShipmentsByToAgencyLast100StringQuery(Number(agency_to_id)),
13
+ query: getLast100ShipmentsStringQuery({
14
+ agency_to_id: Number(agency_to_id),
15
+ suffix,
16
+ }),
14
17
  }, { headers });
15
18
  if (response.data.errors) {
16
19
  throw new Error(response.data.errors.map((x) => x.message).join(";"));
@@ -1,9 +1,9 @@
1
1
  import type { Session } from "@remix-run/node";
2
2
  import { AxiosUtilsResponse, ShipmentGraphQL } from "@zauru-sdk/types";
3
3
  /**
4
- * getShipmentsByToAgencyLast100Id_booking
4
+ * getShipments
5
5
  */
6
- export declare function getShipmentsByToAgencyLast100Id_booking(session: Session, agency_to_id: string | number): Promise<AxiosUtilsResponse<ShipmentGraphQL[]>>;
6
+ export declare function getShipments(session: Session, agency_to_id: string | number, suffix?: string): Promise<AxiosUtilsResponse<ShipmentGraphQL[]>>;
7
7
  /**
8
8
  * receiveShipment_booking
9
9
  * @param headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "2.0.24",
3
+ "version": "2.0.26",
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.23",
29
+ "@zauru-sdk/graphql": "^2.0.26",
30
30
  "@zauru-sdk/types": "^2.0.24",
31
31
  "axios": "^1.6.7",
32
32
  "chalk": "5.3.0"
33
33
  },
34
- "gitHead": "4246f96df338c55f7c90d565f466691de6729ec2"
34
+ "gitHead": "41440682edbc853c6e9ce4f7c982dbf4ac9a185b"
35
35
  }