intifact 1.3.3 → 1.6.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 +131 -236
- package/dist/index.d.ts +2104 -564
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -83
- 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,11 +23,7 @@ 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
|
|
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) */
|
|
26
|
+
/** Body de POST /api/v1/companies/{id}/branches */
|
|
31
27
|
export type CreateBranchInput = paths["/api/v1/companies/{id}/branches"]["post"]["requestBody"]["content"]["application/json"];
|
|
32
28
|
/** Body de PUT /api/v1/companies/{id}/branches/{branchId} */
|
|
33
29
|
export type UpdateBranchInput = paths["/api/v1/companies/{id}/branches/{branchId}"]["put"]["requestBody"]["content"]["application/json"];
|
|
@@ -35,12 +31,35 @@ export type UpdateBranchInput = paths["/api/v1/companies/{id}/branches/{branchId
|
|
|
35
31
|
export type CreateWebhookInput = paths["/api/v1/webhooks"]["post"]["requestBody"]["content"]["application/json"];
|
|
36
32
|
/** Body de PUT /api/v1/webhooks/{id} */
|
|
37
33
|
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
34
|
/** Respuesta 202 de cualquier /send (documento encolado) */
|
|
41
35
|
export type EnqueueResponse = paths["/api/v1/invoice/send"]["post"]["responses"]["202"]["content"]["application/json"];
|
|
42
36
|
/** Respuesta de GET /api/v1/queues/stats */
|
|
43
37
|
export type QueueStats = paths["/api/v1/queues/stats"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
38
|
+
/**
|
|
39
|
+
* Filtro anti-scraping OBLIGATORIO (al menos uno) para la consulta pública de
|
|
40
|
+
* comprobantes. Sin esto, RUC+tipoDoc+serie+numero (secuenciales y
|
|
41
|
+
* adivinables) bastarían para extraer datos de cualquier comprobante de la
|
|
42
|
+
* empresa. Si no mandas ninguno, la API responde 404 aunque el comprobante
|
|
43
|
+
* exista.
|
|
44
|
+
*
|
|
45
|
+
* NOTA: tipado a mano en vez de derivado de `paths[...]` porque el spec de
|
|
46
|
+
* producción aún no tiene este filtro en las rutas /pdf y /xml (se agregó
|
|
47
|
+
* del lado de la API pero todavía no se desplegó). Tras el deploy, correr
|
|
48
|
+
* `npm run gen` y este tipo puede volver a derivarse de `paths[...]`.
|
|
49
|
+
*/
|
|
50
|
+
export type ConsultaFiltro = {
|
|
51
|
+
total: number;
|
|
52
|
+
fecha?: string;
|
|
53
|
+
receptor?: string;
|
|
54
|
+
} | {
|
|
55
|
+
total?: number;
|
|
56
|
+
fecha: string;
|
|
57
|
+
receptor?: string;
|
|
58
|
+
} | {
|
|
59
|
+
total?: number;
|
|
60
|
+
fecha?: string;
|
|
61
|
+
receptor: string;
|
|
62
|
+
};
|
|
44
63
|
export interface FacturacionClientOptions extends ClientOptions {
|
|
45
64
|
/** Base URL de la API (ej: http://localhost:3000) */
|
|
46
65
|
baseUrl: string;
|
|
@@ -65,9 +84,7 @@ export declare class FacturacionClient {
|
|
|
65
84
|
parameters: {
|
|
66
85
|
query?: never;
|
|
67
86
|
header?: never;
|
|
68
|
-
path
|
|
69
|
-
/** Respuesta 202 de cualquier /send (documento encolado) */
|
|
70
|
-
?: never;
|
|
87
|
+
path?: never;
|
|
71
88
|
cookie?: never;
|
|
72
89
|
};
|
|
73
90
|
requestBody: {
|
|
@@ -115,9 +132,7 @@ export declare class FacturacionClient {
|
|
|
115
132
|
montoValorVenta: number;
|
|
116
133
|
descuento?: number;
|
|
117
134
|
descuentoItem?: number;
|
|
118
|
-
factorIcbper
|
|
119
|
-
/** Envía varias guías de remisión en un solo request. */
|
|
120
|
-
?: number;
|
|
135
|
+
factorIcbper?: number;
|
|
121
136
|
codProdSunat?: string;
|
|
122
137
|
}[];
|
|
123
138
|
formaPago: {
|
|
@@ -175,7 +190,39 @@ export declare class FacturacionClient {
|
|
|
175
190
|
};
|
|
176
191
|
content: {
|
|
177
192
|
"application/json": {
|
|
178
|
-
success:
|
|
193
|
+
success: boolean;
|
|
194
|
+
message: string;
|
|
195
|
+
code?: string;
|
|
196
|
+
errors?: {
|
|
197
|
+
path: string;
|
|
198
|
+
message: string;
|
|
199
|
+
}[];
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
401: {
|
|
204
|
+
headers: {
|
|
205
|
+
[name: string]: unknown;
|
|
206
|
+
};
|
|
207
|
+
content: {
|
|
208
|
+
"application/json": {
|
|
209
|
+
success: boolean;
|
|
210
|
+
message: string;
|
|
211
|
+
code?: string;
|
|
212
|
+
errors?: {
|
|
213
|
+
path: string;
|
|
214
|
+
message: string;
|
|
215
|
+
}[];
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
403: {
|
|
220
|
+
headers: {
|
|
221
|
+
[name: string]: unknown;
|
|
222
|
+
};
|
|
223
|
+
content: {
|
|
224
|
+
"application/json": {
|
|
225
|
+
success: boolean;
|
|
179
226
|
message: string;
|
|
180
227
|
code?: string;
|
|
181
228
|
errors?: {
|
|
@@ -191,13 +238,30 @@ export declare class FacturacionClient {
|
|
|
191
238
|
};
|
|
192
239
|
content: {
|
|
193
240
|
"application/json": {
|
|
194
|
-
success:
|
|
241
|
+
success: boolean;
|
|
242
|
+
message: string;
|
|
243
|
+
code?: string;
|
|
244
|
+
errors?: {
|
|
245
|
+
path: string;
|
|
246
|
+
message: string;
|
|
247
|
+
}[];
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
429: {
|
|
252
|
+
headers: {
|
|
253
|
+
[name: string]: unknown;
|
|
254
|
+
};
|
|
255
|
+
content: {
|
|
256
|
+
"application/json": {
|
|
257
|
+
success: boolean;
|
|
195
258
|
message: string;
|
|
196
259
|
code?: string;
|
|
197
260
|
errors?: {
|
|
198
261
|
path: string;
|
|
199
262
|
message: string;
|
|
200
263
|
}[];
|
|
264
|
+
retryAfterSeconds?: number;
|
|
201
265
|
};
|
|
202
266
|
};
|
|
203
267
|
};
|
|
@@ -246,9 +310,7 @@ export declare class FacturacionClient {
|
|
|
246
310
|
montoValorVenta: number;
|
|
247
311
|
descuento?: number;
|
|
248
312
|
descuentoItem?: number;
|
|
249
|
-
factorIcbper
|
|
250
|
-
/** Envía varias guías de remisión en un solo request. */
|
|
251
|
-
?: number;
|
|
313
|
+
factorIcbper?: number;
|
|
252
314
|
codProdSunat?: string;
|
|
253
315
|
}[];
|
|
254
316
|
formaPago: {
|
|
@@ -367,6 +429,55 @@ export declare class FacturacionClient {
|
|
|
367
429
|
};
|
|
368
430
|
};
|
|
369
431
|
};
|
|
432
|
+
401: {
|
|
433
|
+
headers: {
|
|
434
|
+
[name: string]: unknown;
|
|
435
|
+
};
|
|
436
|
+
content: {
|
|
437
|
+
"application/json": {
|
|
438
|
+
success: boolean;
|
|
439
|
+
message: string;
|
|
440
|
+
code?: string;
|
|
441
|
+
errors?: {
|
|
442
|
+
path: string;
|
|
443
|
+
message: string;
|
|
444
|
+
}[];
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
403: {
|
|
449
|
+
headers: {
|
|
450
|
+
[name: string]: unknown;
|
|
451
|
+
};
|
|
452
|
+
content: {
|
|
453
|
+
"application/json": {
|
|
454
|
+
success: boolean;
|
|
455
|
+
message: string;
|
|
456
|
+
code?: string;
|
|
457
|
+
errors?: {
|
|
458
|
+
path: string;
|
|
459
|
+
message: string;
|
|
460
|
+
}[];
|
|
461
|
+
};
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
429: {
|
|
465
|
+
headers: {
|
|
466
|
+
[name: string]: unknown;
|
|
467
|
+
};
|
|
468
|
+
content: {
|
|
469
|
+
"application/json": {
|
|
470
|
+
success: boolean;
|
|
471
|
+
message: string;
|
|
472
|
+
code?: string;
|
|
473
|
+
errors?: {
|
|
474
|
+
path: string;
|
|
475
|
+
message: string;
|
|
476
|
+
}[];
|
|
477
|
+
retryAfterSeconds?: number;
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
};
|
|
370
481
|
};
|
|
371
482
|
}, {
|
|
372
483
|
body: {
|
|
@@ -412,13 +523,7 @@ export declare class FacturacionClient {
|
|
|
412
523
|
tipoMoneda?: string;
|
|
413
524
|
fechaEmision: string;
|
|
414
525
|
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;
|
|
526
|
+
establecimientoCodigo?: string;
|
|
422
527
|
clienteTipoDoc: string;
|
|
423
528
|
clienteNumDoc: string;
|
|
424
529
|
clienteRazonSocial: string;
|
|
@@ -492,7 +597,39 @@ export declare class FacturacionClient {
|
|
|
492
597
|
};
|
|
493
598
|
content: {
|
|
494
599
|
"application/json": {
|
|
495
|
-
success:
|
|
600
|
+
success: boolean;
|
|
601
|
+
message: string;
|
|
602
|
+
code?: string;
|
|
603
|
+
errors?: {
|
|
604
|
+
path: string;
|
|
605
|
+
message: string;
|
|
606
|
+
}[];
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
401: {
|
|
611
|
+
headers: {
|
|
612
|
+
[name: string]: unknown;
|
|
613
|
+
};
|
|
614
|
+
content: {
|
|
615
|
+
"application/json": {
|
|
616
|
+
success: boolean;
|
|
617
|
+
message: string;
|
|
618
|
+
code?: string;
|
|
619
|
+
errors?: {
|
|
620
|
+
path: string;
|
|
621
|
+
message: string;
|
|
622
|
+
}[];
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
403: {
|
|
627
|
+
headers: {
|
|
628
|
+
[name: string]: unknown;
|
|
629
|
+
};
|
|
630
|
+
content: {
|
|
631
|
+
"application/json": {
|
|
632
|
+
success: boolean;
|
|
496
633
|
message: string;
|
|
497
634
|
code?: string;
|
|
498
635
|
errors?: {
|
|
@@ -508,13 +645,30 @@ export declare class FacturacionClient {
|
|
|
508
645
|
};
|
|
509
646
|
content: {
|
|
510
647
|
"application/json": {
|
|
511
|
-
success:
|
|
648
|
+
success: boolean;
|
|
649
|
+
message: string;
|
|
650
|
+
code?: string;
|
|
651
|
+
errors?: {
|
|
652
|
+
path: string;
|
|
653
|
+
message: string;
|
|
654
|
+
}[];
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
};
|
|
658
|
+
429: {
|
|
659
|
+
headers: {
|
|
660
|
+
[name: string]: unknown;
|
|
661
|
+
};
|
|
662
|
+
content: {
|
|
663
|
+
"application/json": {
|
|
664
|
+
success: boolean;
|
|
512
665
|
message: string;
|
|
513
666
|
code?: string;
|
|
514
667
|
errors?: {
|
|
515
668
|
path: string;
|
|
516
669
|
message: string;
|
|
517
670
|
}[];
|
|
671
|
+
retryAfterSeconds?: number;
|
|
518
672
|
};
|
|
519
673
|
};
|
|
520
674
|
};
|
|
@@ -663,6 +817,55 @@ export declare class FacturacionClient {
|
|
|
663
817
|
};
|
|
664
818
|
};
|
|
665
819
|
};
|
|
820
|
+
401: {
|
|
821
|
+
headers: {
|
|
822
|
+
[name: string]: unknown;
|
|
823
|
+
};
|
|
824
|
+
content: {
|
|
825
|
+
"application/json": {
|
|
826
|
+
success: boolean;
|
|
827
|
+
message: string;
|
|
828
|
+
code?: string;
|
|
829
|
+
errors?: {
|
|
830
|
+
path: string;
|
|
831
|
+
message: string;
|
|
832
|
+
}[];
|
|
833
|
+
};
|
|
834
|
+
};
|
|
835
|
+
};
|
|
836
|
+
403: {
|
|
837
|
+
headers: {
|
|
838
|
+
[name: string]: unknown;
|
|
839
|
+
};
|
|
840
|
+
content: {
|
|
841
|
+
"application/json": {
|
|
842
|
+
success: boolean;
|
|
843
|
+
message: string;
|
|
844
|
+
code?: string;
|
|
845
|
+
errors?: {
|
|
846
|
+
path: string;
|
|
847
|
+
message: string;
|
|
848
|
+
}[];
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
};
|
|
852
|
+
429: {
|
|
853
|
+
headers: {
|
|
854
|
+
[name: string]: unknown;
|
|
855
|
+
};
|
|
856
|
+
content: {
|
|
857
|
+
"application/json": {
|
|
858
|
+
success: boolean;
|
|
859
|
+
message: string;
|
|
860
|
+
code?: string;
|
|
861
|
+
errors?: {
|
|
862
|
+
path: string;
|
|
863
|
+
message: string;
|
|
864
|
+
}[];
|
|
865
|
+
retryAfterSeconds?: number;
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
};
|
|
666
869
|
};
|
|
667
870
|
}, {
|
|
668
871
|
body: {
|
|
@@ -838,7 +1041,39 @@ export declare class FacturacionClient {
|
|
|
838
1041
|
};
|
|
839
1042
|
content: {
|
|
840
1043
|
"application/json": {
|
|
841
|
-
success:
|
|
1044
|
+
success: boolean;
|
|
1045
|
+
message: string;
|
|
1046
|
+
code?: string;
|
|
1047
|
+
errors?: {
|
|
1048
|
+
path: string;
|
|
1049
|
+
message: string;
|
|
1050
|
+
}[];
|
|
1051
|
+
};
|
|
1052
|
+
};
|
|
1053
|
+
};
|
|
1054
|
+
401: {
|
|
1055
|
+
headers: {
|
|
1056
|
+
[name: string]: unknown;
|
|
1057
|
+
};
|
|
1058
|
+
content: {
|
|
1059
|
+
"application/json": {
|
|
1060
|
+
success: boolean;
|
|
1061
|
+
message: string;
|
|
1062
|
+
code?: string;
|
|
1063
|
+
errors?: {
|
|
1064
|
+
path: string;
|
|
1065
|
+
message: string;
|
|
1066
|
+
}[];
|
|
1067
|
+
};
|
|
1068
|
+
};
|
|
1069
|
+
};
|
|
1070
|
+
403: {
|
|
1071
|
+
headers: {
|
|
1072
|
+
[name: string]: unknown;
|
|
1073
|
+
};
|
|
1074
|
+
content: {
|
|
1075
|
+
"application/json": {
|
|
1076
|
+
success: boolean;
|
|
842
1077
|
message: string;
|
|
843
1078
|
code?: string;
|
|
844
1079
|
errors?: {
|
|
@@ -854,13 +1089,30 @@ export declare class FacturacionClient {
|
|
|
854
1089
|
};
|
|
855
1090
|
content: {
|
|
856
1091
|
"application/json": {
|
|
857
|
-
success:
|
|
1092
|
+
success: boolean;
|
|
1093
|
+
message: string;
|
|
1094
|
+
code?: string;
|
|
1095
|
+
errors?: {
|
|
1096
|
+
path: string;
|
|
1097
|
+
message: string;
|
|
1098
|
+
}[];
|
|
1099
|
+
};
|
|
1100
|
+
};
|
|
1101
|
+
};
|
|
1102
|
+
429: {
|
|
1103
|
+
headers: {
|
|
1104
|
+
[name: string]: unknown;
|
|
1105
|
+
};
|
|
1106
|
+
content: {
|
|
1107
|
+
"application/json": {
|
|
1108
|
+
success: boolean;
|
|
858
1109
|
message: string;
|
|
859
1110
|
code?: string;
|
|
860
1111
|
errors?: {
|
|
861
1112
|
path: string;
|
|
862
1113
|
message: string;
|
|
863
1114
|
}[];
|
|
1115
|
+
retryAfterSeconds?: number;
|
|
864
1116
|
};
|
|
865
1117
|
};
|
|
866
1118
|
};
|
|
@@ -1136,7 +1388,7 @@ export declare class FacturacionClient {
|
|
|
1136
1388
|
};
|
|
1137
1389
|
content: {
|
|
1138
1390
|
"application/json": {
|
|
1139
|
-
success:
|
|
1391
|
+
success: boolean;
|
|
1140
1392
|
message: string;
|
|
1141
1393
|
code?: string;
|
|
1142
1394
|
errors?: {
|
|
@@ -1146,23 +1398,72 @@ export declare class FacturacionClient {
|
|
|
1146
1398
|
};
|
|
1147
1399
|
};
|
|
1148
1400
|
};
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1401
|
+
401: {
|
|
1402
|
+
headers: {
|
|
1403
|
+
[name: string]: unknown;
|
|
1404
|
+
};
|
|
1405
|
+
content: {
|
|
1406
|
+
"application/json": {
|
|
1407
|
+
success: boolean;
|
|
1408
|
+
message: string;
|
|
1409
|
+
code?: string;
|
|
1410
|
+
errors?: {
|
|
1411
|
+
path: string;
|
|
1412
|
+
message: string;
|
|
1413
|
+
}[];
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
};
|
|
1417
|
+
403: {
|
|
1418
|
+
headers: {
|
|
1419
|
+
[name: string]: unknown;
|
|
1420
|
+
};
|
|
1421
|
+
content: {
|
|
1422
|
+
"application/json": {
|
|
1423
|
+
success: boolean;
|
|
1424
|
+
message: string;
|
|
1425
|
+
code?: string;
|
|
1426
|
+
errors?: {
|
|
1427
|
+
path: string;
|
|
1428
|
+
message: string;
|
|
1429
|
+
}[];
|
|
1430
|
+
};
|
|
1431
|
+
};
|
|
1432
|
+
};
|
|
1433
|
+
429: {
|
|
1434
|
+
headers: {
|
|
1435
|
+
[name: string]: unknown;
|
|
1436
|
+
};
|
|
1437
|
+
content: {
|
|
1438
|
+
"application/json": {
|
|
1439
|
+
success: boolean;
|
|
1440
|
+
message: string;
|
|
1441
|
+
code?: string;
|
|
1442
|
+
errors?: {
|
|
1443
|
+
path: string;
|
|
1444
|
+
message: string;
|
|
1445
|
+
}[];
|
|
1446
|
+
retryAfterSeconds?: number;
|
|
1447
|
+
};
|
|
1448
|
+
};
|
|
1449
|
+
};
|
|
1450
|
+
};
|
|
1451
|
+
}, {
|
|
1452
|
+
body: {
|
|
1453
|
+
tipoDoc: "09";
|
|
1454
|
+
serie: string;
|
|
1455
|
+
observacion?: string;
|
|
1456
|
+
fechaEmision: string;
|
|
1457
|
+
empresaRuc: string;
|
|
1458
|
+
establecimientoCodigo?: string;
|
|
1459
|
+
guiaCodTraslado: string;
|
|
1460
|
+
guiaModTraslado: "01" | "02";
|
|
1461
|
+
guiaFecTraslado: string;
|
|
1462
|
+
guiaVehiculoPlaca?: string;
|
|
1463
|
+
transportistaTipoDoc?: string;
|
|
1464
|
+
transportistaNumDoc?: string;
|
|
1465
|
+
transportistaRazonSocial?: string;
|
|
1466
|
+
transportistaNroMtc?: string;
|
|
1166
1467
|
guiaPartidaUbigeo: string;
|
|
1167
1468
|
guiaPartidaDireccion: string;
|
|
1168
1469
|
chofer?: {
|
|
@@ -1359,7 +1660,39 @@ export declare class FacturacionClient {
|
|
|
1359
1660
|
};
|
|
1360
1661
|
content: {
|
|
1361
1662
|
"application/json": {
|
|
1362
|
-
success:
|
|
1663
|
+
success: boolean;
|
|
1664
|
+
message: string;
|
|
1665
|
+
code?: string;
|
|
1666
|
+
errors?: {
|
|
1667
|
+
path: string;
|
|
1668
|
+
message: string;
|
|
1669
|
+
}[];
|
|
1670
|
+
};
|
|
1671
|
+
};
|
|
1672
|
+
};
|
|
1673
|
+
401: {
|
|
1674
|
+
headers: {
|
|
1675
|
+
[name: string]: unknown;
|
|
1676
|
+
};
|
|
1677
|
+
content: {
|
|
1678
|
+
"application/json": {
|
|
1679
|
+
success: boolean;
|
|
1680
|
+
message: string;
|
|
1681
|
+
code?: string;
|
|
1682
|
+
errors?: {
|
|
1683
|
+
path: string;
|
|
1684
|
+
message: string;
|
|
1685
|
+
}[];
|
|
1686
|
+
};
|
|
1687
|
+
};
|
|
1688
|
+
};
|
|
1689
|
+
403: {
|
|
1690
|
+
headers: {
|
|
1691
|
+
[name: string]: unknown;
|
|
1692
|
+
};
|
|
1693
|
+
content: {
|
|
1694
|
+
"application/json": {
|
|
1695
|
+
success: boolean;
|
|
1363
1696
|
message: string;
|
|
1364
1697
|
code?: string;
|
|
1365
1698
|
errors?: {
|
|
@@ -1375,13 +1708,30 @@ export declare class FacturacionClient {
|
|
|
1375
1708
|
};
|
|
1376
1709
|
content: {
|
|
1377
1710
|
"application/json": {
|
|
1378
|
-
success:
|
|
1711
|
+
success: boolean;
|
|
1712
|
+
message: string;
|
|
1713
|
+
code?: string;
|
|
1714
|
+
errors?: {
|
|
1715
|
+
path: string;
|
|
1716
|
+
message: string;
|
|
1717
|
+
}[];
|
|
1718
|
+
};
|
|
1719
|
+
};
|
|
1720
|
+
};
|
|
1721
|
+
429: {
|
|
1722
|
+
headers: {
|
|
1723
|
+
[name: string]: unknown;
|
|
1724
|
+
};
|
|
1725
|
+
content: {
|
|
1726
|
+
"application/json": {
|
|
1727
|
+
success: boolean;
|
|
1379
1728
|
message: string;
|
|
1380
1729
|
code?: string;
|
|
1381
1730
|
errors?: {
|
|
1382
1731
|
path: string;
|
|
1383
1732
|
message: string;
|
|
1384
1733
|
}[];
|
|
1734
|
+
retryAfterSeconds?: number;
|
|
1385
1735
|
};
|
|
1386
1736
|
};
|
|
1387
1737
|
};
|
|
@@ -1495,13 +1845,62 @@ export declare class FacturacionClient {
|
|
|
1495
1845
|
};
|
|
1496
1846
|
content: {
|
|
1497
1847
|
"application/json": {
|
|
1498
|
-
success:
|
|
1848
|
+
success: boolean;
|
|
1849
|
+
message: string;
|
|
1850
|
+
code?: string;
|
|
1851
|
+
errors?: {
|
|
1852
|
+
path: string;
|
|
1853
|
+
message: string;
|
|
1854
|
+
}[];
|
|
1855
|
+
};
|
|
1856
|
+
};
|
|
1857
|
+
};
|
|
1858
|
+
401: {
|
|
1859
|
+
headers: {
|
|
1860
|
+
[name: string]: unknown;
|
|
1861
|
+
};
|
|
1862
|
+
content: {
|
|
1863
|
+
"application/json": {
|
|
1864
|
+
success: boolean;
|
|
1865
|
+
message: string;
|
|
1866
|
+
code?: string;
|
|
1867
|
+
errors?: {
|
|
1868
|
+
path: string;
|
|
1869
|
+
message: string;
|
|
1870
|
+
}[];
|
|
1871
|
+
};
|
|
1872
|
+
};
|
|
1873
|
+
};
|
|
1874
|
+
403: {
|
|
1875
|
+
headers: {
|
|
1876
|
+
[name: string]: unknown;
|
|
1877
|
+
};
|
|
1878
|
+
content: {
|
|
1879
|
+
"application/json": {
|
|
1880
|
+
success: boolean;
|
|
1881
|
+
message: string;
|
|
1882
|
+
code?: string;
|
|
1883
|
+
errors?: {
|
|
1884
|
+
path: string;
|
|
1885
|
+
message: string;
|
|
1886
|
+
}[];
|
|
1887
|
+
};
|
|
1888
|
+
};
|
|
1889
|
+
};
|
|
1890
|
+
429: {
|
|
1891
|
+
headers: {
|
|
1892
|
+
[name: string]: unknown;
|
|
1893
|
+
};
|
|
1894
|
+
content: {
|
|
1895
|
+
"application/json": {
|
|
1896
|
+
success: boolean;
|
|
1499
1897
|
message: string;
|
|
1500
1898
|
code?: string;
|
|
1501
1899
|
errors?: {
|
|
1502
1900
|
path: string;
|
|
1503
1901
|
message: string;
|
|
1504
1902
|
}[];
|
|
1903
|
+
retryAfterSeconds?: number;
|
|
1505
1904
|
};
|
|
1506
1905
|
};
|
|
1507
1906
|
};
|
|
@@ -1559,13 +1958,62 @@ export declare class FacturacionClient {
|
|
|
1559
1958
|
};
|
|
1560
1959
|
content: {
|
|
1561
1960
|
"application/json": {
|
|
1562
|
-
success:
|
|
1961
|
+
success: boolean;
|
|
1962
|
+
message: string;
|
|
1963
|
+
code?: string;
|
|
1964
|
+
errors?: {
|
|
1965
|
+
path: string;
|
|
1966
|
+
message: string;
|
|
1967
|
+
}[];
|
|
1968
|
+
};
|
|
1969
|
+
};
|
|
1970
|
+
};
|
|
1971
|
+
401: {
|
|
1972
|
+
headers: {
|
|
1973
|
+
[name: string]: unknown;
|
|
1974
|
+
};
|
|
1975
|
+
content: {
|
|
1976
|
+
"application/json": {
|
|
1977
|
+
success: boolean;
|
|
1978
|
+
message: string;
|
|
1979
|
+
code?: string;
|
|
1980
|
+
errors?: {
|
|
1981
|
+
path: string;
|
|
1982
|
+
message: string;
|
|
1983
|
+
}[];
|
|
1984
|
+
};
|
|
1985
|
+
};
|
|
1986
|
+
};
|
|
1987
|
+
403: {
|
|
1988
|
+
headers: {
|
|
1989
|
+
[name: string]: unknown;
|
|
1990
|
+
};
|
|
1991
|
+
content: {
|
|
1992
|
+
"application/json": {
|
|
1993
|
+
success: boolean;
|
|
1994
|
+
message: string;
|
|
1995
|
+
code?: string;
|
|
1996
|
+
errors?: {
|
|
1997
|
+
path: string;
|
|
1998
|
+
message: string;
|
|
1999
|
+
}[];
|
|
2000
|
+
};
|
|
2001
|
+
};
|
|
2002
|
+
};
|
|
2003
|
+
429: {
|
|
2004
|
+
headers: {
|
|
2005
|
+
[name: string]: unknown;
|
|
2006
|
+
};
|
|
2007
|
+
content: {
|
|
2008
|
+
"application/json": {
|
|
2009
|
+
success: boolean;
|
|
1563
2010
|
message: string;
|
|
1564
2011
|
code?: string;
|
|
1565
2012
|
errors?: {
|
|
1566
2013
|
path: string;
|
|
1567
2014
|
message: string;
|
|
1568
2015
|
}[];
|
|
2016
|
+
retryAfterSeconds?: number;
|
|
1569
2017
|
};
|
|
1570
2018
|
};
|
|
1571
2019
|
};
|
|
@@ -1638,13 +2086,62 @@ export declare class FacturacionClient {
|
|
|
1638
2086
|
};
|
|
1639
2087
|
content: {
|
|
1640
2088
|
"application/json": {
|
|
1641
|
-
success:
|
|
2089
|
+
success: boolean;
|
|
2090
|
+
message: string;
|
|
2091
|
+
code?: string;
|
|
2092
|
+
errors?: {
|
|
2093
|
+
path: string;
|
|
2094
|
+
message: string;
|
|
2095
|
+
}[];
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
};
|
|
2099
|
+
401: {
|
|
2100
|
+
headers: {
|
|
2101
|
+
[name: string]: unknown;
|
|
2102
|
+
};
|
|
2103
|
+
content: {
|
|
2104
|
+
"application/json": {
|
|
2105
|
+
success: boolean;
|
|
2106
|
+
message: string;
|
|
2107
|
+
code?: string;
|
|
2108
|
+
errors?: {
|
|
2109
|
+
path: string;
|
|
2110
|
+
message: string;
|
|
2111
|
+
}[];
|
|
2112
|
+
};
|
|
2113
|
+
};
|
|
2114
|
+
};
|
|
2115
|
+
403: {
|
|
2116
|
+
headers: {
|
|
2117
|
+
[name: string]: unknown;
|
|
2118
|
+
};
|
|
2119
|
+
content: {
|
|
2120
|
+
"application/json": {
|
|
2121
|
+
success: boolean;
|
|
2122
|
+
message: string;
|
|
2123
|
+
code?: string;
|
|
2124
|
+
errors?: {
|
|
2125
|
+
path: string;
|
|
2126
|
+
message: string;
|
|
2127
|
+
}[];
|
|
2128
|
+
};
|
|
2129
|
+
};
|
|
2130
|
+
};
|
|
2131
|
+
429: {
|
|
2132
|
+
headers: {
|
|
2133
|
+
[name: string]: unknown;
|
|
2134
|
+
};
|
|
2135
|
+
content: {
|
|
2136
|
+
"application/json": {
|
|
2137
|
+
success: boolean;
|
|
1642
2138
|
message: string;
|
|
1643
2139
|
code?: string;
|
|
1644
2140
|
errors?: {
|
|
1645
2141
|
path: string;
|
|
1646
2142
|
message: string;
|
|
1647
2143
|
}[];
|
|
2144
|
+
retryAfterSeconds?: number;
|
|
1648
2145
|
};
|
|
1649
2146
|
};
|
|
1650
2147
|
};
|
|
@@ -1722,7 +2219,7 @@ export declare class FacturacionClient {
|
|
|
1722
2219
|
};
|
|
1723
2220
|
content: {
|
|
1724
2221
|
"application/json": {
|
|
1725
|
-
success:
|
|
2222
|
+
success: boolean;
|
|
1726
2223
|
message: string;
|
|
1727
2224
|
code?: string;
|
|
1728
2225
|
errors?: {
|
|
@@ -1732,14 +2229,63 @@ export declare class FacturacionClient {
|
|
|
1732
2229
|
};
|
|
1733
2230
|
};
|
|
1734
2231
|
};
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
2232
|
+
401: {
|
|
2233
|
+
headers: {
|
|
2234
|
+
[name: string]: unknown;
|
|
2235
|
+
};
|
|
2236
|
+
content: {
|
|
2237
|
+
"application/json": {
|
|
2238
|
+
success: boolean;
|
|
2239
|
+
message: string;
|
|
2240
|
+
code?: string;
|
|
2241
|
+
errors?: {
|
|
2242
|
+
path: string;
|
|
2243
|
+
message: string;
|
|
2244
|
+
}[];
|
|
2245
|
+
};
|
|
2246
|
+
};
|
|
2247
|
+
};
|
|
2248
|
+
403: {
|
|
2249
|
+
headers: {
|
|
2250
|
+
[name: string]: unknown;
|
|
2251
|
+
};
|
|
2252
|
+
content: {
|
|
2253
|
+
"application/json": {
|
|
2254
|
+
success: boolean;
|
|
2255
|
+
message: string;
|
|
2256
|
+
code?: string;
|
|
2257
|
+
errors?: {
|
|
2258
|
+
path: string;
|
|
2259
|
+
message: string;
|
|
2260
|
+
}[];
|
|
2261
|
+
};
|
|
2262
|
+
};
|
|
2263
|
+
};
|
|
2264
|
+
429: {
|
|
2265
|
+
headers: {
|
|
2266
|
+
[name: string]: unknown;
|
|
2267
|
+
};
|
|
2268
|
+
content: {
|
|
2269
|
+
"application/json": {
|
|
2270
|
+
success: boolean;
|
|
2271
|
+
message: string;
|
|
2272
|
+
code?: string;
|
|
2273
|
+
errors?: {
|
|
2274
|
+
path: string;
|
|
2275
|
+
message: string;
|
|
2276
|
+
}[];
|
|
2277
|
+
retryAfterSeconds?: number;
|
|
2278
|
+
};
|
|
2279
|
+
};
|
|
2280
|
+
};
|
|
2281
|
+
};
|
|
2282
|
+
}, {
|
|
2283
|
+
body: {
|
|
2284
|
+
empresaRuc: string;
|
|
2285
|
+
correlativo: string;
|
|
2286
|
+
fechaEmision: string;
|
|
2287
|
+
fechaReferencia: string;
|
|
2288
|
+
items: {
|
|
1743
2289
|
tipoDoc: string;
|
|
1744
2290
|
serie: string;
|
|
1745
2291
|
correlativo: string;
|
|
@@ -1797,6 +2343,55 @@ export declare class FacturacionClient {
|
|
|
1797
2343
|
};
|
|
1798
2344
|
};
|
|
1799
2345
|
};
|
|
2346
|
+
401: {
|
|
2347
|
+
headers: {
|
|
2348
|
+
[name: string]: unknown;
|
|
2349
|
+
};
|
|
2350
|
+
content: {
|
|
2351
|
+
"application/json": {
|
|
2352
|
+
success: boolean;
|
|
2353
|
+
message: string;
|
|
2354
|
+
code?: string;
|
|
2355
|
+
errors?: {
|
|
2356
|
+
path: string;
|
|
2357
|
+
message: string;
|
|
2358
|
+
}[];
|
|
2359
|
+
};
|
|
2360
|
+
};
|
|
2361
|
+
};
|
|
2362
|
+
403: {
|
|
2363
|
+
headers: {
|
|
2364
|
+
[name: string]: unknown;
|
|
2365
|
+
};
|
|
2366
|
+
content: {
|
|
2367
|
+
"application/json": {
|
|
2368
|
+
success: boolean;
|
|
2369
|
+
message: string;
|
|
2370
|
+
code?: string;
|
|
2371
|
+
errors?: {
|
|
2372
|
+
path: string;
|
|
2373
|
+
message: string;
|
|
2374
|
+
}[];
|
|
2375
|
+
};
|
|
2376
|
+
};
|
|
2377
|
+
};
|
|
2378
|
+
429: {
|
|
2379
|
+
headers: {
|
|
2380
|
+
[name: string]: unknown;
|
|
2381
|
+
};
|
|
2382
|
+
content: {
|
|
2383
|
+
"application/json": {
|
|
2384
|
+
success: boolean;
|
|
2385
|
+
message: string;
|
|
2386
|
+
code?: string;
|
|
2387
|
+
errors?: {
|
|
2388
|
+
path: string;
|
|
2389
|
+
message: string;
|
|
2390
|
+
}[];
|
|
2391
|
+
retryAfterSeconds?: number;
|
|
2392
|
+
};
|
|
2393
|
+
};
|
|
2394
|
+
};
|
|
1800
2395
|
};
|
|
1801
2396
|
}, {
|
|
1802
2397
|
params: {
|
|
@@ -1867,6 +2462,55 @@ export declare class FacturacionClient {
|
|
|
1867
2462
|
};
|
|
1868
2463
|
};
|
|
1869
2464
|
};
|
|
2465
|
+
401: {
|
|
2466
|
+
headers: {
|
|
2467
|
+
[name: string]: unknown;
|
|
2468
|
+
};
|
|
2469
|
+
content: {
|
|
2470
|
+
"application/json": {
|
|
2471
|
+
success: boolean;
|
|
2472
|
+
message: string;
|
|
2473
|
+
code?: string;
|
|
2474
|
+
errors?: {
|
|
2475
|
+
path: string;
|
|
2476
|
+
message: string;
|
|
2477
|
+
}[];
|
|
2478
|
+
};
|
|
2479
|
+
};
|
|
2480
|
+
};
|
|
2481
|
+
403: {
|
|
2482
|
+
headers: {
|
|
2483
|
+
[name: string]: unknown;
|
|
2484
|
+
};
|
|
2485
|
+
content: {
|
|
2486
|
+
"application/json": {
|
|
2487
|
+
success: boolean;
|
|
2488
|
+
message: string;
|
|
2489
|
+
code?: string;
|
|
2490
|
+
errors?: {
|
|
2491
|
+
path: string;
|
|
2492
|
+
message: string;
|
|
2493
|
+
}[];
|
|
2494
|
+
};
|
|
2495
|
+
};
|
|
2496
|
+
};
|
|
2497
|
+
429: {
|
|
2498
|
+
headers: {
|
|
2499
|
+
[name: string]: unknown;
|
|
2500
|
+
};
|
|
2501
|
+
content: {
|
|
2502
|
+
"application/json": {
|
|
2503
|
+
success: boolean;
|
|
2504
|
+
message: string;
|
|
2505
|
+
code?: string;
|
|
2506
|
+
errors?: {
|
|
2507
|
+
path: string;
|
|
2508
|
+
message: string;
|
|
2509
|
+
}[];
|
|
2510
|
+
retryAfterSeconds?: number;
|
|
2511
|
+
};
|
|
2512
|
+
};
|
|
2513
|
+
};
|
|
1870
2514
|
};
|
|
1871
2515
|
}, {
|
|
1872
2516
|
params: {
|
|
@@ -1896,33 +2540,23 @@ export declare class FacturacionClient {
|
|
|
1896
2540
|
};
|
|
1897
2541
|
requestBody?: never;
|
|
1898
2542
|
responses: {
|
|
1899
|
-
|
|
2543
|
+
401: {
|
|
1900
2544
|
headers: {
|
|
1901
2545
|
[name: string]: unknown;
|
|
1902
2546
|
};
|
|
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;
|
|
2547
|
+
content: {
|
|
2548
|
+
"application/json": {
|
|
2549
|
+
success: boolean;
|
|
2550
|
+
message: string;
|
|
2551
|
+
code?: string;
|
|
2552
|
+
errors?: {
|
|
2553
|
+
path: string;
|
|
2554
|
+
message: string;
|
|
2555
|
+
}[];
|
|
2556
|
+
};
|
|
2557
|
+
};
|
|
1920
2558
|
};
|
|
1921
|
-
|
|
1922
|
-
};
|
|
1923
|
-
requestBody?: never;
|
|
1924
|
-
responses: {
|
|
1925
|
-
202: {
|
|
2559
|
+
403: {
|
|
1926
2560
|
headers: {
|
|
1927
2561
|
[name: string]: unknown;
|
|
1928
2562
|
};
|
|
@@ -1930,23 +2564,28 @@ export declare class FacturacionClient {
|
|
|
1930
2564
|
"application/json": {
|
|
1931
2565
|
success: boolean;
|
|
1932
2566
|
message: string;
|
|
1933
|
-
|
|
2567
|
+
code?: string;
|
|
2568
|
+
errors?: {
|
|
2569
|
+
path: string;
|
|
2570
|
+
message: string;
|
|
2571
|
+
}[];
|
|
1934
2572
|
};
|
|
1935
2573
|
};
|
|
1936
2574
|
};
|
|
1937
|
-
|
|
2575
|
+
429: {
|
|
1938
2576
|
headers: {
|
|
1939
2577
|
[name: string]: unknown;
|
|
1940
2578
|
};
|
|
1941
2579
|
content: {
|
|
1942
2580
|
"application/json": {
|
|
1943
|
-
success:
|
|
2581
|
+
success: boolean;
|
|
1944
2582
|
message: string;
|
|
1945
2583
|
code?: string;
|
|
1946
2584
|
errors?: {
|
|
1947
2585
|
path: string;
|
|
1948
2586
|
message: string;
|
|
1949
2587
|
}[];
|
|
2588
|
+
retryAfterSeconds?: number;
|
|
1950
2589
|
};
|
|
1951
2590
|
};
|
|
1952
2591
|
};
|
|
@@ -1958,40 +2597,37 @@ export declare class FacturacionClient {
|
|
|
1958
2597
|
};
|
|
1959
2598
|
};
|
|
1960
2599
|
}, `${string}/${string}`>>;
|
|
1961
|
-
/**
|
|
1962
|
-
|
|
2600
|
+
/** Re-encola un documento fallido (COLA_FALLIDA). */
|
|
2601
|
+
retryDocument(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
1963
2602
|
parameters: {
|
|
1964
|
-
query
|
|
1965
|
-
companyRuc: string;
|
|
1966
|
-
tipoDoc: string;
|
|
1967
|
-
serie: string;
|
|
1968
|
-
};
|
|
2603
|
+
query?: never;
|
|
1969
2604
|
header?: never;
|
|
1970
|
-
path
|
|
2605
|
+
path: {
|
|
2606
|
+
id: string;
|
|
2607
|
+
};
|
|
1971
2608
|
cookie?: never;
|
|
1972
2609
|
};
|
|
1973
2610
|
requestBody?: never;
|
|
1974
2611
|
responses: {
|
|
1975
|
-
|
|
2612
|
+
202: {
|
|
1976
2613
|
headers: {
|
|
1977
2614
|
[name: string]: unknown;
|
|
1978
2615
|
};
|
|
1979
2616
|
content: {
|
|
1980
2617
|
"application/json": {
|
|
1981
|
-
success:
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
};
|
|
2618
|
+
success: boolean;
|
|
2619
|
+
message: string;
|
|
2620
|
+
jobId?: string;
|
|
1985
2621
|
};
|
|
1986
2622
|
};
|
|
1987
2623
|
};
|
|
1988
|
-
|
|
2624
|
+
400: {
|
|
1989
2625
|
headers: {
|
|
1990
2626
|
[name: string]: unknown;
|
|
1991
2627
|
};
|
|
1992
2628
|
content: {
|
|
1993
2629
|
"application/json": {
|
|
1994
|
-
success:
|
|
2630
|
+
success: boolean;
|
|
1995
2631
|
message: string;
|
|
1996
2632
|
code?: string;
|
|
1997
2633
|
errors?: {
|
|
@@ -2001,62 +2637,29 @@ export declare class FacturacionClient {
|
|
|
2001
2637
|
};
|
|
2002
2638
|
};
|
|
2003
2639
|
};
|
|
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: {
|
|
2640
|
+
401: {
|
|
2038
2641
|
headers: {
|
|
2039
2642
|
[name: string]: unknown;
|
|
2040
2643
|
};
|
|
2041
2644
|
content: {
|
|
2042
2645
|
"application/json": {
|
|
2043
2646
|
success: boolean;
|
|
2044
|
-
available: boolean;
|
|
2045
2647
|
message: string;
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2648
|
+
code?: string;
|
|
2649
|
+
errors?: {
|
|
2650
|
+
path: string;
|
|
2651
|
+
message: string;
|
|
2652
|
+
}[];
|
|
2050
2653
|
};
|
|
2051
2654
|
};
|
|
2052
2655
|
};
|
|
2053
|
-
|
|
2656
|
+
403: {
|
|
2054
2657
|
headers: {
|
|
2055
2658
|
[name: string]: unknown;
|
|
2056
2659
|
};
|
|
2057
2660
|
content: {
|
|
2058
2661
|
"application/json": {
|
|
2059
|
-
success:
|
|
2662
|
+
success: boolean;
|
|
2060
2663
|
message: string;
|
|
2061
2664
|
code?: string;
|
|
2062
2665
|
errors?: {
|
|
@@ -2066,47 +2669,145 @@ export declare class FacturacionClient {
|
|
|
2066
2669
|
};
|
|
2067
2670
|
};
|
|
2068
2671
|
};
|
|
2069
|
-
|
|
2672
|
+
429: {
|
|
2070
2673
|
headers: {
|
|
2071
2674
|
[name: string]: unknown;
|
|
2072
2675
|
};
|
|
2073
2676
|
content: {
|
|
2074
2677
|
"application/json": {
|
|
2075
|
-
success:
|
|
2678
|
+
success: boolean;
|
|
2076
2679
|
message: string;
|
|
2077
2680
|
code?: string;
|
|
2078
2681
|
errors?: {
|
|
2079
2682
|
path: string;
|
|
2080
2683
|
message: string;
|
|
2081
2684
|
}[];
|
|
2685
|
+
retryAfterSeconds?: number;
|
|
2082
2686
|
};
|
|
2083
2687
|
};
|
|
2084
2688
|
};
|
|
2085
2689
|
};
|
|
2086
2690
|
}, {
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
numero: string;
|
|
2691
|
+
params: {
|
|
2692
|
+
path: {
|
|
2693
|
+
id: string;
|
|
2694
|
+
};
|
|
2092
2695
|
};
|
|
2093
2696
|
}, `${string}/${string}`>>;
|
|
2094
|
-
/**
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2697
|
+
/** Siguiente correlativo disponible para una serie (por ambiente). */
|
|
2698
|
+
getNextCorrelativo(query: paths["/api/v1/documents/next-correlativo"]["get"]["parameters"]["query"]): Promise<import("openapi-fetch").FetchResponse<{
|
|
2699
|
+
parameters: {
|
|
2700
|
+
query: {
|
|
2701
|
+
companyRuc: string;
|
|
2702
|
+
tipoDoc: string;
|
|
2703
|
+
serie: string;
|
|
2704
|
+
};
|
|
2705
|
+
header?: never;
|
|
2706
|
+
path?: never;
|
|
2707
|
+
cookie?: never;
|
|
2708
|
+
};
|
|
2709
|
+
requestBody?: never;
|
|
2710
|
+
responses: {
|
|
2711
|
+
200: {
|
|
2712
|
+
headers: {
|
|
2713
|
+
[name: string]: unknown;
|
|
2714
|
+
};
|
|
2715
|
+
content: {
|
|
2716
|
+
"application/json": {
|
|
2717
|
+
success: boolean;
|
|
2718
|
+
data: {
|
|
2719
|
+
next: string;
|
|
2720
|
+
};
|
|
2721
|
+
};
|
|
2722
|
+
};
|
|
2723
|
+
};
|
|
2724
|
+
401: {
|
|
2725
|
+
headers: {
|
|
2726
|
+
[name: string]: unknown;
|
|
2727
|
+
};
|
|
2728
|
+
content: {
|
|
2729
|
+
"application/json": {
|
|
2730
|
+
success: boolean;
|
|
2731
|
+
message: string;
|
|
2732
|
+
code?: string;
|
|
2733
|
+
errors?: {
|
|
2734
|
+
path: string;
|
|
2735
|
+
message: string;
|
|
2736
|
+
}[];
|
|
2737
|
+
};
|
|
2738
|
+
};
|
|
2739
|
+
};
|
|
2740
|
+
403: {
|
|
2741
|
+
headers: {
|
|
2742
|
+
[name: string]: unknown;
|
|
2743
|
+
};
|
|
2744
|
+
content: {
|
|
2745
|
+
"application/json": {
|
|
2746
|
+
success: boolean;
|
|
2747
|
+
message: string;
|
|
2748
|
+
code?: string;
|
|
2749
|
+
errors?: {
|
|
2750
|
+
path: string;
|
|
2751
|
+
message: string;
|
|
2752
|
+
}[];
|
|
2753
|
+
};
|
|
2754
|
+
};
|
|
2755
|
+
};
|
|
2756
|
+
404: {
|
|
2757
|
+
headers: {
|
|
2758
|
+
[name: string]: unknown;
|
|
2759
|
+
};
|
|
2760
|
+
content: {
|
|
2761
|
+
"application/json": {
|
|
2762
|
+
success: boolean;
|
|
2763
|
+
message: string;
|
|
2764
|
+
code?: string;
|
|
2765
|
+
errors?: {
|
|
2766
|
+
path: string;
|
|
2767
|
+
message: string;
|
|
2768
|
+
}[];
|
|
2769
|
+
};
|
|
2770
|
+
};
|
|
2771
|
+
};
|
|
2772
|
+
429: {
|
|
2773
|
+
headers: {
|
|
2774
|
+
[name: string]: unknown;
|
|
2775
|
+
};
|
|
2776
|
+
content: {
|
|
2777
|
+
"application/json": {
|
|
2778
|
+
success: boolean;
|
|
2779
|
+
message: string;
|
|
2780
|
+
code?: string;
|
|
2781
|
+
errors?: {
|
|
2782
|
+
path: string;
|
|
2783
|
+
message: string;
|
|
2784
|
+
}[];
|
|
2785
|
+
retryAfterSeconds?: number;
|
|
2786
|
+
};
|
|
2787
|
+
};
|
|
2788
|
+
};
|
|
2789
|
+
};
|
|
2790
|
+
}, {
|
|
2791
|
+
params: {
|
|
2792
|
+
query: {
|
|
2793
|
+
companyRuc: string;
|
|
2794
|
+
tipoDoc: string;
|
|
2795
|
+
serie: string;
|
|
2796
|
+
};
|
|
2797
|
+
};
|
|
2798
|
+
}, `${string}/${string}`>>;
|
|
2799
|
+
/** XML firmado de una factura/boleta. */
|
|
2800
|
+
getInvoiceXml(id: string): Promise<ArrayBuffer>;
|
|
2801
|
+
/** CDR (constancia SUNAT) de una factura/boleta. */
|
|
2802
|
+
getInvoiceCdr(id: string): Promise<ArrayBuffer>;
|
|
2098
2803
|
/** PDF de una factura/boleta. */
|
|
2099
2804
|
getInvoicePdf(id: string): Promise<ArrayBuffer>;
|
|
2100
2805
|
/** XML firmado de una nota (07/08). */
|
|
2101
2806
|
getNoteXml(id: string): Promise<ArrayBuffer>;
|
|
2102
2807
|
/** PDF de una nota (07/08). */
|
|
2103
2808
|
getNotePdf(id: string): Promise<ArrayBuffer>;
|
|
2104
|
-
/** CDR (constancia SUNAT) de una nota (07/08). */
|
|
2105
|
-
getNoteCdr(id: string): Promise<ArrayBuffer>;
|
|
2106
2809
|
/** XML firmado de una guía de remisión (09/31). */
|
|
2107
2810
|
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
2811
|
/** PDF de una guía de remisión (09/31). `format`: a4 | ticket80 | ticket58. */
|
|
2111
2812
|
getDespatchPdf(id: string, format?: NonNullable<paths["/api/v1/despatch/{id}/pdf"]["get"]["parameters"]["query"]>["format"]): Promise<ArrayBuffer>;
|
|
2112
2813
|
/** Lista las empresas accesibles por la key. */
|
|
@@ -2119,114 +2820,59 @@ export declare class FacturacionClient {
|
|
|
2119
2820
|
};
|
|
2120
2821
|
requestBody?: never;
|
|
2121
2822
|
responses: {
|
|
2122
|
-
|
|
2823
|
+
401: {
|
|
2123
2824
|
headers: {
|
|
2124
2825
|
[name: string]: unknown;
|
|
2125
2826
|
};
|
|
2126
|
-
content
|
|
2827
|
+
content: {
|
|
2828
|
+
"application/json": {
|
|
2829
|
+
success: boolean;
|
|
2830
|
+
message: string;
|
|
2831
|
+
code?: string;
|
|
2832
|
+
errors?: {
|
|
2833
|
+
path: string;
|
|
2834
|
+
message: string;
|
|
2835
|
+
}[];
|
|
2836
|
+
};
|
|
2837
|
+
};
|
|
2127
2838
|
};
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
header?: never;
|
|
2143
|
-
path?: never;
|
|
2144
|
-
cookie?: never;
|
|
2145
|
-
};
|
|
2146
|
-
requestBody: {
|
|
2147
|
-
content: {
|
|
2148
|
-
"application/json": {
|
|
2149
|
-
ruc: string;
|
|
2150
|
-
razonSocial: string;
|
|
2151
|
-
nombreComercial?: string;
|
|
2152
|
-
ubigeo?: string;
|
|
2153
|
-
direccion?: string;
|
|
2154
|
-
departamento?: string;
|
|
2155
|
-
provincia?: string;
|
|
2156
|
-
distrito?: string;
|
|
2157
|
-
urbanizacion?: string;
|
|
2158
|
-
telefono?: string;
|
|
2159
|
-
email?: string;
|
|
2160
|
-
web?: string;
|
|
2161
|
-
solUser?: string;
|
|
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;
|
|
2839
|
+
403: {
|
|
2840
|
+
headers: {
|
|
2841
|
+
[name: string]: unknown;
|
|
2842
|
+
};
|
|
2843
|
+
content: {
|
|
2844
|
+
"application/json": {
|
|
2845
|
+
success: boolean;
|
|
2846
|
+
message: string;
|
|
2847
|
+
code?: string;
|
|
2848
|
+
errors?: {
|
|
2849
|
+
path: string;
|
|
2850
|
+
message: string;
|
|
2851
|
+
}[];
|
|
2852
|
+
};
|
|
2181
2853
|
};
|
|
2182
2854
|
};
|
|
2183
|
-
|
|
2184
|
-
responses: {
|
|
2185
|
-
200: {
|
|
2855
|
+
429: {
|
|
2186
2856
|
headers: {
|
|
2187
2857
|
[name: string]: unknown;
|
|
2188
2858
|
};
|
|
2189
|
-
content
|
|
2859
|
+
content: {
|
|
2860
|
+
"application/json": {
|
|
2861
|
+
success: boolean;
|
|
2862
|
+
message: string;
|
|
2863
|
+
code?: string;
|
|
2864
|
+
errors?: {
|
|
2865
|
+
path: string;
|
|
2866
|
+
message: string;
|
|
2867
|
+
}[];
|
|
2868
|
+
retryAfterSeconds?: number;
|
|
2869
|
+
};
|
|
2870
|
+
};
|
|
2190
2871
|
};
|
|
2191
2872
|
};
|
|
2192
|
-
}, {
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
razonSocial: string;
|
|
2196
|
-
nombreComercial?: string;
|
|
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;
|
|
2226
|
-
};
|
|
2227
|
-
}, `${string}/${string}`>>;
|
|
2228
|
-
/** Actualiza los datos de una empresa emisora (domicilio fiscal, contacto). */
|
|
2229
|
-
updateCompany(id: string, body: UpdateCompanyInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
2873
|
+
}, {}, `${string}/${string}`>>;
|
|
2874
|
+
/** Detalle de una empresa por ID. */
|
|
2875
|
+
getCompany(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2230
2876
|
parameters: {
|
|
2231
2877
|
query?: never;
|
|
2232
2878
|
header?: never;
|
|
@@ -2235,50 +2881,56 @@ export declare class FacturacionClient {
|
|
|
2235
2881
|
};
|
|
2236
2882
|
cookie?: never;
|
|
2237
2883
|
};
|
|
2238
|
-
requestBody
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
solPassword?: string;
|
|
2255
|
-
tenantId?: string;
|
|
2256
|
-
greClientId?: string;
|
|
2257
|
-
greClientSecret?: string;
|
|
2258
|
-
sunatProduction?: boolean;
|
|
2259
|
-
cuentasBancarias?: {
|
|
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;
|
|
2884
|
+
requestBody?: never;
|
|
2885
|
+
responses: {
|
|
2886
|
+
401: {
|
|
2887
|
+
headers: {
|
|
2888
|
+
[name: string]: unknown;
|
|
2889
|
+
};
|
|
2890
|
+
content: {
|
|
2891
|
+
"application/json": {
|
|
2892
|
+
success: boolean;
|
|
2893
|
+
message: string;
|
|
2894
|
+
code?: string;
|
|
2895
|
+
errors?: {
|
|
2896
|
+
path: string;
|
|
2897
|
+
message: string;
|
|
2898
|
+
}[];
|
|
2899
|
+
};
|
|
2273
2900
|
};
|
|
2274
2901
|
};
|
|
2275
|
-
|
|
2276
|
-
responses: {
|
|
2277
|
-
200: {
|
|
2902
|
+
403: {
|
|
2278
2903
|
headers: {
|
|
2279
2904
|
[name: string]: unknown;
|
|
2280
2905
|
};
|
|
2281
|
-
content
|
|
2906
|
+
content: {
|
|
2907
|
+
"application/json": {
|
|
2908
|
+
success: boolean;
|
|
2909
|
+
message: string;
|
|
2910
|
+
code?: string;
|
|
2911
|
+
errors?: {
|
|
2912
|
+
path: string;
|
|
2913
|
+
message: string;
|
|
2914
|
+
}[];
|
|
2915
|
+
};
|
|
2916
|
+
};
|
|
2917
|
+
};
|
|
2918
|
+
429: {
|
|
2919
|
+
headers: {
|
|
2920
|
+
[name: string]: unknown;
|
|
2921
|
+
};
|
|
2922
|
+
content: {
|
|
2923
|
+
"application/json": {
|
|
2924
|
+
success: boolean;
|
|
2925
|
+
message: string;
|
|
2926
|
+
code?: string;
|
|
2927
|
+
errors?: {
|
|
2928
|
+
path: string;
|
|
2929
|
+
message: string;
|
|
2930
|
+
}[];
|
|
2931
|
+
retryAfterSeconds?: number;
|
|
2932
|
+
};
|
|
2933
|
+
};
|
|
2282
2934
|
};
|
|
2283
2935
|
};
|
|
2284
2936
|
}, {
|
|
@@ -2287,43 +2939,11 @@ export declare class FacturacionClient {
|
|
|
2287
2939
|
id: string;
|
|
2288
2940
|
};
|
|
2289
2941
|
};
|
|
2290
|
-
body: {
|
|
2291
|
-
ruc?: string;
|
|
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;
|
|
2305
|
-
tenantId?: string;
|
|
2306
|
-
greClientId?: string;
|
|
2307
|
-
greClientSecret?: string;
|
|
2308
|
-
sunatProduction?: boolean;
|
|
2309
|
-
cuentasBancarias?: {
|
|
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;
|
|
2323
|
-
};
|
|
2324
2942
|
}, `${string}/${string}`>>;
|
|
2325
|
-
/**
|
|
2326
|
-
|
|
2943
|
+
/** Logo de la empresa (imagen). */
|
|
2944
|
+
getCompanyLogo(id: string): Promise<ArrayBuffer>;
|
|
2945
|
+
/** Lista los establecimientos de una empresa (incluye los desactivados). */
|
|
2946
|
+
listBranches(companyId: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2327
2947
|
parameters: {
|
|
2328
2948
|
query?: never;
|
|
2329
2949
|
header?: never;
|
|
@@ -2334,11 +2954,54 @@ export declare class FacturacionClient {
|
|
|
2334
2954
|
};
|
|
2335
2955
|
requestBody?: never;
|
|
2336
2956
|
responses: {
|
|
2337
|
-
|
|
2957
|
+
401: {
|
|
2338
2958
|
headers: {
|
|
2339
2959
|
[name: string]: unknown;
|
|
2340
2960
|
};
|
|
2341
|
-
content
|
|
2961
|
+
content: {
|
|
2962
|
+
"application/json": {
|
|
2963
|
+
success: boolean;
|
|
2964
|
+
message: string;
|
|
2965
|
+
code?: string;
|
|
2966
|
+
errors?: {
|
|
2967
|
+
path: string;
|
|
2968
|
+
message: string;
|
|
2969
|
+
}[];
|
|
2970
|
+
};
|
|
2971
|
+
};
|
|
2972
|
+
};
|
|
2973
|
+
403: {
|
|
2974
|
+
headers: {
|
|
2975
|
+
[name: string]: unknown;
|
|
2976
|
+
};
|
|
2977
|
+
content: {
|
|
2978
|
+
"application/json": {
|
|
2979
|
+
success: boolean;
|
|
2980
|
+
message: string;
|
|
2981
|
+
code?: string;
|
|
2982
|
+
errors?: {
|
|
2983
|
+
path: string;
|
|
2984
|
+
message: string;
|
|
2985
|
+
}[];
|
|
2986
|
+
};
|
|
2987
|
+
};
|
|
2988
|
+
};
|
|
2989
|
+
429: {
|
|
2990
|
+
headers: {
|
|
2991
|
+
[name: string]: unknown;
|
|
2992
|
+
};
|
|
2993
|
+
content: {
|
|
2994
|
+
"application/json": {
|
|
2995
|
+
success: boolean;
|
|
2996
|
+
message: string;
|
|
2997
|
+
code?: string;
|
|
2998
|
+
errors?: {
|
|
2999
|
+
path: string;
|
|
3000
|
+
message: string;
|
|
3001
|
+
}[];
|
|
3002
|
+
retryAfterSeconds?: number;
|
|
3003
|
+
};
|
|
3004
|
+
};
|
|
2342
3005
|
};
|
|
2343
3006
|
};
|
|
2344
3007
|
}, {
|
|
@@ -2348,10 +3011,13 @@ export declare class FacturacionClient {
|
|
|
2348
3011
|
};
|
|
2349
3012
|
};
|
|
2350
3013
|
}, `${string}/${string}`>>;
|
|
2351
|
-
/**
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
3014
|
+
/**
|
|
3015
|
+
* Crea un establecimiento. `codigo` son 4 dígitos y debe coincidir con el que
|
|
3016
|
+
* SUNAT asignó en el portal SOL (Mis Trámites > Establecimientos Anexos);
|
|
3017
|
+
* inventarlo hace que el comprobante salga con un anexo que SUNAT no conoce.
|
|
3018
|
+
* Responde 409 si ese código ya existe en la empresa.
|
|
3019
|
+
*/
|
|
3020
|
+
createBranch(companyId: string, body: CreateBranchInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
2355
3021
|
parameters: {
|
|
2356
3022
|
query?: never;
|
|
2357
3023
|
header?: never;
|
|
@@ -2360,13 +3026,463 @@ export declare class FacturacionClient {
|
|
|
2360
3026
|
};
|
|
2361
3027
|
cookie?: never;
|
|
2362
3028
|
};
|
|
3029
|
+
requestBody: {
|
|
3030
|
+
content: {
|
|
3031
|
+
"application/json": {
|
|
3032
|
+
codigo: string;
|
|
3033
|
+
nombre?: string;
|
|
3034
|
+
ubigeo?: string;
|
|
3035
|
+
direccion?: string;
|
|
3036
|
+
departamento?: string;
|
|
3037
|
+
provincia?: string;
|
|
3038
|
+
distrito?: string;
|
|
3039
|
+
urbanizacion?: string;
|
|
3040
|
+
isActive?: boolean;
|
|
3041
|
+
};
|
|
3042
|
+
};
|
|
3043
|
+
};
|
|
3044
|
+
responses: {
|
|
3045
|
+
401: {
|
|
3046
|
+
headers: {
|
|
3047
|
+
[name: string]: unknown;
|
|
3048
|
+
};
|
|
3049
|
+
content: {
|
|
3050
|
+
"application/json": {
|
|
3051
|
+
success: boolean;
|
|
3052
|
+
message: string;
|
|
3053
|
+
code?: string;
|
|
3054
|
+
errors?: {
|
|
3055
|
+
path: string;
|
|
3056
|
+
message: string;
|
|
3057
|
+
}[];
|
|
3058
|
+
};
|
|
3059
|
+
};
|
|
3060
|
+
};
|
|
3061
|
+
403: {
|
|
3062
|
+
headers: {
|
|
3063
|
+
[name: string]: unknown;
|
|
3064
|
+
};
|
|
3065
|
+
content: {
|
|
3066
|
+
"application/json": {
|
|
3067
|
+
success: boolean;
|
|
3068
|
+
message: string;
|
|
3069
|
+
code?: string;
|
|
3070
|
+
errors?: {
|
|
3071
|
+
path: string;
|
|
3072
|
+
message: string;
|
|
3073
|
+
}[];
|
|
3074
|
+
};
|
|
3075
|
+
};
|
|
3076
|
+
};
|
|
3077
|
+
429: {
|
|
3078
|
+
headers: {
|
|
3079
|
+
[name: string]: unknown;
|
|
3080
|
+
};
|
|
3081
|
+
content: {
|
|
3082
|
+
"application/json": {
|
|
3083
|
+
success: boolean;
|
|
3084
|
+
message: string;
|
|
3085
|
+
code?: string;
|
|
3086
|
+
errors?: {
|
|
3087
|
+
path: string;
|
|
3088
|
+
message: string;
|
|
3089
|
+
}[];
|
|
3090
|
+
retryAfterSeconds?: number;
|
|
3091
|
+
};
|
|
3092
|
+
};
|
|
3093
|
+
};
|
|
3094
|
+
};
|
|
3095
|
+
}, {
|
|
3096
|
+
params: {
|
|
3097
|
+
path: {
|
|
3098
|
+
id: string;
|
|
3099
|
+
};
|
|
3100
|
+
};
|
|
3101
|
+
body: {
|
|
3102
|
+
codigo: string;
|
|
3103
|
+
nombre?: string;
|
|
3104
|
+
ubigeo?: string;
|
|
3105
|
+
direccion?: string;
|
|
3106
|
+
departamento?: string;
|
|
3107
|
+
provincia?: string;
|
|
3108
|
+
distrito?: string;
|
|
3109
|
+
urbanizacion?: string;
|
|
3110
|
+
isActive?: boolean;
|
|
3111
|
+
};
|
|
3112
|
+
}, `${string}/${string}`>>;
|
|
3113
|
+
/** Actualiza un establecimiento. El `codigo` no se puede cambiar. */
|
|
3114
|
+
updateBranch(companyId: string, branchId: string, body: UpdateBranchInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
3115
|
+
parameters: {
|
|
3116
|
+
query?: never;
|
|
3117
|
+
header?: never;
|
|
3118
|
+
path: {
|
|
3119
|
+
id: string;
|
|
3120
|
+
branchId: string;
|
|
3121
|
+
};
|
|
3122
|
+
cookie?: never;
|
|
3123
|
+
};
|
|
3124
|
+
requestBody: {
|
|
3125
|
+
content: {
|
|
3126
|
+
"application/json": {
|
|
3127
|
+
nombre?: string;
|
|
3128
|
+
ubigeo?: string;
|
|
3129
|
+
direccion?: string;
|
|
3130
|
+
departamento?: string;
|
|
3131
|
+
provincia?: string;
|
|
3132
|
+
distrito?: string;
|
|
3133
|
+
urbanizacion?: string;
|
|
3134
|
+
isActive?: boolean;
|
|
3135
|
+
};
|
|
3136
|
+
};
|
|
3137
|
+
};
|
|
3138
|
+
responses: {
|
|
3139
|
+
401: {
|
|
3140
|
+
headers: {
|
|
3141
|
+
[name: string]: unknown;
|
|
3142
|
+
};
|
|
3143
|
+
content: {
|
|
3144
|
+
"application/json": {
|
|
3145
|
+
success: boolean;
|
|
3146
|
+
message: string;
|
|
3147
|
+
code?: string;
|
|
3148
|
+
errors?: {
|
|
3149
|
+
path: string;
|
|
3150
|
+
message: string;
|
|
3151
|
+
}[];
|
|
3152
|
+
};
|
|
3153
|
+
};
|
|
3154
|
+
};
|
|
3155
|
+
403: {
|
|
3156
|
+
headers: {
|
|
3157
|
+
[name: string]: unknown;
|
|
3158
|
+
};
|
|
3159
|
+
content: {
|
|
3160
|
+
"application/json": {
|
|
3161
|
+
success: boolean;
|
|
3162
|
+
message: string;
|
|
3163
|
+
code?: string;
|
|
3164
|
+
errors?: {
|
|
3165
|
+
path: string;
|
|
3166
|
+
message: string;
|
|
3167
|
+
}[];
|
|
3168
|
+
};
|
|
3169
|
+
};
|
|
3170
|
+
};
|
|
3171
|
+
429: {
|
|
3172
|
+
headers: {
|
|
3173
|
+
[name: string]: unknown;
|
|
3174
|
+
};
|
|
3175
|
+
content: {
|
|
3176
|
+
"application/json": {
|
|
3177
|
+
success: boolean;
|
|
3178
|
+
message: string;
|
|
3179
|
+
code?: string;
|
|
3180
|
+
errors?: {
|
|
3181
|
+
path: string;
|
|
3182
|
+
message: string;
|
|
3183
|
+
}[];
|
|
3184
|
+
retryAfterSeconds?: number;
|
|
3185
|
+
};
|
|
3186
|
+
};
|
|
3187
|
+
};
|
|
3188
|
+
};
|
|
3189
|
+
}, {
|
|
3190
|
+
params: {
|
|
3191
|
+
path: {
|
|
3192
|
+
id: string;
|
|
3193
|
+
branchId: string;
|
|
3194
|
+
};
|
|
3195
|
+
};
|
|
3196
|
+
body: {
|
|
3197
|
+
nombre?: string;
|
|
3198
|
+
ubigeo?: string;
|
|
3199
|
+
direccion?: string;
|
|
3200
|
+
departamento?: string;
|
|
3201
|
+
provincia?: string;
|
|
3202
|
+
distrito?: string;
|
|
3203
|
+
urbanizacion?: string;
|
|
3204
|
+
isActive?: boolean;
|
|
3205
|
+
};
|
|
3206
|
+
}, `${string}/${string}`>>;
|
|
3207
|
+
/**
|
|
3208
|
+
* Desactiva un establecimiento (soft-delete: `isActive=false`). No se borra
|
|
3209
|
+
* porque puede haber documentos emitidos desde ahí. El matriz "0000" no se
|
|
3210
|
+
* puede desactivar (409): es el default de toda emisión sin sucursal.
|
|
3211
|
+
*/
|
|
3212
|
+
deactivateBranch(companyId: string, branchId: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3213
|
+
parameters: {
|
|
3214
|
+
query?: never;
|
|
3215
|
+
header?: never;
|
|
3216
|
+
path: {
|
|
3217
|
+
id: string;
|
|
3218
|
+
branchId: string;
|
|
3219
|
+
};
|
|
3220
|
+
cookie?: never;
|
|
3221
|
+
};
|
|
2363
3222
|
requestBody?: never;
|
|
2364
3223
|
responses: {
|
|
2365
|
-
|
|
3224
|
+
401: {
|
|
2366
3225
|
headers: {
|
|
2367
3226
|
[name: string]: unknown;
|
|
2368
3227
|
};
|
|
2369
|
-
content
|
|
3228
|
+
content: {
|
|
3229
|
+
"application/json": {
|
|
3230
|
+
success: boolean;
|
|
3231
|
+
message: string;
|
|
3232
|
+
code?: string;
|
|
3233
|
+
errors?: {
|
|
3234
|
+
path: string;
|
|
3235
|
+
message: string;
|
|
3236
|
+
}[];
|
|
3237
|
+
};
|
|
3238
|
+
};
|
|
3239
|
+
};
|
|
3240
|
+
403: {
|
|
3241
|
+
headers: {
|
|
3242
|
+
[name: string]: unknown;
|
|
3243
|
+
};
|
|
3244
|
+
content: {
|
|
3245
|
+
"application/json": {
|
|
3246
|
+
success: boolean;
|
|
3247
|
+
message: string;
|
|
3248
|
+
code?: string;
|
|
3249
|
+
errors?: {
|
|
3250
|
+
path: string;
|
|
3251
|
+
message: string;
|
|
3252
|
+
}[];
|
|
3253
|
+
};
|
|
3254
|
+
};
|
|
3255
|
+
};
|
|
3256
|
+
429: {
|
|
3257
|
+
headers: {
|
|
3258
|
+
[name: string]: unknown;
|
|
3259
|
+
};
|
|
3260
|
+
content: {
|
|
3261
|
+
"application/json": {
|
|
3262
|
+
success: boolean;
|
|
3263
|
+
message: string;
|
|
3264
|
+
code?: string;
|
|
3265
|
+
errors?: {
|
|
3266
|
+
path: string;
|
|
3267
|
+
message: string;
|
|
3268
|
+
}[];
|
|
3269
|
+
retryAfterSeconds?: number;
|
|
3270
|
+
};
|
|
3271
|
+
};
|
|
3272
|
+
};
|
|
3273
|
+
};
|
|
3274
|
+
}, {
|
|
3275
|
+
params: {
|
|
3276
|
+
path: {
|
|
3277
|
+
id: string;
|
|
3278
|
+
branchId: string;
|
|
3279
|
+
};
|
|
3280
|
+
};
|
|
3281
|
+
}, `${string}/${string}`>>;
|
|
3282
|
+
/** Crea una suscripción a webhooks. El secret se devuelve UNA sola vez. */
|
|
3283
|
+
createWebhook(body: CreateWebhookInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
3284
|
+
parameters: {
|
|
3285
|
+
query?: never;
|
|
3286
|
+
header?: never;
|
|
3287
|
+
path?: never;
|
|
3288
|
+
cookie?: never;
|
|
3289
|
+
};
|
|
3290
|
+
requestBody: {
|
|
3291
|
+
content: {
|
|
3292
|
+
"application/json": {
|
|
3293
|
+
empresaRuc?: string;
|
|
3294
|
+
tenantId?: string;
|
|
3295
|
+
url: string;
|
|
3296
|
+
events: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
3297
|
+
description?: string;
|
|
3298
|
+
secret?: string;
|
|
3299
|
+
};
|
|
3300
|
+
};
|
|
3301
|
+
};
|
|
3302
|
+
responses: {
|
|
3303
|
+
401: {
|
|
3304
|
+
headers: {
|
|
3305
|
+
[name: string]: unknown;
|
|
3306
|
+
};
|
|
3307
|
+
content: {
|
|
3308
|
+
"application/json": {
|
|
3309
|
+
success: boolean;
|
|
3310
|
+
message: string;
|
|
3311
|
+
code?: string;
|
|
3312
|
+
errors?: {
|
|
3313
|
+
path: string;
|
|
3314
|
+
message: string;
|
|
3315
|
+
}[];
|
|
3316
|
+
};
|
|
3317
|
+
};
|
|
3318
|
+
};
|
|
3319
|
+
403: {
|
|
3320
|
+
headers: {
|
|
3321
|
+
[name: string]: unknown;
|
|
3322
|
+
};
|
|
3323
|
+
content: {
|
|
3324
|
+
"application/json": {
|
|
3325
|
+
success: boolean;
|
|
3326
|
+
message: string;
|
|
3327
|
+
code?: string;
|
|
3328
|
+
errors?: {
|
|
3329
|
+
path: string;
|
|
3330
|
+
message: string;
|
|
3331
|
+
}[];
|
|
3332
|
+
};
|
|
3333
|
+
};
|
|
3334
|
+
};
|
|
3335
|
+
429: {
|
|
3336
|
+
headers: {
|
|
3337
|
+
[name: string]: unknown;
|
|
3338
|
+
};
|
|
3339
|
+
content: {
|
|
3340
|
+
"application/json": {
|
|
3341
|
+
success: boolean;
|
|
3342
|
+
message: string;
|
|
3343
|
+
code?: string;
|
|
3344
|
+
errors?: {
|
|
3345
|
+
path: string;
|
|
3346
|
+
message: string;
|
|
3347
|
+
}[];
|
|
3348
|
+
retryAfterSeconds?: number;
|
|
3349
|
+
};
|
|
3350
|
+
};
|
|
3351
|
+
};
|
|
3352
|
+
};
|
|
3353
|
+
}, {
|
|
3354
|
+
body: {
|
|
3355
|
+
empresaRuc?: string;
|
|
3356
|
+
tenantId?: string;
|
|
3357
|
+
url: string;
|
|
3358
|
+
events: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
3359
|
+
description?: string;
|
|
3360
|
+
secret?: string;
|
|
3361
|
+
};
|
|
3362
|
+
}, `${string}/${string}`>>;
|
|
3363
|
+
/** Lista las suscripciones de webhooks. */
|
|
3364
|
+
listWebhooks(): Promise<import("openapi-fetch").FetchResponse<{
|
|
3365
|
+
parameters: {
|
|
3366
|
+
query?: {
|
|
3367
|
+
ruc?: string;
|
|
3368
|
+
};
|
|
3369
|
+
header?: never;
|
|
3370
|
+
path?: never;
|
|
3371
|
+
cookie?: never;
|
|
3372
|
+
};
|
|
3373
|
+
requestBody?: never;
|
|
3374
|
+
responses: {
|
|
3375
|
+
401: {
|
|
3376
|
+
headers: {
|
|
3377
|
+
[name: string]: unknown;
|
|
3378
|
+
};
|
|
3379
|
+
content: {
|
|
3380
|
+
"application/json": {
|
|
3381
|
+
success: boolean;
|
|
3382
|
+
message: string;
|
|
3383
|
+
code?: string;
|
|
3384
|
+
errors?: {
|
|
3385
|
+
path: string;
|
|
3386
|
+
message: string;
|
|
3387
|
+
}[];
|
|
3388
|
+
};
|
|
3389
|
+
};
|
|
3390
|
+
};
|
|
3391
|
+
403: {
|
|
3392
|
+
headers: {
|
|
3393
|
+
[name: string]: unknown;
|
|
3394
|
+
};
|
|
3395
|
+
content: {
|
|
3396
|
+
"application/json": {
|
|
3397
|
+
success: boolean;
|
|
3398
|
+
message: string;
|
|
3399
|
+
code?: string;
|
|
3400
|
+
errors?: {
|
|
3401
|
+
path: string;
|
|
3402
|
+
message: string;
|
|
3403
|
+
}[];
|
|
3404
|
+
};
|
|
3405
|
+
};
|
|
3406
|
+
};
|
|
3407
|
+
429: {
|
|
3408
|
+
headers: {
|
|
3409
|
+
[name: string]: unknown;
|
|
3410
|
+
};
|
|
3411
|
+
content: {
|
|
3412
|
+
"application/json": {
|
|
3413
|
+
success: boolean;
|
|
3414
|
+
message: string;
|
|
3415
|
+
code?: string;
|
|
3416
|
+
errors?: {
|
|
3417
|
+
path: string;
|
|
3418
|
+
message: string;
|
|
3419
|
+
}[];
|
|
3420
|
+
retryAfterSeconds?: number;
|
|
3421
|
+
};
|
|
3422
|
+
};
|
|
3423
|
+
};
|
|
3424
|
+
};
|
|
3425
|
+
}, {}, `${string}/${string}`>>;
|
|
3426
|
+
/** Detalle de una suscripción de webhook. */
|
|
3427
|
+
getWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3428
|
+
parameters: {
|
|
3429
|
+
query?: never;
|
|
3430
|
+
header?: never;
|
|
3431
|
+
path: {
|
|
3432
|
+
id: string;
|
|
3433
|
+
};
|
|
3434
|
+
cookie?: never;
|
|
3435
|
+
};
|
|
3436
|
+
requestBody?: never;
|
|
3437
|
+
responses: {
|
|
3438
|
+
401: {
|
|
3439
|
+
headers: {
|
|
3440
|
+
[name: string]: unknown;
|
|
3441
|
+
};
|
|
3442
|
+
content: {
|
|
3443
|
+
"application/json": {
|
|
3444
|
+
success: boolean;
|
|
3445
|
+
message: string;
|
|
3446
|
+
code?: string;
|
|
3447
|
+
errors?: {
|
|
3448
|
+
path: string;
|
|
3449
|
+
message: string;
|
|
3450
|
+
}[];
|
|
3451
|
+
};
|
|
3452
|
+
};
|
|
3453
|
+
};
|
|
3454
|
+
403: {
|
|
3455
|
+
headers: {
|
|
3456
|
+
[name: string]: unknown;
|
|
3457
|
+
};
|
|
3458
|
+
content: {
|
|
3459
|
+
"application/json": {
|
|
3460
|
+
success: boolean;
|
|
3461
|
+
message: string;
|
|
3462
|
+
code?: string;
|
|
3463
|
+
errors?: {
|
|
3464
|
+
path: string;
|
|
3465
|
+
message: string;
|
|
3466
|
+
}[];
|
|
3467
|
+
};
|
|
3468
|
+
};
|
|
3469
|
+
};
|
|
3470
|
+
429: {
|
|
3471
|
+
headers: {
|
|
3472
|
+
[name: string]: unknown;
|
|
3473
|
+
};
|
|
3474
|
+
content: {
|
|
3475
|
+
"application/json": {
|
|
3476
|
+
success: boolean;
|
|
3477
|
+
message: string;
|
|
3478
|
+
code?: string;
|
|
3479
|
+
errors?: {
|
|
3480
|
+
path: string;
|
|
3481
|
+
message: string;
|
|
3482
|
+
}[];
|
|
3483
|
+
retryAfterSeconds?: number;
|
|
3484
|
+
};
|
|
3485
|
+
};
|
|
2370
3486
|
};
|
|
2371
3487
|
};
|
|
2372
3488
|
}, {
|
|
@@ -2376,8 +3492,8 @@ export declare class FacturacionClient {
|
|
|
2376
3492
|
};
|
|
2377
3493
|
};
|
|
2378
3494
|
}, `${string}/${string}`>>;
|
|
2379
|
-
/**
|
|
2380
|
-
|
|
3495
|
+
/** Actualiza una suscripción de webhook (url, eventos, isActive). */
|
|
3496
|
+
updateWebhook(id: string, body: UpdateWebhookInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
2381
3497
|
parameters: {
|
|
2382
3498
|
query?: never;
|
|
2383
3499
|
header?: never;
|
|
@@ -2389,24 +3505,62 @@ export declare class FacturacionClient {
|
|
|
2389
3505
|
requestBody: {
|
|
2390
3506
|
content: {
|
|
2391
3507
|
"application/json": {
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
direccion?: string;
|
|
2396
|
-
departamento?: string;
|
|
2397
|
-
provincia?: string;
|
|
2398
|
-
distrito?: string;
|
|
2399
|
-
urbanizacion?: string;
|
|
3508
|
+
url?: string;
|
|
3509
|
+
events?: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
3510
|
+
description?: string;
|
|
2400
3511
|
isActive?: boolean;
|
|
2401
3512
|
};
|
|
2402
3513
|
};
|
|
2403
3514
|
};
|
|
2404
3515
|
responses: {
|
|
2405
|
-
|
|
3516
|
+
401: {
|
|
2406
3517
|
headers: {
|
|
2407
3518
|
[name: string]: unknown;
|
|
2408
3519
|
};
|
|
2409
|
-
content
|
|
3520
|
+
content: {
|
|
3521
|
+
"application/json": {
|
|
3522
|
+
success: boolean;
|
|
3523
|
+
message: string;
|
|
3524
|
+
code?: string;
|
|
3525
|
+
errors?: {
|
|
3526
|
+
path: string;
|
|
3527
|
+
message: string;
|
|
3528
|
+
}[];
|
|
3529
|
+
};
|
|
3530
|
+
};
|
|
3531
|
+
};
|
|
3532
|
+
403: {
|
|
3533
|
+
headers: {
|
|
3534
|
+
[name: string]: unknown;
|
|
3535
|
+
};
|
|
3536
|
+
content: {
|
|
3537
|
+
"application/json": {
|
|
3538
|
+
success: boolean;
|
|
3539
|
+
message: string;
|
|
3540
|
+
code?: string;
|
|
3541
|
+
errors?: {
|
|
3542
|
+
path: string;
|
|
3543
|
+
message: string;
|
|
3544
|
+
}[];
|
|
3545
|
+
};
|
|
3546
|
+
};
|
|
3547
|
+
};
|
|
3548
|
+
429: {
|
|
3549
|
+
headers: {
|
|
3550
|
+
[name: string]: unknown;
|
|
3551
|
+
};
|
|
3552
|
+
content: {
|
|
3553
|
+
"application/json": {
|
|
3554
|
+
success: boolean;
|
|
3555
|
+
message: string;
|
|
3556
|
+
code?: string;
|
|
3557
|
+
errors?: {
|
|
3558
|
+
path: string;
|
|
3559
|
+
message: string;
|
|
3560
|
+
}[];
|
|
3561
|
+
retryAfterSeconds?: number;
|
|
3562
|
+
};
|
|
3563
|
+
};
|
|
2410
3564
|
};
|
|
2411
3565
|
};
|
|
2412
3566
|
}, {
|
|
@@ -2416,180 +3570,284 @@ export declare class FacturacionClient {
|
|
|
2416
3570
|
};
|
|
2417
3571
|
};
|
|
2418
3572
|
body: {
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
direccion?: string;
|
|
2423
|
-
departamento?: string;
|
|
2424
|
-
provincia?: string;
|
|
2425
|
-
distrito?: string;
|
|
2426
|
-
urbanizacion?: string;
|
|
3573
|
+
url?: string;
|
|
3574
|
+
events?: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
3575
|
+
description?: string;
|
|
2427
3576
|
isActive?: boolean;
|
|
2428
3577
|
};
|
|
2429
3578
|
}, `${string}/${string}`>>;
|
|
2430
|
-
/**
|
|
2431
|
-
|
|
3579
|
+
/** Elimina una suscripción de webhook. */
|
|
3580
|
+
deleteWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2432
3581
|
parameters: {
|
|
2433
3582
|
query?: never;
|
|
2434
3583
|
header?: never;
|
|
2435
3584
|
path: {
|
|
2436
3585
|
id: string;
|
|
2437
|
-
branchId: string;
|
|
2438
3586
|
};
|
|
2439
3587
|
cookie?: never;
|
|
2440
3588
|
};
|
|
2441
|
-
requestBody
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
3589
|
+
requestBody?: never;
|
|
3590
|
+
responses: {
|
|
3591
|
+
401: {
|
|
3592
|
+
headers: {
|
|
3593
|
+
[name: string]: unknown;
|
|
3594
|
+
};
|
|
3595
|
+
content: {
|
|
3596
|
+
"application/json": {
|
|
3597
|
+
success: boolean;
|
|
3598
|
+
message: string;
|
|
3599
|
+
code?: string;
|
|
3600
|
+
errors?: {
|
|
3601
|
+
path: string;
|
|
3602
|
+
message: string;
|
|
3603
|
+
}[];
|
|
3604
|
+
};
|
|
2452
3605
|
};
|
|
2453
3606
|
};
|
|
2454
|
-
|
|
2455
|
-
responses: {
|
|
2456
|
-
200: {
|
|
3607
|
+
403: {
|
|
2457
3608
|
headers: {
|
|
2458
3609
|
[name: string]: unknown;
|
|
2459
3610
|
};
|
|
2460
|
-
content
|
|
3611
|
+
content: {
|
|
3612
|
+
"application/json": {
|
|
3613
|
+
success: boolean;
|
|
3614
|
+
message: string;
|
|
3615
|
+
code?: string;
|
|
3616
|
+
errors?: {
|
|
3617
|
+
path: string;
|
|
3618
|
+
message: string;
|
|
3619
|
+
}[];
|
|
3620
|
+
};
|
|
3621
|
+
};
|
|
3622
|
+
};
|
|
3623
|
+
429: {
|
|
3624
|
+
headers: {
|
|
3625
|
+
[name: string]: unknown;
|
|
3626
|
+
};
|
|
3627
|
+
content: {
|
|
3628
|
+
"application/json": {
|
|
3629
|
+
success: boolean;
|
|
3630
|
+
message: string;
|
|
3631
|
+
code?: string;
|
|
3632
|
+
errors?: {
|
|
3633
|
+
path: string;
|
|
3634
|
+
message: string;
|
|
3635
|
+
}[];
|
|
3636
|
+
retryAfterSeconds?: number;
|
|
3637
|
+
};
|
|
3638
|
+
};
|
|
2461
3639
|
};
|
|
2462
3640
|
};
|
|
2463
3641
|
}, {
|
|
2464
3642
|
params: {
|
|
2465
3643
|
path: {
|
|
2466
3644
|
id: string;
|
|
2467
|
-
branchId: string;
|
|
2468
3645
|
};
|
|
2469
3646
|
};
|
|
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
3647
|
}, `${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<{
|
|
3648
|
+
/** Lista los intentos de entrega de un webhook. */
|
|
3649
|
+
listWebhookDeliveries(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2486
3650
|
parameters: {
|
|
2487
|
-
query?:
|
|
3651
|
+
query?: {
|
|
3652
|
+
limit?: number;
|
|
3653
|
+
success?: "true" | "false";
|
|
3654
|
+
};
|
|
2488
3655
|
header?: never;
|
|
2489
3656
|
path: {
|
|
2490
3657
|
id: string;
|
|
2491
|
-
branchId: string;
|
|
2492
3658
|
};
|
|
2493
3659
|
cookie?: never;
|
|
2494
3660
|
};
|
|
2495
3661
|
requestBody?: never;
|
|
2496
3662
|
responses: {
|
|
2497
|
-
|
|
3663
|
+
401: {
|
|
2498
3664
|
headers: {
|
|
2499
3665
|
[name: string]: unknown;
|
|
2500
3666
|
};
|
|
2501
|
-
content
|
|
3667
|
+
content: {
|
|
3668
|
+
"application/json": {
|
|
3669
|
+
success: boolean;
|
|
3670
|
+
message: string;
|
|
3671
|
+
code?: string;
|
|
3672
|
+
errors?: {
|
|
3673
|
+
path: string;
|
|
3674
|
+
message: string;
|
|
3675
|
+
}[];
|
|
3676
|
+
};
|
|
3677
|
+
};
|
|
3678
|
+
};
|
|
3679
|
+
403: {
|
|
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
|
+
429: {
|
|
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
|
+
retryAfterSeconds?: number;
|
|
3709
|
+
};
|
|
3710
|
+
};
|
|
2502
3711
|
};
|
|
2503
3712
|
};
|
|
2504
3713
|
}, {
|
|
2505
3714
|
params: {
|
|
2506
3715
|
path: {
|
|
2507
3716
|
id: string;
|
|
2508
|
-
branchId: string;
|
|
2509
3717
|
};
|
|
2510
3718
|
};
|
|
2511
3719
|
}, `${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<{
|
|
3720
|
+
/** Reintenta manualmente una entrega de webhook. */
|
|
3721
|
+
redeliverWebhook(id: string, deliveryId: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2520
3722
|
parameters: {
|
|
2521
3723
|
query?: never;
|
|
2522
3724
|
header?: never;
|
|
2523
|
-
path
|
|
3725
|
+
path: {
|
|
3726
|
+
id: string;
|
|
3727
|
+
deliveryId: string;
|
|
3728
|
+
};
|
|
2524
3729
|
cookie?: never;
|
|
2525
3730
|
};
|
|
2526
|
-
requestBody
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
3731
|
+
requestBody?: never;
|
|
3732
|
+
responses: {
|
|
3733
|
+
401: {
|
|
3734
|
+
headers: {
|
|
3735
|
+
[name: string]: unknown;
|
|
3736
|
+
};
|
|
3737
|
+
content: {
|
|
3738
|
+
"application/json": {
|
|
3739
|
+
success: boolean;
|
|
3740
|
+
message: string;
|
|
3741
|
+
code?: string;
|
|
3742
|
+
errors?: {
|
|
3743
|
+
path: string;
|
|
3744
|
+
message: string;
|
|
3745
|
+
}[];
|
|
3746
|
+
};
|
|
2535
3747
|
};
|
|
2536
3748
|
};
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
3749
|
+
403: {
|
|
3750
|
+
headers: {
|
|
3751
|
+
[name: string]: unknown;
|
|
3752
|
+
};
|
|
3753
|
+
content: {
|
|
3754
|
+
"application/json": {
|
|
3755
|
+
success: boolean;
|
|
3756
|
+
message: string;
|
|
3757
|
+
code?: string;
|
|
3758
|
+
errors?: {
|
|
3759
|
+
path: string;
|
|
3760
|
+
message: string;
|
|
3761
|
+
}[];
|
|
3762
|
+
};
|
|
3763
|
+
};
|
|
3764
|
+
};
|
|
3765
|
+
429: {
|
|
2540
3766
|
headers: {
|
|
2541
3767
|
[name: string]: unknown;
|
|
2542
3768
|
};
|
|
2543
|
-
content
|
|
3769
|
+
content: {
|
|
3770
|
+
"application/json": {
|
|
3771
|
+
success: boolean;
|
|
3772
|
+
message: string;
|
|
3773
|
+
code?: string;
|
|
3774
|
+
errors?: {
|
|
3775
|
+
path: string;
|
|
3776
|
+
message: string;
|
|
3777
|
+
}[];
|
|
3778
|
+
retryAfterSeconds?: number;
|
|
3779
|
+
};
|
|
3780
|
+
};
|
|
2544
3781
|
};
|
|
2545
3782
|
};
|
|
2546
3783
|
}, {
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
description?: string;
|
|
2553
|
-
secret?: string;
|
|
3784
|
+
params: {
|
|
3785
|
+
path: {
|
|
3786
|
+
id: string;
|
|
3787
|
+
deliveryId: string;
|
|
3788
|
+
};
|
|
2554
3789
|
};
|
|
2555
3790
|
}, `${string}/${string}`>>;
|
|
2556
|
-
/**
|
|
2557
|
-
|
|
3791
|
+
/** Dispara un evento de prueba (webhook.test) para verificar conectividad. */
|
|
3792
|
+
testWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2558
3793
|
parameters: {
|
|
2559
|
-
query?:
|
|
2560
|
-
ruc?: string;
|
|
2561
|
-
};
|
|
3794
|
+
query?: never;
|
|
2562
3795
|
header?: never;
|
|
2563
|
-
path
|
|
3796
|
+
path: {
|
|
3797
|
+
id: string;
|
|
3798
|
+
};
|
|
2564
3799
|
cookie?: never;
|
|
2565
3800
|
};
|
|
2566
3801
|
requestBody?: never;
|
|
2567
3802
|
responses: {
|
|
2568
|
-
|
|
3803
|
+
401: {
|
|
2569
3804
|
headers: {
|
|
2570
3805
|
[name: string]: unknown;
|
|
2571
3806
|
};
|
|
2572
|
-
content
|
|
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
|
+
};
|
|
2573
3818
|
};
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
3819
|
+
403: {
|
|
3820
|
+
headers: {
|
|
3821
|
+
[name: string]: unknown;
|
|
3822
|
+
};
|
|
3823
|
+
content: {
|
|
3824
|
+
"application/json": {
|
|
3825
|
+
success: boolean;
|
|
3826
|
+
message: string;
|
|
3827
|
+
code?: string;
|
|
3828
|
+
errors?: {
|
|
3829
|
+
path: string;
|
|
3830
|
+
message: string;
|
|
3831
|
+
}[];
|
|
3832
|
+
};
|
|
3833
|
+
};
|
|
2583
3834
|
};
|
|
2584
|
-
|
|
2585
|
-
};
|
|
2586
|
-
requestBody?: never;
|
|
2587
|
-
responses: {
|
|
2588
|
-
200: {
|
|
3835
|
+
429: {
|
|
2589
3836
|
headers: {
|
|
2590
3837
|
[name: string]: unknown;
|
|
2591
3838
|
};
|
|
2592
|
-
content
|
|
3839
|
+
content: {
|
|
3840
|
+
"application/json": {
|
|
3841
|
+
success: boolean;
|
|
3842
|
+
message: string;
|
|
3843
|
+
code?: string;
|
|
3844
|
+
errors?: {
|
|
3845
|
+
path: string;
|
|
3846
|
+
message: string;
|
|
3847
|
+
}[];
|
|
3848
|
+
retryAfterSeconds?: number;
|
|
3849
|
+
};
|
|
3850
|
+
};
|
|
2593
3851
|
};
|
|
2594
3852
|
};
|
|
2595
3853
|
}, {
|
|
@@ -2599,8 +3857,8 @@ export declare class FacturacionClient {
|
|
|
2599
3857
|
};
|
|
2600
3858
|
};
|
|
2601
3859
|
}, `${string}/${string}`>>;
|
|
2602
|
-
/**
|
|
2603
|
-
|
|
3860
|
+
/** Rota el secret HMAC de un webhook. El nuevo secret se devuelve una sola vez. */
|
|
3861
|
+
rotateWebhookSecret(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2604
3862
|
parameters: {
|
|
2605
3863
|
query?: never;
|
|
2606
3864
|
header?: never;
|
|
@@ -2609,22 +3867,56 @@ export declare class FacturacionClient {
|
|
|
2609
3867
|
};
|
|
2610
3868
|
cookie?: never;
|
|
2611
3869
|
};
|
|
2612
|
-
requestBody
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
3870
|
+
requestBody?: never;
|
|
3871
|
+
responses: {
|
|
3872
|
+
401: {
|
|
3873
|
+
headers: {
|
|
3874
|
+
[name: string]: unknown;
|
|
3875
|
+
};
|
|
3876
|
+
content: {
|
|
3877
|
+
"application/json": {
|
|
3878
|
+
success: boolean;
|
|
3879
|
+
message: string;
|
|
3880
|
+
code?: string;
|
|
3881
|
+
errors?: {
|
|
3882
|
+
path: string;
|
|
3883
|
+
message: string;
|
|
3884
|
+
}[];
|
|
3885
|
+
};
|
|
2619
3886
|
};
|
|
2620
3887
|
};
|
|
2621
|
-
|
|
2622
|
-
responses: {
|
|
2623
|
-
200: {
|
|
3888
|
+
403: {
|
|
2624
3889
|
headers: {
|
|
2625
3890
|
[name: string]: unknown;
|
|
2626
3891
|
};
|
|
2627
|
-
content
|
|
3892
|
+
content: {
|
|
3893
|
+
"application/json": {
|
|
3894
|
+
success: boolean;
|
|
3895
|
+
message: string;
|
|
3896
|
+
code?: string;
|
|
3897
|
+
errors?: {
|
|
3898
|
+
path: string;
|
|
3899
|
+
message: string;
|
|
3900
|
+
}[];
|
|
3901
|
+
};
|
|
3902
|
+
};
|
|
3903
|
+
};
|
|
3904
|
+
429: {
|
|
3905
|
+
headers: {
|
|
3906
|
+
[name: string]: unknown;
|
|
3907
|
+
};
|
|
3908
|
+
content: {
|
|
3909
|
+
"application/json": {
|
|
3910
|
+
success: boolean;
|
|
3911
|
+
message: string;
|
|
3912
|
+
code?: string;
|
|
3913
|
+
errors?: {
|
|
3914
|
+
path: string;
|
|
3915
|
+
message: string;
|
|
3916
|
+
}[];
|
|
3917
|
+
retryAfterSeconds?: number;
|
|
3918
|
+
};
|
|
3919
|
+
};
|
|
2628
3920
|
};
|
|
2629
3921
|
};
|
|
2630
3922
|
}, {
|
|
@@ -2633,21 +3925,13 @@ export declare class FacturacionClient {
|
|
|
2633
3925
|
id: string;
|
|
2634
3926
|
};
|
|
2635
3927
|
};
|
|
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
3928
|
}, `${string}/${string}`>>;
|
|
2643
|
-
/**
|
|
2644
|
-
|
|
3929
|
+
/** Lista los catálogos SUNAT disponibles. */
|
|
3930
|
+
getCatalogs(): Promise<import("openapi-fetch").FetchResponse<{
|
|
2645
3931
|
parameters: {
|
|
2646
3932
|
query?: never;
|
|
2647
3933
|
header?: never;
|
|
2648
|
-
path
|
|
2649
|
-
id: string;
|
|
2650
|
-
};
|
|
3934
|
+
path?: never;
|
|
2651
3935
|
cookie?: never;
|
|
2652
3936
|
};
|
|
2653
3937
|
requestBody?: never;
|
|
@@ -2656,54 +3940,164 @@ export declare class FacturacionClient {
|
|
|
2656
3940
|
headers: {
|
|
2657
3941
|
[name: string]: unknown;
|
|
2658
3942
|
};
|
|
2659
|
-
content
|
|
3943
|
+
content: {
|
|
3944
|
+
"application/json": {
|
|
3945
|
+
success: boolean;
|
|
3946
|
+
data: {
|
|
3947
|
+
key: string;
|
|
3948
|
+
name: string;
|
|
3949
|
+
items: {
|
|
3950
|
+
code: string;
|
|
3951
|
+
label: string;
|
|
3952
|
+
}[];
|
|
3953
|
+
}[];
|
|
3954
|
+
};
|
|
3955
|
+
};
|
|
2660
3956
|
};
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
3957
|
+
401: {
|
|
3958
|
+
headers: {
|
|
3959
|
+
[name: string]: unknown;
|
|
3960
|
+
};
|
|
3961
|
+
content: {
|
|
3962
|
+
"application/json": {
|
|
3963
|
+
success: boolean;
|
|
3964
|
+
message: string;
|
|
3965
|
+
code?: string;
|
|
3966
|
+
errors?: {
|
|
3967
|
+
path: string;
|
|
3968
|
+
message: string;
|
|
3969
|
+
}[];
|
|
3970
|
+
};
|
|
3971
|
+
};
|
|
3972
|
+
};
|
|
3973
|
+
403: {
|
|
3974
|
+
headers: {
|
|
3975
|
+
[name: string]: unknown;
|
|
3976
|
+
};
|
|
3977
|
+
content: {
|
|
3978
|
+
"application/json": {
|
|
3979
|
+
success: boolean;
|
|
3980
|
+
message: string;
|
|
3981
|
+
code?: string;
|
|
3982
|
+
errors?: {
|
|
3983
|
+
path: string;
|
|
3984
|
+
message: string;
|
|
3985
|
+
}[];
|
|
3986
|
+
};
|
|
3987
|
+
};
|
|
3988
|
+
};
|
|
3989
|
+
429: {
|
|
3990
|
+
headers: {
|
|
3991
|
+
[name: string]: unknown;
|
|
3992
|
+
};
|
|
3993
|
+
content: {
|
|
3994
|
+
"application/json": {
|
|
3995
|
+
success: boolean;
|
|
3996
|
+
message: string;
|
|
3997
|
+
code?: string;
|
|
3998
|
+
errors?: {
|
|
3999
|
+
path: string;
|
|
4000
|
+
message: string;
|
|
4001
|
+
}[];
|
|
4002
|
+
retryAfterSeconds?: number;
|
|
4003
|
+
};
|
|
4004
|
+
};
|
|
2666
4005
|
};
|
|
2667
4006
|
};
|
|
2668
|
-
}, `${string}/${string}`>>;
|
|
2669
|
-
/**
|
|
2670
|
-
|
|
4007
|
+
}, {}, `${string}/${string}`>>;
|
|
4008
|
+
/** Obtiene un catálogo SUNAT por clave (ej: "07", "61"). */
|
|
4009
|
+
getCatalog(key: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2671
4010
|
parameters: {
|
|
2672
|
-
query?:
|
|
2673
|
-
limit?: number;
|
|
2674
|
-
success?: "true" | "false";
|
|
2675
|
-
};
|
|
4011
|
+
query?: never;
|
|
2676
4012
|
header?: never;
|
|
2677
4013
|
path: {
|
|
2678
|
-
|
|
4014
|
+
key: string;
|
|
2679
4015
|
};
|
|
2680
4016
|
cookie?: never;
|
|
2681
4017
|
};
|
|
2682
4018
|
requestBody?: never;
|
|
2683
4019
|
responses: {
|
|
2684
|
-
|
|
4020
|
+
401: {
|
|
4021
|
+
headers: {
|
|
4022
|
+
[name: string]: unknown;
|
|
4023
|
+
};
|
|
4024
|
+
content: {
|
|
4025
|
+
"application/json": {
|
|
4026
|
+
success: boolean;
|
|
4027
|
+
message: string;
|
|
4028
|
+
code?: string;
|
|
4029
|
+
errors?: {
|
|
4030
|
+
path: string;
|
|
4031
|
+
message: string;
|
|
4032
|
+
}[];
|
|
4033
|
+
};
|
|
4034
|
+
};
|
|
4035
|
+
};
|
|
4036
|
+
403: {
|
|
4037
|
+
headers: {
|
|
4038
|
+
[name: string]: unknown;
|
|
4039
|
+
};
|
|
4040
|
+
content: {
|
|
4041
|
+
"application/json": {
|
|
4042
|
+
success: boolean;
|
|
4043
|
+
message: string;
|
|
4044
|
+
code?: string;
|
|
4045
|
+
errors?: {
|
|
4046
|
+
path: string;
|
|
4047
|
+
message: string;
|
|
4048
|
+
}[];
|
|
4049
|
+
};
|
|
4050
|
+
};
|
|
4051
|
+
};
|
|
4052
|
+
429: {
|
|
2685
4053
|
headers: {
|
|
2686
4054
|
[name: string]: unknown;
|
|
2687
4055
|
};
|
|
2688
|
-
content
|
|
4056
|
+
content: {
|
|
4057
|
+
"application/json": {
|
|
4058
|
+
success: boolean;
|
|
4059
|
+
message: string;
|
|
4060
|
+
code?: string;
|
|
4061
|
+
errors?: {
|
|
4062
|
+
path: string;
|
|
4063
|
+
message: string;
|
|
4064
|
+
}[];
|
|
4065
|
+
retryAfterSeconds?: number;
|
|
4066
|
+
};
|
|
4067
|
+
};
|
|
2689
4068
|
};
|
|
2690
4069
|
};
|
|
2691
4070
|
}, {
|
|
2692
4071
|
params: {
|
|
2693
4072
|
path: {
|
|
2694
|
-
|
|
4073
|
+
key: string;
|
|
2695
4074
|
};
|
|
2696
4075
|
};
|
|
2697
4076
|
}, `${string}/${string}`>>;
|
|
2698
|
-
/**
|
|
2699
|
-
|
|
4077
|
+
/**
|
|
4078
|
+
* Busca un Código de Producto SUNAT por texto libre o por prefijo de código.
|
|
4079
|
+
*
|
|
4080
|
+
* Ignora tildes y mayúsculas, y exige que aparezcan todos los términos.
|
|
4081
|
+
* Devuelve primero las CLASE: SUNAT pide llegar como mínimo a ese nivel y es
|
|
4082
|
+
* la respuesta correcta en la mayoría de casos.
|
|
4083
|
+
*
|
|
4084
|
+
* ```ts
|
|
4085
|
+
* const { data } = await sdk.buscarProductoSunat("aceite motor");
|
|
4086
|
+
* data?.data.items[0].codigo; // "15121501"
|
|
4087
|
+
* ```
|
|
4088
|
+
*/
|
|
4089
|
+
buscarProductoSunat(q: string, opciones?: {
|
|
4090
|
+
nivel?: "CLASE" | "PRODUCTO";
|
|
4091
|
+
limit?: number;
|
|
4092
|
+
}): Promise<import("openapi-fetch").FetchResponse<{
|
|
2700
4093
|
parameters: {
|
|
2701
|
-
query
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
deliveryId: string;
|
|
4094
|
+
query: {
|
|
4095
|
+
q: string;
|
|
4096
|
+
nivel?: "CLASE" | "PRODUCTO";
|
|
4097
|
+
limit?: number;
|
|
2706
4098
|
};
|
|
4099
|
+
header?: never;
|
|
4100
|
+
path?: never;
|
|
2707
4101
|
cookie?: never;
|
|
2708
4102
|
};
|
|
2709
4103
|
requestBody?: never;
|
|
@@ -2712,50 +4106,91 @@ export declare class FacturacionClient {
|
|
|
2712
4106
|
headers: {
|
|
2713
4107
|
[name: string]: unknown;
|
|
2714
4108
|
};
|
|
2715
|
-
content
|
|
4109
|
+
content: {
|
|
4110
|
+
"application/json": {
|
|
4111
|
+
success: boolean;
|
|
4112
|
+
data: {
|
|
4113
|
+
version: string;
|
|
4114
|
+
q: string;
|
|
4115
|
+
total: number;
|
|
4116
|
+
items: {
|
|
4117
|
+
codigo: string;
|
|
4118
|
+
descripcion: string;
|
|
4119
|
+
nivel: "CLASE" | "PRODUCTO";
|
|
4120
|
+
claseCodigo: string;
|
|
4121
|
+
familia: string;
|
|
4122
|
+
segmento: string;
|
|
4123
|
+
}[];
|
|
4124
|
+
};
|
|
4125
|
+
};
|
|
4126
|
+
};
|
|
2716
4127
|
};
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
4128
|
+
401: {
|
|
4129
|
+
headers: {
|
|
4130
|
+
[name: string]: unknown;
|
|
4131
|
+
};
|
|
4132
|
+
content: {
|
|
4133
|
+
"application/json": {
|
|
4134
|
+
success: boolean;
|
|
4135
|
+
message: string;
|
|
4136
|
+
code?: string;
|
|
4137
|
+
errors?: {
|
|
4138
|
+
path: string;
|
|
4139
|
+
message: string;
|
|
4140
|
+
}[];
|
|
4141
|
+
};
|
|
4142
|
+
};
|
|
2723
4143
|
};
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
4144
|
+
403: {
|
|
4145
|
+
headers: {
|
|
4146
|
+
[name: string]: unknown;
|
|
4147
|
+
};
|
|
4148
|
+
content: {
|
|
4149
|
+
"application/json": {
|
|
4150
|
+
success: boolean;
|
|
4151
|
+
message: string;
|
|
4152
|
+
code?: string;
|
|
4153
|
+
errors?: {
|
|
4154
|
+
path: string;
|
|
4155
|
+
message: string;
|
|
4156
|
+
}[];
|
|
4157
|
+
};
|
|
4158
|
+
};
|
|
2733
4159
|
};
|
|
2734
|
-
|
|
2735
|
-
};
|
|
2736
|
-
requestBody?: never;
|
|
2737
|
-
responses: {
|
|
2738
|
-
200: {
|
|
4160
|
+
429: {
|
|
2739
4161
|
headers: {
|
|
2740
4162
|
[name: string]: unknown;
|
|
2741
4163
|
};
|
|
2742
|
-
content
|
|
4164
|
+
content: {
|
|
4165
|
+
"application/json": {
|
|
4166
|
+
success: boolean;
|
|
4167
|
+
message: string;
|
|
4168
|
+
code?: string;
|
|
4169
|
+
errors?: {
|
|
4170
|
+
path: string;
|
|
4171
|
+
message: string;
|
|
4172
|
+
}[];
|
|
4173
|
+
retryAfterSeconds?: number;
|
|
4174
|
+
};
|
|
4175
|
+
};
|
|
2743
4176
|
};
|
|
2744
4177
|
};
|
|
2745
4178
|
}, {
|
|
2746
4179
|
params: {
|
|
2747
|
-
|
|
2748
|
-
|
|
4180
|
+
query: {
|
|
4181
|
+
nivel?: "CLASE" | "PRODUCTO";
|
|
4182
|
+
limit?: number;
|
|
4183
|
+
q: string;
|
|
2749
4184
|
};
|
|
2750
4185
|
};
|
|
2751
4186
|
}, `${string}/${string}`>>;
|
|
2752
|
-
/**
|
|
2753
|
-
|
|
4187
|
+
/** Obtiene un Código de Producto SUNAT puntual (404 si no existe). */
|
|
4188
|
+
getProductoSunat(codigo: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2754
4189
|
parameters: {
|
|
2755
4190
|
query?: never;
|
|
2756
4191
|
header?: never;
|
|
2757
4192
|
path: {
|
|
2758
|
-
|
|
4193
|
+
codigo: string;
|
|
2759
4194
|
};
|
|
2760
4195
|
cookie?: never;
|
|
2761
4196
|
};
|
|
@@ -2765,18 +4200,101 @@ export declare class FacturacionClient {
|
|
|
2765
4200
|
headers: {
|
|
2766
4201
|
[name: string]: unknown;
|
|
2767
4202
|
};
|
|
2768
|
-
content
|
|
4203
|
+
content: {
|
|
4204
|
+
"application/json": {
|
|
4205
|
+
success: boolean;
|
|
4206
|
+
data: {
|
|
4207
|
+
codigo: string;
|
|
4208
|
+
descripcion: string;
|
|
4209
|
+
nivel: "CLASE" | "PRODUCTO";
|
|
4210
|
+
claseCodigo: string;
|
|
4211
|
+
familia: string;
|
|
4212
|
+
segmento: string;
|
|
4213
|
+
};
|
|
4214
|
+
};
|
|
4215
|
+
};
|
|
4216
|
+
};
|
|
4217
|
+
401: {
|
|
4218
|
+
headers: {
|
|
4219
|
+
[name: string]: unknown;
|
|
4220
|
+
};
|
|
4221
|
+
content: {
|
|
4222
|
+
"application/json": {
|
|
4223
|
+
success: boolean;
|
|
4224
|
+
message: string;
|
|
4225
|
+
code?: string;
|
|
4226
|
+
errors?: {
|
|
4227
|
+
path: string;
|
|
4228
|
+
message: string;
|
|
4229
|
+
}[];
|
|
4230
|
+
};
|
|
4231
|
+
};
|
|
4232
|
+
};
|
|
4233
|
+
403: {
|
|
4234
|
+
headers: {
|
|
4235
|
+
[name: string]: unknown;
|
|
4236
|
+
};
|
|
4237
|
+
content: {
|
|
4238
|
+
"application/json": {
|
|
4239
|
+
success: boolean;
|
|
4240
|
+
message: string;
|
|
4241
|
+
code?: string;
|
|
4242
|
+
errors?: {
|
|
4243
|
+
path: string;
|
|
4244
|
+
message: string;
|
|
4245
|
+
}[];
|
|
4246
|
+
};
|
|
4247
|
+
};
|
|
4248
|
+
};
|
|
4249
|
+
404: {
|
|
4250
|
+
headers: {
|
|
4251
|
+
[name: string]: unknown;
|
|
4252
|
+
};
|
|
4253
|
+
content: {
|
|
4254
|
+
"application/json": {
|
|
4255
|
+
success: boolean;
|
|
4256
|
+
message: string;
|
|
4257
|
+
code?: string;
|
|
4258
|
+
errors?: {
|
|
4259
|
+
path: string;
|
|
4260
|
+
message: string;
|
|
4261
|
+
}[];
|
|
4262
|
+
};
|
|
4263
|
+
};
|
|
4264
|
+
};
|
|
4265
|
+
429: {
|
|
4266
|
+
headers: {
|
|
4267
|
+
[name: string]: unknown;
|
|
4268
|
+
};
|
|
4269
|
+
content: {
|
|
4270
|
+
"application/json": {
|
|
4271
|
+
success: boolean;
|
|
4272
|
+
message: string;
|
|
4273
|
+
code?: string;
|
|
4274
|
+
errors?: {
|
|
4275
|
+
path: string;
|
|
4276
|
+
message: string;
|
|
4277
|
+
}[];
|
|
4278
|
+
retryAfterSeconds?: number;
|
|
4279
|
+
};
|
|
4280
|
+
};
|
|
2769
4281
|
};
|
|
2770
4282
|
};
|
|
2771
4283
|
}, {
|
|
2772
4284
|
params: {
|
|
2773
4285
|
path: {
|
|
2774
|
-
|
|
4286
|
+
codigo: string;
|
|
2775
4287
|
};
|
|
2776
4288
|
};
|
|
2777
4289
|
}, `${string}/${string}`>>;
|
|
2778
|
-
/**
|
|
2779
|
-
|
|
4290
|
+
/**
|
|
4291
|
+
* Descarga el Catálogo 25 COMPLETO (52.840 códigos, ~700 KB comprimidos).
|
|
4292
|
+
*
|
|
4293
|
+
* Para quien prefiere su propia copia local en vez de consultar la API en
|
|
4294
|
+
* cada búsqueda. La data está congelada desde 2008: bájala una vez y guárdala.
|
|
4295
|
+
* Está limitado a 5 peticiones por minuto — no lo llames en cada arranque.
|
|
4296
|
+
*/
|
|
4297
|
+
exportarProductosSunat(): Promise<import("openapi-fetch").FetchResponse<{
|
|
2780
4298
|
parameters: {
|
|
2781
4299
|
query?: never;
|
|
2782
4300
|
header?: never;
|
|
@@ -2793,46 +4311,73 @@ export declare class FacturacionClient {
|
|
|
2793
4311
|
"application/json": {
|
|
2794
4312
|
success: boolean;
|
|
2795
4313
|
data: {
|
|
2796
|
-
|
|
2797
|
-
|
|
4314
|
+
version: string;
|
|
4315
|
+
total: number;
|
|
2798
4316
|
items: {
|
|
2799
|
-
|
|
2800
|
-
|
|
4317
|
+
codigo: string;
|
|
4318
|
+
descripcion: string;
|
|
4319
|
+
nivel: "CLASE" | "PRODUCTO";
|
|
4320
|
+
claseCodigo: string;
|
|
4321
|
+
familia: string;
|
|
4322
|
+
segmento: string;
|
|
2801
4323
|
}[];
|
|
2802
|
-
}
|
|
4324
|
+
};
|
|
2803
4325
|
};
|
|
2804
4326
|
};
|
|
2805
4327
|
};
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
4328
|
+
401: {
|
|
4329
|
+
headers: {
|
|
4330
|
+
[name: string]: unknown;
|
|
4331
|
+
};
|
|
4332
|
+
content: {
|
|
4333
|
+
"application/json": {
|
|
4334
|
+
success: boolean;
|
|
4335
|
+
message: string;
|
|
4336
|
+
code?: string;
|
|
4337
|
+
errors?: {
|
|
4338
|
+
path: string;
|
|
4339
|
+
message: string;
|
|
4340
|
+
}[];
|
|
4341
|
+
};
|
|
4342
|
+
};
|
|
2815
4343
|
};
|
|
2816
|
-
|
|
2817
|
-
};
|
|
2818
|
-
requestBody?: never;
|
|
2819
|
-
responses: {
|
|
2820
|
-
200: {
|
|
4344
|
+
403: {
|
|
2821
4345
|
headers: {
|
|
2822
4346
|
[name: string]: unknown;
|
|
2823
4347
|
};
|
|
2824
|
-
content
|
|
4348
|
+
content: {
|
|
4349
|
+
"application/json": {
|
|
4350
|
+
success: boolean;
|
|
4351
|
+
message: string;
|
|
4352
|
+
code?: string;
|
|
4353
|
+
errors?: {
|
|
4354
|
+
path: string;
|
|
4355
|
+
message: string;
|
|
4356
|
+
}[];
|
|
4357
|
+
};
|
|
4358
|
+
};
|
|
2825
4359
|
};
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
4360
|
+
429: {
|
|
4361
|
+
headers: {
|
|
4362
|
+
[name: string]: unknown;
|
|
4363
|
+
};
|
|
4364
|
+
content: {
|
|
4365
|
+
"application/json": {
|
|
4366
|
+
success: boolean;
|
|
4367
|
+
message: string;
|
|
4368
|
+
code?: string;
|
|
4369
|
+
errors?: {
|
|
4370
|
+
path: string;
|
|
4371
|
+
message: string;
|
|
4372
|
+
}[];
|
|
4373
|
+
retryAfterSeconds?: number;
|
|
4374
|
+
};
|
|
4375
|
+
};
|
|
2831
4376
|
};
|
|
2832
4377
|
};
|
|
2833
|
-
}, `${string}/${string}`>>;
|
|
4378
|
+
}, {}, `${string}/${string}`>>;
|
|
2834
4379
|
/** 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<{
|
|
4380
|
+
consultarComprobante(ruc: string, tipoDoc: string, serie: string, numero: string, filtro: ConsultaFiltro): Promise<import("openapi-fetch").FetchResponse<{
|
|
2836
4381
|
parameters: {
|
|
2837
4382
|
query?: {
|
|
2838
4383
|
total?: number;
|
|
@@ -2865,21 +4410,16 @@ export declare class FacturacionClient {
|
|
|
2865
4410
|
serie: string;
|
|
2866
4411
|
numero: string;
|
|
2867
4412
|
};
|
|
4413
|
+
query: ConsultaFiltro;
|
|
2868
4414
|
};
|
|
2869
4415
|
}, `${string}/${string}`>>;
|
|
2870
4416
|
/** PDF público de un comprobante. */
|
|
2871
|
-
consultarComprobantePdf(ruc: string, tipoDoc: string, serie: string, numero: string): Promise<ArrayBuffer>;
|
|
4417
|
+
consultarComprobantePdf(ruc: string, tipoDoc: string, serie: string, numero: string, filtro: ConsultaFiltro): Promise<ArrayBuffer>;
|
|
2872
4418
|
/** XML público de un comprobante. */
|
|
2873
|
-
consultarComprobanteXml(ruc: string, tipoDoc: string, serie: string, numero: string): Promise<ArrayBuffer>;
|
|
4419
|
+
consultarComprobanteXml(ruc: string, tipoDoc: string, serie: string, numero: string, filtro: ConsultaFiltro): Promise<ArrayBuffer>;
|
|
2874
4420
|
/** Estado de las colas BullMQ (jobs en cada estado). */
|
|
2875
4421
|
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
|
-
*/
|
|
4422
|
+
/** Descarga binaria genérica para endpoints de archivo `{id}`. */
|
|
2883
4423
|
private fetchBinary;
|
|
2884
4424
|
/**
|
|
2885
4425
|
* Espera a que un documento llegue a estado final (ACEPTADO/RECHAZADO/COLA_FALLIDA/ANULADO).
|