@zauru-sdk/services 2.0.213 → 2.0.215

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.
@@ -254,6 +254,18 @@ export const updateReceivedPurchaseOrder = (headers, body, purchase_order_id) =>
254
254
  return response.data;
255
255
  });
256
256
  };
257
+ /**
258
+ * shallowUpdatePurchaseOrder
259
+ * @param headers
260
+ * @param body
261
+ * @returns
262
+ */
263
+ export const shallowUpdatePurchaseOrder = (headers, body) => {
264
+ return handlePossibleAxiosErrors(async () => {
265
+ const response = await httpZauru.put(`/purchases/closed_purchase_orders/${body.id}/shallow_edit.json`, body, { headers });
266
+ return response.data;
267
+ });
268
+ };
257
269
  /**
258
270
  * getLast100Receptions
259
271
  * @param headers
@@ -334,27 +346,7 @@ export const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {})
334
346
  agencyId: finalConfig.agencyFilter
335
347
  ? agency_id ?? session.get("agency_id")
336
348
  : undefined,
337
- consolidateIdFilter: finalConfig.consolidateIdFilter,
338
- lotItemIdExclusion: finalConfig.lotItemIdExclusion,
339
- poDetailTagId: finalConfig.poDetailTagId,
340
- withLotStocks: finalConfig.withLotStocks,
341
- itemId: finalConfig.itemId,
342
- payeeCategoryId: finalConfig.payeeCategoryId,
343
- betweenIssueDate: finalConfig.betweenIssueDate,
344
- payeeId: finalConfig.payeeId,
345
- id_number: finalConfig.id_number,
346
- withPODetails: finalConfig.withPODetails,
347
- withLots: finalConfig.withLots,
348
- withShipmentPurchaseOrders: finalConfig.withShipmentPurchaseOrders,
349
- withWebAppRows: finalConfig.withWebAppRows,
350
- payeeCategoryIds: finalConfig.payeeCategoryIds,
351
- excludePayeeCategoryIds: finalConfig.excludePayeeCategoryIds,
352
- discountComparisonOperator: finalConfig.discountComparisonOperator,
353
- discount: finalConfig.discount,
354
- shipment_reference: finalConfig.shipment_reference,
355
- excludeVoided: finalConfig.excludeVoided,
356
- agencyNameIlike: finalConfig.agencyNameIlike,
357
- reference: finalConfig.reference,
349
+ ...finalConfig,
358
350
  });
359
351
  const graphQLBody = {
360
352
  query,
@@ -113,6 +113,13 @@ export declare const updatePurchaseOrder: (headers: any, body: UpdatePurchaseOrd
113
113
  * @returns
114
114
  */
115
115
  export declare const updateReceivedPurchaseOrder: (headers: any, body: UpdatePurchaseOrderBody, purchase_order_id: number) => Promise<AxiosUtilsResponse<any>>;
116
+ /**
117
+ * shallowUpdatePurchaseOrder
118
+ * @param headers
119
+ * @param body
120
+ * @returns
121
+ */
122
+ export declare const shallowUpdatePurchaseOrder: (headers: any, body: Partial<PurchaseOrderGraphQL>) => Promise<AxiosUtilsResponse<any>>;
116
123
  /**
117
124
  * getLast100Receptions
118
125
  * @param headers
@@ -136,6 +143,7 @@ export declare const getGraphQLPurchaseOrderBetweenDates: (session: Session, dat
136
143
  startDate: string;
137
144
  endDate: string;
138
145
  }, config?: {
146
+ ids?: number[] | string[];
139
147
  agencyFilter?: boolean;
140
148
  agencyId?: number | string;
141
149
  id_number?: string;
@@ -35,7 +35,7 @@ export declare function getShipments(session: Session, config: {
35
35
  * @returns
36
36
  */
37
37
  export declare function receiveShipment_booking(headers: any, id: string | number): Promise<AxiosUtilsResponse<boolean>>;
38
- export declare function receiveTransit(headers: any, body: ShipmentGraphQL): Promise<AxiosUtilsResponse<boolean>>;
38
+ export declare function receiveTransit(headers: any, body: Partial<ShipmentGraphQL>): Promise<AxiosUtilsResponse<boolean>>;
39
39
  /**
40
40
  * despacharShipment_booking
41
41
  * Esta función cambia el atributo 'shipment' de los envíos a 'true', lo que indica que el envío está en tránsito.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "2.0.213",
3
+ "version": "2.0.215",
4
4
  "description": "Servicios de consulta a Zauru",
5
5
  "main": "./dist/esm/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -27,10 +27,10 @@
27
27
  "@upstash/redis": "^1.34.5",
28
28
  "@zauru-sdk/common": "^2.0.210",
29
29
  "@zauru-sdk/config": "^2.0.100",
30
- "@zauru-sdk/graphql": "^2.0.213",
30
+ "@zauru-sdk/graphql": "^2.0.215",
31
31
  "@zauru-sdk/types": "^2.0.210",
32
32
  "axios": "^1.6.7",
33
33
  "chalk": "5.3.0"
34
34
  },
35
- "gitHead": "052200a1481b4d079fa4adecaec4b5add072338d"
35
+ "gitHead": "de66fec20d71561f11b35a0113838db838db6b56"
36
36
  }