@sixb/server 0.1.3 → 0.1.5
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/README.md +1 -1
- package/dist/index.js +1127 -937
- package/dist/index.js.map +17 -15
- package/dist/openapi/tags.d.ts +6 -2
- package/dist/openapi/tags.d.ts.map +1 -1
- package/dist/registerRoutes.d.ts.map +1 -1
- package/dist/routes/actions.d.ts +2 -1
- package/dist/routes/actions.d.ts.map +1 -1
- package/dist/routes/agents.d.ts +15 -0
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/links.d.ts +0 -51
- package/dist/routes/links.d.ts.map +1 -1
- package/dist/routes/logs.d.ts +1 -1
- package/dist/routes/models.d.ts +60 -0
- package/dist/routes/models.d.ts.map +1 -0
- package/dist/routes/objects.d.ts +48 -0
- package/dist/routes/objects.d.ts.map +1 -1
- package/dist/routes/projections.d.ts +88 -86
- package/dist/routes/projections.d.ts.map +1 -1
- package/dist/routes/syncs.d.ts +32 -32
- package/dist/schemas/actions.d.ts +92 -0
- package/dist/schemas/actions.d.ts.map +1 -1
- package/dist/schemas/agents.d.ts +127 -0
- package/dist/schemas/agents.d.ts.map +1 -1
- package/dist/schemas/ai-accounting.d.ts +26 -26
- package/dist/schemas/connectors.d.ts +11 -1
- package/dist/schemas/connectors.d.ts.map +1 -1
- package/dist/schemas/links.d.ts +0 -41
- package/dist/schemas/links.d.ts.map +1 -1
- package/dist/schemas/logs.d.ts +4 -4
- package/dist/schemas/models.d.ts +50 -0
- package/dist/schemas/models.d.ts.map +1 -0
- package/dist/schemas/objects.d.ts +22 -0
- package/dist/schemas/objects.d.ts.map +1 -1
- package/dist/schemas/projections.d.ts +542 -513
- package/dist/schemas/projections.d.ts.map +1 -1
- package/dist/schemas/syncs.d.ts +23 -23
- package/package.json +4 -4
- package/src/openapi/tags.ts +4 -0
- package/src/registerRoutes.ts +2 -0
- package/src/routes/actions.ts +18 -3
- package/src/routes/agents.ts +21 -3
- package/src/routes/links.ts +2 -53
- package/src/routes/models.ts +31 -0
- package/src/routes/objects.ts +103 -0
- package/src/schemas/actions.ts +5 -0
- package/src/schemas/agents.ts +15 -0
- package/src/schemas/connectors.ts +13 -3
- package/src/schemas/links.ts +0 -17
- package/src/schemas/models.ts +15 -0
- package/src/schemas/objects.ts +104 -0
- package/src/schemas/projections.ts +6 -3
package/src/schemas/objects.ts
CHANGED
|
@@ -194,6 +194,19 @@ export const ObjectQuerySchema: z.ZodType<unknown> = z.lazy(() =>
|
|
|
194
194
|
includeSubtypes: z.boolean().optional(),
|
|
195
195
|
})
|
|
196
196
|
.strict(),
|
|
197
|
+
z
|
|
198
|
+
.object({
|
|
199
|
+
kind: z.literal("refs"),
|
|
200
|
+
refs: z.array(
|
|
201
|
+
z
|
|
202
|
+
.object({
|
|
203
|
+
objectTypeId: z.string().min(1),
|
|
204
|
+
primaryId: z.string().min(1),
|
|
205
|
+
})
|
|
206
|
+
.strict()
|
|
207
|
+
),
|
|
208
|
+
})
|
|
209
|
+
.strict(),
|
|
197
210
|
z
|
|
198
211
|
.object({
|
|
199
212
|
kind: z.literal("filter"),
|
|
@@ -306,6 +319,17 @@ export const ObjectQueryFacetsRequestSchema = z
|
|
|
306
319
|
})
|
|
307
320
|
.strict()
|
|
308
321
|
|
|
322
|
+
export const ObjectQueryLinksRequestSchema = z
|
|
323
|
+
.object({
|
|
324
|
+
query: ObjectQuerySchema,
|
|
325
|
+
direction: z.enum(["outgoing", "incoming", "both"]).default("both"),
|
|
326
|
+
linkId: z.string().min(1).optional(),
|
|
327
|
+
includeObjects: z.boolean().default(false),
|
|
328
|
+
pageSize: z.number().int().positive().max(1_000).default(100),
|
|
329
|
+
pageToken: z.string().min(1).optional(),
|
|
330
|
+
})
|
|
331
|
+
.strict()
|
|
332
|
+
|
|
309
333
|
export const TwinObjectSchema = z.object({
|
|
310
334
|
primaryId: z.string(),
|
|
311
335
|
objectTypeId: z.string(),
|
|
@@ -326,6 +350,7 @@ const objectQueryRef = { $ref: "#/components/schemas/ObjectQuery" }
|
|
|
326
350
|
const objectQueryPredicateRef = { $ref: "#/components/schemas/ObjectQueryPredicate" }
|
|
327
351
|
const objectQuerySortFieldRef = { $ref: "#/components/schemas/ObjectQuerySortField" }
|
|
328
352
|
const objectExpansionRef = { $ref: "#/components/schemas/ObjectExpansion" }
|
|
353
|
+
const objectRefSchemaRef = { $ref: "#/components/schemas/ObjectRef" }
|
|
329
354
|
|
|
330
355
|
/**
|
|
331
356
|
* zod-to-json-schema currently drops recursive z.lazy schemas when the server's
|
|
@@ -476,6 +501,39 @@ export const ObjectQueryOpenApiSchemas = {
|
|
|
476
501
|
plan: { $ref: "#/components/schemas/ObjectQueryPlanSummary" },
|
|
477
502
|
},
|
|
478
503
|
},
|
|
504
|
+
ObjectQueryLink: {
|
|
505
|
+
type: "object",
|
|
506
|
+
required: ["source", "linkId", "target", "createdAt", "updatedAt"],
|
|
507
|
+
additionalProperties: false,
|
|
508
|
+
properties: {
|
|
509
|
+
source: objectRefSchemaRef,
|
|
510
|
+
linkId: { type: "string" },
|
|
511
|
+
target: objectRefSchemaRef,
|
|
512
|
+
properties: { type: "object", additionalProperties: true },
|
|
513
|
+
createdAt: { type: "string" },
|
|
514
|
+
updatedAt: { type: "string" },
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
ObjectQueryLinksResponse: {
|
|
518
|
+
type: "object",
|
|
519
|
+
required: ["objects", "links", "hasMore"],
|
|
520
|
+
additionalProperties: false,
|
|
521
|
+
properties: {
|
|
522
|
+
objects: {
|
|
523
|
+
type: "array",
|
|
524
|
+
description:
|
|
525
|
+
"Selected objects followed by visible endpoint objects from this link page, de-duplicated. Empty unless includeObjects is true.",
|
|
526
|
+
items: { $ref: "#/components/schemas/ObjectQueryObject" },
|
|
527
|
+
},
|
|
528
|
+
links: {
|
|
529
|
+
type: "array",
|
|
530
|
+
description: "Visible physical links in deterministic identity order.",
|
|
531
|
+
items: { $ref: "#/components/schemas/ObjectQueryLink" },
|
|
532
|
+
},
|
|
533
|
+
hasMore: { type: "boolean" },
|
|
534
|
+
nextPageToken: { type: "string" },
|
|
535
|
+
},
|
|
536
|
+
},
|
|
479
537
|
ObjectQueryErrorResponse: {
|
|
480
538
|
type: "object",
|
|
481
539
|
required: ["error"],
|
|
@@ -535,6 +593,37 @@ export const ObjectQueryOpenApiSchemas = {
|
|
|
535
593
|
},
|
|
536
594
|
},
|
|
537
595
|
},
|
|
596
|
+
ObjectQueryLinksRequest: {
|
|
597
|
+
type: "object",
|
|
598
|
+
required: ["query"],
|
|
599
|
+
additionalProperties: false,
|
|
600
|
+
properties: {
|
|
601
|
+
query: objectQueryRef,
|
|
602
|
+
direction: { type: "string", enum: ["outgoing", "incoming", "both"], default: "both" },
|
|
603
|
+
linkId: { type: "string", minLength: 1 },
|
|
604
|
+
includeObjects: {
|
|
605
|
+
type: "boolean",
|
|
606
|
+
default: false,
|
|
607
|
+
description: "Include selected objects and visible endpoints from the current link page.",
|
|
608
|
+
},
|
|
609
|
+
pageSize: { type: "integer", minimum: 1, maximum: 1_000, default: 100 },
|
|
610
|
+
pageToken: {
|
|
611
|
+
type: "string",
|
|
612
|
+
minLength: 1,
|
|
613
|
+
description:
|
|
614
|
+
"Opaque token from the previous page. The project, normalized query, direction, and linkId must remain unchanged.",
|
|
615
|
+
},
|
|
616
|
+
},
|
|
617
|
+
},
|
|
618
|
+
ObjectRef: {
|
|
619
|
+
type: "object",
|
|
620
|
+
required: ["objectTypeId", "primaryId"],
|
|
621
|
+
additionalProperties: false,
|
|
622
|
+
properties: {
|
|
623
|
+
objectTypeId: { type: "string", minLength: 1 },
|
|
624
|
+
primaryId: { type: "string", minLength: 1 },
|
|
625
|
+
},
|
|
626
|
+
},
|
|
538
627
|
ObjectQuery: {
|
|
539
628
|
oneOf: [
|
|
540
629
|
{
|
|
@@ -547,6 +636,21 @@ export const ObjectQueryOpenApiSchemas = {
|
|
|
547
636
|
includeSubtypes: { type: "boolean" },
|
|
548
637
|
},
|
|
549
638
|
},
|
|
639
|
+
{
|
|
640
|
+
type: "object",
|
|
641
|
+
required: ["kind", "refs"],
|
|
642
|
+
additionalProperties: false,
|
|
643
|
+
properties: {
|
|
644
|
+
kind: { type: "string", enum: ["refs"] },
|
|
645
|
+
refs: {
|
|
646
|
+
type: "array",
|
|
647
|
+
minItems: 1,
|
|
648
|
+
description:
|
|
649
|
+
"One to 1,000 unique identities after normalization; duplicate entries are accepted and removed.",
|
|
650
|
+
items: objectRefSchemaRef,
|
|
651
|
+
},
|
|
652
|
+
},
|
|
653
|
+
},
|
|
550
654
|
{
|
|
551
655
|
type: "object",
|
|
552
656
|
required: ["kind", "input", "predicate"],
|
|
@@ -115,12 +115,15 @@ export const TelemetryProjectionSchema = z.object({
|
|
|
115
115
|
_tag: z.literal("TelemetryProjectionDefinition"),
|
|
116
116
|
id: z.string(),
|
|
117
117
|
objectTypeId: z.string(),
|
|
118
|
-
propertyId: z.string(),
|
|
119
118
|
datasetId: z.string(),
|
|
120
119
|
objectIdField: z.string(),
|
|
121
120
|
atField: z.string(),
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
properties: z.record(
|
|
122
|
+
z.object({
|
|
123
|
+
valueField: z.string(),
|
|
124
|
+
unitField: z.string().optional(),
|
|
125
|
+
})
|
|
126
|
+
),
|
|
124
127
|
latestRun: ProjectionRunSchema.nullable(),
|
|
125
128
|
})
|
|
126
129
|
|