@zauru-sdk/services 2.0.165 → 2.0.167
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
|
});
|
|
@@ -168,8 +175,8 @@ export async function getClientCategories(session) {
|
|
|
168
175
|
*/
|
|
169
176
|
export async function createPayee(headers, body) {
|
|
170
177
|
return handlePossibleAxiosErrors(async () => {
|
|
171
|
-
await httpZauru.post("/settings/payees", { payee: body }, { headers });
|
|
172
|
-
return
|
|
178
|
+
const response = await httpZauru.post("/settings/payees", { payee: body }, { headers });
|
|
179
|
+
return response.data;
|
|
173
180
|
});
|
|
174
181
|
}
|
|
175
182
|
/**
|
|
@@ -67,7 +67,7 @@ export declare function createItemCategory(headers: any, body: Partial<ItemCateg
|
|
|
67
67
|
*/
|
|
68
68
|
export declare function deleteItemCategory(headers: any, id: string | number): Promise<AxiosUtilsResponse<boolean>>;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* updateItemCategory
|
|
71
71
|
* @param session
|
|
72
72
|
* @param headers
|
|
73
73
|
* @returns
|
|
@@ -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
|
|
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.
|
|
3
|
+
"version": "2.0.167",
|
|
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.
|
|
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": "
|
|
34
|
+
"gitHead": "b33742e83c55c1846b6f1a3266fbb39125b64360"
|
|
35
35
|
}
|