@514labs/moose-lib 0.6.295-ci-15-gfb3b651b → 0.6.295-ci-17-g70d560ac

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.
@@ -1571,15 +1571,6 @@ interface ApiUtil {
1571
1571
  sql: typeof sql;
1572
1572
  jwt: JWTPayload | undefined;
1573
1573
  }
1574
- /**
1575
- * Utilities provided by getMooseUtils() for database access and SQL queries.
1576
- * Works in both Moose runtime and standalone contexts.
1577
- */
1578
- interface MooseUtils {
1579
- client: MooseClient;
1580
- sql: typeof sql;
1581
- jwt?: JWTPayload;
1582
- }
1583
1574
  /** @deprecated Use ApiUtil instead. */
1584
1575
  type ConsumptionUtil = ApiUtil;
1585
1576
  declare class MooseClient {
@@ -1892,50 +1883,21 @@ declare class ETLPipeline<T, U> {
1892
1883
  run(): Promise<void>;
1893
1884
  }
1894
1885
 
1895
- type SqlObject = OlapTable<any> | SqlResource;
1896
1886
  /**
1897
- * Represents a generic SQL resource that requires setup and teardown commands.
1898
- * Base class for constructs like Views and Materialized Views. Tracks dependencies.
1887
+ * Represents a database View, defined by a SQL SELECT statement based on one or more base tables or other views.
1888
+ * Emits structured data for the Moose infrastructure system.
1899
1889
  */
1900
- declare class SqlResource {
1890
+ declare class View {
1901
1891
  /** @internal */
1902
- readonly kind = "SqlResource";
1903
- /** Array of SQL statements to execute for setting up the resource. */
1904
- setup: readonly string[];
1905
- /** Array of SQL statements to execute for tearing down the resource. */
1906
- teardown: readonly string[];
1907
- /** The name of the SQL resource (e.g., view name, materialized view name). */
1892
+ readonly kind = "CustomView";
1893
+ /** The name of the view */
1908
1894
  name: string;
1909
- /** List of OlapTables or Views that this resource reads data from. */
1910
- pullsDataFrom: SqlObject[];
1911
- /** List of OlapTables or Views that this resource writes data to. */
1912
- pushesDataTo: SqlObject[];
1913
- /** @internal Source file path where this resource was defined */
1895
+ /** The SELECT SQL statement that defines the view */
1896
+ selectSql: string;
1897
+ /** Names of source tables/views that the SELECT reads from */
1898
+ sourceTables: string[];
1899
+ /** @internal Source file path where this view was defined */
1914
1900
  sourceFile?: string;
1915
- /** @internal Source line number where this resource was defined */
1916
- sourceLine?: number;
1917
- /** @internal Source column number where this resource was defined */
1918
- sourceColumn?: number;
1919
- /**
1920
- * Creates a new SqlResource instance.
1921
- * @param name The name of the resource.
1922
- * @param setup An array of SQL DDL statements to create the resource.
1923
- * @param teardown An array of SQL DDL statements to drop the resource.
1924
- * @param options Optional configuration for specifying data dependencies.
1925
- * @param options.pullsDataFrom Tables/Views this resource reads from.
1926
- * @param options.pushesDataTo Tables/Views this resource writes to.
1927
- */
1928
- constructor(name: string, setup: readonly (string | Sql)[], teardown: readonly (string | Sql)[], options?: {
1929
- pullsDataFrom?: SqlObject[];
1930
- pushesDataTo?: SqlObject[];
1931
- });
1932
- }
1933
-
1934
- /**
1935
- * Represents a database View, defined by a SQL SELECT statement based on one or more base tables or other views.
1936
- * Inherits from SqlResource, providing setup (CREATE VIEW) and teardown (DROP VIEW) commands.
1937
- */
1938
- declare class View extends SqlResource {
1939
1901
  /**
1940
1902
  * Creates a new View instance.
1941
1903
  * @param name The name of the view to be created.
@@ -1981,9 +1943,19 @@ interface MaterializedViewConfig<T> {
1981
1943
  *
1982
1944
  * @template TargetTable The data type of the records stored in the underlying target OlapTable. The structure of T defines the target table schema.
1983
1945
  */
1984
- declare class MaterializedView<TargetTable> extends SqlResource {
1946
+ declare class MaterializedView<TargetTable> {
1947
+ /** @internal */
1948
+ readonly kind = "MaterializedView";
1949
+ /** The name of the materialized view */
1950
+ name: string;
1985
1951
  /** The target OlapTable instance where the materialized data is stored. */
1986
1952
  targetTable: OlapTable<TargetTable>;
1953
+ /** The SELECT SQL statement */
1954
+ selectSql: string;
1955
+ /** Names of source tables that the SELECT reads from */
1956
+ sourceTables: string[];
1957
+ /** @internal Source file path where this MV was defined */
1958
+ sourceFile?: string;
1987
1959
  /**
1988
1960
  * Creates a new MaterializedView instance.
1989
1961
  * Requires the `TargetTable` type parameter to be explicitly provided or inferred,
@@ -1996,6 +1968,45 @@ declare class MaterializedView<TargetTable> extends SqlResource {
1996
1968
  constructor(options: MaterializedViewConfig<TargetTable>, targetSchema: IJsonSchemaCollection$1.IV3_1, targetColumns: Column[]);
1997
1969
  }
1998
1970
 
1971
+ type SqlObject = OlapTable<any> | SqlResource;
1972
+ /**
1973
+ * Represents a generic SQL resource that requires setup and teardown commands.
1974
+ * Base class for constructs like Views and Materialized Views. Tracks dependencies.
1975
+ */
1976
+ declare class SqlResource {
1977
+ /** @internal */
1978
+ readonly kind = "SqlResource";
1979
+ /** Array of SQL statements to execute for setting up the resource. */
1980
+ setup: readonly string[];
1981
+ /** Array of SQL statements to execute for tearing down the resource. */
1982
+ teardown: readonly string[];
1983
+ /** The name of the SQL resource (e.g., view name, materialized view name). */
1984
+ name: string;
1985
+ /** List of OlapTables or Views that this resource reads data from. */
1986
+ pullsDataFrom: SqlObject[];
1987
+ /** List of OlapTables or Views that this resource writes data to. */
1988
+ pushesDataTo: SqlObject[];
1989
+ /** @internal Source file path where this resource was defined */
1990
+ sourceFile?: string;
1991
+ /** @internal Source line number where this resource was defined */
1992
+ sourceLine?: number;
1993
+ /** @internal Source column number where this resource was defined */
1994
+ sourceColumn?: number;
1995
+ /**
1996
+ * Creates a new SqlResource instance.
1997
+ * @param name The name of the resource.
1998
+ * @param setup An array of SQL DDL statements to create the resource.
1999
+ * @param teardown An array of SQL DDL statements to drop the resource.
2000
+ * @param options Optional configuration for specifying data dependencies.
2001
+ * @param options.pullsDataFrom Tables/Views this resource reads from.
2002
+ * @param options.pushesDataTo Tables/Views this resource writes to.
2003
+ */
2004
+ constructor(name: string, setup: readonly (string | Sql)[], teardown: readonly (string | Sql)[], options?: {
2005
+ pullsDataFrom?: SqlObject[];
2006
+ pushesDataTo?: SqlObject[];
2007
+ });
2008
+ }
2009
+
1999
2010
  type WebAppHandler = (req: http.IncomingMessage, res: http.ServerResponse) => void | Promise<void>;
2000
2011
  interface FrameworkApp {
2001
2012
  handle?: (req: http.IncomingMessage, res: http.ServerResponse, next?: (err?: any) => void) => void;
@@ -2112,6 +2123,28 @@ declare function getWebApps(): Map<string, WebApp>;
2112
2123
  * @returns The WebApp instance or undefined if not found
2113
2124
  */
2114
2125
  declare function getWebApp(name: string): WebApp | undefined;
2126
+ /**
2127
+ * Get all registered materialized views.
2128
+ * @returns A Map of MV name to MaterializedView instance
2129
+ */
2130
+ declare function getMaterializedViews(): Map<string, MaterializedView<any>>;
2131
+ /**
2132
+ * Get a registered materialized view by name.
2133
+ * @param name - The name of the materialized view
2134
+ * @returns The MaterializedView instance or undefined if not found
2135
+ */
2136
+ declare function getMaterializedView(name: string): MaterializedView<any> | undefined;
2137
+ /**
2138
+ * Get all registered custom views.
2139
+ * @returns A Map of view name to View instance
2140
+ */
2141
+ declare function getCustomViews(): Map<string, View>;
2142
+ /**
2143
+ * Get a registered custom view by name.
2144
+ * @param name - The name of the custom view
2145
+ * @returns The View instance or undefined if not found
2146
+ */
2147
+ declare function getCustomView(name: string): View | undefined;
2115
2148
 
2116
2149
  /**
2117
2150
  * @module dmv2
@@ -2153,4 +2186,4 @@ type SimpleAggregated<AggregationFunction extends string, ArgType = any> = {
2153
2186
  _argType?: ArgType;
2154
2187
  };
2155
2188
 
2156
- export { toQuery as $, type Aggregated as A, getWorkflows as B, ConsumptionApi as C, type DeadLetterModel as D, type EgressConfig as E, type FrameworkApp as F, getWorkflow as G, getWebApps as H, IngestApi as I, getWebApp as J, type ApiUtil as K, LifeCycle as L, MaterializedView as M, type ConsumptionUtil as N, OlapTable as O, quoteIdentifier as P, type IdentifierBrandedString as Q, type NonIdentifierBrandedString as R, type SimpleAggregated as S, Task as T, type Value as U, View as V, Workflow as W, type RawValue as X, sql as Y, Sql as Z, toStaticQuery as _, type OlapConfig as a, toQueryPreview as a0, getValueFromParameter as a1, createClickhouseParameter as a2, mapToClickHouseType as a3, type MooseUtils as a4, MooseClient as a5, type Blocks as a6, ClickHouseEngines as a7, dropView as a8, createMaterializedView as a9, populateTable as aa, QueryClient as ab, WorkflowClient as ac, getTemporalClient as ad, ApiHelpers as ae, ConsumptionHelpers as af, joinQueries as ag, type ConsumerConfig as ah, type TransformConfig as ai, type TaskContext as aj, type TaskConfig as ak, type IngestPipelineConfig as al, type MaterializedViewConfig as am, type S3QueueTableSettings as b, Stream as c, type StreamConfig as d, type DeadLetter as e, DeadLetterQueue as f, type IngestConfig as g, Api as h, type ApiConfig as i, IngestPipeline as j, SqlResource as k, ETLPipeline as l, type ETLPipelineConfig as m, WebApp as n, type WebAppConfig as o, type WebAppHandler as p, getTables as q, getTable as r, getStreams as s, getStream as t, getIngestApis as u, getIngestApi as v, getApis as w, getApi as x, getSqlResources as y, getSqlResource as z };
2189
+ export { type RawValue as $, type Aggregated as A, getWorkflows as B, ConsumptionApi as C, type DeadLetterModel as D, type EgressConfig as E, type FrameworkApp as F, getWorkflow as G, getWebApps as H, IngestApi as I, getWebApp as J, getCustomView as K, LifeCycle as L, MaterializedView as M, getCustomViews as N, OlapTable as O, getMaterializedView as P, getMaterializedViews as Q, type ApiUtil as R, type SimpleAggregated as S, Task as T, type ConsumptionUtil as U, View as V, Workflow as W, quoteIdentifier as X, type IdentifierBrandedString as Y, type NonIdentifierBrandedString as Z, type Value as _, type OlapConfig as a, sql as a0, Sql as a1, toStaticQuery as a2, toQuery as a3, toQueryPreview as a4, getValueFromParameter as a5, createClickhouseParameter as a6, mapToClickHouseType as a7, MooseClient as a8, type Blocks as a9, ClickHouseEngines as aa, dropView as ab, createMaterializedView as ac, populateTable as ad, QueryClient as ae, WorkflowClient as af, getTemporalClient as ag, ApiHelpers as ah, ConsumptionHelpers as ai, joinQueries as aj, type ConsumerConfig as ak, type TransformConfig as al, type TaskContext as am, type TaskConfig as an, type IngestPipelineConfig as ao, type MaterializedViewConfig as ap, type S3QueueTableSettings as b, Stream as c, type StreamConfig as d, type DeadLetter as e, DeadLetterQueue as f, type IngestConfig as g, Api as h, type ApiConfig as i, IngestPipeline as j, SqlResource as k, ETLPipeline as l, type ETLPipelineConfig as m, WebApp as n, type WebAppConfig as o, type WebAppHandler as p, getTables as q, getTable as r, getStreams as s, getStream as t, getIngestApis as u, getIngestApi as v, getApis as w, getApi as x, getSqlResources as y, getSqlResource as z };
@@ -1571,15 +1571,6 @@ interface ApiUtil {
1571
1571
  sql: typeof sql;
1572
1572
  jwt: JWTPayload | undefined;
1573
1573
  }
1574
- /**
1575
- * Utilities provided by getMooseUtils() for database access and SQL queries.
1576
- * Works in both Moose runtime and standalone contexts.
1577
- */
1578
- interface MooseUtils {
1579
- client: MooseClient;
1580
- sql: typeof sql;
1581
- jwt?: JWTPayload;
1582
- }
1583
1574
  /** @deprecated Use ApiUtil instead. */
1584
1575
  type ConsumptionUtil = ApiUtil;
1585
1576
  declare class MooseClient {
@@ -1892,50 +1883,21 @@ declare class ETLPipeline<T, U> {
1892
1883
  run(): Promise<void>;
1893
1884
  }
1894
1885
 
1895
- type SqlObject = OlapTable<any> | SqlResource;
1896
1886
  /**
1897
- * Represents a generic SQL resource that requires setup and teardown commands.
1898
- * Base class for constructs like Views and Materialized Views. Tracks dependencies.
1887
+ * Represents a database View, defined by a SQL SELECT statement based on one or more base tables or other views.
1888
+ * Emits structured data for the Moose infrastructure system.
1899
1889
  */
1900
- declare class SqlResource {
1890
+ declare class View {
1901
1891
  /** @internal */
1902
- readonly kind = "SqlResource";
1903
- /** Array of SQL statements to execute for setting up the resource. */
1904
- setup: readonly string[];
1905
- /** Array of SQL statements to execute for tearing down the resource. */
1906
- teardown: readonly string[];
1907
- /** The name of the SQL resource (e.g., view name, materialized view name). */
1892
+ readonly kind = "CustomView";
1893
+ /** The name of the view */
1908
1894
  name: string;
1909
- /** List of OlapTables or Views that this resource reads data from. */
1910
- pullsDataFrom: SqlObject[];
1911
- /** List of OlapTables or Views that this resource writes data to. */
1912
- pushesDataTo: SqlObject[];
1913
- /** @internal Source file path where this resource was defined */
1895
+ /** The SELECT SQL statement that defines the view */
1896
+ selectSql: string;
1897
+ /** Names of source tables/views that the SELECT reads from */
1898
+ sourceTables: string[];
1899
+ /** @internal Source file path where this view was defined */
1914
1900
  sourceFile?: string;
1915
- /** @internal Source line number where this resource was defined */
1916
- sourceLine?: number;
1917
- /** @internal Source column number where this resource was defined */
1918
- sourceColumn?: number;
1919
- /**
1920
- * Creates a new SqlResource instance.
1921
- * @param name The name of the resource.
1922
- * @param setup An array of SQL DDL statements to create the resource.
1923
- * @param teardown An array of SQL DDL statements to drop the resource.
1924
- * @param options Optional configuration for specifying data dependencies.
1925
- * @param options.pullsDataFrom Tables/Views this resource reads from.
1926
- * @param options.pushesDataTo Tables/Views this resource writes to.
1927
- */
1928
- constructor(name: string, setup: readonly (string | Sql)[], teardown: readonly (string | Sql)[], options?: {
1929
- pullsDataFrom?: SqlObject[];
1930
- pushesDataTo?: SqlObject[];
1931
- });
1932
- }
1933
-
1934
- /**
1935
- * Represents a database View, defined by a SQL SELECT statement based on one or more base tables or other views.
1936
- * Inherits from SqlResource, providing setup (CREATE VIEW) and teardown (DROP VIEW) commands.
1937
- */
1938
- declare class View extends SqlResource {
1939
1901
  /**
1940
1902
  * Creates a new View instance.
1941
1903
  * @param name The name of the view to be created.
@@ -1981,9 +1943,19 @@ interface MaterializedViewConfig<T> {
1981
1943
  *
1982
1944
  * @template TargetTable The data type of the records stored in the underlying target OlapTable. The structure of T defines the target table schema.
1983
1945
  */
1984
- declare class MaterializedView<TargetTable> extends SqlResource {
1946
+ declare class MaterializedView<TargetTable> {
1947
+ /** @internal */
1948
+ readonly kind = "MaterializedView";
1949
+ /** The name of the materialized view */
1950
+ name: string;
1985
1951
  /** The target OlapTable instance where the materialized data is stored. */
1986
1952
  targetTable: OlapTable<TargetTable>;
1953
+ /** The SELECT SQL statement */
1954
+ selectSql: string;
1955
+ /** Names of source tables that the SELECT reads from */
1956
+ sourceTables: string[];
1957
+ /** @internal Source file path where this MV was defined */
1958
+ sourceFile?: string;
1987
1959
  /**
1988
1960
  * Creates a new MaterializedView instance.
1989
1961
  * Requires the `TargetTable` type parameter to be explicitly provided or inferred,
@@ -1996,6 +1968,45 @@ declare class MaterializedView<TargetTable> extends SqlResource {
1996
1968
  constructor(options: MaterializedViewConfig<TargetTable>, targetSchema: IJsonSchemaCollection$1.IV3_1, targetColumns: Column[]);
1997
1969
  }
1998
1970
 
1971
+ type SqlObject = OlapTable<any> | SqlResource;
1972
+ /**
1973
+ * Represents a generic SQL resource that requires setup and teardown commands.
1974
+ * Base class for constructs like Views and Materialized Views. Tracks dependencies.
1975
+ */
1976
+ declare class SqlResource {
1977
+ /** @internal */
1978
+ readonly kind = "SqlResource";
1979
+ /** Array of SQL statements to execute for setting up the resource. */
1980
+ setup: readonly string[];
1981
+ /** Array of SQL statements to execute for tearing down the resource. */
1982
+ teardown: readonly string[];
1983
+ /** The name of the SQL resource (e.g., view name, materialized view name). */
1984
+ name: string;
1985
+ /** List of OlapTables or Views that this resource reads data from. */
1986
+ pullsDataFrom: SqlObject[];
1987
+ /** List of OlapTables or Views that this resource writes data to. */
1988
+ pushesDataTo: SqlObject[];
1989
+ /** @internal Source file path where this resource was defined */
1990
+ sourceFile?: string;
1991
+ /** @internal Source line number where this resource was defined */
1992
+ sourceLine?: number;
1993
+ /** @internal Source column number where this resource was defined */
1994
+ sourceColumn?: number;
1995
+ /**
1996
+ * Creates a new SqlResource instance.
1997
+ * @param name The name of the resource.
1998
+ * @param setup An array of SQL DDL statements to create the resource.
1999
+ * @param teardown An array of SQL DDL statements to drop the resource.
2000
+ * @param options Optional configuration for specifying data dependencies.
2001
+ * @param options.pullsDataFrom Tables/Views this resource reads from.
2002
+ * @param options.pushesDataTo Tables/Views this resource writes to.
2003
+ */
2004
+ constructor(name: string, setup: readonly (string | Sql)[], teardown: readonly (string | Sql)[], options?: {
2005
+ pullsDataFrom?: SqlObject[];
2006
+ pushesDataTo?: SqlObject[];
2007
+ });
2008
+ }
2009
+
1999
2010
  type WebAppHandler = (req: http.IncomingMessage, res: http.ServerResponse) => void | Promise<void>;
2000
2011
  interface FrameworkApp {
2001
2012
  handle?: (req: http.IncomingMessage, res: http.ServerResponse, next?: (err?: any) => void) => void;
@@ -2112,6 +2123,28 @@ declare function getWebApps(): Map<string, WebApp>;
2112
2123
  * @returns The WebApp instance or undefined if not found
2113
2124
  */
2114
2125
  declare function getWebApp(name: string): WebApp | undefined;
2126
+ /**
2127
+ * Get all registered materialized views.
2128
+ * @returns A Map of MV name to MaterializedView instance
2129
+ */
2130
+ declare function getMaterializedViews(): Map<string, MaterializedView<any>>;
2131
+ /**
2132
+ * Get a registered materialized view by name.
2133
+ * @param name - The name of the materialized view
2134
+ * @returns The MaterializedView instance or undefined if not found
2135
+ */
2136
+ declare function getMaterializedView(name: string): MaterializedView<any> | undefined;
2137
+ /**
2138
+ * Get all registered custom views.
2139
+ * @returns A Map of view name to View instance
2140
+ */
2141
+ declare function getCustomViews(): Map<string, View>;
2142
+ /**
2143
+ * Get a registered custom view by name.
2144
+ * @param name - The name of the custom view
2145
+ * @returns The View instance or undefined if not found
2146
+ */
2147
+ declare function getCustomView(name: string): View | undefined;
2115
2148
 
2116
2149
  /**
2117
2150
  * @module dmv2
@@ -2153,4 +2186,4 @@ type SimpleAggregated<AggregationFunction extends string, ArgType = any> = {
2153
2186
  _argType?: ArgType;
2154
2187
  };
2155
2188
 
2156
- export { toQuery as $, type Aggregated as A, getWorkflows as B, ConsumptionApi as C, type DeadLetterModel as D, type EgressConfig as E, type FrameworkApp as F, getWorkflow as G, getWebApps as H, IngestApi as I, getWebApp as J, type ApiUtil as K, LifeCycle as L, MaterializedView as M, type ConsumptionUtil as N, OlapTable as O, quoteIdentifier as P, type IdentifierBrandedString as Q, type NonIdentifierBrandedString as R, type SimpleAggregated as S, Task as T, type Value as U, View as V, Workflow as W, type RawValue as X, sql as Y, Sql as Z, toStaticQuery as _, type OlapConfig as a, toQueryPreview as a0, getValueFromParameter as a1, createClickhouseParameter as a2, mapToClickHouseType as a3, type MooseUtils as a4, MooseClient as a5, type Blocks as a6, ClickHouseEngines as a7, dropView as a8, createMaterializedView as a9, populateTable as aa, QueryClient as ab, WorkflowClient as ac, getTemporalClient as ad, ApiHelpers as ae, ConsumptionHelpers as af, joinQueries as ag, type ConsumerConfig as ah, type TransformConfig as ai, type TaskContext as aj, type TaskConfig as ak, type IngestPipelineConfig as al, type MaterializedViewConfig as am, type S3QueueTableSettings as b, Stream as c, type StreamConfig as d, type DeadLetter as e, DeadLetterQueue as f, type IngestConfig as g, Api as h, type ApiConfig as i, IngestPipeline as j, SqlResource as k, ETLPipeline as l, type ETLPipelineConfig as m, WebApp as n, type WebAppConfig as o, type WebAppHandler as p, getTables as q, getTable as r, getStreams as s, getStream as t, getIngestApis as u, getIngestApi as v, getApis as w, getApi as x, getSqlResources as y, getSqlResource as z };
2189
+ export { type RawValue as $, type Aggregated as A, getWorkflows as B, ConsumptionApi as C, type DeadLetterModel as D, type EgressConfig as E, type FrameworkApp as F, getWorkflow as G, getWebApps as H, IngestApi as I, getWebApp as J, getCustomView as K, LifeCycle as L, MaterializedView as M, getCustomViews as N, OlapTable as O, getMaterializedView as P, getMaterializedViews as Q, type ApiUtil as R, type SimpleAggregated as S, Task as T, type ConsumptionUtil as U, View as V, Workflow as W, quoteIdentifier as X, type IdentifierBrandedString as Y, type NonIdentifierBrandedString as Z, type Value as _, type OlapConfig as a, sql as a0, Sql as a1, toStaticQuery as a2, toQuery as a3, toQueryPreview as a4, getValueFromParameter as a5, createClickhouseParameter as a6, mapToClickHouseType as a7, MooseClient as a8, type Blocks as a9, ClickHouseEngines as aa, dropView as ab, createMaterializedView as ac, populateTable as ad, QueryClient as ae, WorkflowClient as af, getTemporalClient as ag, ApiHelpers as ah, ConsumptionHelpers as ai, joinQueries as aj, type ConsumerConfig as ak, type TransformConfig as al, type TaskContext as am, type TaskConfig as an, type IngestPipelineConfig as ao, type MaterializedViewConfig as ap, type S3QueueTableSettings as b, Stream as c, type StreamConfig as d, type DeadLetter as e, DeadLetterQueue as f, type IngestConfig as g, Api as h, type ApiConfig as i, IngestPipeline as j, SqlResource as k, ETLPipeline as l, type ETLPipelineConfig as m, WebApp as n, type WebAppConfig as o, type WebAppHandler as p, getTables as q, getTable as r, getStreams as s, getStream as t, getIngestApis as u, getIngestApi as v, getApis as w, getApi as x, getSqlResources as y, getSqlResource as z };
package/dist/index.d.mts CHANGED
@@ -1,8 +1,9 @@
1
- export { C as ClickHouseByteSize, q as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, e as ClickHouseLineString, p as ClickHouseMaterialized, f as ClickHouseMultiLineString, h as ClickHouseMultiPolygon, b as ClickHouseNamedTuple, c as ClickHousePoint, g as ClickHousePolygon, i as ClickHousePrecision, d as ClickHouseRing, o as ClickHouseTTL, D as DateTime, r as DateTime64, t as DateTime64String, s as DateTimeString, E as Decimal, F as FixedString, u as Float32, v as Float64, w as Int16, x as Int32, y as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, z as UInt16, A as UInt32, B as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-Ddm1MeOX.mjs';
2
- import { a4 as MooseUtils, K as ApiUtil, a5 as MooseClient } from './index-C6Y6fn_9.mjs';
3
- export { A as Aggregated, h as Api, i as ApiConfig, ae as ApiHelpers, a6 as Blocks, a7 as ClickHouseEngines, C as ConsumptionApi, af as ConsumptionHelpers, N as ConsumptionUtil, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, Q as IdentifierBrandedString, I as IngestApi, g as IngestConfig, j as IngestPipeline, L as LifeCycle, M as MaterializedView, R as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, ab as QueryClient, X as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, Z as Sql, k as SqlResource, c as Stream, d as StreamConfig, T as Task, U as Value, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, ac as WorkflowClient, a2 as createClickhouseParameter, a9 as createMaterializedView, a8 as dropView, x as getApi, w as getApis, v as getIngestApi, u as getIngestApis, z as getSqlResource, y as getSqlResources, t as getStream, s as getStreams, r as getTable, q as getTables, ad as getTemporalClient, a1 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, ag as joinQueries, a3 as mapToClickHouseType, aa as populateTable, P as quoteIdentifier, Y as sql, $ as toQuery, a0 as toQueryPreview, _ as toStaticQuery } from './index-C6Y6fn_9.mjs';
1
+ export { C as ClickHouseByteSize, q as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, e as ClickHouseLineString, p as ClickHouseMaterialized, f as ClickHouseMultiLineString, h as ClickHouseMultiPolygon, b as ClickHouseNamedTuple, c as ClickHousePoint, g as ClickHousePolygon, i as ClickHousePrecision, d as ClickHouseRing, o as ClickHouseTTL, D as DateTime, r as DateTime64, t as DateTime64String, s as DateTimeString, E as Decimal, F as FixedString, u as Float32, v as Float64, w as Int16, x as Int32, y as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, z as UInt16, A as UInt32, B as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-DCCiBirg.mjs';
2
+ import { R as ApiUtil, a8 as MooseClient } from './index-CcZRaA0b.mjs';
3
+ export { A as Aggregated, h as Api, i as ApiConfig, ah as ApiHelpers, a9 as Blocks, aa as ClickHouseEngines, C as ConsumptionApi, ai as ConsumptionHelpers, U as ConsumptionUtil, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, Y as IdentifierBrandedString, I as IngestApi, g as IngestConfig, j as IngestPipeline, L as LifeCycle, M as MaterializedView, Z as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, ae as QueryClient, $ as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, a1 as Sql, k as SqlResource, c as Stream, d as StreamConfig, T as Task, _ as Value, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, af as WorkflowClient, a6 as createClickhouseParameter, ac as createMaterializedView, ab as dropView, x as getApi, w as getApis, K as getCustomView, N as getCustomViews, v as getIngestApi, u as getIngestApis, P as getMaterializedView, Q as getMaterializedViews, z as getSqlResource, y as getSqlResources, t as getStream, s as getStreams, r as getTable, q as getTables, ag as getTemporalClient, a5 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, aj as joinQueries, a7 as mapToClickHouseType, ad as populateTable, X as quoteIdentifier, a0 as sql, a3 as toQuery, a4 as toQueryPreview, a2 as toStaticQuery } from './index-CcZRaA0b.mjs';
4
4
  import * as _clickhouse_client from '@clickhouse/client';
5
5
  import { KafkaJS } from '@514labs/kafka-javascript';
6
+ import http from 'http';
6
7
  import { IsTuple } from 'typia/lib/typings/IsTuple';
7
8
  import { Readable } from 'node:stream';
8
9
  import 'typia/lib/tags';
@@ -10,7 +11,6 @@ import 'typia';
10
11
  import 'typia/src/schemas/json/IJsonSchemaCollection';
11
12
  import '@temporalio/client';
12
13
  import 'jose';
13
- import 'http';
14
14
 
15
15
  declare const Kafka: typeof KafkaJS.Kafka;
16
16
  type Kafka = KafkaJS.Kafka;
@@ -193,16 +193,10 @@ declare const mooseEnvSecrets: {
193
193
  get(envVarName: string): string;
194
194
  };
195
195
 
196
- /**
197
- * @deprecated No longer needed. Use getMooseUtils() directly instead.
198
- * Moose now handles utility injection automatically when injectMooseUtils is true.
199
- */
196
+ declare function getMooseUtils(req: http.IncomingMessage | any): ApiUtil | undefined;
200
197
  declare function expressMiddleware(): (req: any, res: any, next: any) => void;
201
- /**
202
- * @deprecated Use MooseUtils from helpers.ts instead.
203
- */
204
198
  interface ExpressRequestWithMoose {
205
- moose?: MooseUtils;
199
+ moose?: ApiUtil;
206
200
  }
207
201
 
208
202
  interface TaskFunction {
@@ -328,24 +322,6 @@ interface RuntimeClickHouseConfig {
328
322
  useSSL: boolean;
329
323
  }
330
324
 
331
- /**
332
- * Get Moose utilities for database access and SQL queries.
333
- * Works in both Moose runtime and standalone contexts.
334
- *
335
- * @param req - DEPRECATED: Request parameter is no longer needed and will be ignored.
336
- * @returns Promise resolving to MooseUtils with client and sql utilities.
337
- *
338
- * @example
339
- * ```typescript
340
- * const { client, sql } = await getMooseUtils();
341
- * const result = await client.query.execute(sql`SELECT * FROM table`);
342
- * ```
343
- */
344
- declare function getMooseUtils(req?: any): Promise<MooseUtils>;
345
- /**
346
- * @deprecated Use getMooseUtils() instead.
347
- * Creates a Moose client for database access.
348
- */
349
325
  declare function getMooseClients(config?: Partial<RuntimeClickHouseConfig>): Promise<{
350
326
  client: MooseClient;
351
327
  }>;
@@ -578,4 +554,4 @@ type DataModelConfig<T> = Partial<{
578
554
  parallelism?: number;
579
555
  }>;
580
556
 
581
- export { ACKs, ApiUtil, type CSVParsingConfig, CSV_DELIMITERS, type CliLogData, DEFAULT_CSV_CONFIG, DEFAULT_JSON_CONFIG, type DataModelConfig, DataSource, type DataSourceConfig, type ExpressRequestWithMoose, type ExtractionResult, type JSONParsingConfig, type KafkaClientConfig, type Logger, MAX_RETRIES, MAX_RETRIES_PRODUCER, MAX_RETRY_TIME_MS, MOOSE_RUNTIME_ENV_PREFIX, MooseCache, MooseClient, MooseUtils, type Producer, RETRY_FACTOR_PRODUCER, RETRY_INITIAL_TIME_MS, type StripDateIntersection, type TaskConfig, type TaskDefinition, type TaskFunction, antiCachePath, cliLog, compilerLog, createApi, createConsumptionApi, createProducerConfig, expressMiddleware, getClickhouseClient, getFileName, getKafkaClient, getKafkaProducer, getMooseClients, getMooseUtils, isValidCSVDelimiter, logError, mapTstoJs, mooseEnvSecrets, mooseRuntimeEnv, parseCSV, parseJSON, parseJSONWithDates };
557
+ export { ACKs, ApiUtil, type CSVParsingConfig, CSV_DELIMITERS, type CliLogData, DEFAULT_CSV_CONFIG, DEFAULT_JSON_CONFIG, type DataModelConfig, DataSource, type DataSourceConfig, type ExpressRequestWithMoose, type ExtractionResult, type JSONParsingConfig, type KafkaClientConfig, type Logger, MAX_RETRIES, MAX_RETRIES_PRODUCER, MAX_RETRY_TIME_MS, MOOSE_RUNTIME_ENV_PREFIX, MooseCache, MooseClient, type Producer, RETRY_FACTOR_PRODUCER, RETRY_INITIAL_TIME_MS, type StripDateIntersection, type TaskConfig, type TaskDefinition, type TaskFunction, antiCachePath, cliLog, compilerLog, createApi, createConsumptionApi, createProducerConfig, expressMiddleware, getClickhouseClient, getFileName, getKafkaClient, getKafkaProducer, getMooseClients, getMooseUtils, isValidCSVDelimiter, logError, mapTstoJs, mooseEnvSecrets, mooseRuntimeEnv, parseCSV, parseJSON, parseJSONWithDates };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- export { C as ClickHouseByteSize, q as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, e as ClickHouseLineString, p as ClickHouseMaterialized, f as ClickHouseMultiLineString, h as ClickHouseMultiPolygon, b as ClickHouseNamedTuple, c as ClickHousePoint, g as ClickHousePolygon, i as ClickHousePrecision, d as ClickHouseRing, o as ClickHouseTTL, D as DateTime, r as DateTime64, t as DateTime64String, s as DateTimeString, E as Decimal, F as FixedString, u as Float32, v as Float64, w as Int16, x as Int32, y as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, z as UInt16, A as UInt32, B as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-N0vNe6CP.js';
2
- import { a4 as MooseUtils, K as ApiUtil, a5 as MooseClient } from './index-C6Y6fn_9.js';
3
- export { A as Aggregated, h as Api, i as ApiConfig, ae as ApiHelpers, a6 as Blocks, a7 as ClickHouseEngines, C as ConsumptionApi, af as ConsumptionHelpers, N as ConsumptionUtil, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, Q as IdentifierBrandedString, I as IngestApi, g as IngestConfig, j as IngestPipeline, L as LifeCycle, M as MaterializedView, R as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, ab as QueryClient, X as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, Z as Sql, k as SqlResource, c as Stream, d as StreamConfig, T as Task, U as Value, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, ac as WorkflowClient, a2 as createClickhouseParameter, a9 as createMaterializedView, a8 as dropView, x as getApi, w as getApis, v as getIngestApi, u as getIngestApis, z as getSqlResource, y as getSqlResources, t as getStream, s as getStreams, r as getTable, q as getTables, ad as getTemporalClient, a1 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, ag as joinQueries, a3 as mapToClickHouseType, aa as populateTable, P as quoteIdentifier, Y as sql, $ as toQuery, a0 as toQueryPreview, _ as toStaticQuery } from './index-C6Y6fn_9.js';
1
+ export { C as ClickHouseByteSize, q as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, e as ClickHouseLineString, p as ClickHouseMaterialized, f as ClickHouseMultiLineString, h as ClickHouseMultiPolygon, b as ClickHouseNamedTuple, c as ClickHousePoint, g as ClickHousePolygon, i as ClickHousePrecision, d as ClickHouseRing, o as ClickHouseTTL, D as DateTime, r as DateTime64, t as DateTime64String, s as DateTimeString, E as Decimal, F as FixedString, u as Float32, v as Float64, w as Int16, x as Int32, y as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, z as UInt16, A as UInt32, B as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-DhVPp9qX.js';
2
+ import { R as ApiUtil, a8 as MooseClient } from './index-CcZRaA0b.js';
3
+ export { A as Aggregated, h as Api, i as ApiConfig, ah as ApiHelpers, a9 as Blocks, aa as ClickHouseEngines, C as ConsumptionApi, ai as ConsumptionHelpers, U as ConsumptionUtil, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, Y as IdentifierBrandedString, I as IngestApi, g as IngestConfig, j as IngestPipeline, L as LifeCycle, M as MaterializedView, Z as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, ae as QueryClient, $ as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, a1 as Sql, k as SqlResource, c as Stream, d as StreamConfig, T as Task, _ as Value, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, af as WorkflowClient, a6 as createClickhouseParameter, ac as createMaterializedView, ab as dropView, x as getApi, w as getApis, K as getCustomView, N as getCustomViews, v as getIngestApi, u as getIngestApis, P as getMaterializedView, Q as getMaterializedViews, z as getSqlResource, y as getSqlResources, t as getStream, s as getStreams, r as getTable, q as getTables, ag as getTemporalClient, a5 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, aj as joinQueries, a7 as mapToClickHouseType, ad as populateTable, X as quoteIdentifier, a0 as sql, a3 as toQuery, a4 as toQueryPreview, a2 as toStaticQuery } from './index-CcZRaA0b.js';
4
4
  import * as _clickhouse_client from '@clickhouse/client';
5
5
  import { KafkaJS } from '@514labs/kafka-javascript';
6
+ import http from 'http';
6
7
  import { IsTuple } from 'typia/lib/typings/IsTuple';
7
8
  import { Readable } from 'node:stream';
8
9
  import 'typia/lib/tags';
@@ -10,7 +11,6 @@ import 'typia';
10
11
  import 'typia/src/schemas/json/IJsonSchemaCollection';
11
12
  import '@temporalio/client';
12
13
  import 'jose';
13
- import 'http';
14
14
 
15
15
  declare const Kafka: typeof KafkaJS.Kafka;
16
16
  type Kafka = KafkaJS.Kafka;
@@ -193,16 +193,10 @@ declare const mooseEnvSecrets: {
193
193
  get(envVarName: string): string;
194
194
  };
195
195
 
196
- /**
197
- * @deprecated No longer needed. Use getMooseUtils() directly instead.
198
- * Moose now handles utility injection automatically when injectMooseUtils is true.
199
- */
196
+ declare function getMooseUtils(req: http.IncomingMessage | any): ApiUtil | undefined;
200
197
  declare function expressMiddleware(): (req: any, res: any, next: any) => void;
201
- /**
202
- * @deprecated Use MooseUtils from helpers.ts instead.
203
- */
204
198
  interface ExpressRequestWithMoose {
205
- moose?: MooseUtils;
199
+ moose?: ApiUtil;
206
200
  }
207
201
 
208
202
  interface TaskFunction {
@@ -328,24 +322,6 @@ interface RuntimeClickHouseConfig {
328
322
  useSSL: boolean;
329
323
  }
330
324
 
331
- /**
332
- * Get Moose utilities for database access and SQL queries.
333
- * Works in both Moose runtime and standalone contexts.
334
- *
335
- * @param req - DEPRECATED: Request parameter is no longer needed and will be ignored.
336
- * @returns Promise resolving to MooseUtils with client and sql utilities.
337
- *
338
- * @example
339
- * ```typescript
340
- * const { client, sql } = await getMooseUtils();
341
- * const result = await client.query.execute(sql`SELECT * FROM table`);
342
- * ```
343
- */
344
- declare function getMooseUtils(req?: any): Promise<MooseUtils>;
345
- /**
346
- * @deprecated Use getMooseUtils() instead.
347
- * Creates a Moose client for database access.
348
- */
349
325
  declare function getMooseClients(config?: Partial<RuntimeClickHouseConfig>): Promise<{
350
326
  client: MooseClient;
351
327
  }>;
@@ -578,4 +554,4 @@ type DataModelConfig<T> = Partial<{
578
554
  parallelism?: number;
579
555
  }>;
580
556
 
581
- export { ACKs, ApiUtil, type CSVParsingConfig, CSV_DELIMITERS, type CliLogData, DEFAULT_CSV_CONFIG, DEFAULT_JSON_CONFIG, type DataModelConfig, DataSource, type DataSourceConfig, type ExpressRequestWithMoose, type ExtractionResult, type JSONParsingConfig, type KafkaClientConfig, type Logger, MAX_RETRIES, MAX_RETRIES_PRODUCER, MAX_RETRY_TIME_MS, MOOSE_RUNTIME_ENV_PREFIX, MooseCache, MooseClient, MooseUtils, type Producer, RETRY_FACTOR_PRODUCER, RETRY_INITIAL_TIME_MS, type StripDateIntersection, type TaskConfig, type TaskDefinition, type TaskFunction, antiCachePath, cliLog, compilerLog, createApi, createConsumptionApi, createProducerConfig, expressMiddleware, getClickhouseClient, getFileName, getKafkaClient, getKafkaProducer, getMooseClients, getMooseUtils, isValidCSVDelimiter, logError, mapTstoJs, mooseEnvSecrets, mooseRuntimeEnv, parseCSV, parseJSON, parseJSONWithDates };
557
+ export { ACKs, ApiUtil, type CSVParsingConfig, CSV_DELIMITERS, type CliLogData, DEFAULT_CSV_CONFIG, DEFAULT_JSON_CONFIG, type DataModelConfig, DataSource, type DataSourceConfig, type ExpressRequestWithMoose, type ExtractionResult, type JSONParsingConfig, type KafkaClientConfig, type Logger, MAX_RETRIES, MAX_RETRIES_PRODUCER, MAX_RETRY_TIME_MS, MOOSE_RUNTIME_ENV_PREFIX, MooseCache, MooseClient, type Producer, RETRY_FACTOR_PRODUCER, RETRY_INITIAL_TIME_MS, type StripDateIntersection, type TaskConfig, type TaskDefinition, type TaskFunction, antiCachePath, cliLog, compilerLog, createApi, createConsumptionApi, createProducerConfig, expressMiddleware, getClickhouseClient, getFileName, getKafkaClient, getKafkaProducer, getMooseClients, getMooseUtils, isValidCSVDelimiter, logError, mapTstoJs, mooseEnvSecrets, mooseRuntimeEnv, parseCSV, parseJSON, parseJSONWithDates };