@terrantula/sdk 0.2.0 → 0.3.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.
@@ -62,6 +62,14 @@ interface AdminSuspendResponse {
62
62
  id: string;
63
63
  suspendedAt: string | null;
64
64
  }
65
+ interface AdminMetricsOverview {
66
+ totalUsers: number;
67
+ signups24h: number;
68
+ signups7d: number;
69
+ signups30d: number;
70
+ activeSessions: number;
71
+ mauApprox: number;
72
+ }
65
73
 
66
74
  type SnapshotOp = 'created' | 'updated' | 'deleted' | 'unchanged' | 'failed';
67
75
 
@@ -103,4 +111,4 @@ interface TestConnectionResponse {
103
111
  error?: string;
104
112
  }
105
113
 
106
- export { type AuditExportConfigResponse as A, type ExportCatalogResult as E, type SnapshotOp as S, type TokenSource as T, type SchemaFn as a, type TestConnectionResponse as b, type AuditExportRunResponse as c, type AdminAuditListResponse as d, type AdminOrgListResponse as e, type AdminOrgDetail as f, type AdminSuspendResponse as g, type AdminAuditEvent as h, type AdminOrgMember as i, type AdminOrgProject as j, type AdminOrgSummary as k, TerrantulaError as l, withSchema as w };
114
+ export { type AuditExportConfigResponse as A, type ExportCatalogResult as E, type SnapshotOp as S, type TokenSource as T, type SchemaFn as a, type TestConnectionResponse as b, type AuditExportRunResponse as c, type AdminAuditListResponse as d, type AdminOrgListResponse as e, type AdminOrgDetail as f, type AdminSuspendResponse as g, type AdminMetricsOverview as h, type AdminAuditEvent as i, type AdminOrgMember as j, type AdminOrgProject as k, type AdminOrgSummary as l, TerrantulaError as m, withSchema as w };
@@ -62,6 +62,14 @@ interface AdminSuspendResponse {
62
62
  id: string;
63
63
  suspendedAt: string | null;
64
64
  }
65
+ interface AdminMetricsOverview {
66
+ totalUsers: number;
67
+ signups24h: number;
68
+ signups7d: number;
69
+ signups30d: number;
70
+ activeSessions: number;
71
+ mauApprox: number;
72
+ }
65
73
 
66
74
  type SnapshotOp = 'created' | 'updated' | 'deleted' | 'unchanged' | 'failed';
67
75
 
@@ -103,4 +111,4 @@ interface TestConnectionResponse {
103
111
  error?: string;
104
112
  }
105
113
 
106
- export { type AuditExportConfigResponse as A, type ExportCatalogResult as E, type SnapshotOp as S, type TokenSource as T, type SchemaFn as a, type TestConnectionResponse as b, type AuditExportRunResponse as c, type AdminAuditListResponse as d, type AdminOrgListResponse as e, type AdminOrgDetail as f, type AdminSuspendResponse as g, type AdminAuditEvent as h, type AdminOrgMember as i, type AdminOrgProject as j, type AdminOrgSummary as k, TerrantulaError as l, withSchema as w };
114
+ export { type AuditExportConfigResponse as A, type ExportCatalogResult as E, type SnapshotOp as S, type TokenSource as T, type SchemaFn as a, type TestConnectionResponse as b, type AuditExportRunResponse as c, type AdminAuditListResponse as d, type AdminOrgListResponse as e, type AdminOrgDetail as f, type AdminSuspendResponse as g, type AdminMetricsOverview as h, type AdminAuditEvent as i, type AdminOrgMember as j, type AdminOrgProject as k, type AdminOrgSummary as l, TerrantulaError as m, withSchema as w };
@@ -1619,6 +1619,19 @@ function createAdminClient(baseUrl, hcOpts) {
1619
1619
  })
1620
1620
  )
1621
1621
  )
1622
+ },
1623
+ metrics: {
1624
+ /**
1625
+ * GET /admin/metrics/overview
1626
+ * Cheap-counts overview for the control-plane dashboard. Six scalars,
1627
+ * all derived from single-table COUNT queries.
1628
+ */
1629
+ overview: withSchema(
1630
+ z18.object({}),
1631
+ async () => callRaw2(
1632
+ await rawRequest2(baseUrl, hcOpts, "/admin/metrics/overview")
1633
+ )
1634
+ )
1622
1635
  }
1623
1636
  };
1624
1637
  }
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as SnapshotOp, T as TokenSource, a as SchemaFn, A as AuditExportConfigResponse, b as TestConnectionResponse, c as AuditExportRunResponse, E as ExportCatalogResult, d as AdminAuditListResponse, e as AdminOrgListResponse, f as AdminOrgDetail, g as AdminSuspendResponse } from './audit-export-BtZTnt8a.mjs';
2
- export { h as AdminAuditEvent, i as AdminOrgMember, j as AdminOrgProject, k as AdminOrgSummary, l as TerrantulaError, w as withSchema } from './audit-export-BtZTnt8a.mjs';
1
+ import { S as SnapshotOp, T as TokenSource, a as SchemaFn, A as AuditExportConfigResponse, b as TestConnectionResponse, c as AuditExportRunResponse, E as ExportCatalogResult, d as AdminAuditListResponse, e as AdminOrgListResponse, f as AdminOrgDetail, g as AdminSuspendResponse, h as AdminMetricsOverview } from './audit-export-DweJuhQT.mjs';
2
+ export { i as AdminAuditEvent, j as AdminOrgMember, k as AdminOrgProject, l as AdminOrgSummary, m as TerrantulaError, w as withSchema } from './audit-export-DweJuhQT.mjs';
3
3
  import * as _terrantula_types from '@terrantula/types';
4
4
  import * as zod from 'zod';
5
5
  import * as hono_hono_base from 'hono/hono-base';
@@ -22816,6 +22816,9 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
22816
22816
  id: string;
22817
22817
  }>, AdminSuspendResponse>;
22818
22818
  };
22819
+ metrics: {
22820
+ overview: SchemaFn<zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>, AdminMetricsOverview>;
22821
+ };
22819
22822
  };
22820
22823
  } & {
22821
22824
  pools: {
@@ -23175,4 +23178,4 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
23175
23178
  };
23176
23179
  type TerrantulaCloudClient = ReturnType<typeof createClient>;
23177
23180
 
23178
- export { AdminAuditListResponse, AdminOrgDetail, AdminOrgListResponse, AdminSuspendResponse, AuditExportConfigResponse, AuditExportRunResponse, type CloudAppType, type CreateClientOptions, type ProjectAppType, SchemaFn, type TerrantulaCloudClient, TestConnectionResponse, TokenSource, createClient };
23181
+ export { AdminAuditListResponse, AdminMetricsOverview, AdminOrgDetail, AdminOrgListResponse, AdminSuspendResponse, AuditExportConfigResponse, AuditExportRunResponse, type CloudAppType, type CreateClientOptions, type ProjectAppType, SchemaFn, type TerrantulaCloudClient, TestConnectionResponse, TokenSource, createClient };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as SnapshotOp, T as TokenSource, a as SchemaFn, A as AuditExportConfigResponse, b as TestConnectionResponse, c as AuditExportRunResponse, E as ExportCatalogResult, d as AdminAuditListResponse, e as AdminOrgListResponse, f as AdminOrgDetail, g as AdminSuspendResponse } from './audit-export-BtZTnt8a.js';
2
- export { h as AdminAuditEvent, i as AdminOrgMember, j as AdminOrgProject, k as AdminOrgSummary, l as TerrantulaError, w as withSchema } from './audit-export-BtZTnt8a.js';
1
+ import { S as SnapshotOp, T as TokenSource, a as SchemaFn, A as AuditExportConfigResponse, b as TestConnectionResponse, c as AuditExportRunResponse, E as ExportCatalogResult, d as AdminAuditListResponse, e as AdminOrgListResponse, f as AdminOrgDetail, g as AdminSuspendResponse, h as AdminMetricsOverview } from './audit-export-DweJuhQT.js';
2
+ export { i as AdminAuditEvent, j as AdminOrgMember, k as AdminOrgProject, l as AdminOrgSummary, m as TerrantulaError, w as withSchema } from './audit-export-DweJuhQT.js';
3
3
  import * as _terrantula_types from '@terrantula/types';
4
4
  import * as zod from 'zod';
5
5
  import * as hono_hono_base from 'hono/hono-base';
@@ -22816,6 +22816,9 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
22816
22816
  id: string;
22817
22817
  }>, AdminSuspendResponse>;
22818
22818
  };
22819
+ metrics: {
22820
+ overview: SchemaFn<zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>, AdminMetricsOverview>;
22821
+ };
22819
22822
  };
22820
22823
  } & {
22821
22824
  pools: {
@@ -23175,4 +23178,4 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
23175
23178
  };
23176
23179
  type TerrantulaCloudClient = ReturnType<typeof createClient>;
23177
23180
 
23178
- export { AdminAuditListResponse, AdminOrgDetail, AdminOrgListResponse, AdminSuspendResponse, AuditExportConfigResponse, AuditExportRunResponse, type CloudAppType, type CreateClientOptions, type ProjectAppType, SchemaFn, type TerrantulaCloudClient, TestConnectionResponse, TokenSource, createClient };
23181
+ export { AdminAuditListResponse, AdminMetricsOverview, AdminOrgDetail, AdminOrgListResponse, AdminSuspendResponse, AuditExportConfigResponse, AuditExportRunResponse, type CloudAppType, type CreateClientOptions, type ProjectAppType, SchemaFn, type TerrantulaCloudClient, TestConnectionResponse, TokenSource, createClient };
package/dist/index.js CHANGED
@@ -1642,6 +1642,19 @@ function createAdminClient(baseUrl, hcOpts) {
1642
1642
  })
1643
1643
  )
1644
1644
  )
1645
+ },
1646
+ metrics: {
1647
+ /**
1648
+ * GET /admin/metrics/overview
1649
+ * Cheap-counts overview for the control-plane dashboard. Six scalars,
1650
+ * all derived from single-table COUNT queries.
1651
+ */
1652
+ overview: withSchema(
1653
+ import_zod18.z.object({}),
1654
+ async () => callRaw2(
1655
+ await rawRequest2(baseUrl, hcOpts, "/admin/metrics/overview")
1656
+ )
1657
+ )
1645
1658
  }
1646
1659
  };
1647
1660
  }
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  TerrantulaError,
3
3
  createClient,
4
4
  withSchema
5
- } from "./chunk-WYOV3M2X.mjs";
5
+ } from "./chunk-WQORVQWY.mjs";
6
6
  export {
7
7
  TerrantulaError,
8
8
  createClient,
package/dist/local.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as SchemaFn, S as SnapshotOp, A as AuditExportConfigResponse, b as TestConnectionResponse, c as AuditExportRunResponse, E as ExportCatalogResult, d as AdminAuditListResponse, e as AdminOrgListResponse, f as AdminOrgDetail, g as AdminSuspendResponse } from './audit-export-BtZTnt8a.mjs';
1
+ import { a as SchemaFn, S as SnapshotOp, A as AuditExportConfigResponse, b as TestConnectionResponse, c as AuditExportRunResponse, E as ExportCatalogResult, d as AdminAuditListResponse, e as AdminOrgListResponse, f as AdminOrgDetail, g as AdminSuspendResponse, h as AdminMetricsOverview } from './audit-export-DweJuhQT.mjs';
2
2
  import * as _terrantula_types from '@terrantula/types';
3
3
  import * as hono_utils_types from 'hono/utils/types';
4
4
  import * as zod from 'zod';
@@ -16748,6 +16748,9 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
16748
16748
  id: string;
16749
16749
  }>, AdminSuspendResponse>;
16750
16750
  };
16751
+ metrics: {
16752
+ overview: SchemaFn<zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>, AdminMetricsOverview>;
16753
+ };
16751
16754
  };
16752
16755
  } & {
16753
16756
  pools: {
package/dist/local.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as SchemaFn, S as SnapshotOp, A as AuditExportConfigResponse, b as TestConnectionResponse, c as AuditExportRunResponse, E as ExportCatalogResult, d as AdminAuditListResponse, e as AdminOrgListResponse, f as AdminOrgDetail, g as AdminSuspendResponse } from './audit-export-BtZTnt8a.js';
1
+ import { a as SchemaFn, S as SnapshotOp, A as AuditExportConfigResponse, b as TestConnectionResponse, c as AuditExportRunResponse, E as ExportCatalogResult, d as AdminAuditListResponse, e as AdminOrgListResponse, f as AdminOrgDetail, g as AdminSuspendResponse, h as AdminMetricsOverview } from './audit-export-DweJuhQT.js';
2
2
  import * as _terrantula_types from '@terrantula/types';
3
3
  import * as hono_utils_types from 'hono/utils/types';
4
4
  import * as zod from 'zod';
@@ -16748,6 +16748,9 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
16748
16748
  id: string;
16749
16749
  }>, AdminSuspendResponse>;
16750
16750
  };
16751
+ metrics: {
16752
+ overview: SchemaFn<zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>, AdminMetricsOverview>;
16753
+ };
16751
16754
  };
16752
16755
  } & {
16753
16756
  pools: {
package/dist/local.js CHANGED
@@ -1642,6 +1642,19 @@ function createAdminClient(baseUrl, hcOpts) {
1642
1642
  })
1643
1643
  )
1644
1644
  )
1645
+ },
1646
+ metrics: {
1647
+ /**
1648
+ * GET /admin/metrics/overview
1649
+ * Cheap-counts overview for the control-plane dashboard. Six scalars,
1650
+ * all derived from single-table COUNT queries.
1651
+ */
1652
+ overview: withSchema(
1653
+ import_zod18.z.object({}),
1654
+ async () => callRaw2(
1655
+ await rawRequest2(baseUrl, hcOpts, "/admin/metrics/overview")
1656
+ )
1657
+ )
1645
1658
  }
1646
1659
  };
1647
1660
  }
package/dist/local.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createClient
3
- } from "./chunk-WYOV3M2X.mjs";
3
+ } from "./chunk-WQORVQWY.mjs";
4
4
 
5
5
  // src/local.ts
6
6
  import { createLocalApp, openLocalDb } from "@terrantula/local";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terrantula/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "TypeScript SDK for Terrantula — the multi-tenant entity-graph control plane that herds Terraform/OpenTofu cattle.",
5
5
  "keywords": [
6
6
  "terrantula",