@terrantula/sdk 0.10.0 → 0.11.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/{chunk-D2JXYF4W.mjs → chunk-5JCSB6F5.mjs} +28 -1
- package/dist/index.d.mts +84 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.js +28 -1
- package/dist/index.mjs +1 -1
- package/dist/local.d.mts +52 -0
- package/dist/local.d.ts +52 -0
- package/dist/local.js +28 -1
- package/dist/local.mjs +1 -1
- package/package.json +3 -3
|
@@ -461,6 +461,32 @@ function createEntitiesClient(projEnv) {
|
|
|
461
461
|
);
|
|
462
462
|
}
|
|
463
463
|
),
|
|
464
|
+
facets: withSchema(
|
|
465
|
+
z3.object({
|
|
466
|
+
orgId: z3.string().describe("Organization slug"),
|
|
467
|
+
projectId: z3.string().describe("Project name"),
|
|
468
|
+
envName: z3.string().describe("Environment name"),
|
|
469
|
+
kind: z3.array(z3.string()).optional().describe("Filter: entity type names"),
|
|
470
|
+
state: z3.array(z3.string()).optional().describe("Filter: states"),
|
|
471
|
+
owner: z3.array(z3.string()).optional().describe("Filter: owner label values ('' = unset)"),
|
|
472
|
+
cell: z3.array(z3.string()).optional().describe("Filter: cell label values ('' = unset)"),
|
|
473
|
+
search: z3.string().optional().describe("Substring match on name + entity type"),
|
|
474
|
+
cellKey: z3.string().optional().describe("Project cell label key; omit to skip the cell dimension")
|
|
475
|
+
}),
|
|
476
|
+
(params) => {
|
|
477
|
+
const { orgId, projectId, envName, kind, state, owner, cell, search, cellKey } = params;
|
|
478
|
+
const query = {};
|
|
479
|
+
if (kind?.length) query.kind = JSON.stringify(kind);
|
|
480
|
+
if (state?.length) query.state = JSON.stringify(state);
|
|
481
|
+
if (owner?.length) query.owner = JSON.stringify(owner);
|
|
482
|
+
if (cell?.length) query.cell = JSON.stringify(cell);
|
|
483
|
+
if (search) query.search = search;
|
|
484
|
+
if (cellKey) query.cellKey = cellKey;
|
|
485
|
+
return call(
|
|
486
|
+
projEnv(orgId, projectId, envName)["entities"]["facets"].$get({ query })
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
),
|
|
464
490
|
get: withSchema(
|
|
465
491
|
z3.object({
|
|
466
492
|
orgId: z3.string().describe("Organization slug"),
|
|
@@ -836,7 +862,8 @@ function createRelationshipsClient(projEnv) {
|
|
|
836
862
|
toEntity: z6.string().uuid().optional().describe("Filter by to-entity ID"),
|
|
837
863
|
fromEntityCell: z6.string().optional().describe("Filter by from-entity cell membership"),
|
|
838
864
|
toEntityCell: z6.string().optional().describe("Filter by to-entity cell membership"),
|
|
839
|
-
limit: z6.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)")
|
|
865
|
+
limit: z6.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)"),
|
|
866
|
+
cursor: z6.string().optional().describe("Pagination cursor")
|
|
840
867
|
}),
|
|
841
868
|
(params) => {
|
|
842
869
|
const { orgId, projectId, envName, ...query } = params;
|
package/dist/index.d.mts
CHANGED
|
@@ -302,6 +302,38 @@ declare const projectApp: hono_hono_base.HonoBase<{
|
|
|
302
302
|
};
|
|
303
303
|
};
|
|
304
304
|
}, "/secrets"> | hono_types.MergeSchemaPath<{
|
|
305
|
+
"/facets": {
|
|
306
|
+
$get: {
|
|
307
|
+
input: {
|
|
308
|
+
json?: any;
|
|
309
|
+
query?: {
|
|
310
|
+
[x: string]: string | string[];
|
|
311
|
+
} | undefined;
|
|
312
|
+
};
|
|
313
|
+
output: {
|
|
314
|
+
kind: {
|
|
315
|
+
value: string;
|
|
316
|
+
count: number;
|
|
317
|
+
}[];
|
|
318
|
+
state: {
|
|
319
|
+
value: string;
|
|
320
|
+
count: number;
|
|
321
|
+
}[];
|
|
322
|
+
owner: {
|
|
323
|
+
value: string;
|
|
324
|
+
count: number;
|
|
325
|
+
}[];
|
|
326
|
+
cell: {
|
|
327
|
+
value: string;
|
|
328
|
+
count: number;
|
|
329
|
+
}[];
|
|
330
|
+
total: number;
|
|
331
|
+
};
|
|
332
|
+
outputFormat: "json";
|
|
333
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
}, "/entities"> | hono_types.MergeSchemaPath<{
|
|
305
337
|
"/": {
|
|
306
338
|
$get: {
|
|
307
339
|
input: {
|
|
@@ -8492,6 +8524,55 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
|
|
|
8492
8524
|
projectId: string;
|
|
8493
8525
|
envId: string;
|
|
8494
8526
|
}[]>;
|
|
8527
|
+
facets: SchemaFn<zod.ZodObject<{
|
|
8528
|
+
orgId: zod.ZodString;
|
|
8529
|
+
projectId: zod.ZodString;
|
|
8530
|
+
envName: zod.ZodString;
|
|
8531
|
+
kind: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
8532
|
+
state: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
8533
|
+
owner: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
8534
|
+
cell: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
8535
|
+
search: zod.ZodOptional<zod.ZodString>;
|
|
8536
|
+
cellKey: zod.ZodOptional<zod.ZodString>;
|
|
8537
|
+
}, "strip", zod.ZodTypeAny, {
|
|
8538
|
+
orgId: string;
|
|
8539
|
+
projectId: string;
|
|
8540
|
+
envName: string;
|
|
8541
|
+
search?: string | undefined;
|
|
8542
|
+
owner?: string[] | undefined;
|
|
8543
|
+
cellKey?: string | undefined;
|
|
8544
|
+
state?: string[] | undefined;
|
|
8545
|
+
cell?: string[] | undefined;
|
|
8546
|
+
kind?: string[] | undefined;
|
|
8547
|
+
}, {
|
|
8548
|
+
orgId: string;
|
|
8549
|
+
projectId: string;
|
|
8550
|
+
envName: string;
|
|
8551
|
+
search?: string | undefined;
|
|
8552
|
+
owner?: string[] | undefined;
|
|
8553
|
+
cellKey?: string | undefined;
|
|
8554
|
+
state?: string[] | undefined;
|
|
8555
|
+
cell?: string[] | undefined;
|
|
8556
|
+
kind?: string[] | undefined;
|
|
8557
|
+
}>, {
|
|
8558
|
+
kind: {
|
|
8559
|
+
value: string;
|
|
8560
|
+
count: number;
|
|
8561
|
+
}[];
|
|
8562
|
+
state: {
|
|
8563
|
+
value: string;
|
|
8564
|
+
count: number;
|
|
8565
|
+
}[];
|
|
8566
|
+
owner: {
|
|
8567
|
+
value: string;
|
|
8568
|
+
count: number;
|
|
8569
|
+
}[];
|
|
8570
|
+
cell: {
|
|
8571
|
+
value: string;
|
|
8572
|
+
count: number;
|
|
8573
|
+
}[];
|
|
8574
|
+
total: number;
|
|
8575
|
+
}>;
|
|
8495
8576
|
get: SchemaFn<zod.ZodObject<{
|
|
8496
8577
|
orgId: zod.ZodString;
|
|
8497
8578
|
projectId: zod.ZodString;
|
|
@@ -9524,6 +9605,7 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
|
|
|
9524
9605
|
fromEntityCell: zod.ZodOptional<zod.ZodString>;
|
|
9525
9606
|
toEntityCell: zod.ZodOptional<zod.ZodString>;
|
|
9526
9607
|
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
9608
|
+
cursor: zod.ZodOptional<zod.ZodString>;
|
|
9527
9609
|
}, "strip", zod.ZodTypeAny, {
|
|
9528
9610
|
orgId: string;
|
|
9529
9611
|
projectId: string;
|
|
@@ -9531,6 +9613,7 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
|
|
|
9531
9613
|
limit?: number | undefined;
|
|
9532
9614
|
state?: string | undefined;
|
|
9533
9615
|
relationshipType?: string | undefined;
|
|
9616
|
+
cursor?: string | undefined;
|
|
9534
9617
|
fromEntity?: string | undefined;
|
|
9535
9618
|
toEntity?: string | undefined;
|
|
9536
9619
|
fromEntityCell?: string | undefined;
|
|
@@ -9542,6 +9625,7 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
|
|
|
9542
9625
|
limit?: number | undefined;
|
|
9543
9626
|
state?: string | undefined;
|
|
9544
9627
|
relationshipType?: string | undefined;
|
|
9628
|
+
cursor?: string | undefined;
|
|
9545
9629
|
fromEntity?: string | undefined;
|
|
9546
9630
|
toEntity?: string | undefined;
|
|
9547
9631
|
fromEntityCell?: string | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -302,6 +302,38 @@ declare const projectApp: hono_hono_base.HonoBase<{
|
|
|
302
302
|
};
|
|
303
303
|
};
|
|
304
304
|
}, "/secrets"> | hono_types.MergeSchemaPath<{
|
|
305
|
+
"/facets": {
|
|
306
|
+
$get: {
|
|
307
|
+
input: {
|
|
308
|
+
json?: any;
|
|
309
|
+
query?: {
|
|
310
|
+
[x: string]: string | string[];
|
|
311
|
+
} | undefined;
|
|
312
|
+
};
|
|
313
|
+
output: {
|
|
314
|
+
kind: {
|
|
315
|
+
value: string;
|
|
316
|
+
count: number;
|
|
317
|
+
}[];
|
|
318
|
+
state: {
|
|
319
|
+
value: string;
|
|
320
|
+
count: number;
|
|
321
|
+
}[];
|
|
322
|
+
owner: {
|
|
323
|
+
value: string;
|
|
324
|
+
count: number;
|
|
325
|
+
}[];
|
|
326
|
+
cell: {
|
|
327
|
+
value: string;
|
|
328
|
+
count: number;
|
|
329
|
+
}[];
|
|
330
|
+
total: number;
|
|
331
|
+
};
|
|
332
|
+
outputFormat: "json";
|
|
333
|
+
status: hono_utils_http_status.ContentfulStatusCode;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
}, "/entities"> | hono_types.MergeSchemaPath<{
|
|
305
337
|
"/": {
|
|
306
338
|
$get: {
|
|
307
339
|
input: {
|
|
@@ -8492,6 +8524,55 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
|
|
|
8492
8524
|
projectId: string;
|
|
8493
8525
|
envId: string;
|
|
8494
8526
|
}[]>;
|
|
8527
|
+
facets: SchemaFn<zod.ZodObject<{
|
|
8528
|
+
orgId: zod.ZodString;
|
|
8529
|
+
projectId: zod.ZodString;
|
|
8530
|
+
envName: zod.ZodString;
|
|
8531
|
+
kind: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
8532
|
+
state: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
8533
|
+
owner: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
8534
|
+
cell: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
8535
|
+
search: zod.ZodOptional<zod.ZodString>;
|
|
8536
|
+
cellKey: zod.ZodOptional<zod.ZodString>;
|
|
8537
|
+
}, "strip", zod.ZodTypeAny, {
|
|
8538
|
+
orgId: string;
|
|
8539
|
+
projectId: string;
|
|
8540
|
+
envName: string;
|
|
8541
|
+
search?: string | undefined;
|
|
8542
|
+
owner?: string[] | undefined;
|
|
8543
|
+
cellKey?: string | undefined;
|
|
8544
|
+
state?: string[] | undefined;
|
|
8545
|
+
cell?: string[] | undefined;
|
|
8546
|
+
kind?: string[] | undefined;
|
|
8547
|
+
}, {
|
|
8548
|
+
orgId: string;
|
|
8549
|
+
projectId: string;
|
|
8550
|
+
envName: string;
|
|
8551
|
+
search?: string | undefined;
|
|
8552
|
+
owner?: string[] | undefined;
|
|
8553
|
+
cellKey?: string | undefined;
|
|
8554
|
+
state?: string[] | undefined;
|
|
8555
|
+
cell?: string[] | undefined;
|
|
8556
|
+
kind?: string[] | undefined;
|
|
8557
|
+
}>, {
|
|
8558
|
+
kind: {
|
|
8559
|
+
value: string;
|
|
8560
|
+
count: number;
|
|
8561
|
+
}[];
|
|
8562
|
+
state: {
|
|
8563
|
+
value: string;
|
|
8564
|
+
count: number;
|
|
8565
|
+
}[];
|
|
8566
|
+
owner: {
|
|
8567
|
+
value: string;
|
|
8568
|
+
count: number;
|
|
8569
|
+
}[];
|
|
8570
|
+
cell: {
|
|
8571
|
+
value: string;
|
|
8572
|
+
count: number;
|
|
8573
|
+
}[];
|
|
8574
|
+
total: number;
|
|
8575
|
+
}>;
|
|
8495
8576
|
get: SchemaFn<zod.ZodObject<{
|
|
8496
8577
|
orgId: zod.ZodString;
|
|
8497
8578
|
projectId: zod.ZodString;
|
|
@@ -9524,6 +9605,7 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
|
|
|
9524
9605
|
fromEntityCell: zod.ZodOptional<zod.ZodString>;
|
|
9525
9606
|
toEntityCell: zod.ZodOptional<zod.ZodString>;
|
|
9526
9607
|
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
9608
|
+
cursor: zod.ZodOptional<zod.ZodString>;
|
|
9527
9609
|
}, "strip", zod.ZodTypeAny, {
|
|
9528
9610
|
orgId: string;
|
|
9529
9611
|
projectId: string;
|
|
@@ -9531,6 +9613,7 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
|
|
|
9531
9613
|
limit?: number | undefined;
|
|
9532
9614
|
state?: string | undefined;
|
|
9533
9615
|
relationshipType?: string | undefined;
|
|
9616
|
+
cursor?: string | undefined;
|
|
9534
9617
|
fromEntity?: string | undefined;
|
|
9535
9618
|
toEntity?: string | undefined;
|
|
9536
9619
|
fromEntityCell?: string | undefined;
|
|
@@ -9542,6 +9625,7 @@ declare const createClient: (baseUrl: string, options?: CreateClientOptions | To
|
|
|
9542
9625
|
limit?: number | undefined;
|
|
9543
9626
|
state?: string | undefined;
|
|
9544
9627
|
relationshipType?: string | undefined;
|
|
9628
|
+
cursor?: string | undefined;
|
|
9545
9629
|
fromEntity?: string | undefined;
|
|
9546
9630
|
toEntity?: string | undefined;
|
|
9547
9631
|
fromEntityCell?: string | undefined;
|
package/dist/index.js
CHANGED
|
@@ -484,6 +484,32 @@ function createEntitiesClient(projEnv) {
|
|
|
484
484
|
);
|
|
485
485
|
}
|
|
486
486
|
),
|
|
487
|
+
facets: withSchema(
|
|
488
|
+
import_zod3.z.object({
|
|
489
|
+
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
490
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
491
|
+
envName: import_zod3.z.string().describe("Environment name"),
|
|
492
|
+
kind: import_zod3.z.array(import_zod3.z.string()).optional().describe("Filter: entity type names"),
|
|
493
|
+
state: import_zod3.z.array(import_zod3.z.string()).optional().describe("Filter: states"),
|
|
494
|
+
owner: import_zod3.z.array(import_zod3.z.string()).optional().describe("Filter: owner label values ('' = unset)"),
|
|
495
|
+
cell: import_zod3.z.array(import_zod3.z.string()).optional().describe("Filter: cell label values ('' = unset)"),
|
|
496
|
+
search: import_zod3.z.string().optional().describe("Substring match on name + entity type"),
|
|
497
|
+
cellKey: import_zod3.z.string().optional().describe("Project cell label key; omit to skip the cell dimension")
|
|
498
|
+
}),
|
|
499
|
+
(params) => {
|
|
500
|
+
const { orgId, projectId, envName, kind, state, owner, cell, search, cellKey } = params;
|
|
501
|
+
const query = {};
|
|
502
|
+
if (kind?.length) query.kind = JSON.stringify(kind);
|
|
503
|
+
if (state?.length) query.state = JSON.stringify(state);
|
|
504
|
+
if (owner?.length) query.owner = JSON.stringify(owner);
|
|
505
|
+
if (cell?.length) query.cell = JSON.stringify(cell);
|
|
506
|
+
if (search) query.search = search;
|
|
507
|
+
if (cellKey) query.cellKey = cellKey;
|
|
508
|
+
return call(
|
|
509
|
+
projEnv(orgId, projectId, envName)["entities"]["facets"].$get({ query })
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
),
|
|
487
513
|
get: withSchema(
|
|
488
514
|
import_zod3.z.object({
|
|
489
515
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
@@ -859,7 +885,8 @@ function createRelationshipsClient(projEnv) {
|
|
|
859
885
|
toEntity: import_zod6.z.string().uuid().optional().describe("Filter by to-entity ID"),
|
|
860
886
|
fromEntityCell: import_zod6.z.string().optional().describe("Filter by from-entity cell membership"),
|
|
861
887
|
toEntityCell: import_zod6.z.string().optional().describe("Filter by to-entity cell membership"),
|
|
862
|
-
limit: import_zod6.z.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)")
|
|
888
|
+
limit: import_zod6.z.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)"),
|
|
889
|
+
cursor: import_zod6.z.string().optional().describe("Pagination cursor")
|
|
863
890
|
}),
|
|
864
891
|
(params) => {
|
|
865
892
|
const { orgId, projectId, envName, ...query } = params;
|
package/dist/index.mjs
CHANGED
package/dist/local.d.mts
CHANGED
|
@@ -1744,6 +1744,55 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
1744
1744
|
projectId: string;
|
|
1745
1745
|
envId: string;
|
|
1746
1746
|
}[]>;
|
|
1747
|
+
facets: SchemaFn<zod.ZodObject<{
|
|
1748
|
+
orgId: zod.ZodString;
|
|
1749
|
+
projectId: zod.ZodString;
|
|
1750
|
+
envName: zod.ZodString;
|
|
1751
|
+
kind: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
1752
|
+
state: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
1753
|
+
owner: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
1754
|
+
cell: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
1755
|
+
search: zod.ZodOptional<zod.ZodString>;
|
|
1756
|
+
cellKey: zod.ZodOptional<zod.ZodString>;
|
|
1757
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1758
|
+
orgId: string;
|
|
1759
|
+
projectId: string;
|
|
1760
|
+
envName: string;
|
|
1761
|
+
search?: string | undefined;
|
|
1762
|
+
owner?: string[] | undefined;
|
|
1763
|
+
cellKey?: string | undefined;
|
|
1764
|
+
state?: string[] | undefined;
|
|
1765
|
+
cell?: string[] | undefined;
|
|
1766
|
+
kind?: string[] | undefined;
|
|
1767
|
+
}, {
|
|
1768
|
+
orgId: string;
|
|
1769
|
+
projectId: string;
|
|
1770
|
+
envName: string;
|
|
1771
|
+
search?: string | undefined;
|
|
1772
|
+
owner?: string[] | undefined;
|
|
1773
|
+
cellKey?: string | undefined;
|
|
1774
|
+
state?: string[] | undefined;
|
|
1775
|
+
cell?: string[] | undefined;
|
|
1776
|
+
kind?: string[] | undefined;
|
|
1777
|
+
}>, {
|
|
1778
|
+
kind: {
|
|
1779
|
+
value: string;
|
|
1780
|
+
count: number;
|
|
1781
|
+
}[];
|
|
1782
|
+
state: {
|
|
1783
|
+
value: string;
|
|
1784
|
+
count: number;
|
|
1785
|
+
}[];
|
|
1786
|
+
owner: {
|
|
1787
|
+
value: string;
|
|
1788
|
+
count: number;
|
|
1789
|
+
}[];
|
|
1790
|
+
cell: {
|
|
1791
|
+
value: string;
|
|
1792
|
+
count: number;
|
|
1793
|
+
}[];
|
|
1794
|
+
total: number;
|
|
1795
|
+
}>;
|
|
1747
1796
|
get: SchemaFn<zod.ZodObject<{
|
|
1748
1797
|
orgId: zod.ZodString;
|
|
1749
1798
|
projectId: zod.ZodString;
|
|
@@ -2776,6 +2825,7 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
2776
2825
|
fromEntityCell: zod.ZodOptional<zod.ZodString>;
|
|
2777
2826
|
toEntityCell: zod.ZodOptional<zod.ZodString>;
|
|
2778
2827
|
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
2828
|
+
cursor: zod.ZodOptional<zod.ZodString>;
|
|
2779
2829
|
}, "strip", zod.ZodTypeAny, {
|
|
2780
2830
|
orgId: string;
|
|
2781
2831
|
projectId: string;
|
|
@@ -2783,6 +2833,7 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
2783
2833
|
limit?: number | undefined;
|
|
2784
2834
|
state?: string | undefined;
|
|
2785
2835
|
relationshipType?: string | undefined;
|
|
2836
|
+
cursor?: string | undefined;
|
|
2786
2837
|
fromEntity?: string | undefined;
|
|
2787
2838
|
toEntity?: string | undefined;
|
|
2788
2839
|
fromEntityCell?: string | undefined;
|
|
@@ -2794,6 +2845,7 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
2794
2845
|
limit?: number | undefined;
|
|
2795
2846
|
state?: string | undefined;
|
|
2796
2847
|
relationshipType?: string | undefined;
|
|
2848
|
+
cursor?: string | undefined;
|
|
2797
2849
|
fromEntity?: string | undefined;
|
|
2798
2850
|
toEntity?: string | undefined;
|
|
2799
2851
|
fromEntityCell?: string | undefined;
|
package/dist/local.d.ts
CHANGED
|
@@ -1744,6 +1744,55 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
1744
1744
|
projectId: string;
|
|
1745
1745
|
envId: string;
|
|
1746
1746
|
}[]>;
|
|
1747
|
+
facets: SchemaFn<zod.ZodObject<{
|
|
1748
|
+
orgId: zod.ZodString;
|
|
1749
|
+
projectId: zod.ZodString;
|
|
1750
|
+
envName: zod.ZodString;
|
|
1751
|
+
kind: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
1752
|
+
state: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
1753
|
+
owner: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
1754
|
+
cell: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
|
|
1755
|
+
search: zod.ZodOptional<zod.ZodString>;
|
|
1756
|
+
cellKey: zod.ZodOptional<zod.ZodString>;
|
|
1757
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1758
|
+
orgId: string;
|
|
1759
|
+
projectId: string;
|
|
1760
|
+
envName: string;
|
|
1761
|
+
search?: string | undefined;
|
|
1762
|
+
owner?: string[] | undefined;
|
|
1763
|
+
cellKey?: string | undefined;
|
|
1764
|
+
state?: string[] | undefined;
|
|
1765
|
+
cell?: string[] | undefined;
|
|
1766
|
+
kind?: string[] | undefined;
|
|
1767
|
+
}, {
|
|
1768
|
+
orgId: string;
|
|
1769
|
+
projectId: string;
|
|
1770
|
+
envName: string;
|
|
1771
|
+
search?: string | undefined;
|
|
1772
|
+
owner?: string[] | undefined;
|
|
1773
|
+
cellKey?: string | undefined;
|
|
1774
|
+
state?: string[] | undefined;
|
|
1775
|
+
cell?: string[] | undefined;
|
|
1776
|
+
kind?: string[] | undefined;
|
|
1777
|
+
}>, {
|
|
1778
|
+
kind: {
|
|
1779
|
+
value: string;
|
|
1780
|
+
count: number;
|
|
1781
|
+
}[];
|
|
1782
|
+
state: {
|
|
1783
|
+
value: string;
|
|
1784
|
+
count: number;
|
|
1785
|
+
}[];
|
|
1786
|
+
owner: {
|
|
1787
|
+
value: string;
|
|
1788
|
+
count: number;
|
|
1789
|
+
}[];
|
|
1790
|
+
cell: {
|
|
1791
|
+
value: string;
|
|
1792
|
+
count: number;
|
|
1793
|
+
}[];
|
|
1794
|
+
total: number;
|
|
1795
|
+
}>;
|
|
1747
1796
|
get: SchemaFn<zod.ZodObject<{
|
|
1748
1797
|
orgId: zod.ZodString;
|
|
1749
1798
|
projectId: zod.ZodString;
|
|
@@ -2776,6 +2825,7 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
2776
2825
|
fromEntityCell: zod.ZodOptional<zod.ZodString>;
|
|
2777
2826
|
toEntityCell: zod.ZodOptional<zod.ZodString>;
|
|
2778
2827
|
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
2828
|
+
cursor: zod.ZodOptional<zod.ZodString>;
|
|
2779
2829
|
}, "strip", zod.ZodTypeAny, {
|
|
2780
2830
|
orgId: string;
|
|
2781
2831
|
projectId: string;
|
|
@@ -2783,6 +2833,7 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
2783
2833
|
limit?: number | undefined;
|
|
2784
2834
|
state?: string | undefined;
|
|
2785
2835
|
relationshipType?: string | undefined;
|
|
2836
|
+
cursor?: string | undefined;
|
|
2786
2837
|
fromEntity?: string | undefined;
|
|
2787
2838
|
toEntity?: string | undefined;
|
|
2788
2839
|
fromEntityCell?: string | undefined;
|
|
@@ -2794,6 +2845,7 @@ declare const createLocalClient: (options?: CreateLocalClientOptions) => {
|
|
|
2794
2845
|
limit?: number | undefined;
|
|
2795
2846
|
state?: string | undefined;
|
|
2796
2847
|
relationshipType?: string | undefined;
|
|
2848
|
+
cursor?: string | undefined;
|
|
2797
2849
|
fromEntity?: string | undefined;
|
|
2798
2850
|
toEntity?: string | undefined;
|
|
2799
2851
|
fromEntityCell?: string | undefined;
|
package/dist/local.js
CHANGED
|
@@ -484,6 +484,32 @@ function createEntitiesClient(projEnv) {
|
|
|
484
484
|
);
|
|
485
485
|
}
|
|
486
486
|
),
|
|
487
|
+
facets: withSchema(
|
|
488
|
+
import_zod3.z.object({
|
|
489
|
+
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
490
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
491
|
+
envName: import_zod3.z.string().describe("Environment name"),
|
|
492
|
+
kind: import_zod3.z.array(import_zod3.z.string()).optional().describe("Filter: entity type names"),
|
|
493
|
+
state: import_zod3.z.array(import_zod3.z.string()).optional().describe("Filter: states"),
|
|
494
|
+
owner: import_zod3.z.array(import_zod3.z.string()).optional().describe("Filter: owner label values ('' = unset)"),
|
|
495
|
+
cell: import_zod3.z.array(import_zod3.z.string()).optional().describe("Filter: cell label values ('' = unset)"),
|
|
496
|
+
search: import_zod3.z.string().optional().describe("Substring match on name + entity type"),
|
|
497
|
+
cellKey: import_zod3.z.string().optional().describe("Project cell label key; omit to skip the cell dimension")
|
|
498
|
+
}),
|
|
499
|
+
(params) => {
|
|
500
|
+
const { orgId, projectId, envName, kind, state, owner, cell, search, cellKey } = params;
|
|
501
|
+
const query = {};
|
|
502
|
+
if (kind?.length) query.kind = JSON.stringify(kind);
|
|
503
|
+
if (state?.length) query.state = JSON.stringify(state);
|
|
504
|
+
if (owner?.length) query.owner = JSON.stringify(owner);
|
|
505
|
+
if (cell?.length) query.cell = JSON.stringify(cell);
|
|
506
|
+
if (search) query.search = search;
|
|
507
|
+
if (cellKey) query.cellKey = cellKey;
|
|
508
|
+
return call(
|
|
509
|
+
projEnv(orgId, projectId, envName)["entities"]["facets"].$get({ query })
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
),
|
|
487
513
|
get: withSchema(
|
|
488
514
|
import_zod3.z.object({
|
|
489
515
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
@@ -859,7 +885,8 @@ function createRelationshipsClient(projEnv) {
|
|
|
859
885
|
toEntity: import_zod6.z.string().uuid().optional().describe("Filter by to-entity ID"),
|
|
860
886
|
fromEntityCell: import_zod6.z.string().optional().describe("Filter by from-entity cell membership"),
|
|
861
887
|
toEntityCell: import_zod6.z.string().optional().describe("Filter by to-entity cell membership"),
|
|
862
|
-
limit: import_zod6.z.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)")
|
|
888
|
+
limit: import_zod6.z.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)"),
|
|
889
|
+
cursor: import_zod6.z.string().optional().describe("Pagination cursor")
|
|
863
890
|
}),
|
|
864
891
|
(params) => {
|
|
865
892
|
const { orgId, projectId, envName, ...query } = params;
|
package/dist/local.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terrantula/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "TypeScript SDK for Terrantula — the multi-tenant entity-graph control plane that herds Terraform/OpenTofu cattle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"terrantula",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"test": "bun test"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@terrantula/local": "^0.
|
|
64
|
-
"@terrantula/types": "^0.
|
|
63
|
+
"@terrantula/local": "^0.4.0",
|
|
64
|
+
"@terrantula/types": "^0.4.0",
|
|
65
65
|
"hono": "^4.4.0",
|
|
66
66
|
"zod": "^3.22.0"
|
|
67
67
|
},
|