@nice2dev/ui-tools 1.0.10

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.
Files changed (158) hide show
  1. package/README.md +36 -0
  2. package/dist/access-control.d.ts +726 -0
  3. package/dist/access-control.d.ts.map +1 -0
  4. package/dist/accessibility-i18n.d.ts +1017 -0
  5. package/dist/accessibility-i18n.d.ts.map +1 -0
  6. package/dist/ai-assistant.d.ts +263 -0
  7. package/dist/ai-assistant.d.ts.map +1 -0
  8. package/dist/ai-playgrounds.d.ts +842 -0
  9. package/dist/ai-playgrounds.d.ts.map +1 -0
  10. package/dist/alerting-incidents.d.ts +558 -0
  11. package/dist/alerting-incidents.d.ts.map +1 -0
  12. package/dist/api-designer.d.ts +1568 -0
  13. package/dist/api-designer.d.ts.map +1 -0
  14. package/dist/api-testing.d.ts +1146 -0
  15. package/dist/api-testing.d.ts.map +1 -0
  16. package/dist/apm-profiling.d.ts +656 -0
  17. package/dist/apm-profiling.d.ts.map +1 -0
  18. package/dist/artifacts.d.ts +421 -0
  19. package/dist/artifacts.d.ts.map +1 -0
  20. package/dist/audit-compliance.d.ts +752 -0
  21. package/dist/audit-compliance.d.ts.map +1 -0
  22. package/dist/certificates.d.ts +256 -0
  23. package/dist/certificates.d.ts.map +1 -0
  24. package/dist/chart-builder.d.ts +1404 -0
  25. package/dist/chart-builder.d.ts.map +1 -0
  26. package/dist/cloud-instances.d.ts +169 -0
  27. package/dist/cloud-instances.d.ts.map +1 -0
  28. package/dist/config-management.d.ts +350 -0
  29. package/dist/config-management.d.ts.map +1 -0
  30. package/dist/containers.d.ts +256 -0
  31. package/dist/containers.d.ts.map +1 -0
  32. package/dist/dashboard-designer.d.ts +1238 -0
  33. package/dist/dashboard-designer.d.ts.map +1 -0
  34. package/dist/data-management.d.ts +496 -0
  35. package/dist/data-management.d.ts.map +1 -0
  36. package/dist/data-pipeline.d.ts +1105 -0
  37. package/dist/data-pipeline.d.ts.map +1 -0
  38. package/dist/data-warehouse.d.ts +1097 -0
  39. package/dist/data-warehouse.d.ts.map +1 -0
  40. package/dist/dataset-management.d.ts +782 -0
  41. package/dist/dataset-management.d.ts.map +1 -0
  42. package/dist/db-adapters.d.ts +704 -0
  43. package/dist/db-adapters.d.ts.map +1 -0
  44. package/dist/db-admin.d.ts +699 -0
  45. package/dist/db-admin.d.ts.map +1 -0
  46. package/dist/db-designer.d.ts +366 -0
  47. package/dist/db-designer.d.ts.map +1 -0
  48. package/dist/debugger.d.ts +356 -0
  49. package/dist/debugger.d.ts.map +1 -0
  50. package/dist/device-management.d.ts +871 -0
  51. package/dist/device-management.d.ts.map +1 -0
  52. package/dist/distributed-tracing.d.ts +427 -0
  53. package/dist/distributed-tracing.d.ts.map +1 -0
  54. package/dist/dns-management.d.ts +215 -0
  55. package/dist/dns-management.d.ts.map +1 -0
  56. package/dist/download-manager.d.ts +271 -0
  57. package/dist/download-manager.d.ts.map +1 -0
  58. package/dist/download-torrent.d.ts +1062 -0
  59. package/dist/download-torrent.d.ts.map +1 -0
  60. package/dist/edge-computing.d.ts +720 -0
  61. package/dist/edge-computing.d.ts.map +1 -0
  62. package/dist/education.d.ts +1135 -0
  63. package/dist/education.d.ts.map +1 -0
  64. package/dist/email-template.d.ts +1141 -0
  65. package/dist/email-template.d.ts.map +1 -0
  66. package/dist/erp-enterprise.d.ts +1270 -0
  67. package/dist/erp-enterprise.d.ts.map +1 -0
  68. package/dist/form-builder.d.ts +1117 -0
  69. package/dist/form-builder.d.ts.map +1 -0
  70. package/dist/game-engine-advanced.d.ts +1049 -0
  71. package/dist/game-engine-advanced.d.ts.map +1 -0
  72. package/dist/git.d.ts +415 -0
  73. package/dist/git.d.ts.map +1 -0
  74. package/dist/hardware-integration.d.ts +966 -0
  75. package/dist/hardware-integration.d.ts.map +1 -0
  76. package/dist/iac.d.ts +318 -0
  77. package/dist/iac.d.ts.map +1 -0
  78. package/dist/icon-tools.d.ts +1023 -0
  79. package/dist/icon-tools.d.ts.map +1 -0
  80. package/dist/ide.d.ts +322 -0
  81. package/dist/ide.d.ts.map +1 -0
  82. package/dist/index.cjs +2 -0
  83. package/dist/index.cjs.map +1 -0
  84. package/dist/index.d.ts +176 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.mjs +1887 -0
  87. package/dist/index.mjs.map +1 -0
  88. package/dist/integration-platform.d.ts +857 -0
  89. package/dist/integration-platform.d.ts.map +1 -0
  90. package/dist/kubernetes.d.ts +278 -0
  91. package/dist/kubernetes.d.ts.map +1 -0
  92. package/dist/life-management.d.ts +1132 -0
  93. package/dist/life-management.d.ts.map +1 -0
  94. package/dist/log-management.d.ts +473 -0
  95. package/dist/log-management.d.ts.map +1 -0
  96. package/dist/mathematics.d.ts +870 -0
  97. package/dist/mathematics.d.ts.map +1 -0
  98. package/dist/message-queue.d.ts +1006 -0
  99. package/dist/message-queue.d.ts.map +1 -0
  100. package/dist/metrics-dashboard.d.ts +596 -0
  101. package/dist/metrics-dashboard.d.ts.map +1 -0
  102. package/dist/mobile-components.d.ts +766 -0
  103. package/dist/mobile-components.d.ts.map +1 -0
  104. package/dist/model-deployment.d.ts +787 -0
  105. package/dist/model-deployment.d.ts.map +1 -0
  106. package/dist/model-registry.d.ts +740 -0
  107. package/dist/model-registry.d.ts.map +1 -0
  108. package/dist/model-training.d.ts +706 -0
  109. package/dist/model-training.d.ts.map +1 -0
  110. package/dist/network-config.d.ts +334 -0
  111. package/dist/network-config.d.ts.map +1 -0
  112. package/dist/network-monitoring.d.ts +291 -0
  113. package/dist/network-monitoring.d.ts.map +1 -0
  114. package/dist/pdf-tools.d.ts +1003 -0
  115. package/dist/pdf-tools.d.ts.map +1 -0
  116. package/dist/pipelines.d.ts +250 -0
  117. package/dist/pipelines.d.ts.map +1 -0
  118. package/dist/remote-desktop.d.ts +207 -0
  119. package/dist/remote-desktop.d.ts.map +1 -0
  120. package/dist/report-designer.d.ts +1153 -0
  121. package/dist/report-designer.d.ts.map +1 -0
  122. package/dist/scada-industrial.d.ts +848 -0
  123. package/dist/scada-industrial.d.ts.map +1 -0
  124. package/dist/scientific-research.d.ts +1149 -0
  125. package/dist/scientific-research.d.ts.map +1 -0
  126. package/dist/secret-management.d.ts +617 -0
  127. package/dist/secret-management.d.ts.map +1 -0
  128. package/dist/security-scanning.d.ts +714 -0
  129. package/dist/security-scanning.d.ts.map +1 -0
  130. package/dist/self-service-analytics.d.ts +1208 -0
  131. package/dist/self-service-analytics.d.ts.map +1 -0
  132. package/dist/sensor-dashboard.d.ts +845 -0
  133. package/dist/sensor-dashboard.d.ts.map +1 -0
  134. package/dist/server-management.d.ts +331 -0
  135. package/dist/server-management.d.ts.map +1 -0
  136. package/dist/smart-home.d.ts +861 -0
  137. package/dist/smart-home.d.ts.map +1 -0
  138. package/dist/spreadsheet.d.ts +1043 -0
  139. package/dist/spreadsheet.d.ts.map +1 -0
  140. package/dist/sql-editor.d.ts +402 -0
  141. package/dist/sql-editor.d.ts.map +1 -0
  142. package/dist/terminal.d.ts +245 -0
  143. package/dist/terminal.d.ts.map +1 -0
  144. package/dist/testing-qa.d.ts +1013 -0
  145. package/dist/testing-qa.d.ts.map +1 -0
  146. package/dist/torrent-client.d.ts +298 -0
  147. package/dist/torrent-client.d.ts.map +1 -0
  148. package/dist/traceless.d.ts +759 -0
  149. package/dist/traceless.d.ts.map +1 -0
  150. package/dist/virtual-machines.d.ts +199 -0
  151. package/dist/virtual-machines.d.ts.map +1 -0
  152. package/dist/visual-scripting.d.ts +381 -0
  153. package/dist/visual-scripting.d.ts.map +1 -0
  154. package/dist/word-processor.d.ts +1124 -0
  155. package/dist/word-processor.d.ts.map +1 -0
  156. package/dist/workspace.d.ts +333 -0
  157. package/dist/workspace.d.ts.map +1 -0
  158. package/package.json +62 -0
@@ -0,0 +1,1097 @@
1
+ /**
2
+ * @file data-warehouse.ts
3
+ * @module @nice2dev/ui-tools
4
+ * @description PRO-15.4 — Data Warehouse Explorer
5
+ *
6
+ * Types for warehouse browser: schema browser, data preview, query editor,
7
+ * saved queries, query history, cost estimation, optimization suggestions.
8
+ */
9
+ /** Warehouse type */
10
+ export type WarehouseType = 'snowflake' | 'bigquery' | 'redshift' | 'databricks' | 'athena' | 'synapse' | 'clickhouse' | 'duckdb' | 'trino' | 'presto' | 'spark' | 'hive' | 'custom';
11
+ /** Query status */
12
+ export type QueryStatus = 'pending' | 'running' | 'completed' | 'failed' | 'cancelled' | 'timeout';
13
+ /** Object type */
14
+ export type DatabaseObjectType = 'database' | 'schema' | 'table' | 'view' | 'materializedView' | 'function' | 'procedure' | 'sequence' | 'type' | 'stream' | 'task' | 'pipe' | 'stage' | 'fileFormat';
15
+ /** Warehouse explorer configuration */
16
+ export interface WarehouseExplorerConfig {
17
+ /** Connection */
18
+ connection?: WarehouseConnection;
19
+ /** Theme */
20
+ theme?: WarehouseExplorerTheme;
21
+ /** Locale */
22
+ locale?: string;
23
+ /** Features */
24
+ features?: WarehouseFeatures;
25
+ /** Query editor config */
26
+ queryEditor?: QueryEditorConfig;
27
+ /** Schema browser config */
28
+ schemaBrowser?: SchemaBrowserConfig;
29
+ /** Data preview config */
30
+ dataPreview?: DataPreviewConfig;
31
+ /** History config */
32
+ historyConfig?: HistoryConfig;
33
+ /** Cost estimation config */
34
+ costConfig?: CostEstimationConfig;
35
+ }
36
+ /** Warehouse connection */
37
+ export interface WarehouseConnection {
38
+ type: WarehouseType;
39
+ host?: string;
40
+ port?: number;
41
+ account?: string;
42
+ database?: string;
43
+ warehouse?: string;
44
+ schema?: string;
45
+ username?: string;
46
+ password?: string;
47
+ token?: string;
48
+ role?: string;
49
+ authenticator?: string;
50
+ privateKey?: string;
51
+ privateKeyPassphrase?: string;
52
+ region?: string;
53
+ project?: string;
54
+ dataset?: string;
55
+ catalog?: string;
56
+ httpPath?: string;
57
+ timeout?: number;
58
+ poolSize?: number;
59
+ ssl?: boolean;
60
+ options?: Record<string, unknown>;
61
+ }
62
+ /** Warehouse explorer theme */
63
+ export interface WarehouseExplorerTheme {
64
+ name?: string;
65
+ background?: string;
66
+ surface?: string;
67
+ primary?: string;
68
+ secondary?: string;
69
+ text?: string;
70
+ border?: string;
71
+ syntax?: SyntaxTheme;
72
+ }
73
+ /** Syntax theme */
74
+ export interface SyntaxTheme {
75
+ keyword?: string;
76
+ string?: string;
77
+ number?: string;
78
+ comment?: string;
79
+ function?: string;
80
+ operator?: string;
81
+ variable?: string;
82
+ type?: string;
83
+ table?: string;
84
+ column?: string;
85
+ }
86
+ /** Warehouse features */
87
+ export interface WarehouseFeatures {
88
+ queryEditor?: boolean;
89
+ schemaBrowser?: boolean;
90
+ dataPreview?: boolean;
91
+ queryHistory?: boolean;
92
+ savedQueries?: boolean;
93
+ costEstimation?: boolean;
94
+ queryOptimization?: boolean;
95
+ explain?: boolean;
96
+ profiling?: boolean;
97
+ scheduling?: boolean;
98
+ collaboration?: boolean;
99
+ versioning?: boolean;
100
+ notebooks?: boolean;
101
+ }
102
+ /** Query editor configuration */
103
+ export interface QueryEditorConfig {
104
+ theme?: string;
105
+ fontSize?: number;
106
+ tabSize?: number;
107
+ wordWrap?: boolean;
108
+ lineNumbers?: boolean;
109
+ minimap?: boolean;
110
+ autoComplete?: AutoCompleteConfig;
111
+ formatting?: FormattingConfig;
112
+ shortcuts?: KeyboardShortcut[];
113
+ snippets?: QuerySnippet[];
114
+ maxQueryLength?: number;
115
+ timeout?: number;
116
+ }
117
+ /** Auto-complete configuration */
118
+ export interface AutoCompleteConfig {
119
+ enabled?: boolean;
120
+ tables?: boolean;
121
+ columns?: boolean;
122
+ functions?: boolean;
123
+ keywords?: boolean;
124
+ snippets?: boolean;
125
+ schemas?: boolean;
126
+ delay?: number;
127
+ maxSuggestions?: number;
128
+ caseSensitive?: boolean;
129
+ }
130
+ /** Formatting configuration */
131
+ export interface FormattingConfig {
132
+ uppercase?: boolean;
133
+ indentSize?: number;
134
+ lineBreakBeforeClause?: boolean;
135
+ commaPosition?: 'before' | 'after';
136
+ alignColumns?: boolean;
137
+ }
138
+ /** Keyboard shortcut */
139
+ export interface KeyboardShortcut {
140
+ id: string;
141
+ key: string;
142
+ modifiers?: ('ctrl' | 'alt' | 'shift' | 'meta')[];
143
+ action: string;
144
+ description?: string;
145
+ }
146
+ /** Query snippet */
147
+ export interface QuerySnippet {
148
+ id: string;
149
+ name: string;
150
+ prefix: string;
151
+ body: string;
152
+ description?: string;
153
+ category?: string;
154
+ }
155
+ /** Schema browser configuration */
156
+ export interface SchemaBrowserConfig {
157
+ showSystemObjects?: boolean;
158
+ showColumns?: boolean;
159
+ showDataTypes?: boolean;
160
+ showRowCounts?: boolean;
161
+ showIndexes?: boolean;
162
+ showConstraints?: boolean;
163
+ showTriggers?: boolean;
164
+ expandLevel?: number;
165
+ filterPattern?: string;
166
+ sortBy?: 'name' | 'type' | 'size' | 'modified';
167
+ sortOrder?: 'asc' | 'desc';
168
+ refreshInterval?: number;
169
+ }
170
+ /** Data preview configuration */
171
+ export interface DataPreviewConfig {
172
+ maxRows?: number;
173
+ maxColumns?: number;
174
+ sampling?: SamplingConfig;
175
+ formatting?: DataFormattingConfig;
176
+ pagination?: PaginationConfig;
177
+ export?: ExportConfig;
178
+ }
179
+ /** Sampling configuration */
180
+ export interface SamplingConfig {
181
+ enabled?: boolean;
182
+ method?: 'first' | 'random' | 'tablesample';
183
+ size?: number;
184
+ seed?: number;
185
+ }
186
+ /** Data formatting configuration */
187
+ export interface DataFormattingConfig {
188
+ dateFormat?: string;
189
+ timestampFormat?: string;
190
+ numberFormat?: NumberFormatConfig;
191
+ nullDisplay?: string;
192
+ truncateLength?: number;
193
+ booleanDisplay?: {
194
+ true: string;
195
+ false: string;
196
+ };
197
+ }
198
+ /** Number format configuration */
199
+ export interface NumberFormatConfig {
200
+ locale?: string;
201
+ minimumFractionDigits?: number;
202
+ maximumFractionDigits?: number;
203
+ useGrouping?: boolean;
204
+ }
205
+ /** Pagination configuration */
206
+ export interface PaginationConfig {
207
+ enabled?: boolean;
208
+ pageSize?: number;
209
+ pageSizeOptions?: number[];
210
+ }
211
+ /** Export configuration */
212
+ export interface ExportConfig {
213
+ formats?: ('csv' | 'json' | 'parquet' | 'excel')[];
214
+ maxRows?: number;
215
+ includeHeaders?: boolean;
216
+ }
217
+ /** History configuration */
218
+ export interface HistoryConfig {
219
+ enabled?: boolean;
220
+ maxEntries?: number;
221
+ retentionDays?: number;
222
+ saveResults?: boolean;
223
+ maxResultSize?: number;
224
+ }
225
+ /** Cost estimation configuration */
226
+ export interface CostEstimationConfig {
227
+ enabled?: boolean;
228
+ provider?: WarehouseType;
229
+ pricing?: PricingConfig;
230
+ showBeforeRun?: boolean;
231
+ warnThreshold?: number;
232
+ blockThreshold?: number;
233
+ }
234
+ /** Pricing configuration */
235
+ export interface PricingConfig {
236
+ computePerCredit?: number;
237
+ storagePerTB?: number;
238
+ dataTransferPerGB?: number;
239
+ currency?: string;
240
+ }
241
+ /** Database catalog */
242
+ export interface DatabaseCatalog {
243
+ databases: DatabaseInfo[];
244
+ defaultDatabase?: string;
245
+ refreshedAt?: Date;
246
+ }
247
+ /** Database info */
248
+ export interface DatabaseInfo {
249
+ name: string;
250
+ type?: 'database' | 'catalog';
251
+ owner?: string;
252
+ created?: Date;
253
+ comment?: string;
254
+ schemas?: SchemaInfo[];
255
+ options?: Record<string, unknown>;
256
+ }
257
+ /** Schema info */
258
+ export interface SchemaInfo {
259
+ name: string;
260
+ database?: string;
261
+ owner?: string;
262
+ created?: Date;
263
+ comment?: string;
264
+ isDefault?: boolean;
265
+ tables?: TableInfo[];
266
+ views?: ViewInfo[];
267
+ functions?: FunctionInfo[];
268
+ procedures?: ProcedureInfo[];
269
+ sequences?: SequenceInfo[];
270
+ streams?: StreamInfo[];
271
+ tasks?: TaskInfo[];
272
+ }
273
+ /** Table info */
274
+ export interface TableInfo {
275
+ name: string;
276
+ schema: string;
277
+ database?: string;
278
+ type: 'table' | 'external' | 'temporary' | 'transient';
279
+ owner?: string;
280
+ created?: Date;
281
+ modified?: Date;
282
+ rowCount?: number;
283
+ bytes?: number;
284
+ comment?: string;
285
+ columns: ColumnInfo[];
286
+ primaryKey?: PrimaryKeyInfo;
287
+ foreignKeys?: ForeignKeyInfo[];
288
+ indexes?: IndexInfo[];
289
+ partitioning?: PartitioningInfo;
290
+ clustering?: ClusteringInfo;
291
+ retention?: RetentionInfo;
292
+ tags?: TagInfo[];
293
+ }
294
+ /** Column info */
295
+ export interface ColumnInfo {
296
+ name: string;
297
+ ordinalPosition: number;
298
+ dataType: string;
299
+ nullable: boolean;
300
+ defaultValue?: string;
301
+ comment?: string;
302
+ isPrimaryKey?: boolean;
303
+ isForeignKey?: boolean;
304
+ isPartitionKey?: boolean;
305
+ isClusteringKey?: boolean;
306
+ autoIncrement?: boolean;
307
+ collation?: string;
308
+ precision?: number;
309
+ scale?: number;
310
+ maxLength?: number;
311
+ tags?: TagInfo[];
312
+ statistics?: ColumnStatistics;
313
+ }
314
+ /** Column statistics */
315
+ export interface ColumnStatistics {
316
+ distinctCount?: number;
317
+ nullCount?: number;
318
+ minValue?: unknown;
319
+ maxValue?: unknown;
320
+ avgLength?: number;
321
+ histogram?: HistogramBucket[];
322
+ topValues?: TopValue[];
323
+ }
324
+ /** Histogram bucket */
325
+ export interface HistogramBucket {
326
+ lowerBound: unknown;
327
+ upperBound: unknown;
328
+ count: number;
329
+ distinctCount?: number;
330
+ }
331
+ /** Top value */
332
+ export interface TopValue {
333
+ value: unknown;
334
+ count: number;
335
+ percentage: number;
336
+ }
337
+ /** Primary key info */
338
+ export interface PrimaryKeyInfo {
339
+ name?: string;
340
+ columns: string[];
341
+ }
342
+ /** Foreign key info */
343
+ export interface ForeignKeyInfo {
344
+ name?: string;
345
+ columns: string[];
346
+ referencedTable: string;
347
+ referencedSchema?: string;
348
+ referencedColumns: string[];
349
+ onDelete?: 'cascade' | 'restrict' | 'setNull' | 'setDefault' | 'noAction';
350
+ onUpdate?: 'cascade' | 'restrict' | 'setNull' | 'setDefault' | 'noAction';
351
+ }
352
+ /** Index info */
353
+ export interface IndexInfo {
354
+ name: string;
355
+ columns: string[];
356
+ unique: boolean;
357
+ type?: 'btree' | 'hash' | 'gin' | 'gist' | 'brin' | 'fulltext' | 'spatial';
358
+ predicate?: string;
359
+ includes?: string[];
360
+ }
361
+ /** Partitioning info */
362
+ export interface PartitioningInfo {
363
+ type: 'range' | 'list' | 'hash' | 'time';
364
+ columns: string[];
365
+ granularity?: string;
366
+ partitions?: PartitionInfo[];
367
+ }
368
+ /** Partition info */
369
+ export interface PartitionInfo {
370
+ name: string;
371
+ value?: unknown;
372
+ lowerBound?: unknown;
373
+ upperBound?: unknown;
374
+ rowCount?: number;
375
+ bytes?: number;
376
+ }
377
+ /** Clustering info */
378
+ export interface ClusteringInfo {
379
+ columns: string[];
380
+ auto?: boolean;
381
+ depth?: number;
382
+ ratio?: number;
383
+ }
384
+ /** Retention info */
385
+ export interface RetentionInfo {
386
+ timeTravel?: number;
387
+ failSafe?: number;
388
+ transient?: boolean;
389
+ }
390
+ /** Tag info */
391
+ export interface TagInfo {
392
+ name: string;
393
+ value: string;
394
+ database?: string;
395
+ schema?: string;
396
+ }
397
+ /** View info */
398
+ export interface ViewInfo {
399
+ name: string;
400
+ schema: string;
401
+ database?: string;
402
+ type: 'view' | 'materializedView' | 'secure';
403
+ owner?: string;
404
+ created?: Date;
405
+ modified?: Date;
406
+ comment?: string;
407
+ columns: ColumnInfo[];
408
+ definition?: string;
409
+ isMaterialized?: boolean;
410
+ refreshSchedule?: string;
411
+ lastRefresh?: Date;
412
+ }
413
+ /** Function info */
414
+ export interface FunctionInfo {
415
+ name: string;
416
+ schema: string;
417
+ database?: string;
418
+ type: 'scalar' | 'table' | 'aggregate' | 'window';
419
+ language?: string;
420
+ owner?: string;
421
+ created?: Date;
422
+ comment?: string;
423
+ parameters: ParameterInfo[];
424
+ returnType: string;
425
+ definition?: string;
426
+ volatility?: 'immutable' | 'stable' | 'volatile';
427
+ nullHandling?: 'calledOnNull' | 'returnsNullOnNull' | 'strict';
428
+ }
429
+ /** Parameter info */
430
+ export interface ParameterInfo {
431
+ name: string;
432
+ dataType: string;
433
+ mode: 'in' | 'out' | 'inout';
434
+ defaultValue?: string;
435
+ ordinalPosition: number;
436
+ }
437
+ /** Procedure info */
438
+ export interface ProcedureInfo {
439
+ name: string;
440
+ schema: string;
441
+ database?: string;
442
+ language?: string;
443
+ owner?: string;
444
+ created?: Date;
445
+ comment?: string;
446
+ parameters: ParameterInfo[];
447
+ definition?: string;
448
+ executeAs?: 'owner' | 'caller';
449
+ }
450
+ /** Sequence info */
451
+ export interface SequenceInfo {
452
+ name: string;
453
+ schema: string;
454
+ database?: string;
455
+ owner?: string;
456
+ currentValue?: number;
457
+ startValue?: number;
458
+ increment?: number;
459
+ minValue?: number;
460
+ maxValue?: number;
461
+ cycle?: boolean;
462
+ comment?: string;
463
+ }
464
+ /** Stream info (Snowflake) */
465
+ export interface StreamInfo {
466
+ name: string;
467
+ schema: string;
468
+ database?: string;
469
+ owner?: string;
470
+ sourceType: 'table' | 'view' | 'directory' | 'external';
471
+ sourceObject: string;
472
+ type: 'standard' | 'appendOnly' | 'insertOnly';
473
+ mode?: 'default' | 'insertOnly';
474
+ stale?: boolean;
475
+ staleAfter?: Date;
476
+ comment?: string;
477
+ }
478
+ /** Task info (Snowflake) */
479
+ export interface TaskInfo {
480
+ name: string;
481
+ schema: string;
482
+ database?: string;
483
+ owner?: string;
484
+ warehouse?: string;
485
+ schedule?: string;
486
+ predecessors?: string[];
487
+ state: 'started' | 'suspended';
488
+ definition?: string;
489
+ condition?: string;
490
+ errorIntegration?: string;
491
+ lastRun?: Date;
492
+ nextRun?: Date;
493
+ comment?: string;
494
+ }
495
+ /** Query */
496
+ export interface Query {
497
+ id: string;
498
+ name?: string;
499
+ content: string;
500
+ database?: string;
501
+ schema?: string;
502
+ warehouse?: string;
503
+ parameters?: QueryParameter[];
504
+ metadata?: QueryMetadata;
505
+ }
506
+ /** Query parameter */
507
+ export interface QueryParameter {
508
+ name: string;
509
+ type: string;
510
+ value?: unknown;
511
+ defaultValue?: unknown;
512
+ required?: boolean;
513
+ description?: string;
514
+ }
515
+ /** Query metadata */
516
+ export interface QueryMetadata {
517
+ created?: Date;
518
+ createdBy?: string;
519
+ modified?: Date;
520
+ modifiedBy?: string;
521
+ description?: string;
522
+ tags?: string[];
523
+ folder?: string;
524
+ shared?: boolean;
525
+ sharedWith?: string[];
526
+ version?: number;
527
+ }
528
+ /** Saved query */
529
+ export interface SavedQuery extends Query {
530
+ folderId?: string;
531
+ starred?: boolean;
532
+ runCount?: number;
533
+ lastRun?: Date;
534
+ avgDuration?: number;
535
+ permissions?: QueryPermission[];
536
+ }
537
+ /** Query permission */
538
+ export interface QueryPermission {
539
+ grantee: string;
540
+ granteeType: 'user' | 'role' | 'group';
541
+ permission: 'read' | 'write' | 'execute' | 'admin';
542
+ }
543
+ /** Query folder */
544
+ export interface QueryFolder {
545
+ id: string;
546
+ name: string;
547
+ parentId?: string;
548
+ owner?: string;
549
+ shared?: boolean;
550
+ created?: Date;
551
+ modified?: Date;
552
+ }
553
+ /** Query execution request */
554
+ export interface QueryExecutionRequest {
555
+ query: string;
556
+ database?: string;
557
+ schema?: string;
558
+ warehouse?: string;
559
+ role?: string;
560
+ parameters?: Record<string, unknown>;
561
+ limit?: number;
562
+ timeout?: number;
563
+ async?: boolean;
564
+ tags?: Record<string, string>;
565
+ }
566
+ /** Query execution result */
567
+ export interface QueryExecutionResult {
568
+ queryId: string;
569
+ status: QueryStatus;
570
+ columns?: ResultColumn[];
571
+ rows?: unknown[][];
572
+ rowCount?: number;
573
+ totalRows?: number;
574
+ hasMore?: boolean;
575
+ nextToken?: string;
576
+ startTime?: Date;
577
+ endTime?: Date;
578
+ duration?: number;
579
+ bytesScanned?: number;
580
+ rowsScanned?: number;
581
+ partitionsScanned?: number;
582
+ partitionsTotal?: number;
583
+ cacheHit?: boolean;
584
+ warnings?: string[];
585
+ error?: QueryError;
586
+ metadata?: ResultMetadata;
587
+ }
588
+ /** Result column */
589
+ export interface ResultColumn {
590
+ name: string;
591
+ type: string;
592
+ nullable?: boolean;
593
+ precision?: number;
594
+ scale?: number;
595
+ collation?: string;
596
+ }
597
+ /** Query error */
598
+ export interface QueryError {
599
+ code?: string;
600
+ message: string;
601
+ line?: number;
602
+ column?: number;
603
+ position?: number;
604
+ detail?: string;
605
+ hint?: string;
606
+ }
607
+ /** Result metadata */
608
+ export interface ResultMetadata {
609
+ statementType?: StatementType;
610
+ affectedRows?: number;
611
+ sessionId?: string;
612
+ warehouseId?: string;
613
+ queryTag?: string;
614
+ }
615
+ /** Statement type */
616
+ export type StatementType = 'select' | 'insert' | 'update' | 'delete' | 'merge' | 'create' | 'alter' | 'drop' | 'truncate' | 'grant' | 'revoke' | 'begin' | 'commit' | 'rollback' | 'copy' | 'unload' | 'explain' | 'describe' | 'show' | 'use' | 'set' | 'call' | 'other';
617
+ /** Query history entry */
618
+ export interface QueryHistoryEntry {
619
+ id: string;
620
+ query: string;
621
+ database?: string;
622
+ schema?: string;
623
+ warehouse?: string;
624
+ user?: string;
625
+ role?: string;
626
+ sessionId?: string;
627
+ status: QueryStatus;
628
+ startTime: Date;
629
+ endTime?: Date;
630
+ duration?: number;
631
+ rowsProduced?: number;
632
+ bytesScanned?: number;
633
+ bytesWritten?: number;
634
+ partitionsScanned?: number;
635
+ creditsUsed?: number;
636
+ errorCode?: string;
637
+ errorMessage?: string;
638
+ queryTag?: string;
639
+ queryHash?: string;
640
+ }
641
+ /** Query history filter */
642
+ export interface QueryHistoryFilter {
643
+ startDate?: Date;
644
+ endDate?: Date;
645
+ user?: string;
646
+ database?: string;
647
+ schema?: string;
648
+ warehouse?: string;
649
+ status?: QueryStatus[];
650
+ minDuration?: number;
651
+ maxDuration?: number;
652
+ queryPattern?: string;
653
+ queryTag?: string;
654
+ limit?: number;
655
+ offset?: number;
656
+ }
657
+ /** Query history statistics */
658
+ export interface QueryHistoryStats {
659
+ totalQueries: number;
660
+ successfulQueries: number;
661
+ failedQueries: number;
662
+ totalDuration: number;
663
+ avgDuration: number;
664
+ totalBytesScanned: number;
665
+ totalCreditsUsed?: number;
666
+ topUsers?: UserStats[];
667
+ topDatabases?: DatabaseStats[];
668
+ topQueries?: QueryStats[];
669
+ }
670
+ /** User stats */
671
+ export interface UserStats {
672
+ user: string;
673
+ queryCount: number;
674
+ totalDuration: number;
675
+ avgDuration: number;
676
+ creditsUsed?: number;
677
+ }
678
+ /** Database stats */
679
+ export interface DatabaseStats {
680
+ database: string;
681
+ queryCount: number;
682
+ totalDuration: number;
683
+ avgDuration: number;
684
+ bytesScanned: number;
685
+ }
686
+ /** Query stats */
687
+ export interface QueryStats {
688
+ queryHash: string;
689
+ queryPattern?: string;
690
+ executionCount: number;
691
+ totalDuration: number;
692
+ avgDuration: number;
693
+ minDuration: number;
694
+ maxDuration: number;
695
+ }
696
+ /** Cost estimate */
697
+ export interface CostEstimate {
698
+ queryId?: string;
699
+ query: string;
700
+ estimatedCredits?: number;
701
+ estimatedCost?: number;
702
+ currency?: string;
703
+ bytesToScan?: number;
704
+ partitionsToScan?: number;
705
+ estimatedDuration?: number;
706
+ confidence?: CostConfidence;
707
+ breakdown?: CostBreakdown;
708
+ recommendations?: CostRecommendation[];
709
+ }
710
+ /** Cost confidence */
711
+ export type CostConfidence = 'high' | 'medium' | 'low' | 'unknown';
712
+ /** Cost breakdown */
713
+ export interface CostBreakdown {
714
+ compute?: number;
715
+ storage?: number;
716
+ dataTransfer?: number;
717
+ other?: number;
718
+ byWarehouse?: WarehouseCost[];
719
+ byTable?: TableCost[];
720
+ }
721
+ /** Warehouse cost */
722
+ export interface WarehouseCost {
723
+ warehouse: string;
724
+ size: string;
725
+ credits: number;
726
+ cost: number;
727
+ duration: number;
728
+ }
729
+ /** Table cost */
730
+ export interface TableCost {
731
+ table: string;
732
+ bytesScanned: number;
733
+ partitionsScanned: number;
734
+ cost: number;
735
+ }
736
+ /** Cost recommendation */
737
+ export interface CostRecommendation {
738
+ type: RecommendationType;
739
+ severity: 'info' | 'warning' | 'critical';
740
+ message: string;
741
+ potentialSavings?: number;
742
+ suggestion?: string;
743
+ query?: string;
744
+ }
745
+ /** Recommendation type */
746
+ export type RecommendationType = 'useSmallWarehouse' | 'useLargerWarehouse' | 'addClusteringKey' | 'addPartitioning' | 'useApproximateFunction' | 'addFilter' | 'avoidFullScan' | 'useMaterializedView' | 'useCache' | 'limitResults' | 'selectSpecificColumns' | 'optimizeJoin';
747
+ /** Query optimization result */
748
+ export interface QueryOptimizationResult {
749
+ originalQuery: string;
750
+ optimizedQuery?: string;
751
+ applied: boolean;
752
+ suggestions: OptimizationSuggestion[];
753
+ explain?: ExplainResult;
754
+ statistics?: QueryStatistics;
755
+ }
756
+ /** Optimization suggestion */
757
+ export interface OptimizationSuggestion {
758
+ id: string;
759
+ type: OptimizationType;
760
+ severity: 'info' | 'warning' | 'critical';
761
+ message: string;
762
+ description?: string;
763
+ location?: QueryLocation;
764
+ suggestedFix?: string;
765
+ estimatedImprovement?: ImprovementEstimate;
766
+ }
767
+ /** Optimization type */
768
+ export type OptimizationType = 'selectStar' | 'missingFilter' | 'inefficientJoin' | 'implicitCast' | 'functionOnColumn' | 'unnecessaryDistinct' | 'unnecessaryOrderBy' | 'cartesianProduct' | 'largeScan' | 'spillToDisk' | 'skewedData' | 'missingIndex' | 'outdatedStatistics' | 'suboptimalPlan';
769
+ /** Query location */
770
+ export interface QueryLocation {
771
+ startLine: number;
772
+ startColumn: number;
773
+ endLine: number;
774
+ endColumn: number;
775
+ text?: string;
776
+ }
777
+ /** Improvement estimate */
778
+ export interface ImprovementEstimate {
779
+ metric: 'duration' | 'cost' | 'bytes' | 'rows';
780
+ current: number;
781
+ estimated: number;
782
+ improvement: number;
783
+ improvementPercent: number;
784
+ }
785
+ /** Explain result */
786
+ export interface ExplainResult {
787
+ format: 'text' | 'json' | 'tree' | 'visual';
788
+ plan: ExplainPlan | string;
789
+ statistics?: PlanStatistics;
790
+ }
791
+ /** Explain plan */
792
+ export interface ExplainPlan {
793
+ operation: string;
794
+ description?: string;
795
+ cost?: PlanCost;
796
+ rows?: number;
797
+ children?: ExplainPlan[];
798
+ details?: Record<string, unknown>;
799
+ }
800
+ /** Plan cost */
801
+ export interface PlanCost {
802
+ startup?: number;
803
+ total?: number;
804
+ rows?: number;
805
+ width?: number;
806
+ }
807
+ /** Plan statistics */
808
+ export interface PlanStatistics {
809
+ planningTime?: number;
810
+ executionTime?: number;
811
+ totalCost?: number;
812
+ memoryUsed?: number;
813
+ diskUsed?: number;
814
+ }
815
+ /** Query statistics */
816
+ export interface QueryStatistics {
817
+ compilationTime?: number;
818
+ executionTime?: number;
819
+ queueTime?: number;
820
+ rowsProduced?: number;
821
+ rowsScanned?: number;
822
+ bytesScanned?: number;
823
+ bytesWritten?: number;
824
+ bytesSpilled?: number;
825
+ partitionsScanned?: number;
826
+ partitionsTotal?: number;
827
+ filesScanned?: number;
828
+ remoteReads?: number;
829
+ localReads?: number;
830
+ cacheHits?: number;
831
+ spillToDisk?: boolean;
832
+ networkBytes?: number;
833
+ }
834
+ /** Snowflake-specific features */
835
+ export interface SnowflakeFeatures {
836
+ timeTravel?: TimeTravelConfig;
837
+ cloning?: CloningConfig;
838
+ dataMasking?: DataMaskingConfig;
839
+ rowAccessPolicy?: RowAccessPolicyConfig;
840
+ streams?: StreamConfig;
841
+ tasks?: TaskConfig;
842
+ tags?: TagConfig;
843
+ }
844
+ /** Time travel configuration */
845
+ export interface TimeTravelConfig {
846
+ enabled?: boolean;
847
+ retentionDays?: number;
848
+ queryAtTimestamp?: Date;
849
+ queryBeforeStatement?: string;
850
+ queryAtOffset?: string;
851
+ }
852
+ /** Cloning configuration */
853
+ export interface CloningConfig {
854
+ sourceObject?: string;
855
+ targetObject?: string;
856
+ atTimestamp?: Date;
857
+ atOffset?: string;
858
+ }
859
+ /** Data masking configuration */
860
+ export interface DataMaskingConfig {
861
+ policies?: MaskingPolicy[];
862
+ }
863
+ /** Masking policy */
864
+ export interface MaskingPolicy {
865
+ name: string;
866
+ database?: string;
867
+ schema?: string;
868
+ inputDataType: string;
869
+ returnDataType: string;
870
+ body: string;
871
+ column?: string;
872
+ table?: string;
873
+ }
874
+ /** Row access policy configuration */
875
+ export interface RowAccessPolicyConfig {
876
+ policies?: RowAccessPolicy[];
877
+ }
878
+ /** Row access policy */
879
+ export interface RowAccessPolicy {
880
+ name: string;
881
+ database?: string;
882
+ schema?: string;
883
+ signature: ParameterInfo[];
884
+ body: string;
885
+ table?: string;
886
+ columns?: string[];
887
+ }
888
+ /** Stream configuration */
889
+ export interface StreamConfig {
890
+ name?: string;
891
+ sourceTable?: string;
892
+ appendOnly?: boolean;
893
+ insertOnly?: boolean;
894
+ showInitialRows?: boolean;
895
+ }
896
+ /** Task configuration */
897
+ export interface TaskConfig {
898
+ name?: string;
899
+ warehouse?: string;
900
+ schedule?: string;
901
+ predecessors?: string[];
902
+ allowOverlap?: boolean;
903
+ suspendAfterFailures?: number;
904
+ errorIntegration?: string;
905
+ }
906
+ /** Tag configuration */
907
+ export interface TagConfig {
908
+ tags?: Tag[];
909
+ }
910
+ /** Tag */
911
+ export interface Tag {
912
+ name: string;
913
+ database?: string;
914
+ schema?: string;
915
+ allowedValues?: string[];
916
+ comment?: string;
917
+ }
918
+ /** BigQuery-specific features */
919
+ export interface BigQueryFeatures {
920
+ partitioning?: BigQueryPartitioning;
921
+ clustering?: string[];
922
+ tableExpiration?: number;
923
+ routines?: BigQueryRoutine[];
924
+ mlModels?: BigQueryMLModel[];
925
+ }
926
+ /** BigQuery partitioning */
927
+ export interface BigQueryPartitioning {
928
+ type: 'time' | 'range' | 'ingestionTime';
929
+ field?: string;
930
+ granularity?: 'hour' | 'day' | 'month' | 'year';
931
+ rangeStart?: number;
932
+ rangeEnd?: number;
933
+ rangeInterval?: number;
934
+ expirationMs?: number;
935
+ requirePartitionFilter?: boolean;
936
+ }
937
+ /** BigQuery routine */
938
+ export interface BigQueryRoutine {
939
+ name: string;
940
+ type: 'function' | 'procedure' | 'tableFunction';
941
+ language: 'sql' | 'javascript';
942
+ arguments: RoutineArgument[];
943
+ returnType?: string;
944
+ returnTableType?: TableFieldSchema[];
945
+ definition: string;
946
+ description?: string;
947
+ }
948
+ /** Routine argument */
949
+ export interface RoutineArgument {
950
+ name: string;
951
+ dataType: string;
952
+ mode?: 'in' | 'out' | 'inout';
953
+ }
954
+ /** Table field schema */
955
+ export interface TableFieldSchema {
956
+ name: string;
957
+ type: string;
958
+ mode?: 'nullable' | 'required' | 'repeated';
959
+ fields?: TableFieldSchema[];
960
+ description?: string;
961
+ }
962
+ /** BigQuery ML model */
963
+ export interface BigQueryMLModel {
964
+ name: string;
965
+ modelType: string;
966
+ trainingRuns?: MLTrainingRun[];
967
+ featureColumns?: string[];
968
+ labelColumn?: string;
969
+ created?: Date;
970
+ modified?: Date;
971
+ }
972
+ /** ML training run */
973
+ export interface MLTrainingRun {
974
+ startTime: Date;
975
+ trainingOptions: Record<string, unknown>;
976
+ evaluationMetrics?: Record<string, number>;
977
+ dataSplitResult?: DataSplitResult;
978
+ }
979
+ /** Data split result */
980
+ export interface DataSplitResult {
981
+ trainingTable?: string;
982
+ evaluationTable?: string;
983
+ }
984
+ /** Redshift-specific features */
985
+ export interface RedshiftFeatures {
986
+ distStyle?: 'auto' | 'even' | 'key' | 'all';
987
+ distKey?: string;
988
+ sortKeys?: SortKey[];
989
+ encoding?: ColumnEncoding[];
990
+ spectrum?: SpectrumConfig;
991
+ workloadManagement?: WLMConfig;
992
+ }
993
+ /** Sort key */
994
+ export interface SortKey {
995
+ column: string;
996
+ type?: 'compound' | 'interleaved';
997
+ }
998
+ /** Column encoding */
999
+ export interface ColumnEncoding {
1000
+ column: string;
1001
+ encoding: string;
1002
+ }
1003
+ /** Spectrum configuration */
1004
+ export interface SpectrumConfig {
1005
+ externalSchemas?: ExternalSchema[];
1006
+ externalTables?: ExternalTable[];
1007
+ }
1008
+ /** External schema */
1009
+ export interface ExternalSchema {
1010
+ name: string;
1011
+ database: string;
1012
+ region?: string;
1013
+ iamRole?: string;
1014
+ catalogId?: string;
1015
+ }
1016
+ /** External table */
1017
+ export interface ExternalTable {
1018
+ name: string;
1019
+ schema: string;
1020
+ location: string;
1021
+ fileFormat: string;
1022
+ columns: ColumnInfo[];
1023
+ }
1024
+ /** WLM configuration */
1025
+ export interface WLMConfig {
1026
+ queues?: WLMQueue[];
1027
+ autoWLM?: boolean;
1028
+ }
1029
+ /** WLM queue */
1030
+ export interface WLMQueue {
1031
+ name: string;
1032
+ concurrency: number;
1033
+ memory: number;
1034
+ timeout?: number;
1035
+ userGroups?: string[];
1036
+ queryGroups?: string[];
1037
+ priority?: 'normal' | 'high' | 'highest' | 'low' | 'lowest';
1038
+ }
1039
+ /** Databricks-specific features */
1040
+ export interface DatabricksFeatures {
1041
+ deltaLake?: DeltaLakeConfig;
1042
+ unity?: UnityCatalogConfig;
1043
+ mlflow?: MLflowConfig;
1044
+ photon?: boolean;
1045
+ }
1046
+ /** Delta Lake configuration */
1047
+ export interface DeltaLakeConfig {
1048
+ optimize?: OptimizeConfig;
1049
+ vacuum?: VacuumConfig;
1050
+ timeTravel?: DeltaTimeTravelConfig;
1051
+ changeDataFeed?: boolean;
1052
+ }
1053
+ /** Optimize configuration */
1054
+ export interface OptimizeConfig {
1055
+ zOrderBy?: string[];
1056
+ auto?: boolean;
1057
+ targetSize?: number;
1058
+ }
1059
+ /** Vacuum configuration */
1060
+ export interface VacuumConfig {
1061
+ retentionHours?: number;
1062
+ dryRun?: boolean;
1063
+ }
1064
+ /** Delta time travel configuration */
1065
+ export interface DeltaTimeTravelConfig {
1066
+ version?: number;
1067
+ timestamp?: Date;
1068
+ }
1069
+ /** Unity Catalog configuration */
1070
+ export interface UnityCatalogConfig {
1071
+ catalog?: string;
1072
+ schemas?: string[];
1073
+ grants?: GrantInfo[];
1074
+ }
1075
+ /** Grant info */
1076
+ export interface GrantInfo {
1077
+ principal: string;
1078
+ principalType: 'user' | 'group' | 'servicePrincipal';
1079
+ privilege: string;
1080
+ objectType: string;
1081
+ objectName: string;
1082
+ }
1083
+ /** MLflow configuration */
1084
+ export interface MLflowConfig {
1085
+ trackingUri?: string;
1086
+ registryUri?: string;
1087
+ experiments?: MLflowExperiment[];
1088
+ }
1089
+ /** MLflow experiment */
1090
+ export interface MLflowExperiment {
1091
+ id: string;
1092
+ name: string;
1093
+ artifact: string;
1094
+ lifecycleStage: 'active' | 'deleted';
1095
+ lastUpdateTime?: Date;
1096
+ }
1097
+ //# sourceMappingURL=data-warehouse.d.ts.map