@pimia/sdk 0.14.0 → 0.16.0

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/api.d.ts CHANGED
@@ -3774,6 +3774,13 @@ export interface paths {
3774
3774
  * líneas con `item_id`, y un artículo con `opening_stock` NULL («nunca ha
3775
3775
  * llevado stock») no se estrena por una compra — se estrena en su ficha o
3776
3776
  * con un ajuste, que son los gestos que significan «declaro existencias».
3777
+ *
3778
+ * ⚠️ **El almacén se puede declarar AQUÍ** (`warehouse_id`, opcional, N2) y
3779
+ * no solo en la factura: dónde se guarda la mercancía se sabe al recibirla
3780
+ * —descargando el camión—, no al teclear la factura que el OCR acaba de
3781
+ * crear. Lo que llegue aquí manda sobre lo que declarara el documento, y
3782
+ * se GUARDA en él: si el documento dijera una cosa y el almacén moviera
3783
+ * otra, la ficha estaría mintiendo sobre lo que hizo.
3777
3784
  */
3778
3785
  post: operations["receivedInvoices.markGoodsReceived"];
3779
3786
  delete?: never;
@@ -4614,6 +4621,113 @@ export interface paths {
4614
4621
  patch?: never;
4615
4622
  trace?: never;
4616
4623
  };
4624
+ "/stock-counts/{id}/confirm": {
4625
+ parameters: {
4626
+ query?: never;
4627
+ header?: never;
4628
+ path?: never;
4629
+ cookie?: never;
4630
+ };
4631
+ get?: never;
4632
+ put?: never;
4633
+ /**
4634
+ * Confirma el recuento: emite los ajustes en bloque contra el libro
4635
+ * @description Una línea por artículo contado y con diferencia, con motivo `count` y el
4636
+ * recuento como documento de origen. Lo que NO emite nada:
4637
+ *
4638
+ * - las líneas **sin contar** (`counted_quantity` NULL) — nadie miró esa
4639
+ * estantería, y suponer que está vacía sería inventarse un dato;
4640
+ * - las que **cuadran** con el saldo del momento — el libro anota lo que
4641
+ * le pasó al contador, no lo que un documento quiso hacerle.
4642
+ *
4643
+ * Todo va en UNA transacción: un recuento a medias dejaría el almacén en
4644
+ * un estado que ni la realidad ni el sistema han tenido nunca.
4645
+ */
4646
+ post: operations["stockCounts.confirm"];
4647
+ delete?: never;
4648
+ options?: never;
4649
+ head?: never;
4650
+ patch?: never;
4651
+ trace?: never;
4652
+ };
4653
+ "/stock-counts/{id}/cancel": {
4654
+ parameters: {
4655
+ query?: never;
4656
+ header?: never;
4657
+ path?: never;
4658
+ cookie?: never;
4659
+ };
4660
+ get?: never;
4661
+ put?: never;
4662
+ /**
4663
+ * Cancela un borrador: no emite nada y deja constancia de que se abrió y
4664
+ * no se cerró. Un recuento confirmado no se cancela — ya movió el almacén
4665
+ */
4666
+ post: operations["stockCounts.cancel"];
4667
+ delete?: never;
4668
+ options?: never;
4669
+ head?: never;
4670
+ patch?: never;
4671
+ trace?: never;
4672
+ };
4673
+ "/stock-counts": {
4674
+ parameters: {
4675
+ query?: never;
4676
+ header?: never;
4677
+ path?: never;
4678
+ cookie?: never;
4679
+ };
4680
+ /** Los recuentos de la empresa, del más nuevo al más viejo */
4681
+ get: operations["stock-counts.index"];
4682
+ put?: never;
4683
+ /**
4684
+ * Abre un recuento
4685
+ * @description Nace **sembrado** con lo que el almacén dice tener ahora (`seed`, por
4686
+ * defecto sí): contar es corregir una lista, no escribirla de cero. Se
4687
+ * siembran los artículos con saldo distinto de cero — una lista con las
4688
+ * doscientas referencias que el almacén NO tiene es una lista que nadie
4689
+ * lee. Lo que aparezca de más se añade contando (`PUT` con su `item_id`).
4690
+ */
4691
+ post: operations["stock-counts.store"];
4692
+ delete?: never;
4693
+ options?: never;
4694
+ head?: never;
4695
+ patch?: never;
4696
+ trace?: never;
4697
+ };
4698
+ "/stock-counts/{stock_count}": {
4699
+ parameters: {
4700
+ query?: never;
4701
+ header?: never;
4702
+ path?: never;
4703
+ cookie?: never;
4704
+ };
4705
+ get: operations["stock-counts.show"];
4706
+ /**
4707
+ * Cuenta: escribe lo contado de cada línea
4708
+ * @description Las líneas se UPSERTAN por artículo y no se borran y recrean, que es lo
4709
+ * que hacen los documentos de venta: aquí `expected_quantity` es la foto
4710
+ * de lo que el sistema creía cuando se dibujó la línea, y recrearla la
4711
+ * refrescaría en silencio — perdiendo justo el dato que permite avisar de
4712
+ * que algo se movió mientras se contaba. Un artículo que no venga en la
4713
+ * petición se queda como estaba.
4714
+ *
4715
+ * Un recuento confirmado o cancelado no se edita: **422**.
4716
+ */
4717
+ put: operations["stock-counts.update"];
4718
+ post?: never;
4719
+ /**
4720
+ * Borra un recuento que no ha movido nada
4721
+ * @description Un confirmado no se borra: sus asientos explican saldos de hoy, y
4722
+ * borrarlo dejaría el libro nombrando un documento que no existe. Para el
4723
+ * que se abrió y no se cerró está `cancel`.
4724
+ */
4725
+ delete: operations["stock-counts.destroy"];
4726
+ options?: never;
4727
+ head?: never;
4728
+ patch?: never;
4729
+ trace?: never;
4730
+ };
4617
4731
  "/stock-movements": {
4618
4732
  parameters: {
4619
4733
  query?: never;
@@ -8088,6 +8202,15 @@ export interface components {
8088
8202
  is_active: boolean;
8089
8203
  is_time_trackable: boolean;
8090
8204
  opening_stock: number;
8205
+ /**
8206
+ * @description Lo COMPROMETIDO por documentos que aún no han movido el almacén
8207
+ * (N2 · pieza 3, cifra derivada — nadie la escribe). ⚠️ `null` NO
8208
+ * es cero: es «no se está calculando» (módulo `stock` sin
8209
+ * instalar, o el ciclo de inventario apagado). Pintar un 0 ahí
8210
+ * afirmaría «nada comprometido», que es lo que no se sabe.
8211
+ * El porqué entero, en {@see \App\Support\StockCommitments}.
8212
+ */
8213
+ committed_quantity: number | null;
8091
8214
  stock_alert_qty: number | null;
8092
8215
  allow_sale_without_stock: boolean;
8093
8216
  purchase_tax_type_id: number | null;
@@ -8131,6 +8254,13 @@ export interface components {
8131
8254
  is_active: boolean;
8132
8255
  is_time_trackable: boolean;
8133
8256
  opening_stock: number;
8257
+ /**
8258
+ * @description Igual que en el recurso completo: `null` es «no se está
8259
+ * calculando», no cero (N2 · pieza 3). La celda de stock del
8260
+ * listado del panel lo lee de aquí — el índice del catálogo va
8261
+ * por `?view=summary`.
8262
+ */
8263
+ committed_quantity: number | null;
8134
8264
  stock_alert_qty: number | null;
8135
8265
  allow_sale_without_stock: boolean;
8136
8266
  /** Format: date-time */
@@ -8156,6 +8286,15 @@ export interface components {
8156
8286
  item_name: string;
8157
8287
  warehouse_id: number;
8158
8288
  quantity: number;
8289
+ /**
8290
+ * @description Lo que el ARTÍCULO tiene comprometido — global, no de este
8291
+ * almacén (N2 · pieza 3). El nombre lleva el `item_` delante por
8292
+ * eso: en una fila que habla de una nave, «comprometido» a secas
8293
+ * se leería como «comprometido aquí», y de los dos documentos que
8294
+ * comprometen solo el albarán declara almacén. `null` = no se
8295
+ * está calculando; nunca es cero.
8296
+ */
8297
+ item_committed_quantity: number | null;
8159
8298
  };
8160
8299
  /** ItemsRequest */
8161
8300
  ItemsRequest: {
@@ -8967,7 +9106,7 @@ export interface components {
8967
9106
  * ningún permiso es una operación legítima, y `required` la
8968
9107
  * prohibiría (un array vacío no pasa `required`).
8969
9108
  */
8970
- abilities: ("dashboard" | "view-customer" | "create-customer" | "edit-customer" | "delete-customer" | "view-estimate" | "create-estimate" | "edit-estimate" | "delete-estimate" | "send-estimate" | "view-invoice" | "create-invoice" | "edit-invoice" | "delete-invoice" | "send-invoice" | "view-recurring-invoice" | "create-recurring-invoice" | "edit-recurring-invoice" | "delete-recurring-invoice" | "view-payment" | "create-payment" | "edit-payment" | "delete-payment" | "send-payment" | "view-expense" | "create-expense" | "edit-expense" | "delete-expense" | "view-delivery-note" | "create-delivery-note" | "edit-delivery-note" | "delete-delivery-note" | "view-item" | "create-item" | "edit-item" | "delete-item" | "view-lead" | "create-lead" | "edit-lead" | "delete-lead" | "convert-lead" | "view-contact" | "create-contact" | "edit-contact" | "delete-contact" | "view-project" | "create-project" | "edit-project" | "delete-project" | "view-task" | "create-task" | "edit-task" | "delete-task" | "view-own-task" | "edit-own-task" | "view-time-entry" | "create-time-entry" | "edit-time-entry" | "delete-time-entry" | "view-own-time-entry" | "create-own-time-entry" | "edit-own-time-entry" | "delete-own-time-entry" | "view-tax-type" | "create-tax-type" | "edit-tax-type" | "delete-tax-type" | "view-custom-field" | "create-custom-field" | "edit-custom-field" | "delete-custom-field" | "view-role" | "create-role" | "edit-role" | "delete-role" | "view-financial-reports" | "view-all-notes" | "manage-all-notes" | "time_clock.punch" | "time_clock.view_own" | "time_clock.view_team" | "time_clock.correct" | "absence.request" | "absence.approve" | "report.download_legal" | "view-employee" | "create-employee" | "edit-employee" | "delete-employee" | "view-work-schedule" | "manage-work-schedule" | "view-work-calendar" | "manage-work-calendar" | "pos.operate" | "pos.supervise" | "pos.void" | "pos.discount_high" | "pos.cash_movement" | "pos.return" | "pos.admin" | "pos.report" | "view-appointment" | "create-appointment" | "edit-appointment" | "delete-appointment" | "view-contract" | "create-contract" | "edit-contract" | "delete-contract" | "view-warehouse" | "create-warehouse" | "edit-warehouse" | "delete-warehouse")[];
9109
+ abilities: ("dashboard" | "view-customer" | "create-customer" | "edit-customer" | "delete-customer" | "view-estimate" | "create-estimate" | "edit-estimate" | "delete-estimate" | "send-estimate" | "view-invoice" | "create-invoice" | "edit-invoice" | "delete-invoice" | "send-invoice" | "view-recurring-invoice" | "create-recurring-invoice" | "edit-recurring-invoice" | "delete-recurring-invoice" | "view-payment" | "create-payment" | "edit-payment" | "delete-payment" | "send-payment" | "view-expense" | "create-expense" | "edit-expense" | "delete-expense" | "view-delivery-note" | "create-delivery-note" | "edit-delivery-note" | "delete-delivery-note" | "view-item" | "create-item" | "edit-item" | "delete-item" | "view-lead" | "create-lead" | "edit-lead" | "delete-lead" | "convert-lead" | "view-contact" | "create-contact" | "edit-contact" | "delete-contact" | "view-project" | "create-project" | "edit-project" | "delete-project" | "view-task" | "create-task" | "edit-task" | "delete-task" | "view-own-task" | "edit-own-task" | "view-time-entry" | "create-time-entry" | "edit-time-entry" | "delete-time-entry" | "view-own-time-entry" | "create-own-time-entry" | "edit-own-time-entry" | "delete-own-time-entry" | "view-tax-type" | "create-tax-type" | "edit-tax-type" | "delete-tax-type" | "view-custom-field" | "create-custom-field" | "edit-custom-field" | "delete-custom-field" | "view-role" | "create-role" | "edit-role" | "delete-role" | "view-financial-reports" | "view-all-notes" | "manage-all-notes" | "time_clock.punch" | "time_clock.view_own" | "time_clock.view_team" | "time_clock.correct" | "absence.request" | "absence.approve" | "report.download_legal" | "view-employee" | "create-employee" | "edit-employee" | "delete-employee" | "view-work-schedule" | "manage-work-schedule" | "view-work-calendar" | "manage-work-calendar" | "pos.operate" | "pos.supervise" | "pos.void" | "pos.discount_high" | "pos.cash_movement" | "pos.return" | "pos.admin" | "pos.report" | "view-appointment" | "create-appointment" | "edit-appointment" | "delete-appointment" | "view-contract" | "create-contract" | "edit-contract" | "delete-contract" | "view-warehouse" | "create-warehouse" | "edit-warehouse" | "delete-warehouse" | "view-stock-count" | "create-stock-count" | "edit-stock-count" | "delete-stock-count")[];
8971
9110
  };
8972
9111
  /**
8973
9112
  * RoleRequest
@@ -8992,7 +9131,7 @@ export interface components {
8992
9131
  name: string;
8993
9132
  abilities?: {
8994
9133
  /** @enum {string} */
8995
- ability: "dashboard" | "view-customer" | "create-customer" | "edit-customer" | "delete-customer" | "view-estimate" | "create-estimate" | "edit-estimate" | "delete-estimate" | "send-estimate" | "view-invoice" | "create-invoice" | "edit-invoice" | "delete-invoice" | "send-invoice" | "view-recurring-invoice" | "create-recurring-invoice" | "edit-recurring-invoice" | "delete-recurring-invoice" | "view-payment" | "create-payment" | "edit-payment" | "delete-payment" | "send-payment" | "view-expense" | "create-expense" | "edit-expense" | "delete-expense" | "view-delivery-note" | "create-delivery-note" | "edit-delivery-note" | "delete-delivery-note" | "view-item" | "create-item" | "edit-item" | "delete-item" | "view-lead" | "create-lead" | "edit-lead" | "delete-lead" | "convert-lead" | "view-contact" | "create-contact" | "edit-contact" | "delete-contact" | "view-project" | "create-project" | "edit-project" | "delete-project" | "view-task" | "create-task" | "edit-task" | "delete-task" | "view-own-task" | "edit-own-task" | "view-time-entry" | "create-time-entry" | "edit-time-entry" | "delete-time-entry" | "view-own-time-entry" | "create-own-time-entry" | "edit-own-time-entry" | "delete-own-time-entry" | "view-tax-type" | "create-tax-type" | "edit-tax-type" | "delete-tax-type" | "view-custom-field" | "create-custom-field" | "edit-custom-field" | "delete-custom-field" | "view-role" | "create-role" | "edit-role" | "delete-role" | "view-financial-reports" | "view-all-notes" | "manage-all-notes" | "time_clock.punch" | "time_clock.view_own" | "time_clock.view_team" | "time_clock.correct" | "absence.request" | "absence.approve" | "report.download_legal" | "view-employee" | "create-employee" | "edit-employee" | "delete-employee" | "view-work-schedule" | "manage-work-schedule" | "view-work-calendar" | "manage-work-calendar" | "pos.operate" | "pos.supervise" | "pos.void" | "pos.discount_high" | "pos.cash_movement" | "pos.return" | "pos.admin" | "pos.report" | "view-appointment" | "create-appointment" | "edit-appointment" | "delete-appointment" | "view-contract" | "create-contract" | "edit-contract" | "delete-contract" | "view-warehouse" | "create-warehouse" | "edit-warehouse" | "delete-warehouse";
9134
+ ability: "dashboard" | "view-customer" | "create-customer" | "edit-customer" | "delete-customer" | "view-estimate" | "create-estimate" | "edit-estimate" | "delete-estimate" | "send-estimate" | "view-invoice" | "create-invoice" | "edit-invoice" | "delete-invoice" | "send-invoice" | "view-recurring-invoice" | "create-recurring-invoice" | "edit-recurring-invoice" | "delete-recurring-invoice" | "view-payment" | "create-payment" | "edit-payment" | "delete-payment" | "send-payment" | "view-expense" | "create-expense" | "edit-expense" | "delete-expense" | "view-delivery-note" | "create-delivery-note" | "edit-delivery-note" | "delete-delivery-note" | "view-item" | "create-item" | "edit-item" | "delete-item" | "view-lead" | "create-lead" | "edit-lead" | "delete-lead" | "convert-lead" | "view-contact" | "create-contact" | "edit-contact" | "delete-contact" | "view-project" | "create-project" | "edit-project" | "delete-project" | "view-task" | "create-task" | "edit-task" | "delete-task" | "view-own-task" | "edit-own-task" | "view-time-entry" | "create-time-entry" | "edit-time-entry" | "delete-time-entry" | "view-own-time-entry" | "create-own-time-entry" | "edit-own-time-entry" | "delete-own-time-entry" | "view-tax-type" | "create-tax-type" | "edit-tax-type" | "delete-tax-type" | "view-custom-field" | "create-custom-field" | "edit-custom-field" | "delete-custom-field" | "view-role" | "create-role" | "edit-role" | "delete-role" | "view-financial-reports" | "view-all-notes" | "manage-all-notes" | "time_clock.punch" | "time_clock.view_own" | "time_clock.view_team" | "time_clock.correct" | "absence.request" | "absence.approve" | "report.download_legal" | "view-employee" | "create-employee" | "edit-employee" | "delete-employee" | "view-work-schedule" | "manage-work-schedule" | "view-work-calendar" | "manage-work-calendar" | "pos.operate" | "pos.supervise" | "pos.void" | "pos.discount_high" | "pos.cash_movement" | "pos.return" | "pos.admin" | "pos.report" | "view-appointment" | "create-appointment" | "edit-appointment" | "delete-appointment" | "view-contract" | "create-contract" | "edit-contract" | "delete-contract" | "view-warehouse" | "create-warehouse" | "edit-warehouse" | "delete-warehouse" | "view-stock-count" | "create-stock-count" | "edit-stock-count" | "delete-stock-count";
8996
9135
  }[] | null;
8997
9136
  };
8998
9137
  /** RoleResource */
@@ -9093,6 +9232,78 @@ export interface components {
9093
9232
  */
9094
9233
  warehouse_id?: number | null;
9095
9234
  };
9235
+ /** StockCountLineResource */
9236
+ StockCountLineResource: {
9237
+ id: number;
9238
+ item_id: number;
9239
+ item_name: string;
9240
+ /** @description Lo que el sistema creía CUANDO SE DIBUJÓ la línea. */
9241
+ expected_quantity: number;
9242
+ /**
9243
+ * @description Lo contado. NULL = todavía no se ha contado, que NO es contar
9244
+ * cero: una estantería vacía es un dato y una que nadie ha mirado
9245
+ * no lo es. Las que llegan aquí en NULL no emiten nada al
9246
+ * confirmar.
9247
+ */
9248
+ counted_quantity: number | null;
9249
+ /**
9250
+ * @description La diferencia que se ENSEÑA mientras se cuenta. ⚠️ No es la que
9251
+ * se aplica al confirmar: esa se calcula contra el saldo de ese
9252
+ * momento, porque contar dice «aquí hay 12», no «quítale 3».
9253
+ */
9254
+ difference: number | null;
9255
+ /**
9256
+ * @description El asiento que esta línea emitió al confirmar, si emitió alguno
9257
+ * (una línea que cuadra no escribe nada en el libro).
9258
+ */
9259
+ stock_movement_id: number | null;
9260
+ };
9261
+ /** StockCountRequest */
9262
+ StockCountRequest: {
9263
+ /** Format: date-time */
9264
+ count_date: string;
9265
+ notes?: string | null;
9266
+ warehouse_id?: number | null;
9267
+ /**
9268
+ * @description Sembrar el recuento con lo que el almacén tiene ahora. Solo se
9269
+ * mira en el alta.
9270
+ */
9271
+ seed?: boolean | null;
9272
+ lines?: {
9273
+ item_id: number;
9274
+ counted_quantity: number | null;
9275
+ }[] | null;
9276
+ };
9277
+ /** StockCountResource */
9278
+ StockCountResource: {
9279
+ id: number;
9280
+ count_number: string;
9281
+ sequence_number: number;
9282
+ /**
9283
+ * @description DRAFT | CONFIRMED | CANCELLED. Un confirmado es historia: ya
9284
+ * emitió sus asientos, y no se edita ni se borra.
9285
+ */
9286
+ status: string;
9287
+ /** Format: date-time */
9288
+ count_date: string;
9289
+ /**
9290
+ * @description De qué almacén se contó. NULL solo si el almacén se borró
9291
+ * después: el recuento sobrevive a lo que nombra.
9292
+ */
9293
+ warehouse_id: number | null;
9294
+ warehouse_name: string | null;
9295
+ notes: string | null;
9296
+ /**
9297
+ * Format: date-time
9298
+ * @description Cuándo se confirmó, no solo si: dice además el instante, como
9299
+ * los dos candados del ciclo de stock.
9300
+ */
9301
+ confirmed_at: string | null;
9302
+ creator_id: number | null;
9303
+ /** Format: date-time */
9304
+ created_at: string | null;
9305
+ lines?: components["schemas"]["StockCountLineResource"][];
9306
+ };
9096
9307
  /** StockMovementResource */
9097
9308
  StockMovementResource: {
9098
9309
  id: number;
@@ -17990,7 +18201,13 @@ export interface operations {
17990
18201
  };
17991
18202
  cookie?: never;
17992
18203
  };
17993
- requestBody?: never;
18204
+ requestBody?: {
18205
+ content: {
18206
+ "application/json": {
18207
+ warehouse_id?: number | null;
18208
+ };
18209
+ };
18210
+ };
17994
18211
  responses: {
17995
18212
  /** @description `ReceivedInvoiceResource` */
17996
18213
  200: {
@@ -18003,19 +18220,7 @@ export interface operations {
18003
18220
  };
18004
18221
  };
18005
18222
  };
18006
- 422: {
18007
- headers: {
18008
- [name: string]: unknown;
18009
- };
18010
- content: {
18011
- "application/json": {
18012
- /** @constant */
18013
- error: "goods_already_received";
18014
- /** @constant */
18015
- message: "La mercancía de esta factura recibida ya se sumó al almacén.";
18016
- };
18017
- };
18018
- };
18223
+ 422: components["responses"]["ValidationException"];
18019
18224
  };
18020
18225
  };
18021
18226
  "reconciliation.transactions": {
@@ -19565,12 +19770,215 @@ export interface operations {
19565
19770
  422: components["responses"]["ValidationException"];
19566
19771
  };
19567
19772
  };
19773
+ "stockCounts.confirm": {
19774
+ parameters: {
19775
+ query?: never;
19776
+ header?: never;
19777
+ path: {
19778
+ id: string;
19779
+ };
19780
+ cookie?: never;
19781
+ };
19782
+ requestBody?: never;
19783
+ responses: {
19784
+ 200: {
19785
+ headers: {
19786
+ [name: string]: unknown;
19787
+ };
19788
+ content: {
19789
+ "application/json": {
19790
+ data: {
19791
+ id: number;
19792
+ status: string;
19793
+ };
19794
+ meta: {
19795
+ adjusted_lines: number;
19796
+ unchanged_lines: number;
19797
+ uncounted_lines: number;
19798
+ moved_while_counting: number;
19799
+ };
19800
+ };
19801
+ };
19802
+ };
19803
+ 403: components["responses"]["AuthorizationException"];
19804
+ };
19805
+ };
19806
+ "stockCounts.cancel": {
19807
+ parameters: {
19808
+ query?: never;
19809
+ header?: never;
19810
+ path: {
19811
+ id: string;
19812
+ };
19813
+ cookie?: never;
19814
+ };
19815
+ requestBody?: never;
19816
+ responses: {
19817
+ /**
19818
+ * @description `StockCountResource`
19819
+ *
19820
+ * Confirmar un recuento en el que nadie contó nada no es «cuadrar
19821
+ * el almacén»: es no haber contado. Decirlo es mejor que sellar un
19822
+ * documento vacío que después parecerá un inventario hecho.
19823
+ */
19824
+ 200: {
19825
+ headers: {
19826
+ [name: string]: unknown;
19827
+ };
19828
+ content: {
19829
+ "application/json": {
19830
+ data: components["schemas"]["StockCountResource"];
19831
+ } | string;
19832
+ };
19833
+ };
19834
+ 403: components["responses"]["AuthorizationException"];
19835
+ };
19836
+ };
19837
+ "stock-counts.index": {
19838
+ parameters: {
19839
+ query?: {
19840
+ /** @description Solo los de este estado (`DRAFT`, `CONFIRMED`, `CANCELLED`). */
19841
+ status?: string;
19842
+ /** @description Solo los de este almacén. */
19843
+ warehouse_id?: number;
19844
+ };
19845
+ header?: never;
19846
+ path?: never;
19847
+ cookie?: never;
19848
+ };
19849
+ requestBody?: never;
19850
+ responses: {
19851
+ /** @description Array of `StockCountResource` */
19852
+ 200: {
19853
+ headers: {
19854
+ [name: string]: unknown;
19855
+ };
19856
+ content: {
19857
+ "application/json": {
19858
+ data: components["schemas"]["StockCountResource"][];
19859
+ };
19860
+ };
19861
+ };
19862
+ 403: components["responses"]["AuthorizationException"];
19863
+ };
19864
+ };
19865
+ "stock-counts.store": {
19866
+ parameters: {
19867
+ query?: never;
19868
+ header?: never;
19869
+ path?: never;
19870
+ cookie?: never;
19871
+ };
19872
+ requestBody: {
19873
+ content: {
19874
+ "application/json": components["schemas"]["StockCountRequest"];
19875
+ };
19876
+ };
19877
+ responses: {
19878
+ /** @description El recurso recién creado. */
19879
+ 201: {
19880
+ headers: {
19881
+ [name: string]: unknown;
19882
+ };
19883
+ content: {
19884
+ "application/json": 201;
19885
+ };
19886
+ };
19887
+ 403: components["responses"]["AuthorizationException"];
19888
+ 422: components["responses"]["ValidationException"];
19889
+ };
19890
+ };
19891
+ "stock-counts.show": {
19892
+ parameters: {
19893
+ query?: never;
19894
+ header?: never;
19895
+ path: {
19896
+ stock_count: string;
19897
+ };
19898
+ cookie?: never;
19899
+ };
19900
+ requestBody?: never;
19901
+ responses: {
19902
+ /** @description `StockCountResource` */
19903
+ 200: {
19904
+ headers: {
19905
+ [name: string]: unknown;
19906
+ };
19907
+ content: {
19908
+ "application/json": {
19909
+ data: components["schemas"]["StockCountResource"] & Record<string, never>;
19910
+ };
19911
+ };
19912
+ };
19913
+ 403: components["responses"]["AuthorizationException"];
19914
+ };
19915
+ };
19916
+ "stock-counts.update": {
19917
+ parameters: {
19918
+ query?: never;
19919
+ header?: never;
19920
+ path: {
19921
+ stock_count: string;
19922
+ };
19923
+ cookie?: never;
19924
+ };
19925
+ requestBody: {
19926
+ content: {
19927
+ "application/json": components["schemas"]["StockCountRequest"];
19928
+ };
19929
+ };
19930
+ responses: {
19931
+ /**
19932
+ * @description `StockCountResource`
19933
+ *
19934
+ * Confirmar un recuento en el que nadie contó nada no es «cuadrar
19935
+ * el almacén»: es no haber contado. Decirlo es mejor que sellar un
19936
+ * documento vacío que después parecerá un inventario hecho.
19937
+ */
19938
+ 200: {
19939
+ headers: {
19940
+ [name: string]: unknown;
19941
+ };
19942
+ content: {
19943
+ "application/json": {
19944
+ data: components["schemas"]["StockCountResource"] & Record<string, never>;
19945
+ } | string;
19946
+ };
19947
+ };
19948
+ 403: components["responses"]["AuthorizationException"];
19949
+ 422: components["responses"]["ValidationException"];
19950
+ };
19951
+ };
19952
+ "stock-counts.destroy": {
19953
+ parameters: {
19954
+ query?: never;
19955
+ header?: never;
19956
+ path: {
19957
+ stock_count: string;
19958
+ };
19959
+ cookie?: never;
19960
+ };
19961
+ requestBody?: never;
19962
+ responses: {
19963
+ 200: {
19964
+ headers: {
19965
+ [name: string]: unknown;
19966
+ };
19967
+ content: {
19968
+ "application/json": {
19969
+ success: string;
19970
+ };
19971
+ };
19972
+ };
19973
+ 403: components["responses"]["AuthorizationException"];
19974
+ };
19975
+ };
19568
19976
  "stockMovements.index": {
19569
19977
  parameters: {
19570
19978
  query?: {
19571
19979
  /** @description Solo los asientos de este artículo. */
19572
19980
  item_id?: number;
19573
- /** @description Solo los asientos con este motivo (`initial`, `import`, `manual_edit`, `manual_adjustment`, `purchase`, `sale_invoice`, `delivery_note`, `pos_sale`, `pos_return`). */
19981
+ /** @description Solo los asientos con este motivo (`initial`, `import`, `manual_edit`, `manual_adjustment`, `purchase`, `sale_invoice`, `delivery_note`, `pos_sale`, `pos_return`, `count`). */
19574
19982
  reason?: string;
19575
19983
  /** @description Solo los asientos de este almacén. */
19576
19984
  warehouse_id?: number;
@@ -19645,6 +20053,46 @@ export interface operations {
19645
20053
  warehouse_name: string;
19646
20054
  quantity: number;
19647
20055
  }[];
20056
+ /**
20057
+ * @description Lo COMPROMETIDO y lo DISPONIBLE (N2 · pieza 3). Cifra
20058
+ * derivada: nadie la escribe, se calcula al preguntarla.
20059
+ * `null` ENTERO = no se está calculando (módulo `stock` sin
20060
+ * instalar o ciclo de inventario apagado); un cero ahí
20061
+ * afirmaría «nada comprometido», que es lo que no se sabe. El desglose viaja entero y sin paginar, como
20062
+ * `warehouse_stock`: es cabecera de pestaña, y son los
20063
+ * borradores vivos de UN artículo, que en una pyme se cuentan
20064
+ * con los dedos. Va aquí y no en un endpoint aparte porque la
20065
+ * pregunta es la misma que abre el libro — «¿por qué tengo
20066
+ * 47?» y «¿por qué solo puedo vender 35?» se responden en la
20067
+ * misma pantalla.
20068
+ */
20069
+ committed: {
20070
+ quantity: number;
20071
+ /**
20072
+ * @description ⚠️ `null` cuando el artículo NUNCA ha llevado stock
20073
+ * (`opening_stock` NULL, la distinción que la migración se
20074
+ * esforzó en preservar): de ese no hay disponible que
20075
+ * calcular, y un «−4» ahí sería una alarma inventada.
20076
+ */
20077
+ available: number | null;
20078
+ documents: ({
20079
+ /** @constant */
20080
+ document_type: "delivery_note";
20081
+ document_id: number;
20082
+ document_number: string;
20083
+ customer_name: string;
20084
+ date: string;
20085
+ quantity: number;
20086
+ } | {
20087
+ /** @constant */
20088
+ document_type: "invoice";
20089
+ document_id: number;
20090
+ document_number: string;
20091
+ customer_name: string;
20092
+ date: string;
20093
+ quantity: number;
20094
+ })[];
20095
+ } | null;
19648
20096
  };
19649
20097
  };
19650
20098
  };
package/dist/client.d.ts CHANGED
@@ -29,6 +29,8 @@ export type ContractResource = Schemas['ContractResource'];
29
29
  export type WarehouseResource = Schemas['WarehouseResource'];
30
30
  /** El saldo de un artículo EN un almacén. */
31
31
  export type ItemWarehouseStockResource = Schemas['ItemWarehouseStockResource'];
32
+ /** Un recuento de inventario tal y como lo devuelve la API. */
33
+ export type StockCountResource = Schemas['StockCountResource'];
32
34
  /** Cuerpo de alta/edición de cliente. Incluye `customFields`. */
33
35
  export type CustomerRequest = Schemas['CustomerRequest'];
34
36
  /** Cuerpo de alta/edición de factura. Incluye `customFields`. */
@@ -46,6 +48,12 @@ export type ContractRequest = Schemas['ContractRequest'];
46
48
  * misma transacción, porque la empresa necesita exactamente uno.
47
49
  */
48
50
  export type WarehouseRequest = Schemas['WarehouseRequest'];
51
+ /**
52
+ * Cuerpo del alta y del conteo de un recuento. ⚠️ En `lines`,
53
+ * `counted_quantity: null` es «sin contar» y **no** es cero: las líneas en
54
+ * null no emiten nada al confirmar.
55
+ */
56
+ export type StockCountRequest = Schemas['StockCountRequest'];
49
57
  /**
50
58
  * El sobre `{ data: … }` de Laravel para las escrituras que el spec **no
51
59
  * tipa**.
@@ -861,6 +869,185 @@ export declare class PimiaClient {
861
869
  };
862
870
  }>;
863
871
  };
872
+ /**
873
+ * Recuentos de inventario: contar un almacén y cuadrarlo de una vez. Exige
874
+ * `items:read` / `items:write` y el módulo `stock` (opt-in), como el resto.
875
+ *
876
+ * El ciclo es **contar → mirar diferencias → confirmar**, y los dos últimos
877
+ * pasos son llamadas distintas a propósito:
878
+ *
879
+ * - `update` escribe lo contado y **no mueve una sola existencia**;
880
+ * - `confirm` emite los ajustes en bloque, uno por línea con diferencia,
881
+ * todos con motivo `count` y en la misma transacción.
882
+ *
883
+ * ⛔ **Dos cosas que hay que tener delante para no programar contra una
884
+ * aritmética que el servidor no garantiza:**
885
+ *
886
+ * 1. **La diferencia se calcula al CONFIRMAR**, contra el saldo de ese
887
+ * momento: un recuento dice «aquí hay 12», no «quítale 3». Si algo se
888
+ * movió entre contar y confirmar, el almacén queda igualmente en lo
889
+ * contado, y el `meta.moved_while_counting` de la respuesta dice cuántas
890
+ * líneas fueron.
891
+ * 2. **`counted_quantity: null` es «sin contar», y no es cero.** Las líneas
892
+ * en null no emiten nada; mandar 0 es declarar que miraste y no había.
893
+ */
894
+ get stockCounts(): {
895
+ list: (query?: RequestOptions["query"], options?: ReadOptions) => Promise<{
896
+ data: components["schemas"]["StockCountResource"][];
897
+ }>;
898
+ get: (id: number | string, options?: ReadOptions) => Promise<{
899
+ data: components["schemas"]["StockCountResource"] & Record<string, never>;
900
+ }>;
901
+ /**
902
+ * Abre el recuento. Nace **sembrado** con lo que el almacén dice tener
903
+ * (`seed`, por defecto sí): contar es corregir una lista, no escribirla.
904
+ */
905
+ create: (body: StockCountRequest, options?: WriteOptions) => Promise<ResourceEnvelope<{
906
+ id: number;
907
+ count_number: string;
908
+ sequence_number: number;
909
+ status: string;
910
+ count_date: string;
911
+ warehouse_id: number | null;
912
+ warehouse_name: string | null;
913
+ notes: string | null;
914
+ confirmed_at: string | null;
915
+ creator_id: number | null;
916
+ created_at: string | null;
917
+ lines?: components["schemas"]["StockCountLineResource"][];
918
+ }>>;
919
+ /** Cuenta: escribe lo contado. No mueve el almacén. */
920
+ update: (id: number | string, body: StockCountRequest, options?: WriteOptions) => Promise<ResourceEnvelope<{
921
+ id: number;
922
+ count_number: string;
923
+ sequence_number: number;
924
+ status: string;
925
+ count_date: string;
926
+ warehouse_id: number | null;
927
+ warehouse_name: string | null;
928
+ notes: string | null;
929
+ confirmed_at: string | null;
930
+ creator_id: number | null;
931
+ created_at: string | null;
932
+ lines?: components["schemas"]["StockCountLineResource"][];
933
+ }>>;
934
+ /**
935
+ * Confirma: emite los ajustes en bloque. La respuesta trae el resumen en
936
+ * `meta` — cuántas líneas se ajustaron, cuántas cuadraban, cuántas
937
+ * quedaron sin contar y cuántas se movieron mientras se contaba.
938
+ */
939
+ confirm: (id: number | string, options?: WriteOptions) => Promise<{
940
+ data: {
941
+ id: number;
942
+ status: string;
943
+ };
944
+ meta: {
945
+ adjusted_lines: number;
946
+ unchanged_lines: number;
947
+ uncounted_lines: number;
948
+ moved_while_counting: number;
949
+ };
950
+ }>;
951
+ /** Cancela un borrador. Uno confirmado ya movió el almacén: 422. */
952
+ cancel: (id: number | string, options?: WriteOptions) => Promise<string | {
953
+ data: components["schemas"]["StockCountResource"];
954
+ }>;
955
+ /**
956
+ * Borra un recuento que no ha movido nada. Uno confirmado **no se
957
+ * borra**: sus asientos explican el saldo de hoy.
958
+ */
959
+ delete: (id: number | string, options?: ReadOptions) => Promise<{
960
+ success: string;
961
+ }>;
962
+ };
963
+ /**
964
+ * El libro del almacén: por qué un artículo tiene el saldo que tiene. Exige
965
+ * `items:read` — leer el libro es leer el catálogo que explica— y, a
966
+ * diferencia de almacenes y recuentos, **NO va tras el módulo `stock`**: el
967
+ * libro es N1 y N1 es de todos.
968
+ *
969
+ * ## El COMPROMETIDO, en la cabecera de `forItem`
970
+ *
971
+ * `meta.committed` responde la otra mitad de la pregunta: no «cuánto tengo»
972
+ * sino **«cuánto de lo que tengo puedo vender»**. Trae la cantidad, el
973
+ * disponible (saldo − comprometido) y el DESGLOSE de los documentos que lo
974
+ * comprometen.
975
+ *
976
+ * ⛔ **Tres cosas que hay que tener delante:**
977
+ *
978
+ * 1. **Es una cifra DERIVADA**: no hay columna que escribir, no existe un
979
+ * `PUT` para reservar. Comprometen el albarán y la factura **en
980
+ * borrador**, y dejan de hacerlo solos cuando mueven el almacén (al
981
+ * entregar y al publicar). El presupuesto aceptado NO compromete: nada en
982
+ * el núcleo dice cuándo se cumplió.
983
+ * 2. ⚠️ **`committed` a `null` NO es cero.** Es «no se está calculando» — la
984
+ * empresa no tiene el módulo `stock`, o tiene el ciclo de inventario
985
+ * apagado. Pintar un 0 ahí afirma «nada comprometido», que es justo lo
986
+ * que no se sabe. Igual con `committed_quantity` en el artículo.
987
+ * 3. **Es GLOBAL por artículo, sin dimensión de almacén**: de los documentos
988
+ * que comprometen solo el albarán declara almacén.
989
+ */
990
+ get stockMovements(): {
991
+ /**
992
+ * El libro entero de la empresa, filtrable por artículo, almacén, motivo
993
+ * y fechas. Su `meta` trae además el valor informativo del almacén
994
+ * (`stock_value_cents`), que NO es valoración contable.
995
+ */
996
+ list: (query?: RequestOptions["query"], options?: ReadOptions) => Promise<{
997
+ data: components["schemas"]["StockMovementResource"][];
998
+ meta: {
999
+ stock_movement_total_count: number;
1000
+ stock_value_cents: number;
1001
+ };
1002
+ }>;
1003
+ /**
1004
+ * El libro de UN artículo, con la cabecera que lo explica: saldo
1005
+ * (`meta.opening_stock`), reparto por almacén (`meta.warehouse_stock`) y
1006
+ * comprometido (`meta.committed`).
1007
+ */
1008
+ forItem: (itemId: number | string, query?: RequestOptions["query"], options?: ReadOptions) => Promise<{
1009
+ data: components["schemas"]["StockMovementResource"][];
1010
+ meta: {
1011
+ opening_stock: number | null;
1012
+ warehouse_stock: {
1013
+ warehouse_id: number;
1014
+ warehouse_name: string;
1015
+ quantity: number;
1016
+ }[];
1017
+ committed: {
1018
+ quantity: number;
1019
+ available: number | null;
1020
+ documents: ({
1021
+ document_type: "delivery_note";
1022
+ document_id: number;
1023
+ document_number: string;
1024
+ customer_name: string;
1025
+ date: string;
1026
+ quantity: number;
1027
+ } | {
1028
+ document_type: "invoice";
1029
+ document_id: number;
1030
+ document_number: string;
1031
+ customer_name: string;
1032
+ date: string;
1033
+ quantity: number;
1034
+ })[];
1035
+ } | null;
1036
+ };
1037
+ }>;
1038
+ /**
1039
+ * El ajuste manual con motivo: la corrección que deja rastro, frente al
1040
+ * `PUT /items/{item}` que pisa el contador sin decir por qué. Cantidad
1041
+ * FIRMADA (± decimal) y `note` obligatoria; `warehouse_id` opcional.
1042
+ */
1043
+ adjust: (itemId: number | string, body: {
1044
+ quantity: number;
1045
+ note: string;
1046
+ warehouse_id?: number;
1047
+ }, options?: WriteOptions) => Promise<{
1048
+ data: components["schemas"]["StockMovementResource"];
1049
+ }>;
1050
+ };
864
1051
  get<T = unknown>(path: string, query?: RequestOptions['query'], options?: ReadOptions): Promise<T>;
865
1052
  post<T = unknown>(path: string, body?: unknown, options?: WriteOptions): Promise<T>;
866
1053
  put<T = unknown>(path: string, body?: unknown, options?: WriteOptions): Promise<T>;
package/dist/client.js CHANGED
@@ -197,6 +197,103 @@ export class PimiaClient {
197
197
  stock: (id, query, options) => this.get(`/warehouses/${id}/stock`, query, options),
198
198
  };
199
199
  }
200
+ /**
201
+ * Recuentos de inventario: contar un almacén y cuadrarlo de una vez. Exige
202
+ * `items:read` / `items:write` y el módulo `stock` (opt-in), como el resto.
203
+ *
204
+ * El ciclo es **contar → mirar diferencias → confirmar**, y los dos últimos
205
+ * pasos son llamadas distintas a propósito:
206
+ *
207
+ * - `update` escribe lo contado y **no mueve una sola existencia**;
208
+ * - `confirm` emite los ajustes en bloque, uno por línea con diferencia,
209
+ * todos con motivo `count` y en la misma transacción.
210
+ *
211
+ * ⛔ **Dos cosas que hay que tener delante para no programar contra una
212
+ * aritmética que el servidor no garantiza:**
213
+ *
214
+ * 1. **La diferencia se calcula al CONFIRMAR**, contra el saldo de ese
215
+ * momento: un recuento dice «aquí hay 12», no «quítale 3». Si algo se
216
+ * movió entre contar y confirmar, el almacén queda igualmente en lo
217
+ * contado, y el `meta.moved_while_counting` de la respuesta dice cuántas
218
+ * líneas fueron.
219
+ * 2. **`counted_quantity: null` es «sin contar», y no es cero.** Las líneas
220
+ * en null no emiten nada; mandar 0 es declarar que miraste y no había.
221
+ */
222
+ get stockCounts() {
223
+ return {
224
+ list: (query, options) => this.get('/stock-counts', query, options),
225
+ get: (id, options) => this.get(`/stock-counts/${id}`, undefined, options),
226
+ /**
227
+ * Abre el recuento. Nace **sembrado** con lo que el almacén dice tener
228
+ * (`seed`, por defecto sí): contar es corregir una lista, no escribirla.
229
+ */
230
+ create: (body, options) => this.post('/stock-counts', body, options),
231
+ /** Cuenta: escribe lo contado. No mueve el almacén. */
232
+ update: (id, body, options) => this.put(`/stock-counts/${id}`, body, options),
233
+ /**
234
+ * Confirma: emite los ajustes en bloque. La respuesta trae el resumen en
235
+ * `meta` — cuántas líneas se ajustaron, cuántas cuadraban, cuántas
236
+ * quedaron sin contar y cuántas se movieron mientras se contaba.
237
+ */
238
+ confirm: (id, options) => this.post(`/stock-counts/${id}/confirm`, {}, options),
239
+ /** Cancela un borrador. Uno confirmado ya movió el almacén: 422. */
240
+ cancel: (id, options) => this.post(`/stock-counts/${id}/cancel`, {}, options),
241
+ /**
242
+ * Borra un recuento que no ha movido nada. Uno confirmado **no se
243
+ * borra**: sus asientos explican el saldo de hoy.
244
+ */
245
+ delete: (id, options) => this.delete(`/stock-counts/${id}`, options),
246
+ };
247
+ }
248
+ /**
249
+ * El libro del almacén: por qué un artículo tiene el saldo que tiene. Exige
250
+ * `items:read` — leer el libro es leer el catálogo que explica— y, a
251
+ * diferencia de almacenes y recuentos, **NO va tras el módulo `stock`**: el
252
+ * libro es N1 y N1 es de todos.
253
+ *
254
+ * ## El COMPROMETIDO, en la cabecera de `forItem`
255
+ *
256
+ * `meta.committed` responde la otra mitad de la pregunta: no «cuánto tengo»
257
+ * sino **«cuánto de lo que tengo puedo vender»**. Trae la cantidad, el
258
+ * disponible (saldo − comprometido) y el DESGLOSE de los documentos que lo
259
+ * comprometen.
260
+ *
261
+ * ⛔ **Tres cosas que hay que tener delante:**
262
+ *
263
+ * 1. **Es una cifra DERIVADA**: no hay columna que escribir, no existe un
264
+ * `PUT` para reservar. Comprometen el albarán y la factura **en
265
+ * borrador**, y dejan de hacerlo solos cuando mueven el almacén (al
266
+ * entregar y al publicar). El presupuesto aceptado NO compromete: nada en
267
+ * el núcleo dice cuándo se cumplió.
268
+ * 2. ⚠️ **`committed` a `null` NO es cero.** Es «no se está calculando» — la
269
+ * empresa no tiene el módulo `stock`, o tiene el ciclo de inventario
270
+ * apagado. Pintar un 0 ahí afirma «nada comprometido», que es justo lo
271
+ * que no se sabe. Igual con `committed_quantity` en el artículo.
272
+ * 3. **Es GLOBAL por artículo, sin dimensión de almacén**: de los documentos
273
+ * que comprometen solo el albarán declara almacén.
274
+ */
275
+ get stockMovements() {
276
+ return {
277
+ /**
278
+ * El libro entero de la empresa, filtrable por artículo, almacén, motivo
279
+ * y fechas. Su `meta` trae además el valor informativo del almacén
280
+ * (`stock_value_cents`), que NO es valoración contable.
281
+ */
282
+ list: (query, options) => this.get('/stock-movements', query, options),
283
+ /**
284
+ * El libro de UN artículo, con la cabecera que lo explica: saldo
285
+ * (`meta.opening_stock`), reparto por almacén (`meta.warehouse_stock`) y
286
+ * comprometido (`meta.committed`).
287
+ */
288
+ forItem: (itemId, query, options) => this.get(`/items/${itemId}/stock-movements`, query, options),
289
+ /**
290
+ * El ajuste manual con motivo: la corrección que deja rastro, frente al
291
+ * `PUT /items/{item}` que pisa el contador sin decir por qué. Cantidad
292
+ * FIRMADA (± decimal) y `note` obligatoria; `warehouse_id` opcional.
293
+ */
294
+ adjust: (itemId, body, options) => this.post(`/items/${itemId}/stock-adjustments`, body, options),
295
+ };
296
+ }
200
297
  get(path, query, options) {
201
298
  return this.request(path, { ...options, method: 'GET', query });
202
299
  }
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * salen los tipos de `./api`.
7
7
  */
8
8
  export { PimiaClient, toFormData } from './client.js';
9
- export type { ContractRequest, ContractResource, CustomerRequest, CustomerResource, EstimateResource, EstimatesRequest, InvoiceResource, InvoicesRequest, ItemWarehouseStockResource, PimiaClientOptions, RateLimit, ReadOptions, RequestOptions, ResourceEnvelope, ResponseMeta, ResponseWithMeta, WarehouseRequest, WarehouseResource, WriteOptions, } from './client.js';
9
+ export type { ContractRequest, ContractResource, CustomerRequest, CustomerResource, EstimateResource, EstimatesRequest, InvoiceResource, InvoicesRequest, ItemWarehouseStockResource, PimiaClientOptions, RateLimit, ReadOptions, RequestOptions, ResourceEnvelope, ResponseMeta, ResponseWithMeta, StockCountRequest, StockCountResource, WarehouseRequest, WarehouseResource, WriteOptions, } from './client.js';
10
10
  export { OAuth, createPkceChallenge, createState } from './oauth.js';
11
11
  export type { AuthorizationServerMetadata, AuthorizeUrlOptions, OAuthConfig, PkceChallenge, } from './oauth.js';
12
12
  export { MemoryTokenStore, isExpired, tokenSetFromResponse } from './tokens.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pimia/sdk",
3
- "version": "0.14.0",
3
+ "version": "0.16.0",
4
4
  "description": "Cliente TypeScript de la API de Pimia para apps de partner: OAuth con PKCE, rotación de refresh persistida, reintentos de rate limit y tipos generados del OpenAPI.",
5
5
  "license": "MIT",
6
6
  "author": "Pimia (https://pimia.es)",