apiempresas 1.6.0 → 1.6.1
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/dist/ApiEmpresas.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Tenders } from './resources/Tenders';
|
|
|
6
6
|
import { Sanctions } from './resources/Sanctions';
|
|
7
7
|
import { verifyWebhookSignature, constructWebhookEvent } from './webhooks/signature';
|
|
8
8
|
/** Versión del SDK, enviada en el User-Agent. */
|
|
9
|
-
export declare const SDK_VERSION = "1.6.
|
|
9
|
+
export declare const SDK_VERSION = "1.6.1";
|
|
10
10
|
export declare class ApiEmpresas {
|
|
11
11
|
private apiKey;
|
|
12
12
|
private baseURL;
|
package/dist/ApiEmpresas.js
CHANGED
|
@@ -9,7 +9,7 @@ const Tenders_1 = require("./resources/Tenders");
|
|
|
9
9
|
const Sanctions_1 = require("./resources/Sanctions");
|
|
10
10
|
const signature_1 = require("./webhooks/signature");
|
|
11
11
|
/** Versión del SDK, enviada en el User-Agent. */
|
|
12
|
-
exports.SDK_VERSION = '1.6.
|
|
12
|
+
exports.SDK_VERSION = '1.6.1';
|
|
13
13
|
/**
|
|
14
14
|
* Mensaje legible del cuerpo de error. Según el error, la API lo pone en
|
|
15
15
|
* message, detail, error (texto) o messages (errores de validación).
|
|
@@ -29,7 +29,7 @@ export declare class Watchlist {
|
|
|
29
29
|
}>;
|
|
30
30
|
/**
|
|
31
31
|
* Cambios en las empresas vigiladas desde una fecha (borme_act, status_change,
|
|
32
|
-
* risk_level_change), de más antiguo a más reciente.
|
|
32
|
+
* risk_level_change e insolvency), de más antiguo a más reciente.
|
|
33
33
|
*/
|
|
34
34
|
events(options?: WatchlistEventsOptions): Promise<{
|
|
35
35
|
data: WatchlistEvent[];
|
|
@@ -41,7 +41,7 @@ class Watchlist {
|
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Cambios en las empresas vigiladas desde una fecha (borme_act, status_change,
|
|
44
|
-
* risk_level_change), de más antiguo a más reciente.
|
|
44
|
+
* risk_level_change e insolvency), de más antiguo a más reciente.
|
|
45
45
|
*/
|
|
46
46
|
async events(options = {}) {
|
|
47
47
|
const params = new URLSearchParams();
|
package/dist/types.d.ts
CHANGED
|
@@ -317,7 +317,10 @@ export interface SegmentMeta {
|
|
|
317
317
|
truncated: boolean;
|
|
318
318
|
filters: Record<string, any>;
|
|
319
319
|
}
|
|
320
|
-
|
|
320
|
+
/** insolvency desde 1.6.1 (anuncio concursal en el BORME). */
|
|
321
|
+
export type WatchlistEventType = 'borme_act' | 'status_change' | 'risk_level_change' | 'insolvency';
|
|
322
|
+
/** Fase del concurso en los eventos insolvency (data.stage). */
|
|
323
|
+
export type InsolvencyStage = 'filed' | 'declared' | 'restructuring' | 'agreement' | 'liquidation' | 'classification' | 'concluded' | 'reopened' | 'enforcement_insolvency' | 'other';
|
|
321
324
|
export interface WatchlistEvent {
|
|
322
325
|
/** Estable: úsalo para no procesar dos veces el mismo evento. */
|
|
323
326
|
id: string;
|
|
@@ -326,7 +329,8 @@ export interface WatchlistEvent {
|
|
|
326
329
|
company_name?: string | null;
|
|
327
330
|
date: string;
|
|
328
331
|
/** borme_act: act_types, description, url_pdf. status_change: status, status_code.
|
|
329
|
-
* risk_level_change: from, to, model_change (true/false, o null si no consta la versión del modelo).
|
|
332
|
+
* risk_level_change: from, to, model_change (true/false, o null si no consta la versión del modelo).
|
|
333
|
+
* insolvency (desde 1.6.1): stage (InsolvencyStage), status_code (estado actual), act_types, description, url_pdf. */
|
|
330
334
|
data: Record<string, any>;
|
|
331
335
|
}
|
|
332
336
|
export interface WatchlistAddResult {
|
|
@@ -351,7 +355,7 @@ export interface WatchlistEventsOptions {
|
|
|
351
355
|
page?: number;
|
|
352
356
|
limit?: number;
|
|
353
357
|
}
|
|
354
|
-
export type WebhookEvent = 'company.created' | 'company.borme_act' | 'company.status_changed' | 'company.risk_level_changed' | 'watchlist.*' | 'test.ping' | string;
|
|
358
|
+
export type WebhookEvent = 'company.created' | 'company.borme_act' | 'company.status_changed' | 'company.risk_level_changed' | 'company.insolvency' | 'watchlist.*' | 'test.ping' | string;
|
|
355
359
|
/** Filtros del evento company.created (desde 1.5.0). Sin filtros llegan todas las sociedades nuevas. */
|
|
356
360
|
export interface CompanyCreatedFilters {
|
|
357
361
|
/** Provincias del Registro Mercantil (hasta 10). Valores en catalog(). */
|