@terrantula/sdk 0.5.0 → 0.5.2

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.
@@ -87,6 +87,26 @@ interface AdminGitHubInstallation {
87
87
  interface AdminGitHubInstallationListResponse {
88
88
  data: AdminGitHubInstallation[];
89
89
  }
90
+ interface AdminProjectNukeResponse {
91
+ projectId: string;
92
+ rowCountsDeleted: {
93
+ entities: number;
94
+ entityMetricValues: number;
95
+ relationships: number;
96
+ actionRuns: number;
97
+ cells: number;
98
+ relationshipTypes: number;
99
+ actions: number;
100
+ entityTypes: number;
101
+ catalogRevisions: number;
102
+ applyHunkSnapshots: number;
103
+ auditEvents: number;
104
+ driftEvents: number;
105
+ driftProposals: number;
106
+ importSources: number;
107
+ secrets: number;
108
+ };
109
+ }
90
110
 
91
111
  type SnapshotOp = 'created' | 'updated' | 'deleted' | 'unchanged' | 'failed';
92
112
 
@@ -128,4 +148,4 @@ interface TestConnectionResponse {
128
148
  error?: string;
129
149
  }
130
150
 
131
- 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 AdminGitHubInstallationListResponse as i, type AdminAuditEvent as j, type AdminGitHubInstallation as k, type AdminOrgMember as l, type AdminOrgProject as m, type AdminOrgSummary as n, TerrantulaError as o, withSchema as w };
151
+ 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 AdminProjectNukeResponse as h, type AdminMetricsOverview as i, type AdminGitHubInstallationListResponse as j, type AdminAuditEvent as k, type AdminGitHubInstallation as l, type AdminOrgMember as m, type AdminOrgProject as n, type AdminOrgSummary as o, TerrantulaError as p, withSchema as w };
@@ -87,6 +87,26 @@ interface AdminGitHubInstallation {
87
87
  interface AdminGitHubInstallationListResponse {
88
88
  data: AdminGitHubInstallation[];
89
89
  }
90
+ interface AdminProjectNukeResponse {
91
+ projectId: string;
92
+ rowCountsDeleted: {
93
+ entities: number;
94
+ entityMetricValues: number;
95
+ relationships: number;
96
+ actionRuns: number;
97
+ cells: number;
98
+ relationshipTypes: number;
99
+ actions: number;
100
+ entityTypes: number;
101
+ catalogRevisions: number;
102
+ applyHunkSnapshots: number;
103
+ auditEvents: number;
104
+ driftEvents: number;
105
+ driftProposals: number;
106
+ importSources: number;
107
+ secrets: number;
108
+ };
109
+ }
90
110
 
91
111
  type SnapshotOp = 'created' | 'updated' | 'deleted' | 'unchanged' | 'failed';
92
112
 
@@ -128,4 +148,4 @@ interface TestConnectionResponse {
128
148
  error?: string;
129
149
  }
130
150
 
131
- 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 AdminGitHubInstallationListResponse as i, type AdminAuditEvent as j, type AdminGitHubInstallation as k, type AdminOrgMember as l, type AdminOrgProject as m, type AdminOrgSummary as n, TerrantulaError as o, withSchema as w };
151
+ 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 AdminProjectNukeResponse as h, type AdminMetricsOverview as i, type AdminGitHubInstallationListResponse as j, type AdminAuditEvent as k, type AdminGitHubInstallation as l, type AdminOrgMember as m, type AdminOrgProject as n, type AdminOrgSummary as o, TerrantulaError as p, withSchema as w };
@@ -1629,6 +1629,25 @@ function createAdminClient(baseUrl, hcOpts) {
1629
1629
  )
1630
1630
  )
1631
1631
  },
1632
+ projects: {
1633
+ /**
1634
+ * DELETE /admin/projects/:projectId/nuke
1635
+ * Wipe all project-scoped runtime + catalog rows for the target
1636
+ * project. Preserves the project row, members, github repo links,
1637
+ * api tokens, and environments. Idempotent. Super-admin only.
1638
+ */
1639
+ nuke: withSchema(
1640
+ z18.object({ projectId: z18.string().describe("Project ID to nuke") }),
1641
+ async (params) => callRaw2(
1642
+ await rawRequest2(
1643
+ baseUrl,
1644
+ hcOpts,
1645
+ `/admin/projects/${encodeURIComponent(params.projectId)}/nuke`,
1646
+ { method: "DELETE" }
1647
+ )
1648
+ )
1649
+ )
1650
+ },
1632
1651
  metrics: {
1633
1652
  /**
1634
1653
  * GET /admin/metrics/overview
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, h as AdminMetricsOverview, i as AdminGitHubInstallationListResponse } from './audit-export-B3I2Y03n.mjs';
2
- export { j as AdminAuditEvent, k as AdminGitHubInstallation, l as AdminOrgMember, m as AdminOrgProject, n as AdminOrgSummary, o as TerrantulaError, w as withSchema } from './audit-export-B3I2Y03n.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 AdminProjectNukeResponse, i as AdminMetricsOverview, j as AdminGitHubInstallationListResponse } from './audit-export-D9TTRZOB.mjs';
2
+ export { k as AdminAuditEvent, l as AdminGitHubInstallation, m as AdminOrgMember, n as AdminOrgProject, o as AdminOrgSummary, p as TerrantulaError, w as withSchema } from './audit-export-D9TTRZOB.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';
@@ -22808,6 +22808,15 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
22808
22808
  id: string;
22809
22809
  }>, AdminSuspendResponse>;
22810
22810
  };
22811
+ projects: {
22812
+ nuke: SchemaFn<zod.ZodObject<{
22813
+ projectId: zod.ZodString;
22814
+ }, "strip", zod.ZodTypeAny, {
22815
+ projectId: string;
22816
+ }, {
22817
+ projectId: string;
22818
+ }>, AdminProjectNukeResponse>;
22819
+ };
22811
22820
  metrics: {
22812
22821
  overview: SchemaFn<zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>, AdminMetricsOverview>;
22813
22822
  };
@@ -23175,4 +23184,4 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
23175
23184
  };
23176
23185
  type TerrantulaCloudClient = ReturnType<typeof createClient>;
23177
23186
 
23178
- export { AdminAuditListResponse, AdminGitHubInstallationListResponse, AdminMetricsOverview, AdminOrgDetail, AdminOrgListResponse, AdminSuspendResponse, AuditExportConfigResponse, AuditExportRunResponse, type CloudAppType, type CreateClientOptions, type ProjectAppType, SchemaFn, type TerrantulaCloudClient, TestConnectionResponse, TokenSource, createClient };
23187
+ export { AdminAuditListResponse, AdminGitHubInstallationListResponse, AdminMetricsOverview, AdminOrgDetail, AdminOrgListResponse, AdminProjectNukeResponse, 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, h as AdminMetricsOverview, i as AdminGitHubInstallationListResponse } from './audit-export-B3I2Y03n.js';
2
- export { j as AdminAuditEvent, k as AdminGitHubInstallation, l as AdminOrgMember, m as AdminOrgProject, n as AdminOrgSummary, o as TerrantulaError, w as withSchema } from './audit-export-B3I2Y03n.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 AdminProjectNukeResponse, i as AdminMetricsOverview, j as AdminGitHubInstallationListResponse } from './audit-export-D9TTRZOB.js';
2
+ export { k as AdminAuditEvent, l as AdminGitHubInstallation, m as AdminOrgMember, n as AdminOrgProject, o as AdminOrgSummary, p as TerrantulaError, w as withSchema } from './audit-export-D9TTRZOB.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';
@@ -22808,6 +22808,15 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
22808
22808
  id: string;
22809
22809
  }>, AdminSuspendResponse>;
22810
22810
  };
22811
+ projects: {
22812
+ nuke: SchemaFn<zod.ZodObject<{
22813
+ projectId: zod.ZodString;
22814
+ }, "strip", zod.ZodTypeAny, {
22815
+ projectId: string;
22816
+ }, {
22817
+ projectId: string;
22818
+ }>, AdminProjectNukeResponse>;
22819
+ };
22811
22820
  metrics: {
22812
22821
  overview: SchemaFn<zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>, AdminMetricsOverview>;
22813
22822
  };
@@ -23175,4 +23184,4 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
23175
23184
  };
23176
23185
  type TerrantulaCloudClient = ReturnType<typeof createClient>;
23177
23186
 
23178
- export { AdminAuditListResponse, AdminGitHubInstallationListResponse, AdminMetricsOverview, AdminOrgDetail, AdminOrgListResponse, AdminSuspendResponse, AuditExportConfigResponse, AuditExportRunResponse, type CloudAppType, type CreateClientOptions, type ProjectAppType, SchemaFn, type TerrantulaCloudClient, TestConnectionResponse, TokenSource, createClient };
23187
+ export { AdminAuditListResponse, AdminGitHubInstallationListResponse, AdminMetricsOverview, AdminOrgDetail, AdminOrgListResponse, AdminProjectNukeResponse, AdminSuspendResponse, AuditExportConfigResponse, AuditExportRunResponse, type CloudAppType, type CreateClientOptions, type ProjectAppType, SchemaFn, type TerrantulaCloudClient, TestConnectionResponse, TokenSource, createClient };
package/dist/index.js CHANGED
@@ -1652,6 +1652,25 @@ function createAdminClient(baseUrl, hcOpts) {
1652
1652
  )
1653
1653
  )
1654
1654
  },
1655
+ projects: {
1656
+ /**
1657
+ * DELETE /admin/projects/:projectId/nuke
1658
+ * Wipe all project-scoped runtime + catalog rows for the target
1659
+ * project. Preserves the project row, members, github repo links,
1660
+ * api tokens, and environments. Idempotent. Super-admin only.
1661
+ */
1662
+ nuke: withSchema(
1663
+ import_zod18.z.object({ projectId: import_zod18.z.string().describe("Project ID to nuke") }),
1664
+ async (params) => callRaw2(
1665
+ await rawRequest2(
1666
+ baseUrl,
1667
+ hcOpts,
1668
+ `/admin/projects/${encodeURIComponent(params.projectId)}/nuke`,
1669
+ { method: "DELETE" }
1670
+ )
1671
+ )
1672
+ )
1673
+ },
1655
1674
  metrics: {
1656
1675
  /**
1657
1676
  * GET /admin/metrics/overview
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  TerrantulaError,
3
3
  createClient,
4
4
  withSchema
5
- } from "./chunk-H6TVESFB.mjs";
5
+ } from "./chunk-UKBDIIOX.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, h as AdminMetricsOverview, i as AdminGitHubInstallationListResponse } from './audit-export-B3I2Y03n.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 AdminProjectNukeResponse, i as AdminMetricsOverview, j as AdminGitHubInstallationListResponse } from './audit-export-D9TTRZOB.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';
@@ -16876,6 +16876,15 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
16876
16876
  id: string;
16877
16877
  }>, AdminSuspendResponse>;
16878
16878
  };
16879
+ projects: {
16880
+ nuke: SchemaFn<zod.ZodObject<{
16881
+ projectId: zod.ZodString;
16882
+ }, "strip", zod.ZodTypeAny, {
16883
+ projectId: string;
16884
+ }, {
16885
+ projectId: string;
16886
+ }>, AdminProjectNukeResponse>;
16887
+ };
16879
16888
  metrics: {
16880
16889
  overview: SchemaFn<zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>, AdminMetricsOverview>;
16881
16890
  };
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, h as AdminMetricsOverview, i as AdminGitHubInstallationListResponse } from './audit-export-B3I2Y03n.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 AdminProjectNukeResponse, i as AdminMetricsOverview, j as AdminGitHubInstallationListResponse } from './audit-export-D9TTRZOB.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';
@@ -16876,6 +16876,15 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
16876
16876
  id: string;
16877
16877
  }>, AdminSuspendResponse>;
16878
16878
  };
16879
+ projects: {
16880
+ nuke: SchemaFn<zod.ZodObject<{
16881
+ projectId: zod.ZodString;
16882
+ }, "strip", zod.ZodTypeAny, {
16883
+ projectId: string;
16884
+ }, {
16885
+ projectId: string;
16886
+ }>, AdminProjectNukeResponse>;
16887
+ };
16879
16888
  metrics: {
16880
16889
  overview: SchemaFn<zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>, AdminMetricsOverview>;
16881
16890
  };
package/dist/local.js CHANGED
@@ -1652,6 +1652,25 @@ function createAdminClient(baseUrl, hcOpts) {
1652
1652
  )
1653
1653
  )
1654
1654
  },
1655
+ projects: {
1656
+ /**
1657
+ * DELETE /admin/projects/:projectId/nuke
1658
+ * Wipe all project-scoped runtime + catalog rows for the target
1659
+ * project. Preserves the project row, members, github repo links,
1660
+ * api tokens, and environments. Idempotent. Super-admin only.
1661
+ */
1662
+ nuke: withSchema(
1663
+ import_zod18.z.object({ projectId: import_zod18.z.string().describe("Project ID to nuke") }),
1664
+ async (params) => callRaw2(
1665
+ await rawRequest2(
1666
+ baseUrl,
1667
+ hcOpts,
1668
+ `/admin/projects/${encodeURIComponent(params.projectId)}/nuke`,
1669
+ { method: "DELETE" }
1670
+ )
1671
+ )
1672
+ )
1673
+ },
1655
1674
  metrics: {
1656
1675
  /**
1657
1676
  * GET /admin/metrics/overview
package/dist/local.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createClient
3
- } from "./chunk-H6TVESFB.mjs";
3
+ } from "./chunk-UKBDIIOX.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.5.0",
3
+ "version": "0.5.2",
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",
@@ -32,7 +32,6 @@
32
32
  ],
33
33
  "exports": {
34
34
  ".": {
35
- "bun": "./src/index.ts",
36
35
  "import": {
37
36
  "types": "./dist/index.d.mts",
38
37
  "default": "./dist/index.mjs"
@@ -43,7 +42,6 @@
43
42
  }
44
43
  },
45
44
  "./local": {
46
- "bun": "./src/local.ts",
47
45
  "import": {
48
46
  "types": "./dist/local.d.mts",
49
47
  "default": "./dist/local.mjs"
@@ -62,8 +60,8 @@
62
60
  "test": "bun test"
63
61
  },
64
62
  "dependencies": {
65
- "@terrantula/local": "^0.0.4",
66
- "@terrantula/types": "^0.1.0",
63
+ "@terrantula/local": "^0.0.6",
64
+ "@terrantula/types": "^0.1.1",
67
65
  "hono": "^4.4.0",
68
66
  "zod": "^3.22.0"
69
67
  },