@magemetrics/core 0.7.0 → 0.8.1

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/dist/index.d.ts CHANGED
@@ -1612,6 +1612,85 @@ declare interface operations {
1612
1612
  };
1613
1613
  };
1614
1614
  };
1615
+ getColumnLineage: {
1616
+ parameters: {
1617
+ query?: never;
1618
+ header: {
1619
+ "sp-access-token": string;
1620
+ };
1621
+ path?: never;
1622
+ cookie?: never;
1623
+ };
1624
+ requestBody: {
1625
+ content: {
1626
+ "application/json": {
1627
+ /** @description The report id */
1628
+ report_id: number;
1629
+ /** @description The column name to get lineage for */
1630
+ column_name: string;
1631
+ };
1632
+ };
1633
+ };
1634
+ responses: {
1635
+ /** @description Column lineage data */
1636
+ 200: {
1637
+ headers: {
1638
+ [name: string]: unknown;
1639
+ };
1640
+ content: {
1641
+ "application/json": {
1642
+ column_name: string;
1643
+ lineage: {
1644
+ nodes: {
1645
+ id: string;
1646
+ /** @enum {string} */
1647
+ type: "entity" | "attribute" | "filter" | "process" | "combine" | "result";
1648
+ explanation: string;
1649
+ }[];
1650
+ edges: {
1651
+ source: string;
1652
+ target: string;
1653
+ }[];
1654
+ };
1655
+ was_cached: boolean;
1656
+ };
1657
+ };
1658
+ };
1659
+ /** @description Invalid request - column not found in query results */
1660
+ 400: {
1661
+ headers: {
1662
+ [name: string]: unknown;
1663
+ };
1664
+ content: {
1665
+ "application/json": {
1666
+ error: string;
1667
+ };
1668
+ };
1669
+ };
1670
+ /** @description report not found */
1671
+ 404: {
1672
+ headers: {
1673
+ [name: string]: unknown;
1674
+ };
1675
+ content: {
1676
+ "application/json": {
1677
+ error: string;
1678
+ };
1679
+ };
1680
+ };
1681
+ /** @description Generation failed */
1682
+ 500: {
1683
+ headers: {
1684
+ [name: string]: unknown;
1685
+ };
1686
+ content: {
1687
+ "application/json": {
1688
+ error: string;
1689
+ };
1690
+ };
1691
+ };
1692
+ };
1693
+ };
1615
1694
  toggleBookmark: {
1616
1695
  parameters: {
1617
1696
  query?: never;
@@ -3096,6 +3175,79 @@ declare interface operations {
3096
3175
  };
3097
3176
  };
3098
3177
  };
3178
+ tablePreview: {
3179
+ parameters: {
3180
+ query?: never;
3181
+ header?: never;
3182
+ path: {
3183
+ tableId: string;
3184
+ };
3185
+ cookie?: never;
3186
+ };
3187
+ requestBody?: never;
3188
+ responses: {
3189
+ /** @description Table preview executed successfully */
3190
+ 200: {
3191
+ headers: {
3192
+ [name: string]: unknown;
3193
+ };
3194
+ content: {
3195
+ "application/json": {
3196
+ columns: {
3197
+ id: string;
3198
+ accessorKey: string;
3199
+ header: string;
3200
+ cell?: unknown;
3201
+ meta?: {
3202
+ [key: string]: unknown;
3203
+ };
3204
+ }[];
3205
+ data: {
3206
+ [key: string]: unknown;
3207
+ }[];
3208
+ metadata?: {
3209
+ wasSampled: boolean;
3210
+ originalCount: number;
3211
+ sampledCount: number;
3212
+ };
3213
+ };
3214
+ };
3215
+ };
3216
+ /** @description Invalid request */
3217
+ 400: {
3218
+ headers: {
3219
+ [name: string]: unknown;
3220
+ };
3221
+ content: {
3222
+ "application/json": {
3223
+ error: string;
3224
+ };
3225
+ };
3226
+ };
3227
+ /** @description Table not found */
3228
+ 404: {
3229
+ headers: {
3230
+ [name: string]: unknown;
3231
+ };
3232
+ content: {
3233
+ "application/json": {
3234
+ error: string;
3235
+ };
3236
+ };
3237
+ };
3238
+ /** @description Internal server error */
3239
+ 500: {
3240
+ headers: {
3241
+ [name: string]: unknown;
3242
+ };
3243
+ content: {
3244
+ "application/json": {
3245
+ error: string;
3246
+ };
3247
+ };
3248
+ };
3249
+ };
3250
+ };
3099
3251
  listSankeyUserFilters: {
3100
3252
  parameters: {
3101
3253
  query?: never;
@@ -3915,6 +4067,22 @@ declare interface paths {
3915
4067
  patch?: never;
3916
4068
  trace?: never;
3917
4069
  };
4070
+ "/api/v1/workflows/column_lineage": {
4071
+ parameters: {
4072
+ query?: never;
4073
+ header?: never;
4074
+ path?: never;
4075
+ cookie?: never;
4076
+ };
4077
+ get?: never;
4078
+ put?: never;
4079
+ post: operations["getColumnLineage"];
4080
+ delete?: never;
4081
+ options?: never;
4082
+ head?: never;
4083
+ patch?: never;
4084
+ trace?: never;
4085
+ };
3918
4086
  "/api/v1/timeline/bookmark": {
3919
4087
  parameters: {
3920
4088
  query?: never;
@@ -4315,6 +4483,22 @@ declare interface paths {
4315
4483
  patch?: never;
4316
4484
  trace?: never;
4317
4485
  };
4486
+ "/api/v1/admin-console/tables/{tableId}/preview": {
4487
+ parameters: {
4488
+ query?: never;
4489
+ header?: never;
4490
+ path?: never;
4491
+ cookie?: never;
4492
+ };
4493
+ get: operations["tablePreview"];
4494
+ put?: never;
4495
+ post?: never;
4496
+ delete?: never;
4497
+ options?: never;
4498
+ head?: never;
4499
+ patch?: never;
4500
+ trace?: never;
4501
+ };
4318
4502
  "/api/v1/admin-console/usage-insights/filters": {
4319
4503
  parameters: {
4320
4504
  query?: never;
package/dist/index.js CHANGED
@@ -57,7 +57,7 @@ var addApiKeyHeader = (apiKey) => {
57
57
 
58
58
  // package.json
59
59
  var package_default = {
60
- version: "0.7.0"};
60
+ version: "0.8.1"};
61
61
 
62
62
  // src/core/MageMetricsEventEmitter.ts
63
63
  var MageMetricsEventEmitter = class {
@@ -468,6 +468,8 @@ function getOpenApiConfiguration(refOrOpenapi, metadataOrOptions, options) {
468
468
  options: metadataOrOptions
469
469
  };
470
470
  }
471
+
472
+ // ../../node_modules/.pnpm/hono@4.11.1/node_modules/hono/dist/router/reg-exp-router/node.js
471
473
  new Set(".\\+*[^]$()");
472
474
  var createRoute = (routeConfig) => {
473
475
  const route = {
@@ -1594,6 +1596,85 @@ createRoute({
1594
1596
  }
1595
1597
  }
1596
1598
  });
1599
+ var ColumnLineageNodeSchema = z.object({
1600
+ id: z.string(),
1601
+ type: z.enum([
1602
+ "entity",
1603
+ "attribute",
1604
+ "filter",
1605
+ "process",
1606
+ "combine",
1607
+ "result"
1608
+ ]),
1609
+ explanation: z.string()
1610
+ });
1611
+ var ColumnLineageEdgeSchema = z.object({
1612
+ source: z.string(),
1613
+ target: z.string()
1614
+ });
1615
+ var ColumnLineageResponseSchema = z.object({
1616
+ column_name: z.string(),
1617
+ lineage: z.object({
1618
+ nodes: z.array(ColumnLineageNodeSchema),
1619
+ edges: z.array(ColumnLineageEdgeSchema)
1620
+ }),
1621
+ was_cached: z.boolean()
1622
+ });
1623
+ createRoute({
1624
+ method: "post",
1625
+ path: "/api/v1/workflows/column_lineage",
1626
+ operationId: "getColumnLineage",
1627
+ request: {
1628
+ headers: SupabaseHeaderSchema,
1629
+ body: {
1630
+ required: true,
1631
+ content: {
1632
+ "application/json": {
1633
+ schema: z.object({
1634
+ report_id: z.number().int().describe("The report id"),
1635
+ column_name: z.string().describe("The column name to get lineage for")
1636
+ })
1637
+ }
1638
+ }
1639
+ }
1640
+ },
1641
+ responses: {
1642
+ 200: {
1643
+ description: "Column lineage data",
1644
+ content: {
1645
+ "application/json": {
1646
+ schema: ColumnLineageResponseSchema
1647
+ }
1648
+ }
1649
+ },
1650
+ 400: {
1651
+ description: "Invalid request - column not found in query results",
1652
+ content: {
1653
+ "application/json": {
1654
+ schema: z.object({ error: z.string() })
1655
+ }
1656
+ }
1657
+ },
1658
+ 404: {
1659
+ description: "report not found",
1660
+ content: {
1661
+ "application/json": {
1662
+ schema: z.object({ error: z.string() })
1663
+ }
1664
+ }
1665
+ },
1666
+ 500: {
1667
+ description: "Generation failed",
1668
+ content: {
1669
+ "application/json": {
1670
+ schema: z.object({
1671
+ error: z.string()
1672
+ })
1673
+ }
1674
+ }
1675
+ }
1676
+ }
1677
+ });
1597
1678
  createRoute({
1598
1679
  method: "get",
1599
1680
  path: "/api/v1/data-reports/{report_id}",