@pimia/sdk 0.11.0 → 0.13.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
@@ -192,6 +192,22 @@ export interface paths {
192
192
  patch?: never;
193
193
  trace?: never;
194
194
  };
195
+ "/contracts/{contract}/activate": {
196
+ parameters: {
197
+ query?: never;
198
+ header?: never;
199
+ path?: never;
200
+ cookie?: never;
201
+ };
202
+ get?: never;
203
+ put?: never;
204
+ post: operations["contract.activateContract"];
205
+ delete?: never;
206
+ options?: never;
207
+ head?: never;
208
+ patch?: never;
209
+ trace?: never;
210
+ };
195
211
  "/app/version": {
196
212
  parameters: {
197
213
  query?: never;
@@ -454,6 +470,22 @@ export interface paths {
454
470
  patch?: never;
455
471
  trace?: never;
456
472
  };
473
+ "/contracts/{contract}/cancel": {
474
+ parameters: {
475
+ query?: never;
476
+ header?: never;
477
+ path?: never;
478
+ cookie?: never;
479
+ };
480
+ get?: never;
481
+ put?: never;
482
+ post: operations["contract.cancelContract"];
483
+ delete?: never;
484
+ options?: never;
485
+ head?: never;
486
+ patch?: never;
487
+ trace?: never;
488
+ };
457
489
  "/estimates/{estimate}/status": {
458
490
  parameters: {
459
491
  query?: never;
@@ -808,6 +840,79 @@ export interface paths {
808
840
  patch?: never;
809
841
  trace?: never;
810
842
  };
843
+ "/contracts/{contract}/document": {
844
+ parameters: {
845
+ query?: never;
846
+ header?: never;
847
+ path?: never;
848
+ cookie?: never;
849
+ };
850
+ get?: never;
851
+ put?: never;
852
+ post: operations["contractDocument.upload"];
853
+ delete: operations["contractDocument.destroy"];
854
+ options?: never;
855
+ head?: never;
856
+ patch?: never;
857
+ trace?: never;
858
+ };
859
+ "/contracts/delete": {
860
+ parameters: {
861
+ query?: never;
862
+ header?: never;
863
+ path?: never;
864
+ cookie?: never;
865
+ };
866
+ get?: never;
867
+ put?: never;
868
+ /**
869
+ * Borrado en lote (`POST /contracts/delete`). Fail-loud: un id no
870
+ * borrable aborta el lote entero antes de borrar nada
871
+ */
872
+ post: operations["contracts.delete"];
873
+ delete?: never;
874
+ options?: never;
875
+ head?: never;
876
+ patch?: never;
877
+ trace?: never;
878
+ };
879
+ "/contracts": {
880
+ parameters: {
881
+ query?: never;
882
+ header?: never;
883
+ path?: never;
884
+ cookie?: never;
885
+ };
886
+ get: operations["contracts.index"];
887
+ put?: never;
888
+ post: operations["contracts.store"];
889
+ delete?: never;
890
+ options?: never;
891
+ head?: never;
892
+ patch?: never;
893
+ trace?: never;
894
+ };
895
+ "/contracts/{contract}": {
896
+ parameters: {
897
+ query?: never;
898
+ header?: never;
899
+ path?: never;
900
+ cookie?: never;
901
+ };
902
+ get: operations["contracts.show"];
903
+ put: operations["contracts.update"];
904
+ post?: never;
905
+ /**
906
+ * Borra UN contrato, el de la ruta. Solo en borrador: lo activo se
907
+ * cancela, no se borra (decisión 8) — y eso es un 422 con el porqué, no
908
+ * un 500 ni un borrado a medias
909
+ */
910
+ delete: operations["contracts.destroy"];
911
+ options?: never;
912
+ head?: never;
913
+ patch?: never;
914
+ trace?: never;
915
+ };
811
916
  "/estimates/{estimate}/convert-to-invoice": {
812
917
  parameters: {
813
918
  query?: never;
@@ -2676,7 +2781,12 @@ export interface paths {
2676
2781
  path?: never;
2677
2782
  cookie?: never;
2678
2783
  };
2679
- /** Retrieve a list of existing Items */
2784
+ /**
2785
+ * Retrieve a list of existing Items
2786
+ * @description El `@return` de JsonResponse se retira como en el índice de facturas:
2787
+ * nunca fue el tipo real y, con dos returns, dejaba la respuesta sin forma
2788
+ * en el spec.
2789
+ */
2680
2790
  get: operations["items.index"];
2681
2791
  put?: never;
2682
2792
  /** Create Item */
@@ -3641,6 +3751,37 @@ export interface paths {
3641
3751
  patch?: never;
3642
3752
  trace?: never;
3643
3753
  };
3754
+ "/received-invoices/{id}/mark-goods-received": {
3755
+ parameters: {
3756
+ query?: never;
3757
+ header?: never;
3758
+ path?: never;
3759
+ cookie?: never;
3760
+ };
3761
+ get?: never;
3762
+ put?: never;
3763
+ /**
3764
+ * Marca la mercancía de la factura recibida como RECIBIDA y suma sus líneas
3765
+ * al almacén — el espejo exacto del `mark-delivered` del albarán de venta
3766
+ * (estudio de stock, decisión S3)
3767
+ * @description Es una acción explícita y no el alta de la factura a propósito: el OCR
3768
+ * crea borradores que se corrigen, y un borrador no es mercancía en la
3769
+ * estantería. El candado es `stock_added_at` —un instante, como el
3770
+ * `stock_deducted_at` del albarán (#473)— y hace la acción idempotente:
3771
+ * la segunda llamada es un 422, no una segunda suma.
3772
+ *
3773
+ * Reglas espejo del albarán, también a propósito: solo mueven almacén las
3774
+ * líneas con `item_id`, y un artículo con `opening_stock` NULL («nunca ha
3775
+ * llevado stock») no se estrena por una compra — se estrena en su ficha o
3776
+ * con un ajuste, que son los gestos que significan «declaro existencias».
3777
+ */
3778
+ post: operations["receivedInvoices.markGoodsReceived"];
3779
+ delete?: never;
3780
+ options?: never;
3781
+ head?: never;
3782
+ patch?: never;
3783
+ trace?: never;
3784
+ };
3644
3785
  "/banking/transactions": {
3645
3786
  parameters: {
3646
3787
  query?: never;
@@ -3940,6 +4081,22 @@ export interface paths {
3940
4081
  patch?: never;
3941
4082
  trace?: never;
3942
4083
  };
4084
+ "/contracts/{contract}/renew": {
4085
+ parameters: {
4086
+ query?: never;
4087
+ header?: never;
4088
+ path?: never;
4089
+ cookie?: never;
4090
+ };
4091
+ get?: never;
4092
+ put?: never;
4093
+ post: operations["contract.renewContract"];
4094
+ delete?: never;
4095
+ options?: never;
4096
+ head?: never;
4097
+ patch?: never;
4098
+ trace?: never;
4099
+ };
3943
4100
  "/roles/{role}/abilities": {
3944
4101
  parameters: {
3945
4102
  query?: never;
@@ -4277,6 +4434,54 @@ export interface paths {
4277
4434
  patch?: never;
4278
4435
  trace?: never;
4279
4436
  };
4437
+ "/invoices/{invoice}/shared-link": {
4438
+ parameters: {
4439
+ query?: never;
4440
+ header?: never;
4441
+ path?: never;
4442
+ cookie?: never;
4443
+ };
4444
+ get: operations["invoice.sharedLink"];
4445
+ put?: never;
4446
+ post?: never;
4447
+ delete?: never;
4448
+ options?: never;
4449
+ head?: never;
4450
+ patch?: never;
4451
+ trace?: never;
4452
+ };
4453
+ "/contracts/{contract}/shared-link": {
4454
+ parameters: {
4455
+ query?: never;
4456
+ header?: never;
4457
+ path?: never;
4458
+ cookie?: never;
4459
+ };
4460
+ get: operations["contract.sharedLink"];
4461
+ put?: never;
4462
+ post?: never;
4463
+ delete?: never;
4464
+ options?: never;
4465
+ head?: never;
4466
+ patch?: never;
4467
+ trace?: never;
4468
+ };
4469
+ "/estimates/{estimate}/shared-link": {
4470
+ parameters: {
4471
+ query?: never;
4472
+ header?: never;
4473
+ path?: never;
4474
+ cookie?: never;
4475
+ };
4476
+ get: operations["estimate.sharedLink"];
4477
+ put?: never;
4478
+ post?: never;
4479
+ delete?: never;
4480
+ options?: never;
4481
+ head?: never;
4482
+ patch?: never;
4483
+ trace?: never;
4484
+ };
4280
4485
  "/expenses/{expense}/show/receipt": {
4281
4486
  parameters: {
4282
4487
  query?: never;
@@ -4392,6 +4597,60 @@ export interface paths {
4392
4597
  patch?: never;
4393
4598
  trace?: never;
4394
4599
  };
4600
+ "/items/{item}/stock-adjustments": {
4601
+ parameters: {
4602
+ query?: never;
4603
+ header?: never;
4604
+ path?: never;
4605
+ cookie?: never;
4606
+ };
4607
+ get?: never;
4608
+ put?: never;
4609
+ /** Ajusta las existencias de un artículo y devuelve el asiento */
4610
+ post: operations["item.stockAdjustments"];
4611
+ delete?: never;
4612
+ options?: never;
4613
+ head?: never;
4614
+ patch?: never;
4615
+ trace?: never;
4616
+ };
4617
+ "/stock-movements": {
4618
+ parameters: {
4619
+ query?: never;
4620
+ header?: never;
4621
+ path?: never;
4622
+ cookie?: never;
4623
+ };
4624
+ /** Los movimientos de stock de la empresa, del más nuevo al más viejo */
4625
+ get: operations["stockMovements.index"];
4626
+ put?: never;
4627
+ post?: never;
4628
+ delete?: never;
4629
+ options?: never;
4630
+ head?: never;
4631
+ patch?: never;
4632
+ trace?: never;
4633
+ };
4634
+ "/items/{item}/stock-movements": {
4635
+ parameters: {
4636
+ query?: never;
4637
+ header?: never;
4638
+ path?: never;
4639
+ cookie?: never;
4640
+ };
4641
+ /**
4642
+ * Los movimientos de stock de UN artículo — la pestaña «Movimientos» de su
4643
+ * ficha, la que responde «¿por qué tengo 47?»
4644
+ */
4645
+ get: operations["stockMovements.forItem"];
4646
+ put?: never;
4647
+ post?: never;
4648
+ delete?: never;
4649
+ options?: never;
4650
+ head?: never;
4651
+ patch?: never;
4652
+ trace?: never;
4653
+ };
4395
4654
  "/store/modules": {
4396
4655
  parameters: {
4397
4656
  query?: never;
@@ -5482,6 +5741,79 @@ export interface paths {
5482
5741
  patch?: never;
5483
5742
  trace?: never;
5484
5743
  };
5744
+ "/warehouses/{warehouse}/stock": {
5745
+ parameters: {
5746
+ query?: never;
5747
+ header?: never;
5748
+ path?: never;
5749
+ cookie?: never;
5750
+ };
5751
+ /**
5752
+ * Las existencias de UN almacén, artículo a artículo
5753
+ * @description La pregunta que la dimensión vino a contestar: «¿cuántos me quedan en la
5754
+ * tienda?». Sale de `item_warehouse_stock`, que es el reparto del contador
5755
+ * global y no una segunda cuenta: la suma por artículo de todos los
5756
+ * almacenes es exactamente `items.opening_stock`.
5757
+ */
5758
+ get: operations["warehouses.stock"];
5759
+ put?: never;
5760
+ post?: never;
5761
+ delete?: never;
5762
+ options?: never;
5763
+ head?: never;
5764
+ patch?: never;
5765
+ trace?: never;
5766
+ };
5767
+ "/warehouses": {
5768
+ parameters: {
5769
+ query?: never;
5770
+ header?: never;
5771
+ path?: never;
5772
+ cookie?: never;
5773
+ };
5774
+ /** Los almacenes de la empresa */
5775
+ get: operations["warehouses.index"];
5776
+ put?: never;
5777
+ /** Da de alta un almacén */
5778
+ post: operations["warehouses.store"];
5779
+ delete?: never;
5780
+ options?: never;
5781
+ head?: never;
5782
+ patch?: never;
5783
+ trace?: never;
5784
+ };
5785
+ "/warehouses/{warehouse}": {
5786
+ parameters: {
5787
+ query?: never;
5788
+ header?: never;
5789
+ path?: never;
5790
+ cookie?: never;
5791
+ };
5792
+ get: operations["warehouses.show"];
5793
+ /**
5794
+ * Edita un almacén
5795
+ * @description ⚠️ El por defecto no se puede APAGAR desde aquí: se cambia encendiendo
5796
+ * otro, que apaga este en la misma transacción. Un `is_default: false`
5797
+ * sobre el único que lo tiene dejaría a la empresa sin sitio donde anotar
5798
+ * lo que no elige, y el 422 lo dice en vez de aceptarlo y romperse luego.
5799
+ */
5800
+ put: operations["warehouses.update"];
5801
+ post?: never;
5802
+ /**
5803
+ * Borra un almacén VACÍO y sin historia
5804
+ * @description Tres negativas, y las tres con su código: el por defecto no se borra
5805
+ * (`default_warehouse_required`), uno con asientos tampoco
5806
+ * (`stock_movements_attached` — el asiento lo nombra, y la historia del
5807
+ * almacén es lo que hace de fiar el saldo), y uno con existencias, menos
5808
+ * (`stock_attached`: borrarlo evaporaría un saldo que sí está en el
5809
+ * contador global). Para el que ya no se usa está `is_active: false`.
5810
+ */
5811
+ delete: operations["warehouses.destroy"];
5812
+ options?: never;
5813
+ head?: never;
5814
+ patch?: never;
5815
+ trace?: never;
5816
+ };
5485
5817
  "/settings/webhooks": {
5486
5818
  parameters: {
5487
5819
  query?: never;
@@ -5710,6 +6042,23 @@ export interface components {
5710
6042
  name: string;
5711
6043
  } | null;
5712
6044
  };
6045
+ /**
6046
+ * ActivateContractRequest
6047
+ * @description Activación de un contrato (`POST /contracts/{contract}/activate`).
6048
+ *
6049
+ * Sin cuerpo, el contrato CREA su recurrente gobernada; con
6050
+ * `recurring_invoice_id`, ADOPTA esa — heredándole los límites del periodo
6051
+ * pero sin pisar su frecuencia, sus líneas ni sus impuestos, que son
6052
+ * configuración humana (Contract::activate()).
6053
+ *
6054
+ * El `exists` va acotado por empresa por la misma lección de siempre (#395):
6055
+ * dentro de una instancia conviven varias empresas, y el id a secas casaría
6056
+ * la recurrente de otra. El modelo lo re-comprueba (empresa Y cliente), pero
6057
+ * el 422 de aquí llega antes y dice qué falla.
6058
+ */
6059
+ ActivateContractRequest: {
6060
+ recurring_invoice_id?: number | null;
6061
+ };
5713
6062
  /** AddressResource */
5714
6063
  AddressResource: {
5715
6064
  id: number;
@@ -5956,9 +6305,105 @@ export interface components {
5956
6305
  updated_at: string | null;
5957
6306
  };
5958
6307
  /**
5959
- * ConvertEstimateRequest
5960
- * @description Cuerpo —opcional— de la conversión de un presupuesto en factura.
5961
- */
6308
+ * ContractRequest
6309
+ * @description Alta y edición de un contrato (`POST /contracts`, `PUT /contracts/{id}`).
6310
+ *
6311
+ * Dos decisiones que no son costumbre sino contrato (#583):
6312
+ *
6313
+ * - **`status` NO se acepta aquí.** El ciclo de vida va por sus acciones
6314
+ * (`activate`/`cancel`/`renew`), que son las que gobiernan las recurrentes;
6315
+ * aceptar `status` en el PUT sería un contrato ACTIVE sin recurrente o
6316
+ * CANCELLED sin pausar nada — el estado mentiría. La lista blanca del
6317
+ * payload son estas reglas (ContractFields), así que no declararlo ya es
6318
+ * excluirlo.
6319
+ * - **Los cerrados llevan `Rule::in`**, y no solo por validar: el generador
6320
+ * del spec deduce el enum de la regla, y el estudio dejó medido lo que pasa
6321
+ * cuando no se hace — `frequency`/`status`/`limit_by` de la recurrente son
6322
+ * `string` sin enum en el contrato público y el SDK hereda esa opacidad.
6323
+ */
6324
+ ContractRequest: {
6325
+ title: string;
6326
+ description?: string | null;
6327
+ contract_number?: string | null;
6328
+ customer_id: number;
6329
+ /** Format: date-time */
6330
+ starts_at: string;
6331
+ /**
6332
+ * Format: date-time
6333
+ * @description Nullable = contrato indefinido: la recurrente gobernada hereda
6334
+ * `limit_by = NONE`.
6335
+ */
6336
+ ends_at?: string | null;
6337
+ /**
6338
+ * @description Céntimos, enteros — la convención monetaria de la casa. El tope
6339
+ * es el mismo que el de `total` en documentos.
6340
+ */
6341
+ amount: number;
6342
+ currency_id?: number | null;
6343
+ /** @enum {string} */
6344
+ billing_every: "MONTHLY" | "QUARTERLY" | "SEMIANNUAL" | "ANNUAL";
6345
+ /**
6346
+ * @description 1..31 y no 1..28: el 29-31 es entrada legítima («factúrame a fin
6347
+ * de mes») que la compilación fija al 28 — rechazarla aquí obligaría
6348
+ * al cliente a conocer una limitación de cron que es nuestra.
6349
+ */
6350
+ billing_anchor_day?: number | null;
6351
+ /** @enum {string|null} */
6352
+ renewal_mode?: "NONE" | "MANUAL" | "TACIT" | null;
6353
+ /**
6354
+ * @description Nullable = «usa el default del catálogo regional» (#584). El tope
6355
+ * corta los disparates sin opinar sobre ninguna legislación.
6356
+ */
6357
+ notice_days?: number | null;
6358
+ /**
6359
+ * @description El presupuesto de origen, acotado por empresa — la lección del
6360
+ * `item_id` de las recurrentes (#395): sin el `where`, un contrato
6361
+ * podía quedar apuntando al presupuesto de OTRA empresa del tenant.
6362
+ */
6363
+ estimate_id?: number | null;
6364
+ };
6365
+ /** ContractResource */
6366
+ ContractResource: {
6367
+ id: number;
6368
+ title: string;
6369
+ description: string | null;
6370
+ contract_number: string | null;
6371
+ customer_id: number | null;
6372
+ company_id: number | null;
6373
+ creator_id: number | null;
6374
+ currency_id: number | null;
6375
+ status: string;
6376
+ ha_vencido: boolean;
6377
+ starts_at: string | null;
6378
+ ends_at: string | null;
6379
+ amount: number | null;
6380
+ billing_every: string;
6381
+ billing_anchor_day: number | null;
6382
+ renewal_mode: string;
6383
+ notice_days: number | null;
6384
+ /**
6385
+ * @description El efectivo: el del contrato o el default del catálogo regional
6386
+ * (config/contracts.php). La pantalla enseña este, no el crudo.
6387
+ */
6388
+ notice_days_effective: number;
6389
+ /**
6390
+ * @description ¿Hay firmado adjunto? El fichero se sube por su POST multiparte
6391
+ * dedicado (#584) y se pisa al resubir.
6392
+ */
6393
+ has_document: boolean;
6394
+ estimate_id: number | null;
6395
+ /** Format: date-time */
6396
+ cancelled_at: string | null;
6397
+ fields?: components["schemas"]["CustomFieldValueResource"][];
6398
+ customer?: components["schemas"]["CustomerResource"] | null;
6399
+ estimate?: components["schemas"]["EstimateResource"] | null;
6400
+ recurring_invoices?: components["schemas"]["RecurringInvoiceResource"][];
6401
+ invoices?: components["schemas"]["InvoiceResource"][];
6402
+ };
6403
+ /**
6404
+ * ConvertEstimateRequest
6405
+ * @description Cuerpo —opcional— de la conversión de un presupuesto en factura.
6406
+ */
5962
6407
  ConvertEstimateRequest: {
5963
6408
  /**
5964
6409
  * @description Referencia externa: TU identificador para la factura que sale de
@@ -6297,6 +6742,19 @@ export interface components {
6297
6742
  */
6298
6743
  external_ref: string | null;
6299
6744
  };
6745
+ /**
6746
+ * DeleteContractsRequest
6747
+ * @description Borrado múltiple de contratos (`POST /contracts/delete`). Mismo patrón que
6748
+ * DeleteRecurringInvoicesRequest: el `exists` convierte el id inexistente en
6749
+ * un 422 que dice cuál falla, en vez del 500 de iterar sobre un `find()` nulo.
6750
+ *
6751
+ * Lo que NO valida esto: que cada contrato esté en borrador. Esa es la regla
6752
+ * de negocio (decisión 8: lo activo se cancela, no se borra) y vive en
6753
+ * `Contract::deleteContracts()`, que aborta el lote entero en voz alta.
6754
+ */
6755
+ DeleteContractsRequest: {
6756
+ ids: number[];
6757
+ };
6300
6758
  /** DeleteCustomersRequest */
6301
6759
  DeleteCustomersRequest: {
6302
6760
  ids: number[];
@@ -6379,6 +6837,16 @@ export interface components {
6379
6837
  delivery_note_number: string | null;
6380
6838
  delivery_note_date: string;
6381
6839
  status: string;
6840
+ /**
6841
+ * Format: date-time
6842
+ * @description Cuándo movió el almacén este albarán (NULL = aún no). El #473 lo
6843
+ * creó sin publicarlo y los clientes lo INFERÍAN del estado — que
6844
+ * es justo lo que `convertToInvoice` rompe al pisar `DELIVERED`
6845
+ * con `INVOICED`. Con el libro (estudio de stock, S1) deja de ser
6846
+ * contabilidad interna: es lo que la pantalla del albarán necesita
6847
+ * para contar lo que hizo.
6848
+ */
6849
+ stock_deducted_at: string | null;
6382
6850
  sub_total: number;
6383
6851
  total: number;
6384
6852
  tax: number;
@@ -7082,6 +7550,7 @@ export interface components {
7082
7550
  sent_at: string | null;
7083
7551
  /** Format: date-time */
7084
7552
  viewed_at: string | null;
7553
+ contract_id: number | null;
7085
7554
  };
7086
7555
  /** InvoiceItem */
7087
7556
  InvoiceItem: {
@@ -7594,6 +8063,12 @@ export interface components {
7594
8063
  notes: string | null;
7595
8064
  price: number;
7596
8065
  purchase_price: number | null;
8066
+ /**
8067
+ * @description Coste medio ponderado en céntimos (S8, informativo): lo
8068
+ * recalcula cada compra recibida; NULL = aún no hay entradas con
8069
+ * coste anotadas.
8070
+ */
8071
+ average_cost_cents: number | null;
7597
8072
  default_discount: number;
7598
8073
  unit_id: number | null;
7599
8074
  company_id: number | null;
@@ -7620,6 +8095,62 @@ export interface components {
7620
8095
  taxes?: components["schemas"]["TaxResource"][];
7621
8096
  currency?: components["schemas"]["CurrencyResource"] | null;
7622
8097
  };
8098
+ /** ItemSummaryResource */
8099
+ ItemSummaryResource: {
8100
+ id: number;
8101
+ name: string;
8102
+ item_type: string;
8103
+ sku: string | null;
8104
+ supplier_reference: string | null;
8105
+ description: string | null;
8106
+ price: number;
8107
+ purchase_price: number | null;
8108
+ average_cost_cents: number | null;
8109
+ default_discount: number;
8110
+ category_id: number | null;
8111
+ category?: {
8112
+ id: number;
8113
+ name: string;
8114
+ };
8115
+ unit_id: number | null;
8116
+ /**
8117
+ * @description Del `leftJoin` del índice, no de la relación: es el único dato de
8118
+ * la unidad que los listados pintan.
8119
+ */
8120
+ unit_name: string | null;
8121
+ company_id: number | null;
8122
+ currency_id: number | null;
8123
+ tax_per_item: string;
8124
+ purchase_tax_type_id: number | null;
8125
+ is_active: boolean;
8126
+ is_time_trackable: boolean;
8127
+ opening_stock: number;
8128
+ stock_alert_qty: number | null;
8129
+ allow_sale_without_stock: boolean;
8130
+ /** Format: date-time */
8131
+ created_at: string | null;
8132
+ /** Format: date-time */
8133
+ updated_at: string | null;
8134
+ taxes?: {
8135
+ id: number;
8136
+ tax_type_id: number | null;
8137
+ item_id: number | null;
8138
+ company_id: number | null;
8139
+ name: string;
8140
+ amount: number;
8141
+ percent: number;
8142
+ base_amount: number;
8143
+ currency_id: number | null;
8144
+ type: string | null;
8145
+ }[];
8146
+ };
8147
+ /** ItemWarehouseStockResource */
8148
+ ItemWarehouseStockResource: {
8149
+ item_id: number;
8150
+ item_name: string;
8151
+ warehouse_id: number;
8152
+ quantity: number;
8153
+ };
7623
8154
  /** ItemsRequest */
7624
8155
  ItemsRequest: {
7625
8156
  name: string;
@@ -7642,11 +8173,19 @@ export interface components {
7642
8173
  description?: string | null;
7643
8174
  notes?: string | null;
7644
8175
  is_active?: boolean | null;
8176
+ /**
8177
+ * @description Saldo de existencias del artículo. Pese al nombre NO es el
8178
+ * inicial: es el contador vivo que mueven albaranes, facturas,
8179
+ * compras y ajustes (el detalle, en `GET /items/{item}/stock-movements`).
8180
+ * En el alta se guarda 0 si no llega; en la actualización se
8181
+ * conserva el que había. Escribirlo aquí pisa el saldo (queda
8182
+ * anotado como `manual_edit`); para corregir con motivo está
8183
+ * `POST /items/{item}/stock-adjustments`.
8184
+ */
8185
+ opening_stock?: number | null;
7645
8186
  stock_alert_qty?: number | null;
7646
8187
  allow_sale_without_stock?: boolean | null;
7647
8188
  purchase_tax_type_id?: number | null;
7648
- /** @description Existencias iniciales del artículo. En el alta se guarda 0 si no llega; en la actualización se conserva el valor que ya tenía. */
7649
- opening_stock?: number | null;
7650
8189
  };
7651
8190
  /** LeadActivity */
7652
8191
  LeadActivity: {
@@ -8128,6 +8667,14 @@ export interface components {
8128
8667
  received_invoice_number: string | null;
8129
8668
  reference_number: string | null;
8130
8669
  status: string;
8670
+ /**
8671
+ * Format: date-time
8672
+ * @description Cuándo se sumó la mercancía al almacén (mark-goods-received);
8673
+ * NULL si aún no. Se publica —al contrario que en su día el
8674
+ * `stock_deducted_at` del albarán— porque es lo que permite a un
8675
+ * cliente pintar el botón «Mercancía recibida» solo cuando toca.
8676
+ */
8677
+ stock_added_at: string | null;
8131
8678
  paid_status: string;
8132
8679
  tax_per_item: string | null;
8133
8680
  discount_per_item: string | null;
@@ -8350,6 +8897,18 @@ export interface components {
8350
8897
  creator?: components["schemas"]["UserResource"] | null;
8351
8898
  currency?: components["schemas"]["CurrencyResource"] | null;
8352
8899
  };
8900
+ /**
8901
+ * RenewContractRequest
8902
+ * @description Renovación manual de un contrato (`POST /contracts/{contract}/renew`).
8903
+ *
8904
+ * Solo la fecha nueva: que sea POSTERIOR al fin actual —renovar es extender—
8905
+ * lo comprueba `Contract::renew()`, porque depende del estado del contrato y
8906
+ * no del cuerpo. La renovación tácita no pasa por aquí: es el job de fase 2.
8907
+ */
8908
+ RenewContractRequest: {
8909
+ /** Format: date-time */
8910
+ ends_at: string;
8911
+ };
8353
8912
  /** Role */
8354
8913
  Role: {
8355
8914
  id: number;
@@ -8390,7 +8949,7 @@ export interface components {
8390
8949
  * ningún permiso es una operación legítima, y `required` la
8391
8950
  * prohibiría (un array vacío no pasa `required`).
8392
8951
  */
8393
- 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")[];
8952
+ 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")[];
8394
8953
  };
8395
8954
  /**
8396
8955
  * RoleRequest
@@ -8415,7 +8974,7 @@ export interface components {
8415
8974
  name: string;
8416
8975
  abilities?: {
8417
8976
  /** @enum {string} */
8418
- 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";
8977
+ 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";
8419
8978
  }[] | null;
8420
8979
  };
8421
8980
  /** RoleResource */
@@ -8494,6 +9053,62 @@ export interface components {
8494
9053
  SettingRequest: {
8495
9054
  settings: string;
8496
9055
  };
9056
+ /** StockAdjustmentRequest */
9057
+ StockAdjustmentRequest: {
9058
+ /**
9059
+ * @description Cantidad FIRMADA que se aplica al contador: positiva repone,
9060
+ * negativa retira. Decimal a propósito (litros, kg); el contador
9061
+ * redondea y el asiento guarda la cantidad exacta.
9062
+ */
9063
+ quantity: number;
9064
+ /**
9065
+ * @description El motivo es obligatorio: un ajuste sin porqué es el contador
9066
+ * pisado de siempre, que es justo lo que el libro viene a retirar.
9067
+ */
9068
+ note: string;
9069
+ };
9070
+ /** StockMovementResource */
9071
+ StockMovementResource: {
9072
+ id: number;
9073
+ item_id: number | null;
9074
+ /**
9075
+ * @description El nombre del artículo, para que el índice GLOBAL del libro sea
9076
+ * legible sin cruzarlo con el catálogo en el cliente. NULL cuando
9077
+ * el artículo ya no existe (`item_id` es nullOnDelete: el asiento
9078
+ * sobrevive al artículo y su nombre no — el cliente lo enseña como
9079
+ * «artículo borrado», que es la verdad). Los dos índices lo cargan
9080
+ * con `with('item:id,name')`: sin eso sería un N+1 por fila.
9081
+ */
9082
+ item_name: string | null;
9083
+ /**
9084
+ * @description DÓNDE pasó (N2). Los asientos anteriores a la dimensión están
9085
+ * todos en el «Principal» que estrenó la migración: es la única
9086
+ * respuesta verdadera, porque nadie declaró jamás dónde estaban.
9087
+ * NULL solo si el almacén desapareció (`nullOnDelete`), igual que
9088
+ * `item_name` — y con el mismo eager load, `warehouse:id,name`.
9089
+ */
9090
+ warehouse_id: number | null;
9091
+ warehouse_name: string | null;
9092
+ /**
9093
+ * @description Cantidad FIRMADA que trajo la causa (decimal: hay artículos en
9094
+ * litros y kg). El contador redondea; la diferencia se ve en la
9095
+ * cadena de `balance_after`.
9096
+ */
9097
+ quantity: number;
9098
+ balance_after: number;
9099
+ /**
9100
+ * @description El coste unitario de una ENTRADA, en céntimos (S8). NULL en las
9101
+ * salidas y en las entradas sin coste conocido.
9102
+ */
9103
+ unit_cost_cents: number | null;
9104
+ reason: string;
9105
+ document_type: string | null;
9106
+ document_id: number | null;
9107
+ note: string | null;
9108
+ creator_id: number | null;
9109
+ /** Format: date-time */
9110
+ created_at: string;
9111
+ };
8497
9112
  /**
8498
9113
  * StoreApprovalRequest
8499
9114
  * @description POST /api/v1/approvals (paso 2, plataforma de integradores) — una app de
@@ -9031,6 +9646,37 @@ export interface components {
9031
9646
  role: string | null;
9032
9647
  }[];
9033
9648
  };
9649
+ /** WarehouseRequest */
9650
+ WarehouseRequest: {
9651
+ name: string;
9652
+ code?: string | null;
9653
+ address?: string | null;
9654
+ is_default?: boolean | null;
9655
+ is_active?: boolean | null;
9656
+ };
9657
+ /** WarehouseResource */
9658
+ WarehouseResource: {
9659
+ id: number;
9660
+ name: string;
9661
+ code: string | null;
9662
+ address: string | null;
9663
+ /**
9664
+ * @description Exactamente uno por empresa lo lleva puesto: es el que hereda
9665
+ * todo movimiento que no elige almacén, que hoy son casi todos
9666
+ * (solo albarán y recepción preguntan).
9667
+ */
9668
+ is_default: boolean;
9669
+ /**
9670
+ * @description Un almacén con historia no se borra —el asiento lo nombra—: se
9671
+ * desactiva. Desactivado no se ofrece para movimientos nuevos y
9672
+ * sigue explicando los viejos.
9673
+ */
9674
+ is_active: boolean;
9675
+ /** Format: date-time */
9676
+ created_at: string | null;
9677
+ /** Format: date-time */
9678
+ updated_at: string | null;
9679
+ };
9034
9680
  /** WorkCalendarRequest */
9035
9681
  WorkCalendarRequest: {
9036
9682
  name: string;
@@ -9475,6 +10121,38 @@ export interface operations {
9475
10121
  422: components["responses"]["ValidationException"];
9476
10122
  };
9477
10123
  };
10124
+ "contract.activateContract": {
10125
+ parameters: {
10126
+ query?: never;
10127
+ header?: never;
10128
+ path: {
10129
+ /** @description The contract ID */
10130
+ contract: number;
10131
+ };
10132
+ cookie?: never;
10133
+ };
10134
+ requestBody?: {
10135
+ content: {
10136
+ "application/json": components["schemas"]["ActivateContractRequest"];
10137
+ };
10138
+ };
10139
+ responses: {
10140
+ /** @description `ContractResource` */
10141
+ 200: {
10142
+ headers: {
10143
+ [name: string]: unknown;
10144
+ };
10145
+ content: {
10146
+ "application/json": {
10147
+ data: components["schemas"]["ContractResource"];
10148
+ };
10149
+ };
10150
+ };
10151
+ 403: components["responses"]["AuthorizationException"];
10152
+ 404: components["responses"]["ModelNotFoundException"];
10153
+ 422: components["responses"]["ValidationException"];
10154
+ };
10155
+ };
9478
10156
  appVersion: {
9479
10157
  parameters: {
9480
10158
  query?: never;
@@ -10123,6 +10801,44 @@ export interface operations {
10123
10801
  422: components["responses"]["ValidationException"];
10124
10802
  };
10125
10803
  };
10804
+ "contract.cancelContract": {
10805
+ parameters: {
10806
+ query?: never;
10807
+ header?: never;
10808
+ path: {
10809
+ /** @description The contract ID */
10810
+ contract: number;
10811
+ };
10812
+ cookie?: never;
10813
+ };
10814
+ requestBody?: never;
10815
+ responses: {
10816
+ /** @description `ContractResource` */
10817
+ 200: {
10818
+ headers: {
10819
+ [name: string]: unknown;
10820
+ };
10821
+ content: {
10822
+ "application/json": {
10823
+ data: components["schemas"]["ContractResource"];
10824
+ };
10825
+ };
10826
+ };
10827
+ 403: components["responses"]["AuthorizationException"];
10828
+ 404: components["responses"]["ModelNotFoundException"];
10829
+ 422: {
10830
+ headers: {
10831
+ [name: string]: unknown;
10832
+ };
10833
+ content: {
10834
+ "application/json": {
10835
+ success: boolean;
10836
+ message: string;
10837
+ };
10838
+ };
10839
+ };
10840
+ };
10841
+ };
10126
10842
  "estimate.changeEstimateStatus": {
10127
10843
  parameters: {
10128
10844
  query?: never;
@@ -10454,80 +11170,310 @@ export interface operations {
10454
11170
  };
10455
11171
  };
10456
11172
  };
10457
- "connectedApps.index": {
11173
+ "connectedApps.index": {
11174
+ parameters: {
11175
+ query?: never;
11176
+ header?: never;
11177
+ path?: never;
11178
+ cookie?: never;
11179
+ };
11180
+ requestBody?: never;
11181
+ responses: {
11182
+ 200: {
11183
+ headers: {
11184
+ [name: string]: unknown;
11185
+ };
11186
+ content: {
11187
+ "application/json": {
11188
+ data: {
11189
+ id: number;
11190
+ name: string;
11191
+ confidential: boolean;
11192
+ scopes: string[];
11193
+ permissions: {
11194
+ text: string;
11195
+ write: boolean;
11196
+ }[];
11197
+ summary: string;
11198
+ connected_at: string | null;
11199
+ last_used_at: string | null;
11200
+ active_tokens: number;
11201
+ credentials: {
11202
+ id: number;
11203
+ connected_at: string | null;
11204
+ last_used_at: string | null;
11205
+ expires_at: string | null;
11206
+ }[];
11207
+ }[];
11208
+ };
11209
+ };
11210
+ };
11211
+ };
11212
+ };
11213
+ "connectedApps.destroyCredential": {
11214
+ parameters: {
11215
+ query?: never;
11216
+ header?: never;
11217
+ path: {
11218
+ credentialId: number;
11219
+ };
11220
+ cookie?: never;
11221
+ };
11222
+ requestBody?: never;
11223
+ responses: {
11224
+ 200: {
11225
+ headers: {
11226
+ [name: string]: unknown;
11227
+ };
11228
+ content: {
11229
+ "application/json": {
11230
+ message: string;
11231
+ revoked_tokens: number;
11232
+ };
11233
+ };
11234
+ };
11235
+ };
11236
+ };
11237
+ "connectedApps.destroy": {
11238
+ parameters: {
11239
+ query?: never;
11240
+ header?: never;
11241
+ path: {
11242
+ authorizationId: number;
11243
+ };
11244
+ cookie?: never;
11245
+ };
11246
+ requestBody?: never;
11247
+ responses: {
11248
+ 200: {
11249
+ headers: {
11250
+ [name: string]: unknown;
11251
+ };
11252
+ content: {
11253
+ "application/json": {
11254
+ message: string;
11255
+ revoked_tokens: number;
11256
+ };
11257
+ };
11258
+ };
11259
+ };
11260
+ };
11261
+ "contact.index": {
11262
+ parameters: {
11263
+ query: {
11264
+ customer_id: number;
11265
+ };
11266
+ header?: never;
11267
+ path?: never;
11268
+ cookie?: never;
11269
+ };
11270
+ requestBody?: never;
11271
+ responses: {
11272
+ /** @description Array of `ContactResource` */
11273
+ 200: {
11274
+ headers: {
11275
+ [name: string]: unknown;
11276
+ };
11277
+ content: {
11278
+ "application/json": {
11279
+ data: components["schemas"]["ContactResource"][];
11280
+ };
11281
+ };
11282
+ };
11283
+ 403: components["responses"]["AuthorizationException"];
11284
+ 422: components["responses"]["ValidationException"];
11285
+ };
11286
+ };
11287
+ "contact.store": {
11288
+ parameters: {
11289
+ query?: never;
11290
+ header?: never;
11291
+ path?: never;
11292
+ cookie?: never;
11293
+ };
11294
+ requestBody: {
11295
+ content: {
11296
+ "application/json": components["schemas"]["ContactRequest"];
11297
+ };
11298
+ };
11299
+ responses: {
11300
+ /** @description `ContactResource` */
11301
+ 201: {
11302
+ headers: {
11303
+ [name: string]: unknown;
11304
+ };
11305
+ content: {
11306
+ "application/json": {
11307
+ data: components["schemas"]["ContactResource"];
11308
+ };
11309
+ };
11310
+ };
11311
+ 403: components["responses"]["AuthorizationException"];
11312
+ 422: components["responses"]["ValidationException"];
11313
+ };
11314
+ };
11315
+ "contact.show": {
11316
+ parameters: {
11317
+ query?: never;
11318
+ header?: never;
11319
+ path: {
11320
+ /** @description The contact ID */
11321
+ contact: number;
11322
+ };
11323
+ cookie?: never;
11324
+ };
11325
+ requestBody?: never;
11326
+ responses: {
11327
+ /** @description `ContactResource` */
11328
+ 200: {
11329
+ headers: {
11330
+ [name: string]: unknown;
11331
+ };
11332
+ content: {
11333
+ "application/json": {
11334
+ data: components["schemas"]["ContactResource"];
11335
+ };
11336
+ };
11337
+ };
11338
+ 403: components["responses"]["AuthorizationException"];
11339
+ 404: components["responses"]["ModelNotFoundException"];
11340
+ };
11341
+ };
11342
+ "contact.update": {
11343
+ parameters: {
11344
+ query?: never;
11345
+ header?: never;
11346
+ path: {
11347
+ /** @description The contact ID */
11348
+ contact: number;
11349
+ };
11350
+ cookie?: never;
11351
+ };
11352
+ requestBody: {
11353
+ content: {
11354
+ "application/json": components["schemas"]["ContactRequest"];
11355
+ };
11356
+ };
11357
+ responses: {
11358
+ /** @description `ContactResource` */
11359
+ 200: {
11360
+ headers: {
11361
+ [name: string]: unknown;
11362
+ };
11363
+ content: {
11364
+ "application/json": {
11365
+ data: components["schemas"]["ContactResource"];
11366
+ };
11367
+ };
11368
+ };
11369
+ 403: components["responses"]["AuthorizationException"];
11370
+ 404: components["responses"]["ModelNotFoundException"];
11371
+ 422: components["responses"]["ValidationException"];
11372
+ };
11373
+ };
11374
+ "contact.destroy": {
11375
+ parameters: {
11376
+ query?: never;
11377
+ header?: never;
11378
+ path: {
11379
+ /** @description The contact ID */
11380
+ contact: number;
11381
+ };
11382
+ cookie?: never;
11383
+ };
11384
+ requestBody?: never;
11385
+ responses: {
11386
+ 200: {
11387
+ headers: {
11388
+ [name: string]: unknown;
11389
+ };
11390
+ content: {
11391
+ "application/json": {
11392
+ success: boolean;
11393
+ };
11394
+ };
11395
+ };
11396
+ 403: components["responses"]["AuthorizationException"];
11397
+ 404: components["responses"]["ModelNotFoundException"];
11398
+ };
11399
+ };
11400
+ "contractDocument.upload": {
10458
11401
  parameters: {
10459
11402
  query?: never;
10460
11403
  header?: never;
10461
- path?: never;
11404
+ path: {
11405
+ /** @description The contract ID */
11406
+ contract: number;
11407
+ };
10462
11408
  cookie?: never;
10463
11409
  };
10464
- requestBody?: never;
11410
+ requestBody: {
11411
+ content: {
11412
+ "multipart/form-data": {
11413
+ /**
11414
+ * Format: binary
11415
+ * @description Maximum file size: 10240 kilobytes.
11416
+ */
11417
+ document: Blob;
11418
+ };
11419
+ };
11420
+ };
10465
11421
  responses: {
11422
+ /** @description `ContractResource` */
10466
11423
  200: {
10467
11424
  headers: {
10468
11425
  [name: string]: unknown;
10469
11426
  };
10470
11427
  content: {
10471
11428
  "application/json": {
10472
- data: {
10473
- id: number;
10474
- name: string;
10475
- confidential: boolean;
10476
- scopes: string[];
10477
- permissions: {
10478
- text: string;
10479
- write: boolean;
10480
- }[];
10481
- summary: string;
10482
- connected_at: string | null;
10483
- last_used_at: string | null;
10484
- active_tokens: number;
10485
- credentials: {
10486
- id: number;
10487
- connected_at: string | null;
10488
- last_used_at: string | null;
10489
- expires_at: string | null;
10490
- }[];
10491
- }[];
11429
+ data: components["schemas"]["ContractResource"];
10492
11430
  };
10493
11431
  };
10494
11432
  };
11433
+ 403: components["responses"]["AuthorizationException"];
11434
+ 404: components["responses"]["ModelNotFoundException"];
11435
+ 422: components["responses"]["ValidationException"];
10495
11436
  };
10496
11437
  };
10497
- "connectedApps.destroyCredential": {
11438
+ "contractDocument.destroy": {
10498
11439
  parameters: {
10499
11440
  query?: never;
10500
11441
  header?: never;
10501
11442
  path: {
10502
- credentialId: number;
11443
+ /** @description The contract ID */
11444
+ contract: number;
10503
11445
  };
10504
11446
  cookie?: never;
10505
11447
  };
10506
11448
  requestBody?: never;
10507
11449
  responses: {
11450
+ /** @description `ContractResource` */
10508
11451
  200: {
10509
11452
  headers: {
10510
11453
  [name: string]: unknown;
10511
11454
  };
10512
11455
  content: {
10513
11456
  "application/json": {
10514
- message: string;
10515
- revoked_tokens: number;
11457
+ data: components["schemas"]["ContractResource"];
10516
11458
  };
10517
11459
  };
10518
11460
  };
11461
+ 403: components["responses"]["AuthorizationException"];
11462
+ 404: components["responses"]["ModelNotFoundException"];
10519
11463
  };
10520
11464
  };
10521
- "connectedApps.destroy": {
11465
+ "contracts.delete": {
10522
11466
  parameters: {
10523
11467
  query?: never;
10524
11468
  header?: never;
10525
- path: {
10526
- authorizationId: number;
10527
- };
11469
+ path?: never;
10528
11470
  cookie?: never;
10529
11471
  };
10530
- requestBody?: never;
11472
+ requestBody: {
11473
+ content: {
11474
+ "application/json": components["schemas"]["DeleteContractsRequest"];
11475
+ };
11476
+ };
10531
11477
  responses: {
10532
11478
  200: {
10533
11479
  headers: {
@@ -10535,40 +11481,41 @@ export interface operations {
10535
11481
  };
10536
11482
  content: {
10537
11483
  "application/json": {
10538
- message: string;
10539
- revoked_tokens: number;
11484
+ success: boolean;
10540
11485
  };
10541
11486
  };
10542
11487
  };
11488
+ 403: components["responses"]["AuthorizationException"];
11489
+ 422: components["responses"]["ValidationException"];
10543
11490
  };
10544
11491
  };
10545
- "contact.index": {
11492
+ "contracts.index": {
10546
11493
  parameters: {
10547
- query: {
10548
- customer_id: number;
10549
- };
11494
+ query?: never;
10550
11495
  header?: never;
10551
11496
  path?: never;
10552
11497
  cookie?: never;
10553
11498
  };
10554
11499
  requestBody?: never;
10555
11500
  responses: {
10556
- /** @description Array of `ContactResource` */
11501
+ /** @description Array of `ContractResource` */
10557
11502
  200: {
10558
11503
  headers: {
10559
11504
  [name: string]: unknown;
10560
11505
  };
10561
11506
  content: {
10562
11507
  "application/json": {
10563
- data: components["schemas"]["ContactResource"][];
11508
+ data: components["schemas"]["ContractResource"][];
11509
+ meta: {
11510
+ contract_total_count: number;
11511
+ };
10564
11512
  };
10565
11513
  };
10566
11514
  };
10567
11515
  403: components["responses"]["AuthorizationException"];
10568
- 422: components["responses"]["ValidationException"];
10569
11516
  };
10570
11517
  };
10571
- "contact.store": {
11518
+ "contracts.store": {
10572
11519
  parameters: {
10573
11520
  query?: never;
10574
11521
  header?: never;
@@ -10577,18 +11524,18 @@ export interface operations {
10577
11524
  };
10578
11525
  requestBody: {
10579
11526
  content: {
10580
- "application/json": components["schemas"]["ContactRequest"];
11527
+ "application/json": components["schemas"]["ContractRequest"];
10581
11528
  };
10582
11529
  };
10583
11530
  responses: {
10584
- /** @description `ContactResource` */
11531
+ /** @description `ContractResource` */
10585
11532
  201: {
10586
11533
  headers: {
10587
11534
  [name: string]: unknown;
10588
11535
  };
10589
11536
  content: {
10590
11537
  "application/json": {
10591
- data: components["schemas"]["ContactResource"];
11538
+ data: components["schemas"]["ContractResource"];
10592
11539
  };
10593
11540
  };
10594
11541
  };
@@ -10596,26 +11543,26 @@ export interface operations {
10596
11543
  422: components["responses"]["ValidationException"];
10597
11544
  };
10598
11545
  };
10599
- "contact.show": {
11546
+ "contracts.show": {
10600
11547
  parameters: {
10601
11548
  query?: never;
10602
11549
  header?: never;
10603
11550
  path: {
10604
- /** @description The contact ID */
10605
- contact: number;
11551
+ /** @description The contract ID */
11552
+ contract: number;
10606
11553
  };
10607
11554
  cookie?: never;
10608
11555
  };
10609
11556
  requestBody?: never;
10610
11557
  responses: {
10611
- /** @description `ContactResource` */
11558
+ /** @description `ContractResource` */
10612
11559
  200: {
10613
11560
  headers: {
10614
11561
  [name: string]: unknown;
10615
11562
  };
10616
11563
  content: {
10617
11564
  "application/json": {
10618
- data: components["schemas"]["ContactResource"];
11565
+ data: components["schemas"]["ContractResource"];
10619
11566
  };
10620
11567
  };
10621
11568
  };
@@ -10623,30 +11570,30 @@ export interface operations {
10623
11570
  404: components["responses"]["ModelNotFoundException"];
10624
11571
  };
10625
11572
  };
10626
- "contact.update": {
11573
+ "contracts.update": {
10627
11574
  parameters: {
10628
11575
  query?: never;
10629
11576
  header?: never;
10630
11577
  path: {
10631
- /** @description The contact ID */
10632
- contact: number;
11578
+ /** @description The contract ID */
11579
+ contract: number;
10633
11580
  };
10634
11581
  cookie?: never;
10635
11582
  };
10636
11583
  requestBody: {
10637
11584
  content: {
10638
- "application/json": components["schemas"]["ContactRequest"];
11585
+ "application/json": components["schemas"]["ContractRequest"];
10639
11586
  };
10640
11587
  };
10641
11588
  responses: {
10642
- /** @description `ContactResource` */
11589
+ /** @description `ContractResource` */
10643
11590
  200: {
10644
11591
  headers: {
10645
11592
  [name: string]: unknown;
10646
11593
  };
10647
11594
  content: {
10648
11595
  "application/json": {
10649
- data: components["schemas"]["ContactResource"];
11596
+ data: components["schemas"]["ContractResource"];
10650
11597
  };
10651
11598
  };
10652
11599
  };
@@ -10655,13 +11602,13 @@ export interface operations {
10655
11602
  422: components["responses"]["ValidationException"];
10656
11603
  };
10657
11604
  };
10658
- "contact.destroy": {
11605
+ "contracts.destroy": {
10659
11606
  parameters: {
10660
11607
  query?: never;
10661
11608
  header?: never;
10662
11609
  path: {
10663
- /** @description The contact ID */
10664
- contact: number;
11610
+ /** @description The contract ID */
11611
+ contract: number;
10665
11612
  };
10666
11613
  cookie?: never;
10667
11614
  };
@@ -10679,6 +11626,17 @@ export interface operations {
10679
11626
  };
10680
11627
  403: components["responses"]["AuthorizationException"];
10681
11628
  404: components["responses"]["ModelNotFoundException"];
11629
+ 422: {
11630
+ headers: {
11631
+ [name: string]: unknown;
11632
+ };
11633
+ content: {
11634
+ "application/json": {
11635
+ success: boolean;
11636
+ message: string;
11637
+ };
11638
+ };
11639
+ };
10682
11640
  };
10683
11641
  };
10684
11642
  "estimate.convertEstimate": {
@@ -14843,14 +15801,21 @@ export interface operations {
14843
15801
  };
14844
15802
  "items.index": {
14845
15803
  parameters: {
14846
- query?: never;
15804
+ query?: {
15805
+ /** @description Con `summary`, cada fila trae solo lo que los listados leen: identidad, precios y banderas, la categoría reducida a `{id, name}`, el nombre de la unidad y los impuestos del artículo (enteros, con la misma forma que la vista completa). Sin empresa, sin moneda y sin la unidad como objeto — el recurso completo arrastra la empresa entera por fila, roles incluidos, y contra un catálogo de 200 artículos eso son ~4 s y ~900 KB de los que el 86 % es ese lastre. El artículo completo sigue en el detalle y en el índice sin este parámetro. */
15806
+ view?: "summary";
15807
+ };
14847
15808
  header?: never;
14848
15809
  path?: never;
14849
15810
  cookie?: never;
14850
15811
  };
14851
15812
  requestBody?: never;
14852
15813
  responses: {
14853
- /** @description Array of `ItemResource` */
15814
+ /**
15815
+ * @description Array of `ItemResource`
15816
+ *
15817
+ * Array of `ItemSummaryResource`
15818
+ */
14854
15819
  200: {
14855
15820
  headers: {
14856
15821
  [name: string]: unknown;
@@ -14862,6 +15827,12 @@ export interface operations {
14862
15827
  tax_types: components["schemas"]["TaxType"][];
14863
15828
  item_total_count: number;
14864
15829
  };
15830
+ } | {
15831
+ data: (components["schemas"]["ItemSummaryResource"] & Record<string, never>)[];
15832
+ meta: {
15833
+ tax_types: components["schemas"]["TaxType"][];
15834
+ item_total_count: number;
15835
+ };
14865
15836
  };
14866
15837
  };
14867
15838
  };
@@ -16972,6 +17943,43 @@ export interface operations {
16972
17943
  };
16973
17944
  };
16974
17945
  };
17946
+ "receivedInvoices.markGoodsReceived": {
17947
+ parameters: {
17948
+ query?: never;
17949
+ header?: never;
17950
+ path: {
17951
+ id: string;
17952
+ };
17953
+ cookie?: never;
17954
+ };
17955
+ requestBody?: never;
17956
+ responses: {
17957
+ /** @description `ReceivedInvoiceResource` */
17958
+ 200: {
17959
+ headers: {
17960
+ [name: string]: unknown;
17961
+ };
17962
+ content: {
17963
+ "application/json": {
17964
+ data: components["schemas"]["ReceivedInvoiceResource"];
17965
+ };
17966
+ };
17967
+ };
17968
+ 422: {
17969
+ headers: {
17970
+ [name: string]: unknown;
17971
+ };
17972
+ content: {
17973
+ "application/json": {
17974
+ /** @constant */
17975
+ error: "goods_already_received";
17976
+ /** @constant */
17977
+ message: "La mercancía de esta factura recibida ya se sumó al almacén.";
17978
+ };
17979
+ };
17980
+ };
17981
+ };
17982
+ };
16975
17983
  "reconciliation.transactions": {
16976
17984
  parameters: {
16977
17985
  query?: {
@@ -17475,6 +18483,38 @@ export interface operations {
17475
18483
  422: components["responses"]["ValidationException"];
17476
18484
  };
17477
18485
  };
18486
+ "contract.renewContract": {
18487
+ parameters: {
18488
+ query?: never;
18489
+ header?: never;
18490
+ path: {
18491
+ /** @description The contract ID */
18492
+ contract: number;
18493
+ };
18494
+ cookie?: never;
18495
+ };
18496
+ requestBody: {
18497
+ content: {
18498
+ "application/json": components["schemas"]["RenewContractRequest"];
18499
+ };
18500
+ };
18501
+ responses: {
18502
+ /** @description `ContractResource` */
18503
+ 200: {
18504
+ headers: {
18505
+ [name: string]: unknown;
18506
+ };
18507
+ content: {
18508
+ "application/json": {
18509
+ data: components["schemas"]["ContractResource"];
18510
+ };
18511
+ };
18512
+ };
18513
+ 403: components["responses"]["AuthorizationException"];
18514
+ 404: components["responses"]["ModelNotFoundException"];
18515
+ 422: components["responses"]["ValidationException"];
18516
+ };
18517
+ };
17478
18518
  "roles.getAbilities": {
17479
18519
  parameters: {
17480
18520
  query?: never;
@@ -18058,19 +19098,106 @@ export interface operations {
18058
19098
  content: {
18059
19099
  "application/json": {
18060
19100
  /** @constant */
18061
- error: "xml_generation_error";
18062
- message: string;
19101
+ error: "xml_generation_error";
19102
+ message: string;
19103
+ };
19104
+ };
19105
+ };
19106
+ };
19107
+ };
19108
+ "sepa-remittances.show": {
19109
+ parameters: {
19110
+ query?: never;
19111
+ header?: never;
19112
+ path: {
19113
+ sepa_remittance: string;
19114
+ };
19115
+ cookie?: never;
19116
+ };
19117
+ requestBody?: never;
19118
+ responses: {
19119
+ 200: {
19120
+ headers: {
19121
+ [name: string]: unknown;
19122
+ };
19123
+ content: {
19124
+ "application/json": {
19125
+ data: components["schemas"]["SepaRemittance"];
19126
+ };
19127
+ };
19128
+ };
19129
+ };
19130
+ };
19131
+ "sepa-remittances.destroy": {
19132
+ parameters: {
19133
+ query?: never;
19134
+ header?: never;
19135
+ path: {
19136
+ sepa_remittance: string;
19137
+ };
19138
+ cookie?: never;
19139
+ };
19140
+ requestBody?: never;
19141
+ responses: {
19142
+ 200: {
19143
+ headers: {
19144
+ [name: string]: unknown;
19145
+ };
19146
+ content: {
19147
+ "application/json": {
19148
+ success: boolean;
19149
+ };
19150
+ };
19151
+ };
19152
+ };
19153
+ };
19154
+ "invoice.sharedLink": {
19155
+ parameters: {
19156
+ query?: never;
19157
+ header?: never;
19158
+ path: {
19159
+ /** @description The invoice ID */
19160
+ invoice: number;
19161
+ };
19162
+ cookie?: never;
19163
+ };
19164
+ requestBody?: never;
19165
+ responses: {
19166
+ 200: {
19167
+ headers: {
19168
+ [name: string]: unknown;
19169
+ };
19170
+ content: {
19171
+ "application/json": {
19172
+ data: {
19173
+ url: string;
19174
+ expires_at: string;
19175
+ };
19176
+ };
19177
+ };
19178
+ };
19179
+ 403: components["responses"]["AuthorizationException"];
19180
+ 404: components["responses"]["ModelNotFoundException"];
19181
+ 422: {
19182
+ headers: {
19183
+ [name: string]: unknown;
19184
+ };
19185
+ content: {
19186
+ "application/json": {
19187
+ /** @constant */
19188
+ message: "Un borrador no tiene enlace: publica la factura primero.";
18063
19189
  };
18064
19190
  };
18065
19191
  };
18066
19192
  };
18067
19193
  };
18068
- "sepa-remittances.show": {
19194
+ "contract.sharedLink": {
18069
19195
  parameters: {
18070
19196
  query?: never;
18071
19197
  header?: never;
18072
19198
  path: {
18073
- sepa_remittance: string;
19199
+ /** @description The contract ID */
19200
+ contract: number;
18074
19201
  };
18075
19202
  cookie?: never;
18076
19203
  };
@@ -18082,18 +19209,35 @@ export interface operations {
18082
19209
  };
18083
19210
  content: {
18084
19211
  "application/json": {
18085
- data: components["schemas"]["SepaRemittance"];
19212
+ data: {
19213
+ url: string;
19214
+ expires_at: string;
19215
+ };
19216
+ };
19217
+ };
19218
+ };
19219
+ 403: components["responses"]["AuthorizationException"];
19220
+ 404: components["responses"]["ModelNotFoundException"];
19221
+ 422: {
19222
+ headers: {
19223
+ [name: string]: unknown;
19224
+ };
19225
+ content: {
19226
+ "application/json": {
19227
+ /** @constant */
19228
+ message: "Un contrato sin activar no tiene enlace todavía.";
18086
19229
  };
18087
19230
  };
18088
19231
  };
18089
19232
  };
18090
19233
  };
18091
- "sepa-remittances.destroy": {
19234
+ "estimate.sharedLink": {
18092
19235
  parameters: {
18093
19236
  query?: never;
18094
19237
  header?: never;
18095
19238
  path: {
18096
- sepa_remittance: string;
19239
+ /** @description The estimate ID */
19240
+ estimate: number;
18097
19241
  };
18098
19242
  cookie?: never;
18099
19243
  };
@@ -18105,7 +19249,23 @@ export interface operations {
18105
19249
  };
18106
19250
  content: {
18107
19251
  "application/json": {
18108
- success: boolean;
19252
+ data: {
19253
+ url: string;
19254
+ expires_at: string;
19255
+ };
19256
+ };
19257
+ };
19258
+ };
19259
+ 403: components["responses"]["AuthorizationException"];
19260
+ 404: components["responses"]["ModelNotFoundException"];
19261
+ 422: {
19262
+ headers: {
19263
+ [name: string]: unknown;
19264
+ };
19265
+ content: {
19266
+ "application/json": {
19267
+ /** @constant */
19268
+ message: "Un presupuesto sin número no tiene enlace todavía.";
18109
19269
  };
18110
19270
  };
18111
19271
  };
@@ -18337,6 +19497,123 @@ export interface operations {
18337
19497
  };
18338
19498
  };
18339
19499
  };
19500
+ "item.stockAdjustments": {
19501
+ parameters: {
19502
+ query?: never;
19503
+ header?: never;
19504
+ path: {
19505
+ item: string;
19506
+ };
19507
+ cookie?: never;
19508
+ };
19509
+ requestBody: {
19510
+ content: {
19511
+ "application/json": components["schemas"]["StockAdjustmentRequest"];
19512
+ };
19513
+ };
19514
+ responses: {
19515
+ /** @description `StockMovementResource` */
19516
+ 201: {
19517
+ headers: {
19518
+ [name: string]: unknown;
19519
+ };
19520
+ content: {
19521
+ "application/json": {
19522
+ data: components["schemas"]["StockMovementResource"];
19523
+ };
19524
+ };
19525
+ };
19526
+ 403: components["responses"]["AuthorizationException"];
19527
+ 422: components["responses"]["ValidationException"];
19528
+ };
19529
+ };
19530
+ "stockMovements.index": {
19531
+ parameters: {
19532
+ query?: {
19533
+ /** @description Solo los asientos de este artículo. */
19534
+ item_id?: number;
19535
+ /** @description Solo los asientos con este motivo (`initial`, `import`, `manual_edit`, `manual_adjustment`, `purchase`, `sale_invoice`, `delivery_note`, `pos_sale`, `pos_return`). */
19536
+ reason?: string;
19537
+ /** @description Solo los asientos de este almacén. */
19538
+ warehouse_id?: number;
19539
+ /** @description Desde esta fecha (YYYY-MM-DD). */
19540
+ from_date?: string;
19541
+ /** @description Hasta esta fecha (YYYY-MM-DD). */
19542
+ to_date?: string;
19543
+ };
19544
+ header?: never;
19545
+ path?: never;
19546
+ cookie?: never;
19547
+ };
19548
+ requestBody?: never;
19549
+ responses: {
19550
+ /** @description Array of `StockMovementResource` */
19551
+ 200: {
19552
+ headers: {
19553
+ [name: string]: unknown;
19554
+ };
19555
+ content: {
19556
+ "application/json": {
19557
+ data: components["schemas"]["StockMovementResource"][];
19558
+ meta: {
19559
+ stock_movement_total_count: number;
19560
+ /**
19561
+ * @description S8, informativo: lo que vale el almacén hoy, en céntimos —
19562
+ * existencias × coste medio aprendido, con el precio de compra
19563
+ * de la ficha como respaldo cuando aún no hay medio. Los
19564
+ * artículos sin ninguno de los dos cuentan 0: la cifra no se
19565
+ * inventa costes, y por eso puede quedarse corta — nunca
19566
+ * larga. NO es un asiento contable ni una valoración de
19567
+ * cierre (estudio de stock §6).
19568
+ */
19569
+ stock_value_cents: number;
19570
+ };
19571
+ };
19572
+ };
19573
+ };
19574
+ 403: components["responses"]["AuthorizationException"];
19575
+ };
19576
+ };
19577
+ "stockMovements.forItem": {
19578
+ parameters: {
19579
+ query?: never;
19580
+ header?: never;
19581
+ path: {
19582
+ item: string;
19583
+ };
19584
+ cookie?: never;
19585
+ };
19586
+ requestBody?: never;
19587
+ responses: {
19588
+ /** @description Array of `StockMovementResource` */
19589
+ 200: {
19590
+ headers: {
19591
+ [name: string]: unknown;
19592
+ };
19593
+ content: {
19594
+ "application/json": {
19595
+ data: components["schemas"]["StockMovementResource"][];
19596
+ meta: {
19597
+ opening_stock: number | null;
19598
+ /**
19599
+ * @description El reparto del saldo por almacén (N2). Su suma es
19600
+ * exactamente `opening_stock` de arriba — es el mismo número
19601
+ * contado por sitios, no una segunda cuenta. Se sirve entero
19602
+ * (una pyme tiene almacenes de contar con los dedos) y sin
19603
+ * paginar: es cabecera de la pestaña, no listado.
19604
+ */
19605
+ warehouse_stock: {
19606
+ warehouse_id: number;
19607
+ warehouse_name: string;
19608
+ quantity: number;
19609
+ }[];
19610
+ };
19611
+ };
19612
+ };
19613
+ };
19614
+ 403: components["responses"]["AuthorizationException"];
19615
+ };
19616
+ };
18340
19617
  "storeModules.index": {
18341
19618
  parameters: {
18342
19619
  query?: never;
@@ -23392,6 +24669,180 @@ export interface operations {
23392
24669
  422: components["responses"]["ValidationException"];
23393
24670
  };
23394
24671
  };
24672
+ "warehouses.stock": {
24673
+ parameters: {
24674
+ query?: {
24675
+ /** @description Filtra por nombre del artículo. */
24676
+ search?: string;
24677
+ /** @description Solo los artículos con saldo distinto de cero (`1`). */
24678
+ only_with_stock?: boolean;
24679
+ };
24680
+ header?: never;
24681
+ path: {
24682
+ /** @description The warehouse ID */
24683
+ warehouse: number;
24684
+ };
24685
+ cookie?: never;
24686
+ };
24687
+ requestBody?: never;
24688
+ responses: {
24689
+ /** @description Array of `ItemWarehouseStockResource` */
24690
+ 200: {
24691
+ headers: {
24692
+ [name: string]: unknown;
24693
+ };
24694
+ content: {
24695
+ "application/json": {
24696
+ data: components["schemas"]["ItemWarehouseStockResource"][];
24697
+ meta: {
24698
+ warehouse: components["schemas"]["WarehouseResource"];
24699
+ };
24700
+ };
24701
+ };
24702
+ };
24703
+ 403: components["responses"]["AuthorizationException"];
24704
+ 404: components["responses"]["ModelNotFoundException"];
24705
+ };
24706
+ };
24707
+ "warehouses.index": {
24708
+ parameters: {
24709
+ query?: {
24710
+ /** @description Filtra por nombre o código. */
24711
+ search?: string;
24712
+ /** @description Solo los activos (`1`) o solo los desactivados (`0`). */
24713
+ is_active?: boolean;
24714
+ };
24715
+ header?: never;
24716
+ path?: never;
24717
+ cookie?: never;
24718
+ };
24719
+ requestBody?: never;
24720
+ responses: {
24721
+ /** @description Array of `WarehouseResource` */
24722
+ 200: {
24723
+ headers: {
24724
+ [name: string]: unknown;
24725
+ };
24726
+ content: {
24727
+ "application/json": {
24728
+ data: components["schemas"]["WarehouseResource"][];
24729
+ };
24730
+ };
24731
+ };
24732
+ 403: components["responses"]["AuthorizationException"];
24733
+ };
24734
+ };
24735
+ "warehouses.store": {
24736
+ parameters: {
24737
+ query?: never;
24738
+ header?: never;
24739
+ path?: never;
24740
+ cookie?: never;
24741
+ };
24742
+ requestBody: {
24743
+ content: {
24744
+ "application/json": components["schemas"]["WarehouseRequest"];
24745
+ };
24746
+ };
24747
+ responses: {
24748
+ /** @description El recurso recién creado. */
24749
+ 201: {
24750
+ headers: {
24751
+ [name: string]: unknown;
24752
+ };
24753
+ content: {
24754
+ "application/json": 201;
24755
+ };
24756
+ };
24757
+ 403: components["responses"]["AuthorizationException"];
24758
+ 422: components["responses"]["ValidationException"];
24759
+ };
24760
+ };
24761
+ "warehouses.show": {
24762
+ parameters: {
24763
+ query?: never;
24764
+ header?: never;
24765
+ path: {
24766
+ /** @description The warehouse ID */
24767
+ warehouse: number;
24768
+ };
24769
+ cookie?: never;
24770
+ };
24771
+ requestBody?: never;
24772
+ responses: {
24773
+ /** @description `WarehouseResource` */
24774
+ 200: {
24775
+ headers: {
24776
+ [name: string]: unknown;
24777
+ };
24778
+ content: {
24779
+ "application/json": {
24780
+ data: components["schemas"]["WarehouseResource"];
24781
+ };
24782
+ };
24783
+ };
24784
+ 403: components["responses"]["AuthorizationException"];
24785
+ 404: components["responses"]["ModelNotFoundException"];
24786
+ };
24787
+ };
24788
+ "warehouses.update": {
24789
+ parameters: {
24790
+ query?: never;
24791
+ header?: never;
24792
+ path: {
24793
+ /** @description The warehouse ID */
24794
+ warehouse: number;
24795
+ };
24796
+ cookie?: never;
24797
+ };
24798
+ requestBody: {
24799
+ content: {
24800
+ "application/json": components["schemas"]["WarehouseRequest"];
24801
+ };
24802
+ };
24803
+ responses: {
24804
+ /** @description `WarehouseResource` */
24805
+ 200: {
24806
+ headers: {
24807
+ [name: string]: unknown;
24808
+ };
24809
+ content: {
24810
+ "application/json": {
24811
+ data: components["schemas"]["WarehouseResource"];
24812
+ } | string;
24813
+ };
24814
+ };
24815
+ 403: components["responses"]["AuthorizationException"];
24816
+ 404: components["responses"]["ModelNotFoundException"];
24817
+ 422: components["responses"]["ValidationException"];
24818
+ };
24819
+ };
24820
+ "warehouses.destroy": {
24821
+ parameters: {
24822
+ query?: never;
24823
+ header?: never;
24824
+ path: {
24825
+ /** @description The warehouse ID */
24826
+ warehouse: number;
24827
+ };
24828
+ cookie?: never;
24829
+ };
24830
+ requestBody?: never;
24831
+ responses: {
24832
+ 200: {
24833
+ headers: {
24834
+ [name: string]: unknown;
24835
+ };
24836
+ content: {
24837
+ "application/json": {
24838
+ success: string;
24839
+ };
24840
+ };
24841
+ };
24842
+ 403: components["responses"]["AuthorizationException"];
24843
+ 404: components["responses"]["ModelNotFoundException"];
24844
+ };
24845
+ };
23395
24846
  "webhookEndpoints.index": {
23396
24847
  parameters: {
23397
24848
  query?: never;