@terrantula/sdk 0.0.2 → 0.2.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/{audit-export-BJSNZ9ic.d.mts → audit-export-BtZTnt8a.d.mts} +51 -1
- package/dist/{audit-export-BJSNZ9ic.d.ts → audit-export-BtZTnt8a.d.ts} +51 -1
- package/dist/{chunk-NTU2AEMP.mjs → chunk-WYOV3M2X.mjs} +204 -5
- package/dist/index.d.mts +615 -6
- package/dist/index.d.ts +615 -6
- package/dist/index.js +204 -5
- package/dist/index.mjs +1 -1
- package/dist/local.d.mts +308 -3
- package/dist/local.d.ts +308 -3
- package/dist/local.js +204 -5
- package/dist/local.mjs +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1018,7 +1018,7 @@ var SERVER_FIELDS = /* @__PURE__ */ new Set(["id", "projectId", "envId", "create
|
|
|
1018
1018
|
function stripServerFields(row) {
|
|
1019
1019
|
const out = {};
|
|
1020
1020
|
for (const [key, value] of Object.entries(row)) {
|
|
1021
|
-
if (!SERVER_FIELDS.has(key)) out[key] = value;
|
|
1021
|
+
if (!SERVER_FIELDS.has(key) && value !== null) out[key] = value;
|
|
1022
1022
|
}
|
|
1023
1023
|
return out;
|
|
1024
1024
|
}
|
|
@@ -1045,9 +1045,13 @@ function createExportCatalogFn(proj, projEnv) {
|
|
|
1045
1045
|
...cells.map(
|
|
1046
1046
|
(r) => ({ kind: "Cell", ...stripServerFields(r) })
|
|
1047
1047
|
),
|
|
1048
|
-
...relationshipTypes.map(
|
|
1049
|
-
|
|
1050
|
-
|
|
1048
|
+
...relationshipTypes.map((r) => {
|
|
1049
|
+
const { fromEntityTypeName, toEntityTypeName, ...rest } = r;
|
|
1050
|
+
const stripped = stripServerFields(rest);
|
|
1051
|
+
if (fromEntityTypeName != null) stripped.from = fromEntityTypeName;
|
|
1052
|
+
if (toEntityTypeName != null) stripped.to = toEntityTypeName;
|
|
1053
|
+
return { kind: "RelationshipType", ...stripped };
|
|
1054
|
+
}),
|
|
1051
1055
|
...actions.map(
|
|
1052
1056
|
(r) => ({ kind: "Action", ...stripServerFields(r) })
|
|
1053
1057
|
),
|
|
@@ -1449,6 +1453,199 @@ function createUserPreferencesClient(baseUrl, hcOpts) {
|
|
|
1449
1453
|
};
|
|
1450
1454
|
}
|
|
1451
1455
|
|
|
1456
|
+
// src/import-sources.ts
|
|
1457
|
+
var import_zod17 = require("zod");
|
|
1458
|
+
var SourceKindEnum = import_zod17.z.enum(["tf-state", "atmos-manifests"]);
|
|
1459
|
+
var PolicyEnum = import_zod17.z.enum(["auto-update", "human-approval"]);
|
|
1460
|
+
function createImportSourcesClient(proj) {
|
|
1461
|
+
return {
|
|
1462
|
+
list: withSchema(
|
|
1463
|
+
import_zod17.z.object({ projectId: import_zod17.z.string().describe("Project ID") }),
|
|
1464
|
+
(params) => call(proj(params.projectId)["import-sources"].$get())
|
|
1465
|
+
),
|
|
1466
|
+
get: withSchema(
|
|
1467
|
+
import_zod17.z.object({
|
|
1468
|
+
projectId: import_zod17.z.string().describe("Project ID"),
|
|
1469
|
+
id: import_zod17.z.string().uuid().describe("ImportSource ID")
|
|
1470
|
+
}),
|
|
1471
|
+
(params) => call(proj(params.projectId)["import-sources"][":id"].$get({ param: { id: params.id } }))
|
|
1472
|
+
),
|
|
1473
|
+
registerOrUpdate: withSchema(
|
|
1474
|
+
import_zod17.z.object({
|
|
1475
|
+
projectId: import_zod17.z.string().describe("Project ID"),
|
|
1476
|
+
envName: import_zod17.z.string().describe("Env name the source belongs to"),
|
|
1477
|
+
sourceKind: SourceKindEnum,
|
|
1478
|
+
sourceUri: import_zod17.z.string().describe("Stable URI identifying the source"),
|
|
1479
|
+
reconciliationPolicy: PolicyEnum.optional()
|
|
1480
|
+
}),
|
|
1481
|
+
(params) => {
|
|
1482
|
+
const { projectId, ...body } = params;
|
|
1483
|
+
return call(proj(projectId)["import-sources"].$post({ json: body }));
|
|
1484
|
+
}
|
|
1485
|
+
),
|
|
1486
|
+
rescan: withSchema(
|
|
1487
|
+
import_zod17.z.object({
|
|
1488
|
+
projectId: import_zod17.z.string(),
|
|
1489
|
+
id: import_zod17.z.string().uuid(),
|
|
1490
|
+
envName: import_zod17.z.string(),
|
|
1491
|
+
items: import_zod17.z.array(import_zod17.z.unknown()),
|
|
1492
|
+
deletions: import_zod17.z.array(import_zod17.z.object({ kind: import_zod17.z.string(), name: import_zod17.z.string() })).optional()
|
|
1493
|
+
}),
|
|
1494
|
+
(params) => {
|
|
1495
|
+
const { projectId, id, ...body } = params;
|
|
1496
|
+
return call(
|
|
1497
|
+
proj(projectId)["import-sources"][":id"].rescan.$post({
|
|
1498
|
+
param: { id },
|
|
1499
|
+
// why: the Hono RPC type for the body is the AnyKindSchema union;
|
|
1500
|
+
// the SDK accepts `unknown[]` so callers don't have to re-import the
|
|
1501
|
+
// entire schema graph just to construct an apply bundle.
|
|
1502
|
+
json: body
|
|
1503
|
+
})
|
|
1504
|
+
);
|
|
1505
|
+
}
|
|
1506
|
+
),
|
|
1507
|
+
drift: withSchema(
|
|
1508
|
+
import_zod17.z.object({
|
|
1509
|
+
projectId: import_zod17.z.string(),
|
|
1510
|
+
id: import_zod17.z.string().uuid()
|
|
1511
|
+
}),
|
|
1512
|
+
(params) => call(proj(params.projectId)["import-sources"][":id"].drift.$get({ param: { id: params.id } }))
|
|
1513
|
+
),
|
|
1514
|
+
approveProposal: withSchema(
|
|
1515
|
+
import_zod17.z.object({
|
|
1516
|
+
projectId: import_zod17.z.string(),
|
|
1517
|
+
id: import_zod17.z.string().uuid(),
|
|
1518
|
+
proposalId: import_zod17.z.string().uuid()
|
|
1519
|
+
}),
|
|
1520
|
+
(params) => call(
|
|
1521
|
+
proj(params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].approve.$post({
|
|
1522
|
+
param: { id: params.id, proposalId: params.proposalId }
|
|
1523
|
+
})
|
|
1524
|
+
)
|
|
1525
|
+
),
|
|
1526
|
+
rejectProposal: withSchema(
|
|
1527
|
+
import_zod17.z.object({
|
|
1528
|
+
projectId: import_zod17.z.string(),
|
|
1529
|
+
id: import_zod17.z.string().uuid(),
|
|
1530
|
+
proposalId: import_zod17.z.string().uuid()
|
|
1531
|
+
}),
|
|
1532
|
+
(params) => call(
|
|
1533
|
+
proj(params.projectId)["import-sources"][":id"]["drift-proposals"][":proposalId"].reject.$post({
|
|
1534
|
+
param: { id: params.id, proposalId: params.proposalId }
|
|
1535
|
+
})
|
|
1536
|
+
)
|
|
1537
|
+
)
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
// src/admin.ts
|
|
1542
|
+
var import_zod18 = require("zod");
|
|
1543
|
+
async function rawRequest2(baseUrl, hcOpts, path, init = {}) {
|
|
1544
|
+
const fetchImpl = hcOpts?.fetch ?? fetch;
|
|
1545
|
+
const rawHeaders = hcOpts?.headers;
|
|
1546
|
+
const resolvedHeaders = typeof rawHeaders === "function" ? await rawHeaders() : rawHeaders ?? {};
|
|
1547
|
+
return fetchImpl(`${baseUrl}${path}`, {
|
|
1548
|
+
...init,
|
|
1549
|
+
headers: {
|
|
1550
|
+
...resolvedHeaders,
|
|
1551
|
+
...init.headers
|
|
1552
|
+
}
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
async function callRaw2(res) {
|
|
1556
|
+
if (!res.ok) {
|
|
1557
|
+
let message = fallbackMessage(res.status);
|
|
1558
|
+
try {
|
|
1559
|
+
const body = await res.json();
|
|
1560
|
+
if (body.error) message = body.error;
|
|
1561
|
+
} catch {
|
|
1562
|
+
}
|
|
1563
|
+
throw new TerrantulaError(res.status, { error: message });
|
|
1564
|
+
}
|
|
1565
|
+
return res.json();
|
|
1566
|
+
}
|
|
1567
|
+
function createAdminClient(baseUrl, hcOpts) {
|
|
1568
|
+
return {
|
|
1569
|
+
audit: {
|
|
1570
|
+
/**
|
|
1571
|
+
* GET /admin/audit
|
|
1572
|
+
* List super-admin audit events with optional filters.
|
|
1573
|
+
*/
|
|
1574
|
+
list: withSchema(
|
|
1575
|
+
import_zod18.z.object({
|
|
1576
|
+
actor: import_zod18.z.string().optional().describe("Filter by actor user ID"),
|
|
1577
|
+
action: import_zod18.z.string().optional().describe("Filter by action name"),
|
|
1578
|
+
resourceKind: import_zod18.z.string().optional().describe("Filter by resource kind"),
|
|
1579
|
+
since: import_zod18.z.string().optional().describe("ISO 8601 datetime lower bound"),
|
|
1580
|
+
until: import_zod18.z.string().optional().describe("ISO 8601 datetime upper bound"),
|
|
1581
|
+
limit: import_zod18.z.coerce.number().int().min(1).max(200).optional().describe("Max results (1-200)"),
|
|
1582
|
+
offset: import_zod18.z.coerce.number().int().min(0).optional().describe("Pagination offset")
|
|
1583
|
+
}),
|
|
1584
|
+
async (params) => {
|
|
1585
|
+
const qs = new URLSearchParams();
|
|
1586
|
+
if (params.actor !== void 0) qs.set("actor", params.actor);
|
|
1587
|
+
if (params.action !== void 0) qs.set("action", params.action);
|
|
1588
|
+
if (params.resourceKind !== void 0) qs.set("resourceKind", params.resourceKind);
|
|
1589
|
+
if (params.since !== void 0) qs.set("since", params.since);
|
|
1590
|
+
if (params.until !== void 0) qs.set("until", params.until);
|
|
1591
|
+
if (params.limit !== void 0) qs.set("limit", String(params.limit));
|
|
1592
|
+
if (params.offset !== void 0) qs.set("offset", String(params.offset));
|
|
1593
|
+
const search = qs.toString();
|
|
1594
|
+
return callRaw2(
|
|
1595
|
+
await rawRequest2(baseUrl, hcOpts, `/admin/audit${search ? `?${search}` : ""}`)
|
|
1596
|
+
);
|
|
1597
|
+
}
|
|
1598
|
+
)
|
|
1599
|
+
},
|
|
1600
|
+
orgs: {
|
|
1601
|
+
/**
|
|
1602
|
+
* GET /admin/orgs
|
|
1603
|
+
* List all organizations across tenants with member + project counts.
|
|
1604
|
+
*/
|
|
1605
|
+
list: withSchema(
|
|
1606
|
+
import_zod18.z.object({}),
|
|
1607
|
+
async () => callRaw2(
|
|
1608
|
+
await rawRequest2(baseUrl, hcOpts, "/admin/orgs")
|
|
1609
|
+
)
|
|
1610
|
+
),
|
|
1611
|
+
/**
|
|
1612
|
+
* GET /admin/orgs/:id
|
|
1613
|
+
* Detail view: org fields + member list + project list.
|
|
1614
|
+
*/
|
|
1615
|
+
get: withSchema(
|
|
1616
|
+
import_zod18.z.object({ id: import_zod18.z.string().describe("Organization ID") }),
|
|
1617
|
+
async (params) => callRaw2(
|
|
1618
|
+
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}`)
|
|
1619
|
+
)
|
|
1620
|
+
),
|
|
1621
|
+
/**
|
|
1622
|
+
* POST /admin/orgs/:id/suspend
|
|
1623
|
+
* Set suspended_at = now(). Idempotent.
|
|
1624
|
+
*/
|
|
1625
|
+
suspend: withSchema(
|
|
1626
|
+
import_zod18.z.object({ id: import_zod18.z.string().describe("Organization ID") }),
|
|
1627
|
+
async (params) => callRaw2(
|
|
1628
|
+
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/suspend`, {
|
|
1629
|
+
method: "POST"
|
|
1630
|
+
})
|
|
1631
|
+
)
|
|
1632
|
+
),
|
|
1633
|
+
/**
|
|
1634
|
+
* POST /admin/orgs/:id/unsuspend
|
|
1635
|
+
* Clear suspended_at.
|
|
1636
|
+
*/
|
|
1637
|
+
unsuspend: withSchema(
|
|
1638
|
+
import_zod18.z.object({ id: import_zod18.z.string().describe("Organization ID") }),
|
|
1639
|
+
async (params) => callRaw2(
|
|
1640
|
+
await rawRequest2(baseUrl, hcOpts, `/admin/orgs/${params.id}/unsuspend`, {
|
|
1641
|
+
method: "POST"
|
|
1642
|
+
})
|
|
1643
|
+
)
|
|
1644
|
+
)
|
|
1645
|
+
}
|
|
1646
|
+
};
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1452
1649
|
// src/index.ts
|
|
1453
1650
|
var createClient = (baseUrl, options = {}) => {
|
|
1454
1651
|
const opts = typeof options === "string" || typeof options === "function" ? { token: options } : options;
|
|
@@ -1482,7 +1679,9 @@ var createClient = (baseUrl, options = {}) => {
|
|
|
1482
1679
|
notifications: createNotificationsClient(baseUrl, hcOpts),
|
|
1483
1680
|
auditExport: createAuditExportClient(baseUrl, hcOpts),
|
|
1484
1681
|
userPreferences: createUserPreferencesClient(baseUrl, hcOpts),
|
|
1485
|
-
|
|
1682
|
+
importSources: createImportSourcesClient(proj),
|
|
1683
|
+
exportCatalog,
|
|
1684
|
+
admin: createAdminClient(baseUrl, hcOpts)
|
|
1486
1685
|
};
|
|
1487
1686
|
let warnedPools = false;
|
|
1488
1687
|
let warnedApplyRevisions = false;
|
package/dist/index.mjs
CHANGED
package/dist/local.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as SchemaFn, S as SnapshotOp, A as AuditExportConfigResponse, b as TestConnectionResponse, c as AuditExportRunResponse, E as ExportCatalogResult } from './audit-export-
|
|
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';
|
|
2
|
+
import * as _terrantula_types from '@terrantula/types';
|
|
2
3
|
import * as hono_utils_types from 'hono/utils/types';
|
|
3
4
|
import * as zod from 'zod';
|
|
4
5
|
|
|
@@ -25,6 +26,7 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
25
26
|
deletedAt: string | null;
|
|
26
27
|
logo: string | null;
|
|
27
28
|
metadata: string | null;
|
|
29
|
+
suspendedAt: string | null;
|
|
28
30
|
}>;
|
|
29
31
|
get: SchemaFn<zod.ZodObject<{
|
|
30
32
|
id: zod.ZodString;
|
|
@@ -42,6 +44,7 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
42
44
|
createdAt: string;
|
|
43
45
|
metadata: string | null;
|
|
44
46
|
deletedAt: string | null;
|
|
47
|
+
suspendedAt: string | null;
|
|
45
48
|
}>;
|
|
46
49
|
listUsers: SchemaFn<zod.ZodObject<{
|
|
47
50
|
id: zod.ZodString;
|
|
@@ -89,6 +92,9 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
89
92
|
createdAt: string;
|
|
90
93
|
updatedAt: string;
|
|
91
94
|
deletedAt: string | null;
|
|
95
|
+
banned: boolean;
|
|
96
|
+
banReason: string | null;
|
|
97
|
+
banExpires: string | null;
|
|
92
98
|
}>;
|
|
93
99
|
updateUserRole: SchemaFn<zod.ZodObject<{
|
|
94
100
|
id: zod.ZodString;
|
|
@@ -96,12 +102,12 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
96
102
|
role: zod.ZodEnum<["owner", "admin", "member"]>;
|
|
97
103
|
}, "strip", zod.ZodTypeAny, {
|
|
98
104
|
id: string;
|
|
99
|
-
userId: string;
|
|
100
105
|
role: "member" | "owner" | "admin";
|
|
106
|
+
userId: string;
|
|
101
107
|
}, {
|
|
102
108
|
id: string;
|
|
103
|
-
userId: string;
|
|
104
109
|
role: "member" | "owner" | "admin";
|
|
110
|
+
userId: string;
|
|
105
111
|
}>, {
|
|
106
112
|
error: string;
|
|
107
113
|
} | {
|
|
@@ -1606,6 +1612,8 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
1606
1612
|
updatedAt: string;
|
|
1607
1613
|
projectId: string | null;
|
|
1608
1614
|
envId: string;
|
|
1615
|
+
deletionScheduledAt: string | null;
|
|
1616
|
+
deletionGracePeriodSeconds: number | null;
|
|
1609
1617
|
}[]>;
|
|
1610
1618
|
syncStamp: SchemaFn<zod.ZodObject<{
|
|
1611
1619
|
projectId: zod.ZodString;
|
|
@@ -2234,6 +2242,8 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
2234
2242
|
updatedAt: string;
|
|
2235
2243
|
projectId: string | null;
|
|
2236
2244
|
envId: string;
|
|
2245
|
+
deletionScheduledAt: string | null;
|
|
2246
|
+
deletionGracePeriodSeconds: number | null;
|
|
2237
2247
|
}[]>;
|
|
2238
2248
|
get: SchemaFn<zod.ZodObject<{
|
|
2239
2249
|
projectId: zod.ZodString;
|
|
@@ -2259,6 +2269,8 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
2259
2269
|
updatedAt: string;
|
|
2260
2270
|
projectId: string | null;
|
|
2261
2271
|
envId: string;
|
|
2272
|
+
deletionScheduledAt: string | null;
|
|
2273
|
+
deletionGracePeriodSeconds: number | null;
|
|
2262
2274
|
}>;
|
|
2263
2275
|
create: SchemaFn<zod.ZodObject<{
|
|
2264
2276
|
kind: zod.ZodLiteral<"Relationship">;
|
|
@@ -2305,6 +2317,8 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
2305
2317
|
relationshipTypeName: string;
|
|
2306
2318
|
fromEntityId: string;
|
|
2307
2319
|
toEntityId: string;
|
|
2320
|
+
deletionScheduledAt: string | null;
|
|
2321
|
+
deletionGracePeriodSeconds: number | null;
|
|
2308
2322
|
}>;
|
|
2309
2323
|
delete: SchemaFn<zod.ZodObject<{
|
|
2310
2324
|
projectId: zod.ZodString;
|
|
@@ -15953,6 +15967,7 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
15953
15967
|
itemCount: number;
|
|
15954
15968
|
deletionCount: number;
|
|
15955
15969
|
force: boolean;
|
|
15970
|
+
version: number;
|
|
15956
15971
|
}[]>;
|
|
15957
15972
|
get: SchemaFn<zod.ZodObject<{
|
|
15958
15973
|
projectId: zod.ZodString;
|
|
@@ -16435,6 +16450,242 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
16435
16450
|
}>;
|
|
16436
16451
|
delete: (key: string) => Promise<unknown>;
|
|
16437
16452
|
};
|
|
16453
|
+
importSources: {
|
|
16454
|
+
list: SchemaFn<zod.ZodObject<{
|
|
16455
|
+
projectId: zod.ZodString;
|
|
16456
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16457
|
+
projectId: string;
|
|
16458
|
+
}, {
|
|
16459
|
+
projectId: string;
|
|
16460
|
+
}>, {
|
|
16461
|
+
id: string;
|
|
16462
|
+
projectId: string | null;
|
|
16463
|
+
envId: string;
|
|
16464
|
+
sourceKind: string;
|
|
16465
|
+
sourceUri: string;
|
|
16466
|
+
reconciliationPolicy: string;
|
|
16467
|
+
lastScannedAt: string | null;
|
|
16468
|
+
lastScanStatus: string | null;
|
|
16469
|
+
lastScanSummary: hono_utils_types.JSONValue;
|
|
16470
|
+
createdAt: string;
|
|
16471
|
+
updatedAt: string;
|
|
16472
|
+
}[]>;
|
|
16473
|
+
get: SchemaFn<zod.ZodObject<{
|
|
16474
|
+
projectId: zod.ZodString;
|
|
16475
|
+
id: zod.ZodString;
|
|
16476
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16477
|
+
id: string;
|
|
16478
|
+
projectId: string;
|
|
16479
|
+
}, {
|
|
16480
|
+
id: string;
|
|
16481
|
+
projectId: string;
|
|
16482
|
+
}>, {
|
|
16483
|
+
id: string;
|
|
16484
|
+
projectId: string | null;
|
|
16485
|
+
envId: string;
|
|
16486
|
+
sourceKind: string;
|
|
16487
|
+
sourceUri: string;
|
|
16488
|
+
reconciliationPolicy: string;
|
|
16489
|
+
lastScannedAt: string | null;
|
|
16490
|
+
lastScanStatus: string | null;
|
|
16491
|
+
lastScanSummary: hono_utils_types.JSONValue;
|
|
16492
|
+
createdAt: string;
|
|
16493
|
+
updatedAt: string;
|
|
16494
|
+
}>;
|
|
16495
|
+
registerOrUpdate: SchemaFn<zod.ZodObject<{
|
|
16496
|
+
projectId: zod.ZodString;
|
|
16497
|
+
envName: zod.ZodString;
|
|
16498
|
+
sourceKind: zod.ZodEnum<["tf-state", "atmos-manifests"]>;
|
|
16499
|
+
sourceUri: zod.ZodString;
|
|
16500
|
+
reconciliationPolicy: zod.ZodOptional<zod.ZodEnum<["auto-update", "human-approval"]>>;
|
|
16501
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16502
|
+
projectId: string;
|
|
16503
|
+
envName: string;
|
|
16504
|
+
sourceKind: "tf-state" | "atmos-manifests";
|
|
16505
|
+
sourceUri: string;
|
|
16506
|
+
reconciliationPolicy?: "auto-update" | "human-approval" | undefined;
|
|
16507
|
+
}, {
|
|
16508
|
+
projectId: string;
|
|
16509
|
+
envName: string;
|
|
16510
|
+
sourceKind: "tf-state" | "atmos-manifests";
|
|
16511
|
+
sourceUri: string;
|
|
16512
|
+
reconciliationPolicy?: "auto-update" | "human-approval" | undefined;
|
|
16513
|
+
}>, {
|
|
16514
|
+
id: string;
|
|
16515
|
+
projectId: string | null;
|
|
16516
|
+
envId: string;
|
|
16517
|
+
sourceKind: string;
|
|
16518
|
+
sourceUri: string;
|
|
16519
|
+
reconciliationPolicy: string;
|
|
16520
|
+
lastScannedAt: string | null;
|
|
16521
|
+
lastScanStatus: string | null;
|
|
16522
|
+
lastScanSummary: hono_utils_types.JSONValue;
|
|
16523
|
+
createdAt: string;
|
|
16524
|
+
updatedAt: string;
|
|
16525
|
+
} | {
|
|
16526
|
+
id: string;
|
|
16527
|
+
createdAt: string;
|
|
16528
|
+
updatedAt: string;
|
|
16529
|
+
projectId: string | null;
|
|
16530
|
+
envId: string;
|
|
16531
|
+
sourceKind: string;
|
|
16532
|
+
sourceUri: string;
|
|
16533
|
+
reconciliationPolicy: string;
|
|
16534
|
+
lastScannedAt: string | null;
|
|
16535
|
+
lastScanStatus: string | null;
|
|
16536
|
+
lastScanSummary: hono_utils_types.JSONValue;
|
|
16537
|
+
}>;
|
|
16538
|
+
rescan: SchemaFn<zod.ZodObject<{
|
|
16539
|
+
projectId: zod.ZodString;
|
|
16540
|
+
id: zod.ZodString;
|
|
16541
|
+
envName: zod.ZodString;
|
|
16542
|
+
items: zod.ZodArray<zod.ZodUnknown, "many">;
|
|
16543
|
+
deletions: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
|
|
16544
|
+
kind: zod.ZodString;
|
|
16545
|
+
name: zod.ZodString;
|
|
16546
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16547
|
+
name: string;
|
|
16548
|
+
kind: string;
|
|
16549
|
+
}, {
|
|
16550
|
+
name: string;
|
|
16551
|
+
kind: string;
|
|
16552
|
+
}>, "many">>;
|
|
16553
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16554
|
+
id: string;
|
|
16555
|
+
projectId: string;
|
|
16556
|
+
envName: string;
|
|
16557
|
+
items: unknown[];
|
|
16558
|
+
deletions?: {
|
|
16559
|
+
name: string;
|
|
16560
|
+
kind: string;
|
|
16561
|
+
}[] | undefined;
|
|
16562
|
+
}, {
|
|
16563
|
+
id: string;
|
|
16564
|
+
projectId: string;
|
|
16565
|
+
envName: string;
|
|
16566
|
+
items: unknown[];
|
|
16567
|
+
deletions?: {
|
|
16568
|
+
name: string;
|
|
16569
|
+
kind: string;
|
|
16570
|
+
}[] | undefined;
|
|
16571
|
+
}>, {
|
|
16572
|
+
scan: {
|
|
16573
|
+
scanned: any;
|
|
16574
|
+
succeeded: number;
|
|
16575
|
+
failed: number;
|
|
16576
|
+
proposalsCreated: number;
|
|
16577
|
+
};
|
|
16578
|
+
lastScannedAt: string;
|
|
16579
|
+
lastScanStatus: string;
|
|
16580
|
+
} | {
|
|
16581
|
+
scan: {
|
|
16582
|
+
scanned: any;
|
|
16583
|
+
created: number;
|
|
16584
|
+
failed: number;
|
|
16585
|
+
proposalsCreated: number;
|
|
16586
|
+
};
|
|
16587
|
+
lastScannedAt: string;
|
|
16588
|
+
lastScanStatus: string;
|
|
16589
|
+
}>;
|
|
16590
|
+
drift: SchemaFn<zod.ZodObject<{
|
|
16591
|
+
projectId: zod.ZodString;
|
|
16592
|
+
id: zod.ZodString;
|
|
16593
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16594
|
+
id: string;
|
|
16595
|
+
projectId: string;
|
|
16596
|
+
}, {
|
|
16597
|
+
id: string;
|
|
16598
|
+
projectId: string;
|
|
16599
|
+
}>, {
|
|
16600
|
+
source: {
|
|
16601
|
+
id: string;
|
|
16602
|
+
projectId: string | null;
|
|
16603
|
+
envId: string;
|
|
16604
|
+
sourceKind: string;
|
|
16605
|
+
sourceUri: string;
|
|
16606
|
+
reconciliationPolicy: string;
|
|
16607
|
+
lastScannedAt: string | null;
|
|
16608
|
+
lastScanStatus: string | null;
|
|
16609
|
+
lastScanSummary: hono_utils_types.JSONValue;
|
|
16610
|
+
createdAt: string;
|
|
16611
|
+
updatedAt: string;
|
|
16612
|
+
};
|
|
16613
|
+
totals: {
|
|
16614
|
+
entities: number;
|
|
16615
|
+
current: number;
|
|
16616
|
+
stale: number;
|
|
16617
|
+
missing: number;
|
|
16618
|
+
pendingProposals: number;
|
|
16619
|
+
};
|
|
16620
|
+
entities: {
|
|
16621
|
+
id: string;
|
|
16622
|
+
name: string;
|
|
16623
|
+
entityType: string;
|
|
16624
|
+
lastSyncedAt: string | null;
|
|
16625
|
+
driftStatus: _terrantula_types.DriftStatus | null;
|
|
16626
|
+
}[];
|
|
16627
|
+
pendingProposals: {
|
|
16628
|
+
id: string;
|
|
16629
|
+
importSourceId: string;
|
|
16630
|
+
projectId: string | null;
|
|
16631
|
+
envId: string;
|
|
16632
|
+
entityId: string;
|
|
16633
|
+
proposedChanges: hono_utils_types.JSONValue;
|
|
16634
|
+
status: string;
|
|
16635
|
+
createdAt: string;
|
|
16636
|
+
decidedAt: string | null;
|
|
16637
|
+
decidedBy: string | null;
|
|
16638
|
+
}[];
|
|
16639
|
+
}>;
|
|
16640
|
+
approveProposal: SchemaFn<zod.ZodObject<{
|
|
16641
|
+
projectId: zod.ZodString;
|
|
16642
|
+
id: zod.ZodString;
|
|
16643
|
+
proposalId: zod.ZodString;
|
|
16644
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16645
|
+
id: string;
|
|
16646
|
+
projectId: string;
|
|
16647
|
+
proposalId: string;
|
|
16648
|
+
}, {
|
|
16649
|
+
id: string;
|
|
16650
|
+
projectId: string;
|
|
16651
|
+
proposalId: string;
|
|
16652
|
+
}>, {
|
|
16653
|
+
id: string;
|
|
16654
|
+
importSourceId: string;
|
|
16655
|
+
projectId: string | null;
|
|
16656
|
+
envId: string;
|
|
16657
|
+
entityId: string;
|
|
16658
|
+
proposedChanges: hono_utils_types.JSONValue;
|
|
16659
|
+
status: string;
|
|
16660
|
+
createdAt: string;
|
|
16661
|
+
decidedAt: string | null;
|
|
16662
|
+
decidedBy: string | null;
|
|
16663
|
+
}>;
|
|
16664
|
+
rejectProposal: SchemaFn<zod.ZodObject<{
|
|
16665
|
+
projectId: zod.ZodString;
|
|
16666
|
+
id: zod.ZodString;
|
|
16667
|
+
proposalId: zod.ZodString;
|
|
16668
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16669
|
+
id: string;
|
|
16670
|
+
projectId: string;
|
|
16671
|
+
proposalId: string;
|
|
16672
|
+
}, {
|
|
16673
|
+
id: string;
|
|
16674
|
+
projectId: string;
|
|
16675
|
+
proposalId: string;
|
|
16676
|
+
}>, {
|
|
16677
|
+
id: string;
|
|
16678
|
+
importSourceId: string;
|
|
16679
|
+
projectId: string | null;
|
|
16680
|
+
envId: string;
|
|
16681
|
+
entityId: string;
|
|
16682
|
+
proposedChanges: hono_utils_types.JSONValue;
|
|
16683
|
+
status: string;
|
|
16684
|
+
createdAt: string;
|
|
16685
|
+
decidedAt: string | null;
|
|
16686
|
+
decidedBy: string | null;
|
|
16687
|
+
}>;
|
|
16688
|
+
};
|
|
16438
16689
|
exportCatalog: SchemaFn<zod.ZodObject<{
|
|
16439
16690
|
projectId: zod.ZodString;
|
|
16440
16691
|
envName: zod.ZodString;
|
|
@@ -16445,6 +16696,59 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
16445
16696
|
projectId: string;
|
|
16446
16697
|
envName: string;
|
|
16447
16698
|
}>, ExportCatalogResult>;
|
|
16699
|
+
admin: {
|
|
16700
|
+
audit: {
|
|
16701
|
+
list: SchemaFn<zod.ZodObject<{
|
|
16702
|
+
actor: zod.ZodOptional<zod.ZodString>;
|
|
16703
|
+
action: zod.ZodOptional<zod.ZodString>;
|
|
16704
|
+
resourceKind: zod.ZodOptional<zod.ZodString>;
|
|
16705
|
+
since: zod.ZodOptional<zod.ZodString>;
|
|
16706
|
+
until: zod.ZodOptional<zod.ZodString>;
|
|
16707
|
+
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
16708
|
+
offset: zod.ZodOptional<zod.ZodNumber>;
|
|
16709
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16710
|
+
limit?: number | undefined;
|
|
16711
|
+
offset?: number | undefined;
|
|
16712
|
+
action?: string | undefined;
|
|
16713
|
+
resourceKind?: string | undefined;
|
|
16714
|
+
since?: string | undefined;
|
|
16715
|
+
actor?: string | undefined;
|
|
16716
|
+
until?: string | undefined;
|
|
16717
|
+
}, {
|
|
16718
|
+
limit?: number | undefined;
|
|
16719
|
+
offset?: number | undefined;
|
|
16720
|
+
action?: string | undefined;
|
|
16721
|
+
resourceKind?: string | undefined;
|
|
16722
|
+
since?: string | undefined;
|
|
16723
|
+
actor?: string | undefined;
|
|
16724
|
+
until?: string | undefined;
|
|
16725
|
+
}>, AdminAuditListResponse>;
|
|
16726
|
+
};
|
|
16727
|
+
orgs: {
|
|
16728
|
+
list: SchemaFn<zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>, AdminOrgListResponse>;
|
|
16729
|
+
get: SchemaFn<zod.ZodObject<{
|
|
16730
|
+
id: zod.ZodString;
|
|
16731
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16732
|
+
id: string;
|
|
16733
|
+
}, {
|
|
16734
|
+
id: string;
|
|
16735
|
+
}>, AdminOrgDetail>;
|
|
16736
|
+
suspend: SchemaFn<zod.ZodObject<{
|
|
16737
|
+
id: zod.ZodString;
|
|
16738
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16739
|
+
id: string;
|
|
16740
|
+
}, {
|
|
16741
|
+
id: string;
|
|
16742
|
+
}>, AdminSuspendResponse>;
|
|
16743
|
+
unsuspend: SchemaFn<zod.ZodObject<{
|
|
16744
|
+
id: zod.ZodString;
|
|
16745
|
+
}, "strip", zod.ZodTypeAny, {
|
|
16746
|
+
id: string;
|
|
16747
|
+
}, {
|
|
16748
|
+
id: string;
|
|
16749
|
+
}>, AdminSuspendResponse>;
|
|
16750
|
+
};
|
|
16751
|
+
};
|
|
16448
16752
|
} & {
|
|
16449
16753
|
pools: {
|
|
16450
16754
|
list: SchemaFn<zod.ZodObject<{
|
|
@@ -16706,6 +17010,7 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
16706
17010
|
itemCount: number;
|
|
16707
17011
|
deletionCount: number;
|
|
16708
17012
|
force: boolean;
|
|
17013
|
+
version: number;
|
|
16709
17014
|
}[]>;
|
|
16710
17015
|
get: SchemaFn<zod.ZodObject<{
|
|
16711
17016
|
projectId: zod.ZodString;
|