@zauru-sdk/services 2.0.164 → 2.0.166

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.
@@ -8,11 +8,18 @@ import { httpZauru } from "./httpZauru.js";
8
8
  * @param headers
9
9
  * @returns
10
10
  */
11
- export async function getPayees(session) {
11
+ export async function getPayees(session, filters) {
12
12
  return handlePossibleAxiosErrors(async () => {
13
13
  const headers = await getGraphQLAPIHeaders(session);
14
+ const defaultFilters = {
15
+ id_number: undefined,
16
+ name: undefined,
17
+ vendor: undefined,
18
+ tin: undefined,
19
+ };
20
+ const finalFilters = { ...defaultFilters, ...filters };
14
21
  const response = await httpGraphQLAPI.post(``, {
15
- query: getPayeesStringQuery,
22
+ query: getPayeesStringQuery(finalFilters),
16
23
  }, {
17
24
  headers,
18
25
  });
@@ -1,6 +1,6 @@
1
1
  import { handlePossibleAxiosErrors } from "@zauru-sdk/common";
2
2
  import { httpZauru } from "./httpZauru.js";
3
- import { getGraphQLAPIHeaders } from "~/common.js";
3
+ import { getGraphQLAPIHeaders } from "../common.js";
4
4
  import { httpGraphQLAPI } from "./httpGraphQL.js";
5
5
  import { getSerialsStringQuery } from "@zauru-sdk/graphql";
6
6
  /**
@@ -5,7 +5,12 @@ import { AxiosUtilsResponse, PayeeCategoryGraphQL, PayeeGraphQL } from "@zauru-s
5
5
  * @param headers
6
6
  * @returns
7
7
  */
8
- export declare function getPayees(session: Session): Promise<AxiosUtilsResponse<PayeeGraphQL[]>>;
8
+ export declare function getPayees(session: Session, filters?: {
9
+ id_number?: string;
10
+ name?: string;
11
+ vendor?: boolean;
12
+ tin?: string;
13
+ }): Promise<AxiosUtilsResponse<PayeeGraphQL[]>>;
9
14
  /**
10
15
  * getProviders
11
16
  * @param headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "2.0.164",
3
+ "version": "2.0.166",
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.164",
28
28
  "@zauru-sdk/config": "^2.0.100",
29
- "@zauru-sdk/graphql": "^2.0.164",
29
+ "@zauru-sdk/graphql": "^2.0.166",
30
30
  "@zauru-sdk/types": "^2.0.164",
31
31
  "axios": "^1.6.7",
32
32
  "chalk": "5.3.0"
33
33
  },
34
- "gitHead": "44804384967c4f4a6315c49550b464b79b55a06a"
34
+ "gitHead": "39835f008adba7bc3f9d1ef997089a09c34ae322"
35
35
  }