@lightdash/common 1.198.1 → 1.199.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.
Files changed (70) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/index.d.ts +1 -0
  3. package/dist/cjs/index.d.ts.map +1 -1
  4. package/dist/cjs/index.js +1 -0
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/types/analytics.d.ts +1 -0
  7. package/dist/cjs/types/analytics.d.ts.map +1 -1
  8. package/dist/cjs/types/analytics.js +1 -0
  9. package/dist/cjs/types/analytics.js.map +1 -1
  10. package/dist/cjs/types/api/paginatedQuery.d.ts +3 -2
  11. package/dist/cjs/types/api/paginatedQuery.d.ts.map +1 -1
  12. package/dist/cjs/types/api/paginatedQuery.js.map +1 -1
  13. package/dist/cjs/types/api.d.ts +2 -1
  14. package/dist/cjs/types/api.d.ts.map +1 -1
  15. package/dist/cjs/types/api.js.map +1 -1
  16. package/dist/cjs/types/featureFlags.d.ts +13 -4
  17. package/dist/cjs/types/featureFlags.d.ts.map +1 -1
  18. package/dist/cjs/types/featureFlags.js +12 -3
  19. package/dist/cjs/types/featureFlags.js.map +1 -1
  20. package/dist/cjs/types/querySources.d.ts +188 -0
  21. package/dist/cjs/types/querySources.d.ts.map +1 -0
  22. package/dist/cjs/types/querySources.js +27 -0
  23. package/dist/cjs/types/querySources.js.map +1 -0
  24. package/dist/esm/.tsbuildinfo +1 -1
  25. package/dist/esm/index.d.ts +1 -0
  26. package/dist/esm/index.d.ts.map +1 -1
  27. package/dist/esm/index.js +1 -0
  28. package/dist/esm/index.js.map +1 -1
  29. package/dist/esm/types/analytics.d.ts +1 -0
  30. package/dist/esm/types/analytics.d.ts.map +1 -1
  31. package/dist/esm/types/analytics.js +1 -0
  32. package/dist/esm/types/analytics.js.map +1 -1
  33. package/dist/esm/types/api/paginatedQuery.d.ts +3 -2
  34. package/dist/esm/types/api/paginatedQuery.d.ts.map +1 -1
  35. package/dist/esm/types/api/paginatedQuery.js.map +1 -1
  36. package/dist/esm/types/api.d.ts +2 -1
  37. package/dist/esm/types/api.d.ts.map +1 -1
  38. package/dist/esm/types/api.js.map +1 -1
  39. package/dist/esm/types/featureFlags.d.ts +13 -4
  40. package/dist/esm/types/featureFlags.d.ts.map +1 -1
  41. package/dist/esm/types/featureFlags.js +12 -3
  42. package/dist/esm/types/featureFlags.js.map +1 -1
  43. package/dist/esm/types/querySources.d.ts +188 -0
  44. package/dist/esm/types/querySources.d.ts.map +1 -0
  45. package/dist/esm/types/querySources.js +24 -0
  46. package/dist/esm/types/querySources.js.map +1 -0
  47. package/dist/types/.tsbuildinfo +1 -1
  48. package/dist/types/index.d.ts +1 -0
  49. package/dist/types/index.d.ts.map +1 -1
  50. package/dist/types/index.js +1 -0
  51. package/dist/types/index.js.map +1 -1
  52. package/dist/types/types/analytics.d.ts +1 -0
  53. package/dist/types/types/analytics.d.ts.map +1 -1
  54. package/dist/types/types/analytics.js +1 -0
  55. package/dist/types/types/analytics.js.map +1 -1
  56. package/dist/types/types/api/paginatedQuery.d.ts +3 -2
  57. package/dist/types/types/api/paginatedQuery.d.ts.map +1 -1
  58. package/dist/types/types/api/paginatedQuery.js.map +1 -1
  59. package/dist/types/types/api.d.ts +2 -1
  60. package/dist/types/types/api.d.ts.map +1 -1
  61. package/dist/types/types/api.js.map +1 -1
  62. package/dist/types/types/featureFlags.d.ts +13 -4
  63. package/dist/types/types/featureFlags.d.ts.map +1 -1
  64. package/dist/types/types/featureFlags.js +12 -3
  65. package/dist/types/types/featureFlags.js.map +1 -1
  66. package/dist/types/types/querySources.d.ts +188 -0
  67. package/dist/types/types/querySources.d.ts.map +1 -0
  68. package/dist/types/types/querySources.js +24 -0
  69. package/dist/types/types/querySources.js.map +1 -0
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"featureFlags.js","sourceRoot":"","sources":["../../../src/types/featureFlags.ts"],"names":[],"mappings":"AAAA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,QAAQ,CAAC,KAAqB,CAAC,CAAC;AACvE,CAAC"}
@@ -0,0 +1,188 @@
1
+ import { type QueryExecutionContext } from './analytics';
2
+ import { type UUID } from './api/uuid';
3
+ import { type CustomDimension, type DimensionType, type FieldId, type TableCalculation } from './field';
4
+ import { type AdditionalMetric, type MetricQueryRequest, type SortField } from './metricQuery';
5
+ import { type QueryHistoryStatus } from './queryHistory';
6
+ /**
7
+ * Discriminator for every query source a project can execute queries against.
8
+ * A query source is anything that can scan a schema and run a query returning
9
+ * the standard table format (ResultColumns + rows behind a queryUuid): the
10
+ * project warehouse, the semantic layer, the DuckDB compose engine, and —
11
+ * later — CSV uploads, HTTP APIs, Google Sheets, etc.
12
+ *
13
+ * Deliberately NOT WarehouseTypes: sources are not warehouses, they plug in
14
+ * above the warehouse client layer.
15
+ */
16
+ export declare enum QuerySourceType {
17
+ /** Metric queries compiled through the project's semantic layer. */
18
+ SEMANTIC_LAYER = "semanticLayer",
19
+ /** Raw SQL against the project's data warehouse (SQL runner). */
20
+ SQL = "sql",
21
+ /**
22
+ * DuckDB SQL over previous results (compose engine). References expose
23
+ * other queries' results as named tables, so this is the merge/transform
24
+ * step of a multi-source pipeline.
25
+ */
26
+ DUCKDB = "duckdb"
27
+ }
28
+ /**
29
+ * A name identifying one query within a multi-query submission. Other queries
30
+ * reference this query's results by this name, and by default the results are
31
+ * exposed to referencing DuckDB SQL as a table of the same name — so node ids
32
+ * share the table-name grammar.
33
+ * @pattern ^[a-zA-Z_][a-zA-Z0-9_]{0,62}$
34
+ */
35
+ export type QueryNodeId = string;
36
+ /**
37
+ * A table name exposed to source SQL.
38
+ * Aliased so TSOA emits a $ref'd record value type (a plain string-valued
39
+ * Record compiles to an empty object literal and validation strips its keys).
40
+ * @pattern ^[a-zA-Z_][a-zA-Z0-9_]{0,62}$
41
+ */
42
+ export type QuerySourceTableName = string;
43
+ /**
44
+ * The value side of a duckdb query's references map: either the node id of
45
+ * another query in the same submission, or the queryUuid of an existing
46
+ * async query result.
47
+ * @pattern ^[a-zA-Z0-9_][a-zA-Z0-9_-]{0,63}$
48
+ */
49
+ export type QueryResultReference = string;
50
+ /**
51
+ * A semantic layer (metric) query as a source query. Only exploreName,
52
+ * dimensions and metrics are required; everything else defaults to empty
53
+ * (no filters, no sorts, no table calculations) and a default row limit.
54
+ *
55
+ * Result columns are named by field id — exactly the dimensions and metrics
56
+ * requested (e.g. requesting metric "payments_total_revenue" yields a column
57
+ * "payments_total_revenue"), so referencing DuckDB SQL selects those names.
58
+ */
59
+ export type SemanticLayerSourceQuery = {
60
+ sourceType: QuerySourceType.SEMANTIC_LAYER;
61
+ /** Names this query so other queries in the same submission can reference its results. */
62
+ nodeId?: QueryNodeId;
63
+ exploreName: string;
64
+ /** Dimension field ids to group by, from the explore's schema. */
65
+ dimensions: FieldId[];
66
+ /** Metric field ids to compute, from the explore's schema. */
67
+ metrics: FieldId[];
68
+ /**
69
+ * Filters to apply, in the metric query filters shape: an optional filter
70
+ * group per field kind, e.g. {"dimensions": {"id": "...", "and": [{"id":
71
+ * "...", "target": {"fieldId": "orders_status"}, "operator": "equals",
72
+ * "values": ["completed"]}]}}. Defaults to no filters.
73
+ */
74
+ filters?: MetricQueryRequest['filters'];
75
+ /** Sorts to apply, e.g. [{"fieldId": "orders_order_date", "descending": true}]. Defaults to none. */
76
+ sorts?: SortField[];
77
+ /** Max rows to return. Defaults to the standard query row limit. */
78
+ limit?: number;
79
+ /** Table calculations appended to the results. Defaults to none. */
80
+ tableCalculations?: TableCalculation[];
81
+ /** Ad-hoc metrics not defined in the explore. */
82
+ additionalMetrics?: AdditionalMetric[];
83
+ /** Ad-hoc dimensions not defined in the explore. */
84
+ customDimensions?: CustomDimension[];
85
+ /** IANA timezone for time dimension bucketing, e.g. "America/New_York". */
86
+ timezone?: string;
87
+ };
88
+ /** A raw warehouse SQL query as a source query. */
89
+ export type SqlSourceQuery = {
90
+ sourceType: QuerySourceType.SQL;
91
+ /** Names this query so other queries in the same submission can reference its results. */
92
+ nodeId?: QueryNodeId;
93
+ sql: string;
94
+ limit?: number;
95
+ };
96
+ /**
97
+ * A DuckDB compose query as a source query. References expose other queries'
98
+ * results as named tables the SQL can select from; a referenced result's
99
+ * column names are those of the upstream query's result (field ids for
100
+ * semanticLayer queries, SELECT output names for sql queries).
101
+ *
102
+ * References that name queries still running are waited on: this query
103
+ * executes once every referenced result is ready, and fails if any
104
+ * referenced query fails.
105
+ */
106
+ export type DuckdbSourceQuery = {
107
+ sourceType: QuerySourceType.DUCKDB;
108
+ /** Names this query so other queries in the same submission can reference its results. */
109
+ nodeId?: QueryNodeId;
110
+ sql: string;
111
+ limit?: number;
112
+ /**
113
+ * Which query results the SQL reads, in one of two forms. Shorthand
114
+ * array: node ids of queries in the same submission, each exposed as a
115
+ * table named by its node id — ["orders", "revenue"] lets the SQL run
116
+ * SELECT * FROM orders JOIN revenue. Map form for aliasing or existing
117
+ * results: {tableName: nodeIdOrQueryUuid}, e.g. {"o": "orders", "prev":
118
+ * "<queryUuid>"}.
119
+ */
120
+ references?: QueryNodeId[] | Record<QuerySourceTableName, QueryResultReference>;
121
+ };
122
+ /**
123
+ * The tagged union every submit endpoint takes: one shape per source,
124
+ * discriminated by sourceType. New sources add a member here — this union is
125
+ * the extension point, not new WarehouseTypes values.
126
+ */
127
+ export type SourceQuery = SemanticLayerSourceQuery | SqlSourceQuery | DuckdbSourceQuery;
128
+ /** A column in a source schema, aligned with ResultColumns' {reference, type}. */
129
+ export type QuerySourceSchemaColumn = {
130
+ reference: string;
131
+ type: DimensionType;
132
+ label: string | null;
133
+ description: string | null;
134
+ };
135
+ /**
136
+ * A queryable table in a source schema: an explore for the semantic layer, a
137
+ * warehouse table for SQL, a referenced result for DuckDB.
138
+ */
139
+ export type QuerySourceSchemaTable = {
140
+ reference: string;
141
+ label: string | null;
142
+ description: string | null;
143
+ columns: QuerySourceSchemaColumn[];
144
+ };
145
+ /** The standard shape every source's schema scan returns. */
146
+ export type QuerySourceSchema = {
147
+ sourceType: QuerySourceType;
148
+ tables: QuerySourceSchemaTable[];
149
+ };
150
+ /** Metadata describing a registered source, for source discovery. */
151
+ export type QuerySourceDefinition = {
152
+ sourceType: QuerySourceType;
153
+ label: string;
154
+ description: string;
155
+ };
156
+ export type ExecuteSourceQueriesRequestParams = {
157
+ /**
158
+ * One or more source queries, submitted together. Order does not matter:
159
+ * queries are submitted in dependency order (a duckdb query after the
160
+ * queries its references name) and every query starts executing
161
+ * immediately — dependency waiting happens inside the referencing query.
162
+ */
163
+ queries: SourceQuery[];
164
+ context?: QueryExecutionContext;
165
+ };
166
+ /** One submitted query: its (possibly generated) node id and the queryUuid to poll. */
167
+ export type SourceQuerySubmission = {
168
+ nodeId: QueryNodeId;
169
+ sourceType: QuerySourceType;
170
+ queryUuid: UUID;
171
+ };
172
+ export type ApiExecuteSourceQueriesResults = {
173
+ queries: SourceQuerySubmission[];
174
+ };
175
+ /** Status of one submitted query, from the standard async query lifecycle. */
176
+ export type SourceQueryStatus = {
177
+ queryUuid: UUID;
178
+ status: QueryHistoryStatus;
179
+ error: string | null;
180
+ };
181
+ export type ApiGetSourceQueryStatusResults = {
182
+ statuses: SourceQueryStatus[];
183
+ };
184
+ export type ApiListQuerySourcesResults = {
185
+ sources: QuerySourceDefinition[];
186
+ };
187
+ export type ApiScanQuerySourceSchemaResults = QuerySourceSchema;
188
+ //# sourceMappingURL=querySources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"querySources.d.ts","sourceRoot":"","sources":["../../../src/types/querySources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EACH,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,gBAAgB,EACxB,MAAM,SAAS,CAAC;AACjB,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,K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MAAM,iCAAiC,GAAG;IAC5C;;;;;OAKG;IACH,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,OAAO,CAAC,EAAE,qBAAqB,CAAC;CACnC,CAAC;AAEF,uFAAuF;AACvF,MAAM,MAAM,qBAAqB,GAAG;IAChC,MAAM,EAAE,WAAW,CAAC;IACpB,UAAU,EAAE,eAAe,CAAC;IAC5B,SAAS,EAAE,IAAI,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IACzC,OAAO,EAAE,qBAAqB,EAAE,CAAC;CACpC,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,iBAAiB,GAAG;IAC5B,SAAS,EAAE,IAAI,CAAC;IAChB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IACzC,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACrC,OAAO,EAAE,qBAAqB,EAAE,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Discriminator for every query source a project can execute queries against.
3
+ * A query source is anything that can scan a schema and run a query returning
4
+ * the standard table format (ResultColumns + rows behind a queryUuid): the
5
+ * project warehouse, the semantic layer, the DuckDB compose engine, and —
6
+ * later — CSV uploads, HTTP APIs, Google Sheets, etc.
7
+ *
8
+ * Deliberately NOT WarehouseTypes: sources are not warehouses, they plug in
9
+ * above the warehouse client layer.
10
+ */
11
+ export var QuerySourceType;
12
+ (function (QuerySourceType) {
13
+ /** Metric queries compiled through the project's semantic layer. */
14
+ QuerySourceType["SEMANTIC_LAYER"] = "semanticLayer";
15
+ /** Raw SQL against the project's data warehouse (SQL runner). */
16
+ QuerySourceType["SQL"] = "sql";
17
+ /**
18
+ * DuckDB SQL over previous results (compose engine). References expose
19
+ * other queries' results as named tables, so this is the merge/transform
20
+ * step of a multi-source pipeline.
21
+ */
22
+ QuerySourceType["DUCKDB"] = "duckdb";
23
+ })(QuerySourceType || (QuerySourceType = {}));
24
+ //# sourceMappingURL=querySources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"querySources.js","sourceRoot":"","sources":["../../../src/types/querySources.ts"],"names":[],"mappings":"AAeA;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,eAWX;AAXD,WAAY,eAAe;IACvB,oEAAoE;IACpE,mDAAgC,CAAA;IAChC,iEAAiE;IACjE,8BAAW,CAAA;IACX;;;;OAIG;IACH,oCAAiB,CAAA;AACrB,CAAC,EAXW,eAAe,KAAf,eAAe,QAW1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/common",
3
- "version": "1.198.1",
3
+ "version": "1.199.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",