intifact 1.3.2 → 1.5.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/README.md +119 -227
- package/dist/index.d.ts +1773 -574
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +59 -108
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +5985 -2840
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,24 +23,39 @@ export type SendVoidedInput = paths["/api/v1/voided/send"]["post"]["requestBody"
|
|
|
23
23
|
export type CancelInvoiceInput = paths["/api/v1/invoice/cancel"]["post"]["requestBody"]["content"]["application/json"];
|
|
24
24
|
/** Body de POST /api/v1/boleta/cancel (anular boleta) */
|
|
25
25
|
export type CancelBoletaInput = paths["/api/v1/boleta/cancel"]["post"]["requestBody"]["content"]["application/json"];
|
|
26
|
-
/** Body de POST /api/v1/companies (alta de RUC emisor) */
|
|
27
|
-
export type CreateCompanyInput = paths["/api/v1/companies"]["post"]["requestBody"]["content"]["application/json"];
|
|
28
|
-
/** Body de PUT /api/v1/companies/{id} */
|
|
29
|
-
export type UpdateCompanyInput = paths["/api/v1/companies/{id}"]["put"]["requestBody"]["content"]["application/json"];
|
|
30
|
-
/** Body de POST /api/v1/companies/{id}/branches (alta de establecimiento anexo) */
|
|
31
|
-
export type CreateBranchInput = paths["/api/v1/companies/{id}/branches"]["post"]["requestBody"]["content"]["application/json"];
|
|
32
|
-
/** Body de PUT /api/v1/companies/{id}/branches/{branchId} */
|
|
33
|
-
export type UpdateBranchInput = paths["/api/v1/companies/{id}/branches/{branchId}"]["put"]["requestBody"]["content"]["application/json"];
|
|
34
26
|
/** Body de POST /api/v1/webhooks */
|
|
35
27
|
export type CreateWebhookInput = paths["/api/v1/webhooks"]["post"]["requestBody"]["content"]["application/json"];
|
|
36
28
|
/** Body de PUT /api/v1/webhooks/{id} */
|
|
37
29
|
export type UpdateWebhookInput = paths["/api/v1/webhooks/{id}"]["put"]["requestBody"]["content"]["application/json"];
|
|
38
|
-
/** Body de POST /api/v1/cdr/consultar (consulta de CDR en SUNAT por referencia) */
|
|
39
|
-
export type ConsultarCdrInput = paths["/api/v1/cdr/consultar"]["post"]["requestBody"]["content"]["application/json"];
|
|
40
30
|
/** Respuesta 202 de cualquier /send (documento encolado) */
|
|
41
31
|
export type EnqueueResponse = paths["/api/v1/invoice/send"]["post"]["responses"]["202"]["content"]["application/json"];
|
|
42
32
|
/** Respuesta de GET /api/v1/queues/stats */
|
|
43
33
|
export type QueueStats = paths["/api/v1/queues/stats"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
34
|
+
/**
|
|
35
|
+
* Filtro anti-scraping OBLIGATORIO (al menos uno) para la consulta pública de
|
|
36
|
+
* comprobantes. Sin esto, RUC+tipoDoc+serie+numero (secuenciales y
|
|
37
|
+
* adivinables) bastarían para extraer datos de cualquier comprobante de la
|
|
38
|
+
* empresa. Si no mandas ninguno, la API responde 404 aunque el comprobante
|
|
39
|
+
* exista.
|
|
40
|
+
*
|
|
41
|
+
* NOTA: tipado a mano en vez de derivado de `paths[...]` porque el spec de
|
|
42
|
+
* producción aún no tiene este filtro en las rutas /pdf y /xml (se agregó
|
|
43
|
+
* del lado de la API pero todavía no se desplegó). Tras el deploy, correr
|
|
44
|
+
* `npm run gen` y este tipo puede volver a derivarse de `paths[...]`.
|
|
45
|
+
*/
|
|
46
|
+
export type ConsultaFiltro = {
|
|
47
|
+
total: number;
|
|
48
|
+
fecha?: string;
|
|
49
|
+
receptor?: string;
|
|
50
|
+
} | {
|
|
51
|
+
total?: number;
|
|
52
|
+
fecha: string;
|
|
53
|
+
receptor?: string;
|
|
54
|
+
} | {
|
|
55
|
+
total?: number;
|
|
56
|
+
fecha?: string;
|
|
57
|
+
receptor: string;
|
|
58
|
+
};
|
|
44
59
|
export interface FacturacionClientOptions extends ClientOptions {
|
|
45
60
|
/** Base URL de la API (ej: http://localhost:3000) */
|
|
46
61
|
baseUrl: string;
|
|
@@ -65,9 +80,7 @@ export declare class FacturacionClient {
|
|
|
65
80
|
parameters: {
|
|
66
81
|
query?: never;
|
|
67
82
|
header?: never;
|
|
68
|
-
path
|
|
69
|
-
/** Respuesta 202 de cualquier /send (documento encolado) */
|
|
70
|
-
?: never;
|
|
83
|
+
path?: never;
|
|
71
84
|
cookie?: never;
|
|
72
85
|
};
|
|
73
86
|
requestBody: {
|
|
@@ -115,9 +128,7 @@ export declare class FacturacionClient {
|
|
|
115
128
|
montoValorVenta: number;
|
|
116
129
|
descuento?: number;
|
|
117
130
|
descuentoItem?: number;
|
|
118
|
-
factorIcbper
|
|
119
|
-
/** Envía varias guías de remisión en un solo request. */
|
|
120
|
-
?: number;
|
|
131
|
+
factorIcbper?: number;
|
|
121
132
|
codProdSunat?: string;
|
|
122
133
|
}[];
|
|
123
134
|
formaPago: {
|
|
@@ -175,7 +186,39 @@ export declare class FacturacionClient {
|
|
|
175
186
|
};
|
|
176
187
|
content: {
|
|
177
188
|
"application/json": {
|
|
178
|
-
success:
|
|
189
|
+
success: boolean;
|
|
190
|
+
message: string;
|
|
191
|
+
code?: string;
|
|
192
|
+
errors?: {
|
|
193
|
+
path: string;
|
|
194
|
+
message: string;
|
|
195
|
+
}[];
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
401: {
|
|
200
|
+
headers: {
|
|
201
|
+
[name: string]: unknown;
|
|
202
|
+
};
|
|
203
|
+
content: {
|
|
204
|
+
"application/json": {
|
|
205
|
+
success: boolean;
|
|
206
|
+
message: string;
|
|
207
|
+
code?: string;
|
|
208
|
+
errors?: {
|
|
209
|
+
path: string;
|
|
210
|
+
message: string;
|
|
211
|
+
}[];
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
403: {
|
|
216
|
+
headers: {
|
|
217
|
+
[name: string]: unknown;
|
|
218
|
+
};
|
|
219
|
+
content: {
|
|
220
|
+
"application/json": {
|
|
221
|
+
success: boolean;
|
|
179
222
|
message: string;
|
|
180
223
|
code?: string;
|
|
181
224
|
errors?: {
|
|
@@ -191,13 +234,30 @@ export declare class FacturacionClient {
|
|
|
191
234
|
};
|
|
192
235
|
content: {
|
|
193
236
|
"application/json": {
|
|
194
|
-
success:
|
|
237
|
+
success: boolean;
|
|
238
|
+
message: string;
|
|
239
|
+
code?: string;
|
|
240
|
+
errors?: {
|
|
241
|
+
path: string;
|
|
242
|
+
message: string;
|
|
243
|
+
}[];
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
429: {
|
|
248
|
+
headers: {
|
|
249
|
+
[name: string]: unknown;
|
|
250
|
+
};
|
|
251
|
+
content: {
|
|
252
|
+
"application/json": {
|
|
253
|
+
success: boolean;
|
|
195
254
|
message: string;
|
|
196
255
|
code?: string;
|
|
197
256
|
errors?: {
|
|
198
257
|
path: string;
|
|
199
258
|
message: string;
|
|
200
259
|
}[];
|
|
260
|
+
retryAfterSeconds?: number;
|
|
201
261
|
};
|
|
202
262
|
};
|
|
203
263
|
};
|
|
@@ -246,9 +306,7 @@ export declare class FacturacionClient {
|
|
|
246
306
|
montoValorVenta: number;
|
|
247
307
|
descuento?: number;
|
|
248
308
|
descuentoItem?: number;
|
|
249
|
-
factorIcbper
|
|
250
|
-
/** Envía varias guías de remisión en un solo request. */
|
|
251
|
-
?: number;
|
|
309
|
+
factorIcbper?: number;
|
|
252
310
|
codProdSunat?: string;
|
|
253
311
|
}[];
|
|
254
312
|
formaPago: {
|
|
@@ -367,6 +425,55 @@ export declare class FacturacionClient {
|
|
|
367
425
|
};
|
|
368
426
|
};
|
|
369
427
|
};
|
|
428
|
+
401: {
|
|
429
|
+
headers: {
|
|
430
|
+
[name: string]: unknown;
|
|
431
|
+
};
|
|
432
|
+
content: {
|
|
433
|
+
"application/json": {
|
|
434
|
+
success: boolean;
|
|
435
|
+
message: string;
|
|
436
|
+
code?: string;
|
|
437
|
+
errors?: {
|
|
438
|
+
path: string;
|
|
439
|
+
message: string;
|
|
440
|
+
}[];
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
403: {
|
|
445
|
+
headers: {
|
|
446
|
+
[name: string]: unknown;
|
|
447
|
+
};
|
|
448
|
+
content: {
|
|
449
|
+
"application/json": {
|
|
450
|
+
success: boolean;
|
|
451
|
+
message: string;
|
|
452
|
+
code?: string;
|
|
453
|
+
errors?: {
|
|
454
|
+
path: string;
|
|
455
|
+
message: string;
|
|
456
|
+
}[];
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
429: {
|
|
461
|
+
headers: {
|
|
462
|
+
[name: string]: unknown;
|
|
463
|
+
};
|
|
464
|
+
content: {
|
|
465
|
+
"application/json": {
|
|
466
|
+
success: boolean;
|
|
467
|
+
message: string;
|
|
468
|
+
code?: string;
|
|
469
|
+
errors?: {
|
|
470
|
+
path: string;
|
|
471
|
+
message: string;
|
|
472
|
+
}[];
|
|
473
|
+
retryAfterSeconds?: number;
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
};
|
|
370
477
|
};
|
|
371
478
|
}, {
|
|
372
479
|
body: {
|
|
@@ -412,13 +519,7 @@ export declare class FacturacionClient {
|
|
|
412
519
|
tipoMoneda?: string;
|
|
413
520
|
fechaEmision: string;
|
|
414
521
|
empresaRuc: string;
|
|
415
|
-
establecimientoCodigo
|
|
416
|
-
* Descarga binaria genérica para endpoints de archivo `{id}`.
|
|
417
|
-
*
|
|
418
|
-
* openapi-fetch no infiere bien una unión de rutas, y estos endpoints declaran
|
|
419
|
-
* el cuerpo como binario (sin schema JSON), así que el cast es inevitable. Se
|
|
420
|
-
* mantiene acotado a `BinaryPath` para no perder el chequeo de la ruta.
|
|
421
|
-
*/: string;
|
|
522
|
+
establecimientoCodigo?: string;
|
|
422
523
|
clienteTipoDoc: string;
|
|
423
524
|
clienteNumDoc: string;
|
|
424
525
|
clienteRazonSocial: string;
|
|
@@ -492,7 +593,39 @@ export declare class FacturacionClient {
|
|
|
492
593
|
};
|
|
493
594
|
content: {
|
|
494
595
|
"application/json": {
|
|
495
|
-
success:
|
|
596
|
+
success: boolean;
|
|
597
|
+
message: string;
|
|
598
|
+
code?: string;
|
|
599
|
+
errors?: {
|
|
600
|
+
path: string;
|
|
601
|
+
message: string;
|
|
602
|
+
}[];
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
};
|
|
606
|
+
401: {
|
|
607
|
+
headers: {
|
|
608
|
+
[name: string]: unknown;
|
|
609
|
+
};
|
|
610
|
+
content: {
|
|
611
|
+
"application/json": {
|
|
612
|
+
success: boolean;
|
|
613
|
+
message: string;
|
|
614
|
+
code?: string;
|
|
615
|
+
errors?: {
|
|
616
|
+
path: string;
|
|
617
|
+
message: string;
|
|
618
|
+
}[];
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
403: {
|
|
623
|
+
headers: {
|
|
624
|
+
[name: string]: unknown;
|
|
625
|
+
};
|
|
626
|
+
content: {
|
|
627
|
+
"application/json": {
|
|
628
|
+
success: boolean;
|
|
496
629
|
message: string;
|
|
497
630
|
code?: string;
|
|
498
631
|
errors?: {
|
|
@@ -508,13 +641,30 @@ export declare class FacturacionClient {
|
|
|
508
641
|
};
|
|
509
642
|
content: {
|
|
510
643
|
"application/json": {
|
|
511
|
-
success:
|
|
644
|
+
success: boolean;
|
|
645
|
+
message: string;
|
|
646
|
+
code?: string;
|
|
647
|
+
errors?: {
|
|
648
|
+
path: string;
|
|
649
|
+
message: string;
|
|
650
|
+
}[];
|
|
651
|
+
};
|
|
652
|
+
};
|
|
653
|
+
};
|
|
654
|
+
429: {
|
|
655
|
+
headers: {
|
|
656
|
+
[name: string]: unknown;
|
|
657
|
+
};
|
|
658
|
+
content: {
|
|
659
|
+
"application/json": {
|
|
660
|
+
success: boolean;
|
|
512
661
|
message: string;
|
|
513
662
|
code?: string;
|
|
514
663
|
errors?: {
|
|
515
664
|
path: string;
|
|
516
665
|
message: string;
|
|
517
666
|
}[];
|
|
667
|
+
retryAfterSeconds?: number;
|
|
518
668
|
};
|
|
519
669
|
};
|
|
520
670
|
};
|
|
@@ -663,6 +813,55 @@ export declare class FacturacionClient {
|
|
|
663
813
|
};
|
|
664
814
|
};
|
|
665
815
|
};
|
|
816
|
+
401: {
|
|
817
|
+
headers: {
|
|
818
|
+
[name: string]: unknown;
|
|
819
|
+
};
|
|
820
|
+
content: {
|
|
821
|
+
"application/json": {
|
|
822
|
+
success: boolean;
|
|
823
|
+
message: string;
|
|
824
|
+
code?: string;
|
|
825
|
+
errors?: {
|
|
826
|
+
path: string;
|
|
827
|
+
message: string;
|
|
828
|
+
}[];
|
|
829
|
+
};
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
403: {
|
|
833
|
+
headers: {
|
|
834
|
+
[name: string]: unknown;
|
|
835
|
+
};
|
|
836
|
+
content: {
|
|
837
|
+
"application/json": {
|
|
838
|
+
success: boolean;
|
|
839
|
+
message: string;
|
|
840
|
+
code?: string;
|
|
841
|
+
errors?: {
|
|
842
|
+
path: string;
|
|
843
|
+
message: string;
|
|
844
|
+
}[];
|
|
845
|
+
};
|
|
846
|
+
};
|
|
847
|
+
};
|
|
848
|
+
429: {
|
|
849
|
+
headers: {
|
|
850
|
+
[name: string]: unknown;
|
|
851
|
+
};
|
|
852
|
+
content: {
|
|
853
|
+
"application/json": {
|
|
854
|
+
success: boolean;
|
|
855
|
+
message: string;
|
|
856
|
+
code?: string;
|
|
857
|
+
errors?: {
|
|
858
|
+
path: string;
|
|
859
|
+
message: string;
|
|
860
|
+
}[];
|
|
861
|
+
retryAfterSeconds?: number;
|
|
862
|
+
};
|
|
863
|
+
};
|
|
864
|
+
};
|
|
666
865
|
};
|
|
667
866
|
}, {
|
|
668
867
|
body: {
|
|
@@ -838,7 +1037,39 @@ export declare class FacturacionClient {
|
|
|
838
1037
|
};
|
|
839
1038
|
content: {
|
|
840
1039
|
"application/json": {
|
|
841
|
-
success:
|
|
1040
|
+
success: boolean;
|
|
1041
|
+
message: string;
|
|
1042
|
+
code?: string;
|
|
1043
|
+
errors?: {
|
|
1044
|
+
path: string;
|
|
1045
|
+
message: string;
|
|
1046
|
+
}[];
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
1050
|
+
401: {
|
|
1051
|
+
headers: {
|
|
1052
|
+
[name: string]: unknown;
|
|
1053
|
+
};
|
|
1054
|
+
content: {
|
|
1055
|
+
"application/json": {
|
|
1056
|
+
success: boolean;
|
|
1057
|
+
message: string;
|
|
1058
|
+
code?: string;
|
|
1059
|
+
errors?: {
|
|
1060
|
+
path: string;
|
|
1061
|
+
message: string;
|
|
1062
|
+
}[];
|
|
1063
|
+
};
|
|
1064
|
+
};
|
|
1065
|
+
};
|
|
1066
|
+
403: {
|
|
1067
|
+
headers: {
|
|
1068
|
+
[name: string]: unknown;
|
|
1069
|
+
};
|
|
1070
|
+
content: {
|
|
1071
|
+
"application/json": {
|
|
1072
|
+
success: boolean;
|
|
842
1073
|
message: string;
|
|
843
1074
|
code?: string;
|
|
844
1075
|
errors?: {
|
|
@@ -854,13 +1085,30 @@ export declare class FacturacionClient {
|
|
|
854
1085
|
};
|
|
855
1086
|
content: {
|
|
856
1087
|
"application/json": {
|
|
857
|
-
success:
|
|
1088
|
+
success: boolean;
|
|
1089
|
+
message: string;
|
|
1090
|
+
code?: string;
|
|
1091
|
+
errors?: {
|
|
1092
|
+
path: string;
|
|
1093
|
+
message: string;
|
|
1094
|
+
}[];
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
};
|
|
1098
|
+
429: {
|
|
1099
|
+
headers: {
|
|
1100
|
+
[name: string]: unknown;
|
|
1101
|
+
};
|
|
1102
|
+
content: {
|
|
1103
|
+
"application/json": {
|
|
1104
|
+
success: boolean;
|
|
858
1105
|
message: string;
|
|
859
1106
|
code?: string;
|
|
860
1107
|
errors?: {
|
|
861
1108
|
path: string;
|
|
862
1109
|
message: string;
|
|
863
1110
|
}[];
|
|
1111
|
+
retryAfterSeconds?: number;
|
|
864
1112
|
};
|
|
865
1113
|
};
|
|
866
1114
|
};
|
|
@@ -1136,7 +1384,7 @@ export declare class FacturacionClient {
|
|
|
1136
1384
|
};
|
|
1137
1385
|
content: {
|
|
1138
1386
|
"application/json": {
|
|
1139
|
-
success:
|
|
1387
|
+
success: boolean;
|
|
1140
1388
|
message: string;
|
|
1141
1389
|
code?: string;
|
|
1142
1390
|
errors?: {
|
|
@@ -1146,23 +1394,72 @@ export declare class FacturacionClient {
|
|
|
1146
1394
|
};
|
|
1147
1395
|
};
|
|
1148
1396
|
};
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1397
|
+
401: {
|
|
1398
|
+
headers: {
|
|
1399
|
+
[name: string]: unknown;
|
|
1400
|
+
};
|
|
1401
|
+
content: {
|
|
1402
|
+
"application/json": {
|
|
1403
|
+
success: boolean;
|
|
1404
|
+
message: string;
|
|
1405
|
+
code?: string;
|
|
1406
|
+
errors?: {
|
|
1407
|
+
path: string;
|
|
1408
|
+
message: string;
|
|
1409
|
+
}[];
|
|
1410
|
+
};
|
|
1411
|
+
};
|
|
1412
|
+
};
|
|
1413
|
+
403: {
|
|
1414
|
+
headers: {
|
|
1415
|
+
[name: string]: unknown;
|
|
1416
|
+
};
|
|
1417
|
+
content: {
|
|
1418
|
+
"application/json": {
|
|
1419
|
+
success: boolean;
|
|
1420
|
+
message: string;
|
|
1421
|
+
code?: string;
|
|
1422
|
+
errors?: {
|
|
1423
|
+
path: string;
|
|
1424
|
+
message: string;
|
|
1425
|
+
}[];
|
|
1426
|
+
};
|
|
1427
|
+
};
|
|
1428
|
+
};
|
|
1429
|
+
429: {
|
|
1430
|
+
headers: {
|
|
1431
|
+
[name: string]: unknown;
|
|
1432
|
+
};
|
|
1433
|
+
content: {
|
|
1434
|
+
"application/json": {
|
|
1435
|
+
success: boolean;
|
|
1436
|
+
message: string;
|
|
1437
|
+
code?: string;
|
|
1438
|
+
errors?: {
|
|
1439
|
+
path: string;
|
|
1440
|
+
message: string;
|
|
1441
|
+
}[];
|
|
1442
|
+
retryAfterSeconds?: number;
|
|
1443
|
+
};
|
|
1444
|
+
};
|
|
1445
|
+
};
|
|
1446
|
+
};
|
|
1447
|
+
}, {
|
|
1448
|
+
body: {
|
|
1449
|
+
tipoDoc: "09";
|
|
1450
|
+
serie: string;
|
|
1451
|
+
observacion?: string;
|
|
1452
|
+
fechaEmision: string;
|
|
1453
|
+
empresaRuc: string;
|
|
1454
|
+
establecimientoCodigo?: string;
|
|
1455
|
+
guiaCodTraslado: string;
|
|
1456
|
+
guiaModTraslado: "01" | "02";
|
|
1457
|
+
guiaFecTraslado: string;
|
|
1458
|
+
guiaVehiculoPlaca?: string;
|
|
1459
|
+
transportistaTipoDoc?: string;
|
|
1460
|
+
transportistaNumDoc?: string;
|
|
1461
|
+
transportistaRazonSocial?: string;
|
|
1462
|
+
transportistaNroMtc?: string;
|
|
1166
1463
|
guiaPartidaUbigeo: string;
|
|
1167
1464
|
guiaPartidaDireccion: string;
|
|
1168
1465
|
chofer?: {
|
|
@@ -1359,7 +1656,39 @@ export declare class FacturacionClient {
|
|
|
1359
1656
|
};
|
|
1360
1657
|
content: {
|
|
1361
1658
|
"application/json": {
|
|
1362
|
-
success:
|
|
1659
|
+
success: boolean;
|
|
1660
|
+
message: string;
|
|
1661
|
+
code?: string;
|
|
1662
|
+
errors?: {
|
|
1663
|
+
path: string;
|
|
1664
|
+
message: string;
|
|
1665
|
+
}[];
|
|
1666
|
+
};
|
|
1667
|
+
};
|
|
1668
|
+
};
|
|
1669
|
+
401: {
|
|
1670
|
+
headers: {
|
|
1671
|
+
[name: string]: unknown;
|
|
1672
|
+
};
|
|
1673
|
+
content: {
|
|
1674
|
+
"application/json": {
|
|
1675
|
+
success: boolean;
|
|
1676
|
+
message: string;
|
|
1677
|
+
code?: string;
|
|
1678
|
+
errors?: {
|
|
1679
|
+
path: string;
|
|
1680
|
+
message: string;
|
|
1681
|
+
}[];
|
|
1682
|
+
};
|
|
1683
|
+
};
|
|
1684
|
+
};
|
|
1685
|
+
403: {
|
|
1686
|
+
headers: {
|
|
1687
|
+
[name: string]: unknown;
|
|
1688
|
+
};
|
|
1689
|
+
content: {
|
|
1690
|
+
"application/json": {
|
|
1691
|
+
success: boolean;
|
|
1363
1692
|
message: string;
|
|
1364
1693
|
code?: string;
|
|
1365
1694
|
errors?: {
|
|
@@ -1375,13 +1704,30 @@ export declare class FacturacionClient {
|
|
|
1375
1704
|
};
|
|
1376
1705
|
content: {
|
|
1377
1706
|
"application/json": {
|
|
1378
|
-
success:
|
|
1707
|
+
success: boolean;
|
|
1708
|
+
message: string;
|
|
1709
|
+
code?: string;
|
|
1710
|
+
errors?: {
|
|
1711
|
+
path: string;
|
|
1712
|
+
message: string;
|
|
1713
|
+
}[];
|
|
1714
|
+
};
|
|
1715
|
+
};
|
|
1716
|
+
};
|
|
1717
|
+
429: {
|
|
1718
|
+
headers: {
|
|
1719
|
+
[name: string]: unknown;
|
|
1720
|
+
};
|
|
1721
|
+
content: {
|
|
1722
|
+
"application/json": {
|
|
1723
|
+
success: boolean;
|
|
1379
1724
|
message: string;
|
|
1380
1725
|
code?: string;
|
|
1381
1726
|
errors?: {
|
|
1382
1727
|
path: string;
|
|
1383
1728
|
message: string;
|
|
1384
1729
|
}[];
|
|
1730
|
+
retryAfterSeconds?: number;
|
|
1385
1731
|
};
|
|
1386
1732
|
};
|
|
1387
1733
|
};
|
|
@@ -1495,13 +1841,62 @@ export declare class FacturacionClient {
|
|
|
1495
1841
|
};
|
|
1496
1842
|
content: {
|
|
1497
1843
|
"application/json": {
|
|
1498
|
-
success:
|
|
1844
|
+
success: boolean;
|
|
1845
|
+
message: string;
|
|
1846
|
+
code?: string;
|
|
1847
|
+
errors?: {
|
|
1848
|
+
path: string;
|
|
1849
|
+
message: string;
|
|
1850
|
+
}[];
|
|
1851
|
+
};
|
|
1852
|
+
};
|
|
1853
|
+
};
|
|
1854
|
+
401: {
|
|
1855
|
+
headers: {
|
|
1856
|
+
[name: string]: unknown;
|
|
1857
|
+
};
|
|
1858
|
+
content: {
|
|
1859
|
+
"application/json": {
|
|
1860
|
+
success: boolean;
|
|
1861
|
+
message: string;
|
|
1862
|
+
code?: string;
|
|
1863
|
+
errors?: {
|
|
1864
|
+
path: string;
|
|
1865
|
+
message: string;
|
|
1866
|
+
}[];
|
|
1867
|
+
};
|
|
1868
|
+
};
|
|
1869
|
+
};
|
|
1870
|
+
403: {
|
|
1871
|
+
headers: {
|
|
1872
|
+
[name: string]: unknown;
|
|
1873
|
+
};
|
|
1874
|
+
content: {
|
|
1875
|
+
"application/json": {
|
|
1876
|
+
success: boolean;
|
|
1877
|
+
message: string;
|
|
1878
|
+
code?: string;
|
|
1879
|
+
errors?: {
|
|
1880
|
+
path: string;
|
|
1881
|
+
message: string;
|
|
1882
|
+
}[];
|
|
1883
|
+
};
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1886
|
+
429: {
|
|
1887
|
+
headers: {
|
|
1888
|
+
[name: string]: unknown;
|
|
1889
|
+
};
|
|
1890
|
+
content: {
|
|
1891
|
+
"application/json": {
|
|
1892
|
+
success: boolean;
|
|
1499
1893
|
message: string;
|
|
1500
1894
|
code?: string;
|
|
1501
1895
|
errors?: {
|
|
1502
1896
|
path: string;
|
|
1503
1897
|
message: string;
|
|
1504
1898
|
}[];
|
|
1899
|
+
retryAfterSeconds?: number;
|
|
1505
1900
|
};
|
|
1506
1901
|
};
|
|
1507
1902
|
};
|
|
@@ -1559,13 +1954,62 @@ export declare class FacturacionClient {
|
|
|
1559
1954
|
};
|
|
1560
1955
|
content: {
|
|
1561
1956
|
"application/json": {
|
|
1562
|
-
success:
|
|
1957
|
+
success: boolean;
|
|
1958
|
+
message: string;
|
|
1959
|
+
code?: string;
|
|
1960
|
+
errors?: {
|
|
1961
|
+
path: string;
|
|
1962
|
+
message: string;
|
|
1963
|
+
}[];
|
|
1964
|
+
};
|
|
1965
|
+
};
|
|
1966
|
+
};
|
|
1967
|
+
401: {
|
|
1968
|
+
headers: {
|
|
1969
|
+
[name: string]: unknown;
|
|
1970
|
+
};
|
|
1971
|
+
content: {
|
|
1972
|
+
"application/json": {
|
|
1973
|
+
success: boolean;
|
|
1974
|
+
message: string;
|
|
1975
|
+
code?: string;
|
|
1976
|
+
errors?: {
|
|
1977
|
+
path: string;
|
|
1978
|
+
message: string;
|
|
1979
|
+
}[];
|
|
1980
|
+
};
|
|
1981
|
+
};
|
|
1982
|
+
};
|
|
1983
|
+
403: {
|
|
1984
|
+
headers: {
|
|
1985
|
+
[name: string]: unknown;
|
|
1986
|
+
};
|
|
1987
|
+
content: {
|
|
1988
|
+
"application/json": {
|
|
1989
|
+
success: boolean;
|
|
1990
|
+
message: string;
|
|
1991
|
+
code?: string;
|
|
1992
|
+
errors?: {
|
|
1993
|
+
path: string;
|
|
1994
|
+
message: string;
|
|
1995
|
+
}[];
|
|
1996
|
+
};
|
|
1997
|
+
};
|
|
1998
|
+
};
|
|
1999
|
+
429: {
|
|
2000
|
+
headers: {
|
|
2001
|
+
[name: string]: unknown;
|
|
2002
|
+
};
|
|
2003
|
+
content: {
|
|
2004
|
+
"application/json": {
|
|
2005
|
+
success: boolean;
|
|
1563
2006
|
message: string;
|
|
1564
2007
|
code?: string;
|
|
1565
2008
|
errors?: {
|
|
1566
2009
|
path: string;
|
|
1567
2010
|
message: string;
|
|
1568
2011
|
}[];
|
|
2012
|
+
retryAfterSeconds?: number;
|
|
1569
2013
|
};
|
|
1570
2014
|
};
|
|
1571
2015
|
};
|
|
@@ -1638,13 +2082,62 @@ export declare class FacturacionClient {
|
|
|
1638
2082
|
};
|
|
1639
2083
|
content: {
|
|
1640
2084
|
"application/json": {
|
|
1641
|
-
success:
|
|
2085
|
+
success: boolean;
|
|
2086
|
+
message: string;
|
|
2087
|
+
code?: string;
|
|
2088
|
+
errors?: {
|
|
2089
|
+
path: string;
|
|
2090
|
+
message: string;
|
|
2091
|
+
}[];
|
|
2092
|
+
};
|
|
2093
|
+
};
|
|
2094
|
+
};
|
|
2095
|
+
401: {
|
|
2096
|
+
headers: {
|
|
2097
|
+
[name: string]: unknown;
|
|
2098
|
+
};
|
|
2099
|
+
content: {
|
|
2100
|
+
"application/json": {
|
|
2101
|
+
success: boolean;
|
|
2102
|
+
message: string;
|
|
2103
|
+
code?: string;
|
|
2104
|
+
errors?: {
|
|
2105
|
+
path: string;
|
|
2106
|
+
message: string;
|
|
2107
|
+
}[];
|
|
2108
|
+
};
|
|
2109
|
+
};
|
|
2110
|
+
};
|
|
2111
|
+
403: {
|
|
2112
|
+
headers: {
|
|
2113
|
+
[name: string]: unknown;
|
|
2114
|
+
};
|
|
2115
|
+
content: {
|
|
2116
|
+
"application/json": {
|
|
2117
|
+
success: boolean;
|
|
2118
|
+
message: string;
|
|
2119
|
+
code?: string;
|
|
2120
|
+
errors?: {
|
|
2121
|
+
path: string;
|
|
2122
|
+
message: string;
|
|
2123
|
+
}[];
|
|
2124
|
+
};
|
|
2125
|
+
};
|
|
2126
|
+
};
|
|
2127
|
+
429: {
|
|
2128
|
+
headers: {
|
|
2129
|
+
[name: string]: unknown;
|
|
2130
|
+
};
|
|
2131
|
+
content: {
|
|
2132
|
+
"application/json": {
|
|
2133
|
+
success: boolean;
|
|
1642
2134
|
message: string;
|
|
1643
2135
|
code?: string;
|
|
1644
2136
|
errors?: {
|
|
1645
2137
|
path: string;
|
|
1646
2138
|
message: string;
|
|
1647
2139
|
}[];
|
|
2140
|
+
retryAfterSeconds?: number;
|
|
1648
2141
|
};
|
|
1649
2142
|
};
|
|
1650
2143
|
};
|
|
@@ -1722,7 +2215,7 @@ export declare class FacturacionClient {
|
|
|
1722
2215
|
};
|
|
1723
2216
|
content: {
|
|
1724
2217
|
"application/json": {
|
|
1725
|
-
success:
|
|
2218
|
+
success: boolean;
|
|
1726
2219
|
message: string;
|
|
1727
2220
|
code?: string;
|
|
1728
2221
|
errors?: {
|
|
@@ -1732,14 +2225,63 @@ export declare class FacturacionClient {
|
|
|
1732
2225
|
};
|
|
1733
2226
|
};
|
|
1734
2227
|
};
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
2228
|
+
401: {
|
|
2229
|
+
headers: {
|
|
2230
|
+
[name: string]: unknown;
|
|
2231
|
+
};
|
|
2232
|
+
content: {
|
|
2233
|
+
"application/json": {
|
|
2234
|
+
success: boolean;
|
|
2235
|
+
message: string;
|
|
2236
|
+
code?: string;
|
|
2237
|
+
errors?: {
|
|
2238
|
+
path: string;
|
|
2239
|
+
message: string;
|
|
2240
|
+
}[];
|
|
2241
|
+
};
|
|
2242
|
+
};
|
|
2243
|
+
};
|
|
2244
|
+
403: {
|
|
2245
|
+
headers: {
|
|
2246
|
+
[name: string]: unknown;
|
|
2247
|
+
};
|
|
2248
|
+
content: {
|
|
2249
|
+
"application/json": {
|
|
2250
|
+
success: boolean;
|
|
2251
|
+
message: string;
|
|
2252
|
+
code?: string;
|
|
2253
|
+
errors?: {
|
|
2254
|
+
path: string;
|
|
2255
|
+
message: string;
|
|
2256
|
+
}[];
|
|
2257
|
+
};
|
|
2258
|
+
};
|
|
2259
|
+
};
|
|
2260
|
+
429: {
|
|
2261
|
+
headers: {
|
|
2262
|
+
[name: string]: unknown;
|
|
2263
|
+
};
|
|
2264
|
+
content: {
|
|
2265
|
+
"application/json": {
|
|
2266
|
+
success: boolean;
|
|
2267
|
+
message: string;
|
|
2268
|
+
code?: string;
|
|
2269
|
+
errors?: {
|
|
2270
|
+
path: string;
|
|
2271
|
+
message: string;
|
|
2272
|
+
}[];
|
|
2273
|
+
retryAfterSeconds?: number;
|
|
2274
|
+
};
|
|
2275
|
+
};
|
|
2276
|
+
};
|
|
2277
|
+
};
|
|
2278
|
+
}, {
|
|
2279
|
+
body: {
|
|
2280
|
+
empresaRuc: string;
|
|
2281
|
+
correlativo: string;
|
|
2282
|
+
fechaEmision: string;
|
|
2283
|
+
fechaReferencia: string;
|
|
2284
|
+
items: {
|
|
1743
2285
|
tipoDoc: string;
|
|
1744
2286
|
serie: string;
|
|
1745
2287
|
correlativo: string;
|
|
@@ -1797,6 +2339,55 @@ export declare class FacturacionClient {
|
|
|
1797
2339
|
};
|
|
1798
2340
|
};
|
|
1799
2341
|
};
|
|
2342
|
+
401: {
|
|
2343
|
+
headers: {
|
|
2344
|
+
[name: string]: unknown;
|
|
2345
|
+
};
|
|
2346
|
+
content: {
|
|
2347
|
+
"application/json": {
|
|
2348
|
+
success: boolean;
|
|
2349
|
+
message: string;
|
|
2350
|
+
code?: string;
|
|
2351
|
+
errors?: {
|
|
2352
|
+
path: string;
|
|
2353
|
+
message: string;
|
|
2354
|
+
}[];
|
|
2355
|
+
};
|
|
2356
|
+
};
|
|
2357
|
+
};
|
|
2358
|
+
403: {
|
|
2359
|
+
headers: {
|
|
2360
|
+
[name: string]: unknown;
|
|
2361
|
+
};
|
|
2362
|
+
content: {
|
|
2363
|
+
"application/json": {
|
|
2364
|
+
success: boolean;
|
|
2365
|
+
message: string;
|
|
2366
|
+
code?: string;
|
|
2367
|
+
errors?: {
|
|
2368
|
+
path: string;
|
|
2369
|
+
message: string;
|
|
2370
|
+
}[];
|
|
2371
|
+
};
|
|
2372
|
+
};
|
|
2373
|
+
};
|
|
2374
|
+
429: {
|
|
2375
|
+
headers: {
|
|
2376
|
+
[name: string]: unknown;
|
|
2377
|
+
};
|
|
2378
|
+
content: {
|
|
2379
|
+
"application/json": {
|
|
2380
|
+
success: boolean;
|
|
2381
|
+
message: string;
|
|
2382
|
+
code?: string;
|
|
2383
|
+
errors?: {
|
|
2384
|
+
path: string;
|
|
2385
|
+
message: string;
|
|
2386
|
+
}[];
|
|
2387
|
+
retryAfterSeconds?: number;
|
|
2388
|
+
};
|
|
2389
|
+
};
|
|
2390
|
+
};
|
|
1800
2391
|
};
|
|
1801
2392
|
}, {
|
|
1802
2393
|
params: {
|
|
@@ -1867,6 +2458,55 @@ export declare class FacturacionClient {
|
|
|
1867
2458
|
};
|
|
1868
2459
|
};
|
|
1869
2460
|
};
|
|
2461
|
+
401: {
|
|
2462
|
+
headers: {
|
|
2463
|
+
[name: string]: unknown;
|
|
2464
|
+
};
|
|
2465
|
+
content: {
|
|
2466
|
+
"application/json": {
|
|
2467
|
+
success: boolean;
|
|
2468
|
+
message: string;
|
|
2469
|
+
code?: string;
|
|
2470
|
+
errors?: {
|
|
2471
|
+
path: string;
|
|
2472
|
+
message: string;
|
|
2473
|
+
}[];
|
|
2474
|
+
};
|
|
2475
|
+
};
|
|
2476
|
+
};
|
|
2477
|
+
403: {
|
|
2478
|
+
headers: {
|
|
2479
|
+
[name: string]: unknown;
|
|
2480
|
+
};
|
|
2481
|
+
content: {
|
|
2482
|
+
"application/json": {
|
|
2483
|
+
success: boolean;
|
|
2484
|
+
message: string;
|
|
2485
|
+
code?: string;
|
|
2486
|
+
errors?: {
|
|
2487
|
+
path: string;
|
|
2488
|
+
message: string;
|
|
2489
|
+
}[];
|
|
2490
|
+
};
|
|
2491
|
+
};
|
|
2492
|
+
};
|
|
2493
|
+
429: {
|
|
2494
|
+
headers: {
|
|
2495
|
+
[name: string]: unknown;
|
|
2496
|
+
};
|
|
2497
|
+
content: {
|
|
2498
|
+
"application/json": {
|
|
2499
|
+
success: boolean;
|
|
2500
|
+
message: string;
|
|
2501
|
+
code?: string;
|
|
2502
|
+
errors?: {
|
|
2503
|
+
path: string;
|
|
2504
|
+
message: string;
|
|
2505
|
+
}[];
|
|
2506
|
+
retryAfterSeconds?: number;
|
|
2507
|
+
};
|
|
2508
|
+
};
|
|
2509
|
+
};
|
|
1870
2510
|
};
|
|
1871
2511
|
}, {
|
|
1872
2512
|
params: {
|
|
@@ -1896,33 +2536,23 @@ export declare class FacturacionClient {
|
|
|
1896
2536
|
};
|
|
1897
2537
|
requestBody?: never;
|
|
1898
2538
|
responses: {
|
|
1899
|
-
|
|
2539
|
+
401: {
|
|
1900
2540
|
headers: {
|
|
1901
2541
|
[name: string]: unknown;
|
|
1902
2542
|
};
|
|
1903
|
-
content
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
retryDocument(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
1915
|
-
parameters: {
|
|
1916
|
-
query?: never;
|
|
1917
|
-
header?: never;
|
|
1918
|
-
path: {
|
|
1919
|
-
id: string;
|
|
2543
|
+
content: {
|
|
2544
|
+
"application/json": {
|
|
2545
|
+
success: boolean;
|
|
2546
|
+
message: string;
|
|
2547
|
+
code?: string;
|
|
2548
|
+
errors?: {
|
|
2549
|
+
path: string;
|
|
2550
|
+
message: string;
|
|
2551
|
+
}[];
|
|
2552
|
+
};
|
|
2553
|
+
};
|
|
1920
2554
|
};
|
|
1921
|
-
|
|
1922
|
-
};
|
|
1923
|
-
requestBody?: never;
|
|
1924
|
-
responses: {
|
|
1925
|
-
202: {
|
|
2555
|
+
403: {
|
|
1926
2556
|
headers: {
|
|
1927
2557
|
[name: string]: unknown;
|
|
1928
2558
|
};
|
|
@@ -1930,23 +2560,28 @@ export declare class FacturacionClient {
|
|
|
1930
2560
|
"application/json": {
|
|
1931
2561
|
success: boolean;
|
|
1932
2562
|
message: string;
|
|
1933
|
-
|
|
2563
|
+
code?: string;
|
|
2564
|
+
errors?: {
|
|
2565
|
+
path: string;
|
|
2566
|
+
message: string;
|
|
2567
|
+
}[];
|
|
1934
2568
|
};
|
|
1935
2569
|
};
|
|
1936
2570
|
};
|
|
1937
|
-
|
|
2571
|
+
429: {
|
|
1938
2572
|
headers: {
|
|
1939
2573
|
[name: string]: unknown;
|
|
1940
2574
|
};
|
|
1941
2575
|
content: {
|
|
1942
2576
|
"application/json": {
|
|
1943
|
-
success:
|
|
2577
|
+
success: boolean;
|
|
1944
2578
|
message: string;
|
|
1945
2579
|
code?: string;
|
|
1946
2580
|
errors?: {
|
|
1947
2581
|
path: string;
|
|
1948
2582
|
message: string;
|
|
1949
2583
|
}[];
|
|
2584
|
+
retryAfterSeconds?: number;
|
|
1950
2585
|
};
|
|
1951
2586
|
};
|
|
1952
2587
|
};
|
|
@@ -1958,40 +2593,37 @@ export declare class FacturacionClient {
|
|
|
1958
2593
|
};
|
|
1959
2594
|
};
|
|
1960
2595
|
}, `${string}/${string}`>>;
|
|
1961
|
-
/**
|
|
1962
|
-
|
|
2596
|
+
/** Re-encola un documento fallido (COLA_FALLIDA). */
|
|
2597
|
+
retryDocument(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
1963
2598
|
parameters: {
|
|
1964
|
-
query
|
|
1965
|
-
companyRuc: string;
|
|
1966
|
-
tipoDoc: string;
|
|
1967
|
-
serie: string;
|
|
1968
|
-
};
|
|
2599
|
+
query?: never;
|
|
1969
2600
|
header?: never;
|
|
1970
|
-
path
|
|
2601
|
+
path: {
|
|
2602
|
+
id: string;
|
|
2603
|
+
};
|
|
1971
2604
|
cookie?: never;
|
|
1972
2605
|
};
|
|
1973
2606
|
requestBody?: never;
|
|
1974
2607
|
responses: {
|
|
1975
|
-
|
|
2608
|
+
202: {
|
|
1976
2609
|
headers: {
|
|
1977
2610
|
[name: string]: unknown;
|
|
1978
2611
|
};
|
|
1979
2612
|
content: {
|
|
1980
2613
|
"application/json": {
|
|
1981
|
-
success:
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
};
|
|
2614
|
+
success: boolean;
|
|
2615
|
+
message: string;
|
|
2616
|
+
jobId?: string;
|
|
1985
2617
|
};
|
|
1986
2618
|
};
|
|
1987
2619
|
};
|
|
1988
|
-
|
|
2620
|
+
400: {
|
|
1989
2621
|
headers: {
|
|
1990
2622
|
[name: string]: unknown;
|
|
1991
2623
|
};
|
|
1992
2624
|
content: {
|
|
1993
2625
|
"application/json": {
|
|
1994
|
-
success:
|
|
2626
|
+
success: boolean;
|
|
1995
2627
|
message: string;
|
|
1996
2628
|
code?: string;
|
|
1997
2629
|
errors?: {
|
|
@@ -2001,62 +2633,29 @@ export declare class FacturacionClient {
|
|
|
2001
2633
|
};
|
|
2002
2634
|
};
|
|
2003
2635
|
};
|
|
2004
|
-
|
|
2005
|
-
}, {
|
|
2006
|
-
params: {
|
|
2007
|
-
query: {
|
|
2008
|
-
companyRuc: string;
|
|
2009
|
-
tipoDoc: string;
|
|
2010
|
-
serie: string;
|
|
2011
|
-
};
|
|
2012
|
-
};
|
|
2013
|
-
}, `${string}/${string}`>>;
|
|
2014
|
-
/**
|
|
2015
|
-
* Consulta el CDR de un comprobante directamente en SUNAT, por referencia
|
|
2016
|
-
* (ruc/tipo/serie/número). Sirve cuando el documento no está en la API o su
|
|
2017
|
-
* estado local quedó desincronizado.
|
|
2018
|
-
*/
|
|
2019
|
-
consultarCdr(body: ConsultarCdrInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
2020
|
-
parameters: {
|
|
2021
|
-
query?: never;
|
|
2022
|
-
header?: never;
|
|
2023
|
-
path?: never;
|
|
2024
|
-
cookie?: never;
|
|
2025
|
-
};
|
|
2026
|
-
requestBody: {
|
|
2027
|
-
content: {
|
|
2028
|
-
"application/json": {
|
|
2029
|
-
ruc: string;
|
|
2030
|
-
tipoDoc: "01" | "03" | "07" | "08";
|
|
2031
|
-
serie: string;
|
|
2032
|
-
numero: string;
|
|
2033
|
-
};
|
|
2034
|
-
};
|
|
2035
|
-
};
|
|
2036
|
-
responses: {
|
|
2037
|
-
200: {
|
|
2636
|
+
401: {
|
|
2038
2637
|
headers: {
|
|
2039
2638
|
[name: string]: unknown;
|
|
2040
2639
|
};
|
|
2041
2640
|
content: {
|
|
2042
2641
|
"application/json": {
|
|
2043
2642
|
success: boolean;
|
|
2044
|
-
available: boolean;
|
|
2045
2643
|
message: string;
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2644
|
+
code?: string;
|
|
2645
|
+
errors?: {
|
|
2646
|
+
path: string;
|
|
2647
|
+
message: string;
|
|
2648
|
+
}[];
|
|
2050
2649
|
};
|
|
2051
2650
|
};
|
|
2052
2651
|
};
|
|
2053
|
-
|
|
2652
|
+
403: {
|
|
2054
2653
|
headers: {
|
|
2055
2654
|
[name: string]: unknown;
|
|
2056
2655
|
};
|
|
2057
2656
|
content: {
|
|
2058
2657
|
"application/json": {
|
|
2059
|
-
success:
|
|
2658
|
+
success: boolean;
|
|
2060
2659
|
message: string;
|
|
2061
2660
|
code?: string;
|
|
2062
2661
|
errors?: {
|
|
@@ -2066,47 +2665,145 @@ export declare class FacturacionClient {
|
|
|
2066
2665
|
};
|
|
2067
2666
|
};
|
|
2068
2667
|
};
|
|
2069
|
-
|
|
2668
|
+
429: {
|
|
2070
2669
|
headers: {
|
|
2071
2670
|
[name: string]: unknown;
|
|
2072
2671
|
};
|
|
2073
2672
|
content: {
|
|
2074
2673
|
"application/json": {
|
|
2075
|
-
success:
|
|
2674
|
+
success: boolean;
|
|
2076
2675
|
message: string;
|
|
2077
2676
|
code?: string;
|
|
2078
2677
|
errors?: {
|
|
2079
2678
|
path: string;
|
|
2080
2679
|
message: string;
|
|
2081
2680
|
}[];
|
|
2681
|
+
retryAfterSeconds?: number;
|
|
2082
2682
|
};
|
|
2083
2683
|
};
|
|
2084
2684
|
};
|
|
2085
2685
|
};
|
|
2086
2686
|
}, {
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
numero: string;
|
|
2687
|
+
params: {
|
|
2688
|
+
path: {
|
|
2689
|
+
id: string;
|
|
2690
|
+
};
|
|
2092
2691
|
};
|
|
2093
2692
|
}, `${string}/${string}`>>;
|
|
2094
|
-
/**
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2693
|
+
/** Siguiente correlativo disponible para una serie (por ambiente). */
|
|
2694
|
+
getNextCorrelativo(query: paths["/api/v1/documents/next-correlativo"]["get"]["parameters"]["query"]): Promise<import("openapi-fetch").FetchResponse<{
|
|
2695
|
+
parameters: {
|
|
2696
|
+
query: {
|
|
2697
|
+
companyRuc: string;
|
|
2698
|
+
tipoDoc: string;
|
|
2699
|
+
serie: string;
|
|
2700
|
+
};
|
|
2701
|
+
header?: never;
|
|
2702
|
+
path?: never;
|
|
2703
|
+
cookie?: never;
|
|
2704
|
+
};
|
|
2705
|
+
requestBody?: never;
|
|
2706
|
+
responses: {
|
|
2707
|
+
200: {
|
|
2708
|
+
headers: {
|
|
2709
|
+
[name: string]: unknown;
|
|
2710
|
+
};
|
|
2711
|
+
content: {
|
|
2712
|
+
"application/json": {
|
|
2713
|
+
success: boolean;
|
|
2714
|
+
data: {
|
|
2715
|
+
next: string;
|
|
2716
|
+
};
|
|
2717
|
+
};
|
|
2718
|
+
};
|
|
2719
|
+
};
|
|
2720
|
+
401: {
|
|
2721
|
+
headers: {
|
|
2722
|
+
[name: string]: unknown;
|
|
2723
|
+
};
|
|
2724
|
+
content: {
|
|
2725
|
+
"application/json": {
|
|
2726
|
+
success: boolean;
|
|
2727
|
+
message: string;
|
|
2728
|
+
code?: string;
|
|
2729
|
+
errors?: {
|
|
2730
|
+
path: string;
|
|
2731
|
+
message: string;
|
|
2732
|
+
}[];
|
|
2733
|
+
};
|
|
2734
|
+
};
|
|
2735
|
+
};
|
|
2736
|
+
403: {
|
|
2737
|
+
headers: {
|
|
2738
|
+
[name: string]: unknown;
|
|
2739
|
+
};
|
|
2740
|
+
content: {
|
|
2741
|
+
"application/json": {
|
|
2742
|
+
success: boolean;
|
|
2743
|
+
message: string;
|
|
2744
|
+
code?: string;
|
|
2745
|
+
errors?: {
|
|
2746
|
+
path: string;
|
|
2747
|
+
message: string;
|
|
2748
|
+
}[];
|
|
2749
|
+
};
|
|
2750
|
+
};
|
|
2751
|
+
};
|
|
2752
|
+
404: {
|
|
2753
|
+
headers: {
|
|
2754
|
+
[name: string]: unknown;
|
|
2755
|
+
};
|
|
2756
|
+
content: {
|
|
2757
|
+
"application/json": {
|
|
2758
|
+
success: boolean;
|
|
2759
|
+
message: string;
|
|
2760
|
+
code?: string;
|
|
2761
|
+
errors?: {
|
|
2762
|
+
path: string;
|
|
2763
|
+
message: string;
|
|
2764
|
+
}[];
|
|
2765
|
+
};
|
|
2766
|
+
};
|
|
2767
|
+
};
|
|
2768
|
+
429: {
|
|
2769
|
+
headers: {
|
|
2770
|
+
[name: string]: unknown;
|
|
2771
|
+
};
|
|
2772
|
+
content: {
|
|
2773
|
+
"application/json": {
|
|
2774
|
+
success: boolean;
|
|
2775
|
+
message: string;
|
|
2776
|
+
code?: string;
|
|
2777
|
+
errors?: {
|
|
2778
|
+
path: string;
|
|
2779
|
+
message: string;
|
|
2780
|
+
}[];
|
|
2781
|
+
retryAfterSeconds?: number;
|
|
2782
|
+
};
|
|
2783
|
+
};
|
|
2784
|
+
};
|
|
2785
|
+
};
|
|
2786
|
+
}, {
|
|
2787
|
+
params: {
|
|
2788
|
+
query: {
|
|
2789
|
+
companyRuc: string;
|
|
2790
|
+
tipoDoc: string;
|
|
2791
|
+
serie: string;
|
|
2792
|
+
};
|
|
2793
|
+
};
|
|
2794
|
+
}, `${string}/${string}`>>;
|
|
2795
|
+
/** XML firmado de una factura/boleta. */
|
|
2796
|
+
getInvoiceXml(id: string): Promise<ArrayBuffer>;
|
|
2797
|
+
/** CDR (constancia SUNAT) de una factura/boleta. */
|
|
2798
|
+
getInvoiceCdr(id: string): Promise<ArrayBuffer>;
|
|
2098
2799
|
/** PDF de una factura/boleta. */
|
|
2099
2800
|
getInvoicePdf(id: string): Promise<ArrayBuffer>;
|
|
2100
2801
|
/** XML firmado de una nota (07/08). */
|
|
2101
2802
|
getNoteXml(id: string): Promise<ArrayBuffer>;
|
|
2102
2803
|
/** PDF de una nota (07/08). */
|
|
2103
2804
|
getNotePdf(id: string): Promise<ArrayBuffer>;
|
|
2104
|
-
/** CDR (constancia SUNAT) de una nota (07/08). */
|
|
2105
|
-
getNoteCdr(id: string): Promise<ArrayBuffer>;
|
|
2106
2805
|
/** XML firmado de una guía de remisión (09/31). */
|
|
2107
2806
|
getDespatchXml(id: string): Promise<ArrayBuffer>;
|
|
2108
|
-
/** CDR (constancia SUNAT) de una guía de remisión (09/31). */
|
|
2109
|
-
getDespatchCdr(id: string): Promise<ArrayBuffer>;
|
|
2110
2807
|
/** PDF de una guía de remisión (09/31). `format`: a4 | ticket80 | ticket58. */
|
|
2111
2808
|
getDespatchPdf(id: string, format?: NonNullable<paths["/api/v1/despatch/{id}/pdf"]["get"]["parameters"]["query"]>["format"]): Promise<ArrayBuffer>;
|
|
2112
2809
|
/** Lista las empresas accesibles por la key. */
|
|
@@ -2119,211 +2816,274 @@ export declare class FacturacionClient {
|
|
|
2119
2816
|
};
|
|
2120
2817
|
requestBody?: never;
|
|
2121
2818
|
responses: {
|
|
2122
|
-
|
|
2819
|
+
401: {
|
|
2123
2820
|
headers: {
|
|
2124
2821
|
[name: string]: unknown;
|
|
2125
2822
|
};
|
|
2126
|
-
content
|
|
2823
|
+
content: {
|
|
2824
|
+
"application/json": {
|
|
2825
|
+
success: boolean;
|
|
2826
|
+
message: string;
|
|
2827
|
+
code?: string;
|
|
2828
|
+
errors?: {
|
|
2829
|
+
path: string;
|
|
2830
|
+
message: string;
|
|
2831
|
+
}[];
|
|
2832
|
+
};
|
|
2833
|
+
};
|
|
2834
|
+
};
|
|
2835
|
+
403: {
|
|
2836
|
+
headers: {
|
|
2837
|
+
[name: string]: unknown;
|
|
2838
|
+
};
|
|
2839
|
+
content: {
|
|
2840
|
+
"application/json": {
|
|
2841
|
+
success: boolean;
|
|
2842
|
+
message: string;
|
|
2843
|
+
code?: string;
|
|
2844
|
+
errors?: {
|
|
2845
|
+
path: string;
|
|
2846
|
+
message: string;
|
|
2847
|
+
}[];
|
|
2848
|
+
};
|
|
2849
|
+
};
|
|
2850
|
+
};
|
|
2851
|
+
429: {
|
|
2852
|
+
headers: {
|
|
2853
|
+
[name: string]: unknown;
|
|
2854
|
+
};
|
|
2855
|
+
content: {
|
|
2856
|
+
"application/json": {
|
|
2857
|
+
success: boolean;
|
|
2858
|
+
message: string;
|
|
2859
|
+
code?: string;
|
|
2860
|
+
errors?: {
|
|
2861
|
+
path: string;
|
|
2862
|
+
message: string;
|
|
2863
|
+
}[];
|
|
2864
|
+
retryAfterSeconds?: number;
|
|
2865
|
+
};
|
|
2866
|
+
};
|
|
2127
2867
|
};
|
|
2128
2868
|
};
|
|
2129
2869
|
}, {}, `${string}/${string}`>>;
|
|
2130
|
-
/**
|
|
2131
|
-
|
|
2132
|
-
*
|
|
2133
|
-
* Requiere una key de CUENTA: una atada a una empresa (`empresaRuc`) no crea
|
|
2134
|
-
* otras. El tope de RUC lo pone tu plan.
|
|
2135
|
-
*
|
|
2136
|
-
* Registrar no es acreditar: el RUC queda tuyo pero no puedes emitir hasta
|
|
2137
|
-
* subir su certificado digital, que se hace desde el portal.
|
|
2138
|
-
*/
|
|
2139
|
-
createCompany(body: CreateCompanyInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
2870
|
+
/** Detalle de una empresa por ID. */
|
|
2871
|
+
getCompany(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2140
2872
|
parameters: {
|
|
2141
2873
|
query?: never;
|
|
2142
2874
|
header?: never;
|
|
2143
|
-
path
|
|
2875
|
+
path: {
|
|
2876
|
+
id: string;
|
|
2877
|
+
};
|
|
2144
2878
|
cookie?: never;
|
|
2145
2879
|
};
|
|
2146
|
-
requestBody
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
solPassword?: string;
|
|
2163
|
-
tenantId?: string;
|
|
2164
|
-
greClientId?: string;
|
|
2165
|
-
greClientSecret?: string;
|
|
2166
|
-
sunatProduction?: boolean;
|
|
2167
|
-
cuentasBancarias?: {
|
|
2168
|
-
nombre: string;
|
|
2169
|
-
bancos?: string[];
|
|
2170
|
-
tipoLabel: string;
|
|
2171
|
-
titularLabel?: string;
|
|
2172
|
-
titular?: string;
|
|
2173
|
-
titularRuc?: string;
|
|
2174
|
-
numero: string;
|
|
2175
|
-
cci?: string;
|
|
2176
|
-
}[];
|
|
2177
|
-
terminosTitulo?: string | null;
|
|
2178
|
-
terminos?: string[];
|
|
2179
|
-
notaPagoTitulo?: string | null;
|
|
2180
|
-
notaPagoTexto?: string | null;
|
|
2880
|
+
requestBody?: never;
|
|
2881
|
+
responses: {
|
|
2882
|
+
401: {
|
|
2883
|
+
headers: {
|
|
2884
|
+
[name: string]: unknown;
|
|
2885
|
+
};
|
|
2886
|
+
content: {
|
|
2887
|
+
"application/json": {
|
|
2888
|
+
success: boolean;
|
|
2889
|
+
message: string;
|
|
2890
|
+
code?: string;
|
|
2891
|
+
errors?: {
|
|
2892
|
+
path: string;
|
|
2893
|
+
message: string;
|
|
2894
|
+
}[];
|
|
2895
|
+
};
|
|
2181
2896
|
};
|
|
2182
2897
|
};
|
|
2183
|
-
|
|
2184
|
-
responses: {
|
|
2185
|
-
200: {
|
|
2898
|
+
403: {
|
|
2186
2899
|
headers: {
|
|
2187
2900
|
[name: string]: unknown;
|
|
2188
2901
|
};
|
|
2189
|
-
content
|
|
2902
|
+
content: {
|
|
2903
|
+
"application/json": {
|
|
2904
|
+
success: boolean;
|
|
2905
|
+
message: string;
|
|
2906
|
+
code?: string;
|
|
2907
|
+
errors?: {
|
|
2908
|
+
path: string;
|
|
2909
|
+
message: string;
|
|
2910
|
+
}[];
|
|
2911
|
+
};
|
|
2912
|
+
};
|
|
2913
|
+
};
|
|
2914
|
+
429: {
|
|
2915
|
+
headers: {
|
|
2916
|
+
[name: string]: unknown;
|
|
2917
|
+
};
|
|
2918
|
+
content: {
|
|
2919
|
+
"application/json": {
|
|
2920
|
+
success: boolean;
|
|
2921
|
+
message: string;
|
|
2922
|
+
code?: string;
|
|
2923
|
+
errors?: {
|
|
2924
|
+
path: string;
|
|
2925
|
+
message: string;
|
|
2926
|
+
}[];
|
|
2927
|
+
retryAfterSeconds?: number;
|
|
2928
|
+
};
|
|
2929
|
+
};
|
|
2190
2930
|
};
|
|
2191
2931
|
};
|
|
2192
2932
|
}, {
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
ubigeo?: string;
|
|
2198
|
-
direccion?: string;
|
|
2199
|
-
departamento?: string;
|
|
2200
|
-
provincia?: string;
|
|
2201
|
-
distrito?: string;
|
|
2202
|
-
urbanizacion?: string;
|
|
2203
|
-
telefono?: string;
|
|
2204
|
-
email?: string;
|
|
2205
|
-
web?: string;
|
|
2206
|
-
solUser?: string;
|
|
2207
|
-
solPassword?: string;
|
|
2208
|
-
tenantId?: string;
|
|
2209
|
-
greClientId?: string;
|
|
2210
|
-
greClientSecret?: string;
|
|
2211
|
-
sunatProduction?: boolean;
|
|
2212
|
-
cuentasBancarias?: {
|
|
2213
|
-
nombre: string;
|
|
2214
|
-
bancos?: string[];
|
|
2215
|
-
tipoLabel: string;
|
|
2216
|
-
titularLabel?: string;
|
|
2217
|
-
titular?: string;
|
|
2218
|
-
titularRuc?: string;
|
|
2219
|
-
numero: string;
|
|
2220
|
-
cci?: string;
|
|
2221
|
-
}[];
|
|
2222
|
-
terminosTitulo?: string | null;
|
|
2223
|
-
terminos?: string[];
|
|
2224
|
-
notaPagoTitulo?: string | null;
|
|
2225
|
-
notaPagoTexto?: string | null;
|
|
2933
|
+
params: {
|
|
2934
|
+
path: {
|
|
2935
|
+
id: string;
|
|
2936
|
+
};
|
|
2226
2937
|
};
|
|
2227
2938
|
}, `${string}/${string}`>>;
|
|
2228
|
-
/**
|
|
2229
|
-
|
|
2939
|
+
/** Logo de la empresa (imagen). */
|
|
2940
|
+
getCompanyLogo(id: string): Promise<ArrayBuffer>;
|
|
2941
|
+
/** Crea una suscripción a webhooks. El secret se devuelve UNA sola vez. */
|
|
2942
|
+
createWebhook(body: CreateWebhookInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
2230
2943
|
parameters: {
|
|
2231
2944
|
query?: never;
|
|
2232
2945
|
header?: never;
|
|
2233
|
-
path
|
|
2234
|
-
id: string;
|
|
2235
|
-
};
|
|
2946
|
+
path?: never;
|
|
2236
2947
|
cookie?: never;
|
|
2237
2948
|
};
|
|
2238
2949
|
requestBody: {
|
|
2239
2950
|
content: {
|
|
2240
2951
|
"application/json": {
|
|
2241
|
-
|
|
2242
|
-
razonSocial?: string;
|
|
2243
|
-
nombreComercial?: string;
|
|
2244
|
-
ubigeo?: string;
|
|
2245
|
-
direccion?: string;
|
|
2246
|
-
departamento?: string;
|
|
2247
|
-
provincia?: string;
|
|
2248
|
-
distrito?: string;
|
|
2249
|
-
urbanizacion?: string;
|
|
2250
|
-
telefono?: string;
|
|
2251
|
-
email?: string;
|
|
2252
|
-
web?: string;
|
|
2253
|
-
solUser?: string;
|
|
2254
|
-
solPassword?: string;
|
|
2952
|
+
empresaRuc?: string;
|
|
2255
2953
|
tenantId?: string;
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
nombre: string;
|
|
2261
|
-
bancos?: string[];
|
|
2262
|
-
tipoLabel: string;
|
|
2263
|
-
titularLabel?: string;
|
|
2264
|
-
titular?: string;
|
|
2265
|
-
titularRuc?: string;
|
|
2266
|
-
numero: string;
|
|
2267
|
-
cci?: string;
|
|
2268
|
-
}[];
|
|
2269
|
-
terminosTitulo?: string | null;
|
|
2270
|
-
terminos?: string[];
|
|
2271
|
-
notaPagoTitulo?: string | null;
|
|
2272
|
-
notaPagoTexto?: string | null;
|
|
2954
|
+
url: string;
|
|
2955
|
+
events: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
2956
|
+
description?: string;
|
|
2957
|
+
secret?: string;
|
|
2273
2958
|
};
|
|
2274
2959
|
};
|
|
2275
2960
|
};
|
|
2276
2961
|
responses: {
|
|
2277
|
-
|
|
2962
|
+
401: {
|
|
2278
2963
|
headers: {
|
|
2279
2964
|
[name: string]: unknown;
|
|
2280
2965
|
};
|
|
2281
|
-
content
|
|
2966
|
+
content: {
|
|
2967
|
+
"application/json": {
|
|
2968
|
+
success: boolean;
|
|
2969
|
+
message: string;
|
|
2970
|
+
code?: string;
|
|
2971
|
+
errors?: {
|
|
2972
|
+
path: string;
|
|
2973
|
+
message: string;
|
|
2974
|
+
}[];
|
|
2975
|
+
};
|
|
2976
|
+
};
|
|
2282
2977
|
};
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2978
|
+
403: {
|
|
2979
|
+
headers: {
|
|
2980
|
+
[name: string]: unknown;
|
|
2981
|
+
};
|
|
2982
|
+
content: {
|
|
2983
|
+
"application/json": {
|
|
2984
|
+
success: boolean;
|
|
2985
|
+
message: string;
|
|
2986
|
+
code?: string;
|
|
2987
|
+
errors?: {
|
|
2988
|
+
path: string;
|
|
2989
|
+
message: string;
|
|
2990
|
+
}[];
|
|
2991
|
+
};
|
|
2992
|
+
};
|
|
2993
|
+
};
|
|
2994
|
+
429: {
|
|
2995
|
+
headers: {
|
|
2996
|
+
[name: string]: unknown;
|
|
2997
|
+
};
|
|
2998
|
+
content: {
|
|
2999
|
+
"application/json": {
|
|
3000
|
+
success: boolean;
|
|
3001
|
+
message: string;
|
|
3002
|
+
code?: string;
|
|
3003
|
+
errors?: {
|
|
3004
|
+
path: string;
|
|
3005
|
+
message: string;
|
|
3006
|
+
}[];
|
|
3007
|
+
retryAfterSeconds?: number;
|
|
3008
|
+
};
|
|
3009
|
+
};
|
|
2288
3010
|
};
|
|
2289
3011
|
};
|
|
3012
|
+
}, {
|
|
2290
3013
|
body: {
|
|
2291
|
-
|
|
2292
|
-
razonSocial?: string;
|
|
2293
|
-
nombreComercial?: string;
|
|
2294
|
-
ubigeo?: string;
|
|
2295
|
-
direccion?: string;
|
|
2296
|
-
departamento?: string;
|
|
2297
|
-
provincia?: string;
|
|
2298
|
-
distrito?: string;
|
|
2299
|
-
urbanizacion?: string;
|
|
2300
|
-
telefono?: string;
|
|
2301
|
-
email?: string;
|
|
2302
|
-
web?: string;
|
|
2303
|
-
solUser?: string;
|
|
2304
|
-
solPassword?: string;
|
|
3014
|
+
empresaRuc?: string;
|
|
2305
3015
|
tenantId?: string;
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
nombre: string;
|
|
2311
|
-
bancos?: string[];
|
|
2312
|
-
tipoLabel: string;
|
|
2313
|
-
titularLabel?: string;
|
|
2314
|
-
titular?: string;
|
|
2315
|
-
titularRuc?: string;
|
|
2316
|
-
numero: string;
|
|
2317
|
-
cci?: string;
|
|
2318
|
-
}[];
|
|
2319
|
-
terminosTitulo?: string | null;
|
|
2320
|
-
terminos?: string[];
|
|
2321
|
-
notaPagoTitulo?: string | null;
|
|
2322
|
-
notaPagoTexto?: string | null;
|
|
3016
|
+
url: string;
|
|
3017
|
+
events: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
3018
|
+
description?: string;
|
|
3019
|
+
secret?: string;
|
|
2323
3020
|
};
|
|
2324
3021
|
}, `${string}/${string}`>>;
|
|
2325
|
-
/**
|
|
2326
|
-
|
|
3022
|
+
/** Lista las suscripciones de webhooks. */
|
|
3023
|
+
listWebhooks(): Promise<import("openapi-fetch").FetchResponse<{
|
|
3024
|
+
parameters: {
|
|
3025
|
+
query?: {
|
|
3026
|
+
ruc?: string;
|
|
3027
|
+
};
|
|
3028
|
+
header?: never;
|
|
3029
|
+
path?: never;
|
|
3030
|
+
cookie?: never;
|
|
3031
|
+
};
|
|
3032
|
+
requestBody?: never;
|
|
3033
|
+
responses: {
|
|
3034
|
+
401: {
|
|
3035
|
+
headers: {
|
|
3036
|
+
[name: string]: unknown;
|
|
3037
|
+
};
|
|
3038
|
+
content: {
|
|
3039
|
+
"application/json": {
|
|
3040
|
+
success: boolean;
|
|
3041
|
+
message: string;
|
|
3042
|
+
code?: string;
|
|
3043
|
+
errors?: {
|
|
3044
|
+
path: string;
|
|
3045
|
+
message: string;
|
|
3046
|
+
}[];
|
|
3047
|
+
};
|
|
3048
|
+
};
|
|
3049
|
+
};
|
|
3050
|
+
403: {
|
|
3051
|
+
headers: {
|
|
3052
|
+
[name: string]: unknown;
|
|
3053
|
+
};
|
|
3054
|
+
content: {
|
|
3055
|
+
"application/json": {
|
|
3056
|
+
success: boolean;
|
|
3057
|
+
message: string;
|
|
3058
|
+
code?: string;
|
|
3059
|
+
errors?: {
|
|
3060
|
+
path: string;
|
|
3061
|
+
message: string;
|
|
3062
|
+
}[];
|
|
3063
|
+
};
|
|
3064
|
+
};
|
|
3065
|
+
};
|
|
3066
|
+
429: {
|
|
3067
|
+
headers: {
|
|
3068
|
+
[name: string]: unknown;
|
|
3069
|
+
};
|
|
3070
|
+
content: {
|
|
3071
|
+
"application/json": {
|
|
3072
|
+
success: boolean;
|
|
3073
|
+
message: string;
|
|
3074
|
+
code?: string;
|
|
3075
|
+
errors?: {
|
|
3076
|
+
path: string;
|
|
3077
|
+
message: string;
|
|
3078
|
+
}[];
|
|
3079
|
+
retryAfterSeconds?: number;
|
|
3080
|
+
};
|
|
3081
|
+
};
|
|
3082
|
+
};
|
|
3083
|
+
};
|
|
3084
|
+
}, {}, `${string}/${string}`>>;
|
|
3085
|
+
/** Detalle de una suscripción de webhook. */
|
|
3086
|
+
getWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2327
3087
|
parameters: {
|
|
2328
3088
|
query?: never;
|
|
2329
3089
|
header?: never;
|
|
@@ -2334,39 +3094,54 @@ export declare class FacturacionClient {
|
|
|
2334
3094
|
};
|
|
2335
3095
|
requestBody?: never;
|
|
2336
3096
|
responses: {
|
|
2337
|
-
|
|
3097
|
+
401: {
|
|
3098
|
+
headers: {
|
|
3099
|
+
[name: string]: unknown;
|
|
3100
|
+
};
|
|
3101
|
+
content: {
|
|
3102
|
+
"application/json": {
|
|
3103
|
+
success: boolean;
|
|
3104
|
+
message: string;
|
|
3105
|
+
code?: string;
|
|
3106
|
+
errors?: {
|
|
3107
|
+
path: string;
|
|
3108
|
+
message: string;
|
|
3109
|
+
}[];
|
|
3110
|
+
};
|
|
3111
|
+
};
|
|
3112
|
+
};
|
|
3113
|
+
403: {
|
|
2338
3114
|
headers: {
|
|
2339
3115
|
[name: string]: unknown;
|
|
2340
3116
|
};
|
|
2341
|
-
content
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
getCompanyLogo(id: string): Promise<ArrayBuffer>;
|
|
2353
|
-
/** Lista los establecimientos de una empresa. */
|
|
2354
|
-
listBranches(companyId: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2355
|
-
parameters: {
|
|
2356
|
-
query?: never;
|
|
2357
|
-
header?: never;
|
|
2358
|
-
path: {
|
|
2359
|
-
id: string;
|
|
3117
|
+
content: {
|
|
3118
|
+
"application/json": {
|
|
3119
|
+
success: boolean;
|
|
3120
|
+
message: string;
|
|
3121
|
+
code?: string;
|
|
3122
|
+
errors?: {
|
|
3123
|
+
path: string;
|
|
3124
|
+
message: string;
|
|
3125
|
+
}[];
|
|
3126
|
+
};
|
|
3127
|
+
};
|
|
2360
3128
|
};
|
|
2361
|
-
|
|
2362
|
-
};
|
|
2363
|
-
requestBody?: never;
|
|
2364
|
-
responses: {
|
|
2365
|
-
200: {
|
|
3129
|
+
429: {
|
|
2366
3130
|
headers: {
|
|
2367
3131
|
[name: string]: unknown;
|
|
2368
3132
|
};
|
|
2369
|
-
content
|
|
3133
|
+
content: {
|
|
3134
|
+
"application/json": {
|
|
3135
|
+
success: boolean;
|
|
3136
|
+
message: string;
|
|
3137
|
+
code?: string;
|
|
3138
|
+
errors?: {
|
|
3139
|
+
path: string;
|
|
3140
|
+
message: string;
|
|
3141
|
+
}[];
|
|
3142
|
+
retryAfterSeconds?: number;
|
|
3143
|
+
};
|
|
3144
|
+
};
|
|
2370
3145
|
};
|
|
2371
3146
|
};
|
|
2372
3147
|
}, {
|
|
@@ -2376,8 +3151,8 @@ export declare class FacturacionClient {
|
|
|
2376
3151
|
};
|
|
2377
3152
|
};
|
|
2378
3153
|
}, `${string}/${string}`>>;
|
|
2379
|
-
/**
|
|
2380
|
-
|
|
3154
|
+
/** Actualiza una suscripción de webhook (url, eventos, isActive). */
|
|
3155
|
+
updateWebhook(id: string, body: UpdateWebhookInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
2381
3156
|
parameters: {
|
|
2382
3157
|
query?: never;
|
|
2383
3158
|
header?: never;
|
|
@@ -2389,24 +3164,62 @@ export declare class FacturacionClient {
|
|
|
2389
3164
|
requestBody: {
|
|
2390
3165
|
content: {
|
|
2391
3166
|
"application/json": {
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
direccion?: string;
|
|
2396
|
-
departamento?: string;
|
|
2397
|
-
provincia?: string;
|
|
2398
|
-
distrito?: string;
|
|
2399
|
-
urbanizacion?: string;
|
|
3167
|
+
url?: string;
|
|
3168
|
+
events?: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
3169
|
+
description?: string;
|
|
2400
3170
|
isActive?: boolean;
|
|
2401
3171
|
};
|
|
2402
3172
|
};
|
|
2403
3173
|
};
|
|
2404
3174
|
responses: {
|
|
2405
|
-
|
|
3175
|
+
401: {
|
|
2406
3176
|
headers: {
|
|
2407
3177
|
[name: string]: unknown;
|
|
2408
3178
|
};
|
|
2409
|
-
content
|
|
3179
|
+
content: {
|
|
3180
|
+
"application/json": {
|
|
3181
|
+
success: boolean;
|
|
3182
|
+
message: string;
|
|
3183
|
+
code?: string;
|
|
3184
|
+
errors?: {
|
|
3185
|
+
path: string;
|
|
3186
|
+
message: string;
|
|
3187
|
+
}[];
|
|
3188
|
+
};
|
|
3189
|
+
};
|
|
3190
|
+
};
|
|
3191
|
+
403: {
|
|
3192
|
+
headers: {
|
|
3193
|
+
[name: string]: unknown;
|
|
3194
|
+
};
|
|
3195
|
+
content: {
|
|
3196
|
+
"application/json": {
|
|
3197
|
+
success: boolean;
|
|
3198
|
+
message: string;
|
|
3199
|
+
code?: string;
|
|
3200
|
+
errors?: {
|
|
3201
|
+
path: string;
|
|
3202
|
+
message: string;
|
|
3203
|
+
}[];
|
|
3204
|
+
};
|
|
3205
|
+
};
|
|
3206
|
+
};
|
|
3207
|
+
429: {
|
|
3208
|
+
headers: {
|
|
3209
|
+
[name: string]: unknown;
|
|
3210
|
+
};
|
|
3211
|
+
content: {
|
|
3212
|
+
"application/json": {
|
|
3213
|
+
success: boolean;
|
|
3214
|
+
message: string;
|
|
3215
|
+
code?: string;
|
|
3216
|
+
errors?: {
|
|
3217
|
+
path: string;
|
|
3218
|
+
message: string;
|
|
3219
|
+
}[];
|
|
3220
|
+
retryAfterSeconds?: number;
|
|
3221
|
+
};
|
|
3222
|
+
};
|
|
2410
3223
|
};
|
|
2411
3224
|
};
|
|
2412
3225
|
}, {
|
|
@@ -2416,180 +3229,284 @@ export declare class FacturacionClient {
|
|
|
2416
3229
|
};
|
|
2417
3230
|
};
|
|
2418
3231
|
body: {
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
direccion?: string;
|
|
2423
|
-
departamento?: string;
|
|
2424
|
-
provincia?: string;
|
|
2425
|
-
distrito?: string;
|
|
2426
|
-
urbanizacion?: string;
|
|
3232
|
+
url?: string;
|
|
3233
|
+
events?: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
3234
|
+
description?: string;
|
|
2427
3235
|
isActive?: boolean;
|
|
2428
3236
|
};
|
|
2429
3237
|
}, `${string}/${string}`>>;
|
|
2430
|
-
/**
|
|
2431
|
-
|
|
3238
|
+
/** Elimina una suscripción de webhook. */
|
|
3239
|
+
deleteWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2432
3240
|
parameters: {
|
|
2433
3241
|
query?: never;
|
|
2434
3242
|
header?: never;
|
|
2435
3243
|
path: {
|
|
2436
3244
|
id: string;
|
|
2437
|
-
branchId: string;
|
|
2438
3245
|
};
|
|
2439
3246
|
cookie?: never;
|
|
2440
3247
|
};
|
|
2441
|
-
requestBody
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
3248
|
+
requestBody?: never;
|
|
3249
|
+
responses: {
|
|
3250
|
+
401: {
|
|
3251
|
+
headers: {
|
|
3252
|
+
[name: string]: unknown;
|
|
3253
|
+
};
|
|
3254
|
+
content: {
|
|
3255
|
+
"application/json": {
|
|
3256
|
+
success: boolean;
|
|
3257
|
+
message: string;
|
|
3258
|
+
code?: string;
|
|
3259
|
+
errors?: {
|
|
3260
|
+
path: string;
|
|
3261
|
+
message: string;
|
|
3262
|
+
}[];
|
|
3263
|
+
};
|
|
2452
3264
|
};
|
|
2453
3265
|
};
|
|
2454
|
-
|
|
2455
|
-
responses: {
|
|
2456
|
-
200: {
|
|
3266
|
+
403: {
|
|
2457
3267
|
headers: {
|
|
2458
3268
|
[name: string]: unknown;
|
|
2459
3269
|
};
|
|
2460
|
-
content
|
|
3270
|
+
content: {
|
|
3271
|
+
"application/json": {
|
|
3272
|
+
success: boolean;
|
|
3273
|
+
message: string;
|
|
3274
|
+
code?: string;
|
|
3275
|
+
errors?: {
|
|
3276
|
+
path: string;
|
|
3277
|
+
message: string;
|
|
3278
|
+
}[];
|
|
3279
|
+
};
|
|
3280
|
+
};
|
|
3281
|
+
};
|
|
3282
|
+
429: {
|
|
3283
|
+
headers: {
|
|
3284
|
+
[name: string]: unknown;
|
|
3285
|
+
};
|
|
3286
|
+
content: {
|
|
3287
|
+
"application/json": {
|
|
3288
|
+
success: boolean;
|
|
3289
|
+
message: string;
|
|
3290
|
+
code?: string;
|
|
3291
|
+
errors?: {
|
|
3292
|
+
path: string;
|
|
3293
|
+
message: string;
|
|
3294
|
+
}[];
|
|
3295
|
+
retryAfterSeconds?: number;
|
|
3296
|
+
};
|
|
3297
|
+
};
|
|
2461
3298
|
};
|
|
2462
3299
|
};
|
|
2463
3300
|
}, {
|
|
2464
3301
|
params: {
|
|
2465
3302
|
path: {
|
|
2466
3303
|
id: string;
|
|
2467
|
-
branchId: string;
|
|
2468
3304
|
};
|
|
2469
3305
|
};
|
|
2470
|
-
body: {
|
|
2471
|
-
nombre?: string;
|
|
2472
|
-
ubigeo?: string;
|
|
2473
|
-
direccion?: string;
|
|
2474
|
-
departamento?: string;
|
|
2475
|
-
provincia?: string;
|
|
2476
|
-
distrito?: string;
|
|
2477
|
-
urbanizacion?: string;
|
|
2478
|
-
isActive?: boolean;
|
|
2479
|
-
};
|
|
2480
3306
|
}, `${string}/${string}`>>;
|
|
2481
|
-
/**
|
|
2482
|
-
|
|
2483
|
-
* desde ahí). El matriz "0000" no se puede desactivar — responde 409.
|
|
2484
|
-
*/
|
|
2485
|
-
deleteBranch(companyId: string, branchId: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3307
|
+
/** Lista los intentos de entrega de un webhook. */
|
|
3308
|
+
listWebhookDeliveries(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2486
3309
|
parameters: {
|
|
2487
|
-
query?:
|
|
3310
|
+
query?: {
|
|
3311
|
+
limit?: number;
|
|
3312
|
+
success?: "true" | "false";
|
|
3313
|
+
};
|
|
2488
3314
|
header?: never;
|
|
2489
3315
|
path: {
|
|
2490
3316
|
id: string;
|
|
2491
|
-
branchId: string;
|
|
2492
3317
|
};
|
|
2493
3318
|
cookie?: never;
|
|
2494
3319
|
};
|
|
2495
3320
|
requestBody?: never;
|
|
2496
3321
|
responses: {
|
|
2497
|
-
|
|
3322
|
+
401: {
|
|
2498
3323
|
headers: {
|
|
2499
3324
|
[name: string]: unknown;
|
|
2500
3325
|
};
|
|
2501
|
-
content
|
|
3326
|
+
content: {
|
|
3327
|
+
"application/json": {
|
|
3328
|
+
success: boolean;
|
|
3329
|
+
message: string;
|
|
3330
|
+
code?: string;
|
|
3331
|
+
errors?: {
|
|
3332
|
+
path: string;
|
|
3333
|
+
message: string;
|
|
3334
|
+
}[];
|
|
3335
|
+
};
|
|
3336
|
+
};
|
|
3337
|
+
};
|
|
3338
|
+
403: {
|
|
3339
|
+
headers: {
|
|
3340
|
+
[name: string]: unknown;
|
|
3341
|
+
};
|
|
3342
|
+
content: {
|
|
3343
|
+
"application/json": {
|
|
3344
|
+
success: boolean;
|
|
3345
|
+
message: string;
|
|
3346
|
+
code?: string;
|
|
3347
|
+
errors?: {
|
|
3348
|
+
path: string;
|
|
3349
|
+
message: string;
|
|
3350
|
+
}[];
|
|
3351
|
+
};
|
|
3352
|
+
};
|
|
3353
|
+
};
|
|
3354
|
+
429: {
|
|
3355
|
+
headers: {
|
|
3356
|
+
[name: string]: unknown;
|
|
3357
|
+
};
|
|
3358
|
+
content: {
|
|
3359
|
+
"application/json": {
|
|
3360
|
+
success: boolean;
|
|
3361
|
+
message: string;
|
|
3362
|
+
code?: string;
|
|
3363
|
+
errors?: {
|
|
3364
|
+
path: string;
|
|
3365
|
+
message: string;
|
|
3366
|
+
}[];
|
|
3367
|
+
retryAfterSeconds?: number;
|
|
3368
|
+
};
|
|
3369
|
+
};
|
|
2502
3370
|
};
|
|
2503
3371
|
};
|
|
2504
3372
|
}, {
|
|
2505
3373
|
params: {
|
|
2506
3374
|
path: {
|
|
2507
3375
|
id: string;
|
|
2508
|
-
branchId: string;
|
|
2509
3376
|
};
|
|
2510
3377
|
};
|
|
2511
3378
|
}, `${string}/${string}`>>;
|
|
2512
|
-
/**
|
|
2513
|
-
|
|
2514
|
-
*
|
|
2515
|
-
* Sin `empresaRuc` el webhook cubre TODAS las empresas de tu cuenta: un solo
|
|
2516
|
-
* endpoint y un solo secret, y los RUC que des de alta después quedan
|
|
2517
|
-
* cubiertos solos. Cada payload trae su `empresaRuc` para que rutees.
|
|
2518
|
-
*/
|
|
2519
|
-
createWebhook(body: CreateWebhookInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
3379
|
+
/** Reintenta manualmente una entrega de webhook. */
|
|
3380
|
+
redeliverWebhook(id: string, deliveryId: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2520
3381
|
parameters: {
|
|
2521
3382
|
query?: never;
|
|
2522
3383
|
header?: never;
|
|
2523
|
-
path
|
|
3384
|
+
path: {
|
|
3385
|
+
id: string;
|
|
3386
|
+
deliveryId: string;
|
|
3387
|
+
};
|
|
2524
3388
|
cookie?: never;
|
|
2525
3389
|
};
|
|
2526
|
-
requestBody
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
3390
|
+
requestBody?: never;
|
|
3391
|
+
responses: {
|
|
3392
|
+
401: {
|
|
3393
|
+
headers: {
|
|
3394
|
+
[name: string]: unknown;
|
|
3395
|
+
};
|
|
3396
|
+
content: {
|
|
3397
|
+
"application/json": {
|
|
3398
|
+
success: boolean;
|
|
3399
|
+
message: string;
|
|
3400
|
+
code?: string;
|
|
3401
|
+
errors?: {
|
|
3402
|
+
path: string;
|
|
3403
|
+
message: string;
|
|
3404
|
+
}[];
|
|
3405
|
+
};
|
|
2535
3406
|
};
|
|
2536
3407
|
};
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
3408
|
+
403: {
|
|
3409
|
+
headers: {
|
|
3410
|
+
[name: string]: unknown;
|
|
3411
|
+
};
|
|
3412
|
+
content: {
|
|
3413
|
+
"application/json": {
|
|
3414
|
+
success: boolean;
|
|
3415
|
+
message: string;
|
|
3416
|
+
code?: string;
|
|
3417
|
+
errors?: {
|
|
3418
|
+
path: string;
|
|
3419
|
+
message: string;
|
|
3420
|
+
}[];
|
|
3421
|
+
};
|
|
3422
|
+
};
|
|
3423
|
+
};
|
|
3424
|
+
429: {
|
|
2540
3425
|
headers: {
|
|
2541
3426
|
[name: string]: unknown;
|
|
2542
3427
|
};
|
|
2543
|
-
content
|
|
3428
|
+
content: {
|
|
3429
|
+
"application/json": {
|
|
3430
|
+
success: boolean;
|
|
3431
|
+
message: string;
|
|
3432
|
+
code?: string;
|
|
3433
|
+
errors?: {
|
|
3434
|
+
path: string;
|
|
3435
|
+
message: string;
|
|
3436
|
+
}[];
|
|
3437
|
+
retryAfterSeconds?: number;
|
|
3438
|
+
};
|
|
3439
|
+
};
|
|
2544
3440
|
};
|
|
2545
3441
|
};
|
|
2546
3442
|
}, {
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
description?: string;
|
|
2553
|
-
secret?: string;
|
|
3443
|
+
params: {
|
|
3444
|
+
path: {
|
|
3445
|
+
id: string;
|
|
3446
|
+
deliveryId: string;
|
|
3447
|
+
};
|
|
2554
3448
|
};
|
|
2555
3449
|
}, `${string}/${string}`>>;
|
|
2556
|
-
/**
|
|
2557
|
-
|
|
3450
|
+
/** Dispara un evento de prueba (webhook.test) para verificar conectividad. */
|
|
3451
|
+
testWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2558
3452
|
parameters: {
|
|
2559
|
-
query?:
|
|
2560
|
-
ruc?: string;
|
|
2561
|
-
};
|
|
3453
|
+
query?: never;
|
|
2562
3454
|
header?: never;
|
|
2563
|
-
path
|
|
3455
|
+
path: {
|
|
3456
|
+
id: string;
|
|
3457
|
+
};
|
|
2564
3458
|
cookie?: never;
|
|
2565
3459
|
};
|
|
2566
3460
|
requestBody?: never;
|
|
2567
3461
|
responses: {
|
|
2568
|
-
|
|
3462
|
+
401: {
|
|
2569
3463
|
headers: {
|
|
2570
3464
|
[name: string]: unknown;
|
|
2571
3465
|
};
|
|
2572
|
-
content
|
|
3466
|
+
content: {
|
|
3467
|
+
"application/json": {
|
|
3468
|
+
success: boolean;
|
|
3469
|
+
message: string;
|
|
3470
|
+
code?: string;
|
|
3471
|
+
errors?: {
|
|
3472
|
+
path: string;
|
|
3473
|
+
message: string;
|
|
3474
|
+
}[];
|
|
3475
|
+
};
|
|
3476
|
+
};
|
|
2573
3477
|
};
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
3478
|
+
403: {
|
|
3479
|
+
headers: {
|
|
3480
|
+
[name: string]: unknown;
|
|
3481
|
+
};
|
|
3482
|
+
content: {
|
|
3483
|
+
"application/json": {
|
|
3484
|
+
success: boolean;
|
|
3485
|
+
message: string;
|
|
3486
|
+
code?: string;
|
|
3487
|
+
errors?: {
|
|
3488
|
+
path: string;
|
|
3489
|
+
message: string;
|
|
3490
|
+
}[];
|
|
3491
|
+
};
|
|
3492
|
+
};
|
|
2583
3493
|
};
|
|
2584
|
-
|
|
2585
|
-
};
|
|
2586
|
-
requestBody?: never;
|
|
2587
|
-
responses: {
|
|
2588
|
-
200: {
|
|
3494
|
+
429: {
|
|
2589
3495
|
headers: {
|
|
2590
3496
|
[name: string]: unknown;
|
|
2591
3497
|
};
|
|
2592
|
-
content
|
|
3498
|
+
content: {
|
|
3499
|
+
"application/json": {
|
|
3500
|
+
success: boolean;
|
|
3501
|
+
message: string;
|
|
3502
|
+
code?: string;
|
|
3503
|
+
errors?: {
|
|
3504
|
+
path: string;
|
|
3505
|
+
message: string;
|
|
3506
|
+
}[];
|
|
3507
|
+
retryAfterSeconds?: number;
|
|
3508
|
+
};
|
|
3509
|
+
};
|
|
2593
3510
|
};
|
|
2594
3511
|
};
|
|
2595
3512
|
}, {
|
|
@@ -2599,8 +3516,8 @@ export declare class FacturacionClient {
|
|
|
2599
3516
|
};
|
|
2600
3517
|
};
|
|
2601
3518
|
}, `${string}/${string}`>>;
|
|
2602
|
-
/**
|
|
2603
|
-
|
|
3519
|
+
/** Rota el secret HMAC de un webhook. El nuevo secret se devuelve una sola vez. */
|
|
3520
|
+
rotateWebhookSecret(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2604
3521
|
parameters: {
|
|
2605
3522
|
query?: never;
|
|
2606
3523
|
header?: never;
|
|
@@ -2609,22 +3526,56 @@ export declare class FacturacionClient {
|
|
|
2609
3526
|
};
|
|
2610
3527
|
cookie?: never;
|
|
2611
3528
|
};
|
|
2612
|
-
requestBody
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
3529
|
+
requestBody?: never;
|
|
3530
|
+
responses: {
|
|
3531
|
+
401: {
|
|
3532
|
+
headers: {
|
|
3533
|
+
[name: string]: unknown;
|
|
3534
|
+
};
|
|
3535
|
+
content: {
|
|
3536
|
+
"application/json": {
|
|
3537
|
+
success: boolean;
|
|
3538
|
+
message: string;
|
|
3539
|
+
code?: string;
|
|
3540
|
+
errors?: {
|
|
3541
|
+
path: string;
|
|
3542
|
+
message: string;
|
|
3543
|
+
}[];
|
|
3544
|
+
};
|
|
2619
3545
|
};
|
|
2620
3546
|
};
|
|
2621
|
-
|
|
2622
|
-
responses: {
|
|
2623
|
-
200: {
|
|
3547
|
+
403: {
|
|
2624
3548
|
headers: {
|
|
2625
3549
|
[name: string]: unknown;
|
|
2626
3550
|
};
|
|
2627
|
-
content
|
|
3551
|
+
content: {
|
|
3552
|
+
"application/json": {
|
|
3553
|
+
success: boolean;
|
|
3554
|
+
message: string;
|
|
3555
|
+
code?: string;
|
|
3556
|
+
errors?: {
|
|
3557
|
+
path: string;
|
|
3558
|
+
message: string;
|
|
3559
|
+
}[];
|
|
3560
|
+
};
|
|
3561
|
+
};
|
|
3562
|
+
};
|
|
3563
|
+
429: {
|
|
3564
|
+
headers: {
|
|
3565
|
+
[name: string]: unknown;
|
|
3566
|
+
};
|
|
3567
|
+
content: {
|
|
3568
|
+
"application/json": {
|
|
3569
|
+
success: boolean;
|
|
3570
|
+
message: string;
|
|
3571
|
+
code?: string;
|
|
3572
|
+
errors?: {
|
|
3573
|
+
path: string;
|
|
3574
|
+
message: string;
|
|
3575
|
+
}[];
|
|
3576
|
+
retryAfterSeconds?: number;
|
|
3577
|
+
};
|
|
3578
|
+
};
|
|
2628
3579
|
};
|
|
2629
3580
|
};
|
|
2630
3581
|
}, {
|
|
@@ -2633,21 +3584,13 @@ export declare class FacturacionClient {
|
|
|
2633
3584
|
id: string;
|
|
2634
3585
|
};
|
|
2635
3586
|
};
|
|
2636
|
-
body: {
|
|
2637
|
-
url?: string;
|
|
2638
|
-
events?: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
2639
|
-
description?: string;
|
|
2640
|
-
isActive?: boolean;
|
|
2641
|
-
};
|
|
2642
3587
|
}, `${string}/${string}`>>;
|
|
2643
|
-
/**
|
|
2644
|
-
|
|
3588
|
+
/** Lista los catálogos SUNAT disponibles. */
|
|
3589
|
+
getCatalogs(): Promise<import("openapi-fetch").FetchResponse<{
|
|
2645
3590
|
parameters: {
|
|
2646
3591
|
query?: never;
|
|
2647
3592
|
header?: never;
|
|
2648
|
-
path
|
|
2649
|
-
id: string;
|
|
2650
|
-
};
|
|
3593
|
+
path?: never;
|
|
2651
3594
|
cookie?: never;
|
|
2652
3595
|
};
|
|
2653
3596
|
requestBody?: never;
|
|
@@ -2656,54 +3599,164 @@ export declare class FacturacionClient {
|
|
|
2656
3599
|
headers: {
|
|
2657
3600
|
[name: string]: unknown;
|
|
2658
3601
|
};
|
|
2659
|
-
content
|
|
3602
|
+
content: {
|
|
3603
|
+
"application/json": {
|
|
3604
|
+
success: boolean;
|
|
3605
|
+
data: {
|
|
3606
|
+
key: string;
|
|
3607
|
+
name: string;
|
|
3608
|
+
items: {
|
|
3609
|
+
code: string;
|
|
3610
|
+
label: string;
|
|
3611
|
+
}[];
|
|
3612
|
+
}[];
|
|
3613
|
+
};
|
|
3614
|
+
};
|
|
2660
3615
|
};
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
3616
|
+
401: {
|
|
3617
|
+
headers: {
|
|
3618
|
+
[name: string]: unknown;
|
|
3619
|
+
};
|
|
3620
|
+
content: {
|
|
3621
|
+
"application/json": {
|
|
3622
|
+
success: boolean;
|
|
3623
|
+
message: string;
|
|
3624
|
+
code?: string;
|
|
3625
|
+
errors?: {
|
|
3626
|
+
path: string;
|
|
3627
|
+
message: string;
|
|
3628
|
+
}[];
|
|
3629
|
+
};
|
|
3630
|
+
};
|
|
3631
|
+
};
|
|
3632
|
+
403: {
|
|
3633
|
+
headers: {
|
|
3634
|
+
[name: string]: unknown;
|
|
3635
|
+
};
|
|
3636
|
+
content: {
|
|
3637
|
+
"application/json": {
|
|
3638
|
+
success: boolean;
|
|
3639
|
+
message: string;
|
|
3640
|
+
code?: string;
|
|
3641
|
+
errors?: {
|
|
3642
|
+
path: string;
|
|
3643
|
+
message: string;
|
|
3644
|
+
}[];
|
|
3645
|
+
};
|
|
3646
|
+
};
|
|
3647
|
+
};
|
|
3648
|
+
429: {
|
|
3649
|
+
headers: {
|
|
3650
|
+
[name: string]: unknown;
|
|
3651
|
+
};
|
|
3652
|
+
content: {
|
|
3653
|
+
"application/json": {
|
|
3654
|
+
success: boolean;
|
|
3655
|
+
message: string;
|
|
3656
|
+
code?: string;
|
|
3657
|
+
errors?: {
|
|
3658
|
+
path: string;
|
|
3659
|
+
message: string;
|
|
3660
|
+
}[];
|
|
3661
|
+
retryAfterSeconds?: number;
|
|
3662
|
+
};
|
|
3663
|
+
};
|
|
2666
3664
|
};
|
|
2667
3665
|
};
|
|
2668
|
-
}, `${string}/${string}`>>;
|
|
2669
|
-
/**
|
|
2670
|
-
|
|
3666
|
+
}, {}, `${string}/${string}`>>;
|
|
3667
|
+
/** Obtiene un catálogo SUNAT por clave (ej: "07", "61"). */
|
|
3668
|
+
getCatalog(key: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2671
3669
|
parameters: {
|
|
2672
|
-
query?:
|
|
2673
|
-
limit?: number;
|
|
2674
|
-
success?: "true" | "false";
|
|
2675
|
-
};
|
|
3670
|
+
query?: never;
|
|
2676
3671
|
header?: never;
|
|
2677
3672
|
path: {
|
|
2678
|
-
|
|
3673
|
+
key: string;
|
|
2679
3674
|
};
|
|
2680
3675
|
cookie?: never;
|
|
2681
3676
|
};
|
|
2682
3677
|
requestBody?: never;
|
|
2683
3678
|
responses: {
|
|
2684
|
-
|
|
3679
|
+
401: {
|
|
3680
|
+
headers: {
|
|
3681
|
+
[name: string]: unknown;
|
|
3682
|
+
};
|
|
3683
|
+
content: {
|
|
3684
|
+
"application/json": {
|
|
3685
|
+
success: boolean;
|
|
3686
|
+
message: string;
|
|
3687
|
+
code?: string;
|
|
3688
|
+
errors?: {
|
|
3689
|
+
path: string;
|
|
3690
|
+
message: string;
|
|
3691
|
+
}[];
|
|
3692
|
+
};
|
|
3693
|
+
};
|
|
3694
|
+
};
|
|
3695
|
+
403: {
|
|
3696
|
+
headers: {
|
|
3697
|
+
[name: string]: unknown;
|
|
3698
|
+
};
|
|
3699
|
+
content: {
|
|
3700
|
+
"application/json": {
|
|
3701
|
+
success: boolean;
|
|
3702
|
+
message: string;
|
|
3703
|
+
code?: string;
|
|
3704
|
+
errors?: {
|
|
3705
|
+
path: string;
|
|
3706
|
+
message: string;
|
|
3707
|
+
}[];
|
|
3708
|
+
};
|
|
3709
|
+
};
|
|
3710
|
+
};
|
|
3711
|
+
429: {
|
|
2685
3712
|
headers: {
|
|
2686
3713
|
[name: string]: unknown;
|
|
2687
3714
|
};
|
|
2688
|
-
content
|
|
3715
|
+
content: {
|
|
3716
|
+
"application/json": {
|
|
3717
|
+
success: boolean;
|
|
3718
|
+
message: string;
|
|
3719
|
+
code?: string;
|
|
3720
|
+
errors?: {
|
|
3721
|
+
path: string;
|
|
3722
|
+
message: string;
|
|
3723
|
+
}[];
|
|
3724
|
+
retryAfterSeconds?: number;
|
|
3725
|
+
};
|
|
3726
|
+
};
|
|
2689
3727
|
};
|
|
2690
3728
|
};
|
|
2691
3729
|
}, {
|
|
2692
3730
|
params: {
|
|
2693
3731
|
path: {
|
|
2694
|
-
|
|
3732
|
+
key: string;
|
|
2695
3733
|
};
|
|
2696
3734
|
};
|
|
2697
3735
|
}, `${string}/${string}`>>;
|
|
2698
|
-
/**
|
|
2699
|
-
|
|
3736
|
+
/**
|
|
3737
|
+
* Busca un Código de Producto SUNAT por texto libre o por prefijo de código.
|
|
3738
|
+
*
|
|
3739
|
+
* Ignora tildes y mayúsculas, y exige que aparezcan todos los términos.
|
|
3740
|
+
* Devuelve primero las CLASE: SUNAT pide llegar como mínimo a ese nivel y es
|
|
3741
|
+
* la respuesta correcta en la mayoría de casos.
|
|
3742
|
+
*
|
|
3743
|
+
* ```ts
|
|
3744
|
+
* const { data } = await sdk.buscarProductoSunat("aceite motor");
|
|
3745
|
+
* data?.data.items[0].codigo; // "15121501"
|
|
3746
|
+
* ```
|
|
3747
|
+
*/
|
|
3748
|
+
buscarProductoSunat(q: string, opciones?: {
|
|
3749
|
+
nivel?: "CLASE" | "PRODUCTO";
|
|
3750
|
+
limit?: number;
|
|
3751
|
+
}): Promise<import("openapi-fetch").FetchResponse<{
|
|
2700
3752
|
parameters: {
|
|
2701
|
-
query
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
deliveryId: string;
|
|
3753
|
+
query: {
|
|
3754
|
+
q: string;
|
|
3755
|
+
nivel?: "CLASE" | "PRODUCTO";
|
|
3756
|
+
limit?: number;
|
|
2706
3757
|
};
|
|
3758
|
+
header?: never;
|
|
3759
|
+
path?: never;
|
|
2707
3760
|
cookie?: never;
|
|
2708
3761
|
};
|
|
2709
3762
|
requestBody?: never;
|
|
@@ -2712,50 +3765,91 @@ export declare class FacturacionClient {
|
|
|
2712
3765
|
headers: {
|
|
2713
3766
|
[name: string]: unknown;
|
|
2714
3767
|
};
|
|
2715
|
-
content
|
|
3768
|
+
content: {
|
|
3769
|
+
"application/json": {
|
|
3770
|
+
success: boolean;
|
|
3771
|
+
data: {
|
|
3772
|
+
version: string;
|
|
3773
|
+
q: string;
|
|
3774
|
+
total: number;
|
|
3775
|
+
items: {
|
|
3776
|
+
codigo: string;
|
|
3777
|
+
descripcion: string;
|
|
3778
|
+
nivel: "CLASE" | "PRODUCTO";
|
|
3779
|
+
claseCodigo: string;
|
|
3780
|
+
familia: string;
|
|
3781
|
+
segmento: string;
|
|
3782
|
+
}[];
|
|
3783
|
+
};
|
|
3784
|
+
};
|
|
3785
|
+
};
|
|
2716
3786
|
};
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
3787
|
+
401: {
|
|
3788
|
+
headers: {
|
|
3789
|
+
[name: string]: unknown;
|
|
3790
|
+
};
|
|
3791
|
+
content: {
|
|
3792
|
+
"application/json": {
|
|
3793
|
+
success: boolean;
|
|
3794
|
+
message: string;
|
|
3795
|
+
code?: string;
|
|
3796
|
+
errors?: {
|
|
3797
|
+
path: string;
|
|
3798
|
+
message: string;
|
|
3799
|
+
}[];
|
|
3800
|
+
};
|
|
3801
|
+
};
|
|
2723
3802
|
};
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
3803
|
+
403: {
|
|
3804
|
+
headers: {
|
|
3805
|
+
[name: string]: unknown;
|
|
3806
|
+
};
|
|
3807
|
+
content: {
|
|
3808
|
+
"application/json": {
|
|
3809
|
+
success: boolean;
|
|
3810
|
+
message: string;
|
|
3811
|
+
code?: string;
|
|
3812
|
+
errors?: {
|
|
3813
|
+
path: string;
|
|
3814
|
+
message: string;
|
|
3815
|
+
}[];
|
|
3816
|
+
};
|
|
3817
|
+
};
|
|
2733
3818
|
};
|
|
2734
|
-
|
|
2735
|
-
};
|
|
2736
|
-
requestBody?: never;
|
|
2737
|
-
responses: {
|
|
2738
|
-
200: {
|
|
3819
|
+
429: {
|
|
2739
3820
|
headers: {
|
|
2740
3821
|
[name: string]: unknown;
|
|
2741
3822
|
};
|
|
2742
|
-
content
|
|
3823
|
+
content: {
|
|
3824
|
+
"application/json": {
|
|
3825
|
+
success: boolean;
|
|
3826
|
+
message: string;
|
|
3827
|
+
code?: string;
|
|
3828
|
+
errors?: {
|
|
3829
|
+
path: string;
|
|
3830
|
+
message: string;
|
|
3831
|
+
}[];
|
|
3832
|
+
retryAfterSeconds?: number;
|
|
3833
|
+
};
|
|
3834
|
+
};
|
|
2743
3835
|
};
|
|
2744
3836
|
};
|
|
2745
3837
|
}, {
|
|
2746
3838
|
params: {
|
|
2747
|
-
|
|
2748
|
-
|
|
3839
|
+
query: {
|
|
3840
|
+
nivel?: "CLASE" | "PRODUCTO";
|
|
3841
|
+
limit?: number;
|
|
3842
|
+
q: string;
|
|
2749
3843
|
};
|
|
2750
3844
|
};
|
|
2751
3845
|
}, `${string}/${string}`>>;
|
|
2752
|
-
/**
|
|
2753
|
-
|
|
3846
|
+
/** Obtiene un Código de Producto SUNAT puntual (404 si no existe). */
|
|
3847
|
+
getProductoSunat(codigo: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2754
3848
|
parameters: {
|
|
2755
3849
|
query?: never;
|
|
2756
3850
|
header?: never;
|
|
2757
3851
|
path: {
|
|
2758
|
-
|
|
3852
|
+
codigo: string;
|
|
2759
3853
|
};
|
|
2760
3854
|
cookie?: never;
|
|
2761
3855
|
};
|
|
@@ -2765,18 +3859,101 @@ export declare class FacturacionClient {
|
|
|
2765
3859
|
headers: {
|
|
2766
3860
|
[name: string]: unknown;
|
|
2767
3861
|
};
|
|
2768
|
-
content
|
|
3862
|
+
content: {
|
|
3863
|
+
"application/json": {
|
|
3864
|
+
success: boolean;
|
|
3865
|
+
data: {
|
|
3866
|
+
codigo: string;
|
|
3867
|
+
descripcion: string;
|
|
3868
|
+
nivel: "CLASE" | "PRODUCTO";
|
|
3869
|
+
claseCodigo: string;
|
|
3870
|
+
familia: string;
|
|
3871
|
+
segmento: string;
|
|
3872
|
+
};
|
|
3873
|
+
};
|
|
3874
|
+
};
|
|
3875
|
+
};
|
|
3876
|
+
401: {
|
|
3877
|
+
headers: {
|
|
3878
|
+
[name: string]: unknown;
|
|
3879
|
+
};
|
|
3880
|
+
content: {
|
|
3881
|
+
"application/json": {
|
|
3882
|
+
success: boolean;
|
|
3883
|
+
message: string;
|
|
3884
|
+
code?: string;
|
|
3885
|
+
errors?: {
|
|
3886
|
+
path: string;
|
|
3887
|
+
message: string;
|
|
3888
|
+
}[];
|
|
3889
|
+
};
|
|
3890
|
+
};
|
|
3891
|
+
};
|
|
3892
|
+
403: {
|
|
3893
|
+
headers: {
|
|
3894
|
+
[name: string]: unknown;
|
|
3895
|
+
};
|
|
3896
|
+
content: {
|
|
3897
|
+
"application/json": {
|
|
3898
|
+
success: boolean;
|
|
3899
|
+
message: string;
|
|
3900
|
+
code?: string;
|
|
3901
|
+
errors?: {
|
|
3902
|
+
path: string;
|
|
3903
|
+
message: string;
|
|
3904
|
+
}[];
|
|
3905
|
+
};
|
|
3906
|
+
};
|
|
3907
|
+
};
|
|
3908
|
+
404: {
|
|
3909
|
+
headers: {
|
|
3910
|
+
[name: string]: unknown;
|
|
3911
|
+
};
|
|
3912
|
+
content: {
|
|
3913
|
+
"application/json": {
|
|
3914
|
+
success: boolean;
|
|
3915
|
+
message: string;
|
|
3916
|
+
code?: string;
|
|
3917
|
+
errors?: {
|
|
3918
|
+
path: string;
|
|
3919
|
+
message: string;
|
|
3920
|
+
}[];
|
|
3921
|
+
};
|
|
3922
|
+
};
|
|
3923
|
+
};
|
|
3924
|
+
429: {
|
|
3925
|
+
headers: {
|
|
3926
|
+
[name: string]: unknown;
|
|
3927
|
+
};
|
|
3928
|
+
content: {
|
|
3929
|
+
"application/json": {
|
|
3930
|
+
success: boolean;
|
|
3931
|
+
message: string;
|
|
3932
|
+
code?: string;
|
|
3933
|
+
errors?: {
|
|
3934
|
+
path: string;
|
|
3935
|
+
message: string;
|
|
3936
|
+
}[];
|
|
3937
|
+
retryAfterSeconds?: number;
|
|
3938
|
+
};
|
|
3939
|
+
};
|
|
2769
3940
|
};
|
|
2770
3941
|
};
|
|
2771
3942
|
}, {
|
|
2772
3943
|
params: {
|
|
2773
3944
|
path: {
|
|
2774
|
-
|
|
3945
|
+
codigo: string;
|
|
2775
3946
|
};
|
|
2776
3947
|
};
|
|
2777
3948
|
}, `${string}/${string}`>>;
|
|
2778
|
-
/**
|
|
2779
|
-
|
|
3949
|
+
/**
|
|
3950
|
+
* Descarga el Catálogo 25 COMPLETO (52.840 códigos, ~700 KB comprimidos).
|
|
3951
|
+
*
|
|
3952
|
+
* Para quien prefiere su propia copia local en vez de consultar la API en
|
|
3953
|
+
* cada búsqueda. La data está congelada desde 2008: bájala una vez y guárdala.
|
|
3954
|
+
* Está limitado a 5 peticiones por minuto — no lo llames en cada arranque.
|
|
3955
|
+
*/
|
|
3956
|
+
exportarProductosSunat(): Promise<import("openapi-fetch").FetchResponse<{
|
|
2780
3957
|
parameters: {
|
|
2781
3958
|
query?: never;
|
|
2782
3959
|
header?: never;
|
|
@@ -2793,46 +3970,73 @@ export declare class FacturacionClient {
|
|
|
2793
3970
|
"application/json": {
|
|
2794
3971
|
success: boolean;
|
|
2795
3972
|
data: {
|
|
2796
|
-
|
|
2797
|
-
|
|
3973
|
+
version: string;
|
|
3974
|
+
total: number;
|
|
2798
3975
|
items: {
|
|
2799
|
-
|
|
2800
|
-
|
|
3976
|
+
codigo: string;
|
|
3977
|
+
descripcion: string;
|
|
3978
|
+
nivel: "CLASE" | "PRODUCTO";
|
|
3979
|
+
claseCodigo: string;
|
|
3980
|
+
familia: string;
|
|
3981
|
+
segmento: string;
|
|
2801
3982
|
}[];
|
|
2802
|
-
}
|
|
3983
|
+
};
|
|
2803
3984
|
};
|
|
2804
3985
|
};
|
|
2805
3986
|
};
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
3987
|
+
401: {
|
|
3988
|
+
headers: {
|
|
3989
|
+
[name: string]: unknown;
|
|
3990
|
+
};
|
|
3991
|
+
content: {
|
|
3992
|
+
"application/json": {
|
|
3993
|
+
success: boolean;
|
|
3994
|
+
message: string;
|
|
3995
|
+
code?: string;
|
|
3996
|
+
errors?: {
|
|
3997
|
+
path: string;
|
|
3998
|
+
message: string;
|
|
3999
|
+
}[];
|
|
4000
|
+
};
|
|
4001
|
+
};
|
|
2815
4002
|
};
|
|
2816
|
-
|
|
2817
|
-
};
|
|
2818
|
-
requestBody?: never;
|
|
2819
|
-
responses: {
|
|
2820
|
-
200: {
|
|
4003
|
+
403: {
|
|
2821
4004
|
headers: {
|
|
2822
4005
|
[name: string]: unknown;
|
|
2823
4006
|
};
|
|
2824
|
-
content
|
|
4007
|
+
content: {
|
|
4008
|
+
"application/json": {
|
|
4009
|
+
success: boolean;
|
|
4010
|
+
message: string;
|
|
4011
|
+
code?: string;
|
|
4012
|
+
errors?: {
|
|
4013
|
+
path: string;
|
|
4014
|
+
message: string;
|
|
4015
|
+
}[];
|
|
4016
|
+
};
|
|
4017
|
+
};
|
|
2825
4018
|
};
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
4019
|
+
429: {
|
|
4020
|
+
headers: {
|
|
4021
|
+
[name: string]: unknown;
|
|
4022
|
+
};
|
|
4023
|
+
content: {
|
|
4024
|
+
"application/json": {
|
|
4025
|
+
success: boolean;
|
|
4026
|
+
message: string;
|
|
4027
|
+
code?: string;
|
|
4028
|
+
errors?: {
|
|
4029
|
+
path: string;
|
|
4030
|
+
message: string;
|
|
4031
|
+
}[];
|
|
4032
|
+
retryAfterSeconds?: number;
|
|
4033
|
+
};
|
|
4034
|
+
};
|
|
2831
4035
|
};
|
|
2832
4036
|
};
|
|
2833
|
-
}, `${string}/${string}`>>;
|
|
4037
|
+
}, {}, `${string}/${string}`>>;
|
|
2834
4038
|
/** Consulta pública de un comprobante por RUC/tipo/serie/número (JSON). */
|
|
2835
|
-
consultarComprobante(ruc: string, tipoDoc: string, serie: string, numero: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
4039
|
+
consultarComprobante(ruc: string, tipoDoc: string, serie: string, numero: string, filtro: ConsultaFiltro): Promise<import("openapi-fetch").FetchResponse<{
|
|
2836
4040
|
parameters: {
|
|
2837
4041
|
query?: {
|
|
2838
4042
|
total?: number;
|
|
@@ -2865,21 +4069,16 @@ export declare class FacturacionClient {
|
|
|
2865
4069
|
serie: string;
|
|
2866
4070
|
numero: string;
|
|
2867
4071
|
};
|
|
4072
|
+
query: ConsultaFiltro;
|
|
2868
4073
|
};
|
|
2869
4074
|
}, `${string}/${string}`>>;
|
|
2870
4075
|
/** PDF público de un comprobante. */
|
|
2871
|
-
consultarComprobantePdf(ruc: string, tipoDoc: string, serie: string, numero: string): Promise<ArrayBuffer>;
|
|
4076
|
+
consultarComprobantePdf(ruc: string, tipoDoc: string, serie: string, numero: string, filtro: ConsultaFiltro): Promise<ArrayBuffer>;
|
|
2872
4077
|
/** XML público de un comprobante. */
|
|
2873
|
-
consultarComprobanteXml(ruc: string, tipoDoc: string, serie: string, numero: string): Promise<ArrayBuffer>;
|
|
4078
|
+
consultarComprobanteXml(ruc: string, tipoDoc: string, serie: string, numero: string, filtro: ConsultaFiltro): Promise<ArrayBuffer>;
|
|
2874
4079
|
/** Estado de las colas BullMQ (jobs en cada estado). */
|
|
2875
4080
|
getQueueStats(): Promise<QueueStats>;
|
|
2876
|
-
/**
|
|
2877
|
-
* Descarga binaria genérica para endpoints de archivo `{id}`.
|
|
2878
|
-
*
|
|
2879
|
-
* openapi-fetch no infiere bien una unión de rutas, y estos endpoints declaran
|
|
2880
|
-
* el cuerpo como binario (sin schema JSON), así que el cast es inevitable. Se
|
|
2881
|
-
* mantiene acotado a `BinaryPath` para no perder el chequeo de la ruta.
|
|
2882
|
-
*/
|
|
4081
|
+
/** Descarga binaria genérica para endpoints de archivo `{id}`. */
|
|
2883
4082
|
private fetchBinary;
|
|
2884
4083
|
/**
|
|
2885
4084
|
* Espera a que un documento llegue a estado final (ACEPTADO/RECHAZADO/COLA_FALLIDA/ANULADO).
|