@v1ct0rbr/minivault-web 0.2.0 → 0.3.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.
@@ -58,12 +58,13 @@ export interface DumpOptions {
58
58
  includeRelatedTables?: boolean;
59
59
  }
60
60
  export interface BackupRequest {
61
- database: DatabaseCredentials;
61
+ /** Opcional: usa o banco padrão configurado no servidor (env) quando ausente. */
62
+ database?: DatabaseCredentials;
62
63
  originStorage?: OriginStorageConfig;
63
64
  dumpOptions?: DumpOptions;
64
65
  }
65
66
  export interface RestoreRequest {
66
- database: DatabaseCredentials;
67
+ database?: DatabaseCredentials;
67
68
  originStorage?: OriginStorageConfig;
68
69
  }
69
70
  export interface ImportResult {
@@ -75,9 +76,47 @@ export interface ImportResult {
75
76
  export interface ImportFromStorageRequest {
76
77
  storageType: string;
77
78
  storagePath: string;
78
- database: DatabaseCredentials;
79
+ database?: DatabaseCredentials;
79
80
  storageConfig?: OriginStorageConfig;
80
81
  }
82
+ /** Banco configurado no servidor via env (MINIVAULT_DB_*) e tabelas excluídas por segurança. */
83
+ export interface DbInfo {
84
+ configured: boolean;
85
+ host: string | null;
86
+ port: number;
87
+ databaseName: string | null;
88
+ databaseType: string | null;
89
+ exportExcludedTables: string[];
90
+ importExcludedTables: string[];
91
+ }
92
+ export interface TableInfo {
93
+ schema: string;
94
+ name: string;
95
+ type: string;
96
+ fullName: string;
97
+ }
98
+ export interface ColumnInfo {
99
+ name: string;
100
+ position: number;
101
+ dataType: string;
102
+ nullable: boolean;
103
+ primaryKey: boolean;
104
+ generated: boolean;
105
+ }
106
+ export interface RelationshipInfo {
107
+ constraintName: string;
108
+ fromTable: string;
109
+ fromColumns: string[];
110
+ toTable: string;
111
+ toColumns: string[];
112
+ summary: string;
113
+ }
114
+ export interface TableDetail {
115
+ table: string;
116
+ columns: ColumnInfo[];
117
+ primaryKey: string[];
118
+ relationships: RelationshipInfo[];
119
+ }
81
120
  export interface StorageFileItem {
82
121
  name: string;
83
122
  path: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@v1ct0rbr/minivault-web",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Módulo independente de gerenciamento de backups (minivault). Consumível como pacote npm em qualquer app React. Cliente do minivault REST API (acesso tipicamente via proxy autenticado).",
5
5
  "author": "Victor Queiroga (https://www.linkedin.com/in/victor-queiroga)",
6
6
  "license": "MIT",