@zauru-sdk/services 1.0.68 → 1.0.71

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.
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getVariablesByName = exports.generateDistinctCode = exports.deleteSessionMessage = exports.saveSessionMessage = exports.getGraphQLAPIHeaders = exports.getHeaders = exports.loginWebApp = void 0;
6
+ exports.actualizarVariables = exports.getVariablesSchemaByName = exports.getVariablesByName = exports.generateDistinctCode = exports.deleteSessionMessage = exports.saveSessionMessage = exports.getGraphQLAPIHeaders = exports.getHeaders = exports.loginWebApp = void 0;
7
7
  const node_1 = require("@remix-run/node");
8
8
  const sessions_js_1 = require("./sessions/sessions.js");
9
9
  const chalk_1 = __importDefault(require("chalk"));
@@ -233,3 +233,45 @@ async function getVariablesByName(headers, session, names) {
233
233
  return returnObject;
234
234
  }
235
235
  exports.getVariablesByName = getVariablesByName;
236
+ async function getVariablesSchemaByName(headers, session, names) {
237
+ //variables
238
+ let variables = [];
239
+ //consulto si ya están guardadas en la sesión
240
+ const tempVars = session.get("variables");
241
+ if (Array.isArray(tempVars) && tempVars.length) {
242
+ //si ya están guardadas, uso esas
243
+ variables = tempVars;
244
+ }
245
+ else {
246
+ //si no están en la sesión, las obtengo de zauru y luego las guardo en la sesión
247
+ //Obtengo mis variables, para tener los tags solicitados
248
+ const response = await (0, zauru_variables_js_1.getVariables)(headers);
249
+ if (response.error) {
250
+ throw new Error(`${response.userMsg} - ${response.msg}`);
251
+ }
252
+ session.set("variables", response.data);
253
+ await (0, sessions_js_1.commitSession)(session);
254
+ variables = response.data ?? [];
255
+ }
256
+ const filtrados = variables.filter((value) => names.includes(value.name));
257
+ return filtrados;
258
+ }
259
+ exports.getVariablesSchemaByName = getVariablesSchemaByName;
260
+ /**
261
+ * Actualiza las variables en la sesión.
262
+ * @param {any} headers - Headers necesarios para la consulta.
263
+ * @param {Session} session - La sesión actual.
264
+ * @returns {Promise<void>}
265
+ */
266
+ async function actualizarVariables(headers, session) {
267
+ // Intentamos obtener las variables desde el servidor
268
+ const response = await (0, zauru_variables_js_1.getVariables)(headers);
269
+ if (response.error) {
270
+ throw new Error(`${response.userMsg} - ${response.msg}`);
271
+ }
272
+ // Guardamos las variables en la sesión
273
+ session.set("variables", response.data);
274
+ await (0, sessions_js_1.commitSession)(session);
275
+ console.log("Variables actualizadas y sesión refrescada.");
276
+ }
277
+ exports.actualizarVariables = actualizarVariables;
@@ -161,6 +161,7 @@ async function getInvoiceFormSubmissionsByAgencyId(session, agency_id, filters)
161
161
  item_ids: filters?.item_ids,
162
162
  startDate: filters?.startDate,
163
163
  endDate: filters?.endDate,
164
+ formZid: filters?.formZid,
164
165
  });
165
166
  const response = await httpGraphQL_js_1.default.post("", {
166
167
  query: queryBuilded,
@@ -168,10 +168,12 @@ exports.getMyAgencyLotStocks = getMyAgencyLotStocks;
168
168
  * @returns
169
169
  */
170
170
  async function updateLote(headers, lot_id, updatedData) {
171
- const response = await httpZauru_js_1.default.patch(`/inventories/lots/${lot_id}.json`, updatedData, {
172
- headers,
171
+ return (0, common_1.handlePossibleAxiosErrors)(async () => {
172
+ const response = await httpZauru_js_1.default.patch(`/inventories/lots/${lot_id}.json`, updatedData, {
173
+ headers,
174
+ });
175
+ return response.data;
173
176
  });
174
- return response.data;
175
177
  }
176
178
  exports.updateLote = updateLote;
177
179
  /**
@@ -3,9 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getPurchasesOrderByIdNumber = exports.deletePurchaseOrder = exports.getGraphQLPurchaseOrderBetweenDates = exports.getPurchaseOrder = exports.getLast100Receptions = exports.updateReceivedPurchaseOrder = exports.updatePurchaseOrder = exports.enablePurchase = exports.getPurchase = exports.getPurchasesList = exports.getPurchasesListDataTables = exports.getNewPurchaseOrderInfo = exports.receivePurchaseOrder = exports.receiveLotPurchaseOrder = exports.createNewAuthorizedPurchaseOrder = exports.createNewPurchaseOrder = exports.markAsReceivePartialPurchaseOrder = exports.markAsReceivePurchaseOrder = void 0;
6
+ exports.getPurchasesOrderByIdNumber = exports.deletePurchaseOrder = exports.getGraphQLPurchaseOrderBetweenDates = exports.getPurchaseOrder = exports.getLast100Receptions = exports.updateReceivedPurchaseOrder = exports.updatePurchaseOrder = exports.enablePurchase = exports.getPurchase = exports.getPurchasesList = exports.getPurchasesListDataTables = exports.getNewPurchaseOrderInfo = exports.receivePurchaseOrder = exports.receiveLotPurchaseOrder = exports.createNewAuthorizedPurchaseOrder = exports.createNewPurchaseOrder = exports.markAsReceivePurchaseOrder = void 0;
7
7
  const common_1 = require("@zauru-sdk/common");
8
- const zauru_receptions_js_1 = require("./zauru-receptions.js");
9
8
  const httpZauru_js_1 = __importDefault(require("./httpZauru.js"));
10
9
  const common_js_1 = require("../common.js");
11
10
  const httpGraphQL_js_1 = __importDefault(require("./httpGraphQL.js"));
@@ -31,25 +30,6 @@ const markAsReceivePurchaseOrder = (headers, body) => {
31
30
  });
32
31
  };
33
32
  exports.markAsReceivePurchaseOrder = markAsReceivePurchaseOrder;
34
- /**
35
- * markAsReceivePartialPurchaseOrder
36
- * @param headers
37
- * @param body
38
- * @returns
39
- */
40
- const markAsReceivePartialPurchaseOrder = (headers, session, body) => {
41
- return (0, common_1.handlePossibleAxiosErrors)(async () => {
42
- const sendBody = { ...body };
43
- if (sendBody.fechaVencimiento) {
44
- await (0, zauru_receptions_js_1.createNewLotPurchaseOrderReception)(headers, session, sendBody);
45
- }
46
- else {
47
- await (0, zauru_receptions_js_1.createNewPurchaseOrderReception)(headers, session, body);
48
- }
49
- return true;
50
- });
51
- };
52
- exports.markAsReceivePartialPurchaseOrder = markAsReceivePartialPurchaseOrder;
53
33
  /**
54
34
  *
55
35
  * @param headers
@@ -365,24 +345,24 @@ const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {
365
345
  itemId: config.itemId,
366
346
  payeeCategoryId: config.payeeCategoryId,
367
347
  betweenIssueDate: config.betweenIssueDate,
348
+ id_number: config.id_number,
368
349
  });
369
350
  const variables = {
370
- ...(config.lotItemIdExclusion
371
- ? { lotItemIdExclusion: config.lotItemIdExclusion }
372
- : {}),
373
- ...(config.poDetailTagId ? { poDetailTagId: config.poDetailTagId } : {}),
374
351
  startDate: (0, common_1.formatDateToUTC)(dates.startDate),
375
352
  endDate: (0, common_1.formatDateToUTC)(dates.endDate),
376
353
  };
377
- const response = await httpGraphQL_js_1.default.post("", {
354
+ const graphQLBody = {
378
355
  query,
379
- variables,
380
- }, { headers });
356
+ };
357
+ if (!config.id_number) {
358
+ graphQLBody.variables = variables;
359
+ }
360
+ const response = await httpGraphQL_js_1.default.post("", graphQLBody, { headers });
381
361
  if (response.data.errors) {
382
362
  throw new Error(response.data.errors.map((x) => x.message).join(";"));
383
363
  }
384
364
  //============ Aplicación de filtros
385
- let responseData = [];
365
+ let responseData = response.data.data.purchase_orders;
386
366
  if (config.withShipmentToMyAgency) {
387
367
  responseData = response.data?.data?.purchase_orders.filter((x) => x.shipment_purchase_orders.some((y) => y.shipment.agency_to_id?.toString() == session.get("agency_id")));
388
368
  }
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createNewLotPurchaseOrderReception = exports.createNewPurchaseOrderReception = exports.deleteReception = exports.createNewReception = void 0;
6
+ exports.createNewPurchaseOrderReception = exports.deleteReception = exports.createNewReception = void 0;
7
7
  const common_1 = require("@zauru-sdk/common");
8
8
  const httpZauru_js_1 = __importDefault(require("./httpZauru.js"));
9
9
  /**
@@ -48,16 +48,25 @@ async function createNewPurchaseOrderReception(headers, session, body) {
48
48
  memo: "LABORATORIO - Recibido parcialmente desde WebApp",
49
49
  purchase_order_id: body.id,
50
50
  needs_transit: false,
51
- agency_id: session.get("agency_id"),
52
- entity_id: session.get("selectedEntity"),
53
51
  received_at: (0, common_1.getDatePickerCurrentDate)(),
54
52
  invoice_number: "",
53
+ agency_id: session.get("agency_id"),
54
+ entity_id: session.get("selectedEntity"),
55
55
  reception_details_attributes: (0, common_1.arrayToObject)(body?.purchase_order_details?.map((x) => {
56
- return {
56
+ const temp = {
57
57
  item_id: x.item_id,
58
58
  purchase_order_detail_id: x.id,
59
- quantity: x.delivered_quantity,
60
59
  };
60
+ if (x.expire_date) {
61
+ temp.lot_delivered_quantity = [`${x.delivered_quantity}`];
62
+ temp.lot_name = [body.id_number];
63
+ temp.lot_expire = [x.expire_date];
64
+ temp.lot_description = [body.id_number];
65
+ }
66
+ else {
67
+ temp.quantity = x.delivered_quantity;
68
+ }
69
+ return temp;
61
70
  })),
62
71
  },
63
72
  purchase_order_id: body.id,
@@ -69,36 +78,3 @@ async function createNewPurchaseOrderReception(headers, session, body) {
69
78
  });
70
79
  }
71
80
  exports.createNewPurchaseOrderReception = createNewPurchaseOrderReception;
72
- /**
73
- *
74
- * @param headers
75
- * @param poId
76
- * @returns
77
- */
78
- async function createNewLotPurchaseOrderReception(headers, session, body) {
79
- return (0, common_1.handlePossibleAxiosErrors)(async () => {
80
- const sendBody = {
81
- memo: "LABORATORIO - Recibido parcialmente desde WebApp",
82
- purchase_order_id: body.id,
83
- needs_transit: false,
84
- received_at: (0, common_1.getDatePickerCurrentDate)(),
85
- invoice_number: "",
86
- agency_id: session.get("agency_id"),
87
- entity_id: session.get("selectedEntity"),
88
- reception_details_attributes: (0, common_1.arrayToObject)(body?.purchase_order_details?.map((x) => {
89
- return {
90
- item_id: x.item_id,
91
- purchase_order_detail_id: x.id,
92
- lot_delivered_quantity: [x.delivered_quantity],
93
- lot_name: [body.id_number],
94
- lot_expire: [body.fechaVencimiento],
95
- };
96
- })),
97
- };
98
- await httpZauru_js_1.default.post(`/purchases/purchase_orders/${body.id}/receptions.json`, { reception: sendBody, purchase_order_id: body.id }, {
99
- headers,
100
- });
101
- return true;
102
- });
103
- }
104
- exports.createNewLotPurchaseOrderReception = createNewLotPurchaseOrderReception;
@@ -3,9 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createVariable = exports.getVariables = void 0;
6
+ exports.updateVariable = exports.createVariable = exports.getVariables = void 0;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
8
  const httpZauru_js_1 = __importDefault(require("./httpZauru.js"));
9
+ const common_1 = require("@zauru-sdk/common");
9
10
  /**
10
11
  * getVariables Function for get all zauru variables
11
12
  * @param headers
@@ -54,3 +55,10 @@ async function createVariable(headers, body) {
54
55
  }
55
56
  }
56
57
  exports.createVariable = createVariable;
58
+ const updateVariable = async (headers, body) => {
59
+ return (0, common_1.handlePossibleAxiosErrors)(async () => {
60
+ await httpZauru_js_1.default.patch(`/apps/webapp_vars/${body.id}.json`, { variable: body }, { headers });
61
+ return true;
62
+ });
63
+ };
64
+ exports.updateVariable = updateVariable;
package/dist/common.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Session } from "@remix-run/node";
2
2
  import { AxiosRequestHeaders } from "axios";
3
- import { EmployeeGraphQL, OauthProfile, ProfileResponse, AgencyGraphQL, AxiosUtilsResponse } from "@zauru-sdk/types";
3
+ import { EmployeeGraphQL, OauthProfile, ProfileResponse, AgencyGraphQL, VariableGraphQL, AxiosUtilsResponse } from "@zauru-sdk/types";
4
4
  /**
5
5
  * loginWebApp
6
6
  * @param session
@@ -53,3 +53,11 @@ export declare function generateDistinctCode(prefix: string): string;
53
53
  export declare function getVariablesByName(headers: any, session: Session, names: Array<string>): Promise<{
54
54
  [key: string]: string;
55
55
  }>;
56
+ export declare function getVariablesSchemaByName(headers: any, session: Session, names: Array<string>): Promise<VariableGraphQL[]>;
57
+ /**
58
+ * Actualiza las variables en la sesión.
59
+ * @param {any} headers - Headers necesarios para la consulta.
60
+ * @param {Session} session - La sesión actual.
61
+ * @returns {Promise<void>}
62
+ */
63
+ export declare function actualizarVariables(headers: any, session: Session): Promise<void>;
@@ -220,3 +220,43 @@ export async function getVariablesByName(headers, session, names) {
220
220
  }
221
221
  return returnObject;
222
222
  }
223
+ export async function getVariablesSchemaByName(headers, session, names) {
224
+ //variables
225
+ let variables = [];
226
+ //consulto si ya están guardadas en la sesión
227
+ const tempVars = session.get("variables");
228
+ if (Array.isArray(tempVars) && tempVars.length) {
229
+ //si ya están guardadas, uso esas
230
+ variables = tempVars;
231
+ }
232
+ else {
233
+ //si no están en la sesión, las obtengo de zauru y luego las guardo en la sesión
234
+ //Obtengo mis variables, para tener los tags solicitados
235
+ const response = await getVariables(headers);
236
+ if (response.error) {
237
+ throw new Error(`${response.userMsg} - ${response.msg}`);
238
+ }
239
+ session.set("variables", response.data);
240
+ await commitSession(session);
241
+ variables = response.data ?? [];
242
+ }
243
+ const filtrados = variables.filter((value) => names.includes(value.name));
244
+ return filtrados;
245
+ }
246
+ /**
247
+ * Actualiza las variables en la sesión.
248
+ * @param {any} headers - Headers necesarios para la consulta.
249
+ * @param {Session} session - La sesión actual.
250
+ * @returns {Promise<void>}
251
+ */
252
+ export async function actualizarVariables(headers, session) {
253
+ // Intentamos obtener las variables desde el servidor
254
+ const response = await getVariables(headers);
255
+ if (response.error) {
256
+ throw new Error(`${response.userMsg} - ${response.msg}`);
257
+ }
258
+ // Guardamos las variables en la sesión
259
+ session.set("variables", response.data);
260
+ await commitSession(session);
261
+ console.log("Variables actualizadas y sesión refrescada.");
262
+ }
@@ -150,6 +150,7 @@ export async function getInvoiceFormSubmissionsByAgencyId(session, agency_id, fi
150
150
  item_ids: filters?.item_ids,
151
151
  startDate: filters?.startDate,
152
152
  endDate: filters?.endDate,
153
+ formZid: filters?.formZid,
153
154
  });
154
155
  const response = await httpGraphQLAPI.post("", {
155
156
  query: queryBuilded,
@@ -156,10 +156,12 @@ export async function getMyAgencyLotStocks(session) {
156
156
  * @returns
157
157
  */
158
158
  export async function updateLote(headers, lot_id, updatedData) {
159
- const response = await httpZauru.patch(`/inventories/lots/${lot_id}.json`, updatedData, {
160
- headers,
159
+ return handlePossibleAxiosErrors(async () => {
160
+ const response = await httpZauru.patch(`/inventories/lots/${lot_id}.json`, updatedData, {
161
+ headers,
162
+ });
163
+ return response.data;
161
164
  });
162
- return response.data;
163
165
  }
164
166
  /**
165
167
  * getLotesExportJSON Function for get all zauru lotes by id_agencia
@@ -1,5 +1,4 @@
1
1
  import { arrayToObject, convertToFormData, formatDateToUTC, getBasketsSchema, handlePossibleAxiosErrors, reduceAdd, } from "@zauru-sdk/common";
2
- import { createNewLotPurchaseOrderReception, createNewPurchaseOrderReception, } from "./zauru-receptions.js";
3
2
  import httpZauru from "./httpZauru.js";
4
3
  import { getGraphQLAPIHeaders, getVariablesByName } from "../common.js";
5
4
  import httpGraphQLAPI from "./httpGraphQL.js";
@@ -24,24 +23,6 @@ export const markAsReceivePurchaseOrder = (headers, body) => {
24
23
  return true;
25
24
  });
26
25
  };
27
- /**
28
- * markAsReceivePartialPurchaseOrder
29
- * @param headers
30
- * @param body
31
- * @returns
32
- */
33
- export const markAsReceivePartialPurchaseOrder = (headers, session, body) => {
34
- return handlePossibleAxiosErrors(async () => {
35
- const sendBody = { ...body };
36
- if (sendBody.fechaVencimiento) {
37
- await createNewLotPurchaseOrderReception(headers, session, sendBody);
38
- }
39
- else {
40
- await createNewPurchaseOrderReception(headers, session, body);
41
- }
42
- return true;
43
- });
44
- };
45
26
  /**
46
27
  *
47
28
  * @param headers
@@ -344,24 +325,24 @@ export const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {
344
325
  itemId: config.itemId,
345
326
  payeeCategoryId: config.payeeCategoryId,
346
327
  betweenIssueDate: config.betweenIssueDate,
328
+ id_number: config.id_number,
347
329
  });
348
330
  const variables = {
349
- ...(config.lotItemIdExclusion
350
- ? { lotItemIdExclusion: config.lotItemIdExclusion }
351
- : {}),
352
- ...(config.poDetailTagId ? { poDetailTagId: config.poDetailTagId } : {}),
353
331
  startDate: formatDateToUTC(dates.startDate),
354
332
  endDate: formatDateToUTC(dates.endDate),
355
333
  };
356
- const response = await httpGraphQLAPI.post("", {
334
+ const graphQLBody = {
357
335
  query,
358
- variables,
359
- }, { headers });
336
+ };
337
+ if (!config.id_number) {
338
+ graphQLBody.variables = variables;
339
+ }
340
+ const response = await httpGraphQLAPI.post("", graphQLBody, { headers });
360
341
  if (response.data.errors) {
361
342
  throw new Error(response.data.errors.map((x) => x.message).join(";"));
362
343
  }
363
344
  //============ Aplicación de filtros
364
- let responseData = [];
345
+ let responseData = response.data.data.purchase_orders;
365
346
  if (config.withShipmentToMyAgency) {
366
347
  responseData = response.data?.data?.purchase_orders.filter((x) => x.shipment_purchase_orders.some((y) => y.shipment.agency_to_id?.toString() == session.get("agency_id")));
367
348
  }
@@ -40,16 +40,25 @@ export async function createNewPurchaseOrderReception(headers, session, body) {
40
40
  memo: "LABORATORIO - Recibido parcialmente desde WebApp",
41
41
  purchase_order_id: body.id,
42
42
  needs_transit: false,
43
- agency_id: session.get("agency_id"),
44
- entity_id: session.get("selectedEntity"),
45
43
  received_at: getDatePickerCurrentDate(),
46
44
  invoice_number: "",
45
+ agency_id: session.get("agency_id"),
46
+ entity_id: session.get("selectedEntity"),
47
47
  reception_details_attributes: arrayToObject(body?.purchase_order_details?.map((x) => {
48
- return {
48
+ const temp = {
49
49
  item_id: x.item_id,
50
50
  purchase_order_detail_id: x.id,
51
- quantity: x.delivered_quantity,
52
51
  };
52
+ if (x.expire_date) {
53
+ temp.lot_delivered_quantity = [`${x.delivered_quantity}`];
54
+ temp.lot_name = [body.id_number];
55
+ temp.lot_expire = [x.expire_date];
56
+ temp.lot_description = [body.id_number];
57
+ }
58
+ else {
59
+ temp.quantity = x.delivered_quantity;
60
+ }
61
+ return temp;
53
62
  })),
54
63
  },
55
64
  purchase_order_id: body.id,
@@ -60,35 +69,3 @@ export async function createNewPurchaseOrderReception(headers, session, body) {
60
69
  return true;
61
70
  });
62
71
  }
63
- /**
64
- *
65
- * @param headers
66
- * @param poId
67
- * @returns
68
- */
69
- export async function createNewLotPurchaseOrderReception(headers, session, body) {
70
- return handlePossibleAxiosErrors(async () => {
71
- const sendBody = {
72
- memo: "LABORATORIO - Recibido parcialmente desde WebApp",
73
- purchase_order_id: body.id,
74
- needs_transit: false,
75
- received_at: getDatePickerCurrentDate(),
76
- invoice_number: "",
77
- agency_id: session.get("agency_id"),
78
- entity_id: session.get("selectedEntity"),
79
- reception_details_attributes: arrayToObject(body?.purchase_order_details?.map((x) => {
80
- return {
81
- item_id: x.item_id,
82
- purchase_order_detail_id: x.id,
83
- lot_delivered_quantity: [x.delivered_quantity],
84
- lot_name: [body.id_number],
85
- lot_expire: [body.fechaVencimiento],
86
- };
87
- })),
88
- };
89
- await httpZauru.post(`/purchases/purchase_orders/${body.id}/receptions.json`, { reception: sendBody, purchase_order_id: body.id }, {
90
- headers,
91
- });
92
- return true;
93
- });
94
- }
@@ -1,5 +1,6 @@
1
1
  import chalk from "chalk";
2
2
  import httpZauru from "./httpZauru.js";
3
+ import { handlePossibleAxiosErrors } from "@zauru-sdk/common";
3
4
  /**
4
5
  * getVariables Function for get all zauru variables
5
6
  * @param headers
@@ -46,3 +47,9 @@ export async function createVariable(headers, body) {
46
47
  };
47
48
  }
48
49
  }
50
+ export const updateVariable = async (headers, body) => {
51
+ return handlePossibleAxiosErrors(async () => {
52
+ await httpZauru.patch(`/apps/webapp_vars/${body.id}.json`, { variable: body }, { headers });
53
+ return true;
54
+ });
55
+ };
@@ -37,6 +37,7 @@ export declare function getInvoiceFormSubmissionsByAgencyId(session: Session, ag
37
37
  some_field_value?: string;
38
38
  item_ids?: number[];
39
39
  bundle_ids?: number[];
40
+ formZid?: number | string;
40
41
  }): Promise<AxiosUtilsResponse<SubmissionInvoicesGraphQL[]>>;
41
42
  /**
42
43
  * getMyCaseFormSubmissions
@@ -53,7 +53,7 @@ export declare function getMyAgencyLotStocks(session: Session): Promise<AxiosUti
53
53
  * @param agency_id
54
54
  * @returns
55
55
  */
56
- export declare function updateLote(headers: any, lot_id: number, updatedData: UpdateLoteBody): Promise<any>;
56
+ export declare function updateLote(headers: any, lot_id: number, updatedData: UpdateLoteBody): Promise<AxiosUtilsResponse<any>>;
57
57
  /**
58
58
  * getLotesExportJSON Function for get all zauru lotes by id_agencia
59
59
  * @param headers
@@ -11,15 +11,6 @@ import { AxiosUtilsResponse, BasketSchema, CreateNewPurchaseOrderBody, DataTable
11
11
  export declare const markAsReceivePurchaseOrder: (headers: any, body: Partial<PurchaseOrderGraphQL> & {
12
12
  fechaVencimiento?: string;
13
13
  }) => Promise<AxiosUtilsResponse<boolean>>;
14
- /**
15
- * markAsReceivePartialPurchaseOrder
16
- * @param headers
17
- * @param body
18
- * @returns
19
- */
20
- export declare const markAsReceivePartialPurchaseOrder: (headers: any, session: Session, body: Partial<PurchaseOrderGraphQL> & {
21
- fechaVencimiento?: string;
22
- }) => Promise<AxiosUtilsResponse<boolean>>;
23
14
  /**
24
15
  *
25
16
  * @param headers
@@ -135,6 +126,7 @@ export declare const getGraphQLPurchaseOrderBetweenDates: (session: Session, dat
135
126
  }, config?: {
136
127
  agencyFilter: boolean;
137
128
  agencyId?: number;
129
+ id_number?: string;
138
130
  useProductionAgencyId?: boolean;
139
131
  consolidateIdFilter?: boolean;
140
132
  lotItemIdExclusion?: number;
@@ -22,12 +22,3 @@ export declare function deleteReception(headers: any, receptionId: string | numb
22
22
  * @returns
23
23
  */
24
24
  export declare function createNewPurchaseOrderReception(headers: any, session: Session, body: Partial<PurchaseOrderGraphQL>): Promise<AxiosUtilsResponse<boolean>>;
25
- /**
26
- *
27
- * @param headers
28
- * @param poId
29
- * @returns
30
- */
31
- export declare function createNewLotPurchaseOrderReception(headers: any, session: Session, body: Partial<PurchaseOrderGraphQL> & {
32
- fechaVencimiento: string;
33
- }): Promise<AxiosUtilsResponse<boolean>>;
@@ -12,3 +12,4 @@ export declare function getVariables(headers: any): Promise<AxiosUtilsResponse<V
12
12
  * @returns
13
13
  */
14
14
  export declare function createVariable(headers: any, body: Partial<VariableGraphQL>): Promise<AxiosUtilsResponse<VariableGraphQL>>;
15
+ export declare const updateVariable: (headers: any, body: Partial<VariableGraphQL>) => Promise<AxiosUtilsResponse<boolean>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "1.0.68",
3
+ "version": "1.0.71",
4
4
  "description": "Servicios de consulta a Zauru",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -25,12 +25,12 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@remix-run/node": "^2.8.1",
28
- "@zauru-sdk/common": "^1.0.60",
28
+ "@zauru-sdk/common": "^1.0.71",
29
29
  "@zauru-sdk/config": "^1.0.60",
30
- "@zauru-sdk/graphql": "^1.0.68",
31
- "@zauru-sdk/types": "^1.0.60",
30
+ "@zauru-sdk/graphql": "^1.0.71",
31
+ "@zauru-sdk/types": "^1.0.69",
32
32
  "axios": "^1.6.7",
33
33
  "chalk": "5.3.0"
34
34
  },
35
- "gitHead": "907be35569dc738a582858bb47d96910ab5dcec3"
35
+ "gitHead": "14735e4cb251cbbb8484920003e813b1da124663"
36
36
  }