@databolsa/sdk 1.0.14 → 1.0.15
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/client.d.ts +2 -3
- package/dist/http-client.d.ts +1 -2
- package/dist/index.js +5 -5
- package/dist/schema.d.ts +17 -11
- package/dist/types.d.ts +0 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -247,7 +247,6 @@ export interface DataBolsaClient {
|
|
|
247
247
|
filename?: string;
|
|
248
248
|
contentBase64: string;
|
|
249
249
|
visibility?: "private" | "unlisted" | "public";
|
|
250
|
-
showPersonal?: boolean;
|
|
251
250
|
}): Promise<CreateThesisResponse>;
|
|
252
251
|
/** Documento completo + status do export. */
|
|
253
252
|
getThesis(id: string): Promise<ThesisResponse>;
|
|
@@ -257,8 +256,8 @@ export interface DataBolsaClient {
|
|
|
257
256
|
deleteThesis(id: string): Promise<{
|
|
258
257
|
deleted?: boolean;
|
|
259
258
|
}>;
|
|
260
|
-
/** Muda a visibilidade (public aparece no perfil;
|
|
261
|
-
publishThesis(id: string, visibility: "private" | "unlisted" | "public"
|
|
259
|
+
/** Muda a visibilidade (public aparece no perfil; o doc publicado vai inteiro). */
|
|
260
|
+
publishThesis(id: string, visibility: "private" | "unlisted" | "public"): Promise<ThesisResponse>;
|
|
262
261
|
/** Exporta em PDF (plano pago): 202 queued ou 200 ready com o link. */
|
|
263
262
|
exportThesis(id: string): Promise<ThesisExportStatus>;
|
|
264
263
|
/** Histórico mensal de UMA carteira. */
|
package/dist/http-client.d.ts
CHANGED
|
@@ -213,14 +213,13 @@ export declare class HttpClient implements DataBolsaClient {
|
|
|
213
213
|
filename?: string;
|
|
214
214
|
contentBase64: string;
|
|
215
215
|
visibility?: "private" | "unlisted" | "public";
|
|
216
|
-
showPersonal?: boolean;
|
|
217
216
|
}): Promise<CreateThesisResponse>;
|
|
218
217
|
getThesis(id: string): Promise<ThesisResponse>;
|
|
219
218
|
updateThesis(id: string, patch: Partial<ThesisWriteInput>): Promise<ThesisResponse>;
|
|
220
219
|
deleteThesis(id: string): Promise<{
|
|
221
220
|
deleted?: boolean;
|
|
222
221
|
}>;
|
|
223
|
-
publishThesis(id: string, visibility: "private" | "unlisted" | "public"
|
|
222
|
+
publishThesis(id: string, visibility: "private" | "unlisted" | "public"): Promise<ThesisResponse>;
|
|
224
223
|
exportThesis(id: string): Promise<ThesisExportStatus>;
|
|
225
224
|
getPortfolioHistoryById(id: string): Promise<PortfolioHistoryResponse>;
|
|
226
225
|
addPortfolioAsset(id: string, asset: PortfolioAssetRef): Promise<unknown>;
|
package/dist/index.js
CHANGED
|
@@ -500,13 +500,13 @@ class HttpClient {
|
|
|
500
500
|
createThesis(input) {
|
|
501
501
|
return this.request("/theses", undefined, {
|
|
502
502
|
method: "POST",
|
|
503
|
-
body: { doc: input.doc, visibility: input.visibility
|
|
503
|
+
body: { doc: input.doc, visibility: input.visibility }
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
506
|
importThesisFile(input) {
|
|
507
507
|
return this.request("/theses/import", undefined, {
|
|
508
508
|
method: "POST",
|
|
509
|
-
body: { filename: input.filename, content_base64: input.contentBase64, visibility: input.visibility
|
|
509
|
+
body: { filename: input.filename, content_base64: input.contentBase64, visibility: input.visibility }
|
|
510
510
|
});
|
|
511
511
|
}
|
|
512
512
|
getThesis(id) {
|
|
@@ -515,16 +515,16 @@ class HttpClient {
|
|
|
515
515
|
updateThesis(id, patch) {
|
|
516
516
|
return this.request(`/theses/${enc(id)}`, undefined, {
|
|
517
517
|
method: "PUT",
|
|
518
|
-
body: { doc: patch.doc, visibility: patch.visibility
|
|
518
|
+
body: { doc: patch.doc, visibility: patch.visibility }
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
deleteThesis(id) {
|
|
522
522
|
return this.request(`/theses/${enc(id)}`, undefined, { method: "DELETE" });
|
|
523
523
|
}
|
|
524
|
-
publishThesis(id, visibility
|
|
524
|
+
publishThesis(id, visibility) {
|
|
525
525
|
return this.request(`/theses/${enc(id)}/publish`, undefined, {
|
|
526
526
|
method: "POST",
|
|
527
|
-
body: { visibility
|
|
527
|
+
body: { visibility }
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
530
|
exportThesis(id) {
|
package/dist/schema.d.ts
CHANGED
|
@@ -175,7 +175,10 @@ export interface paths {
|
|
|
175
175
|
path?: never;
|
|
176
176
|
cookie?: never;
|
|
177
177
|
};
|
|
178
|
-
/**
|
|
178
|
+
/**
|
|
179
|
+
* Histórico de um indicador (trimestral)
|
|
180
|
+
* @description Série trimestral do indicador. Segue a MESMA política do snapshot (/stocks/{ticker}/indicators): indicadores que não se aplicam a instituições financeiras (margem_bruta, margem_ebit, margem_liquida, psr, p_ebit, p_fcf, ev_ebit, ev_ebitda, ebit_ativos, giro_ativos) vêm com os pontos em null e o motivo em `reason`, em vez de expor a série completa.
|
|
181
|
+
*/
|
|
179
182
|
get: operations["getStockIndicatorHistory"];
|
|
180
183
|
put?: never;
|
|
181
184
|
post?: never;
|
|
@@ -561,7 +564,7 @@ export interface paths {
|
|
|
561
564
|
};
|
|
562
565
|
/**
|
|
563
566
|
* Indicadores do FII (snapshot)
|
|
564
|
-
* @description Snapshot dos indicadores do FII: dividend yield (mês e 12m), P/VP, vacância, patrimônio líquido, valor patrimonial por cota (vp_cota) e nº de cotistas. Para a série temporal use o histórico.
|
|
567
|
+
* @description Snapshot dos indicadores do FII: dividend yield (mês e 12m), P/VP, vacância, patrimônio líquido, valor patrimonial por cota (vp_cota) e nº de cotistas. Para a série temporal use o histórico. preco/pvp/dy_12m/ffo_yield usam o PREÇO MAIS RECENTE disponível (ver `price_basis` na resposta) — pode ser de um pregão posterior ao mês do informe em `reference_date`, então divergem do histórico, que usa o fechamento do FIM DO MÊS de cada data (ambos corretos; bases de preço diferentes).
|
|
565
568
|
*/
|
|
566
569
|
get: operations["getFiiIndicators"];
|
|
567
570
|
put?: never;
|
|
@@ -579,7 +582,10 @@ export interface paths {
|
|
|
579
582
|
path?: never;
|
|
580
583
|
cookie?: never;
|
|
581
584
|
};
|
|
582
|
-
/**
|
|
585
|
+
/**
|
|
586
|
+
* Histórico de um indicador do FII (informe mensal)
|
|
587
|
+
* @description Série mensal do informe CVM. Em `pvp` e `dy_12m`, o preço usado é o FECHAMENTO DO ÚLTIMO PREGÃO DE CADA MÊS (não o preço mais recente) — por isso podem divergir do snapshot (/fiis/{ticker}/indicators) na mesma reference_date; ver `price_basis` no snapshot. `dy_12m` soma as distribuições dos 12 meses até o fim do mês AJUSTADAS por desdobramentos/grupamentos, contra o fechamento na mesma base de cotas.
|
|
588
|
+
*/
|
|
583
589
|
get: operations["getFiiIndicatorHistory"];
|
|
584
590
|
put?: never;
|
|
585
591
|
post?: never;
|
|
@@ -1708,7 +1714,7 @@ export interface paths {
|
|
|
1708
1714
|
put?: never;
|
|
1709
1715
|
/**
|
|
1710
1716
|
* Publicar / mudar visibilidade
|
|
1711
|
-
* @description Define a visibilidade: `public` aparece no perfil e tem página própria; `unlisted` só por link; `private` volta a ser só sua.
|
|
1717
|
+
* @description Define a visibilidade: `public` aparece no perfil e tem página própria; `unlisted` só por link; `private` volta a ser só sua. O doc publicado vai INTEIRO (revisar antes é do autor); leitores anônimos veem só a capa e precisam entrar para ler o resto.
|
|
1712
1718
|
*/
|
|
1713
1719
|
post: operations["publishThesis"];
|
|
1714
1720
|
delete?: never;
|
|
@@ -1728,7 +1734,7 @@ export interface paths {
|
|
|
1728
1734
|
put?: never;
|
|
1729
1735
|
/**
|
|
1730
1736
|
* Exportar em PDF (plano pago)
|
|
1731
|
-
* @description Gera o PDF (A4, com preview PNG) da tese e publica num link público de mídia. Assíncrono: responde 202 {status: queued} e o getThesis passa a devolver `pdfUrl` quando pronto; se o conteúdo não mudou desde o último export, responde 200 direto com o link.
|
|
1737
|
+
* @description Gera o PDF (A4, com preview PNG) da tese e publica num link público de mídia. Assíncrono: responde 202 {status: queued} e o getThesis passa a devolver `pdfUrl` quando pronto; se o conteúdo não mudou desde o último export, responde 200 direto com o link. O PDF traz o doc inteiro.
|
|
1732
1738
|
*/
|
|
1733
1739
|
post: operations["exportThesis"];
|
|
1734
1740
|
delete?: never;
|
|
@@ -2081,7 +2087,10 @@ export interface components {
|
|
|
2081
2087
|
FiiDistribution: {
|
|
2082
2088
|
ex_date: string | null;
|
|
2083
2089
|
payment_date: string | null;
|
|
2090
|
+
/** @description rendimento por cota NOMINAL pago na época (base de cotas da data-com) */
|
|
2084
2091
|
value_per_share: number | null;
|
|
2092
|
+
/** @description rendimento por cota ajustado por desdobramentos/grupamentos para a base de cotas ATUAL — comparável/somável através de splits (o value_per_share permanece nominal da época) */
|
|
2093
|
+
value_per_share_adj: number | null;
|
|
2085
2094
|
tax_free: boolean;
|
|
2086
2095
|
};
|
|
2087
2096
|
FiiMonthlyReport: {
|
|
@@ -2418,7 +2427,6 @@ export interface components {
|
|
|
2418
2427
|
kind?: string;
|
|
2419
2428
|
/** @enum {string} */
|
|
2420
2429
|
visibility?: "private" | "unlisted" | "public";
|
|
2421
|
-
showPersonal?: boolean;
|
|
2422
2430
|
/** @description idle | queued | processing | ready | failed */
|
|
2423
2431
|
exportStatus?: string;
|
|
2424
2432
|
pdfUrl?: string | null;
|
|
@@ -3106,6 +3114,7 @@ export interface operations {
|
|
|
3106
3114
|
label: string;
|
|
3107
3115
|
/** @enum {string} */
|
|
3108
3116
|
unit: "ratio" | "percent" | "brl" | "brl_per_share" | "count" | "days";
|
|
3117
|
+
reason: string | null;
|
|
3109
3118
|
observations: components["schemas"]["Observation"][];
|
|
3110
3119
|
};
|
|
3111
3120
|
};
|
|
@@ -3916,6 +3925,7 @@ export interface operations {
|
|
|
3916
3925
|
"application/json": {
|
|
3917
3926
|
ticker: string;
|
|
3918
3927
|
reference_date: string | null;
|
|
3928
|
+
price_basis: string;
|
|
3919
3929
|
indicators: components["schemas"]["IndicatorValue"][];
|
|
3920
3930
|
};
|
|
3921
3931
|
};
|
|
@@ -3958,6 +3968,7 @@ export interface operations {
|
|
|
3958
3968
|
label: string;
|
|
3959
3969
|
/** @enum {string} */
|
|
3960
3970
|
unit: "ratio" | "percent" | "brl" | "brl_per_share" | "count" | "days";
|
|
3971
|
+
reason: string | null;
|
|
3961
3972
|
observations: components["schemas"]["Observation"][];
|
|
3962
3973
|
};
|
|
3963
3974
|
};
|
|
@@ -6382,8 +6393,6 @@ export interface operations {
|
|
|
6382
6393
|
* @enum {string}
|
|
6383
6394
|
*/
|
|
6384
6395
|
visibility?: "private" | "unlisted" | "public";
|
|
6385
|
-
/** @description Exibir seções pessoais (minha-posicao) na leitura pública. Default: false (redigidas). */
|
|
6386
|
-
show_personal?: boolean;
|
|
6387
6396
|
};
|
|
6388
6397
|
};
|
|
6389
6398
|
};
|
|
@@ -6426,7 +6435,6 @@ export interface operations {
|
|
|
6426
6435
|
content_base64: string;
|
|
6427
6436
|
/** @enum {string} */
|
|
6428
6437
|
visibility?: "private" | "unlisted" | "public";
|
|
6429
|
-
show_personal?: boolean;
|
|
6430
6438
|
};
|
|
6431
6439
|
};
|
|
6432
6440
|
};
|
|
@@ -6501,7 +6509,6 @@ export interface operations {
|
|
|
6501
6509
|
doc?: components["schemas"]["ReportDocInput"];
|
|
6502
6510
|
/** @enum {string} */
|
|
6503
6511
|
visibility?: "private" | "unlisted" | "public";
|
|
6504
|
-
show_personal?: boolean;
|
|
6505
6512
|
};
|
|
6506
6513
|
};
|
|
6507
6514
|
};
|
|
@@ -6575,7 +6582,6 @@ export interface operations {
|
|
|
6575
6582
|
"application/json": {
|
|
6576
6583
|
/** @enum {string} */
|
|
6577
6584
|
visibility: "private" | "unlisted" | "public";
|
|
6578
|
-
show_personal?: boolean;
|
|
6579
6585
|
};
|
|
6580
6586
|
};
|
|
6581
6587
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -174,7 +174,6 @@ export interface ThesisWriteInput {
|
|
|
174
174
|
/** O ReportDoc completo (JSON) — validado no servidor. */
|
|
175
175
|
doc: Record<string, unknown>;
|
|
176
176
|
visibility?: "private" | "unlisted" | "public";
|
|
177
|
-
showPersonal?: boolean;
|
|
178
177
|
}
|
|
179
178
|
/** Referência de ativo dentro de uma carteira (chave natural). */
|
|
180
179
|
export interface PortfolioAssetRef {
|
package/package.json
CHANGED