intifact 2.0.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +167 -136
- package/dist/index.d.ts +839 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +78 -7
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +844 -53
- package/dist/types.d.ts.map +1 -1
- package/package.json +54 -47
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,16 @@ 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/register (alta con certificado, autogestión) */
|
|
27
|
+
export type RegisterCompanyInput = paths["/api/v1/companies/register"]["post"]["requestBody"]["content"]["application/json"];
|
|
28
|
+
/** Body de PUT /api/v1/companies/{id} (datos de la empresa, autogestión) */
|
|
29
|
+
export type UpdateCompanyInput = NonNullable<paths["/api/v1/companies/{id}"]["put"]["requestBody"]>["content"]["application/json"];
|
|
30
|
+
/** Body de POST /api/v1/companies/{id}/certificate (renovación, mismo RUC) */
|
|
31
|
+
export type UploadCertificateInput = paths["/api/v1/companies/{id}/certificate"]["post"]["requestBody"]["content"]["application/json"];
|
|
32
|
+
/** Body de POST /api/v1/companies/{id}/branches (registrar anexo, autogestión) */
|
|
33
|
+
export type CreateBranchInput = paths["/api/v1/companies/{id}/branches"]["post"]["requestBody"]["content"]["application/json"];
|
|
34
|
+
/** Body de PUT /api/v1/companies/{id}/branches/{branchId} (actualizar anexo) */
|
|
35
|
+
export type UpdateBranchInput = NonNullable<paths["/api/v1/companies/{id}/branches/{branchId}"]["put"]["requestBody"]>["content"]["application/json"];
|
|
26
36
|
/** Respuesta 202 de cualquier /send (documento encolado) */
|
|
27
37
|
export type EnqueueResponse = paths["/api/v1/invoice/send"]["post"]["responses"]["202"]["content"]["application/json"];
|
|
28
38
|
/** Respuesta de GET /api/v1/queues/stats */
|
|
@@ -87,6 +97,7 @@ export declare class FacturacionClient {
|
|
|
87
97
|
serie: string;
|
|
88
98
|
correlativo: string;
|
|
89
99
|
tipoMoneda?: string;
|
|
100
|
+
tipoCambio?: number;
|
|
90
101
|
fechaEmision: string;
|
|
91
102
|
empresaRuc: string;
|
|
92
103
|
establecimientoCodigo?: string;
|
|
@@ -154,6 +165,13 @@ export declare class FacturacionClient {
|
|
|
154
165
|
tipoDoc?: "31" | "09";
|
|
155
166
|
nroDoc: string;
|
|
156
167
|
}[];
|
|
168
|
+
anticipos?: {
|
|
169
|
+
tipoDoc: "02" | "03";
|
|
170
|
+
nroDoc: string;
|
|
171
|
+
total: number;
|
|
172
|
+
valor: number;
|
|
173
|
+
afectacion?: "10" | "20" | "30";
|
|
174
|
+
}[];
|
|
157
175
|
};
|
|
158
176
|
};
|
|
159
177
|
};
|
|
@@ -265,6 +283,7 @@ export declare class FacturacionClient {
|
|
|
265
283
|
serie: string;
|
|
266
284
|
correlativo: string;
|
|
267
285
|
tipoMoneda?: string;
|
|
286
|
+
tipoCambio?: number;
|
|
268
287
|
fechaEmision: string;
|
|
269
288
|
empresaRuc: string;
|
|
270
289
|
establecimientoCodigo?: string;
|
|
@@ -332,6 +351,13 @@ export declare class FacturacionClient {
|
|
|
332
351
|
tipoDoc?: "31" | "09";
|
|
333
352
|
nroDoc: string;
|
|
334
353
|
}[];
|
|
354
|
+
anticipos?: {
|
|
355
|
+
tipoDoc: "02" | "03";
|
|
356
|
+
nroDoc: string;
|
|
357
|
+
total: number;
|
|
358
|
+
valor: number;
|
|
359
|
+
afectacion?: "10" | "20" | "30";
|
|
360
|
+
}[];
|
|
335
361
|
};
|
|
336
362
|
}, `${string}/${string}`>>;
|
|
337
363
|
/** Calcula importes (Modelo B) de una factura/boleta SIN emitir. */
|
|
@@ -513,6 +539,7 @@ export declare class FacturacionClient {
|
|
|
513
539
|
serie: string;
|
|
514
540
|
correlativo: string;
|
|
515
541
|
tipoMoneda?: string;
|
|
542
|
+
tipoCambio?: number;
|
|
516
543
|
fechaEmision: string;
|
|
517
544
|
empresaRuc: string;
|
|
518
545
|
establecimientoCodigo?: string;
|
|
@@ -672,6 +699,7 @@ export declare class FacturacionClient {
|
|
|
672
699
|
serie: string;
|
|
673
700
|
correlativo: string;
|
|
674
701
|
tipoMoneda?: string;
|
|
702
|
+
tipoCambio?: number;
|
|
675
703
|
fechaEmision: string;
|
|
676
704
|
empresaRuc: string;
|
|
677
705
|
establecimientoCodigo?: string;
|
|
@@ -3061,8 +3089,357 @@ export declare class FacturacionClient {
|
|
|
3061
3089
|
}, `${string}/${string}`>>;
|
|
3062
3090
|
/** Logo de la empresa (imagen). */
|
|
3063
3091
|
getCompanyLogo(id: string): Promise<ArrayBuffer>;
|
|
3064
|
-
/**
|
|
3065
|
-
|
|
3092
|
+
/**
|
|
3093
|
+
* Da de alta una empresa con su certificado digital (autogestión).
|
|
3094
|
+
*
|
|
3095
|
+
* El certificado (`.p12`/`.pfx` en base64) tiene que declarar el MISMO RUC: si
|
|
3096
|
+
* no abre, está vencido o es de otro RUC, responde 400 y no se guarda nada.
|
|
3097
|
+
* Idempotente: el mismo RUC ya registrado en tu cuenta devuelve 200 con
|
|
3098
|
+
* `creada: false`.
|
|
3099
|
+
*/
|
|
3100
|
+
registerCompany(body: RegisterCompanyInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
3101
|
+
parameters: {
|
|
3102
|
+
query?: never;
|
|
3103
|
+
header?: never;
|
|
3104
|
+
path?: never;
|
|
3105
|
+
cookie?: never;
|
|
3106
|
+
};
|
|
3107
|
+
requestBody: {
|
|
3108
|
+
content: {
|
|
3109
|
+
"application/json": {
|
|
3110
|
+
ruc: string;
|
|
3111
|
+
razonSocial: string;
|
|
3112
|
+
nombreComercial?: string;
|
|
3113
|
+
ubigeo?: string;
|
|
3114
|
+
direccion?: string;
|
|
3115
|
+
departamento?: string;
|
|
3116
|
+
provincia?: string;
|
|
3117
|
+
distrito?: string;
|
|
3118
|
+
urbanizacion?: string;
|
|
3119
|
+
telefono?: string;
|
|
3120
|
+
email?: string;
|
|
3121
|
+
web?: string;
|
|
3122
|
+
solUser?: string;
|
|
3123
|
+
solPassword?: string;
|
|
3124
|
+
certificado: {
|
|
3125
|
+
content: string;
|
|
3126
|
+
password: string;
|
|
3127
|
+
name?: string;
|
|
3128
|
+
};
|
|
3129
|
+
};
|
|
3130
|
+
};
|
|
3131
|
+
};
|
|
3132
|
+
responses: {
|
|
3133
|
+
401: {
|
|
3134
|
+
headers: {
|
|
3135
|
+
[name: string]: unknown;
|
|
3136
|
+
};
|
|
3137
|
+
content: {
|
|
3138
|
+
"application/json": {
|
|
3139
|
+
success: boolean;
|
|
3140
|
+
message: string;
|
|
3141
|
+
code?: string;
|
|
3142
|
+
errors?: {
|
|
3143
|
+
path: string;
|
|
3144
|
+
message: string;
|
|
3145
|
+
}[];
|
|
3146
|
+
};
|
|
3147
|
+
};
|
|
3148
|
+
};
|
|
3149
|
+
403: {
|
|
3150
|
+
headers: {
|
|
3151
|
+
[name: string]: unknown;
|
|
3152
|
+
};
|
|
3153
|
+
content: {
|
|
3154
|
+
"application/json": {
|
|
3155
|
+
success: boolean;
|
|
3156
|
+
message: string;
|
|
3157
|
+
code?: string;
|
|
3158
|
+
errors?: {
|
|
3159
|
+
path: string;
|
|
3160
|
+
message: string;
|
|
3161
|
+
}[];
|
|
3162
|
+
};
|
|
3163
|
+
};
|
|
3164
|
+
};
|
|
3165
|
+
429: {
|
|
3166
|
+
headers: {
|
|
3167
|
+
[name: string]: unknown;
|
|
3168
|
+
};
|
|
3169
|
+
content: {
|
|
3170
|
+
"application/json": {
|
|
3171
|
+
success: boolean;
|
|
3172
|
+
message: string;
|
|
3173
|
+
code?: string;
|
|
3174
|
+
errors?: {
|
|
3175
|
+
path: string;
|
|
3176
|
+
message: string;
|
|
3177
|
+
}[];
|
|
3178
|
+
retryAfterSeconds?: number;
|
|
3179
|
+
};
|
|
3180
|
+
};
|
|
3181
|
+
};
|
|
3182
|
+
};
|
|
3183
|
+
}, {
|
|
3184
|
+
body: {
|
|
3185
|
+
ruc: string;
|
|
3186
|
+
razonSocial: string;
|
|
3187
|
+
nombreComercial?: string;
|
|
3188
|
+
ubigeo?: string;
|
|
3189
|
+
direccion?: string;
|
|
3190
|
+
departamento?: string;
|
|
3191
|
+
provincia?: string;
|
|
3192
|
+
distrito?: string;
|
|
3193
|
+
urbanizacion?: string;
|
|
3194
|
+
telefono?: string;
|
|
3195
|
+
email?: string;
|
|
3196
|
+
web?: string;
|
|
3197
|
+
solUser?: string;
|
|
3198
|
+
solPassword?: string;
|
|
3199
|
+
certificado: {
|
|
3200
|
+
content: string;
|
|
3201
|
+
password: string;
|
|
3202
|
+
name?: string;
|
|
3203
|
+
};
|
|
3204
|
+
};
|
|
3205
|
+
}, `${string}/${string}`>>;
|
|
3206
|
+
/** Actualiza los datos de la empresa (no sus credenciales SOL/GRE/SIRE). */
|
|
3207
|
+
updateCompany(id: string, body: UpdateCompanyInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
3208
|
+
parameters: {
|
|
3209
|
+
query?: never;
|
|
3210
|
+
header?: never;
|
|
3211
|
+
path: {
|
|
3212
|
+
id: string;
|
|
3213
|
+
};
|
|
3214
|
+
cookie?: never;
|
|
3215
|
+
};
|
|
3216
|
+
requestBody: {
|
|
3217
|
+
content: {
|
|
3218
|
+
"application/json": {
|
|
3219
|
+
ruc?: string;
|
|
3220
|
+
razonSocial?: string;
|
|
3221
|
+
nombreComercial?: string;
|
|
3222
|
+
ubigeo?: string;
|
|
3223
|
+
direccion?: string;
|
|
3224
|
+
departamento?: string;
|
|
3225
|
+
provincia?: string;
|
|
3226
|
+
distrito?: string;
|
|
3227
|
+
urbanizacion?: string;
|
|
3228
|
+
telefono?: string;
|
|
3229
|
+
email?: string;
|
|
3230
|
+
web?: string;
|
|
3231
|
+
solUser?: string;
|
|
3232
|
+
solPassword?: string;
|
|
3233
|
+
tenantId?: string;
|
|
3234
|
+
greClientId?: string;
|
|
3235
|
+
greClientSecret?: string;
|
|
3236
|
+
sireClientId?: string;
|
|
3237
|
+
sireClientSecret?: string;
|
|
3238
|
+
sireAutoSync?: boolean;
|
|
3239
|
+
sunatProduction?: boolean;
|
|
3240
|
+
isSandbox?: boolean;
|
|
3241
|
+
cuentasBancarias?: {
|
|
3242
|
+
nombre: string;
|
|
3243
|
+
bancos?: string[];
|
|
3244
|
+
tipoLabel: string;
|
|
3245
|
+
titularLabel?: string;
|
|
3246
|
+
titular?: string;
|
|
3247
|
+
titularRuc?: string;
|
|
3248
|
+
numero: string;
|
|
3249
|
+
cci?: string;
|
|
3250
|
+
}[];
|
|
3251
|
+
terminosTitulo?: string | null;
|
|
3252
|
+
terminos?: string[];
|
|
3253
|
+
notaPagoTitulo?: string | null;
|
|
3254
|
+
notaPagoTexto?: string | null;
|
|
3255
|
+
sireReintentar?: boolean;
|
|
3256
|
+
};
|
|
3257
|
+
};
|
|
3258
|
+
};
|
|
3259
|
+
responses: {
|
|
3260
|
+
401: {
|
|
3261
|
+
headers: {
|
|
3262
|
+
[name: string]: unknown;
|
|
3263
|
+
};
|
|
3264
|
+
content: {
|
|
3265
|
+
"application/json": {
|
|
3266
|
+
success: boolean;
|
|
3267
|
+
message: string;
|
|
3268
|
+
code?: string;
|
|
3269
|
+
errors?: {
|
|
3270
|
+
path: string;
|
|
3271
|
+
message: string;
|
|
3272
|
+
}[];
|
|
3273
|
+
};
|
|
3274
|
+
};
|
|
3275
|
+
};
|
|
3276
|
+
403: {
|
|
3277
|
+
headers: {
|
|
3278
|
+
[name: string]: unknown;
|
|
3279
|
+
};
|
|
3280
|
+
content: {
|
|
3281
|
+
"application/json": {
|
|
3282
|
+
success: boolean;
|
|
3283
|
+
message: string;
|
|
3284
|
+
code?: string;
|
|
3285
|
+
errors?: {
|
|
3286
|
+
path: string;
|
|
3287
|
+
message: string;
|
|
3288
|
+
}[];
|
|
3289
|
+
};
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
3292
|
+
429: {
|
|
3293
|
+
headers: {
|
|
3294
|
+
[name: string]: unknown;
|
|
3295
|
+
};
|
|
3296
|
+
content: {
|
|
3297
|
+
"application/json": {
|
|
3298
|
+
success: boolean;
|
|
3299
|
+
message: string;
|
|
3300
|
+
code?: string;
|
|
3301
|
+
errors?: {
|
|
3302
|
+
path: string;
|
|
3303
|
+
message: string;
|
|
3304
|
+
}[];
|
|
3305
|
+
retryAfterSeconds?: number;
|
|
3306
|
+
};
|
|
3307
|
+
};
|
|
3308
|
+
};
|
|
3309
|
+
};
|
|
3310
|
+
}, {
|
|
3311
|
+
params: {
|
|
3312
|
+
path: {
|
|
3313
|
+
id: string;
|
|
3314
|
+
};
|
|
3315
|
+
};
|
|
3316
|
+
body: {
|
|
3317
|
+
ruc?: string;
|
|
3318
|
+
razonSocial?: string;
|
|
3319
|
+
nombreComercial?: string;
|
|
3320
|
+
ubigeo?: string;
|
|
3321
|
+
direccion?: string;
|
|
3322
|
+
departamento?: string;
|
|
3323
|
+
provincia?: string;
|
|
3324
|
+
distrito?: string;
|
|
3325
|
+
urbanizacion?: string;
|
|
3326
|
+
telefono?: string;
|
|
3327
|
+
email?: string;
|
|
3328
|
+
web?: string;
|
|
3329
|
+
solUser?: string;
|
|
3330
|
+
solPassword?: string;
|
|
3331
|
+
tenantId?: string;
|
|
3332
|
+
greClientId?: string;
|
|
3333
|
+
greClientSecret?: string;
|
|
3334
|
+
sireClientId?: string;
|
|
3335
|
+
sireClientSecret?: string;
|
|
3336
|
+
sireAutoSync?: boolean;
|
|
3337
|
+
sunatProduction?: boolean;
|
|
3338
|
+
isSandbox?: boolean;
|
|
3339
|
+
cuentasBancarias?: {
|
|
3340
|
+
nombre: string;
|
|
3341
|
+
bancos?: string[];
|
|
3342
|
+
tipoLabel: string;
|
|
3343
|
+
titularLabel?: string;
|
|
3344
|
+
titular?: string;
|
|
3345
|
+
titularRuc?: string;
|
|
3346
|
+
numero: string;
|
|
3347
|
+
cci?: string;
|
|
3348
|
+
}[];
|
|
3349
|
+
terminosTitulo?: string | null;
|
|
3350
|
+
terminos?: string[];
|
|
3351
|
+
notaPagoTitulo?: string | null;
|
|
3352
|
+
notaPagoTexto?: string | null;
|
|
3353
|
+
sireReintentar?: boolean;
|
|
3354
|
+
};
|
|
3355
|
+
}, `${string}/${string}`>>;
|
|
3356
|
+
/** Renueva el certificado digital (base64). Tiene que declarar el RUC de la empresa. */
|
|
3357
|
+
uploadCompanyCertificate(id: string, body: UploadCertificateInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
3358
|
+
parameters: {
|
|
3359
|
+
query?: never;
|
|
3360
|
+
header?: never;
|
|
3361
|
+
path: {
|
|
3362
|
+
id: string;
|
|
3363
|
+
};
|
|
3364
|
+
cookie?: never;
|
|
3365
|
+
};
|
|
3366
|
+
requestBody: {
|
|
3367
|
+
content: {
|
|
3368
|
+
"application/json": {
|
|
3369
|
+
name: string;
|
|
3370
|
+
password: string;
|
|
3371
|
+
content: string;
|
|
3372
|
+
};
|
|
3373
|
+
};
|
|
3374
|
+
};
|
|
3375
|
+
responses: {
|
|
3376
|
+
401: {
|
|
3377
|
+
headers: {
|
|
3378
|
+
[name: string]: unknown;
|
|
3379
|
+
};
|
|
3380
|
+
content: {
|
|
3381
|
+
"application/json": {
|
|
3382
|
+
success: boolean;
|
|
3383
|
+
message: string;
|
|
3384
|
+
code?: string;
|
|
3385
|
+
errors?: {
|
|
3386
|
+
path: string;
|
|
3387
|
+
message: string;
|
|
3388
|
+
}[];
|
|
3389
|
+
};
|
|
3390
|
+
};
|
|
3391
|
+
};
|
|
3392
|
+
403: {
|
|
3393
|
+
headers: {
|
|
3394
|
+
[name: string]: unknown;
|
|
3395
|
+
};
|
|
3396
|
+
content: {
|
|
3397
|
+
"application/json": {
|
|
3398
|
+
success: boolean;
|
|
3399
|
+
message: string;
|
|
3400
|
+
code?: string;
|
|
3401
|
+
errors?: {
|
|
3402
|
+
path: string;
|
|
3403
|
+
message: string;
|
|
3404
|
+
}[];
|
|
3405
|
+
};
|
|
3406
|
+
};
|
|
3407
|
+
};
|
|
3408
|
+
429: {
|
|
3409
|
+
headers: {
|
|
3410
|
+
[name: string]: unknown;
|
|
3411
|
+
};
|
|
3412
|
+
content: {
|
|
3413
|
+
"application/json": {
|
|
3414
|
+
success: boolean;
|
|
3415
|
+
message: string;
|
|
3416
|
+
code?: string;
|
|
3417
|
+
errors?: {
|
|
3418
|
+
path: string;
|
|
3419
|
+
message: string;
|
|
3420
|
+
}[];
|
|
3421
|
+
retryAfterSeconds?: number;
|
|
3422
|
+
};
|
|
3423
|
+
};
|
|
3424
|
+
};
|
|
3425
|
+
};
|
|
3426
|
+
}, {
|
|
3427
|
+
params: {
|
|
3428
|
+
path: {
|
|
3429
|
+
id: string;
|
|
3430
|
+
};
|
|
3431
|
+
};
|
|
3432
|
+
body: {
|
|
3433
|
+
name: string;
|
|
3434
|
+
password: string;
|
|
3435
|
+
content: string;
|
|
3436
|
+
};
|
|
3437
|
+
}, `${string}/${string}`>>;
|
|
3438
|
+
/**
|
|
3439
|
+
* Sube el logo de la empresa: PNG o JPG, hasta 200 KB, 2500 px por lado y
|
|
3440
|
+
* 4 millones de píxeles.
|
|
3441
|
+
*/
|
|
3442
|
+
uploadCompanyLogo(id: string, logo: Blob, nombreArchivo?: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3066
3443
|
parameters: {
|
|
3067
3444
|
query?: never;
|
|
3068
3445
|
header?: never;
|
|
@@ -3129,7 +3506,467 @@ export declare class FacturacionClient {
|
|
|
3129
3506
|
id: string;
|
|
3130
3507
|
};
|
|
3131
3508
|
};
|
|
3509
|
+
body: never;
|
|
3510
|
+
bodySerializer: (b: unknown) => FormData;
|
|
3132
3511
|
}, `${string}/${string}`>>;
|
|
3512
|
+
/** Quita el logo de la empresa. */
|
|
3513
|
+
deleteCompanyLogo(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3514
|
+
parameters: {
|
|
3515
|
+
query?: never;
|
|
3516
|
+
header?: never;
|
|
3517
|
+
path: {
|
|
3518
|
+
id: string;
|
|
3519
|
+
};
|
|
3520
|
+
cookie?: never;
|
|
3521
|
+
};
|
|
3522
|
+
requestBody?: never;
|
|
3523
|
+
responses: {
|
|
3524
|
+
401: {
|
|
3525
|
+
headers: {
|
|
3526
|
+
[name: string]: unknown;
|
|
3527
|
+
};
|
|
3528
|
+
content: {
|
|
3529
|
+
"application/json": {
|
|
3530
|
+
success: boolean;
|
|
3531
|
+
message: string;
|
|
3532
|
+
code?: string;
|
|
3533
|
+
errors?: {
|
|
3534
|
+
path: string;
|
|
3535
|
+
message: string;
|
|
3536
|
+
}[];
|
|
3537
|
+
};
|
|
3538
|
+
};
|
|
3539
|
+
};
|
|
3540
|
+
403: {
|
|
3541
|
+
headers: {
|
|
3542
|
+
[name: string]: unknown;
|
|
3543
|
+
};
|
|
3544
|
+
content: {
|
|
3545
|
+
"application/json": {
|
|
3546
|
+
success: boolean;
|
|
3547
|
+
message: string;
|
|
3548
|
+
code?: string;
|
|
3549
|
+
errors?: {
|
|
3550
|
+
path: string;
|
|
3551
|
+
message: string;
|
|
3552
|
+
}[];
|
|
3553
|
+
};
|
|
3554
|
+
};
|
|
3555
|
+
};
|
|
3556
|
+
429: {
|
|
3557
|
+
headers: {
|
|
3558
|
+
[name: string]: unknown;
|
|
3559
|
+
};
|
|
3560
|
+
content: {
|
|
3561
|
+
"application/json": {
|
|
3562
|
+
success: boolean;
|
|
3563
|
+
message: string;
|
|
3564
|
+
code?: string;
|
|
3565
|
+
errors?: {
|
|
3566
|
+
path: string;
|
|
3567
|
+
message: string;
|
|
3568
|
+
}[];
|
|
3569
|
+
retryAfterSeconds?: number;
|
|
3570
|
+
};
|
|
3571
|
+
};
|
|
3572
|
+
};
|
|
3573
|
+
};
|
|
3574
|
+
}, {
|
|
3575
|
+
params: {
|
|
3576
|
+
path: {
|
|
3577
|
+
id: string;
|
|
3578
|
+
};
|
|
3579
|
+
};
|
|
3580
|
+
}, `${string}/${string}`>>;
|
|
3581
|
+
/** Lista los establecimientos de una empresa (incluye los desactivados). */
|
|
3582
|
+
listBranches(companyId: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3583
|
+
parameters: {
|
|
3584
|
+
query?: never;
|
|
3585
|
+
header?: never;
|
|
3586
|
+
path: {
|
|
3587
|
+
id: string;
|
|
3588
|
+
};
|
|
3589
|
+
cookie?: never;
|
|
3590
|
+
};
|
|
3591
|
+
requestBody?: never;
|
|
3592
|
+
responses: {
|
|
3593
|
+
401: {
|
|
3594
|
+
headers: {
|
|
3595
|
+
[name: string]: unknown;
|
|
3596
|
+
};
|
|
3597
|
+
content: {
|
|
3598
|
+
"application/json": {
|
|
3599
|
+
success: boolean;
|
|
3600
|
+
message: string;
|
|
3601
|
+
code?: string;
|
|
3602
|
+
errors?: {
|
|
3603
|
+
path: string;
|
|
3604
|
+
message: string;
|
|
3605
|
+
}[];
|
|
3606
|
+
};
|
|
3607
|
+
};
|
|
3608
|
+
};
|
|
3609
|
+
403: {
|
|
3610
|
+
headers: {
|
|
3611
|
+
[name: string]: unknown;
|
|
3612
|
+
};
|
|
3613
|
+
content: {
|
|
3614
|
+
"application/json": {
|
|
3615
|
+
success: boolean;
|
|
3616
|
+
message: string;
|
|
3617
|
+
code?: string;
|
|
3618
|
+
errors?: {
|
|
3619
|
+
path: string;
|
|
3620
|
+
message: string;
|
|
3621
|
+
}[];
|
|
3622
|
+
};
|
|
3623
|
+
};
|
|
3624
|
+
};
|
|
3625
|
+
429: {
|
|
3626
|
+
headers: {
|
|
3627
|
+
[name: string]: unknown;
|
|
3628
|
+
};
|
|
3629
|
+
content: {
|
|
3630
|
+
"application/json": {
|
|
3631
|
+
success: boolean;
|
|
3632
|
+
message: string;
|
|
3633
|
+
code?: string;
|
|
3634
|
+
errors?: {
|
|
3635
|
+
path: string;
|
|
3636
|
+
message: string;
|
|
3637
|
+
}[];
|
|
3638
|
+
retryAfterSeconds?: number;
|
|
3639
|
+
};
|
|
3640
|
+
};
|
|
3641
|
+
};
|
|
3642
|
+
};
|
|
3643
|
+
}, {
|
|
3644
|
+
params: {
|
|
3645
|
+
path: {
|
|
3646
|
+
id: string;
|
|
3647
|
+
};
|
|
3648
|
+
};
|
|
3649
|
+
}, `${string}/${string}`>>;
|
|
3650
|
+
/** Registra un anexo. El `codigo` es el que SUNAT le asignó (4 dígitos). */
|
|
3651
|
+
createBranch(companyId: string, body: CreateBranchInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
3652
|
+
parameters: {
|
|
3653
|
+
query?: never;
|
|
3654
|
+
header?: never;
|
|
3655
|
+
path: {
|
|
3656
|
+
id: string;
|
|
3657
|
+
};
|
|
3658
|
+
cookie?: never;
|
|
3659
|
+
};
|
|
3660
|
+
requestBody: {
|
|
3661
|
+
content: {
|
|
3662
|
+
"application/json": {
|
|
3663
|
+
codigo: string;
|
|
3664
|
+
nombre?: string;
|
|
3665
|
+
ubigeo?: string;
|
|
3666
|
+
direccion?: string;
|
|
3667
|
+
departamento?: string;
|
|
3668
|
+
provincia?: string;
|
|
3669
|
+
distrito?: string;
|
|
3670
|
+
urbanizacion?: string;
|
|
3671
|
+
isActive?: boolean;
|
|
3672
|
+
};
|
|
3673
|
+
};
|
|
3674
|
+
};
|
|
3675
|
+
responses: {
|
|
3676
|
+
401: {
|
|
3677
|
+
headers: {
|
|
3678
|
+
[name: string]: unknown;
|
|
3679
|
+
};
|
|
3680
|
+
content: {
|
|
3681
|
+
"application/json": {
|
|
3682
|
+
success: boolean;
|
|
3683
|
+
message: string;
|
|
3684
|
+
code?: string;
|
|
3685
|
+
errors?: {
|
|
3686
|
+
path: string;
|
|
3687
|
+
message: string;
|
|
3688
|
+
}[];
|
|
3689
|
+
};
|
|
3690
|
+
};
|
|
3691
|
+
};
|
|
3692
|
+
403: {
|
|
3693
|
+
headers: {
|
|
3694
|
+
[name: string]: unknown;
|
|
3695
|
+
};
|
|
3696
|
+
content: {
|
|
3697
|
+
"application/json": {
|
|
3698
|
+
success: boolean;
|
|
3699
|
+
message: string;
|
|
3700
|
+
code?: string;
|
|
3701
|
+
errors?: {
|
|
3702
|
+
path: string;
|
|
3703
|
+
message: string;
|
|
3704
|
+
}[];
|
|
3705
|
+
};
|
|
3706
|
+
};
|
|
3707
|
+
};
|
|
3708
|
+
429: {
|
|
3709
|
+
headers: {
|
|
3710
|
+
[name: string]: unknown;
|
|
3711
|
+
};
|
|
3712
|
+
content: {
|
|
3713
|
+
"application/json": {
|
|
3714
|
+
success: boolean;
|
|
3715
|
+
message: string;
|
|
3716
|
+
code?: string;
|
|
3717
|
+
errors?: {
|
|
3718
|
+
path: string;
|
|
3719
|
+
message: string;
|
|
3720
|
+
}[];
|
|
3721
|
+
retryAfterSeconds?: number;
|
|
3722
|
+
};
|
|
3723
|
+
};
|
|
3724
|
+
};
|
|
3725
|
+
};
|
|
3726
|
+
}, {
|
|
3727
|
+
params: {
|
|
3728
|
+
path: {
|
|
3729
|
+
id: string;
|
|
3730
|
+
};
|
|
3731
|
+
};
|
|
3732
|
+
body: {
|
|
3733
|
+
codigo: string;
|
|
3734
|
+
nombre?: string;
|
|
3735
|
+
ubigeo?: string;
|
|
3736
|
+
direccion?: string;
|
|
3737
|
+
departamento?: string;
|
|
3738
|
+
provincia?: string;
|
|
3739
|
+
distrito?: string;
|
|
3740
|
+
urbanizacion?: string;
|
|
3741
|
+
isActive?: boolean;
|
|
3742
|
+
};
|
|
3743
|
+
}, `${string}/${string}`>>;
|
|
3744
|
+
/** Actualiza un anexo (el `codigo` no cambia). */
|
|
3745
|
+
updateBranch(companyId: string, branchId: string, body: UpdateBranchInput): Promise<import("openapi-fetch").FetchResponse<{
|
|
3746
|
+
parameters: {
|
|
3747
|
+
query?: never;
|
|
3748
|
+
header?: never;
|
|
3749
|
+
path: {
|
|
3750
|
+
id: string;
|
|
3751
|
+
branchId: string;
|
|
3752
|
+
};
|
|
3753
|
+
cookie?: never;
|
|
3754
|
+
};
|
|
3755
|
+
requestBody: {
|
|
3756
|
+
content: {
|
|
3757
|
+
"application/json": {
|
|
3758
|
+
nombre?: string;
|
|
3759
|
+
ubigeo?: string;
|
|
3760
|
+
direccion?: string;
|
|
3761
|
+
departamento?: string;
|
|
3762
|
+
provincia?: string;
|
|
3763
|
+
distrito?: string;
|
|
3764
|
+
urbanizacion?: string;
|
|
3765
|
+
isActive?: boolean;
|
|
3766
|
+
};
|
|
3767
|
+
};
|
|
3768
|
+
};
|
|
3769
|
+
responses: {
|
|
3770
|
+
401: {
|
|
3771
|
+
headers: {
|
|
3772
|
+
[name: string]: unknown;
|
|
3773
|
+
};
|
|
3774
|
+
content: {
|
|
3775
|
+
"application/json": {
|
|
3776
|
+
success: boolean;
|
|
3777
|
+
message: string;
|
|
3778
|
+
code?: string;
|
|
3779
|
+
errors?: {
|
|
3780
|
+
path: string;
|
|
3781
|
+
message: string;
|
|
3782
|
+
}[];
|
|
3783
|
+
};
|
|
3784
|
+
};
|
|
3785
|
+
};
|
|
3786
|
+
403: {
|
|
3787
|
+
headers: {
|
|
3788
|
+
[name: string]: unknown;
|
|
3789
|
+
};
|
|
3790
|
+
content: {
|
|
3791
|
+
"application/json": {
|
|
3792
|
+
success: boolean;
|
|
3793
|
+
message: string;
|
|
3794
|
+
code?: string;
|
|
3795
|
+
errors?: {
|
|
3796
|
+
path: string;
|
|
3797
|
+
message: string;
|
|
3798
|
+
}[];
|
|
3799
|
+
};
|
|
3800
|
+
};
|
|
3801
|
+
};
|
|
3802
|
+
429: {
|
|
3803
|
+
headers: {
|
|
3804
|
+
[name: string]: unknown;
|
|
3805
|
+
};
|
|
3806
|
+
content: {
|
|
3807
|
+
"application/json": {
|
|
3808
|
+
success: boolean;
|
|
3809
|
+
message: string;
|
|
3810
|
+
code?: string;
|
|
3811
|
+
errors?: {
|
|
3812
|
+
path: string;
|
|
3813
|
+
message: string;
|
|
3814
|
+
}[];
|
|
3815
|
+
retryAfterSeconds?: number;
|
|
3816
|
+
};
|
|
3817
|
+
};
|
|
3818
|
+
};
|
|
3819
|
+
};
|
|
3820
|
+
}, {
|
|
3821
|
+
params: {
|
|
3822
|
+
path: {
|
|
3823
|
+
id: string;
|
|
3824
|
+
branchId: string;
|
|
3825
|
+
};
|
|
3826
|
+
};
|
|
3827
|
+
body: {
|
|
3828
|
+
nombre?: string;
|
|
3829
|
+
ubigeo?: string;
|
|
3830
|
+
direccion?: string;
|
|
3831
|
+
departamento?: string;
|
|
3832
|
+
provincia?: string;
|
|
3833
|
+
distrito?: string;
|
|
3834
|
+
urbanizacion?: string;
|
|
3835
|
+
isActive?: boolean;
|
|
3836
|
+
};
|
|
3837
|
+
}, `${string}/${string}`>>;
|
|
3838
|
+
/** Desactiva un anexo (no se borra; el matriz 0000 no se puede desactivar). */
|
|
3839
|
+
deactivateBranch(companyId: string, branchId: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
3840
|
+
parameters: {
|
|
3841
|
+
query?: never;
|
|
3842
|
+
header?: never;
|
|
3843
|
+
path: {
|
|
3844
|
+
id: string;
|
|
3845
|
+
branchId: string;
|
|
3846
|
+
};
|
|
3847
|
+
cookie?: never;
|
|
3848
|
+
};
|
|
3849
|
+
requestBody?: never;
|
|
3850
|
+
responses: {
|
|
3851
|
+
401: {
|
|
3852
|
+
headers: {
|
|
3853
|
+
[name: string]: unknown;
|
|
3854
|
+
};
|
|
3855
|
+
content: {
|
|
3856
|
+
"application/json": {
|
|
3857
|
+
success: boolean;
|
|
3858
|
+
message: string;
|
|
3859
|
+
code?: string;
|
|
3860
|
+
errors?: {
|
|
3861
|
+
path: string;
|
|
3862
|
+
message: string;
|
|
3863
|
+
}[];
|
|
3864
|
+
};
|
|
3865
|
+
};
|
|
3866
|
+
};
|
|
3867
|
+
403: {
|
|
3868
|
+
headers: {
|
|
3869
|
+
[name: string]: unknown;
|
|
3870
|
+
};
|
|
3871
|
+
content: {
|
|
3872
|
+
"application/json": {
|
|
3873
|
+
success: boolean;
|
|
3874
|
+
message: string;
|
|
3875
|
+
code?: string;
|
|
3876
|
+
errors?: {
|
|
3877
|
+
path: string;
|
|
3878
|
+
message: string;
|
|
3879
|
+
}[];
|
|
3880
|
+
};
|
|
3881
|
+
};
|
|
3882
|
+
};
|
|
3883
|
+
429: {
|
|
3884
|
+
headers: {
|
|
3885
|
+
[name: string]: unknown;
|
|
3886
|
+
};
|
|
3887
|
+
content: {
|
|
3888
|
+
"application/json": {
|
|
3889
|
+
success: boolean;
|
|
3890
|
+
message: string;
|
|
3891
|
+
code?: string;
|
|
3892
|
+
errors?: {
|
|
3893
|
+
path: string;
|
|
3894
|
+
message: string;
|
|
3895
|
+
}[];
|
|
3896
|
+
retryAfterSeconds?: number;
|
|
3897
|
+
};
|
|
3898
|
+
};
|
|
3899
|
+
};
|
|
3900
|
+
};
|
|
3901
|
+
}, {
|
|
3902
|
+
params: {
|
|
3903
|
+
path: {
|
|
3904
|
+
id: string;
|
|
3905
|
+
branchId: string;
|
|
3906
|
+
};
|
|
3907
|
+
};
|
|
3908
|
+
}, `${string}/${string}`>>;
|
|
3909
|
+
/** Comprobantes emitidos en el periodo actual y el límite de tu plan. */
|
|
3910
|
+
getUsage(): Promise<import("openapi-fetch").FetchResponse<{
|
|
3911
|
+
parameters: {
|
|
3912
|
+
query?: never;
|
|
3913
|
+
header?: never;
|
|
3914
|
+
path?: never;
|
|
3915
|
+
cookie?: never;
|
|
3916
|
+
};
|
|
3917
|
+
requestBody?: never;
|
|
3918
|
+
responses: {
|
|
3919
|
+
401: {
|
|
3920
|
+
headers: {
|
|
3921
|
+
[name: string]: unknown;
|
|
3922
|
+
};
|
|
3923
|
+
content: {
|
|
3924
|
+
"application/json": {
|
|
3925
|
+
success: boolean;
|
|
3926
|
+
message: string;
|
|
3927
|
+
code?: string;
|
|
3928
|
+
errors?: {
|
|
3929
|
+
path: string;
|
|
3930
|
+
message: string;
|
|
3931
|
+
}[];
|
|
3932
|
+
};
|
|
3933
|
+
};
|
|
3934
|
+
};
|
|
3935
|
+
403: {
|
|
3936
|
+
headers: {
|
|
3937
|
+
[name: string]: unknown;
|
|
3938
|
+
};
|
|
3939
|
+
content: {
|
|
3940
|
+
"application/json": {
|
|
3941
|
+
success: boolean;
|
|
3942
|
+
message: string;
|
|
3943
|
+
code?: string;
|
|
3944
|
+
errors?: {
|
|
3945
|
+
path: string;
|
|
3946
|
+
message: string;
|
|
3947
|
+
}[];
|
|
3948
|
+
};
|
|
3949
|
+
};
|
|
3950
|
+
};
|
|
3951
|
+
429: {
|
|
3952
|
+
headers: {
|
|
3953
|
+
[name: string]: unknown;
|
|
3954
|
+
};
|
|
3955
|
+
content: {
|
|
3956
|
+
"application/json": {
|
|
3957
|
+
success: boolean;
|
|
3958
|
+
message: string;
|
|
3959
|
+
code?: string;
|
|
3960
|
+
errors?: {
|
|
3961
|
+
path: string;
|
|
3962
|
+
message: string;
|
|
3963
|
+
}[];
|
|
3964
|
+
retryAfterSeconds?: number;
|
|
3965
|
+
};
|
|
3966
|
+
};
|
|
3967
|
+
};
|
|
3968
|
+
};
|
|
3969
|
+
}, {}, `${string}/${string}`>>;
|
|
3133
3970
|
/** Lista los catálogos SUNAT disponibles. */
|
|
3134
3971
|
getCatalogs(): Promise<import("openapi-fetch").FetchResponse<{
|
|
3135
3972
|
parameters: {
|