@terrantula/sdk 0.12.0 → 0.14.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.
package/dist/index.js CHANGED
@@ -739,6 +739,18 @@ function createDeploymentTargetSetsClient(proj) {
739
739
  param: { name: params.name }
740
740
  })
741
741
  )
742
+ ),
743
+ listMembers: withSchema(
744
+ import_zod5.z.object({
745
+ orgId: import_zod5.z.string().describe("Organization slug"),
746
+ projectId: import_zod5.z.string().describe("Project ID"),
747
+ name: import_zod5.z.string().describe("Deployment target set name")
748
+ }),
749
+ (params) => call(
750
+ proj(params.orgId, params.projectId)["deployment-target-sets"][":name"]["members"].$get({
751
+ param: { name: params.name }
752
+ })
753
+ )
742
754
  )
743
755
  };
744
756
  }
@@ -1186,13 +1198,73 @@ function createApplyClient(projEnv) {
1186
1198
  );
1187
1199
  }
1188
1200
 
1189
- // src/github.ts
1201
+ // src/observations.ts
1190
1202
  var import_zod10 = require("zod");
1203
+ var import_types8 = require("@terrantula/types");
1204
+ async function rawRequest(baseUrl, hcOpts, path, init = {}) {
1205
+ const fetchImpl = hcOpts?.fetch ?? fetch;
1206
+ const rawHeaders = hcOpts?.headers;
1207
+ const resolvedHeaders = typeof rawHeaders === "function" ? await rawHeaders() : rawHeaders ?? {};
1208
+ return fetchImpl(`${baseUrl}${path}`, {
1209
+ ...init,
1210
+ headers: {
1211
+ ...resolvedHeaders,
1212
+ ...init.headers
1213
+ }
1214
+ });
1215
+ }
1216
+ async function callRaw(res) {
1217
+ if (!res.ok) {
1218
+ let message = fallbackMessage(res.status);
1219
+ try {
1220
+ const body = await res.json();
1221
+ if (body.error) message = body.error;
1222
+ } catch {
1223
+ }
1224
+ throw new TerrantulaError(res.status, { error: message });
1225
+ }
1226
+ return res.json();
1227
+ }
1228
+ function createObservationsClient(baseUrl, hcOpts) {
1229
+ return {
1230
+ /**
1231
+ * POST /{orgId}/{projectId}/envs/{envName}/import
1232
+ *
1233
+ * Persists a full observation snapshot (resources + dependency edges)
1234
+ * for a given environment. Requires `data:write` permission.
1235
+ */
1236
+ importPayload: withSchema(
1237
+ import_types8.ObservationImportPayloadSchema.extend({
1238
+ orgId: import_zod10.z.string().describe("Organization slug"),
1239
+ projectId: import_zod10.z.string().describe("Project ID"),
1240
+ envName: import_zod10.z.string().describe("Environment name")
1241
+ }),
1242
+ async (params) => {
1243
+ const { orgId, projectId, envName, ...body } = params;
1244
+ return callRaw(
1245
+ await rawRequest(
1246
+ baseUrl,
1247
+ hcOpts,
1248
+ `/${orgId}/${projectId}/envs/${envName}/import`,
1249
+ {
1250
+ method: "POST",
1251
+ headers: { "Content-Type": "application/json" },
1252
+ body: JSON.stringify(body)
1253
+ }
1254
+ )
1255
+ );
1256
+ }
1257
+ )
1258
+ };
1259
+ }
1260
+
1261
+ // src/github.ts
1262
+ var import_zod11 = require("zod");
1191
1263
  function createGithubClient(cloud, _baseUrl, _hcOpts) {
1192
1264
  return {
1193
1265
  connect: withSchema(
1194
- import_zod10.z.object({
1195
- projectId: import_zod10.z.string().describe("Project name")
1266
+ import_zod11.z.object({
1267
+ projectId: import_zod11.z.string().describe("Project name")
1196
1268
  }),
1197
1269
  // why: the install-url route has a "GitHub App not configured" branch
1198
1270
  // that returns a bare `new Response(...)` (see notConfiguredResponse in
@@ -1202,14 +1274,14 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
1202
1274
  ),
1203
1275
  installations: {
1204
1276
  list: withSchema(
1205
- import_zod10.z.object({
1206
- orgId: import_zod10.z.string().describe("Organization slug")
1277
+ import_zod11.z.object({
1278
+ orgId: import_zod11.z.string().describe("Organization slug")
1207
1279
  }),
1208
1280
  (params) => call(cloud.github.installations.$get({ query: params }))
1209
1281
  ),
1210
1282
  repos: withSchema(
1211
- import_zod10.z.object({
1212
- installationId: import_zod10.z.string().describe("Installation row ID")
1283
+ import_zod11.z.object({
1284
+ installationId: import_zod11.z.string().describe("Installation row ID")
1213
1285
  }),
1214
1286
  (params) => call(
1215
1287
  cloud.github.installations[":installationId"].repos.$get({
@@ -1218,8 +1290,8 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
1218
1290
  )
1219
1291
  ),
1220
1292
  disconnect: withSchema(
1221
- import_zod10.z.object({
1222
- installationId: import_zod10.z.string().describe("Installation row ID")
1293
+ import_zod11.z.object({
1294
+ installationId: import_zod11.z.string().describe("Installation row ID")
1223
1295
  }),
1224
1296
  (params) => call(
1225
1297
  cloud.github.installations[":installationId"].$delete({
@@ -1228,9 +1300,9 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
1228
1300
  )
1229
1301
  ),
1230
1302
  recover: withSchema(
1231
- import_zod10.z.object({
1232
- orgId: import_zod10.z.string().describe("Organization slug"),
1233
- installationId: import_zod10.z.number().int().positive().describe("GitHub installation ID (from the GitHub install URL)")
1303
+ import_zod11.z.object({
1304
+ orgId: import_zod11.z.string().describe("Organization slug"),
1305
+ installationId: import_zod11.z.number().int().positive().describe("GitHub installation ID (from the GitHub install URL)")
1234
1306
  }),
1235
1307
  // why: same bare-Response inference break as `connect` (the route's
1236
1308
  // not-configured branch returns `new Response(...)`), so the 200 body
@@ -1240,9 +1312,9 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
1240
1312
  },
1241
1313
  projects: {
1242
1314
  list: withSchema(
1243
- import_zod10.z.object({
1244
- orgId: import_zod10.z.string().describe("Organization slug"),
1245
- projectId: import_zod10.z.string().describe("Project name")
1315
+ import_zod11.z.object({
1316
+ orgId: import_zod11.z.string().describe("Organization slug"),
1317
+ projectId: import_zod11.z.string().describe("Project name")
1246
1318
  }),
1247
1319
  (params) => call(
1248
1320
  cloud.orgs[":orgId"].projects[":projectId"]["github-repos"].$get({
@@ -1251,11 +1323,11 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
1251
1323
  )
1252
1324
  ),
1253
1325
  linkRepo: withSchema(
1254
- import_zod10.z.object({
1255
- orgId: import_zod10.z.string().describe("Organization slug"),
1256
- projectId: import_zod10.z.string().describe("Project name"),
1257
- installationId: import_zod10.z.string().describe("github_installations.id (UUID)"),
1258
- repoFullName: import_zod10.z.string().describe('GitHub repo "owner/name"')
1326
+ import_zod11.z.object({
1327
+ orgId: import_zod11.z.string().describe("Organization slug"),
1328
+ projectId: import_zod11.z.string().describe("Project name"),
1329
+ installationId: import_zod11.z.string().describe("github_installations.id (UUID)"),
1330
+ repoFullName: import_zod11.z.string().describe('GitHub repo "owner/name"')
1259
1331
  }),
1260
1332
  (params) => {
1261
1333
  const { orgId, projectId, ...body } = params;
@@ -1268,10 +1340,10 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
1268
1340
  }
1269
1341
  ),
1270
1342
  unlinkRepo: withSchema(
1271
- import_zod10.z.object({
1272
- orgId: import_zod10.z.string().describe("Organization slug"),
1273
- projectId: import_zod10.z.string().describe("Project name"),
1274
- id: import_zod10.z.string().describe("project_github_repos.id (UUID) \u2014 returned by linkRepo")
1343
+ import_zod11.z.object({
1344
+ orgId: import_zod11.z.string().describe("Organization slug"),
1345
+ projectId: import_zod11.z.string().describe("Project name"),
1346
+ id: import_zod11.z.string().describe("project_github_repos.id (UUID) \u2014 returned by linkRepo")
1275
1347
  }),
1276
1348
  (params) => call(
1277
1349
  cloud.orgs[":orgId"].projects[":projectId"]["github-repos"][":id"].$delete({
@@ -1284,23 +1356,23 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
1284
1356
  }
1285
1357
 
1286
1358
  // src/blueprints.ts
1287
- var import_zod11 = require("zod");
1288
- var SpinInputSchema = import_zod11.z.object({
1289
- orgId: import_zod11.z.string().describe("Organization slug"),
1290
- blueprint: import_zod11.z.string().describe("First-party blueprint name (e.g. k8s-fleet)"),
1291
- substrate: import_zod11.z.enum(["bare-tf", "tfc", "atmos"]).optional(),
1292
- repo: import_zod11.z.string().optional().describe("owner/repo to open the spin PR into (omit when createRepo is set)"),
1293
- prBase: import_zod11.z.string().optional(),
1294
- githubToken: import_zod11.z.string().optional(),
1295
- createRepo: import_zod11.z.object({ name: import_zod11.z.string(), private: import_zod11.z.boolean().optional() }).optional().describe("Cloud opt-in: auto-create the target GitHub repo before spinning"),
1296
- createWorkspace: import_zod11.z.object({ organization: import_zod11.z.string(), name: import_zod11.z.string(), apiToken: import_zod11.z.string(), apiBaseUrl: import_zod11.z.string().optional() }).optional().describe("Cloud opt-in: auto-create the TFC workspace shell before spinning"),
1297
- vars: import_zod11.z.record(import_zod11.z.string()).default({})
1359
+ var import_zod12 = require("zod");
1360
+ var SpinInputSchema = import_zod12.z.object({
1361
+ orgId: import_zod12.z.string().describe("Organization slug"),
1362
+ blueprint: import_zod12.z.string().describe("First-party blueprint name (e.g. k8s-fleet)"),
1363
+ substrate: import_zod12.z.enum(["bare-tf", "tfc", "atmos"]).optional(),
1364
+ repo: import_zod12.z.string().optional().describe("owner/repo to open the spin PR into (omit when createRepo is set)"),
1365
+ prBase: import_zod12.z.string().optional(),
1366
+ githubToken: import_zod12.z.string().optional(),
1367
+ createRepo: import_zod12.z.object({ name: import_zod12.z.string(), private: import_zod12.z.boolean().optional() }).optional().describe("Cloud opt-in: auto-create the target GitHub repo before spinning"),
1368
+ createWorkspace: import_zod12.z.object({ organization: import_zod12.z.string(), name: import_zod12.z.string(), apiToken: import_zod12.z.string(), apiBaseUrl: import_zod12.z.string().optional() }).optional().describe("Cloud opt-in: auto-create the TFC workspace shell before spinning"),
1369
+ vars: import_zod12.z.record(import_zod12.z.string()).default({})
1298
1370
  });
1299
1371
  function createBlueprintsClient(cloud) {
1300
1372
  return {
1301
1373
  list: () => call(cloud.blueprints.$get()),
1302
1374
  get: withSchema(
1303
- import_zod11.z.object({ name: import_zod11.z.string().describe("Blueprint name") }),
1375
+ import_zod12.z.object({ name: import_zod12.z.string().describe("Blueprint name") }),
1304
1376
  (params) => call(cloud.blueprints[":name"].$get({ param: params }))
1305
1377
  ),
1306
1378
  spin: withSchema(SpinInputSchema, (params) => {
@@ -1311,7 +1383,7 @@ function createBlueprintsClient(cloud) {
1311
1383
  }
1312
1384
 
1313
1385
  // src/export.ts
1314
- var import_zod12 = require("zod");
1386
+ var import_zod13 = require("zod");
1315
1387
  var SERVER_FIELDS = /* @__PURE__ */ new Set(["id", "projectId", "envId", "createdAt", "updatedAt"]);
1316
1388
  function stripServerFields(row) {
1317
1389
  const out = {};
@@ -1322,10 +1394,10 @@ function stripServerFields(row) {
1322
1394
  }
1323
1395
  function createExportCatalogFn(proj, projEnv) {
1324
1396
  return withSchema(
1325
- import_zod12.z.object({
1326
- orgId: import_zod12.z.string().describe("Organization slug"),
1327
- projectId: import_zod12.z.string().describe("Project ID"),
1328
- envName: import_zod12.z.string().describe("Environment name to export secret declarations from")
1397
+ import_zod13.z.object({
1398
+ orgId: import_zod13.z.string().describe("Organization slug"),
1399
+ projectId: import_zod13.z.string().describe("Project ID"),
1400
+ envName: import_zod13.z.string().describe("Environment name to export secret declarations from")
1329
1401
  }).describe("Export every catalog kind as a single apply-shaped payload"),
1330
1402
  async (params) => {
1331
1403
  const projClient = proj(params.orgId, params.projectId);
@@ -1375,15 +1447,15 @@ function createExportCatalogFn(proj, projEnv) {
1375
1447
  }
1376
1448
 
1377
1449
  // src/catalog-revisions.ts
1378
- var import_zod13 = require("zod");
1450
+ var import_zod14 = require("zod");
1379
1451
  function createCatalogRevisionsClient(proj) {
1380
1452
  return {
1381
1453
  list: withSchema(
1382
- import_zod13.z.object({
1383
- orgId: import_zod13.z.string().describe("Organization slug"),
1384
- projectId: import_zod13.z.string().describe("Project ID"),
1385
- limit: import_zod13.z.coerce.number().int().min(1).max(200).optional().describe("Max revisions to return (1-200)"),
1386
- before: import_zod13.z.string().datetime().optional().describe("ISO timestamp; only revisions with appliedAt strictly before this are returned (keyset upper-bound)")
1454
+ import_zod14.z.object({
1455
+ orgId: import_zod14.z.string().describe("Organization slug"),
1456
+ projectId: import_zod14.z.string().describe("Project ID"),
1457
+ limit: import_zod14.z.coerce.number().int().min(1).max(200).optional().describe("Max revisions to return (1-200)"),
1458
+ before: import_zod14.z.string().datetime().optional().describe("ISO timestamp; only revisions with appliedAt strictly before this are returned (keyset upper-bound)")
1387
1459
  }),
1388
1460
  (params) => {
1389
1461
  const { orgId, projectId, ...query } = params;
@@ -1393,20 +1465,20 @@ function createCatalogRevisionsClient(proj) {
1393
1465
  }
1394
1466
  ),
1395
1467
  get: withSchema(
1396
- import_zod13.z.object({
1397
- orgId: import_zod13.z.string().describe("Organization slug"),
1398
- projectId: import_zod13.z.string().describe("Project ID"),
1399
- id: import_zod13.z.string().uuid().describe("Revision ID")
1468
+ import_zod14.z.object({
1469
+ orgId: import_zod14.z.string().describe("Organization slug"),
1470
+ projectId: import_zod14.z.string().describe("Project ID"),
1471
+ id: import_zod14.z.string().uuid().describe("Revision ID")
1400
1472
  }),
1401
1473
  (params) => call(
1402
1474
  proj(params.orgId, params.projectId)["catalog-revisions"][":id"].$get({ param: { id: params.id } })
1403
1475
  )
1404
1476
  ),
1405
1477
  snapshots: withSchema(
1406
- import_zod13.z.object({
1407
- orgId: import_zod13.z.string().describe("Organization slug"),
1408
- projectId: import_zod13.z.string().describe("Project ID"),
1409
- id: import_zod13.z.string().uuid().describe("Revision ID to read snapshots for")
1478
+ import_zod14.z.object({
1479
+ orgId: import_zod14.z.string().describe("Organization slug"),
1480
+ projectId: import_zod14.z.string().describe("Project ID"),
1481
+ id: import_zod14.z.string().uuid().describe("Revision ID to read snapshots for")
1410
1482
  }),
1411
1483
  (params) => call(
1412
1484
  proj(params.orgId, params.projectId)["catalog-revisions"][":id"]["snapshots"].$get({
@@ -1420,12 +1492,12 @@ function createCatalogRevisionsClient(proj) {
1420
1492
  * `force: true`, mirroring POST /apply.
1421
1493
  */
1422
1494
  rollback: withSchema(
1423
- import_zod13.z.object({
1424
- orgId: import_zod13.z.string().describe("Organization slug"),
1425
- projectId: import_zod13.z.string().describe("Project ID"),
1426
- id: import_zod13.z.string().uuid().describe("Revision ID to roll back to"),
1427
- hunkId: import_zod13.z.string().uuid().optional().describe("Single-hunk filter"),
1428
- force: import_zod13.z.boolean().optional().describe("Required if the inverse diff is destructive")
1495
+ import_zod14.z.object({
1496
+ orgId: import_zod14.z.string().describe("Organization slug"),
1497
+ projectId: import_zod14.z.string().describe("Project ID"),
1498
+ id: import_zod14.z.string().uuid().describe("Revision ID to roll back to"),
1499
+ hunkId: import_zod14.z.string().uuid().optional().describe("Single-hunk filter"),
1500
+ force: import_zod14.z.boolean().optional().describe("Required if the inverse diff is destructive")
1429
1501
  }),
1430
1502
  (params) => {
1431
1503
  const { orgId, projectId, id, hunkId, force } = params;
@@ -1442,21 +1514,21 @@ function createCatalogRevisionsClient(proj) {
1442
1514
  }
1443
1515
 
1444
1516
  // src/audit-events.ts
1445
- var import_zod14 = require("zod");
1517
+ var import_zod15 = require("zod");
1446
1518
  function createAuditEventsClient(proj) {
1447
1519
  return {
1448
1520
  list: withSchema(
1449
- import_zod14.z.object({
1450
- orgId: import_zod14.z.string().describe("Organization slug"),
1451
- projectId: import_zod14.z.string().describe("Project name"),
1452
- envName: import_zod14.z.string().optional().describe("Filter to a single env"),
1453
- actorType: import_zod14.z.enum(["user", "token"]).optional().describe("Filter by actor type"),
1454
- actorId: import_zod14.z.string().optional().describe("Filter by actor (user.id or apikey.id)"),
1455
- action: import_zod14.z.string().optional().describe('Comma-separated actions (e.g. "create,delete")'),
1456
- resourceKind: import_zod14.z.string().optional().describe("Filter to one resource kind (Entity | Token | Member | \u2026)"),
1457
- since: import_zod14.z.string().datetime().optional().describe("ISO timestamp; only events strictly after this are returned"),
1458
- before: import_zod14.z.string().datetime().optional().describe("ISO timestamp; only events strictly before this are returned (keyset upper-bound)"),
1459
- limit: import_zod14.z.coerce.number().int().min(1).max(500).optional().describe("Max rows (1-500)")
1521
+ import_zod15.z.object({
1522
+ orgId: import_zod15.z.string().describe("Organization slug"),
1523
+ projectId: import_zod15.z.string().describe("Project name"),
1524
+ envName: import_zod15.z.string().optional().describe("Filter to a single env"),
1525
+ actorType: import_zod15.z.enum(["user", "token"]).optional().describe("Filter by actor type"),
1526
+ actorId: import_zod15.z.string().optional().describe("Filter by actor (user.id or apikey.id)"),
1527
+ action: import_zod15.z.string().optional().describe('Comma-separated actions (e.g. "create,delete")'),
1528
+ resourceKind: import_zod15.z.string().optional().describe("Filter to one resource kind (Entity | Token | Member | \u2026)"),
1529
+ since: import_zod15.z.string().datetime().optional().describe("ISO timestamp; only events strictly after this are returned"),
1530
+ before: import_zod15.z.string().datetime().optional().describe("ISO timestamp; only events strictly before this are returned (keyset upper-bound)"),
1531
+ limit: import_zod15.z.coerce.number().int().min(1).max(500).optional().describe("Max rows (1-500)")
1460
1532
  }).describe("List audit events for a project \u2014 auditor-friendly read-only feed"),
1461
1533
  (params) => {
1462
1534
  const { orgId, projectId, ...query } = params;
@@ -1467,21 +1539,21 @@ function createAuditEventsClient(proj) {
1467
1539
  }
1468
1540
 
1469
1541
  // src/environments.ts
1470
- var import_zod15 = require("zod");
1542
+ var import_zod16 = require("zod");
1471
1543
  function createEnvironmentsClient(proj) {
1472
1544
  return {
1473
1545
  list: withSchema(
1474
- import_zod15.z.object({
1475
- orgId: import_zod15.z.string().describe("Organization slug"),
1476
- projectId: import_zod15.z.string().describe("Project name")
1546
+ import_zod16.z.object({
1547
+ orgId: import_zod16.z.string().describe("Organization slug"),
1548
+ projectId: import_zod16.z.string().describe("Project name")
1477
1549
  }),
1478
1550
  (params) => call(proj(params.orgId, params.projectId)["environments"].$get())
1479
1551
  ),
1480
1552
  create: withSchema(
1481
- import_zod15.z.object({
1482
- orgId: import_zod15.z.string().describe("Organization slug"),
1483
- projectId: import_zod15.z.string().describe("Project name"),
1484
- name: import_zod15.z.string().min(1).max(31).regex(/^[a-z0-9][a-z0-9-]{0,30}$/).describe("Environment name (lowercase letters, digits, hyphens; max 31 chars)")
1553
+ import_zod16.z.object({
1554
+ orgId: import_zod16.z.string().describe("Organization slug"),
1555
+ projectId: import_zod16.z.string().describe("Project name"),
1556
+ name: import_zod16.z.string().min(1).max(31).regex(/^[a-z0-9][a-z0-9-]{0,30}$/).describe("Environment name (lowercase letters, digits, hyphens; max 31 chars)")
1485
1557
  }),
1486
1558
  (params) => {
1487
1559
  const { orgId, projectId, name } = params;
@@ -1489,10 +1561,10 @@ function createEnvironmentsClient(proj) {
1489
1561
  }
1490
1562
  ),
1491
1563
  delete: withSchema(
1492
- import_zod15.z.object({
1493
- orgId: import_zod15.z.string().describe("Organization slug"),
1494
- projectId: import_zod15.z.string().describe("Project name"),
1495
- name: import_zod15.z.string().describe("Environment name")
1564
+ import_zod16.z.object({
1565
+ orgId: import_zod16.z.string().describe("Organization slug"),
1566
+ projectId: import_zod16.z.string().describe("Project name"),
1567
+ name: import_zod16.z.string().describe("Environment name")
1496
1568
  }),
1497
1569
  (params) => call(
1498
1570
  proj(params.orgId, params.projectId)["environments"][":envName"].$delete({
@@ -1504,20 +1576,20 @@ function createEnvironmentsClient(proj) {
1504
1576
  }
1505
1577
 
1506
1578
  // src/drift-events.ts
1507
- var import_zod16 = require("zod");
1579
+ var import_zod17 = require("zod");
1508
1580
  function createDriftEventsClient(projEnv) {
1509
1581
  return {
1510
1582
  list: withSchema(
1511
- import_zod16.z.object({
1512
- orgId: import_zod16.z.string().describe("Organization slug"),
1513
- projectId: import_zod16.z.string().describe("Project name"),
1514
- envName: import_zod16.z.string().describe("Environment name"),
1515
- status: import_zod16.z.enum(["open", "accepted", "reapplied", "snoozed"]).optional(),
1516
- kind: import_zod16.z.string().optional().describe("Filter by entity type name"),
1517
- entityName: import_zod16.z.string().optional().describe("Filter by entity name"),
1518
- since: import_zod16.z.string().optional().describe("ISO timestamp lower bound on detectedAt"),
1519
- before: import_zod16.z.string().datetime().optional().describe("ISO timestamp upper bound on detectedAt (keyset cursor)"),
1520
- limit: import_zod16.z.coerce.number().int().min(1).max(500).optional()
1583
+ import_zod17.z.object({
1584
+ orgId: import_zod17.z.string().describe("Organization slug"),
1585
+ projectId: import_zod17.z.string().describe("Project name"),
1586
+ envName: import_zod17.z.string().describe("Environment name"),
1587
+ status: import_zod17.z.enum(["open", "accepted", "reapplied", "snoozed"]).optional(),
1588
+ kind: import_zod17.z.string().optional().describe("Filter by entity type name"),
1589
+ entityName: import_zod17.z.string().optional().describe("Filter by entity name"),
1590
+ since: import_zod17.z.string().optional().describe("ISO timestamp lower bound on detectedAt"),
1591
+ before: import_zod17.z.string().datetime().optional().describe("ISO timestamp upper bound on detectedAt (keyset cursor)"),
1592
+ limit: import_zod17.z.coerce.number().int().min(1).max(500).optional()
1521
1593
  }),
1522
1594
  (params) => {
1523
1595
  const { orgId, projectId, envName, ...query } = params;
@@ -1527,19 +1599,19 @@ function createDriftEventsClient(projEnv) {
1527
1599
  }
1528
1600
  ),
1529
1601
  count: withSchema(
1530
- import_zod16.z.object({
1531
- orgId: import_zod16.z.string().describe("Organization slug"),
1532
- projectId: import_zod16.z.string().describe("Project name"),
1533
- envName: import_zod16.z.string().describe("Environment name")
1602
+ import_zod17.z.object({
1603
+ orgId: import_zod17.z.string().describe("Organization slug"),
1604
+ projectId: import_zod17.z.string().describe("Project name"),
1605
+ envName: import_zod17.z.string().describe("Environment name")
1534
1606
  }),
1535
1607
  (params) => call(projEnv(params.orgId, params.projectId, params.envName)["drift-events"].count.$get())
1536
1608
  ),
1537
1609
  get: withSchema(
1538
- import_zod16.z.object({
1539
- orgId: import_zod16.z.string().describe("Organization slug"),
1540
- projectId: import_zod16.z.string().describe("Project name"),
1541
- envName: import_zod16.z.string().describe("Environment name"),
1542
- id: import_zod16.z.string().uuid()
1610
+ import_zod17.z.object({
1611
+ orgId: import_zod17.z.string().describe("Organization slug"),
1612
+ projectId: import_zod17.z.string().describe("Project name"),
1613
+ envName: import_zod17.z.string().describe("Environment name"),
1614
+ id: import_zod17.z.string().uuid()
1543
1615
  }),
1544
1616
  (params) => call(
1545
1617
  projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].$get({
@@ -1548,11 +1620,11 @@ function createDriftEventsClient(projEnv) {
1548
1620
  )
1549
1621
  ),
1550
1622
  accept: withSchema(
1551
- import_zod16.z.object({
1552
- orgId: import_zod16.z.string().describe("Organization slug"),
1553
- projectId: import_zod16.z.string().describe("Project name"),
1554
- envName: import_zod16.z.string().describe("Environment name"),
1555
- id: import_zod16.z.string().uuid()
1623
+ import_zod17.z.object({
1624
+ orgId: import_zod17.z.string().describe("Organization slug"),
1625
+ projectId: import_zod17.z.string().describe("Project name"),
1626
+ envName: import_zod17.z.string().describe("Environment name"),
1627
+ id: import_zod17.z.string().uuid()
1556
1628
  }),
1557
1629
  (params) => call(
1558
1630
  projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].accept.$post({
@@ -1561,11 +1633,11 @@ function createDriftEventsClient(projEnv) {
1561
1633
  )
1562
1634
  ),
1563
1635
  reapply: withSchema(
1564
- import_zod16.z.object({
1565
- orgId: import_zod16.z.string().describe("Organization slug"),
1566
- projectId: import_zod16.z.string().describe("Project name"),
1567
- envName: import_zod16.z.string().describe("Environment name"),
1568
- id: import_zod16.z.string().uuid()
1636
+ import_zod17.z.object({
1637
+ orgId: import_zod17.z.string().describe("Organization slug"),
1638
+ projectId: import_zod17.z.string().describe("Project name"),
1639
+ envName: import_zod17.z.string().describe("Environment name"),
1640
+ id: import_zod17.z.string().uuid()
1569
1641
  }),
1570
1642
  (params) => call(
1571
1643
  projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].reapply.$post({
@@ -1574,12 +1646,12 @@ function createDriftEventsClient(projEnv) {
1574
1646
  )
1575
1647
  ),
1576
1648
  snooze: withSchema(
1577
- import_zod16.z.object({
1578
- orgId: import_zod16.z.string().describe("Organization slug"),
1579
- projectId: import_zod16.z.string().describe("Project name"),
1580
- envName: import_zod16.z.string().describe("Environment name"),
1581
- id: import_zod16.z.string().uuid(),
1582
- untilSeconds: import_zod16.z.number().int().positive().optional()
1649
+ import_zod17.z.object({
1650
+ orgId: import_zod17.z.string().describe("Organization slug"),
1651
+ projectId: import_zod17.z.string().describe("Project name"),
1652
+ envName: import_zod17.z.string().describe("Environment name"),
1653
+ id: import_zod17.z.string().uuid(),
1654
+ untilSeconds: import_zod17.z.number().int().positive().optional()
1583
1655
  }),
1584
1656
  (params) => call(
1585
1657
  projEnv(params.orgId, params.projectId, params.envName)["drift-events"][":id"].snooze.$post({
@@ -1591,16 +1663,64 @@ function createDriftEventsClient(projEnv) {
1591
1663
  };
1592
1664
  }
1593
1665
 
1666
+ // src/conformance-findings.ts
1667
+ var import_zod18 = require("zod");
1668
+ var import_types9 = require("@terrantula/types");
1669
+ function createConformanceFindingsClient(projEnv) {
1670
+ return {
1671
+ list: withSchema(
1672
+ import_zod18.z.object({
1673
+ orgId: import_zod18.z.string().describe("Organization slug"),
1674
+ projectId: import_zod18.z.string().describe("Project name"),
1675
+ envName: import_zod18.z.string().describe("Environment name"),
1676
+ status: import_types9.FindingStatusSchema.optional(),
1677
+ severity: import_types9.FindingSeveritySchema.optional(),
1678
+ kind: import_zod18.z.string().optional().describe("Filter by entity type name"),
1679
+ findingKind: import_zod18.z.string().optional().describe("Filter by finding kind (e.g. MISSING_REQUIRED_PROPERTY)"),
1680
+ entityName: import_zod18.z.string().optional().describe("Filter by entity name"),
1681
+ limit: import_zod18.z.coerce.number().int().min(1).max(500).optional()
1682
+ }),
1683
+ (params) => {
1684
+ const { orgId, projectId, envName, ...query } = params;
1685
+ return call(
1686
+ projEnv(orgId, projectId, envName)["conformance-findings"].$get({ query: stringifyQuery(query) })
1687
+ );
1688
+ }
1689
+ ),
1690
+ count: withSchema(
1691
+ import_zod18.z.object({
1692
+ orgId: import_zod18.z.string().describe("Organization slug"),
1693
+ projectId: import_zod18.z.string().describe("Project name"),
1694
+ envName: import_zod18.z.string().describe("Environment name")
1695
+ }),
1696
+ (params) => call(projEnv(params.orgId, params.projectId, params.envName)["conformance-findings"].count.$get())
1697
+ ),
1698
+ get: withSchema(
1699
+ import_zod18.z.object({
1700
+ orgId: import_zod18.z.string().describe("Organization slug"),
1701
+ projectId: import_zod18.z.string().describe("Project name"),
1702
+ envName: import_zod18.z.string().describe("Environment name"),
1703
+ id: import_zod18.z.string().uuid()
1704
+ }),
1705
+ (params) => call(
1706
+ projEnv(params.orgId, params.projectId, params.envName)["conformance-findings"][":id"].$get({
1707
+ param: { id: params.id }
1708
+ })
1709
+ )
1710
+ )
1711
+ };
1712
+ }
1713
+
1594
1714
  // src/stats.ts
1595
- var import_zod17 = require("zod");
1596
- var WindowSchema = import_zod17.z.enum(["1h", "24h", "7d"]).optional().describe("Time window \u2014 default 24h");
1597
- var BucketSchema = import_zod17.z.enum(["1m", "5m", "1h", "1d"]).optional().describe("Bucket granularity \u2014 default 1h");
1715
+ var import_zod19 = require("zod");
1716
+ var WindowSchema = import_zod19.z.enum(["1h", "24h", "7d"]).optional().describe("Time window \u2014 default 24h");
1717
+ var BucketSchema = import_zod19.z.enum(["1m", "5m", "1h", "1d"]).optional().describe("Bucket granularity \u2014 default 1h");
1598
1718
  function createStatsClient(proj) {
1599
1719
  return {
1600
1720
  entitiesByState: withSchema(
1601
- import_zod17.z.object({
1602
- orgId: import_zod17.z.string().describe("Organization slug"),
1603
- projectId: import_zod17.z.string().describe("Project name"),
1721
+ import_zod19.z.object({
1722
+ orgId: import_zod19.z.string().describe("Organization slug"),
1723
+ projectId: import_zod19.z.string().describe("Project name"),
1604
1724
  window: WindowSchema,
1605
1725
  bucket: BucketSchema
1606
1726
  }),
@@ -1610,9 +1730,9 @@ function createStatsClient(proj) {
1610
1730
  }
1611
1731
  ),
1612
1732
  runsByType: withSchema(
1613
- import_zod17.z.object({
1614
- orgId: import_zod17.z.string().describe("Organization slug"),
1615
- projectId: import_zod17.z.string().describe("Project name"),
1733
+ import_zod19.z.object({
1734
+ orgId: import_zod19.z.string().describe("Organization slug"),
1735
+ projectId: import_zod19.z.string().describe("Project name"),
1616
1736
  window: WindowSchema
1617
1737
  }),
1618
1738
  (params) => {
@@ -1621,9 +1741,9 @@ function createStatsClient(proj) {
1621
1741
  }
1622
1742
  ),
1623
1743
  failingKinds: withSchema(
1624
- import_zod17.z.object({
1625
- orgId: import_zod17.z.string().describe("Organization slug"),
1626
- projectId: import_zod17.z.string().describe("Project name"),
1744
+ import_zod19.z.object({
1745
+ orgId: import_zod19.z.string().describe("Organization slug"),
1746
+ projectId: import_zod19.z.string().describe("Project name"),
1627
1747
  window: WindowSchema
1628
1748
  }),
1629
1749
  (params) => {
@@ -1632,10 +1752,10 @@ function createStatsClient(proj) {
1632
1752
  }
1633
1753
  ),
1634
1754
  driftDensity: withSchema(
1635
- import_zod17.z.object({
1636
- orgId: import_zod17.z.string().describe("Organization slug"),
1637
- projectId: import_zod17.z.string().describe("Project name"),
1638
- dim: import_zod17.z.string().optional().describe('Dimensions to bucket \u2014 e.g. "kind,cell"')
1755
+ import_zod19.z.object({
1756
+ orgId: import_zod19.z.string().describe("Organization slug"),
1757
+ projectId: import_zod19.z.string().describe("Project name"),
1758
+ dim: import_zod19.z.string().optional().describe('Dimensions to bucket \u2014 e.g. "kind,cell"')
1639
1759
  }),
1640
1760
  (params) => {
1641
1761
  const { orgId, projectId, ...query } = params;
@@ -1646,34 +1766,34 @@ function createStatsClient(proj) {
1646
1766
  }
1647
1767
 
1648
1768
  // src/graph-views.ts
1649
- var import_zod18 = require("zod");
1650
- var ViewConfigSchema = import_zod18.z.unknown();
1651
- var PinnedPositionsSchema = import_zod18.z.record(import_zod18.z.string(), import_zod18.z.object({ x: import_zod18.z.number(), y: import_zod18.z.number() })).nullable();
1769
+ var import_zod20 = require("zod");
1770
+ var PinnedPositionsSchema = import_zod20.z.record(import_zod20.z.string(), import_zod20.z.object({ x: import_zod20.z.number(), y: import_zod20.z.number() })).nullable();
1771
+ var ViewSpecSchema = import_zod20.z.unknown().nullable();
1652
1772
  function createGraphViewsClient(proj) {
1653
1773
  return {
1654
1774
  list: withSchema(
1655
- import_zod18.z.object({
1656
- orgId: import_zod18.z.string().describe("Organization slug"),
1657
- projectId: import_zod18.z.string().describe("Project ID")
1775
+ import_zod20.z.object({
1776
+ orgId: import_zod20.z.string().describe("Organization slug"),
1777
+ projectId: import_zod20.z.string().describe("Project ID")
1658
1778
  }),
1659
1779
  (params) => call(proj(params.orgId, params.projectId)["graph-views"].$get())
1660
1780
  ),
1661
1781
  get: withSchema(
1662
- import_zod18.z.object({
1663
- orgId: import_zod18.z.string().describe("Organization slug"),
1664
- projectId: import_zod18.z.string().describe("Project ID"),
1665
- id: import_zod18.z.string().describe("View id")
1782
+ import_zod20.z.object({
1783
+ orgId: import_zod20.z.string().describe("Organization slug"),
1784
+ projectId: import_zod20.z.string().describe("Project ID"),
1785
+ id: import_zod20.z.string().describe("View id")
1666
1786
  }),
1667
1787
  (params) => call(proj(params.orgId, params.projectId)["graph-views"][":id"].$get({ param: { id: params.id } }))
1668
1788
  ),
1669
1789
  create: withSchema(
1670
- import_zod18.z.object({
1671
- orgId: import_zod18.z.string().describe("Organization slug"),
1672
- projectId: import_zod18.z.string().describe("Project ID"),
1673
- name: import_zod18.z.string().describe("View name"),
1674
- scope: import_zod18.z.enum(["user", "project"]).describe("Personal or project scope"),
1675
- config: ViewConfigSchema.describe("ViewConfig JSON"),
1676
- pinnedPositions: PinnedPositionsSchema.optional().describe("Pinned node positions")
1790
+ import_zod20.z.object({
1791
+ orgId: import_zod20.z.string().describe("Organization slug"),
1792
+ projectId: import_zod20.z.string().describe("Project ID"),
1793
+ name: import_zod20.z.string().describe("View name"),
1794
+ scope: import_zod20.z.enum(["user", "project"]).describe("Personal or project scope"),
1795
+ pinnedPositions: PinnedPositionsSchema.optional().describe("Pinned node positions"),
1796
+ viewSpec: ViewSpecSchema.optional().describe("ViewSpec JSON (opaque passthrough)")
1677
1797
  }),
1678
1798
  (params) => {
1679
1799
  const { orgId, projectId, ...body } = params;
@@ -1681,13 +1801,13 @@ function createGraphViewsClient(proj) {
1681
1801
  }
1682
1802
  ),
1683
1803
  update: withSchema(
1684
- import_zod18.z.object({
1685
- orgId: import_zod18.z.string().describe("Organization slug"),
1686
- projectId: import_zod18.z.string().describe("Project ID"),
1687
- id: import_zod18.z.string().describe("View id"),
1688
- name: import_zod18.z.string().optional().describe("New name"),
1689
- config: ViewConfigSchema.optional().describe("Replacement ViewConfig JSON"),
1690
- pinnedPositions: PinnedPositionsSchema.optional().describe("Replacement pinned positions")
1804
+ import_zod20.z.object({
1805
+ orgId: import_zod20.z.string().describe("Organization slug"),
1806
+ projectId: import_zod20.z.string().describe("Project ID"),
1807
+ id: import_zod20.z.string().describe("View id"),
1808
+ name: import_zod20.z.string().optional().describe("New name"),
1809
+ pinnedPositions: PinnedPositionsSchema.optional().describe("Replacement pinned positions"),
1810
+ viewSpec: ViewSpecSchema.optional().describe("Replacement ViewSpec JSON (opaque passthrough)")
1691
1811
  }),
1692
1812
  (params) => {
1693
1813
  const { orgId, projectId, id, ...body } = params;
@@ -1697,18 +1817,18 @@ function createGraphViewsClient(proj) {
1697
1817
  }
1698
1818
  ),
1699
1819
  delete: withSchema(
1700
- import_zod18.z.object({
1701
- orgId: import_zod18.z.string().describe("Organization slug"),
1702
- projectId: import_zod18.z.string().describe("Project ID"),
1703
- id: import_zod18.z.string().describe("View id")
1820
+ import_zod20.z.object({
1821
+ orgId: import_zod20.z.string().describe("Organization slug"),
1822
+ projectId: import_zod20.z.string().describe("Project ID"),
1823
+ id: import_zod20.z.string().describe("View id")
1704
1824
  }),
1705
1825
  (params) => call(proj(params.orgId, params.projectId)["graph-views"][":id"].$delete({ param: { id: params.id } }))
1706
1826
  ),
1707
1827
  setDefault: withSchema(
1708
- import_zod18.z.object({
1709
- orgId: import_zod18.z.string().describe("Organization slug"),
1710
- projectId: import_zod18.z.string().describe("Project ID"),
1711
- id: import_zod18.z.string().describe("View id")
1828
+ import_zod20.z.object({
1829
+ orgId: import_zod20.z.string().describe("Organization slug"),
1830
+ projectId: import_zod20.z.string().describe("Project ID"),
1831
+ id: import_zod20.z.string().describe("View id")
1712
1832
  }),
1713
1833
  (params) => call(
1714
1834
  proj(params.orgId, params.projectId)["graph-views"][":id"]["default"].$patch({
@@ -1720,15 +1840,15 @@ function createGraphViewsClient(proj) {
1720
1840
  }
1721
1841
 
1722
1842
  // src/notifications.ts
1723
- var import_zod19 = require("zod");
1843
+ var import_zod21 = require("zod");
1724
1844
  var import_client2 = require("hono/client");
1725
1845
  function createNotificationsClient(baseUrl, hcOpts) {
1726
1846
  const c = (0, import_client2.hc)(`${baseUrl}/notifications`, hcOpts);
1727
1847
  return {
1728
1848
  list: withSchema(
1729
- import_zod19.z.object({
1730
- limit: import_zod19.z.coerce.number().int().min(1).max(100).optional(),
1731
- unread: import_zod19.z.boolean().optional()
1849
+ import_zod21.z.object({
1850
+ limit: import_zod21.z.coerce.number().int().min(1).max(100).optional(),
1851
+ unread: import_zod21.z.boolean().optional()
1732
1852
  }),
1733
1853
  (params) => {
1734
1854
  const query = {};
@@ -1738,19 +1858,19 @@ function createNotificationsClient(baseUrl, hcOpts) {
1738
1858
  }
1739
1859
  ),
1740
1860
  read: withSchema(
1741
- import_zod19.z.object({ id: import_zod19.z.string().uuid() }),
1861
+ import_zod21.z.object({ id: import_zod21.z.string().uuid() }),
1742
1862
  (params) => call(c[":id"].read.$post({ param: { id: params.id } }))
1743
1863
  ),
1744
1864
  readAll: withSchema(
1745
- import_zod19.z.object({}),
1865
+ import_zod21.z.object({}),
1746
1866
  () => call(c["read-all"].$post())
1747
1867
  )
1748
1868
  };
1749
1869
  }
1750
1870
 
1751
1871
  // src/audit-export.ts
1752
- var import_zod20 = require("zod");
1753
- async function rawRequest(baseUrl, hcOpts, path, init = {}) {
1872
+ var import_zod22 = require("zod");
1873
+ async function rawRequest2(baseUrl, hcOpts, path, init = {}) {
1754
1874
  const fetchImpl = hcOpts?.fetch ?? fetch;
1755
1875
  const rawHeaders = hcOpts?.headers;
1756
1876
  const resolvedHeaders = typeof rawHeaders === "function" ? await rawHeaders() : rawHeaders ?? {};
@@ -1762,7 +1882,7 @@ async function rawRequest(baseUrl, hcOpts, path, init = {}) {
1762
1882
  }
1763
1883
  });
1764
1884
  }
1765
- async function callRaw(res) {
1885
+ async function callRaw2(res) {
1766
1886
  if (!res.ok) {
1767
1887
  let message = fallbackMessage(res.status);
1768
1888
  try {
@@ -1778,24 +1898,24 @@ function createAuditExportClient(baseUrl, hcOpts) {
1778
1898
  return {
1779
1899
  /** GET /orgs/:orgId/audit-export/config — returns current config or throws 404. */
1780
1900
  getConfig: withSchema(
1781
- import_zod20.z.object({ orgId: import_zod20.z.string().describe("Organization ID") }),
1782
- async (params) => callRaw(
1783
- await rawRequest(baseUrl, hcOpts, `/orgs/${params.orgId}/audit-export/config`)
1901
+ import_zod22.z.object({ orgId: import_zod22.z.string().describe("Organization ID") }),
1902
+ async (params) => callRaw2(
1903
+ await rawRequest2(baseUrl, hcOpts, `/orgs/${params.orgId}/audit-export/config`)
1784
1904
  )
1785
1905
  ),
1786
1906
  /** POST /orgs/:orgId/audit-export/config — upsert the S3 export config. */
1787
1907
  setConfig: withSchema(
1788
- import_zod20.z.object({
1789
- orgId: import_zod20.z.string().describe("Organization ID"),
1790
- bucket: import_zod20.z.string().describe("S3 bucket name"),
1791
- region: import_zod20.z.string().describe("AWS region"),
1792
- roleArn: import_zod20.z.string().describe("IAM role ARN for assume-role"),
1793
- enabled: import_zod20.z.boolean().optional().describe("Enable/disable export")
1908
+ import_zod22.z.object({
1909
+ orgId: import_zod22.z.string().describe("Organization ID"),
1910
+ bucket: import_zod22.z.string().describe("S3 bucket name"),
1911
+ region: import_zod22.z.string().describe("AWS region"),
1912
+ roleArn: import_zod22.z.string().describe("IAM role ARN for assume-role"),
1913
+ enabled: import_zod22.z.boolean().optional().describe("Enable/disable export")
1794
1914
  }),
1795
1915
  async (params) => {
1796
1916
  const { orgId, ...body } = params;
1797
- return callRaw(
1798
- await rawRequest(baseUrl, hcOpts, `/orgs/${orgId}/audit-export/config`, {
1917
+ return callRaw2(
1918
+ await rawRequest2(baseUrl, hcOpts, `/orgs/${orgId}/audit-export/config`, {
1799
1919
  method: "POST",
1800
1920
  headers: { "Content-Type": "application/json" },
1801
1921
  body: JSON.stringify(body)
@@ -1805,16 +1925,16 @@ function createAuditExportClient(baseUrl, hcOpts) {
1805
1925
  ),
1806
1926
  /** POST /orgs/:orgId/audit-export/test-connection — dry-run write+delete. */
1807
1927
  testConnection: withSchema(
1808
- import_zod20.z.object({
1809
- orgId: import_zod20.z.string().describe("Organization ID"),
1810
- bucket: import_zod20.z.string().describe("S3 bucket name"),
1811
- region: import_zod20.z.string().describe("AWS region"),
1812
- roleArn: import_zod20.z.string().describe("IAM role ARN for assume-role")
1928
+ import_zod22.z.object({
1929
+ orgId: import_zod22.z.string().describe("Organization ID"),
1930
+ bucket: import_zod22.z.string().describe("S3 bucket name"),
1931
+ region: import_zod22.z.string().describe("AWS region"),
1932
+ roleArn: import_zod22.z.string().describe("IAM role ARN for assume-role")
1813
1933
  }),
1814
1934
  async (params) => {
1815
1935
  const { orgId, ...body } = params;
1816
- return callRaw(
1817
- await rawRequest(baseUrl, hcOpts, `/orgs/${orgId}/audit-export/test-connection`, {
1936
+ return callRaw2(
1937
+ await rawRequest2(baseUrl, hcOpts, `/orgs/${orgId}/audit-export/test-connection`, {
1818
1938
  method: "POST",
1819
1939
  headers: { "Content-Type": "application/json" },
1820
1940
  body: JSON.stringify(body)
@@ -1824,14 +1944,14 @@ function createAuditExportClient(baseUrl, hcOpts) {
1824
1944
  ),
1825
1945
  /** GET /orgs/:orgId/audit-export/runs — recent batch run history. */
1826
1946
  listRuns: withSchema(
1827
- import_zod20.z.object({
1828
- orgId: import_zod20.z.string().describe("Organization ID"),
1829
- limit: import_zod20.z.number().optional().describe("Max results (default 20, max 100)")
1947
+ import_zod22.z.object({
1948
+ orgId: import_zod22.z.string().describe("Organization ID"),
1949
+ limit: import_zod22.z.number().optional().describe("Max results (default 20, max 100)")
1830
1950
  }),
1831
1951
  async (params) => {
1832
1952
  const qs = params.limit ? `?limit=${params.limit}` : "";
1833
- return callRaw(
1834
- await rawRequest(
1953
+ return callRaw2(
1954
+ await rawRequest2(
1835
1955
  baseUrl,
1836
1956
  hcOpts,
1837
1957
  `/orgs/${params.orgId}/audit-export/runs${qs}`
@@ -1870,33 +1990,33 @@ function createUserPreferencesClient(baseUrl, hcOpts) {
1870
1990
  }
1871
1991
 
1872
1992
  // src/import-sources.ts
1873
- var import_zod21 = require("zod");
1874
- var SourceKindEnum = import_zod21.z.enum(["tf-state", "atmos-manifests"]);
1875
- var PolicyEnum = import_zod21.z.enum(["auto-update", "human-approval"]);
1993
+ var import_zod23 = require("zod");
1994
+ var SourceKindEnum = import_zod23.z.enum(["tf-state", "atmos-manifests"]);
1995
+ var PolicyEnum = import_zod23.z.enum(["auto-update", "human-approval"]);
1876
1996
  function createImportSourcesClient(proj) {
1877
1997
  return {
1878
1998
  list: withSchema(
1879
- import_zod21.z.object({
1880
- orgId: import_zod21.z.string().describe("Organization slug"),
1881
- projectId: import_zod21.z.string().describe("Project ID")
1999
+ import_zod23.z.object({
2000
+ orgId: import_zod23.z.string().describe("Organization slug"),
2001
+ projectId: import_zod23.z.string().describe("Project ID")
1882
2002
  }),
1883
2003
  (params) => call(proj(params.orgId, params.projectId)["import-sources"].$get())
1884
2004
  ),
1885
2005
  get: withSchema(
1886
- import_zod21.z.object({
1887
- orgId: import_zod21.z.string().describe("Organization slug"),
1888
- projectId: import_zod21.z.string().describe("Project ID"),
1889
- id: import_zod21.z.string().uuid().describe("ImportSource ID")
2006
+ import_zod23.z.object({
2007
+ orgId: import_zod23.z.string().describe("Organization slug"),
2008
+ projectId: import_zod23.z.string().describe("Project ID"),
2009
+ id: import_zod23.z.string().uuid().describe("ImportSource ID")
1890
2010
  }),
1891
2011
  (params) => call(proj(params.orgId, params.projectId)["import-sources"][":id"].$get({ param: { id: params.id } }))
1892
2012
  ),
1893
2013
  registerOrUpdate: withSchema(
1894
- import_zod21.z.object({
1895
- orgId: import_zod21.z.string().describe("Organization slug"),
1896
- projectId: import_zod21.z.string().describe("Project ID"),
1897
- envName: import_zod21.z.string().describe("Env name the source belongs to"),
2014
+ import_zod23.z.object({
2015
+ orgId: import_zod23.z.string().describe("Organization slug"),
2016
+ projectId: import_zod23.z.string().describe("Project ID"),
2017
+ envName: import_zod23.z.string().describe("Env name the source belongs to"),
1898
2018
  sourceKind: SourceKindEnum,
1899
- sourceUri: import_zod21.z.string().describe("Stable URI identifying the source"),
2019
+ sourceUri: import_zod23.z.string().describe("Stable URI identifying the source"),
1900
2020
  reconciliationPolicy: PolicyEnum.optional()
1901
2021
  }),
1902
2022
  (params) => {
@@ -1905,13 +2025,13 @@ function createImportSourcesClient(proj) {
1905
2025
  }
1906
2026
  ),
1907
2027
  rescan: withSchema(
1908
- import_zod21.z.object({
1909
- orgId: import_zod21.z.string().describe("Organization slug"),
1910
- projectId: import_zod21.z.string().describe("Project ID"),
1911
- id: import_zod21.z.string().uuid(),
1912
- envName: import_zod21.z.string(),
1913
- items: import_zod21.z.array(import_zod21.z.unknown()),
1914
- deletions: import_zod21.z.array(import_zod21.z.object({ kind: import_zod21.z.string(), name: import_zod21.z.string() })).optional()
2028
+ import_zod23.z.object({
2029
+ orgId: import_zod23.z.string().describe("Organization slug"),
2030
+ projectId: import_zod23.z.string().describe("Project ID"),
2031
+ id: import_zod23.z.string().uuid(),
2032
+ envName: import_zod23.z.string(),
2033
+ items: import_zod23.z.array(import_zod23.z.unknown()),
2034
+ deletions: import_zod23.z.array(import_zod23.z.object({ kind: import_zod23.z.string(), name: import_zod23.z.string() })).optional()
1915
2035
  }),
1916
2036
  (params) => {
1917
2037
  const { orgId, projectId, id, ...body } = params;
@@ -1927,19 +2047,19 @@ function createImportSourcesClient(proj) {
1927
2047
  }
1928
2048
  ),
1929
2049
  drift: withSchema(
1930
- import_zod21.z.object({
1931
- orgId: import_zod21.z.string().describe("Organization slug"),
1932
- projectId: import_zod21.z.string().describe("Project ID"),
1933
- id: import_zod21.z.string().uuid()
2050
+ import_zod23.z.object({
2051
+ orgId: import_zod23.z.string().describe("Organization slug"),
2052
+ projectId: import_zod23.z.string().describe("Project ID"),
2053
+ id: import_zod23.z.string().uuid()
1934
2054
  }),
1935
2055
  (params) => call(proj(params.orgId, params.projectId)["import-sources"][":id"].drift.$get({ param: { id: params.id } }))
1936
2056
  ),
1937
2057
  approveProposal: withSchema(
1938
- import_zod21.z.object({
1939
- orgId: import_zod21.z.string().describe("Organization slug"),
1940
- projectId: import_zod21.z.string().describe("Project ID"),
1941
- id: import_zod21.z.string().uuid(),
1942
- proposalId: import_zod21.z.string().uuid()
2058
+ import_zod23.z.object({
2059
+ orgId: import_zod23.z.string().describe("Organization slug"),
2060
+ projectId: import_zod23.z.string().describe("Project ID"),
2061
+ id: import_zod23.z.string().uuid(),
2062
+ proposalId: import_zod23.z.string().uuid()
1943
2063
  }),
1944
2064
  (params) => call(
1945
2065
  proj(params.orgId, params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].approve.$post({
@@ -1948,11 +2068,11 @@ function createImportSourcesClient(proj) {
1948
2068
  )
1949
2069
  ),
1950
2070
  rejectProposal: withSchema(
1951
- import_zod21.z.object({
1952
- orgId: import_zod21.z.string().describe("Organization slug"),
1953
- projectId: import_zod21.z.string().describe("Project ID"),
1954
- id: import_zod21.z.string().uuid(),
1955
- proposalId: import_zod21.z.string().uuid()
2071
+ import_zod23.z.object({
2072
+ orgId: import_zod23.z.string().describe("Organization slug"),
2073
+ projectId: import_zod23.z.string().describe("Project ID"),
2074
+ id: import_zod23.z.string().uuid(),
2075
+ proposalId: import_zod23.z.string().uuid()
1956
2076
  }),
1957
2077
  (params) => call(
1958
2078
  proj(params.orgId, params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].reject.$post({
@@ -1964,8 +2084,8 @@ function createImportSourcesClient(proj) {
1964
2084
  }
1965
2085
 
1966
2086
  // src/admin.ts
1967
- var import_zod22 = require("zod");
1968
- async function rawRequest2(baseUrl, hcOpts, path, init = {}) {
2087
+ var import_zod24 = require("zod");
2088
+ async function rawRequest3(baseUrl, hcOpts, path, init = {}) {
1969
2089
  const fetchImpl = hcOpts?.fetch ?? fetch;
1970
2090
  const rawHeaders = hcOpts?.headers;
1971
2091
  const resolvedHeaders = typeof rawHeaders === "function" ? await rawHeaders() : rawHeaders ?? {};
@@ -1977,7 +2097,7 @@ async function rawRequest2(baseUrl, hcOpts, path, init = {}) {
1977
2097
  }
1978
2098
  });
1979
2099
  }
1980
- async function callRaw2(res) {
2100
+ async function callRaw3(res) {
1981
2101
  if (!res.ok) {
1982
2102
  let message = fallbackMessage(res.status);
1983
2103
  try {
@@ -1997,14 +2117,14 @@ function createAdminClient(baseUrl, hcOpts) {
1997
2117
  * List super-admin audit events with optional filters.
1998
2118
  */
1999
2119
  list: withSchema(
2000
- import_zod22.z.object({
2001
- actor: import_zod22.z.string().optional().describe("Filter by actor user ID"),
2002
- action: import_zod22.z.string().optional().describe("Filter by action name"),
2003
- resourceKind: import_zod22.z.string().optional().describe("Filter by resource kind"),
2004
- since: import_zod22.z.string().optional().describe("ISO 8601 datetime lower bound"),
2005
- until: import_zod22.z.string().optional().describe("ISO 8601 datetime upper bound"),
2006
- limit: import_zod22.z.coerce.number().int().min(1).max(200).optional().describe("Max results (1-200)"),
2007
- offset: import_zod22.z.coerce.number().int().min(0).optional().describe("Pagination offset")
2120
+ import_zod24.z.object({
2121
+ actor: import_zod24.z.string().optional().describe("Filter by actor user ID"),
2122
+ action: import_zod24.z.string().optional().describe("Filter by action name"),
2123
+ resourceKind: import_zod24.z.string().optional().describe("Filter by resource kind"),
2124
+ since: import_zod24.z.string().optional().describe("ISO 8601 datetime lower bound"),
2125
+ until: import_zod24.z.string().optional().describe("ISO 8601 datetime upper bound"),
2126
+ limit: import_zod24.z.coerce.number().int().min(1).max(200).optional().describe("Max results (1-200)"),
2127
+ offset: import_zod24.z.coerce.number().int().min(0).optional().describe("Pagination offset")
2008
2128
  }),
2009
2129
  async (params) => {
2010
2130
  const qs = new URLSearchParams();
@@ -2016,8 +2136,8 @@ function createAdminClient(baseUrl, hcOpts) {
2016
2136
  if (params.limit !== void 0) qs.set("limit", String(params.limit));
2017
2137
  if (params.offset !== void 0) qs.set("offset", String(params.offset));
2018
2138
  const search = qs.toString();
2019
- return callRaw2(
2020
- await rawRequest2(baseUrl, hcOpts, `/admin/audit${search ? `?${search}` : ""}`)
2139
+ return callRaw3(
2140
+ await rawRequest3(baseUrl, hcOpts, `/admin/audit${search ? `?${search}` : ""}`)
2021
2141
  );
2022
2142
  }
2023
2143
  )
@@ -2028,9 +2148,9 @@ function createAdminClient(baseUrl, hcOpts) {
2028
2148
  * List all organizations across tenants with member + project counts.
2029
2149
  */
2030
2150
  list: withSchema(
2031
- import_zod22.z.object({}),
2032
- async () => callRaw2(
2033
- await rawRequest2(baseUrl, hcOpts, "/admin/orgs")
2151
+ import_zod24.z.object({}),
2152
+ async () => callRaw3(
2153
+ await rawRequest3(baseUrl, hcOpts, "/admin/orgs")
2034
2154
  )
2035
2155
  ),
2036
2156
  /**
@@ -2038,9 +2158,9 @@ function createAdminClient(baseUrl, hcOpts) {
2038
2158
  * Detail view: org fields + member list + project list.
2039
2159
  */
2040
2160
  get: withSchema(
2041
- import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
2042
- async (params) => callRaw2(
2043
- await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}`)
2161
+ import_zod24.z.object({ id: import_zod24.z.string().describe("Organization ID") }),
2162
+ async (params) => callRaw3(
2163
+ await rawRequest3(baseUrl, hcOpts, `/admin/orgs/${params.id}`)
2044
2164
  )
2045
2165
  ),
2046
2166
  /**
@@ -2048,9 +2168,9 @@ function createAdminClient(baseUrl, hcOpts) {
2048
2168
  * Set suspended_at = now(). Idempotent.
2049
2169
  */
2050
2170
  suspend: withSchema(
2051
- import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
2052
- async (params) => callRaw2(
2053
- await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/suspend`, {
2171
+ import_zod24.z.object({ id: import_zod24.z.string().describe("Organization ID") }),
2172
+ async (params) => callRaw3(
2173
+ await rawRequest3(baseUrl, hcOpts, `/admin/orgs/${params.id}/suspend`, {
2054
2174
  method: "POST"
2055
2175
  })
2056
2176
  )
@@ -2060,9 +2180,9 @@ function createAdminClient(baseUrl, hcOpts) {
2060
2180
  * Clear suspended_at.
2061
2181
  */
2062
2182
  unsuspend: withSchema(
2063
- import_zod22.z.object({ id: import_zod22.z.string().describe("Organization ID") }),
2064
- async (params) => callRaw2(
2065
- await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/unsuspend`, {
2183
+ import_zod24.z.object({ id: import_zod24.z.string().describe("Organization ID") }),
2184
+ async (params) => callRaw3(
2185
+ await rawRequest3(baseUrl, hcOpts, `/admin/orgs/${params.id}/unsuspend`, {
2066
2186
  method: "POST"
2067
2187
  })
2068
2188
  )
@@ -2076,9 +2196,9 @@ function createAdminClient(baseUrl, hcOpts) {
2076
2196
  * api tokens, and environments. Idempotent. Super-admin only.
2077
2197
  */
2078
2198
  nuke: withSchema(
2079
- import_zod22.z.object({ projectId: import_zod22.z.string().describe("Project ID to nuke") }),
2080
- async (params) => callRaw2(
2081
- await rawRequest2(
2199
+ import_zod24.z.object({ projectId: import_zod24.z.string().describe("Project ID to nuke") }),
2200
+ async (params) => callRaw3(
2201
+ await rawRequest3(
2082
2202
  baseUrl,
2083
2203
  hcOpts,
2084
2204
  `/admin/projects/${encodeURIComponent(params.projectId)}/nuke`,
@@ -2094,9 +2214,9 @@ function createAdminClient(baseUrl, hcOpts) {
2094
2214
  * all derived from single-table COUNT queries.
2095
2215
  */
2096
2216
  overview: withSchema(
2097
- import_zod22.z.object({}),
2098
- async () => callRaw2(
2099
- await rawRequest2(baseUrl, hcOpts, "/admin/metrics/overview")
2217
+ import_zod24.z.object({}),
2218
+ async () => callRaw3(
2219
+ await rawRequest3(baseUrl, hcOpts, "/admin/metrics/overview")
2100
2220
  )
2101
2221
  )
2102
2222
  },
@@ -2109,9 +2229,9 @@ function createAdminClient(baseUrl, hcOpts) {
2109
2229
  * Requires super-admin.
2110
2230
  */
2111
2231
  list: withSchema(
2112
- import_zod22.z.object({}),
2113
- async () => callRaw2(
2114
- await rawRequest2(
2232
+ import_zod24.z.object({}),
2233
+ async () => callRaw3(
2234
+ await rawRequest3(
2115
2235
  baseUrl,
2116
2236
  hcOpts,
2117
2237
  "/admin/integrations/github-installations"
@@ -2124,15 +2244,15 @@ function createAdminClient(baseUrl, hcOpts) {
2124
2244
  }
2125
2245
 
2126
2246
  // src/resolve-source.ts
2127
- var import_zod23 = require("zod");
2247
+ var import_zod25 = require("zod");
2128
2248
  function createResolveSourceFn(proj) {
2129
2249
  return withSchema(
2130
- import_zod23.z.object({
2131
- orgId: import_zod23.z.string().describe("Organization slug"),
2132
- projectId: import_zod23.z.string().describe("Project ID"),
2133
- kind: import_zod23.z.literal("registry").describe('Source kind \u2014 only "registry" is supported today'),
2134
- ref: import_zod23.z.string().regex(/^[^/]+\/[^/]+\/[^/]+$/, { message: "ref must be <namespace>/<name>/<provider>" }).describe("Terraform Registry module ref (<namespace>/<name>/<provider>)"),
2135
- version: import_zod23.z.string().optional().describe("Module version semver \u2014 resolves latest if omitted")
2250
+ import_zod25.z.object({
2251
+ orgId: import_zod25.z.string().describe("Organization slug"),
2252
+ projectId: import_zod25.z.string().describe("Project ID"),
2253
+ kind: import_zod25.z.literal("registry").describe('Source kind \u2014 only "registry" is supported today'),
2254
+ ref: import_zod25.z.string().regex(/^[^/]+\/[^/]+\/[^/]+$/, { message: "ref must be <namespace>/<name>/<provider>" }).describe("Terraform Registry module ref (<namespace>/<name>/<provider>)"),
2255
+ version: import_zod25.z.string().optional().describe("Module version semver \u2014 resolves latest if omitted")
2136
2256
  }),
2137
2257
  (params) => {
2138
2258
  const { orgId, projectId, kind, ref, version } = params;
@@ -2173,9 +2293,11 @@ var createClient = (baseUrl, options = {}) => {
2173
2293
  actionRuns: createActionRunsClient(projEnv),
2174
2294
  secrets: createSecretsClient(projEnv),
2175
2295
  apply: createApplyClient(projEnv),
2296
+ observations: createObservationsClient(baseUrl, hcOpts),
2176
2297
  catalogRevisions,
2177
2298
  auditEvents: createAuditEventsClient(proj),
2178
2299
  driftEvents: createDriftEventsClient(projEnv),
2300
+ conformanceFindings: createConformanceFindingsClient(projEnv),
2179
2301
  stats: createStatsClient(proj),
2180
2302
  graphViews: createGraphViewsClient(proj),
2181
2303
  notifications: createNotificationsClient(baseUrl, hcOpts),