@zauru-sdk/services 2.0.167 → 2.0.169
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,15 +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 {
|
|
4
|
+
import { getCasesStringQuery } from "@zauru-sdk/graphql";
|
|
5
5
|
/**
|
|
6
6
|
* getCasesByResponsibleId
|
|
7
7
|
*/
|
|
8
|
-
export async function getCasesByResponsibleId(session,
|
|
8
|
+
export async function getCasesByResponsibleId(session, filters) {
|
|
9
9
|
return handlePossibleAxiosErrors(async () => {
|
|
10
10
|
const headers = await getGraphQLAPIHeaders(session);
|
|
11
|
+
const initialFilters = {
|
|
12
|
+
...(filters ? filters : {}),
|
|
13
|
+
};
|
|
14
|
+
const query = getCasesStringQuery(initialFilters);
|
|
11
15
|
const response = await httpGraphQLAPI.post("", {
|
|
12
|
-
query
|
|
16
|
+
query,
|
|
13
17
|
}, { headers });
|
|
14
18
|
if (response.data.errors) {
|
|
15
19
|
throw new Error(response.data.errors.map((x) => x.message).join(";"));
|
|
@@ -3,4 +3,8 @@ import { AxiosUtilsResponse, CaseGraphQL } from "@zauru-sdk/types";
|
|
|
3
3
|
/**
|
|
4
4
|
* getCasesByResponsibleId
|
|
5
5
|
*/
|
|
6
|
-
export declare function getCasesByResponsibleId(session: Session,
|
|
6
|
+
export declare function getCasesByResponsibleId(session: Session, filters?: {
|
|
7
|
+
responsible_id?: number;
|
|
8
|
+
closed?: boolean;
|
|
9
|
+
client_id?: number;
|
|
10
|
+
}): Promise<AxiosUtilsResponse<CaseGraphQL[]>>;
|
|
@@ -74,7 +74,7 @@ export declare function getClientCategories(session: Session): Promise<AxiosUtil
|
|
|
74
74
|
* @param headers
|
|
75
75
|
* @returns
|
|
76
76
|
*/
|
|
77
|
-
export declare function createPayee(headers: any, body: Partial<PayeeGraphQL>): Promise<AxiosUtilsResponse<
|
|
77
|
+
export declare function createPayee(headers: any, body: Partial<PayeeGraphQL>): Promise<AxiosUtilsResponse<PayeeGraphQL>>;
|
|
78
78
|
/**
|
|
79
79
|
* deletePayee
|
|
80
80
|
* @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.169",
|
|
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.169",
|
|
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": "cb9bc2cccbff6605a48b0771ab6cc422a7a9df4e"
|
|
35
35
|
}
|