@zauru-sdk/services 2.0.105 → 2.0.108
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.
package/dist/esm/cms/index.js
CHANGED
|
@@ -10,7 +10,7 @@ export const getCMSGeneralQuery = async (query) => {
|
|
|
10
10
|
return handlePossibleAxiosErrors(async () => {
|
|
11
11
|
const headers = await getCMSHeaders();
|
|
12
12
|
// Respuesta con clave dinámica basada en query
|
|
13
|
-
const response = await httpCMSAPI.post("", {
|
|
13
|
+
const response = await httpCMSAPI.post("/api/graphql", {
|
|
14
14
|
query,
|
|
15
15
|
}, { headers });
|
|
16
16
|
if (response.data.errors) {
|
|
@@ -12,7 +12,7 @@ export const getGeneralQuery = async (session, query, queryKey // Clave dinámic
|
|
|
12
12
|
return handlePossibleAxiosErrors(async () => {
|
|
13
13
|
const headers = await getGraphQLAPIHeaders(session);
|
|
14
14
|
// Respuesta con clave dinámica basada en queryKey
|
|
15
|
-
const response = await httpGraphQLAPI.post("
|
|
15
|
+
const response = await httpGraphQLAPI.post("", {
|
|
16
16
|
query,
|
|
17
17
|
}, { headers });
|
|
18
18
|
if (response.data.errors) {
|
|
@@ -7,16 +7,16 @@ const headers = {
|
|
|
7
7
|
Accept: "application/json",
|
|
8
8
|
"Content-Type": "application/json",
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
//Le quité la expiración porque era muy corta para recepciones,
|
|
11
|
+
//antes se definía algo así: await fetch(`${redisBaseURL}/set/${id}?EX=${expiresToSeconds(expires)}`
|
|
12
|
+
//Estaba en el createData y en el updateData
|
|
13
13
|
// For more info check https://remix.run/docs/en/v1/api/remix#createsessionstorage
|
|
14
14
|
export function createUpstashSessionStorage({ cookie }) {
|
|
15
15
|
return createSessionStorage({
|
|
16
16
|
cookie,
|
|
17
17
|
async createData(data, expires) {
|
|
18
18
|
const id = crypto.randomUUID();
|
|
19
|
-
await fetch(`${redisBaseURL}/set/${id}
|
|
19
|
+
await fetch(`${redisBaseURL}/set/${id}`, {
|
|
20
20
|
method: "post",
|
|
21
21
|
body: JSON.stringify({ data }),
|
|
22
22
|
headers,
|
|
@@ -36,7 +36,7 @@ export function createUpstashSessionStorage({ cookie }) {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
async updateData(id, data, expires) {
|
|
39
|
-
await fetch(`${redisBaseURL}/set/${id}
|
|
39
|
+
await fetch(`${redisBaseURL}/set/${id}`, {
|
|
40
40
|
method: "post",
|
|
41
41
|
body: JSON.stringify({ data }),
|
|
42
42
|
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.108",
|
|
4
4
|
"description": "Servicios de consulta a Zauru",
|
|
5
5
|
"main": "./dist/esm/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"axios": "^1.6.7",
|
|
32
32
|
"chalk": "5.3.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "23095b77237b31d798f93cd8812ed221fcd862f0"
|
|
35
35
|
}
|