@zauru-sdk/services 2.0.202 → 2.0.203
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.
|
@@ -5,14 +5,18 @@ import { getCasesStringQuery } from "@zauru-sdk/graphql";
|
|
|
5
5
|
import { httpZauru } from "./httpZauru.js";
|
|
6
6
|
/**
|
|
7
7
|
* getCases
|
|
8
|
+
* @param session
|
|
9
|
+
* @param filters
|
|
10
|
+
* @param includes (optional) Example: ["case_supplies { id }"]
|
|
11
|
+
* @returns
|
|
8
12
|
*/
|
|
9
|
-
export async function getCases(session, filters) {
|
|
13
|
+
export async function getCases(session, filters, includes) {
|
|
10
14
|
return handlePossibleAxiosErrors(async () => {
|
|
11
15
|
const headers = await getGraphQLAPIHeaders(session);
|
|
12
16
|
const initialFilters = {
|
|
13
17
|
...(filters ? filters : {}),
|
|
14
18
|
};
|
|
15
|
-
const query = getCasesStringQuery(initialFilters);
|
|
19
|
+
const query = getCasesStringQuery(initialFilters, includes);
|
|
16
20
|
const response = await httpGraphQLAPI.post("", {
|
|
17
21
|
query,
|
|
18
22
|
}, { headers });
|
|
@@ -9,9 +9,7 @@ import { getSerialsStringQuery } from "@zauru-sdk/graphql";
|
|
|
9
9
|
export async function getSerials(session, filters) {
|
|
10
10
|
return handlePossibleAxiosErrors(async () => {
|
|
11
11
|
const headers = await getGraphQLAPIHeaders(session);
|
|
12
|
-
const defaultFilters = {
|
|
13
|
-
name: undefined,
|
|
14
|
-
};
|
|
12
|
+
const defaultFilters = {};
|
|
15
13
|
const finalFilters = { ...defaultFilters, ...filters };
|
|
16
14
|
const response = await httpGraphQLAPI.post("", {
|
|
17
15
|
query: getSerialsStringQuery(finalFilters),
|
|
@@ -2,6 +2,10 @@ import type { Session } from "@remix-run/node";
|
|
|
2
2
|
import { AxiosUtilsResponse, CaseGraphQL } from "@zauru-sdk/types";
|
|
3
3
|
/**
|
|
4
4
|
* getCases
|
|
5
|
+
* @param session
|
|
6
|
+
* @param filters
|
|
7
|
+
* @param includes (optional) Example: ["case_supplies { id }"]
|
|
8
|
+
* @returns
|
|
5
9
|
*/
|
|
6
10
|
export declare function getCases(session: Session, filters?: {
|
|
7
11
|
id?: number;
|
|
@@ -10,6 +14,8 @@ export declare function getCases(session: Session, filters?: {
|
|
|
10
14
|
client_id?: number;
|
|
11
15
|
tag_id?: string;
|
|
12
16
|
limit?: number;
|
|
17
|
+
}, includes?: {
|
|
18
|
+
includeSerial?: boolean;
|
|
13
19
|
}): Promise<AxiosUtilsResponse<CaseGraphQL[]>>;
|
|
14
20
|
/**
|
|
15
21
|
* createCase
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zauru-sdk/services",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.203",
|
|
4
4
|
"description": "Servicios de consulta a Zauru",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@remix-run/node": "^2.8.1",
|
|
27
27
|
"@upstash/redis": "^1.34.5",
|
|
28
|
-
"@zauru-sdk/common": "^2.0.
|
|
28
|
+
"@zauru-sdk/common": "^2.0.203",
|
|
29
29
|
"@zauru-sdk/config": "^2.0.100",
|
|
30
|
-
"@zauru-sdk/graphql": "^2.0.
|
|
31
|
-
"@zauru-sdk/types": "^2.0.
|
|
30
|
+
"@zauru-sdk/graphql": "^2.0.203",
|
|
31
|
+
"@zauru-sdk/types": "^2.0.203",
|
|
32
32
|
"axios": "^1.6.7",
|
|
33
33
|
"chalk": "5.3.0"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "71ffd90ef4de8f031f2b507b38151902caaeb006"
|
|
36
36
|
}
|