@katerai/sdk 0.10.0 → 0.11.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.
- package/CHANGELOG.md +31 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +7 -0
- package/client.js.map +1 -1
- package/client.mjs +7 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/v1/compiler/cache.d.mts +0 -35
- package/resources/v1/compiler/cache.d.mts.map +1 -1
- package/resources/v1/compiler/cache.d.ts +0 -35
- package/resources/v1/compiler/cache.d.ts.map +1 -1
- package/resources/v1/compiler/cache.js +0 -9
- package/resources/v1/compiler/cache.js.map +1 -1
- package/resources/v1/compiler/cache.mjs +0 -9
- package/resources/v1/compiler/cache.mjs.map +1 -1
- package/resources/v1/compiler/combination.d.mts +120 -0
- package/resources/v1/compiler/combination.d.mts.map +1 -0
- package/resources/v1/compiler/combination.d.ts +120 -0
- package/resources/v1/compiler/combination.d.ts.map +1 -0
- package/resources/v1/compiler/combination.js +30 -0
- package/resources/v1/compiler/combination.js.map +1 -0
- package/resources/v1/compiler/combination.mjs +26 -0
- package/resources/v1/compiler/combination.mjs.map +1 -0
- package/resources/v1/compiler/compiler.d.mts +482 -84
- package/resources/v1/compiler/compiler.d.mts.map +1 -1
- package/resources/v1/compiler/compiler.d.ts +482 -84
- package/resources/v1/compiler/compiler.d.ts.map +1 -1
- package/resources/v1/compiler/compiler.js +26 -0
- package/resources/v1/compiler/compiler.js.map +1 -1
- package/resources/v1/compiler/compiler.mjs +26 -0
- package/resources/v1/compiler/compiler.mjs.map +1 -1
- package/resources/v1/compiler/index.d.mts +4 -2
- package/resources/v1/compiler/index.d.mts.map +1 -1
- package/resources/v1/compiler/index.d.ts +4 -2
- package/resources/v1/compiler/index.d.ts.map +1 -1
- package/resources/v1/compiler/index.js +3 -1
- package/resources/v1/compiler/index.js.map +1 -1
- package/resources/v1/compiler/index.mjs +1 -0
- package/resources/v1/compiler/index.mjs.map +1 -1
- package/resources/v1/compiler/manifest.d.mts +52 -0
- package/resources/v1/compiler/manifest.d.mts.map +1 -0
- package/resources/v1/compiler/manifest.d.ts +52 -0
- package/resources/v1/compiler/manifest.d.ts.map +1 -0
- package/resources/v1/compiler/manifest.js +29 -0
- package/resources/v1/compiler/manifest.js.map +1 -0
- package/resources/v1/compiler/manifest.mjs +25 -0
- package/resources/v1/compiler/manifest.mjs.map +1 -0
- package/resources/v1/index.d.mts +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/tenants/tenants.d.mts +66 -10
- package/resources/v1/tenants/tenants.d.mts.map +1 -1
- package/resources/v1/tenants/tenants.d.ts +66 -10
- package/resources/v1/tenants/tenants.d.ts.map +1 -1
- package/resources/v1/tenants/tenants.js +27 -4
- package/resources/v1/tenants/tenants.js.map +1 -1
- package/resources/v1/tenants/tenants.mjs +27 -4
- package/resources/v1/tenants/tenants.mjs.map +1 -1
- package/resources/v1/v1.d.mts +2 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +8 -0
- package/src/resources/v1/compiler/cache.ts +1 -47
- package/src/resources/v1/compiler/combination.ts +157 -0
- package/src/resources/v1/compiler/compiler.ts +633 -190
- package/src/resources/v1/compiler/index.ts +8 -1
- package/src/resources/v1/compiler/manifest.ts +80 -0
- package/src/resources/v1/index.ts +2 -0
- package/src/resources/v1/tenants/tenants.ts +99 -12
- package/src/resources/v1/v1.ts +4 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -3,13 +3,23 @@
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
4
|
import * as CompilerAPI from './compiler';
|
|
5
5
|
import * as CacheAPI from './cache';
|
|
6
|
-
import { Cache
|
|
6
|
+
import { Cache } from './cache';
|
|
7
|
+
import * as CombinationAPI from './combination';
|
|
8
|
+
import {
|
|
9
|
+
Combination as CombinationAPICombination,
|
|
10
|
+
CombinationPreviewParams,
|
|
11
|
+
CombinationPreviewResponse,
|
|
12
|
+
} from './combination';
|
|
13
|
+
import * as ManifestAPI from './manifest';
|
|
14
|
+
import { ManifestRegenerateAndCreatePrParams, ManifestRegenerateAndCreatePrResponse } from './manifest';
|
|
7
15
|
import { APIPromise } from '../../../core/api-promise';
|
|
8
16
|
import { buildHeaders } from '../../../internal/headers';
|
|
9
17
|
import { RequestOptions } from '../../../internal/request-options';
|
|
10
18
|
|
|
11
19
|
export class Compiler extends APIResource {
|
|
12
20
|
cache: CacheAPI.Cache = new CacheAPI.Cache(this._client);
|
|
21
|
+
combination: CombinationAPI.Combination = new CombinationAPI.Combination(this._client);
|
|
22
|
+
manifest: ManifestAPI.Manifest = new ManifestAPI.Manifest(this._client);
|
|
13
23
|
|
|
14
24
|
/**
|
|
15
25
|
* Compile a resolved query to SQL.
|
|
@@ -32,6 +42,30 @@ export class Compiler extends APIResource {
|
|
|
32
42
|
});
|
|
33
43
|
}
|
|
34
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Compile a dashboard YAML file into fully resolved widget data.
|
|
47
|
+
*
|
|
48
|
+
* Reads a dashboard YAML from the client repo, resolves all data slots, executes
|
|
49
|
+
* queries, applies filters, and returns renderable widget data.
|
|
50
|
+
*
|
|
51
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
52
|
+
*/
|
|
53
|
+
compileDashboard(
|
|
54
|
+
params: CompilerCompileDashboardParams,
|
|
55
|
+
options?: RequestOptions,
|
|
56
|
+
): APIPromise<CompilerCompileDashboardResponse> {
|
|
57
|
+
const { source, 'X-Kater-CLI-ID': xKaterCliID, ...body } = params;
|
|
58
|
+
return this._client.post('/api/v1/compiler/dashboard', {
|
|
59
|
+
query: { source },
|
|
60
|
+
body,
|
|
61
|
+
...options,
|
|
62
|
+
headers: buildHeaders([
|
|
63
|
+
{ ...(xKaterCliID != null ? { 'X-Kater-CLI-ID': xKaterCliID } : undefined) },
|
|
64
|
+
options?.headers,
|
|
65
|
+
]),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
35
69
|
/**
|
|
36
70
|
* Enumerate every valid query configuration for a connection.
|
|
37
71
|
*
|
|
@@ -318,6 +352,11 @@ export interface CompilerCompileResponse {
|
|
|
318
352
|
*/
|
|
319
353
|
metadata?: CompilerCompileResponse.Metadata | null;
|
|
320
354
|
|
|
355
|
+
/**
|
|
356
|
+
* Write-back request ID. Non-null when files were dispatched to CLI via WebSocket.
|
|
357
|
+
*/
|
|
358
|
+
request_id?: string | null;
|
|
359
|
+
|
|
321
360
|
/**
|
|
322
361
|
* Generated SQL statement
|
|
323
362
|
*/
|
|
@@ -392,6 +431,270 @@ export namespace CompilerCompileResponse {
|
|
|
392
431
|
}
|
|
393
432
|
}
|
|
394
433
|
|
|
434
|
+
/**
|
|
435
|
+
* Response from dashboard compilation — fully resolved dashboard.
|
|
436
|
+
*/
|
|
437
|
+
export interface CompilerCompileDashboardResponse {
|
|
438
|
+
/**
|
|
439
|
+
* Dashboard context for widgets
|
|
440
|
+
*/
|
|
441
|
+
context: CompilerCompileDashboardResponse.Context;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Dashboard metadata
|
|
445
|
+
*/
|
|
446
|
+
dashboard: CompilerCompileDashboardResponse.Dashboard;
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Dashboard-level compilation errors
|
|
450
|
+
*/
|
|
451
|
+
errors?: Array<CompilerErrorItem>;
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Resolved filter definitions with current values
|
|
455
|
+
*/
|
|
456
|
+
filters?: Array<CompilerCompileDashboardResponse.Filter>;
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Fully resolved widgets with data + config
|
|
460
|
+
*/
|
|
461
|
+
widgets?: Array<CompilerCompileDashboardResponse.Widget>;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export namespace CompilerCompileDashboardResponse {
|
|
465
|
+
/**
|
|
466
|
+
* Dashboard context for widgets
|
|
467
|
+
*/
|
|
468
|
+
export interface Context {
|
|
469
|
+
/**
|
|
470
|
+
* Active filter values: {name: {value, label}}
|
|
471
|
+
*/
|
|
472
|
+
filters?: { [key: string]: { [key: string]: unknown } } | null;
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Active timeframe: {label, start, end}
|
|
476
|
+
*/
|
|
477
|
+
timeframe?: { [key: string]: string } | null;
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Dashboard topic: {label, time_dimension}
|
|
481
|
+
*/
|
|
482
|
+
topic?: { [key: string]: string } | null;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Dashboard metadata
|
|
487
|
+
*/
|
|
488
|
+
export interface Dashboard {
|
|
489
|
+
/**
|
|
490
|
+
* Dashboard name
|
|
491
|
+
*/
|
|
492
|
+
name: string;
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* Dashboard description
|
|
496
|
+
*/
|
|
497
|
+
description?: string | null;
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Dashboard kater_id
|
|
501
|
+
*/
|
|
502
|
+
kater_id?: string | null;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* Dashboard display label
|
|
506
|
+
*/
|
|
507
|
+
label?: string | null;
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* Dashboard topic reference
|
|
511
|
+
*/
|
|
512
|
+
topic?: string | null;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* A resolved dashboard filter with current value and presets.
|
|
517
|
+
*/
|
|
518
|
+
export interface Filter {
|
|
519
|
+
/**
|
|
520
|
+
* Filter type: date_range, multi_select, select
|
|
521
|
+
*/
|
|
522
|
+
filter_type: string;
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* Filter name
|
|
526
|
+
*/
|
|
527
|
+
name: string;
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* Whether null (All) is allowed
|
|
531
|
+
*/
|
|
532
|
+
allow_null?: boolean;
|
|
533
|
+
|
|
534
|
+
/**
|
|
535
|
+
* Whether filter auto-applies to queries
|
|
536
|
+
*/
|
|
537
|
+
auto_apply?: boolean;
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Current filter value
|
|
541
|
+
*/
|
|
542
|
+
current_value?: string | Array<string> | null;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Default value specification
|
|
546
|
+
*/
|
|
547
|
+
default?: { [key: string]: string } | null;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Field reference for data-driven filters
|
|
551
|
+
*/
|
|
552
|
+
field?: string | null;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Label for null/All option
|
|
556
|
+
*/
|
|
557
|
+
null_label?: string | null;
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* Available presets
|
|
561
|
+
*/
|
|
562
|
+
presets?: Array<{ [key: string]: string }> | null;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* A fully resolved widget ready for rendering.
|
|
567
|
+
*/
|
|
568
|
+
export interface Widget {
|
|
569
|
+
/**
|
|
570
|
+
* Column metadata (single or multi-query)
|
|
571
|
+
*/
|
|
572
|
+
column_map: Array<Widget.UnionMember0> | Array<Array<Widget.UnionMember1>>;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Fully resolved WidgetConfig
|
|
576
|
+
*/
|
|
577
|
+
config: { [key: string]: unknown };
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Query result data (single or multi-query)
|
|
581
|
+
*/
|
|
582
|
+
data: Array<{ [key: string]: unknown }> | Array<Array<{ [key: string]: unknown }>>;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Grid position
|
|
586
|
+
*/
|
|
587
|
+
grid: Widget.Grid;
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Widget unique identifier
|
|
591
|
+
*/
|
|
592
|
+
kater_id: string;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Widget name
|
|
596
|
+
*/
|
|
597
|
+
name: string;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Display mode for multi-query: 'tabs' or 'grid'
|
|
601
|
+
*/
|
|
602
|
+
display_mode?: string | null;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Per-widget compilation errors
|
|
606
|
+
*/
|
|
607
|
+
errors?: Array<CompilerAPI.CompilerErrorItem>;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Per-slot configs for multi-query containers
|
|
611
|
+
*/
|
|
612
|
+
slot_configs?: Array<{ [key: string]: unknown }> | null;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Resolved widget type
|
|
616
|
+
*/
|
|
617
|
+
widget_type?: string | null;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
export namespace Widget {
|
|
621
|
+
/**
|
|
622
|
+
* Maps a UUID column alias to its human-readable name and type.
|
|
623
|
+
*/
|
|
624
|
+
export interface UnionMember0 {
|
|
625
|
+
/**
|
|
626
|
+
* Field type: dimension, measure, or calculation
|
|
627
|
+
*/
|
|
628
|
+
field_type: string;
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* UUID string used as SQL column alias
|
|
632
|
+
*/
|
|
633
|
+
kater_id: string;
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Human-readable column name
|
|
637
|
+
*/
|
|
638
|
+
name: string;
|
|
639
|
+
|
|
640
|
+
/**
|
|
641
|
+
* Aggregation type for measures: sum, count, min, max, avg, unknown. None for
|
|
642
|
+
* non-measures.
|
|
643
|
+
*/
|
|
644
|
+
aggregation?: string | null;
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* Display label
|
|
648
|
+
*/
|
|
649
|
+
label?: string | null;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* Maps a UUID column alias to its human-readable name and type.
|
|
654
|
+
*/
|
|
655
|
+
export interface UnionMember1 {
|
|
656
|
+
/**
|
|
657
|
+
* Field type: dimension, measure, or calculation
|
|
658
|
+
*/
|
|
659
|
+
field_type: string;
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* UUID string used as SQL column alias
|
|
663
|
+
*/
|
|
664
|
+
kater_id: string;
|
|
665
|
+
|
|
666
|
+
/**
|
|
667
|
+
* Human-readable column name
|
|
668
|
+
*/
|
|
669
|
+
name: string;
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* Aggregation type for measures: sum, count, min, max, avg, unknown. None for
|
|
673
|
+
* non-measures.
|
|
674
|
+
*/
|
|
675
|
+
aggregation?: string | null;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Display label
|
|
679
|
+
*/
|
|
680
|
+
label?: string | null;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* Grid position
|
|
685
|
+
*/
|
|
686
|
+
export interface Grid {
|
|
687
|
+
h?: number;
|
|
688
|
+
|
|
689
|
+
w?: number;
|
|
690
|
+
|
|
691
|
+
x?: number;
|
|
692
|
+
|
|
693
|
+
y?: number;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
395
698
|
/**
|
|
396
699
|
* Response model for query combination enumeration.
|
|
397
700
|
*/
|
|
@@ -422,11 +725,21 @@ export namespace CompilerEnumerateResponse {
|
|
|
422
725
|
*/
|
|
423
726
|
widget_category: string;
|
|
424
727
|
|
|
728
|
+
/**
|
|
729
|
+
* Deterministic UUID v5 for this combination
|
|
730
|
+
*/
|
|
731
|
+
combination_id?: string | null;
|
|
732
|
+
|
|
425
733
|
/**
|
|
426
734
|
* Human-readable label for the query
|
|
427
735
|
*/
|
|
428
736
|
query_label?: string | null;
|
|
429
737
|
|
|
738
|
+
/**
|
|
739
|
+
* Field-to-role mapping (e.g. {'due_month': 'x_axis'})
|
|
740
|
+
*/
|
|
741
|
+
roles?: { [key: string]: string };
|
|
742
|
+
|
|
430
743
|
/**
|
|
431
744
|
* Selected optional calculation names
|
|
432
745
|
*/
|
|
@@ -451,6 +764,11 @@ export namespace CompilerEnumerateResponse {
|
|
|
451
764
|
* Variable name to value assignments
|
|
452
765
|
*/
|
|
453
766
|
variable_assignments?: { [key: string]: unknown };
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* Resolved widget type (e.g. 'axis_metric_by_dimensiondate')
|
|
770
|
+
*/
|
|
771
|
+
widget_type?: string | null;
|
|
454
772
|
}
|
|
455
773
|
}
|
|
456
774
|
|
|
@@ -595,6 +913,17 @@ export interface CompilerResolveResponse {
|
|
|
595
913
|
* Compilation manifest with all named objects.
|
|
596
914
|
*/
|
|
597
915
|
manifest?: Manifest | null;
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* Files auto-fixed due to renamed refs. None when no renames detected.
|
|
919
|
+
*/
|
|
920
|
+
ref_fixes?: Array<CompilerResolveResponse.RefFix> | null;
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* Write-back request ID. Non-null when ref-fix files were dispatched to CLI via
|
|
924
|
+
* WebSocket.
|
|
925
|
+
*/
|
|
926
|
+
request_id?: string | null;
|
|
598
927
|
}
|
|
599
928
|
|
|
600
929
|
export namespace CompilerResolveResponse {
|
|
@@ -626,7 +955,7 @@ export namespace CompilerResolveResponse {
|
|
|
626
955
|
/**
|
|
627
956
|
* Widget category that determines data shape constraints
|
|
628
957
|
*/
|
|
629
|
-
widget_category: 'axis' | '
|
|
958
|
+
widget_category: 'axis' | 'funnel' | 'heatmap' | 'image' | 'kpi_card' | 'pie' | 'table' | 'text';
|
|
630
959
|
|
|
631
960
|
/**
|
|
632
961
|
* Usage guidance for AI processing
|
|
@@ -662,29 +991,32 @@ export namespace CompilerResolveResponse {
|
|
|
662
991
|
* Widget types within the declared widget_category that must NOT render this query
|
|
663
992
|
*/
|
|
664
993
|
disallowed_widget_types?: Array<
|
|
665
|
-
| '
|
|
666
|
-
| '
|
|
667
|
-
| '
|
|
668
|
-
| '
|
|
669
|
-
| '
|
|
670
|
-
| '
|
|
671
|
-
| '
|
|
672
|
-
| '
|
|
673
|
-
| '
|
|
674
|
-
| '
|
|
675
|
-
| '
|
|
676
|
-
| '
|
|
677
|
-
| '
|
|
678
|
-
| '
|
|
679
|
-
| '
|
|
680
|
-
| '
|
|
994
|
+
| 'axis_metric_by_dimension'
|
|
995
|
+
| 'axis_metric_by_dimensiondate'
|
|
996
|
+
| 'axis_metric_by_dimensiondate_sliced_by_dimension'
|
|
997
|
+
| 'axis_scatter_plot'
|
|
998
|
+
| 'funnel_funnel_chart'
|
|
999
|
+
| 'heatmap_heatmap'
|
|
1000
|
+
| 'image_image_grid'
|
|
1001
|
+
| 'image_single_image'
|
|
1002
|
+
| 'kpi_measure_with_dimension_expression'
|
|
1003
|
+
| 'kpi_measure_with_secondary_metric'
|
|
1004
|
+
| 'kpi_single_measure_compared_to_prev_period_sparkline'
|
|
1005
|
+
| 'kpi_single_value'
|
|
1006
|
+
| 'pie_pie_chart'
|
|
1007
|
+
| 'table_data_table'
|
|
1008
|
+
| 'table_fancy_subtotal_table'
|
|
1009
|
+
| 'table_key_value_list'
|
|
1010
|
+
| 'table_styled_table'
|
|
1011
|
+
| 'text_data_readout_with_sparkline'
|
|
1012
|
+
| 'text_narrative_text'
|
|
681
1013
|
> | null;
|
|
682
1014
|
|
|
683
1015
|
/**
|
|
684
1016
|
* Merged required + selected optional filters
|
|
685
1017
|
*/
|
|
686
1018
|
filters?: Array<
|
|
687
|
-
| ResolvedQuery.
|
|
1019
|
+
| ResolvedQuery.InlineFormulaFilter
|
|
688
1020
|
| string
|
|
689
1021
|
| ResolvedQuery.InlineExistsFilter1
|
|
690
1022
|
| ResolvedQuery.InlineExistsFilter2
|
|
@@ -716,11 +1048,6 @@ export namespace CompilerResolveResponse {
|
|
|
716
1048
|
*/
|
|
717
1049
|
order_by?: ResolvedQuery.OrderBy | null;
|
|
718
1050
|
|
|
719
|
-
/**
|
|
720
|
-
* Access grants required to use this query
|
|
721
|
-
*/
|
|
722
|
-
required_access_grants?: Array<string> | null;
|
|
723
|
-
|
|
724
1051
|
/**
|
|
725
1052
|
* The matched chart recommendation after evaluating chart hints
|
|
726
1053
|
*/
|
|
@@ -801,50 +1128,18 @@ export namespace CompilerResolveResponse {
|
|
|
801
1128
|
}
|
|
802
1129
|
|
|
803
1130
|
/**
|
|
804
|
-
* An inline filter using
|
|
1131
|
+
* An inline filter using a SQL/expression formula
|
|
805
1132
|
*/
|
|
806
|
-
export interface
|
|
807
|
-
/**
|
|
808
|
-
* Reference to the field to filter on
|
|
809
|
-
*/
|
|
810
|
-
field: string;
|
|
811
|
-
|
|
1133
|
+
export interface InlineFormulaFilter {
|
|
812
1134
|
/**
|
|
813
1135
|
* Name of the inline filter
|
|
814
1136
|
*/
|
|
815
1137
|
name: string;
|
|
816
1138
|
|
|
817
1139
|
/**
|
|
818
|
-
*
|
|
819
|
-
*/
|
|
820
|
-
operator:
|
|
821
|
-
| 'equals'
|
|
822
|
-
| 'not_equals'
|
|
823
|
-
| 'in'
|
|
824
|
-
| 'not_in'
|
|
825
|
-
| 'greater_than'
|
|
826
|
-
| 'less_than'
|
|
827
|
-
| 'greater_than_or_equals'
|
|
828
|
-
| 'less_than_or_equals'
|
|
829
|
-
| 'between'
|
|
830
|
-
| 'in_the_last'
|
|
831
|
-
| 'in_the_next'
|
|
832
|
-
| 'contains'
|
|
833
|
-
| 'not_contains'
|
|
834
|
-
| 'starts_with'
|
|
835
|
-
| 'ends_with'
|
|
836
|
-
| 'is_null'
|
|
837
|
-
| 'is_not_null';
|
|
838
|
-
|
|
839
|
-
/**
|
|
840
|
-
* SQL expression for the filter value
|
|
841
|
-
*/
|
|
842
|
-
sql_value?: string | null;
|
|
843
|
-
|
|
844
|
-
/**
|
|
845
|
-
* Fixed values for the filter
|
|
1140
|
+
* SQL expression for the filter condition
|
|
846
1141
|
*/
|
|
847
|
-
|
|
1142
|
+
sql: string;
|
|
848
1143
|
}
|
|
849
1144
|
|
|
850
1145
|
/**
|
|
@@ -955,12 +1250,17 @@ export namespace CompilerResolveResponse {
|
|
|
955
1250
|
/**
|
|
956
1251
|
* The concrete value bound for this resolution
|
|
957
1252
|
*/
|
|
958
|
-
bound_value: string | number | boolean
|
|
1253
|
+
bound_value: string | number | boolean | Array<string | number | boolean>;
|
|
959
1254
|
|
|
960
1255
|
/**
|
|
961
1256
|
* Default value for this variable
|
|
962
1257
|
*/
|
|
963
|
-
default: string | number | boolean
|
|
1258
|
+
default: string | number | boolean | Array<string | number | boolean>;
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* Unique identifier for this variable
|
|
1262
|
+
*/
|
|
1263
|
+
kater_id: string;
|
|
964
1264
|
|
|
965
1265
|
/**
|
|
966
1266
|
* Variable name identifier
|
|
@@ -977,6 +1277,10 @@ export namespace CompilerResolveResponse {
|
|
|
977
1277
|
| 'DATE'
|
|
978
1278
|
| 'TIMESTAMP'
|
|
979
1279
|
| 'BOOL'
|
|
1280
|
+
| 'STRING[]'
|
|
1281
|
+
| 'INT[]'
|
|
1282
|
+
| 'FLOAT[]'
|
|
1283
|
+
| 'DATE[]'
|
|
980
1284
|
| 'DIMENSION'
|
|
981
1285
|
| 'MEASURE'
|
|
982
1286
|
| 'CALCULATION'
|
|
@@ -1005,6 +1309,13 @@ export namespace CompilerResolveResponse {
|
|
|
1005
1309
|
*/
|
|
1006
1310
|
is_default?: boolean | null;
|
|
1007
1311
|
|
|
1312
|
+
/**
|
|
1313
|
+
* True if this is a runtime variable (not resolved at compile time). Runtime
|
|
1314
|
+
* variables have var() placeholders left in compiled SQL for literal substitution
|
|
1315
|
+
* at execution time.
|
|
1316
|
+
*/
|
|
1317
|
+
is_runtime?: boolean | null;
|
|
1318
|
+
|
|
1008
1319
|
/**
|
|
1009
1320
|
* Human-readable label for the variable
|
|
1010
1321
|
*/
|
|
@@ -1133,7 +1444,7 @@ export namespace CompilerResolveResponse {
|
|
|
1133
1444
|
/**
|
|
1134
1445
|
* Original type of the field in the source query
|
|
1135
1446
|
*/
|
|
1136
|
-
source_type: 'dimension' | 'measure' | 'calculation';
|
|
1447
|
+
source_type: 'dimension' | 'dimension_date' | 'measure' | 'calculation';
|
|
1137
1448
|
}
|
|
1138
1449
|
}
|
|
1139
1450
|
}
|
|
@@ -1189,6 +1500,53 @@ export namespace CompilerResolveResponse {
|
|
|
1189
1500
|
column?: number;
|
|
1190
1501
|
}
|
|
1191
1502
|
}
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* A file that was modified by auto-fix with its replacements.
|
|
1506
|
+
*/
|
|
1507
|
+
export interface RefFix {
|
|
1508
|
+
/**
|
|
1509
|
+
* Path to the modified file
|
|
1510
|
+
*/
|
|
1511
|
+
file_path: string;
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* Full updated file content after fixes
|
|
1515
|
+
*/
|
|
1516
|
+
new_content: string;
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* Individual ref replacements made in this file
|
|
1520
|
+
*/
|
|
1521
|
+
replacements: Array<RefFix.Replacement>;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
export namespace RefFix {
|
|
1525
|
+
/**
|
|
1526
|
+
* A single ref replacement within a file.
|
|
1527
|
+
*/
|
|
1528
|
+
export interface Replacement {
|
|
1529
|
+
/**
|
|
1530
|
+
* Path to the file containing the replaced ref
|
|
1531
|
+
*/
|
|
1532
|
+
file_path: string;
|
|
1533
|
+
|
|
1534
|
+
/**
|
|
1535
|
+
* Line number where the replacement occurred
|
|
1536
|
+
*/
|
|
1537
|
+
line_number: number;
|
|
1538
|
+
|
|
1539
|
+
/**
|
|
1540
|
+
* Updated reference string
|
|
1541
|
+
*/
|
|
1542
|
+
new_ref: string;
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* Original reference string
|
|
1546
|
+
*/
|
|
1547
|
+
old_ref: string;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1192
1550
|
}
|
|
1193
1551
|
|
|
1194
1552
|
/**
|
|
@@ -1210,6 +1568,11 @@ export interface CompilerValidateResponse {
|
|
|
1210
1568
|
*/
|
|
1211
1569
|
errors?: Array<CompilerErrorItem>;
|
|
1212
1570
|
|
|
1571
|
+
/**
|
|
1572
|
+
* Write-back request ID. Non-null when files were dispatched to CLI via WebSocket.
|
|
1573
|
+
*/
|
|
1574
|
+
request_id?: string | null;
|
|
1575
|
+
|
|
1213
1576
|
/**
|
|
1214
1577
|
* Validation warnings
|
|
1215
1578
|
*/
|
|
@@ -1246,6 +1609,16 @@ export namespace CompilerValidateResponse {
|
|
|
1246
1609
|
*/
|
|
1247
1610
|
errors?: Array<CompilerAPI.CompilerErrorItem>;
|
|
1248
1611
|
|
|
1612
|
+
/**
|
|
1613
|
+
* Compilation manifest with all named objects.
|
|
1614
|
+
*/
|
|
1615
|
+
manifest?: CompilerAPI.Manifest | null;
|
|
1616
|
+
|
|
1617
|
+
/**
|
|
1618
|
+
* Files auto-fixed due to renamed refs. None when no renames detected.
|
|
1619
|
+
*/
|
|
1620
|
+
ref_fixes?: Array<ConnectionResult.RefFix> | null;
|
|
1621
|
+
|
|
1249
1622
|
/**
|
|
1250
1623
|
* Validation warnings for this connection
|
|
1251
1624
|
*/
|
|
@@ -1304,6 +1677,53 @@ export namespace CompilerValidateResponse {
|
|
|
1304
1677
|
column?: number;
|
|
1305
1678
|
}
|
|
1306
1679
|
}
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
* A file that was modified by auto-fix with its replacements.
|
|
1683
|
+
*/
|
|
1684
|
+
export interface RefFix {
|
|
1685
|
+
/**
|
|
1686
|
+
* Path to the modified file
|
|
1687
|
+
*/
|
|
1688
|
+
file_path: string;
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* Full updated file content after fixes
|
|
1692
|
+
*/
|
|
1693
|
+
new_content: string;
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* Individual ref replacements made in this file
|
|
1697
|
+
*/
|
|
1698
|
+
replacements: Array<RefFix.Replacement>;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
export namespace RefFix {
|
|
1702
|
+
/**
|
|
1703
|
+
* A single ref replacement within a file.
|
|
1704
|
+
*/
|
|
1705
|
+
export interface Replacement {
|
|
1706
|
+
/**
|
|
1707
|
+
* Path to the file containing the replaced ref
|
|
1708
|
+
*/
|
|
1709
|
+
file_path: string;
|
|
1710
|
+
|
|
1711
|
+
/**
|
|
1712
|
+
* Line number where the replacement occurred
|
|
1713
|
+
*/
|
|
1714
|
+
line_number: number;
|
|
1715
|
+
|
|
1716
|
+
/**
|
|
1717
|
+
* Updated reference string
|
|
1718
|
+
*/
|
|
1719
|
+
new_ref: string;
|
|
1720
|
+
|
|
1721
|
+
/**
|
|
1722
|
+
* Original reference string
|
|
1723
|
+
*/
|
|
1724
|
+
old_ref: string;
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1307
1727
|
}
|
|
1308
1728
|
}
|
|
1309
1729
|
|
|
@@ -1364,7 +1784,7 @@ export namespace CompilerCompileParams {
|
|
|
1364
1784
|
/**
|
|
1365
1785
|
* Widget category that determines data shape constraints
|
|
1366
1786
|
*/
|
|
1367
|
-
widget_category: 'axis' | '
|
|
1787
|
+
widget_category: 'axis' | 'funnel' | 'heatmap' | 'image' | 'kpi_card' | 'pie' | 'table' | 'text';
|
|
1368
1788
|
|
|
1369
1789
|
/**
|
|
1370
1790
|
* Usage guidance for AI processing
|
|
@@ -1400,29 +1820,32 @@ export namespace CompilerCompileParams {
|
|
|
1400
1820
|
* Widget types within the declared widget_category that must NOT render this query
|
|
1401
1821
|
*/
|
|
1402
1822
|
disallowed_widget_types?: Array<
|
|
1403
|
-
| '
|
|
1404
|
-
| '
|
|
1405
|
-
| '
|
|
1406
|
-
| '
|
|
1407
|
-
| '
|
|
1408
|
-
| '
|
|
1409
|
-
| '
|
|
1410
|
-
| '
|
|
1411
|
-
| '
|
|
1412
|
-
| '
|
|
1413
|
-
| '
|
|
1414
|
-
| '
|
|
1415
|
-
| '
|
|
1416
|
-
| '
|
|
1417
|
-
| '
|
|
1418
|
-
| '
|
|
1823
|
+
| 'axis_metric_by_dimension'
|
|
1824
|
+
| 'axis_metric_by_dimensiondate'
|
|
1825
|
+
| 'axis_metric_by_dimensiondate_sliced_by_dimension'
|
|
1826
|
+
| 'axis_scatter_plot'
|
|
1827
|
+
| 'funnel_funnel_chart'
|
|
1828
|
+
| 'heatmap_heatmap'
|
|
1829
|
+
| 'image_image_grid'
|
|
1830
|
+
| 'image_single_image'
|
|
1831
|
+
| 'kpi_measure_with_dimension_expression'
|
|
1832
|
+
| 'kpi_measure_with_secondary_metric'
|
|
1833
|
+
| 'kpi_single_measure_compared_to_prev_period_sparkline'
|
|
1834
|
+
| 'kpi_single_value'
|
|
1835
|
+
| 'pie_pie_chart'
|
|
1836
|
+
| 'table_data_table'
|
|
1837
|
+
| 'table_fancy_subtotal_table'
|
|
1838
|
+
| 'table_key_value_list'
|
|
1839
|
+
| 'table_styled_table'
|
|
1840
|
+
| 'text_data_readout_with_sparkline'
|
|
1841
|
+
| 'text_narrative_text'
|
|
1419
1842
|
> | null;
|
|
1420
1843
|
|
|
1421
1844
|
/**
|
|
1422
1845
|
* Merged required + selected optional filters
|
|
1423
1846
|
*/
|
|
1424
1847
|
filters?: Array<
|
|
1425
|
-
| ResolvedQuery.
|
|
1848
|
+
| ResolvedQuery.InlineFormulaFilter
|
|
1426
1849
|
| string
|
|
1427
1850
|
| ResolvedQuery.InlineExistsFilter1
|
|
1428
1851
|
| ResolvedQuery.InlineExistsFilter2
|
|
@@ -1454,11 +1877,6 @@ export namespace CompilerCompileParams {
|
|
|
1454
1877
|
*/
|
|
1455
1878
|
order_by?: ResolvedQuery.OrderBy | null;
|
|
1456
1879
|
|
|
1457
|
-
/**
|
|
1458
|
-
* Access grants required to use this query
|
|
1459
|
-
*/
|
|
1460
|
-
required_access_grants?: Array<string> | null;
|
|
1461
|
-
|
|
1462
1880
|
/**
|
|
1463
1881
|
* The matched chart recommendation after evaluating chart hints
|
|
1464
1882
|
*/
|
|
@@ -1539,50 +1957,18 @@ export namespace CompilerCompileParams {
|
|
|
1539
1957
|
}
|
|
1540
1958
|
|
|
1541
1959
|
/**
|
|
1542
|
-
* An inline filter using
|
|
1960
|
+
* An inline filter using a SQL/expression formula
|
|
1543
1961
|
*/
|
|
1544
|
-
export interface
|
|
1545
|
-
/**
|
|
1546
|
-
* Reference to the field to filter on
|
|
1547
|
-
*/
|
|
1548
|
-
field: string;
|
|
1549
|
-
|
|
1962
|
+
export interface InlineFormulaFilter {
|
|
1550
1963
|
/**
|
|
1551
1964
|
* Name of the inline filter
|
|
1552
1965
|
*/
|
|
1553
1966
|
name: string;
|
|
1554
1967
|
|
|
1555
1968
|
/**
|
|
1556
|
-
*
|
|
1557
|
-
*/
|
|
1558
|
-
operator:
|
|
1559
|
-
| 'equals'
|
|
1560
|
-
| 'not_equals'
|
|
1561
|
-
| 'in'
|
|
1562
|
-
| 'not_in'
|
|
1563
|
-
| 'greater_than'
|
|
1564
|
-
| 'less_than'
|
|
1565
|
-
| 'greater_than_or_equals'
|
|
1566
|
-
| 'less_than_or_equals'
|
|
1567
|
-
| 'between'
|
|
1568
|
-
| 'in_the_last'
|
|
1569
|
-
| 'in_the_next'
|
|
1570
|
-
| 'contains'
|
|
1571
|
-
| 'not_contains'
|
|
1572
|
-
| 'starts_with'
|
|
1573
|
-
| 'ends_with'
|
|
1574
|
-
| 'is_null'
|
|
1575
|
-
| 'is_not_null';
|
|
1576
|
-
|
|
1577
|
-
/**
|
|
1578
|
-
* SQL expression for the filter value
|
|
1579
|
-
*/
|
|
1580
|
-
sql_value?: string | null;
|
|
1581
|
-
|
|
1582
|
-
/**
|
|
1583
|
-
* Fixed values for the filter
|
|
1969
|
+
* SQL expression for the filter condition
|
|
1584
1970
|
*/
|
|
1585
|
-
|
|
1971
|
+
sql: string;
|
|
1586
1972
|
}
|
|
1587
1973
|
|
|
1588
1974
|
/**
|
|
@@ -1693,12 +2079,17 @@ export namespace CompilerCompileParams {
|
|
|
1693
2079
|
/**
|
|
1694
2080
|
* The concrete value bound for this resolution
|
|
1695
2081
|
*/
|
|
1696
|
-
bound_value: string | number | boolean
|
|
2082
|
+
bound_value: string | number | boolean | Array<string | number | boolean>;
|
|
1697
2083
|
|
|
1698
2084
|
/**
|
|
1699
2085
|
* Default value for this variable
|
|
1700
2086
|
*/
|
|
1701
|
-
default: string | number | boolean
|
|
2087
|
+
default: string | number | boolean | Array<string | number | boolean>;
|
|
2088
|
+
|
|
2089
|
+
/**
|
|
2090
|
+
* Unique identifier for this variable
|
|
2091
|
+
*/
|
|
2092
|
+
kater_id: string;
|
|
1702
2093
|
|
|
1703
2094
|
/**
|
|
1704
2095
|
* Variable name identifier
|
|
@@ -1715,6 +2106,10 @@ export namespace CompilerCompileParams {
|
|
|
1715
2106
|
| 'DATE'
|
|
1716
2107
|
| 'TIMESTAMP'
|
|
1717
2108
|
| 'BOOL'
|
|
2109
|
+
| 'STRING[]'
|
|
2110
|
+
| 'INT[]'
|
|
2111
|
+
| 'FLOAT[]'
|
|
2112
|
+
| 'DATE[]'
|
|
1718
2113
|
| 'DIMENSION'
|
|
1719
2114
|
| 'MEASURE'
|
|
1720
2115
|
| 'CALCULATION'
|
|
@@ -1743,6 +2138,13 @@ export namespace CompilerCompileParams {
|
|
|
1743
2138
|
*/
|
|
1744
2139
|
is_default?: boolean | null;
|
|
1745
2140
|
|
|
2141
|
+
/**
|
|
2142
|
+
* True if this is a runtime variable (not resolved at compile time). Runtime
|
|
2143
|
+
* variables have var() placeholders left in compiled SQL for literal substitution
|
|
2144
|
+
* at execution time.
|
|
2145
|
+
*/
|
|
2146
|
+
is_runtime?: boolean | null;
|
|
2147
|
+
|
|
1746
2148
|
/**
|
|
1747
2149
|
* Human-readable label for the variable
|
|
1748
2150
|
*/
|
|
@@ -1871,12 +2273,45 @@ export namespace CompilerCompileParams {
|
|
|
1871
2273
|
/**
|
|
1872
2274
|
* Original type of the field in the source query
|
|
1873
2275
|
*/
|
|
1874
|
-
source_type: 'dimension' | 'measure' | 'calculation';
|
|
2276
|
+
source_type: 'dimension' | 'dimension_date' | 'measure' | 'calculation';
|
|
1875
2277
|
}
|
|
1876
2278
|
}
|
|
1877
2279
|
}
|
|
1878
2280
|
}
|
|
1879
2281
|
|
|
2282
|
+
export interface CompilerCompileDashboardParams {
|
|
2283
|
+
/**
|
|
2284
|
+
* Body param: Connection to compile against
|
|
2285
|
+
*/
|
|
2286
|
+
connection_id: string;
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* Body param: Relative path within the connection (e.g.
|
|
2290
|
+
* 'dashboards/compliance_overview')
|
|
2291
|
+
*/
|
|
2292
|
+
dashboard_path: string;
|
|
2293
|
+
|
|
2294
|
+
/**
|
|
2295
|
+
* Query param
|
|
2296
|
+
*/
|
|
2297
|
+
source?: string | null;
|
|
2298
|
+
|
|
2299
|
+
/**
|
|
2300
|
+
* Body param: Optional filter overrides from UI
|
|
2301
|
+
*/
|
|
2302
|
+
filters?: { [key: string]: string | Array<string> | null } | null;
|
|
2303
|
+
|
|
2304
|
+
/**
|
|
2305
|
+
* Body param: Optional tenant key for multi-tenant execution
|
|
2306
|
+
*/
|
|
2307
|
+
tenant_key?: string | null;
|
|
2308
|
+
|
|
2309
|
+
/**
|
|
2310
|
+
* Header param
|
|
2311
|
+
*/
|
|
2312
|
+
'X-Kater-CLI-ID'?: string;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
1880
2315
|
export interface CompilerEnumerateParams {
|
|
1881
2316
|
/**
|
|
1882
2317
|
* Body param: Connection to enumerate against
|
|
@@ -1894,6 +2329,12 @@ export interface CompilerEnumerateParams {
|
|
|
1894
2329
|
*/
|
|
1895
2330
|
query_refs?: Array<string> | null;
|
|
1896
2331
|
|
|
2332
|
+
/**
|
|
2333
|
+
* Body param: Tenant key for multi-tenant clients. Required when the client uses
|
|
2334
|
+
* row or database tenancy.
|
|
2335
|
+
*/
|
|
2336
|
+
tenant_key?: string | null;
|
|
2337
|
+
|
|
1897
2338
|
/**
|
|
1898
2339
|
* Header param
|
|
1899
2340
|
*/
|
|
@@ -1956,7 +2397,7 @@ export namespace CompilerExecuteParams {
|
|
|
1956
2397
|
/**
|
|
1957
2398
|
* Widget category that determines data shape constraints
|
|
1958
2399
|
*/
|
|
1959
|
-
widget_category: 'axis' | '
|
|
2400
|
+
widget_category: 'axis' | 'funnel' | 'heatmap' | 'image' | 'kpi_card' | 'pie' | 'table' | 'text';
|
|
1960
2401
|
|
|
1961
2402
|
/**
|
|
1962
2403
|
* Usage guidance for AI processing
|
|
@@ -1992,29 +2433,32 @@ export namespace CompilerExecuteParams {
|
|
|
1992
2433
|
* Widget types within the declared widget_category that must NOT render this query
|
|
1993
2434
|
*/
|
|
1994
2435
|
disallowed_widget_types?: Array<
|
|
1995
|
-
| '
|
|
1996
|
-
| '
|
|
1997
|
-
| '
|
|
1998
|
-
| '
|
|
1999
|
-
| '
|
|
2000
|
-
| '
|
|
2001
|
-
| '
|
|
2002
|
-
| '
|
|
2003
|
-
| '
|
|
2004
|
-
| '
|
|
2005
|
-
| '
|
|
2006
|
-
| '
|
|
2007
|
-
| '
|
|
2008
|
-
| '
|
|
2009
|
-
| '
|
|
2010
|
-
| '
|
|
2436
|
+
| 'axis_metric_by_dimension'
|
|
2437
|
+
| 'axis_metric_by_dimensiondate'
|
|
2438
|
+
| 'axis_metric_by_dimensiondate_sliced_by_dimension'
|
|
2439
|
+
| 'axis_scatter_plot'
|
|
2440
|
+
| 'funnel_funnel_chart'
|
|
2441
|
+
| 'heatmap_heatmap'
|
|
2442
|
+
| 'image_image_grid'
|
|
2443
|
+
| 'image_single_image'
|
|
2444
|
+
| 'kpi_measure_with_dimension_expression'
|
|
2445
|
+
| 'kpi_measure_with_secondary_metric'
|
|
2446
|
+
| 'kpi_single_measure_compared_to_prev_period_sparkline'
|
|
2447
|
+
| 'kpi_single_value'
|
|
2448
|
+
| 'pie_pie_chart'
|
|
2449
|
+
| 'table_data_table'
|
|
2450
|
+
| 'table_fancy_subtotal_table'
|
|
2451
|
+
| 'table_key_value_list'
|
|
2452
|
+
| 'table_styled_table'
|
|
2453
|
+
| 'text_data_readout_with_sparkline'
|
|
2454
|
+
| 'text_narrative_text'
|
|
2011
2455
|
> | null;
|
|
2012
2456
|
|
|
2013
2457
|
/**
|
|
2014
2458
|
* Merged required + selected optional filters
|
|
2015
2459
|
*/
|
|
2016
2460
|
filters?: Array<
|
|
2017
|
-
| ResolvedQuery.
|
|
2461
|
+
| ResolvedQuery.InlineFormulaFilter
|
|
2018
2462
|
| string
|
|
2019
2463
|
| ResolvedQuery.InlineExistsFilter1
|
|
2020
2464
|
| ResolvedQuery.InlineExistsFilter2
|
|
@@ -2046,11 +2490,6 @@ export namespace CompilerExecuteParams {
|
|
|
2046
2490
|
*/
|
|
2047
2491
|
order_by?: ResolvedQuery.OrderBy | null;
|
|
2048
2492
|
|
|
2049
|
-
/**
|
|
2050
|
-
* Access grants required to use this query
|
|
2051
|
-
*/
|
|
2052
|
-
required_access_grants?: Array<string> | null;
|
|
2053
|
-
|
|
2054
2493
|
/**
|
|
2055
2494
|
* The matched chart recommendation after evaluating chart hints
|
|
2056
2495
|
*/
|
|
@@ -2131,50 +2570,18 @@ export namespace CompilerExecuteParams {
|
|
|
2131
2570
|
}
|
|
2132
2571
|
|
|
2133
2572
|
/**
|
|
2134
|
-
* An inline filter using
|
|
2573
|
+
* An inline filter using a SQL/expression formula
|
|
2135
2574
|
*/
|
|
2136
|
-
export interface
|
|
2137
|
-
/**
|
|
2138
|
-
* Reference to the field to filter on
|
|
2139
|
-
*/
|
|
2140
|
-
field: string;
|
|
2141
|
-
|
|
2575
|
+
export interface InlineFormulaFilter {
|
|
2142
2576
|
/**
|
|
2143
2577
|
* Name of the inline filter
|
|
2144
2578
|
*/
|
|
2145
2579
|
name: string;
|
|
2146
2580
|
|
|
2147
2581
|
/**
|
|
2148
|
-
*
|
|
2582
|
+
* SQL expression for the filter condition
|
|
2149
2583
|
*/
|
|
2150
|
-
|
|
2151
|
-
| 'equals'
|
|
2152
|
-
| 'not_equals'
|
|
2153
|
-
| 'in'
|
|
2154
|
-
| 'not_in'
|
|
2155
|
-
| 'greater_than'
|
|
2156
|
-
| 'less_than'
|
|
2157
|
-
| 'greater_than_or_equals'
|
|
2158
|
-
| 'less_than_or_equals'
|
|
2159
|
-
| 'between'
|
|
2160
|
-
| 'in_the_last'
|
|
2161
|
-
| 'in_the_next'
|
|
2162
|
-
| 'contains'
|
|
2163
|
-
| 'not_contains'
|
|
2164
|
-
| 'starts_with'
|
|
2165
|
-
| 'ends_with'
|
|
2166
|
-
| 'is_null'
|
|
2167
|
-
| 'is_not_null';
|
|
2168
|
-
|
|
2169
|
-
/**
|
|
2170
|
-
* SQL expression for the filter value
|
|
2171
|
-
*/
|
|
2172
|
-
sql_value?: string | null;
|
|
2173
|
-
|
|
2174
|
-
/**
|
|
2175
|
-
* Fixed values for the filter
|
|
2176
|
-
*/
|
|
2177
|
-
static_values?: Array<string | number | boolean> | null;
|
|
2584
|
+
sql: string;
|
|
2178
2585
|
}
|
|
2179
2586
|
|
|
2180
2587
|
/**
|
|
@@ -2285,12 +2692,17 @@ export namespace CompilerExecuteParams {
|
|
|
2285
2692
|
/**
|
|
2286
2693
|
* The concrete value bound for this resolution
|
|
2287
2694
|
*/
|
|
2288
|
-
bound_value: string | number | boolean
|
|
2695
|
+
bound_value: string | number | boolean | Array<string | number | boolean>;
|
|
2289
2696
|
|
|
2290
2697
|
/**
|
|
2291
2698
|
* Default value for this variable
|
|
2292
2699
|
*/
|
|
2293
|
-
default: string | number | boolean
|
|
2700
|
+
default: string | number | boolean | Array<string | number | boolean>;
|
|
2701
|
+
|
|
2702
|
+
/**
|
|
2703
|
+
* Unique identifier for this variable
|
|
2704
|
+
*/
|
|
2705
|
+
kater_id: string;
|
|
2294
2706
|
|
|
2295
2707
|
/**
|
|
2296
2708
|
* Variable name identifier
|
|
@@ -2307,6 +2719,10 @@ export namespace CompilerExecuteParams {
|
|
|
2307
2719
|
| 'DATE'
|
|
2308
2720
|
| 'TIMESTAMP'
|
|
2309
2721
|
| 'BOOL'
|
|
2722
|
+
| 'STRING[]'
|
|
2723
|
+
| 'INT[]'
|
|
2724
|
+
| 'FLOAT[]'
|
|
2725
|
+
| 'DATE[]'
|
|
2310
2726
|
| 'DIMENSION'
|
|
2311
2727
|
| 'MEASURE'
|
|
2312
2728
|
| 'CALCULATION'
|
|
@@ -2335,6 +2751,13 @@ export namespace CompilerExecuteParams {
|
|
|
2335
2751
|
*/
|
|
2336
2752
|
is_default?: boolean | null;
|
|
2337
2753
|
|
|
2754
|
+
/**
|
|
2755
|
+
* True if this is a runtime variable (not resolved at compile time). Runtime
|
|
2756
|
+
* variables have var() placeholders left in compiled SQL for literal substitution
|
|
2757
|
+
* at execution time.
|
|
2758
|
+
*/
|
|
2759
|
+
is_runtime?: boolean | null;
|
|
2760
|
+
|
|
2338
2761
|
/**
|
|
2339
2762
|
* Human-readable label for the variable
|
|
2340
2763
|
*/
|
|
@@ -2463,7 +2886,7 @@ export namespace CompilerExecuteParams {
|
|
|
2463
2886
|
/**
|
|
2464
2887
|
* Original type of the field in the source query
|
|
2465
2888
|
*/
|
|
2466
|
-
source_type: 'dimension' | 'measure' | 'calculation';
|
|
2889
|
+
source_type: 'dimension' | 'dimension_date' | 'measure' | 'calculation';
|
|
2467
2890
|
}
|
|
2468
2891
|
}
|
|
2469
2892
|
}
|
|
@@ -2485,6 +2908,11 @@ export interface CompilerResolveParams {
|
|
|
2485
2908
|
*/
|
|
2486
2909
|
source?: string | null;
|
|
2487
2910
|
|
|
2911
|
+
/**
|
|
2912
|
+
* Body param: Automatically fix broken refs caused by renames. Defaults to True.
|
|
2913
|
+
*/
|
|
2914
|
+
auto_fix?: boolean;
|
|
2915
|
+
|
|
2488
2916
|
/**
|
|
2489
2917
|
* Body param: Comma-separated slot selections and variable assignments. Reserved
|
|
2490
2918
|
* keys: measure, dimension, filter, calculation. All other keys are variable
|
|
@@ -2505,6 +2933,11 @@ export interface CompilerValidateParams {
|
|
|
2505
2933
|
*/
|
|
2506
2934
|
source?: string | null;
|
|
2507
2935
|
|
|
2936
|
+
/**
|
|
2937
|
+
* Body param: Automatically fix broken refs caused by renames. Defaults to True.
|
|
2938
|
+
*/
|
|
2939
|
+
auto_fix?: boolean;
|
|
2940
|
+
|
|
2508
2941
|
/**
|
|
2509
2942
|
* Body param: Optional connection IDs to validate. If omitted, validates all
|
|
2510
2943
|
* connections.
|
|
@@ -2518,6 +2951,7 @@ export interface CompilerValidateParams {
|
|
|
2518
2951
|
}
|
|
2519
2952
|
|
|
2520
2953
|
Compiler.Cache = Cache;
|
|
2954
|
+
Compiler.Combination = CombinationAPICombination;
|
|
2521
2955
|
|
|
2522
2956
|
export declare namespace Compiler {
|
|
2523
2957
|
export {
|
|
@@ -2529,20 +2963,29 @@ export declare namespace Compiler {
|
|
|
2529
2963
|
type RefWithLabel as RefWithLabel,
|
|
2530
2964
|
type SubqueryCondition as SubqueryCondition,
|
|
2531
2965
|
type CompilerCompileResponse as CompilerCompileResponse,
|
|
2966
|
+
type CompilerCompileDashboardResponse as CompilerCompileDashboardResponse,
|
|
2532
2967
|
type CompilerEnumerateResponse as CompilerEnumerateResponse,
|
|
2533
2968
|
type CompilerExecuteResponse as CompilerExecuteResponse,
|
|
2534
2969
|
type CompilerResolveResponse as CompilerResolveResponse,
|
|
2535
2970
|
type CompilerValidateResponse as CompilerValidateResponse,
|
|
2536
2971
|
type CompilerCompileParams as CompilerCompileParams,
|
|
2972
|
+
type CompilerCompileDashboardParams as CompilerCompileDashboardParams,
|
|
2537
2973
|
type CompilerEnumerateParams as CompilerEnumerateParams,
|
|
2538
2974
|
type CompilerExecuteParams as CompilerExecuteParams,
|
|
2539
2975
|
type CompilerResolveParams as CompilerResolveParams,
|
|
2540
2976
|
type CompilerValidateParams as CompilerValidateParams,
|
|
2541
2977
|
};
|
|
2542
2978
|
|
|
2979
|
+
export { Cache as Cache };
|
|
2980
|
+
|
|
2981
|
+
export {
|
|
2982
|
+
CombinationAPICombination as Combination,
|
|
2983
|
+
type CombinationPreviewResponse as CombinationPreviewResponse,
|
|
2984
|
+
type CombinationPreviewParams as CombinationPreviewParams,
|
|
2985
|
+
};
|
|
2986
|
+
|
|
2543
2987
|
export {
|
|
2544
|
-
|
|
2545
|
-
type
|
|
2546
|
-
type CacheInvalidateParams as CacheInvalidateParams,
|
|
2988
|
+
type ManifestRegenerateAndCreatePrResponse as ManifestRegenerateAndCreatePrResponse,
|
|
2989
|
+
type ManifestRegenerateAndCreatePrParams as ManifestRegenerateAndCreatePrParams,
|
|
2547
2990
|
};
|
|
2548
2991
|
}
|