intifact 1.1.0 → 1.1.2
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/README.md +32 -10
- package/dist/index.d.ts +1577 -290
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +181 -38
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +16 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,30 @@ import type { paths } from "./types.js";
|
|
|
3
3
|
export type { paths, components } from "./types.js";
|
|
4
4
|
/** Body de POST /api/v1/invoice/send */
|
|
5
5
|
export type SendInvoiceInput = paths["/api/v1/invoice/send"]["post"]["requestBody"]["content"]["application/json"];
|
|
6
|
+
/** Body de POST /api/v1/invoice/compute */
|
|
7
|
+
export type ComputeInvoiceInput = paths["/api/v1/invoice/compute"]["post"]["requestBody"]["content"]["application/json"];
|
|
6
8
|
/** Body de POST /api/v1/note/send */
|
|
7
9
|
export type SendNoteInput = paths["/api/v1/note/send"]["post"]["requestBody"]["content"]["application/json"];
|
|
8
|
-
/** Body de POST /api/v1/
|
|
10
|
+
/** Body de POST /api/v1/note/compute */
|
|
11
|
+
export type ComputeNoteInput = paths["/api/v1/note/compute"]["post"]["requestBody"]["content"]["application/json"];
|
|
12
|
+
/** Body de POST /api/v1/despatch/send (Guía Remitente 09) */
|
|
9
13
|
export type SendDespatchInput = paths["/api/v1/despatch/send"]["post"]["requestBody"]["content"]["application/json"];
|
|
14
|
+
/** Body de POST /api/v1/despatch/send-multi */
|
|
15
|
+
export type SendDespatchMultiInput = paths["/api/v1/despatch/send-multi"]["post"]["requestBody"]["content"]["application/json"];
|
|
16
|
+
/** Body de POST /api/v1/despatch-transportista/send (Guía Transportista 31) */
|
|
17
|
+
export type SendDespatchTransportistaInput = paths["/api/v1/despatch-transportista/send"]["post"]["requestBody"]["content"]["application/json"];
|
|
18
|
+
/** Body de POST /api/v1/summary/send (Resumen Diario) */
|
|
19
|
+
export type SendSummaryInput = paths["/api/v1/summary/send"]["post"]["requestBody"]["content"]["application/json"];
|
|
20
|
+
/** Body de POST /api/v1/voided/send (Comunicación de Baja) */
|
|
21
|
+
export type SendVoidedInput = paths["/api/v1/voided/send"]["post"]["requestBody"]["content"]["application/json"];
|
|
22
|
+
/** Body de POST /api/v1/invoice/cancel (anular factura) */
|
|
23
|
+
export type CancelInvoiceInput = paths["/api/v1/invoice/cancel"]["post"]["requestBody"]["content"]["application/json"];
|
|
24
|
+
/** Body de POST /api/v1/boleta/cancel (anular boleta) */
|
|
25
|
+
export type CancelBoletaInput = paths["/api/v1/boleta/cancel"]["post"]["requestBody"]["content"]["application/json"];
|
|
26
|
+
/** Body de POST /api/v1/webhooks */
|
|
27
|
+
export type CreateWebhookInput = paths["/api/v1/webhooks"]["post"]["requestBody"]["content"]["application/json"];
|
|
28
|
+
/** Body de PUT /api/v1/webhooks/{id} */
|
|
29
|
+
export type UpdateWebhookInput = paths["/api/v1/webhooks/{id}"]["put"]["requestBody"]["content"]["application/json"];
|
|
10
30
|
/** Respuesta 202 de cualquier /send (documento encolado) */
|
|
11
31
|
export type EnqueueResponse = paths["/api/v1/invoice/send"]["post"]["responses"]["202"]["content"]["application/json"];
|
|
12
32
|
/** Respuesta de GET /api/v1/queues/stats */
|
|
@@ -22,7 +42,7 @@ export interface FacturacionClientOptions extends ClientOptions {
|
|
|
22
42
|
*
|
|
23
43
|
* @example
|
|
24
44
|
* ```ts
|
|
25
|
-
* const fact = new FacturacionClient({ baseUrl: "http://localhost:3000" });
|
|
45
|
+
* const fact = new FacturacionClient({ baseUrl: "http://localhost:3000", apiKey: "fact_test_..." });
|
|
26
46
|
* const { data, error } = await fact.sendInvoice({ ...payload });
|
|
27
47
|
* if (data) console.log("encolado:", data.data.id);
|
|
28
48
|
* ```
|
|
@@ -30,7 +50,7 @@ export interface FacturacionClientOptions extends ClientOptions {
|
|
|
30
50
|
export declare class FacturacionClient {
|
|
31
51
|
private readonly api;
|
|
32
52
|
constructor(opts: FacturacionClientOptions);
|
|
33
|
-
/** Envía factura o boleta. Encolada para procesamiento asíncrono. */
|
|
53
|
+
/** Envía factura (01) o boleta (03). Encolada para procesamiento asíncrono → 202. */
|
|
34
54
|
sendInvoice(body: SendInvoiceInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
35
55
|
parameters: {
|
|
36
56
|
query?: never;
|
|
@@ -53,6 +73,9 @@ export declare class FacturacionClient {
|
|
|
53
73
|
clienteNumDoc: string;
|
|
54
74
|
clienteRazonSocial: string;
|
|
55
75
|
clienteDireccion?: string;
|
|
76
|
+
clienteDistrito?: string;
|
|
77
|
+
clienteProvincia?: string;
|
|
78
|
+
clienteDepartamento?: string;
|
|
56
79
|
montoOperGravadas?: number;
|
|
57
80
|
montoOperExoneradas?: number;
|
|
58
81
|
montoOperInafectas?: number;
|
|
@@ -62,7 +85,9 @@ export declare class FacturacionClient {
|
|
|
62
85
|
valorVenta: number;
|
|
63
86
|
subTotal: number;
|
|
64
87
|
montoImpVenta: number;
|
|
65
|
-
descuentoGlobal
|
|
88
|
+
descuentoGlobal
|
|
89
|
+
/** Anula una factura (comunicación de baja). */
|
|
90
|
+
?: number;
|
|
66
91
|
descuentoGlobalBase?: number;
|
|
67
92
|
detalle: {
|
|
68
93
|
unidad: string;
|
|
@@ -79,7 +104,9 @@ export declare class FacturacionClient {
|
|
|
79
104
|
montoPrecioUnitario: number;
|
|
80
105
|
montoValorVenta: number;
|
|
81
106
|
descuento?: number;
|
|
82
|
-
descuentoItem
|
|
107
|
+
descuentoItem
|
|
108
|
+
/** Lista documentos con filtros y paginación. */
|
|
109
|
+
?: number;
|
|
83
110
|
factorIcbper?: number;
|
|
84
111
|
codProdSunat?: string;
|
|
85
112
|
}[];
|
|
@@ -169,6 +196,9 @@ export declare class FacturacionClient {
|
|
|
169
196
|
clienteNumDoc: string;
|
|
170
197
|
clienteRazonSocial: string;
|
|
171
198
|
clienteDireccion?: string;
|
|
199
|
+
clienteDistrito?: string;
|
|
200
|
+
clienteProvincia?: string;
|
|
201
|
+
clienteDepartamento?: string;
|
|
172
202
|
montoOperGravadas?: number;
|
|
173
203
|
montoOperExoneradas?: number;
|
|
174
204
|
montoOperInafectas?: number;
|
|
@@ -195,7 +225,9 @@ export declare class FacturacionClient {
|
|
|
195
225
|
montoPrecioUnitario: number;
|
|
196
226
|
montoValorVenta: number;
|
|
197
227
|
descuento?: number;
|
|
198
|
-
descuentoItem
|
|
228
|
+
descuentoItem
|
|
229
|
+
/** Lista documentos con filtros y paginación. */
|
|
230
|
+
?: number;
|
|
199
231
|
factorIcbper?: number;
|
|
200
232
|
codProdSunat?: string;
|
|
201
233
|
}[];
|
|
@@ -218,6 +250,122 @@ export declare class FacturacionClient {
|
|
|
218
250
|
};
|
|
219
251
|
};
|
|
220
252
|
}, `${string}/${string}`>>;
|
|
253
|
+
/** Calcula importes (Modelo B) de una factura/boleta SIN emitir. */
|
|
254
|
+
computeInvoice(body: ComputeInvoiceInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
255
|
+
parameters: {
|
|
256
|
+
query?: never;
|
|
257
|
+
header?: never;
|
|
258
|
+
path?: never;
|
|
259
|
+
cookie?: never;
|
|
260
|
+
};
|
|
261
|
+
requestBody: {
|
|
262
|
+
content: {
|
|
263
|
+
"application/json": {
|
|
264
|
+
tipoMoneda?: string;
|
|
265
|
+
items: {
|
|
266
|
+
descripcion: string;
|
|
267
|
+
cantidad: number;
|
|
268
|
+
valorUnitario: number;
|
|
269
|
+
unidad?: string;
|
|
270
|
+
codProducto?: string;
|
|
271
|
+
afectacion?: string;
|
|
272
|
+
igvPorcentaje?: number;
|
|
273
|
+
descuento?: {
|
|
274
|
+
porcentaje?: number;
|
|
275
|
+
monto?: number;
|
|
276
|
+
};
|
|
277
|
+
factorIcbper?: number;
|
|
278
|
+
marca?: string;
|
|
279
|
+
codProdSunat?: string;
|
|
280
|
+
}[];
|
|
281
|
+
descuentoGlobal
|
|
282
|
+
/** Lista los catálogos SUNAT disponibles. */
|
|
283
|
+
?: {
|
|
284
|
+
porcentaje? /** Lista los catálogos SUNAT disponibles. */: number;
|
|
285
|
+
monto?: number;
|
|
286
|
+
};
|
|
287
|
+
preciosIncluyenIgv?: boolean;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
responses: {
|
|
292
|
+
200: {
|
|
293
|
+
headers: {
|
|
294
|
+
[name: string]: unknown;
|
|
295
|
+
};
|
|
296
|
+
content: {
|
|
297
|
+
"application/json": {
|
|
298
|
+
success: boolean;
|
|
299
|
+
message: string;
|
|
300
|
+
data: {
|
|
301
|
+
tipoMoneda: string;
|
|
302
|
+
items: {
|
|
303
|
+
unidad: string;
|
|
304
|
+
cantidad: number;
|
|
305
|
+
codProducto: string;
|
|
306
|
+
descripcion: string;
|
|
307
|
+
marca?: string;
|
|
308
|
+
tipAfeIgv: string;
|
|
309
|
+
porcentajeIgv: number;
|
|
310
|
+
montoValorUnitario: number;
|
|
311
|
+
descuento: number;
|
|
312
|
+
descuentoItem: number;
|
|
313
|
+
descuentoGlobalLinea: number;
|
|
314
|
+
montoBruto: number;
|
|
315
|
+
montoValorVenta: number;
|
|
316
|
+
montoBaseIgv: number;
|
|
317
|
+
igv: number;
|
|
318
|
+
totalImpuestos: number;
|
|
319
|
+
montoPrecioUnitario: number;
|
|
320
|
+
factorIcbper: number;
|
|
321
|
+
codProdSunat? /** Estado de las colas BullMQ (jobs en cada estado). */: string;
|
|
322
|
+
}[];
|
|
323
|
+
montoOperGravadas: number;
|
|
324
|
+
montoOperExoneradas: number;
|
|
325
|
+
montoOperInafectas: number;
|
|
326
|
+
montoOperGratuitas: number;
|
|
327
|
+
montoOperExportacion: number;
|
|
328
|
+
montoIgv: number;
|
|
329
|
+
montoIcbper: number;
|
|
330
|
+
descuentoGlobal: number;
|
|
331
|
+
descuentoGlobalBase: number;
|
|
332
|
+
totalDescuentos: number;
|
|
333
|
+
totalImpuestos: number;
|
|
334
|
+
valorVenta: number;
|
|
335
|
+
subTotal: number;
|
|
336
|
+
montoImpVenta: number;
|
|
337
|
+
montoEnLetras: string;
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
}, {
|
|
344
|
+
body: {
|
|
345
|
+
tipoMoneda?: string;
|
|
346
|
+
items: {
|
|
347
|
+
descripcion: string;
|
|
348
|
+
cantidad: number;
|
|
349
|
+
valorUnitario: number;
|
|
350
|
+
unidad?: string;
|
|
351
|
+
codProducto?: string;
|
|
352
|
+
afectacion?: string;
|
|
353
|
+
igvPorcentaje?: number;
|
|
354
|
+
descuento?: {
|
|
355
|
+
porcentaje?: number;
|
|
356
|
+
monto?: number;
|
|
357
|
+
};
|
|
358
|
+
factorIcbper?: number;
|
|
359
|
+
marca?: string;
|
|
360
|
+
codProdSunat?: string;
|
|
361
|
+
}[];
|
|
362
|
+
descuentoGlobal?: {
|
|
363
|
+
porcentaje? /** Lista los catálogos SUNAT disponibles. */: number;
|
|
364
|
+
monto?: number;
|
|
365
|
+
};
|
|
366
|
+
preciosIncluyenIgv?: boolean;
|
|
367
|
+
};
|
|
368
|
+
}, `${string}/${string}`>>;
|
|
221
369
|
/** Envía nota de crédito (07) o débito (08). */
|
|
222
370
|
sendNote(body: SendNoteInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
223
371
|
parameters: {
|
|
@@ -241,6 +389,9 @@ export declare class FacturacionClient {
|
|
|
241
389
|
clienteNumDoc: string;
|
|
242
390
|
clienteRazonSocial: string;
|
|
243
391
|
clienteDireccion?: string;
|
|
392
|
+
clienteDistrito?: string;
|
|
393
|
+
clienteProvincia?: string;
|
|
394
|
+
clienteDepartamento?: string;
|
|
244
395
|
afectadoTipoDoc: "01" | "03";
|
|
245
396
|
afectadoNumDoc: string;
|
|
246
397
|
motivoCod: string;
|
|
@@ -348,6 +499,9 @@ export declare class FacturacionClient {
|
|
|
348
499
|
clienteNumDoc: string;
|
|
349
500
|
clienteRazonSocial: string;
|
|
350
501
|
clienteDireccion?: string;
|
|
502
|
+
clienteDistrito?: string;
|
|
503
|
+
clienteProvincia?: string;
|
|
504
|
+
clienteDepartamento?: string;
|
|
351
505
|
afectadoTipoDoc: "01" | "03";
|
|
352
506
|
afectadoNumDoc: string;
|
|
353
507
|
motivoCod: string;
|
|
@@ -388,7 +542,121 @@ export declare class FacturacionClient {
|
|
|
388
542
|
observacion?: string;
|
|
389
543
|
};
|
|
390
544
|
}, `${string}/${string}`>>;
|
|
391
|
-
/**
|
|
545
|
+
/** Calcula importes (Modelo B) de una nota SIN emitir. */
|
|
546
|
+
computeNote(body: ComputeNoteInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
547
|
+
parameters: {
|
|
548
|
+
query?: never;
|
|
549
|
+
header?: never;
|
|
550
|
+
path?: never;
|
|
551
|
+
cookie?: never;
|
|
552
|
+
};
|
|
553
|
+
requestBody: {
|
|
554
|
+
content: {
|
|
555
|
+
"application/json": {
|
|
556
|
+
tipoMoneda?: string;
|
|
557
|
+
items: {
|
|
558
|
+
descripcion: string;
|
|
559
|
+
cantidad: number;
|
|
560
|
+
valorUnitario: number;
|
|
561
|
+
unidad?: string;
|
|
562
|
+
codProducto?: string;
|
|
563
|
+
afectacion?: string;
|
|
564
|
+
igvPorcentaje?: number;
|
|
565
|
+
descuento?: {
|
|
566
|
+
porcentaje?: number;
|
|
567
|
+
monto?: number;
|
|
568
|
+
};
|
|
569
|
+
factorIcbper?: number;
|
|
570
|
+
marca?: string;
|
|
571
|
+
codProdSunat?: string;
|
|
572
|
+
}[];
|
|
573
|
+
descuentoGlobal?: {
|
|
574
|
+
porcentaje?: number;
|
|
575
|
+
monto?: number;
|
|
576
|
+
};
|
|
577
|
+
preciosIncluyenIgv?: boolean;
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
responses: {
|
|
582
|
+
200: {
|
|
583
|
+
headers: {
|
|
584
|
+
[name: string]: unknown;
|
|
585
|
+
};
|
|
586
|
+
content: {
|
|
587
|
+
"application/json": {
|
|
588
|
+
success: boolean;
|
|
589
|
+
message: string;
|
|
590
|
+
data: {
|
|
591
|
+
tipoMoneda: string;
|
|
592
|
+
items: {
|
|
593
|
+
unidad: string;
|
|
594
|
+
cantidad: number;
|
|
595
|
+
codProducto: string;
|
|
596
|
+
descripcion: string;
|
|
597
|
+
marca?: string;
|
|
598
|
+
tipAfeIgv: string;
|
|
599
|
+
porcentajeIgv: number;
|
|
600
|
+
montoValorUnitario: number;
|
|
601
|
+
descuento: number;
|
|
602
|
+
descuentoItem: number;
|
|
603
|
+
descuentoGlobalLinea: number;
|
|
604
|
+
montoBruto: number;
|
|
605
|
+
montoValorVenta: number;
|
|
606
|
+
montoBaseIgv: number;
|
|
607
|
+
igv: number;
|
|
608
|
+
totalImpuestos: number;
|
|
609
|
+
montoPrecioUnitario: number;
|
|
610
|
+
factorIcbper: number;
|
|
611
|
+
codProdSunat?: string;
|
|
612
|
+
}[];
|
|
613
|
+
montoOperGravadas: number;
|
|
614
|
+
montoOperExoneradas: number;
|
|
615
|
+
montoOperInafectas: number;
|
|
616
|
+
montoOperGratuitas: number;
|
|
617
|
+
montoOperExportacion: number;
|
|
618
|
+
montoIgv: number;
|
|
619
|
+
montoIcbper: number;
|
|
620
|
+
descuentoGlobal: number;
|
|
621
|
+
descuentoGlobalBase: number;
|
|
622
|
+
totalDescuentos: number;
|
|
623
|
+
totalImpuestos: number;
|
|
624
|
+
valorVenta: number;
|
|
625
|
+
subTotal: number;
|
|
626
|
+
montoImpVenta: number;
|
|
627
|
+
montoEnLetras: string;
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
}, {
|
|
634
|
+
body: {
|
|
635
|
+
tipoMoneda?: string;
|
|
636
|
+
items: {
|
|
637
|
+
descripcion: string;
|
|
638
|
+
cantidad: number;
|
|
639
|
+
valorUnitario: number;
|
|
640
|
+
unidad?: string;
|
|
641
|
+
codProducto?: string;
|
|
642
|
+
afectacion?: string;
|
|
643
|
+
igvPorcentaje?: number;
|
|
644
|
+
descuento?: {
|
|
645
|
+
porcentaje?: number;
|
|
646
|
+
monto?: number;
|
|
647
|
+
};
|
|
648
|
+
factorIcbper?: number;
|
|
649
|
+
marca?: string;
|
|
650
|
+
codProdSunat?: string;
|
|
651
|
+
}[];
|
|
652
|
+
descuentoGlobal?: {
|
|
653
|
+
porcentaje?: number;
|
|
654
|
+
monto?: number;
|
|
655
|
+
};
|
|
656
|
+
preciosIncluyenIgv?: boolean;
|
|
657
|
+
};
|
|
658
|
+
}, `${string}/${string}`>>;
|
|
659
|
+
/** Envía guía de remisión remitente (09). */
|
|
392
660
|
sendDespatch(body: SendDespatchInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
393
661
|
parameters: {
|
|
394
662
|
query?: never;
|
|
@@ -410,6 +678,9 @@ export declare class FacturacionClient {
|
|
|
410
678
|
clienteNumDoc: string;
|
|
411
679
|
clienteRazonSocial: string;
|
|
412
680
|
clienteDireccion?: string;
|
|
681
|
+
clienteDistrito?: string;
|
|
682
|
+
clienteProvincia?: string;
|
|
683
|
+
clienteDepartamento?: string;
|
|
413
684
|
destinatarioContacto?: string;
|
|
414
685
|
destinatarioTelefono?: string;
|
|
415
686
|
destinatarioEmail?: string;
|
|
@@ -568,6 +839,9 @@ export declare class FacturacionClient {
|
|
|
568
839
|
clienteNumDoc: string;
|
|
569
840
|
clienteRazonSocial: string;
|
|
570
841
|
clienteDireccion?: string;
|
|
842
|
+
clienteDistrito?: string;
|
|
843
|
+
clienteProvincia?: string;
|
|
844
|
+
clienteDepartamento?: string;
|
|
571
845
|
destinatarioContacto?: string;
|
|
572
846
|
destinatarioTelefono?: string;
|
|
573
847
|
destinatarioEmail?: string;
|
|
@@ -660,87 +934,1271 @@ export declare class FacturacionClient {
|
|
|
660
934
|
}[];
|
|
661
935
|
};
|
|
662
936
|
}, `${string}/${string}`>>;
|
|
663
|
-
/**
|
|
664
|
-
|
|
937
|
+
/** Envía varias guías de remisión en un solo request. */
|
|
938
|
+
sendDespatchMulti(body: SendDespatchMultiInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
665
939
|
parameters: {
|
|
666
|
-
query?:
|
|
667
|
-
ruc?: string;
|
|
668
|
-
tipoDoc?: string;
|
|
669
|
-
serie?: string;
|
|
670
|
-
estado?: string;
|
|
671
|
-
env?: "live" | "test";
|
|
672
|
-
fechaDesde?: string;
|
|
673
|
-
fechaHasta?: string;
|
|
674
|
-
clienteNumDoc?: string;
|
|
675
|
-
page?: number;
|
|
676
|
-
limit?: number;
|
|
677
|
-
};
|
|
940
|
+
query?: never;
|
|
678
941
|
header?: never;
|
|
679
942
|
path?: never;
|
|
680
943
|
cookie?: never;
|
|
681
944
|
};
|
|
682
|
-
requestBody
|
|
945
|
+
requestBody: {
|
|
946
|
+
content: {
|
|
947
|
+
"application/json": {
|
|
948
|
+
tipoDoc: "09";
|
|
949
|
+
serie: string;
|
|
950
|
+
observacion?: string;
|
|
951
|
+
fechaEmision: string;
|
|
952
|
+
empresaRuc: string;
|
|
953
|
+
establecimientoCodigo?: string;
|
|
954
|
+
guiaCodTraslado: string;
|
|
955
|
+
guiaModTraslado: "01" | "02";
|
|
956
|
+
guiaFecTraslado: string;
|
|
957
|
+
guiaVehiculoPlaca?: string;
|
|
958
|
+
transportistaTipoDoc?: string;
|
|
959
|
+
transportistaNumDoc?: string;
|
|
960
|
+
transportistaRazonSocial?: string;
|
|
961
|
+
transportistaNroMtc?: string;
|
|
962
|
+
guiaPartidaUbigeo: string;
|
|
963
|
+
guiaPartidaDireccion: string;
|
|
964
|
+
chofer?: {
|
|
965
|
+
tipo: "Principal" | "Secundario";
|
|
966
|
+
tipoDoc: string;
|
|
967
|
+
nroDoc: string;
|
|
968
|
+
licencia: string;
|
|
969
|
+
nombres: string;
|
|
970
|
+
apellidos: string;
|
|
971
|
+
}[];
|
|
972
|
+
guiaFecEntrega?: string;
|
|
973
|
+
guiaDesTraslado?: string;
|
|
974
|
+
guiaPesoNeto?: number;
|
|
975
|
+
guiaSustentoPeso?: string;
|
|
976
|
+
guiaNumBultos?: number;
|
|
977
|
+
indicadores?: {
|
|
978
|
+
transbordoProgramado?: boolean;
|
|
979
|
+
vehiculoM1L?: boolean;
|
|
980
|
+
retornoVehiculoEnvaseVacio?: boolean;
|
|
981
|
+
retornoVehiculoVacio?: boolean;
|
|
982
|
+
trasladoTotalDamDs?: boolean;
|
|
983
|
+
registroTransportista?: boolean;
|
|
984
|
+
trasladoContenedorManifiesto?: boolean;
|
|
985
|
+
};
|
|
986
|
+
contenedores?: {
|
|
987
|
+
numero: string;
|
|
988
|
+
precinto?: string;
|
|
989
|
+
}[];
|
|
990
|
+
guiaVehiculoTuc?: string;
|
|
991
|
+
guiaVehiculoAutorizacion?: string;
|
|
992
|
+
guiaVehiculoAutorizacionEntidad?: string;
|
|
993
|
+
vehiculosSecundarios?: {
|
|
994
|
+
placa: string;
|
|
995
|
+
tuc?: string;
|
|
996
|
+
autorizacion?: string;
|
|
997
|
+
autorizacionEntidad?: string;
|
|
998
|
+
}[];
|
|
999
|
+
transportistaAutorizacion?: string;
|
|
1000
|
+
transportistaAutorizacionEntidad?: string;
|
|
1001
|
+
guiaPartidaRuc?: string;
|
|
1002
|
+
guiaPartidaCodLocal?: string;
|
|
1003
|
+
guiaPartidaGeo?: {
|
|
1004
|
+
lat: string;
|
|
1005
|
+
lon: string;
|
|
1006
|
+
};
|
|
1007
|
+
guiaLlegadaRuc?: string;
|
|
1008
|
+
guiaLlegadaCodLocal?: string;
|
|
1009
|
+
guiaLlegadaGeo?: {
|
|
1010
|
+
lat: string;
|
|
1011
|
+
lon: string;
|
|
1012
|
+
};
|
|
1013
|
+
documentosRelacionados?: {
|
|
1014
|
+
codTipo: string;
|
|
1015
|
+
numero: string;
|
|
1016
|
+
tipoDesc?: string;
|
|
1017
|
+
emisorRuc?: string;
|
|
1018
|
+
}[];
|
|
1019
|
+
remitenteAutorizacion?: string;
|
|
1020
|
+
remitenteAutorizacionEntidad?: string;
|
|
1021
|
+
proveedorTipoDoc?: string;
|
|
1022
|
+
proveedorNumDoc?: string;
|
|
1023
|
+
proveedorRazonSocial?: string;
|
|
1024
|
+
compradorTipoDoc?: string;
|
|
1025
|
+
compradorNumDoc?: string;
|
|
1026
|
+
compradorRazonSocial?: string;
|
|
1027
|
+
puertoCodigo?: string;
|
|
1028
|
+
puertoNombre?: string;
|
|
1029
|
+
puertoTipo?: string;
|
|
1030
|
+
destinos: {
|
|
1031
|
+
clienteTipoDoc: string;
|
|
1032
|
+
clienteNumDoc: string;
|
|
1033
|
+
clienteRazonSocial: string;
|
|
1034
|
+
clienteDireccion?: string;
|
|
1035
|
+
clienteDistrito?: string;
|
|
1036
|
+
clienteProvincia?: string;
|
|
1037
|
+
clienteDepartamento?: string;
|
|
1038
|
+
destinatarioContacto?: string;
|
|
1039
|
+
destinatarioTelefono?: string;
|
|
1040
|
+
destinatarioEmail?: string;
|
|
1041
|
+
entregaReferencia?: string;
|
|
1042
|
+
guiaLlegadaUbigeo: string;
|
|
1043
|
+
guiaLlegadaDireccion: string;
|
|
1044
|
+
guiaPesoTotal: number;
|
|
1045
|
+
guiaUndPesoTotal?: string;
|
|
1046
|
+
detalle: {
|
|
1047
|
+
unidad: string;
|
|
1048
|
+
cantidad: number;
|
|
1049
|
+
codProducto: string;
|
|
1050
|
+
descripcion: string;
|
|
1051
|
+
}[];
|
|
1052
|
+
}[];
|
|
1053
|
+
};
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
683
1056
|
responses: {
|
|
684
|
-
|
|
1057
|
+
202: {
|
|
685
1058
|
headers: {
|
|
686
1059
|
[name: string]: unknown;
|
|
687
1060
|
};
|
|
688
1061
|
content: {
|
|
689
1062
|
"application/json": {
|
|
690
1063
|
success: boolean;
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
env: "live" | "test";
|
|
694
|
-
tipoDoc: string;
|
|
695
|
-
serie: string;
|
|
696
|
-
correlativo: string;
|
|
697
|
-
fechaEmision: string;
|
|
698
|
-
tipoMoneda: string;
|
|
699
|
-
clienteNumDoc: string;
|
|
700
|
-
clienteRazonSocial: string;
|
|
701
|
-
montoImpVenta: string;
|
|
702
|
-
estadoSunat: string;
|
|
703
|
-
codigoRespuesta: string | null;
|
|
704
|
-
hashCdr: string | null;
|
|
705
|
-
createdAt: string;
|
|
706
|
-
company: {
|
|
707
|
-
ruc: string;
|
|
708
|
-
razonSocial: string;
|
|
709
|
-
};
|
|
710
|
-
}[];
|
|
711
|
-
pagination: {
|
|
712
|
-
page: number;
|
|
713
|
-
limit: number;
|
|
1064
|
+
message: string;
|
|
1065
|
+
data?: {
|
|
714
1066
|
total: number;
|
|
715
|
-
|
|
1067
|
+
emitidas: number;
|
|
1068
|
+
fallidas: number;
|
|
1069
|
+
guias: {
|
|
1070
|
+
success: boolean;
|
|
1071
|
+
message: string;
|
|
1072
|
+
code?: string;
|
|
1073
|
+
destino: number;
|
|
1074
|
+
data?: {
|
|
1075
|
+
id: string;
|
|
1076
|
+
estado: string;
|
|
1077
|
+
hash: string | null;
|
|
1078
|
+
signatureValue: string | null;
|
|
1079
|
+
jobId?: string;
|
|
1080
|
+
};
|
|
1081
|
+
}[];
|
|
716
1082
|
};
|
|
717
1083
|
};
|
|
718
1084
|
};
|
|
719
1085
|
};
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
1086
|
+
400: {
|
|
1087
|
+
headers: {
|
|
1088
|
+
[name: string]: unknown;
|
|
1089
|
+
};
|
|
1090
|
+
content: {
|
|
1091
|
+
"application/json": {
|
|
1092
|
+
success: false;
|
|
1093
|
+
message: string;
|
|
1094
|
+
code?: string;
|
|
1095
|
+
errors?: {
|
|
1096
|
+
path: string;
|
|
1097
|
+
message: string;
|
|
1098
|
+
}[];
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
};
|
|
1103
|
+
}, {
|
|
1104
|
+
body: {
|
|
1105
|
+
tipoDoc: "09";
|
|
1106
|
+
serie: string;
|
|
1107
|
+
observacion?: string;
|
|
1108
|
+
fechaEmision: string;
|
|
1109
|
+
empresaRuc: string;
|
|
1110
|
+
establecimientoCodigo?: string;
|
|
1111
|
+
guiaCodTraslado: string;
|
|
1112
|
+
guiaModTraslado: "01" | "02";
|
|
1113
|
+
guiaFecTraslado: string;
|
|
1114
|
+
guiaVehiculoPlaca?: string;
|
|
1115
|
+
transportistaTipoDoc?: string;
|
|
1116
|
+
transportistaNumDoc?: string;
|
|
1117
|
+
transportistaRazonSocial?: string;
|
|
1118
|
+
transportistaNroMtc?: string;
|
|
1119
|
+
guiaPartidaUbigeo: string;
|
|
1120
|
+
guiaPartidaDireccion: string;
|
|
1121
|
+
chofer?: {
|
|
1122
|
+
tipo: "Principal" | "Secundario";
|
|
1123
|
+
tipoDoc: string;
|
|
1124
|
+
nroDoc: string;
|
|
1125
|
+
licencia: string;
|
|
1126
|
+
nombres: string;
|
|
1127
|
+
apellidos: string;
|
|
1128
|
+
}[];
|
|
1129
|
+
guiaFecEntrega?: string;
|
|
1130
|
+
guiaDesTraslado?: string;
|
|
1131
|
+
guiaPesoNeto?: number;
|
|
1132
|
+
guiaSustentoPeso?: string;
|
|
1133
|
+
guiaNumBultos?: number;
|
|
1134
|
+
indicadores?: {
|
|
1135
|
+
transbordoProgramado?: boolean;
|
|
1136
|
+
vehiculoM1L?: boolean;
|
|
1137
|
+
retornoVehiculoEnvaseVacio?: boolean;
|
|
1138
|
+
retornoVehiculoVacio?: boolean;
|
|
1139
|
+
trasladoTotalDamDs?: boolean;
|
|
1140
|
+
registroTransportista?: boolean;
|
|
1141
|
+
trasladoContenedorManifiesto?: boolean;
|
|
1142
|
+
};
|
|
1143
|
+
contenedores?: {
|
|
1144
|
+
numero: string;
|
|
1145
|
+
precinto?: string;
|
|
1146
|
+
}[];
|
|
1147
|
+
guiaVehiculoTuc?: string;
|
|
1148
|
+
guiaVehiculoAutorizacion?: string;
|
|
1149
|
+
guiaVehiculoAutorizacionEntidad?: string;
|
|
1150
|
+
vehiculosSecundarios?: {
|
|
1151
|
+
placa: string;
|
|
1152
|
+
tuc?: string;
|
|
1153
|
+
autorizacion?: string;
|
|
1154
|
+
autorizacionEntidad?: string;
|
|
1155
|
+
}[];
|
|
1156
|
+
transportistaAutorizacion?: string;
|
|
1157
|
+
transportistaAutorizacionEntidad?: string;
|
|
1158
|
+
guiaPartidaRuc?: string;
|
|
1159
|
+
guiaPartidaCodLocal?: string;
|
|
1160
|
+
guiaPartidaGeo?: {
|
|
1161
|
+
lat: string;
|
|
1162
|
+
lon: string;
|
|
1163
|
+
};
|
|
1164
|
+
guiaLlegadaRuc?: string;
|
|
1165
|
+
guiaLlegadaCodLocal?: string;
|
|
1166
|
+
guiaLlegadaGeo?: {
|
|
1167
|
+
lat: string;
|
|
1168
|
+
lon: string;
|
|
1169
|
+
};
|
|
1170
|
+
documentosRelacionados?: {
|
|
1171
|
+
codTipo: string;
|
|
1172
|
+
numero: string;
|
|
1173
|
+
tipoDesc?: string;
|
|
1174
|
+
emisorRuc?: string;
|
|
1175
|
+
}[];
|
|
1176
|
+
remitenteAutorizacion?: string;
|
|
1177
|
+
remitenteAutorizacionEntidad?: string;
|
|
1178
|
+
proveedorTipoDoc?: string;
|
|
1179
|
+
proveedorNumDoc?: string;
|
|
1180
|
+
proveedorRazonSocial?: string;
|
|
1181
|
+
compradorTipoDoc?: string;
|
|
1182
|
+
compradorNumDoc?: string;
|
|
1183
|
+
compradorRazonSocial?: string;
|
|
1184
|
+
puertoCodigo?: string;
|
|
1185
|
+
puertoNombre?: string;
|
|
1186
|
+
puertoTipo?: string;
|
|
1187
|
+
destinos: {
|
|
1188
|
+
clienteTipoDoc: string;
|
|
1189
|
+
clienteNumDoc: string;
|
|
1190
|
+
clienteRazonSocial: string;
|
|
1191
|
+
clienteDireccion?: string;
|
|
1192
|
+
clienteDistrito?: string;
|
|
1193
|
+
clienteProvincia?: string;
|
|
1194
|
+
clienteDepartamento?: string;
|
|
1195
|
+
destinatarioContacto?: string;
|
|
1196
|
+
destinatarioTelefono?: string;
|
|
1197
|
+
destinatarioEmail?: string;
|
|
1198
|
+
entregaReferencia?: string;
|
|
1199
|
+
guiaLlegadaUbigeo: string;
|
|
1200
|
+
guiaLlegadaDireccion: string;
|
|
1201
|
+
guiaPesoTotal: number;
|
|
1202
|
+
guiaUndPesoTotal?: string;
|
|
1203
|
+
detalle: {
|
|
1204
|
+
unidad: string;
|
|
1205
|
+
cantidad: number;
|
|
1206
|
+
codProducto: string;
|
|
1207
|
+
descripcion: string;
|
|
1208
|
+
}[];
|
|
1209
|
+
}[];
|
|
1210
|
+
};
|
|
1211
|
+
}, `${string}/${string}`>>;
|
|
1212
|
+
/** Envía guía de remisión transportista (31). */
|
|
1213
|
+
sendDespatchTransportista(body: SendDespatchTransportistaInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
1214
|
+
parameters: {
|
|
1215
|
+
query?: never;
|
|
1216
|
+
header?: never;
|
|
1217
|
+
path?: never;
|
|
1218
|
+
cookie?: never;
|
|
1219
|
+
};
|
|
1220
|
+
requestBody: {
|
|
1221
|
+
content: {
|
|
1222
|
+
"application/json": {
|
|
1223
|
+
tipoDoc: "31";
|
|
1224
|
+
serie: string;
|
|
1225
|
+
correlativo: string;
|
|
1226
|
+
observacion?: string;
|
|
1227
|
+
fechaEmision: string;
|
|
1228
|
+
empresaRuc: string;
|
|
1229
|
+
establecimientoCodigo?: string;
|
|
1230
|
+
transportistaNroMtc?: string;
|
|
1231
|
+
destinatarioTipoDoc: string;
|
|
1232
|
+
destinatarioNumDoc: string;
|
|
1233
|
+
destinatarioRazonSocial: string;
|
|
1234
|
+
destinatarioDireccion?: string;
|
|
1235
|
+
destinatarioDistrito?: string;
|
|
1236
|
+
destinatarioProvincia?: string;
|
|
1237
|
+
destinatarioDepartamento?: string;
|
|
1238
|
+
destinatarioContacto?: string;
|
|
1239
|
+
destinatarioTelefono?: string;
|
|
1240
|
+
destinatarioEmail?: string;
|
|
1241
|
+
entregaReferencia?: string;
|
|
1242
|
+
remitenteTipoDoc: string;
|
|
1243
|
+
remitenteNumDoc: string;
|
|
1244
|
+
remitenteRazonSocial: string;
|
|
1245
|
+
guiaCodTraslado: string;
|
|
1246
|
+
guiaDesTraslado?: string;
|
|
1247
|
+
guiaPesoTotal: number;
|
|
1248
|
+
guiaUndPesoTotal?: string;
|
|
1249
|
+
guiaNumBultos?: number;
|
|
1250
|
+
guiaFecTraslado: string;
|
|
1251
|
+
chofer: {
|
|
1252
|
+
tipo: "Principal" | "Secundario";
|
|
1253
|
+
tipoDoc: string;
|
|
1254
|
+
nroDoc: string;
|
|
1255
|
+
licencia: string;
|
|
1256
|
+
nombres: string;
|
|
1257
|
+
apellidos: string;
|
|
1258
|
+
}[];
|
|
1259
|
+
guiaVehiculoPlaca: string;
|
|
1260
|
+
guiaVehiculoTuc?: string;
|
|
1261
|
+
vehiculosSecundarios?: {
|
|
1262
|
+
placa: string;
|
|
1263
|
+
tuc?: string;
|
|
1264
|
+
}[];
|
|
1265
|
+
guiaPartidaUbigeo: string;
|
|
1266
|
+
guiaPartidaDireccion: string;
|
|
1267
|
+
guiaLlegadaUbigeo: string;
|
|
1268
|
+
guiaLlegadaDireccion: string;
|
|
1269
|
+
documentosRelacionados?: {
|
|
1270
|
+
codTipo: string;
|
|
1271
|
+
numero: string;
|
|
1272
|
+
tipoDesc?: string;
|
|
1273
|
+
emisorRuc?: string;
|
|
1274
|
+
}[];
|
|
1275
|
+
detalle: {
|
|
1276
|
+
unidad: string;
|
|
1277
|
+
cantidad: number;
|
|
1278
|
+
codProducto: string;
|
|
1279
|
+
descripcion: string;
|
|
1280
|
+
}[];
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
};
|
|
1284
|
+
responses: {
|
|
1285
|
+
202: {
|
|
1286
|
+
headers: {
|
|
1287
|
+
[name: string]: unknown;
|
|
1288
|
+
};
|
|
1289
|
+
content: {
|
|
1290
|
+
"application/json": {
|
|
1291
|
+
success: boolean;
|
|
1292
|
+
message: string;
|
|
1293
|
+
data?: {
|
|
1294
|
+
id: string;
|
|
1295
|
+
estado: string;
|
|
1296
|
+
hash: string | null;
|
|
1297
|
+
signatureValue: string | null;
|
|
1298
|
+
jobId?: string;
|
|
1299
|
+
};
|
|
1300
|
+
};
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1303
|
+
400: {
|
|
1304
|
+
headers: {
|
|
1305
|
+
[name: string]: unknown;
|
|
1306
|
+
};
|
|
1307
|
+
content: {
|
|
1308
|
+
"application/json": {
|
|
1309
|
+
success: false;
|
|
1310
|
+
message: string;
|
|
1311
|
+
code?: string;
|
|
1312
|
+
errors?: {
|
|
1313
|
+
path: string;
|
|
1314
|
+
message: string;
|
|
1315
|
+
}[];
|
|
1316
|
+
};
|
|
1317
|
+
};
|
|
1318
|
+
};
|
|
1319
|
+
409: {
|
|
1320
|
+
headers: {
|
|
1321
|
+
[name: string]: unknown;
|
|
1322
|
+
};
|
|
1323
|
+
content: {
|
|
1324
|
+
"application/json": {
|
|
1325
|
+
success: false;
|
|
1326
|
+
message: string;
|
|
1327
|
+
code?: string;
|
|
1328
|
+
errors?: {
|
|
1329
|
+
path: string;
|
|
1330
|
+
message: string;
|
|
1331
|
+
}[];
|
|
1332
|
+
};
|
|
1333
|
+
};
|
|
1334
|
+
};
|
|
1335
|
+
};
|
|
1336
|
+
}, {
|
|
1337
|
+
body: {
|
|
1338
|
+
tipoDoc: "31";
|
|
1339
|
+
serie: string;
|
|
1340
|
+
correlativo: string;
|
|
1341
|
+
observacion?: string;
|
|
1342
|
+
fechaEmision: string;
|
|
1343
|
+
empresaRuc: string;
|
|
1344
|
+
establecimientoCodigo?: string;
|
|
1345
|
+
transportistaNroMtc?: string;
|
|
1346
|
+
destinatarioTipoDoc: string;
|
|
1347
|
+
destinatarioNumDoc: string;
|
|
1348
|
+
destinatarioRazonSocial: string;
|
|
1349
|
+
destinatarioDireccion?: string;
|
|
1350
|
+
destinatarioDistrito?: string;
|
|
1351
|
+
destinatarioProvincia?: string;
|
|
1352
|
+
destinatarioDepartamento?: string;
|
|
1353
|
+
destinatarioContacto?: string;
|
|
1354
|
+
destinatarioTelefono?: string;
|
|
1355
|
+
destinatarioEmail?: string;
|
|
1356
|
+
entregaReferencia?: string;
|
|
1357
|
+
remitenteTipoDoc: string;
|
|
1358
|
+
remitenteNumDoc: string;
|
|
1359
|
+
remitenteRazonSocial: string;
|
|
1360
|
+
guiaCodTraslado: string;
|
|
1361
|
+
guiaDesTraslado?: string;
|
|
1362
|
+
guiaPesoTotal: number;
|
|
1363
|
+
guiaUndPesoTotal?: string;
|
|
1364
|
+
guiaNumBultos?: number;
|
|
1365
|
+
guiaFecTraslado: string;
|
|
1366
|
+
chofer: {
|
|
1367
|
+
tipo: "Principal" | "Secundario";
|
|
1368
|
+
tipoDoc: string;
|
|
1369
|
+
nroDoc: string;
|
|
1370
|
+
licencia: string;
|
|
1371
|
+
nombres: string;
|
|
1372
|
+
apellidos: string;
|
|
1373
|
+
}[];
|
|
1374
|
+
guiaVehiculoPlaca: string;
|
|
1375
|
+
guiaVehiculoTuc?: string;
|
|
1376
|
+
vehiculosSecundarios?: {
|
|
1377
|
+
placa: string;
|
|
1378
|
+
tuc?: string;
|
|
1379
|
+
}[];
|
|
1380
|
+
guiaPartidaUbigeo: string;
|
|
1381
|
+
guiaPartidaDireccion: string;
|
|
1382
|
+
guiaLlegadaUbigeo: string;
|
|
1383
|
+
guiaLlegadaDireccion: string;
|
|
1384
|
+
documentosRelacionados?: {
|
|
1385
|
+
codTipo: string;
|
|
1386
|
+
numero: string;
|
|
1387
|
+
tipoDesc?: string;
|
|
1388
|
+
emisorRuc?: string;
|
|
1389
|
+
}[];
|
|
1390
|
+
detalle: {
|
|
1391
|
+
unidad: string;
|
|
1392
|
+
cantidad: number;
|
|
1393
|
+
codProducto: string;
|
|
1394
|
+
descripcion: string;
|
|
1395
|
+
}[];
|
|
1396
|
+
};
|
|
1397
|
+
}, `${string}/${string}`>>;
|
|
1398
|
+
/** Anula una factura (comunicación de baja). */
|
|
1399
|
+
cancelInvoice(body: CancelInvoiceInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
1400
|
+
parameters: {
|
|
1401
|
+
query?: never;
|
|
1402
|
+
header?: never;
|
|
1403
|
+
path?: never;
|
|
1404
|
+
cookie?: never;
|
|
1405
|
+
};
|
|
1406
|
+
requestBody: {
|
|
1407
|
+
content: {
|
|
1408
|
+
"application/json": {
|
|
1409
|
+
empresaRuc: string;
|
|
1410
|
+
tipoDoc: "01" | "07" | "08";
|
|
1411
|
+
serie: string;
|
|
1412
|
+
correlativo: string;
|
|
1413
|
+
motivoBaja: string;
|
|
1414
|
+
raCorrelativo?: string;
|
|
1415
|
+
};
|
|
1416
|
+
};
|
|
1417
|
+
};
|
|
1418
|
+
responses: {
|
|
1419
|
+
202: {
|
|
1420
|
+
headers: {
|
|
1421
|
+
[name: string]: unknown;
|
|
1422
|
+
};
|
|
1423
|
+
content: {
|
|
1424
|
+
"application/json": {
|
|
1425
|
+
success: boolean;
|
|
1426
|
+
message: string;
|
|
1427
|
+
data?: {
|
|
1428
|
+
id?: string;
|
|
1429
|
+
estado?: string;
|
|
1430
|
+
ticket?: string;
|
|
1431
|
+
hash?: string | null;
|
|
1432
|
+
};
|
|
1433
|
+
};
|
|
1434
|
+
};
|
|
1435
|
+
};
|
|
1436
|
+
400: {
|
|
1437
|
+
headers: {
|
|
1438
|
+
[name: string]: unknown;
|
|
1439
|
+
};
|
|
1440
|
+
content: {
|
|
1441
|
+
"application/json": {
|
|
1442
|
+
success: false;
|
|
1443
|
+
message: string;
|
|
1444
|
+
code?: string;
|
|
1445
|
+
errors?: {
|
|
1446
|
+
path: string;
|
|
1447
|
+
message: string;
|
|
1448
|
+
}[];
|
|
1449
|
+
};
|
|
1450
|
+
};
|
|
1451
|
+
};
|
|
1452
|
+
};
|
|
1453
|
+
}, {
|
|
1454
|
+
body: {
|
|
1455
|
+
empresaRuc: string;
|
|
1456
|
+
tipoDoc: "01" | "07" | "08";
|
|
1457
|
+
serie: string;
|
|
1458
|
+
correlativo: string;
|
|
1459
|
+
motivoBaja: string;
|
|
1460
|
+
raCorrelativo?: string;
|
|
1461
|
+
};
|
|
1462
|
+
}, `${string}/${string}`>>;
|
|
1463
|
+
/** Anula una boleta (resumen diario de baja). */
|
|
1464
|
+
cancelBoleta(body: CancelBoletaInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
1465
|
+
parameters: {
|
|
1466
|
+
query?: never;
|
|
1467
|
+
header?: never;
|
|
1468
|
+
path?: never;
|
|
1469
|
+
cookie?: never;
|
|
1470
|
+
};
|
|
1471
|
+
requestBody: {
|
|
1472
|
+
content: {
|
|
1473
|
+
"application/json": {
|
|
1474
|
+
empresaRuc: string;
|
|
1475
|
+
serie: string;
|
|
1476
|
+
correlativo: string;
|
|
1477
|
+
motivoBaja: string;
|
|
1478
|
+
rcCorrelativo?: string;
|
|
1479
|
+
};
|
|
1480
|
+
};
|
|
1481
|
+
};
|
|
1482
|
+
responses: {
|
|
1483
|
+
202: {
|
|
1484
|
+
headers: {
|
|
1485
|
+
[name: string]: unknown;
|
|
1486
|
+
};
|
|
1487
|
+
content: {
|
|
1488
|
+
"application/json": {
|
|
1489
|
+
success: boolean;
|
|
1490
|
+
message: string;
|
|
1491
|
+
data?: {
|
|
1492
|
+
id?: string;
|
|
1493
|
+
estado?: string;
|
|
1494
|
+
ticket?: string;
|
|
1495
|
+
hash?: string | null;
|
|
1496
|
+
};
|
|
1497
|
+
};
|
|
1498
|
+
};
|
|
1499
|
+
};
|
|
1500
|
+
400: {
|
|
1501
|
+
headers: {
|
|
1502
|
+
[name: string]: unknown;
|
|
1503
|
+
};
|
|
1504
|
+
content: {
|
|
1505
|
+
"application/json": {
|
|
1506
|
+
success: false;
|
|
1507
|
+
message: string;
|
|
1508
|
+
code?: string;
|
|
1509
|
+
errors?: {
|
|
1510
|
+
path: string;
|
|
1511
|
+
message: string;
|
|
1512
|
+
}[];
|
|
1513
|
+
};
|
|
1514
|
+
};
|
|
1515
|
+
};
|
|
1516
|
+
};
|
|
1517
|
+
}, {
|
|
1518
|
+
body: {
|
|
1519
|
+
empresaRuc: string;
|
|
1520
|
+
serie: string;
|
|
1521
|
+
correlativo: string;
|
|
1522
|
+
motivoBaja: string;
|
|
1523
|
+
rcCorrelativo?: string;
|
|
1524
|
+
};
|
|
1525
|
+
}, `${string}/${string}`>>;
|
|
1526
|
+
/** Envía un Resumen Diario (RC). */
|
|
1527
|
+
sendSummary(body: SendSummaryInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
1528
|
+
parameters: {
|
|
1529
|
+
query?: never;
|
|
1530
|
+
header?: never;
|
|
1531
|
+
path?: never;
|
|
1532
|
+
cookie?: never;
|
|
1533
|
+
};
|
|
1534
|
+
requestBody: {
|
|
1535
|
+
content: {
|
|
1536
|
+
"application/json": {
|
|
1537
|
+
empresaRuc: string;
|
|
1538
|
+
correlativo: string;
|
|
1539
|
+
fechaEmision: string;
|
|
1540
|
+
fechaReferencia: string;
|
|
1541
|
+
items: {
|
|
1542
|
+
tipoDoc: string;
|
|
1543
|
+
serie: string;
|
|
1544
|
+
correlativo: string;
|
|
1545
|
+
clienteTipoDoc: string;
|
|
1546
|
+
clienteNumDoc: string;
|
|
1547
|
+
estadoItem: "1" | "2" | "3";
|
|
1548
|
+
tipoMoneda?: string;
|
|
1549
|
+
montoOperGravadas?: number;
|
|
1550
|
+
montoOperExoneradas?: number;
|
|
1551
|
+
montoOperInafectas?: number;
|
|
1552
|
+
montoOperGratuitas?: number;
|
|
1553
|
+
montoIgv?: number;
|
|
1554
|
+
montoIsc?: number;
|
|
1555
|
+
montoOtrosCargos?: number;
|
|
1556
|
+
montoTotal: number;
|
|
1557
|
+
}[];
|
|
1558
|
+
};
|
|
1559
|
+
};
|
|
1560
|
+
};
|
|
1561
|
+
responses: {
|
|
1562
|
+
202: {
|
|
1563
|
+
headers: {
|
|
1564
|
+
[name: string]: unknown;
|
|
1565
|
+
};
|
|
1566
|
+
content: {
|
|
1567
|
+
"application/json": {
|
|
1568
|
+
success: boolean;
|
|
1569
|
+
message: string;
|
|
1570
|
+
data?: {
|
|
1571
|
+
id?: string;
|
|
1572
|
+
estado?: string;
|
|
1573
|
+
ticket?: string;
|
|
1574
|
+
hash?: string | null;
|
|
1575
|
+
};
|
|
1576
|
+
};
|
|
1577
|
+
};
|
|
1578
|
+
};
|
|
1579
|
+
400: {
|
|
1580
|
+
headers: {
|
|
1581
|
+
[name: string]: unknown;
|
|
1582
|
+
};
|
|
1583
|
+
content: {
|
|
1584
|
+
"application/json": {
|
|
1585
|
+
success: false;
|
|
1586
|
+
message: string;
|
|
1587
|
+
code?: string;
|
|
1588
|
+
errors?: {
|
|
1589
|
+
path: string;
|
|
1590
|
+
message: string;
|
|
1591
|
+
}[];
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1594
|
+
};
|
|
1595
|
+
};
|
|
1596
|
+
}, {
|
|
1597
|
+
body: {
|
|
1598
|
+
empresaRuc: string;
|
|
1599
|
+
correlativo: string;
|
|
1600
|
+
fechaEmision: string;
|
|
1601
|
+
fechaReferencia: string;
|
|
1602
|
+
items: {
|
|
1603
|
+
tipoDoc: string;
|
|
1604
|
+
serie: string;
|
|
1605
|
+
correlativo: string;
|
|
1606
|
+
clienteTipoDoc: string;
|
|
1607
|
+
clienteNumDoc: string;
|
|
1608
|
+
estadoItem: "1" | "2" | "3";
|
|
1609
|
+
tipoMoneda?: string;
|
|
1610
|
+
montoOperGravadas?: number;
|
|
1611
|
+
montoOperExoneradas?: number;
|
|
1612
|
+
montoOperInafectas?: number;
|
|
1613
|
+
montoOperGratuitas?: number;
|
|
1614
|
+
montoIgv?: number;
|
|
1615
|
+
montoIsc?: number;
|
|
1616
|
+
montoOtrosCargos?: number;
|
|
1617
|
+
montoTotal: number;
|
|
1618
|
+
}[];
|
|
1619
|
+
};
|
|
1620
|
+
}, `${string}/${string}`>>;
|
|
1621
|
+
/** Envía una Comunicación de Baja (RA). */
|
|
1622
|
+
sendVoided(body: SendVoidedInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
1623
|
+
parameters: {
|
|
1624
|
+
query?: never;
|
|
1625
|
+
header?: never;
|
|
1626
|
+
path?: never;
|
|
1627
|
+
cookie?: never;
|
|
1628
|
+
};
|
|
1629
|
+
requestBody: {
|
|
1630
|
+
content: {
|
|
1631
|
+
"application/json": {
|
|
1632
|
+
empresaRuc: string;
|
|
1633
|
+
correlativo: string;
|
|
1634
|
+
fechaEmision: string;
|
|
1635
|
+
fechaReferencia: string;
|
|
1636
|
+
items: {
|
|
1637
|
+
tipoDoc: string;
|
|
1638
|
+
serie: string;
|
|
1639
|
+
correlativo: string;
|
|
1640
|
+
motivoBaja: string;
|
|
1641
|
+
}[];
|
|
1642
|
+
};
|
|
1643
|
+
};
|
|
1644
|
+
};
|
|
1645
|
+
responses: {
|
|
1646
|
+
202: {
|
|
1647
|
+
headers: {
|
|
1648
|
+
[name: string]: unknown;
|
|
1649
|
+
};
|
|
1650
|
+
content: {
|
|
1651
|
+
"application/json": {
|
|
1652
|
+
success: boolean;
|
|
1653
|
+
message: string;
|
|
1654
|
+
data?: {
|
|
1655
|
+
id?: string;
|
|
1656
|
+
estado?: string;
|
|
1657
|
+
ticket?: string;
|
|
1658
|
+
hash?: string | null;
|
|
1659
|
+
};
|
|
1660
|
+
};
|
|
1661
|
+
};
|
|
1662
|
+
};
|
|
1663
|
+
400: {
|
|
1664
|
+
headers: {
|
|
1665
|
+
[name: string]: unknown;
|
|
1666
|
+
};
|
|
1667
|
+
content: {
|
|
1668
|
+
"application/json": {
|
|
1669
|
+
success: false;
|
|
1670
|
+
message: string;
|
|
1671
|
+
code?: string;
|
|
1672
|
+
errors?: {
|
|
1673
|
+
path: string;
|
|
1674
|
+
message: string;
|
|
1675
|
+
}[];
|
|
1676
|
+
};
|
|
1677
|
+
};
|
|
1678
|
+
};
|
|
1679
|
+
};
|
|
1680
|
+
}, {
|
|
1681
|
+
body: {
|
|
1682
|
+
empresaRuc: string;
|
|
1683
|
+
correlativo: string;
|
|
1684
|
+
fechaEmision: string;
|
|
1685
|
+
fechaReferencia: string;
|
|
1686
|
+
items: {
|
|
1687
|
+
tipoDoc: string;
|
|
1688
|
+
serie: string;
|
|
1689
|
+
correlativo: string;
|
|
1690
|
+
motivoBaja: string;
|
|
1691
|
+
}[];
|
|
1692
|
+
};
|
|
1693
|
+
}, `${string}/${string}`>>;
|
|
1694
|
+
/** Consulta el estado de un ticket asíncrono (sendSummary). */
|
|
1695
|
+
getTicketStatus(ticket: string, ruc: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
1696
|
+
parameters: {
|
|
1697
|
+
query: {
|
|
1698
|
+
ruc: string;
|
|
1699
|
+
};
|
|
1700
|
+
header?: never;
|
|
1701
|
+
path: {
|
|
1702
|
+
ticket: string;
|
|
1703
|
+
};
|
|
1704
|
+
cookie?: never;
|
|
1705
|
+
};
|
|
1706
|
+
requestBody?: never;
|
|
1707
|
+
responses: {
|
|
1708
|
+
200: {
|
|
1709
|
+
headers: {
|
|
1710
|
+
[name: string]: unknown;
|
|
1711
|
+
};
|
|
1712
|
+
content: {
|
|
1713
|
+
"application/json": {
|
|
1714
|
+
success: boolean;
|
|
1715
|
+
message: string;
|
|
1716
|
+
statusCode: string;
|
|
1717
|
+
cdrResponse?: {
|
|
1718
|
+
id: string;
|
|
1719
|
+
code: string;
|
|
1720
|
+
description: string;
|
|
1721
|
+
notes: string[];
|
|
1722
|
+
};
|
|
1723
|
+
};
|
|
1724
|
+
};
|
|
1725
|
+
};
|
|
1726
|
+
202: {
|
|
1727
|
+
headers: {
|
|
1728
|
+
[name: string]: unknown;
|
|
1729
|
+
};
|
|
1730
|
+
content: {
|
|
1731
|
+
"application/json": {
|
|
1732
|
+
success: boolean;
|
|
1733
|
+
message: string;
|
|
1734
|
+
statusCode: string;
|
|
1735
|
+
cdrResponse?: {
|
|
1736
|
+
id: string;
|
|
1737
|
+
code: string;
|
|
1738
|
+
description: string;
|
|
1739
|
+
notes: string[];
|
|
1740
|
+
};
|
|
1741
|
+
};
|
|
1742
|
+
};
|
|
1743
|
+
};
|
|
1744
|
+
};
|
|
1745
|
+
}, {
|
|
1746
|
+
params: {
|
|
1747
|
+
path: {
|
|
1748
|
+
ticket: string;
|
|
1749
|
+
};
|
|
1750
|
+
query: {
|
|
1751
|
+
ruc: string;
|
|
1752
|
+
};
|
|
1753
|
+
};
|
|
1754
|
+
}, `${string}/${string}`>>;
|
|
1755
|
+
/** Lista documentos con filtros y paginación. */
|
|
1756
|
+
listDocuments(query?: paths["/api/v1/documents"]["get"]["parameters"]["query"]): Promise<import("openapi-fetch").FetchResponse<{
|
|
1757
|
+
parameters: {
|
|
1758
|
+
query?: {
|
|
1759
|
+
ruc?: string;
|
|
1760
|
+
tipoDoc?: string;
|
|
1761
|
+
serie?: string;
|
|
1762
|
+
estado?: string;
|
|
1763
|
+
env?: "live" | "test";
|
|
1764
|
+
fechaDesde?: string;
|
|
1765
|
+
fechaHasta?: string;
|
|
1766
|
+
clienteNumDoc?: string;
|
|
1767
|
+
page?: number;
|
|
1768
|
+
limit?: number;
|
|
1769
|
+
};
|
|
1770
|
+
header?: never;
|
|
1771
|
+
path?: never;
|
|
1772
|
+
cookie?: never;
|
|
1773
|
+
};
|
|
1774
|
+
requestBody?: never;
|
|
1775
|
+
responses: {
|
|
1776
|
+
200: {
|
|
1777
|
+
headers: {
|
|
1778
|
+
[name: string]: unknown;
|
|
1779
|
+
};
|
|
1780
|
+
content: {
|
|
1781
|
+
"application/json": {
|
|
1782
|
+
success: boolean;
|
|
1783
|
+
data: {
|
|
1784
|
+
id: string;
|
|
1785
|
+
env: "live" | "test";
|
|
1786
|
+
tipoDoc: string;
|
|
1787
|
+
serie: string;
|
|
1788
|
+
correlativo: string;
|
|
1789
|
+
fechaEmision: string;
|
|
1790
|
+
tipoMoneda: string;
|
|
1791
|
+
clienteNumDoc: string;
|
|
1792
|
+
clienteRazonSocial: string;
|
|
1793
|
+
montoImpVenta: string;
|
|
1794
|
+
estadoSunat: string;
|
|
1795
|
+
codigoRespuesta: string | null;
|
|
1796
|
+
hashCdr: string | null;
|
|
1797
|
+
createdAt: string;
|
|
1798
|
+
company: {
|
|
1799
|
+
ruc: string;
|
|
1800
|
+
razonSocial: string;
|
|
1801
|
+
};
|
|
1802
|
+
}[];
|
|
1803
|
+
pagination: {
|
|
1804
|
+
page: number;
|
|
1805
|
+
limit: number;
|
|
1806
|
+
total: number;
|
|
1807
|
+
totalPages: number;
|
|
1808
|
+
};
|
|
1809
|
+
};
|
|
1810
|
+
};
|
|
1811
|
+
};
|
|
1812
|
+
};
|
|
1813
|
+
}, {
|
|
1814
|
+
params: {
|
|
1815
|
+
query: {
|
|
1816
|
+
ruc?: string;
|
|
1817
|
+
tipoDoc?: string;
|
|
1818
|
+
serie?: string;
|
|
1819
|
+
estado?: string;
|
|
1820
|
+
env?: "live" | "test";
|
|
1821
|
+
fechaDesde?: string;
|
|
1822
|
+
fechaHasta?: string;
|
|
1823
|
+
clienteNumDoc?: string;
|
|
1824
|
+
page?: number;
|
|
1825
|
+
limit?: number;
|
|
1826
|
+
} | undefined;
|
|
1827
|
+
};
|
|
1828
|
+
}, `${string}/${string}`>>;
|
|
1829
|
+
/** Detalle de un documento por ID. */
|
|
1830
|
+
getDocument(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
1831
|
+
parameters: {
|
|
1832
|
+
query?: never;
|
|
1833
|
+
header?: never;
|
|
1834
|
+
path: {
|
|
1835
|
+
id: string;
|
|
1836
|
+
};
|
|
1837
|
+
cookie?: never;
|
|
1838
|
+
};
|
|
1839
|
+
requestBody?: never;
|
|
1840
|
+
responses: {
|
|
1841
|
+
200: {
|
|
1842
|
+
headers: {
|
|
1843
|
+
[name: string]: unknown;
|
|
1844
|
+
};
|
|
1845
|
+
content?: never;
|
|
1846
|
+
};
|
|
1847
|
+
};
|
|
1848
|
+
}, {
|
|
1849
|
+
params: {
|
|
1850
|
+
path: {
|
|
1851
|
+
id: string;
|
|
1852
|
+
};
|
|
1853
|
+
};
|
|
1854
|
+
}, `${string}/${string}`>>;
|
|
1855
|
+
/** Re-encola un documento fallido (COLA_FALLIDA). */
|
|
1856
|
+
retryDocument(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
1857
|
+
parameters: {
|
|
1858
|
+
query?: never;
|
|
1859
|
+
header?: never;
|
|
1860
|
+
path: {
|
|
1861
|
+
id: string;
|
|
1862
|
+
};
|
|
1863
|
+
cookie?: never;
|
|
1864
|
+
};
|
|
1865
|
+
requestBody?: never;
|
|
1866
|
+
responses: {
|
|
1867
|
+
202: {
|
|
1868
|
+
headers: {
|
|
1869
|
+
[name: string]: unknown;
|
|
1870
|
+
};
|
|
1871
|
+
content: {
|
|
1872
|
+
"application/json": {
|
|
1873
|
+
success: boolean;
|
|
1874
|
+
message: string;
|
|
1875
|
+
jobId?: string;
|
|
1876
|
+
};
|
|
1877
|
+
};
|
|
1878
|
+
};
|
|
1879
|
+
400: {
|
|
1880
|
+
headers: {
|
|
1881
|
+
[name: string]: unknown;
|
|
1882
|
+
};
|
|
1883
|
+
content: {
|
|
1884
|
+
"application/json": {
|
|
1885
|
+
success: false;
|
|
1886
|
+
message: string;
|
|
1887
|
+
code?: string;
|
|
1888
|
+
errors?: {
|
|
1889
|
+
path: string;
|
|
1890
|
+
message: string;
|
|
1891
|
+
}[];
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1894
|
+
};
|
|
1895
|
+
};
|
|
1896
|
+
}, {
|
|
1897
|
+
params: {
|
|
1898
|
+
path: {
|
|
1899
|
+
id: string;
|
|
1900
|
+
};
|
|
1901
|
+
};
|
|
1902
|
+
}, `${string}/${string}`>>;
|
|
1903
|
+
/** Siguiente correlativo disponible para una serie (por ambiente). */
|
|
1904
|
+
getNextCorrelativo(query: paths["/api/v1/documents/next-correlativo"]["get"]["parameters"]["query"]): Promise<import("openapi-fetch").FetchResponse<{
|
|
1905
|
+
parameters: {
|
|
1906
|
+
query: {
|
|
1907
|
+
companyRuc: string;
|
|
1908
|
+
tipoDoc: string;
|
|
1909
|
+
serie: string;
|
|
1910
|
+
};
|
|
1911
|
+
header?: never;
|
|
1912
|
+
path?: never;
|
|
1913
|
+
cookie?: never;
|
|
1914
|
+
};
|
|
1915
|
+
requestBody?: never;
|
|
1916
|
+
responses: {
|
|
1917
|
+
200: {
|
|
1918
|
+
headers: {
|
|
1919
|
+
[name: string]: unknown;
|
|
1920
|
+
};
|
|
1921
|
+
content: {
|
|
1922
|
+
"application/json": {
|
|
1923
|
+
success: true;
|
|
1924
|
+
data: {
|
|
1925
|
+
next: string;
|
|
1926
|
+
};
|
|
1927
|
+
};
|
|
1928
|
+
};
|
|
1929
|
+
};
|
|
1930
|
+
404: {
|
|
1931
|
+
headers: {
|
|
1932
|
+
[name: string]: unknown;
|
|
1933
|
+
};
|
|
1934
|
+
content: {
|
|
1935
|
+
"application/json": {
|
|
1936
|
+
success: false;
|
|
1937
|
+
message: string;
|
|
1938
|
+
code?: string;
|
|
1939
|
+
errors?: {
|
|
1940
|
+
path: string;
|
|
1941
|
+
message: string;
|
|
1942
|
+
}[];
|
|
1943
|
+
};
|
|
1944
|
+
};
|
|
1945
|
+
};
|
|
1946
|
+
};
|
|
1947
|
+
}, {
|
|
1948
|
+
params: {
|
|
1949
|
+
query: {
|
|
1950
|
+
companyRuc: string;
|
|
1951
|
+
tipoDoc: string;
|
|
1952
|
+
serie: string;
|
|
1953
|
+
};
|
|
1954
|
+
};
|
|
1955
|
+
}, `${string}/${string}`>>;
|
|
1956
|
+
/** XML firmado de una factura/boleta. */
|
|
1957
|
+
getInvoiceXml(id: string): Promise<ArrayBuffer>;
|
|
1958
|
+
/** CDR (constancia SUNAT) de una factura/boleta. */
|
|
1959
|
+
getInvoiceCdr(id: string): Promise<ArrayBuffer>;
|
|
1960
|
+
/** PDF de una factura/boleta. */
|
|
1961
|
+
getInvoicePdf(id: string): Promise<ArrayBuffer>;
|
|
1962
|
+
/** XML firmado de una nota (07/08). */
|
|
1963
|
+
getNoteXml(id: string): Promise<ArrayBuffer>;
|
|
1964
|
+
/** PDF de una nota (07/08). */
|
|
1965
|
+
getNotePdf(id: string): Promise<ArrayBuffer>;
|
|
1966
|
+
/** XML firmado de una guía de remisión (09/31). */
|
|
1967
|
+
getDespatchXml(id: string): Promise<ArrayBuffer>;
|
|
1968
|
+
/** PDF de una guía de remisión (09/31). `format`: a4 | ticket80 | ticket58. */
|
|
1969
|
+
getDespatchPdf(id: string, format?: NonNullable<paths["/api/v1/despatch/{id}/pdf"]["get"]["parameters"]["query"]>["format"]): Promise<ArrayBuffer>;
|
|
1970
|
+
/** Lista las empresas accesibles por la key. */
|
|
1971
|
+
listCompanies(): Promise<import("openapi-fetch").FetchResponse<{
|
|
1972
|
+
parameters: {
|
|
1973
|
+
query?: never;
|
|
1974
|
+
header?: never;
|
|
1975
|
+
path?: never;
|
|
1976
|
+
cookie?: never;
|
|
1977
|
+
};
|
|
1978
|
+
requestBody?: never;
|
|
1979
|
+
responses: {
|
|
1980
|
+
200: {
|
|
1981
|
+
headers: {
|
|
1982
|
+
[name: string]: unknown;
|
|
1983
|
+
};
|
|
1984
|
+
content?: never;
|
|
1985
|
+
};
|
|
1986
|
+
};
|
|
1987
|
+
}, {}, `${string}/${string}`>>;
|
|
1988
|
+
/** Detalle de una empresa por ID. */
|
|
1989
|
+
getCompany(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
1990
|
+
parameters: {
|
|
1991
|
+
query?: never;
|
|
1992
|
+
header?: never;
|
|
1993
|
+
path: {
|
|
1994
|
+
id: string;
|
|
1995
|
+
};
|
|
1996
|
+
cookie?: never;
|
|
1997
|
+
};
|
|
1998
|
+
requestBody?: never;
|
|
1999
|
+
responses: {
|
|
2000
|
+
200: {
|
|
2001
|
+
headers: {
|
|
2002
|
+
[name: string]: unknown;
|
|
2003
|
+
};
|
|
2004
|
+
content?: never;
|
|
2005
|
+
};
|
|
2006
|
+
};
|
|
2007
|
+
}, {
|
|
2008
|
+
params: {
|
|
2009
|
+
path: {
|
|
2010
|
+
id: string;
|
|
2011
|
+
};
|
|
2012
|
+
};
|
|
2013
|
+
}, `${string}/${string}`>>;
|
|
2014
|
+
/** Logo de la empresa (imagen). */
|
|
2015
|
+
getCompanyLogo(id: string): Promise<ArrayBuffer>;
|
|
2016
|
+
/** Crea una suscripción a webhooks. El secret se devuelve UNA sola vez. */
|
|
2017
|
+
createWebhook(body: CreateWebhookInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
2018
|
+
parameters: {
|
|
2019
|
+
query?: never;
|
|
2020
|
+
header?: never;
|
|
2021
|
+
path?: never;
|
|
2022
|
+
cookie?: never;
|
|
2023
|
+
};
|
|
2024
|
+
requestBody: {
|
|
2025
|
+
content: {
|
|
2026
|
+
"application/json": {
|
|
2027
|
+
empresaRuc: string;
|
|
2028
|
+
url: string;
|
|
2029
|
+
events: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
2030
|
+
description?: string;
|
|
2031
|
+
secret?: string;
|
|
2032
|
+
};
|
|
2033
|
+
};
|
|
2034
|
+
};
|
|
2035
|
+
responses: {
|
|
2036
|
+
200: {
|
|
2037
|
+
headers: {
|
|
2038
|
+
[name: string]: unknown;
|
|
2039
|
+
};
|
|
2040
|
+
content?: never;
|
|
2041
|
+
};
|
|
2042
|
+
};
|
|
2043
|
+
}, {
|
|
2044
|
+
body: {
|
|
2045
|
+
empresaRuc: string;
|
|
2046
|
+
url: string;
|
|
2047
|
+
events: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
2048
|
+
description?: string;
|
|
2049
|
+
secret?: string;
|
|
2050
|
+
};
|
|
2051
|
+
}, `${string}/${string}`>>;
|
|
2052
|
+
/** Lista las suscripciones de webhooks. */
|
|
2053
|
+
listWebhooks(): Promise<import("openapi-fetch").FetchResponse<{
|
|
2054
|
+
parameters: {
|
|
2055
|
+
query?: {
|
|
2056
|
+
ruc?: string;
|
|
2057
|
+
};
|
|
2058
|
+
header?: never;
|
|
2059
|
+
path?: never;
|
|
2060
|
+
cookie?: never;
|
|
2061
|
+
};
|
|
2062
|
+
requestBody?: never;
|
|
2063
|
+
responses: {
|
|
2064
|
+
200: {
|
|
2065
|
+
headers: {
|
|
2066
|
+
[name: string]: unknown;
|
|
2067
|
+
};
|
|
2068
|
+
content?: never;
|
|
2069
|
+
};
|
|
2070
|
+
};
|
|
2071
|
+
}, {}, `${string}/${string}`>>;
|
|
2072
|
+
/** Detalle de una suscripción de webhook. */
|
|
2073
|
+
getWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2074
|
+
parameters: {
|
|
2075
|
+
query?: never;
|
|
2076
|
+
header?: never;
|
|
2077
|
+
path: {
|
|
2078
|
+
id: string;
|
|
2079
|
+
};
|
|
2080
|
+
cookie?: never;
|
|
2081
|
+
};
|
|
2082
|
+
requestBody?: never;
|
|
2083
|
+
responses: {
|
|
2084
|
+
200: {
|
|
2085
|
+
headers: {
|
|
2086
|
+
[name: string]: unknown;
|
|
2087
|
+
};
|
|
2088
|
+
content?: never;
|
|
2089
|
+
};
|
|
2090
|
+
};
|
|
2091
|
+
}, {
|
|
2092
|
+
params: {
|
|
2093
|
+
path: {
|
|
2094
|
+
id: string;
|
|
2095
|
+
};
|
|
2096
|
+
};
|
|
2097
|
+
}, `${string}/${string}`>>;
|
|
2098
|
+
/** Actualiza una suscripción de webhook (url, eventos, isActive). */
|
|
2099
|
+
updateWebhook(id: string, body: UpdateWebhookInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
2100
|
+
parameters: {
|
|
2101
|
+
query?: never;
|
|
2102
|
+
header?: never;
|
|
2103
|
+
path: {
|
|
2104
|
+
id: string;
|
|
2105
|
+
};
|
|
2106
|
+
cookie?: never;
|
|
2107
|
+
};
|
|
2108
|
+
requestBody: {
|
|
2109
|
+
content: {
|
|
2110
|
+
"application/json": {
|
|
2111
|
+
url?: string;
|
|
2112
|
+
events?: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
2113
|
+
description?: string;
|
|
2114
|
+
isActive?: boolean;
|
|
2115
|
+
};
|
|
2116
|
+
};
|
|
2117
|
+
};
|
|
2118
|
+
responses: {
|
|
2119
|
+
200: {
|
|
2120
|
+
headers: {
|
|
2121
|
+
[name: string]: unknown;
|
|
2122
|
+
};
|
|
2123
|
+
content?: never;
|
|
2124
|
+
};
|
|
2125
|
+
};
|
|
2126
|
+
}, {
|
|
2127
|
+
params: {
|
|
2128
|
+
path: {
|
|
2129
|
+
id: string;
|
|
2130
|
+
};
|
|
2131
|
+
};
|
|
2132
|
+
body: {
|
|
2133
|
+
url?: string;
|
|
2134
|
+
events?: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
2135
|
+
description?: string;
|
|
2136
|
+
isActive?: boolean;
|
|
2137
|
+
};
|
|
2138
|
+
}, `${string}/${string}`>>;
|
|
2139
|
+
/** Elimina una suscripción de webhook. */
|
|
2140
|
+
deleteWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2141
|
+
parameters: {
|
|
2142
|
+
query?: never;
|
|
2143
|
+
header?: never;
|
|
2144
|
+
path: {
|
|
2145
|
+
id: string;
|
|
2146
|
+
};
|
|
2147
|
+
cookie?: never;
|
|
2148
|
+
};
|
|
2149
|
+
requestBody?: never;
|
|
2150
|
+
responses: {
|
|
2151
|
+
200: {
|
|
2152
|
+
headers: {
|
|
2153
|
+
[name: string]: unknown;
|
|
2154
|
+
};
|
|
2155
|
+
content?: never;
|
|
2156
|
+
};
|
|
2157
|
+
};
|
|
2158
|
+
}, {
|
|
2159
|
+
params: {
|
|
2160
|
+
path: {
|
|
2161
|
+
id: string;
|
|
2162
|
+
};
|
|
2163
|
+
};
|
|
2164
|
+
}, `${string}/${string}`>>;
|
|
2165
|
+
/** Lista los intentos de entrega de un webhook. */
|
|
2166
|
+
listWebhookDeliveries(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2167
|
+
parameters: {
|
|
2168
|
+
query?: {
|
|
733
2169
|
limit?: number;
|
|
734
|
-
|
|
2170
|
+
success?: "true" | "false";
|
|
2171
|
+
};
|
|
2172
|
+
header?: never;
|
|
2173
|
+
path: {
|
|
2174
|
+
id: string;
|
|
2175
|
+
};
|
|
2176
|
+
cookie?: never;
|
|
2177
|
+
};
|
|
2178
|
+
requestBody?: never;
|
|
2179
|
+
responses: {
|
|
2180
|
+
200: {
|
|
2181
|
+
headers: {
|
|
2182
|
+
[name: string]: unknown;
|
|
2183
|
+
};
|
|
2184
|
+
content?: never;
|
|
2185
|
+
};
|
|
2186
|
+
};
|
|
2187
|
+
}, {
|
|
2188
|
+
params: {
|
|
2189
|
+
path: {
|
|
2190
|
+
id: string;
|
|
2191
|
+
};
|
|
735
2192
|
};
|
|
736
2193
|
}, `${string}/${string}`>>;
|
|
737
|
-
/**
|
|
738
|
-
|
|
2194
|
+
/** Reintenta manualmente una entrega de webhook. */
|
|
2195
|
+
redeliverWebhook(id: string, deliveryId: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
739
2196
|
parameters: {
|
|
740
2197
|
query?: never;
|
|
741
2198
|
header?: never;
|
|
742
2199
|
path: {
|
|
743
2200
|
id: string;
|
|
2201
|
+
deliveryId: string;
|
|
744
2202
|
};
|
|
745
2203
|
cookie?: never;
|
|
746
2204
|
};
|
|
@@ -757,11 +2215,12 @@ export declare class FacturacionClient {
|
|
|
757
2215
|
params: {
|
|
758
2216
|
path: {
|
|
759
2217
|
id: string;
|
|
2218
|
+
deliveryId: string;
|
|
760
2219
|
};
|
|
761
2220
|
};
|
|
762
2221
|
}, `${string}/${string}`>>;
|
|
763
|
-
/**
|
|
764
|
-
|
|
2222
|
+
/** Dispara un evento de prueba (webhook.test) para verificar conectividad. */
|
|
2223
|
+
testWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
765
2224
|
parameters: {
|
|
766
2225
|
query?: never;
|
|
767
2226
|
header?: never;
|
|
@@ -772,33 +2231,11 @@ export declare class FacturacionClient {
|
|
|
772
2231
|
};
|
|
773
2232
|
requestBody?: never;
|
|
774
2233
|
responses: {
|
|
775
|
-
|
|
776
|
-
headers: {
|
|
777
|
-
[name: string]: unknown;
|
|
778
|
-
};
|
|
779
|
-
content: {
|
|
780
|
-
"application/json": {
|
|
781
|
-
success: boolean;
|
|
782
|
-
message: string;
|
|
783
|
-
jobId?: string;
|
|
784
|
-
};
|
|
785
|
-
};
|
|
786
|
-
};
|
|
787
|
-
400: {
|
|
2234
|
+
200: {
|
|
788
2235
|
headers: {
|
|
789
2236
|
[name: string]: unknown;
|
|
790
2237
|
};
|
|
791
|
-
content
|
|
792
|
-
"application/json": {
|
|
793
|
-
success: false;
|
|
794
|
-
message: string;
|
|
795
|
-
code?: string;
|
|
796
|
-
errors?: {
|
|
797
|
-
path: string;
|
|
798
|
-
message: string;
|
|
799
|
-
}[];
|
|
800
|
-
};
|
|
801
|
-
};
|
|
2238
|
+
content?: never;
|
|
802
2239
|
};
|
|
803
2240
|
};
|
|
804
2241
|
}, {
|
|
@@ -808,186 +2245,69 @@ export declare class FacturacionClient {
|
|
|
808
2245
|
};
|
|
809
2246
|
};
|
|
810
2247
|
}, `${string}/${string}`>>;
|
|
811
|
-
/**
|
|
812
|
-
|
|
813
|
-
/** Descarga el CDR (constancia SUNAT). */
|
|
814
|
-
getInvoiceCdr(id: string): Promise<ArrayBuffer>;
|
|
815
|
-
/** Descarga el PDF generado. */
|
|
816
|
-
getInvoicePdf(id: string): Promise<ArrayBuffer>;
|
|
817
|
-
sendSummary(body: paths["/api/v1/summary/send"]["post"]["requestBody"]["content"]["application/json"]): Promise<import("openapi-fetch").FetchResponse<{
|
|
2248
|
+
/** Rota el secret HMAC de un webhook. El nuevo secret se devuelve una sola vez. */
|
|
2249
|
+
rotateWebhookSecret(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
818
2250
|
parameters: {
|
|
819
2251
|
query?: never;
|
|
820
2252
|
header?: never;
|
|
821
|
-
path
|
|
822
|
-
|
|
823
|
-
};
|
|
824
|
-
requestBody: {
|
|
825
|
-
content: {
|
|
826
|
-
"application/json": {
|
|
827
|
-
empresaRuc: string;
|
|
828
|
-
correlativo: string;
|
|
829
|
-
fechaEmision: string;
|
|
830
|
-
fechaReferencia: string;
|
|
831
|
-
items: {
|
|
832
|
-
tipoDoc: string;
|
|
833
|
-
serie: string;
|
|
834
|
-
correlativo: string;
|
|
835
|
-
clienteTipoDoc: string;
|
|
836
|
-
clienteNumDoc: string;
|
|
837
|
-
estadoItem: "1" | "2" | "3";
|
|
838
|
-
tipoMoneda?: string;
|
|
839
|
-
montoOperGravadas?: number;
|
|
840
|
-
montoOperExoneradas?: number;
|
|
841
|
-
montoOperInafectas?: number;
|
|
842
|
-
montoOperGratuitas?: number;
|
|
843
|
-
montoIgv?: number;
|
|
844
|
-
montoIsc?: number;
|
|
845
|
-
montoOtrosCargos?: number;
|
|
846
|
-
montoTotal: number;
|
|
847
|
-
}[];
|
|
848
|
-
};
|
|
2253
|
+
path: {
|
|
2254
|
+
id: string;
|
|
849
2255
|
};
|
|
2256
|
+
cookie?: never;
|
|
850
2257
|
};
|
|
2258
|
+
requestBody?: never;
|
|
851
2259
|
responses: {
|
|
852
|
-
|
|
853
|
-
headers: {
|
|
854
|
-
[name: string]: unknown;
|
|
855
|
-
};
|
|
856
|
-
content: {
|
|
857
|
-
"application/json": {
|
|
858
|
-
success: boolean;
|
|
859
|
-
message: string;
|
|
860
|
-
data?: {
|
|
861
|
-
id?: string;
|
|
862
|
-
estado?: string;
|
|
863
|
-
ticket?: string;
|
|
864
|
-
hash?: string | null;
|
|
865
|
-
};
|
|
866
|
-
};
|
|
867
|
-
};
|
|
868
|
-
};
|
|
869
|
-
400: {
|
|
2260
|
+
200: {
|
|
870
2261
|
headers: {
|
|
871
2262
|
[name: string]: unknown;
|
|
872
2263
|
};
|
|
873
|
-
content
|
|
874
|
-
"application/json": {
|
|
875
|
-
success: false;
|
|
876
|
-
message: string;
|
|
877
|
-
code?: string;
|
|
878
|
-
errors?: {
|
|
879
|
-
path: string;
|
|
880
|
-
message: string;
|
|
881
|
-
}[];
|
|
882
|
-
};
|
|
883
|
-
};
|
|
2264
|
+
content?: never;
|
|
884
2265
|
};
|
|
885
2266
|
};
|
|
886
2267
|
}, {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
fechaReferencia: string;
|
|
892
|
-
items: {
|
|
893
|
-
tipoDoc: string;
|
|
894
|
-
serie: string;
|
|
895
|
-
correlativo: string;
|
|
896
|
-
clienteTipoDoc: string;
|
|
897
|
-
clienteNumDoc: string;
|
|
898
|
-
estadoItem: "1" | "2" | "3";
|
|
899
|
-
tipoMoneda?: string;
|
|
900
|
-
montoOperGravadas?: number;
|
|
901
|
-
montoOperExoneradas?: number;
|
|
902
|
-
montoOperInafectas?: number;
|
|
903
|
-
montoOperGratuitas?: number;
|
|
904
|
-
montoIgv?: number;
|
|
905
|
-
montoIsc?: number;
|
|
906
|
-
montoOtrosCargos?: number;
|
|
907
|
-
montoTotal: number;
|
|
908
|
-
}[];
|
|
2268
|
+
params: {
|
|
2269
|
+
path: {
|
|
2270
|
+
id: string;
|
|
2271
|
+
};
|
|
909
2272
|
};
|
|
910
2273
|
}, `${string}/${string}`>>;
|
|
911
|
-
|
|
2274
|
+
/** Lista los catálogos SUNAT disponibles. */
|
|
2275
|
+
getCatalogs(): Promise<import("openapi-fetch").FetchResponse<{
|
|
912
2276
|
parameters: {
|
|
913
2277
|
query?: never;
|
|
914
2278
|
header?: never;
|
|
915
2279
|
path?: never;
|
|
916
2280
|
cookie?: never;
|
|
917
2281
|
};
|
|
918
|
-
requestBody
|
|
919
|
-
content: {
|
|
920
|
-
"application/json": {
|
|
921
|
-
empresaRuc: string;
|
|
922
|
-
correlativo: string;
|
|
923
|
-
fechaEmision: string;
|
|
924
|
-
fechaReferencia: string;
|
|
925
|
-
items: {
|
|
926
|
-
tipoDoc: string;
|
|
927
|
-
serie: string;
|
|
928
|
-
correlativo: string;
|
|
929
|
-
motivoBaja: string;
|
|
930
|
-
}[];
|
|
931
|
-
};
|
|
932
|
-
};
|
|
933
|
-
};
|
|
2282
|
+
requestBody?: never;
|
|
934
2283
|
responses: {
|
|
935
|
-
|
|
2284
|
+
200: {
|
|
936
2285
|
headers: {
|
|
937
2286
|
[name: string]: unknown;
|
|
938
2287
|
};
|
|
939
2288
|
content: {
|
|
940
2289
|
"application/json": {
|
|
941
2290
|
success: boolean;
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
};
|
|
950
|
-
};
|
|
951
|
-
};
|
|
952
|
-
400: {
|
|
953
|
-
headers: {
|
|
954
|
-
[name: string]: unknown;
|
|
955
|
-
};
|
|
956
|
-
content: {
|
|
957
|
-
"application/json": {
|
|
958
|
-
success: false;
|
|
959
|
-
message: string;
|
|
960
|
-
code?: string;
|
|
961
|
-
errors?: {
|
|
962
|
-
path: string;
|
|
963
|
-
message: string;
|
|
2291
|
+
data: {
|
|
2292
|
+
key: string;
|
|
2293
|
+
name: string;
|
|
2294
|
+
items: {
|
|
2295
|
+
code: string;
|
|
2296
|
+
label: string;
|
|
2297
|
+
}[];
|
|
964
2298
|
}[];
|
|
965
2299
|
};
|
|
966
2300
|
};
|
|
967
2301
|
};
|
|
968
2302
|
};
|
|
969
|
-
}, {
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
correlativo: string;
|
|
973
|
-
fechaEmision: string;
|
|
974
|
-
fechaReferencia: string;
|
|
975
|
-
items: {
|
|
976
|
-
tipoDoc: string;
|
|
977
|
-
serie: string;
|
|
978
|
-
correlativo: string;
|
|
979
|
-
motivoBaja: string;
|
|
980
|
-
}[];
|
|
981
|
-
};
|
|
982
|
-
}, `${string}/${string}`>>;
|
|
983
|
-
getTicketStatus(ticket: string, ruc: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2303
|
+
}, {}, `${string}/${string}`>>;
|
|
2304
|
+
/** Obtiene un catálogo SUNAT por clave (ej: "07", "61"). */
|
|
2305
|
+
getCatalog(key: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
984
2306
|
parameters: {
|
|
985
|
-
query
|
|
986
|
-
ruc: string;
|
|
987
|
-
};
|
|
2307
|
+
query?: never;
|
|
988
2308
|
header?: never;
|
|
989
2309
|
path: {
|
|
990
|
-
|
|
2310
|
+
key: string;
|
|
991
2311
|
};
|
|
992
2312
|
cookie?: never;
|
|
993
2313
|
};
|
|
@@ -997,72 +2317,30 @@ export declare class FacturacionClient {
|
|
|
997
2317
|
headers: {
|
|
998
2318
|
[name: string]: unknown;
|
|
999
2319
|
};
|
|
1000
|
-
content
|
|
1001
|
-
"application/json": {
|
|
1002
|
-
success: boolean;
|
|
1003
|
-
message: string;
|
|
1004
|
-
statusCode: string;
|
|
1005
|
-
cdrResponse?: {
|
|
1006
|
-
id: string;
|
|
1007
|
-
code: string;
|
|
1008
|
-
description: string;
|
|
1009
|
-
notes: string[];
|
|
1010
|
-
};
|
|
1011
|
-
};
|
|
1012
|
-
};
|
|
1013
|
-
};
|
|
1014
|
-
202: {
|
|
1015
|
-
headers: {
|
|
1016
|
-
[name: string]: unknown;
|
|
1017
|
-
};
|
|
1018
|
-
content: {
|
|
1019
|
-
"application/json": {
|
|
1020
|
-
success: boolean;
|
|
1021
|
-
message: string;
|
|
1022
|
-
statusCode: string;
|
|
1023
|
-
cdrResponse?: {
|
|
1024
|
-
id: string;
|
|
1025
|
-
code: string;
|
|
1026
|
-
description: string;
|
|
1027
|
-
notes: string[];
|
|
1028
|
-
};
|
|
1029
|
-
};
|
|
1030
|
-
};
|
|
2320
|
+
content?: never;
|
|
1031
2321
|
};
|
|
1032
2322
|
};
|
|
1033
2323
|
}, {
|
|
1034
2324
|
params: {
|
|
1035
2325
|
path: {
|
|
1036
|
-
|
|
1037
|
-
};
|
|
1038
|
-
query: {
|
|
1039
|
-
ruc: string;
|
|
2326
|
+
key: string;
|
|
1040
2327
|
};
|
|
1041
2328
|
};
|
|
1042
2329
|
}, `${string}/${string}`>>;
|
|
1043
|
-
|
|
2330
|
+
/** Consulta pública de un comprobante por RUC/tipo/serie/número (JSON). */
|
|
2331
|
+
consultarComprobante(ruc: string, tipoDoc: string, serie: string, numero: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
1044
2332
|
parameters: {
|
|
1045
|
-
query?:
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
};
|
|
1050
|
-
requestBody?: never;
|
|
1051
|
-
responses: {
|
|
1052
|
-
200: {
|
|
1053
|
-
headers: {
|
|
1054
|
-
[name: string]: unknown;
|
|
1055
|
-
};
|
|
1056
|
-
content?: never;
|
|
2333
|
+
query?: {
|
|
2334
|
+
total?: number;
|
|
2335
|
+
fecha?: string;
|
|
2336
|
+
receptor?: string;
|
|
1057
2337
|
};
|
|
1058
|
-
};
|
|
1059
|
-
}, {}, `${string}/${string}`>>;
|
|
1060
|
-
getCompany(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
1061
|
-
parameters: {
|
|
1062
|
-
query?: never;
|
|
1063
2338
|
header?: never;
|
|
1064
2339
|
path: {
|
|
1065
|
-
|
|
2340
|
+
ruc: string;
|
|
2341
|
+
tipoDoc: string;
|
|
2342
|
+
serie: string;
|
|
2343
|
+
numero: string;
|
|
1066
2344
|
};
|
|
1067
2345
|
cookie?: never;
|
|
1068
2346
|
};
|
|
@@ -1078,14 +2356,23 @@ export declare class FacturacionClient {
|
|
|
1078
2356
|
}, {
|
|
1079
2357
|
params: {
|
|
1080
2358
|
path: {
|
|
1081
|
-
|
|
2359
|
+
ruc: string;
|
|
2360
|
+
tipoDoc: string;
|
|
2361
|
+
serie: string;
|
|
2362
|
+
numero: string;
|
|
1082
2363
|
};
|
|
1083
2364
|
};
|
|
1084
2365
|
}, `${string}/${string}`>>;
|
|
2366
|
+
/** PDF público de un comprobante. */
|
|
2367
|
+
consultarComprobantePdf(ruc: string, tipoDoc: string, serie: string, numero: string): Promise<ArrayBuffer>;
|
|
2368
|
+
/** XML público de un comprobante. */
|
|
2369
|
+
consultarComprobanteXml(ruc: string, tipoDoc: string, serie: string, numero: string): Promise<ArrayBuffer>;
|
|
1085
2370
|
/** Estado de las colas BullMQ (jobs en cada estado). */
|
|
1086
2371
|
getQueueStats(): Promise<QueueStats>;
|
|
2372
|
+
/** Descarga binaria genérica para endpoints de archivo `{id}`. */
|
|
2373
|
+
private fetchBinary;
|
|
1087
2374
|
/**
|
|
1088
|
-
* Espera a que un documento llegue a estado final (ACEPTADO/RECHAZADO/COLA_FALLIDA).
|
|
2375
|
+
* Espera a que un documento llegue a estado final (ACEPTADO/RECHAZADO/COLA_FALLIDA/ANULADO).
|
|
1089
2376
|
* Hace polling cada `intervalMs`. Timeout en `timeoutMs`.
|
|
1090
2377
|
*/
|
|
1091
2378
|
waitForDocument(id: string, options?: {
|