@zauru-sdk/services 2.0.214 → 2.0.216

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,20 @@ 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 id = body.id;
266
+ delete body.id;
267
+ const response = await httpZauru.patch(`/purchases/closed_purchase_orders/${id}/shallow_update.json`, { purchase_order: body }, { headers });
268
+ return response.data;
269
+ });
270
+ };
257
271
  /**
258
272
  * getLast100Receptions
259
273
  * @param headers
@@ -334,27 +348,7 @@ export const getGraphQLPurchaseOrderBetweenDates = (session, dates, config = {})
334
348
  agencyId: finalConfig.agencyFilter
335
349
  ? agency_id ?? session.get("agency_id")
336
350
  : 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,
351
+ ...finalConfig,
358
352
  });
359
353
  const graphQLBody = {
360
354
  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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zauru-sdk/services",
3
- "version": "2.0.214",
3
+ "version": "2.0.216",
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.216",
31
31
  "@zauru-sdk/types": "^2.0.210",
32
32
  "axios": "^1.6.7",
33
33
  "chalk": "5.3.0"
34
34
  },
35
- "gitHead": "8042a887c9d8aea2f92918bac09e5f262524a245"
35
+ "gitHead": "66b6f658705bd4642f63be3a28a0f24aebce73d7"
36
36
  }