intifact 1.6.0 → 2.0.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 +136 -131
- package/dist/index.d.ts +127 -923
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -90
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +145 -1287
- package/dist/types.d.ts.map +1 -1
- package/package.json +47 -47
package/dist/index.d.ts
CHANGED
|
@@ -23,14 +23,6 @@ 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/{id}/branches */
|
|
27
|
-
export type CreateBranchInput = paths["/api/v1/companies/{id}/branches"]["post"]["requestBody"]["content"]["application/json"];
|
|
28
|
-
/** Body de PUT /api/v1/companies/{id}/branches/{branchId} */
|
|
29
|
-
export type UpdateBranchInput = paths["/api/v1/companies/{id}/branches/{branchId}"]["put"]["requestBody"]["content"]["application/json"];
|
|
30
|
-
/** Body de POST /api/v1/webhooks */
|
|
31
|
-
export type CreateWebhookInput = paths["/api/v1/webhooks"]["post"]["requestBody"]["content"]["application/json"];
|
|
32
|
-
/** Body de PUT /api/v1/webhooks/{id} */
|
|
33
|
-
export type UpdateWebhookInput = paths["/api/v1/webhooks/{id}"]["put"]["requestBody"]["content"]["application/json"];
|
|
34
26
|
/** Respuesta 202 de cualquier /send (documento encolado) */
|
|
35
27
|
export type EnqueueResponse = paths["/api/v1/invoice/send"]["post"]["responses"]["202"]["content"]["application/json"];
|
|
36
28
|
/** Respuesta de GET /api/v1/queues/stats */
|
|
@@ -2293,6 +2285,128 @@ export declare class FacturacionClient {
|
|
|
2293
2285
|
}[];
|
|
2294
2286
|
};
|
|
2295
2287
|
}, `${string}/${string}`>>;
|
|
2288
|
+
/**
|
|
2289
|
+
* Estado de un envío RC/RA: el `id` que devuelven sendSummary, sendVoided,
|
|
2290
|
+
* cancelInvoice y cancelBoleta (es del envío, no de un documento). Trae el
|
|
2291
|
+
* ticket, el código/motivo de SUNAT y el estado de cada comprobante incluido.
|
|
2292
|
+
*/
|
|
2293
|
+
getSummary(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2294
|
+
parameters: {
|
|
2295
|
+
query?: never;
|
|
2296
|
+
header?: never;
|
|
2297
|
+
path: {
|
|
2298
|
+
id: string;
|
|
2299
|
+
};
|
|
2300
|
+
cookie?: never;
|
|
2301
|
+
};
|
|
2302
|
+
requestBody?: never;
|
|
2303
|
+
responses: {
|
|
2304
|
+
200: {
|
|
2305
|
+
headers: {
|
|
2306
|
+
[name: string]: unknown;
|
|
2307
|
+
};
|
|
2308
|
+
content: {
|
|
2309
|
+
"application/json": {
|
|
2310
|
+
success: boolean;
|
|
2311
|
+
data: {
|
|
2312
|
+
id: string;
|
|
2313
|
+
env: string;
|
|
2314
|
+
tipo: string;
|
|
2315
|
+
correlativo: string;
|
|
2316
|
+
fechaEmision: string;
|
|
2317
|
+
fechaReferencia: string;
|
|
2318
|
+
estado: string;
|
|
2319
|
+
ticket: string | null;
|
|
2320
|
+
codigoRespuesta: string | null;
|
|
2321
|
+
descripcionRespuesta: string | null;
|
|
2322
|
+
ultimoError: string | null;
|
|
2323
|
+
intentos: number;
|
|
2324
|
+
tieneCdr: boolean;
|
|
2325
|
+
items: {
|
|
2326
|
+
tipoDoc: string;
|
|
2327
|
+
serie: string;
|
|
2328
|
+
correlativo: string;
|
|
2329
|
+
documentId: string | null;
|
|
2330
|
+
estadoDocumento: string | null;
|
|
2331
|
+
}[];
|
|
2332
|
+
createdAt: string;
|
|
2333
|
+
};
|
|
2334
|
+
};
|
|
2335
|
+
};
|
|
2336
|
+
};
|
|
2337
|
+
401: {
|
|
2338
|
+
headers: {
|
|
2339
|
+
[name: string]: unknown;
|
|
2340
|
+
};
|
|
2341
|
+
content: {
|
|
2342
|
+
"application/json": {
|
|
2343
|
+
success: boolean;
|
|
2344
|
+
message: string;
|
|
2345
|
+
code?: string;
|
|
2346
|
+
errors?: {
|
|
2347
|
+
path: string;
|
|
2348
|
+
message: string;
|
|
2349
|
+
}[];
|
|
2350
|
+
};
|
|
2351
|
+
};
|
|
2352
|
+
};
|
|
2353
|
+
403: {
|
|
2354
|
+
headers: {
|
|
2355
|
+
[name: string]: unknown;
|
|
2356
|
+
};
|
|
2357
|
+
content: {
|
|
2358
|
+
"application/json": {
|
|
2359
|
+
success: boolean;
|
|
2360
|
+
message: string;
|
|
2361
|
+
code?: string;
|
|
2362
|
+
errors?: {
|
|
2363
|
+
path: string;
|
|
2364
|
+
message: string;
|
|
2365
|
+
}[];
|
|
2366
|
+
};
|
|
2367
|
+
};
|
|
2368
|
+
};
|
|
2369
|
+
404: {
|
|
2370
|
+
headers: {
|
|
2371
|
+
[name: string]: unknown;
|
|
2372
|
+
};
|
|
2373
|
+
content: {
|
|
2374
|
+
"application/json": {
|
|
2375
|
+
success: boolean;
|
|
2376
|
+
message: string;
|
|
2377
|
+
code?: string;
|
|
2378
|
+
errors?: {
|
|
2379
|
+
path: string;
|
|
2380
|
+
message: string;
|
|
2381
|
+
}[];
|
|
2382
|
+
};
|
|
2383
|
+
};
|
|
2384
|
+
};
|
|
2385
|
+
429: {
|
|
2386
|
+
headers: {
|
|
2387
|
+
[name: string]: unknown;
|
|
2388
|
+
};
|
|
2389
|
+
content: {
|
|
2390
|
+
"application/json": {
|
|
2391
|
+
success: boolean;
|
|
2392
|
+
message: string;
|
|
2393
|
+
code?: string;
|
|
2394
|
+
errors?: {
|
|
2395
|
+
path: string;
|
|
2396
|
+
message: string;
|
|
2397
|
+
}[];
|
|
2398
|
+
retryAfterSeconds?: number;
|
|
2399
|
+
};
|
|
2400
|
+
};
|
|
2401
|
+
};
|
|
2402
|
+
};
|
|
2403
|
+
}, {
|
|
2404
|
+
params: {
|
|
2405
|
+
path: {
|
|
2406
|
+
id: string;
|
|
2407
|
+
};
|
|
2408
|
+
};
|
|
2409
|
+
}, `${string}/${string}`>>;
|
|
2296
2410
|
/** Consulta el estado de un ticket asíncrono (sendSummary). */
|
|
2297
2411
|
getTicketStatus(ticket: string, ruc: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
2298
2412
|
parameters: {
|
|
@@ -2408,8 +2522,10 @@ export declare class FacturacionClient {
|
|
|
2408
2522
|
parameters: {
|
|
2409
2523
|
query?: {
|
|
2410
2524
|
ruc?: string;
|
|
2525
|
+
tenantId?: string;
|
|
2411
2526
|
tipoDoc?: string;
|
|
2412
2527
|
serie?: string;
|
|
2528
|
+
correlativo?: string;
|
|
2413
2529
|
estado?: string;
|
|
2414
2530
|
env?: "live" | "test";
|
|
2415
2531
|
fechaDesde?: string;
|
|
@@ -2451,6 +2567,7 @@ export declare class FacturacionClient {
|
|
|
2451
2567
|
company: {
|
|
2452
2568
|
ruc: string;
|
|
2453
2569
|
razonSocial: string;
|
|
2570
|
+
tenantId?: string | null;
|
|
2454
2571
|
};
|
|
2455
2572
|
}[];
|
|
2456
2573
|
pagination: {
|
|
@@ -2516,8 +2633,10 @@ export declare class FacturacionClient {
|
|
|
2516
2633
|
params: {
|
|
2517
2634
|
query: {
|
|
2518
2635
|
ruc?: string;
|
|
2636
|
+
tenantId?: string;
|
|
2519
2637
|
tipoDoc?: string;
|
|
2520
2638
|
serie?: string;
|
|
2639
|
+
correlativo?: string;
|
|
2521
2640
|
estado?: string;
|
|
2522
2641
|
env?: "live" | "test";
|
|
2523
2642
|
fechaDesde?: string;
|
|
@@ -3011,921 +3130,6 @@ export declare class FacturacionClient {
|
|
|
3011
3130
|
};
|
|
3012
3131
|
};
|
|
3013
3132
|
}, `${string}/${string}`>>;
|
|
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<{
|
|
3021
|
-
parameters: {
|
|
3022
|
-
query?: never;
|
|
3023
|
-
header?: never;
|
|
3024
|
-
path: {
|
|
3025
|
-
id: string;
|
|
3026
|
-
};
|
|
3027
|
-
cookie?: never;
|
|
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
|
-
};
|
|
3222
|
-
requestBody?: never;
|
|
3223
|
-
responses: {
|
|
3224
|
-
401: {
|
|
3225
|
-
headers: {
|
|
3226
|
-
[name: string]: unknown;
|
|
3227
|
-
};
|
|
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
|
-
};
|
|
3486
|
-
};
|
|
3487
|
-
};
|
|
3488
|
-
}, {
|
|
3489
|
-
params: {
|
|
3490
|
-
path: {
|
|
3491
|
-
id: string;
|
|
3492
|
-
};
|
|
3493
|
-
};
|
|
3494
|
-
}, `${string}/${string}`>>;
|
|
3495
|
-
/** Actualiza una suscripción de webhook (url, eventos, isActive). */
|
|
3496
|
-
updateWebhook(id: string, body: UpdateWebhookInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
3497
|
-
parameters: {
|
|
3498
|
-
query?: never;
|
|
3499
|
-
header?: never;
|
|
3500
|
-
path: {
|
|
3501
|
-
id: string;
|
|
3502
|
-
};
|
|
3503
|
-
cookie?: never;
|
|
3504
|
-
};
|
|
3505
|
-
requestBody: {
|
|
3506
|
-
content: {
|
|
3507
|
-
"application/json": {
|
|
3508
|
-
url?: string;
|
|
3509
|
-
events?: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
3510
|
-
description?: string;
|
|
3511
|
-
isActive?: boolean;
|
|
3512
|
-
};
|
|
3513
|
-
};
|
|
3514
|
-
};
|
|
3515
|
-
responses: {
|
|
3516
|
-
401: {
|
|
3517
|
-
headers: {
|
|
3518
|
-
[name: string]: unknown;
|
|
3519
|
-
};
|
|
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
|
-
};
|
|
3564
|
-
};
|
|
3565
|
-
};
|
|
3566
|
-
}, {
|
|
3567
|
-
params: {
|
|
3568
|
-
path: {
|
|
3569
|
-
id: string;
|
|
3570
|
-
};
|
|
3571
|
-
};
|
|
3572
|
-
body: {
|
|
3573
|
-
url?: string;
|
|
3574
|
-
events?: ("document.accepted" | "document.rejected" | "document.queue_failed" | "document.retried" | "ticket.resolved")[];
|
|
3575
|
-
description?: string;
|
|
3576
|
-
isActive?: boolean;
|
|
3577
|
-
};
|
|
3578
|
-
}, `${string}/${string}`>>;
|
|
3579
|
-
/** Elimina una suscripción de webhook. */
|
|
3580
|
-
deleteWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3581
|
-
parameters: {
|
|
3582
|
-
query?: never;
|
|
3583
|
-
header?: never;
|
|
3584
|
-
path: {
|
|
3585
|
-
id: string;
|
|
3586
|
-
};
|
|
3587
|
-
cookie?: never;
|
|
3588
|
-
};
|
|
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
|
-
};
|
|
3605
|
-
};
|
|
3606
|
-
};
|
|
3607
|
-
403: {
|
|
3608
|
-
headers: {
|
|
3609
|
-
[name: string]: unknown;
|
|
3610
|
-
};
|
|
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
|
-
};
|
|
3639
|
-
};
|
|
3640
|
-
};
|
|
3641
|
-
}, {
|
|
3642
|
-
params: {
|
|
3643
|
-
path: {
|
|
3644
|
-
id: string;
|
|
3645
|
-
};
|
|
3646
|
-
};
|
|
3647
|
-
}, `${string}/${string}`>>;
|
|
3648
|
-
/** Lista los intentos de entrega de un webhook. */
|
|
3649
|
-
listWebhookDeliveries(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3650
|
-
parameters: {
|
|
3651
|
-
query?: {
|
|
3652
|
-
limit?: number;
|
|
3653
|
-
success?: "true" | "false";
|
|
3654
|
-
};
|
|
3655
|
-
header?: never;
|
|
3656
|
-
path: {
|
|
3657
|
-
id: string;
|
|
3658
|
-
};
|
|
3659
|
-
cookie?: never;
|
|
3660
|
-
};
|
|
3661
|
-
requestBody?: never;
|
|
3662
|
-
responses: {
|
|
3663
|
-
401: {
|
|
3664
|
-
headers: {
|
|
3665
|
-
[name: string]: unknown;
|
|
3666
|
-
};
|
|
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
|
-
};
|
|
3711
|
-
};
|
|
3712
|
-
};
|
|
3713
|
-
}, {
|
|
3714
|
-
params: {
|
|
3715
|
-
path: {
|
|
3716
|
-
id: string;
|
|
3717
|
-
};
|
|
3718
|
-
};
|
|
3719
|
-
}, `${string}/${string}`>>;
|
|
3720
|
-
/** Reintenta manualmente una entrega de webhook. */
|
|
3721
|
-
redeliverWebhook(id: string, deliveryId: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3722
|
-
parameters: {
|
|
3723
|
-
query?: never;
|
|
3724
|
-
header?: never;
|
|
3725
|
-
path: {
|
|
3726
|
-
id: string;
|
|
3727
|
-
deliveryId: string;
|
|
3728
|
-
};
|
|
3729
|
-
cookie?: never;
|
|
3730
|
-
};
|
|
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
|
-
};
|
|
3747
|
-
};
|
|
3748
|
-
};
|
|
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: {
|
|
3766
|
-
headers: {
|
|
3767
|
-
[name: string]: unknown;
|
|
3768
|
-
};
|
|
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
|
-
};
|
|
3781
|
-
};
|
|
3782
|
-
};
|
|
3783
|
-
}, {
|
|
3784
|
-
params: {
|
|
3785
|
-
path: {
|
|
3786
|
-
id: string;
|
|
3787
|
-
deliveryId: string;
|
|
3788
|
-
};
|
|
3789
|
-
};
|
|
3790
|
-
}, `${string}/${string}`>>;
|
|
3791
|
-
/** Dispara un evento de prueba (webhook.test) para verificar conectividad. */
|
|
3792
|
-
testWebhook(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3793
|
-
parameters: {
|
|
3794
|
-
query?: never;
|
|
3795
|
-
header?: never;
|
|
3796
|
-
path: {
|
|
3797
|
-
id: string;
|
|
3798
|
-
};
|
|
3799
|
-
cookie?: never;
|
|
3800
|
-
};
|
|
3801
|
-
requestBody?: never;
|
|
3802
|
-
responses: {
|
|
3803
|
-
401: {
|
|
3804
|
-
headers: {
|
|
3805
|
-
[name: string]: unknown;
|
|
3806
|
-
};
|
|
3807
|
-
content: {
|
|
3808
|
-
"application/json": {
|
|
3809
|
-
success: boolean;
|
|
3810
|
-
message: string;
|
|
3811
|
-
code?: string;
|
|
3812
|
-
errors?: {
|
|
3813
|
-
path: string;
|
|
3814
|
-
message: string;
|
|
3815
|
-
}[];
|
|
3816
|
-
};
|
|
3817
|
-
};
|
|
3818
|
-
};
|
|
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
|
-
};
|
|
3834
|
-
};
|
|
3835
|
-
429: {
|
|
3836
|
-
headers: {
|
|
3837
|
-
[name: string]: unknown;
|
|
3838
|
-
};
|
|
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
|
-
};
|
|
3851
|
-
};
|
|
3852
|
-
};
|
|
3853
|
-
}, {
|
|
3854
|
-
params: {
|
|
3855
|
-
path: {
|
|
3856
|
-
id: string;
|
|
3857
|
-
};
|
|
3858
|
-
};
|
|
3859
|
-
}, `${string}/${string}`>>;
|
|
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<{
|
|
3862
|
-
parameters: {
|
|
3863
|
-
query?: never;
|
|
3864
|
-
header?: never;
|
|
3865
|
-
path: {
|
|
3866
|
-
id: string;
|
|
3867
|
-
};
|
|
3868
|
-
cookie?: never;
|
|
3869
|
-
};
|
|
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
|
-
};
|
|
3886
|
-
};
|
|
3887
|
-
};
|
|
3888
|
-
403: {
|
|
3889
|
-
headers: {
|
|
3890
|
-
[name: string]: unknown;
|
|
3891
|
-
};
|
|
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
|
-
};
|
|
3920
|
-
};
|
|
3921
|
-
};
|
|
3922
|
-
}, {
|
|
3923
|
-
params: {
|
|
3924
|
-
path: {
|
|
3925
|
-
id: string;
|
|
3926
|
-
};
|
|
3927
|
-
};
|
|
3928
|
-
}, `${string}/${string}`>>;
|
|
3929
3133
|
/** Lista los catálogos SUNAT disponibles. */
|
|
3930
3134
|
getCatalogs(): Promise<import("openapi-fetch").FetchResponse<{
|
|
3931
3135
|
parameters: {
|