@inf-monkeys-tech/monkeys 1.1.55 → 1.1.57
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/lib/contracts/artifact-platform.d.ts +495 -0
- package/lib/contracts/artifact-platform.d.ts.map +1 -0
- package/lib/contracts/artifact-platform.js +311 -0
- package/lib/contracts/artifact-platform.js.map +1 -0
- package/lib/contracts/declarative-control-http.d.ts +398 -398
- package/lib/contracts/declarative-control.d.ts +41 -41
- package/lib/contracts/declarative-diagnostic.d.ts +2 -2
- package/lib/contracts/declarative-document-import.d.ts +7 -7
- package/lib/contracts/declarative-publication-job.d.ts +111 -111
- package/lib/contracts/declarative-publication-verification.d.ts +1 -1
- package/lib/contracts/design-board.d.ts +6 -6
- package/lib/contracts/engineering-artifacts.d.ts +359 -0
- package/lib/contracts/engineering-artifacts.d.ts.map +1 -0
- package/lib/contracts/engineering-artifacts.js +191 -0
- package/lib/contracts/engineering-artifacts.js.map +1 -0
- package/lib/contracts/index.d.ts +2 -0
- package/lib/contracts/index.d.ts.map +1 -1
- package/lib/contracts/index.js +2 -0
- package/lib/contracts/index.js.map +1 -1
- package/lib/contracts/menu.d.ts +10 -10
- package/lib/contracts/page-expression.d.ts +1 -1
- package/lib/contracts/render.d.ts +22 -22
- package/lib/contracts/tenant.d.ts +8 -8
- package/lib/contracts/theme.d.ts +1 -1
- package/lib/contracts/workflow-definition.d.ts +4 -4
- package/lib/esm/{chunk-66A4GGOV.mjs → chunk-5ZGNWCL4.mjs} +466 -307
- package/lib/esm/chunk-5ZGNWCL4.mjs.map +1 -0
- package/lib/esm/{chunk-RMZW3SVL.mjs → chunk-C3X5SSRD.mjs} +3 -3
- package/lib/esm/chunk-C3X5SSRD.mjs.map +1 -0
- package/lib/esm/{chunk-DIIMDX7F.mjs → chunk-FIZWECL6.mjs} +2878 -2609
- package/lib/esm/chunk-FIZWECL6.mjs.map +1 -0
- package/lib/esm/{chunk-TROZIHS4.mjs → chunk-HJNQDSLC.mjs} +2 -2
- package/lib/esm/{chunk-E6YPJ4DR.mjs → chunk-USWQ4YP5.mjs} +2 -2
- package/lib/esm/{chunk-ITGLKSCE.mjs → chunk-VYC47WKJ.mjs} +540 -3
- package/lib/esm/chunk-VYC47WKJ.mjs.map +1 -0
- package/lib/esm/contracts/index.mjs +66 -4
- package/lib/esm/index.mjs +86 -6
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +21 -3
- package/lib/esm/schemas/index.mjs +63 -3
- package/lib/runtime/artifact-session.d.ts +54 -0
- package/lib/runtime/artifact-session.d.ts.map +1 -0
- package/lib/runtime/artifact-session.js +541 -0
- package/lib/runtime/artifact-session.js.map +1 -0
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.d.ts.map +1 -1
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/runtime-definition-wire.d.ts +44 -44
- package/lib/schemas/index.d.ts +48 -46
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +40 -8
- package/lib/schemas/index.js.map +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-66A4GGOV.mjs.map +0 -1
- package/lib/esm/chunk-DIIMDX7F.mjs.map +0 -1
- package/lib/esm/chunk-ITGLKSCE.mjs.map +0 -1
- package/lib/esm/chunk-RMZW3SVL.mjs.map +0 -1
- /package/lib/esm/{chunk-TROZIHS4.mjs.map → chunk-HJNQDSLC.mjs.map} +0 -0
- /package/lib/esm/{chunk-E6YPJ4DR.mjs.map → chunk-USWQ4YP5.mjs.map} +0 -0
|
@@ -7,13 +7,14 @@ import {
|
|
|
7
7
|
JsonObjectSchema,
|
|
8
8
|
JsonValueSchema,
|
|
9
9
|
LineageRecordSchema,
|
|
10
|
+
LocalizedTextSchema,
|
|
10
11
|
NavigationSchema,
|
|
11
12
|
PageSchema,
|
|
12
13
|
ProductSurfaceSchema,
|
|
13
14
|
RevisionRefSchema,
|
|
14
15
|
Sha256Schema,
|
|
15
16
|
TenantScopeSchema
|
|
16
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FIZWECL6.mjs";
|
|
17
18
|
|
|
18
19
|
// src/contracts/artifact.ts
|
|
19
20
|
import { z } from "zod";
|
|
@@ -62,82 +63,228 @@ var OutputRecordSchema = z.object({
|
|
|
62
63
|
createdAt: IsoDateTimeSchema
|
|
63
64
|
}).strict();
|
|
64
65
|
|
|
65
|
-
// src/contracts/
|
|
66
|
+
// src/contracts/engineering-artifacts.ts
|
|
66
67
|
import { z as z2 } from "zod";
|
|
67
|
-
var
|
|
68
|
-
var
|
|
68
|
+
var FileUriSchema = z2.string().trim().regex(/^file:\/\/[a-zA-Z0-9._:/-]+$/, "Expected a durable file:// canonical URI.");
|
|
69
|
+
var Vec3Schema = z2.object({
|
|
70
|
+
x: z2.number().finite(),
|
|
71
|
+
y: z2.number().finite(),
|
|
72
|
+
z: z2.number().finite()
|
|
73
|
+
}).strict();
|
|
74
|
+
var Transform3DSchema = z2.object({
|
|
75
|
+
position: Vec3Schema.default({ x: 0, y: 0, z: 0 }),
|
|
76
|
+
rotationEulerDeg: Vec3Schema.default({ x: 0, y: 0, z: 0 }),
|
|
77
|
+
scale: Vec3Schema.default({ x: 1, y: 1, z: 1 })
|
|
78
|
+
}).strict();
|
|
79
|
+
var CadFeatureNodeSchema = z2.object({
|
|
80
|
+
id: ContractIdentifierSchema,
|
|
81
|
+
parentId: ContractIdentifierSchema.nullable().default(null),
|
|
82
|
+
order: z2.number().int().nonnegative().default(0),
|
|
83
|
+
kind: z2.enum([
|
|
84
|
+
"part",
|
|
85
|
+
"subassembly",
|
|
86
|
+
"sketch",
|
|
87
|
+
"extrude",
|
|
88
|
+
"revolve",
|
|
89
|
+
"fillet",
|
|
90
|
+
"chamfer",
|
|
91
|
+
"boolean",
|
|
92
|
+
"hole",
|
|
93
|
+
"pattern",
|
|
94
|
+
"import-brep",
|
|
95
|
+
"reference-plane"
|
|
96
|
+
]),
|
|
97
|
+
name: z2.string().trim().min(1).max(256),
|
|
98
|
+
suppressed: z2.boolean().default(false),
|
|
99
|
+
parameters: JsonObjectSchema.default({}),
|
|
100
|
+
transform: Transform3DSchema.optional(),
|
|
101
|
+
/** Optional Ontology Record ID linking to an external standard part or material */
|
|
102
|
+
partRecordId: ContractIdentifierSchema.optional(),
|
|
103
|
+
materialRecordId: ContractIdentifierSchema.optional(),
|
|
104
|
+
/** Content-addressed derived/imported geometry blobs */
|
|
105
|
+
brepFileUri: FileUriSchema.optional(),
|
|
106
|
+
meshFileUri: FileUriSchema.optional()
|
|
107
|
+
}).strict();
|
|
108
|
+
var CadConstraintSchema = z2.object({
|
|
109
|
+
id: ContractIdentifierSchema,
|
|
110
|
+
kind: z2.enum(["coincident", "concentric", "parallel", "perpendicular", "distance", "angle", "tangent", "fixed"]),
|
|
111
|
+
sourceNodeId: ContractIdentifierSchema,
|
|
112
|
+
targetNodeId: ContractIdentifierSchema,
|
|
113
|
+
value: z2.number().finite().optional(),
|
|
114
|
+
unit: z2.enum(["mm", "cm", "m", "in", "deg", "rad"]).optional(),
|
|
115
|
+
suppressed: z2.boolean().default(false)
|
|
116
|
+
}).strict();
|
|
117
|
+
var CadAnnotationPinSchema = z2.object({
|
|
118
|
+
id: ContractIdentifierSchema,
|
|
119
|
+
nodeId: ContractIdentifierSchema.optional(),
|
|
120
|
+
position: Vec3Schema,
|
|
121
|
+
normal: Vec3Schema.optional(),
|
|
122
|
+
text: z2.string().trim().min(1).max(2e3),
|
|
123
|
+
resolved: z2.boolean().default(false)
|
|
124
|
+
}).strict();
|
|
125
|
+
var CadArtifactDocumentSchema = z2.object({
|
|
126
|
+
contract: z2.literal("CadArtifactDocument"),
|
|
127
|
+
schemaVersion: z2.literal(1),
|
|
128
|
+
unit: z2.enum(["mm", "cm", "m", "in"]).default("mm"),
|
|
129
|
+
artifactId: ContractIdentifierSchema,
|
|
130
|
+
title: LocalizedTextSchema.optional(),
|
|
131
|
+
features: z2.array(CadFeatureNodeSchema).max(5e4).default([]),
|
|
132
|
+
constraints: z2.array(CadConstraintSchema).max(5e4).default([]),
|
|
133
|
+
annotations: z2.array(CadAnnotationPinSchema).max(5e3).default([]),
|
|
134
|
+
derivedBlobs: z2.object({
|
|
135
|
+
stepFileUri: FileUriSchema.optional(),
|
|
136
|
+
glbFileUri: FileUriSchema.optional(),
|
|
137
|
+
thumbnailFileUri: FileUriSchema.optional()
|
|
138
|
+
}).strict().default({})
|
|
139
|
+
}).strict();
|
|
140
|
+
var EdaSheetSchema = z2.object({
|
|
141
|
+
id: ContractIdentifierSchema,
|
|
142
|
+
name: z2.string().trim().min(1).max(256),
|
|
143
|
+
order: z2.number().int().nonnegative().default(0),
|
|
144
|
+
parentSheetId: ContractIdentifierSchema.nullable().default(null),
|
|
145
|
+
widthMm: z2.number().positive().default(297),
|
|
146
|
+
heightMm: z2.number().positive().default(210)
|
|
147
|
+
}).strict();
|
|
148
|
+
var EdaComponentInstanceSchema = z2.object({
|
|
149
|
+
id: ContractIdentifierSchema,
|
|
150
|
+
designator: z2.string().trim().min(1).max(64),
|
|
151
|
+
sheetId: ContractIdentifierSchema,
|
|
152
|
+
/** Ontology Record ID in enterprise Electronic Components Library */
|
|
153
|
+
libraryComponentRecordId: ContractIdentifierSchema.optional(),
|
|
154
|
+
symbolRef: ContractIdentifierSchema,
|
|
155
|
+
footprintRef: ContractIdentifierSchema.optional(),
|
|
156
|
+
value: z2.string().trim().max(256).optional(),
|
|
157
|
+
schematicPosition: z2.object({ x: z2.number().finite(), y: z2.number().finite(), rotationDeg: z2.number().finite().default(0) }).strict(),
|
|
158
|
+
pcbPlacement: z2.object({
|
|
159
|
+
xMm: z2.number().finite(),
|
|
160
|
+
yMm: z2.number().finite(),
|
|
161
|
+
rotationDeg: z2.number().finite().default(0),
|
|
162
|
+
side: z2.enum(["top", "bottom"]).default("top"),
|
|
163
|
+
locked: z2.boolean().default(false)
|
|
164
|
+
}).strict().optional(),
|
|
165
|
+
properties: JsonObjectSchema.default({})
|
|
166
|
+
}).strict();
|
|
167
|
+
var EdaNetSchema = z2.object({
|
|
168
|
+
id: ContractIdentifierSchema,
|
|
169
|
+
name: z2.string().trim().min(1).max(256),
|
|
170
|
+
netClass: z2.string().trim().max(128).default("default"),
|
|
171
|
+
pins: z2.array(
|
|
172
|
+
z2.object({
|
|
173
|
+
componentId: ContractIdentifierSchema,
|
|
174
|
+
pinNumber: z2.string().trim().min(1).max(32)
|
|
175
|
+
}).strict()
|
|
176
|
+
).max(1e4).default([])
|
|
177
|
+
}).strict();
|
|
178
|
+
var EdaWireSchema = z2.object({
|
|
179
|
+
id: ContractIdentifierSchema,
|
|
180
|
+
sheetId: ContractIdentifierSchema,
|
|
181
|
+
netId: ContractIdentifierSchema.optional(),
|
|
182
|
+
points: z2.array(z2.object({ x: z2.number().finite(), y: z2.number().finite() }).strict()).min(2).max(1e3)
|
|
183
|
+
}).strict();
|
|
184
|
+
var EdaPcbTraceSchema = z2.object({
|
|
185
|
+
id: ContractIdentifierSchema,
|
|
186
|
+
netId: ContractIdentifierSchema,
|
|
187
|
+
layer: z2.string().trim().min(1).max(64),
|
|
188
|
+
widthMm: z2.number().positive(),
|
|
189
|
+
points: z2.array(z2.object({ xMm: z2.number().finite(), yMm: z2.number().finite() }).strict()).min(2).max(1e3)
|
|
190
|
+
}).strict();
|
|
191
|
+
var EdaCircuitDocumentSchema = z2.object({
|
|
192
|
+
contract: z2.literal("EdaCircuitDocument"),
|
|
193
|
+
schemaVersion: z2.literal(1),
|
|
194
|
+
artifactId: ContractIdentifierSchema,
|
|
195
|
+
title: LocalizedTextSchema.optional(),
|
|
196
|
+
sheets: z2.array(EdaSheetSchema).min(1).max(500),
|
|
197
|
+
components: z2.array(EdaComponentInstanceSchema).max(5e4).default([]),
|
|
198
|
+
nets: z2.array(EdaNetSchema).max(5e4).default([]),
|
|
199
|
+
wires: z2.array(EdaWireSchema).max(1e5).default([]),
|
|
200
|
+
pcb: z2.object({
|
|
201
|
+
layerCount: z2.number().int().min(1).max(64).default(2),
|
|
202
|
+
outlinePointsMm: z2.array(z2.object({ xMm: z2.number().finite(), yMm: z2.number().finite() }).strict()).default([]),
|
|
203
|
+
traces: z2.array(EdaPcbTraceSchema).max(2e5).default([])
|
|
204
|
+
}).strict().default({ layerCount: 2, outlinePointsMm: [], traces: [] }),
|
|
205
|
+
derivedBlobs: z2.object({
|
|
206
|
+
gerberZipFileUri: FileUriSchema.optional(),
|
|
207
|
+
board3dGlbFileUri: FileUriSchema.optional(),
|
|
208
|
+
bomCsvFileUri: FileUriSchema.optional()
|
|
209
|
+
}).strict().default({})
|
|
210
|
+
}).strict();
|
|
211
|
+
|
|
212
|
+
// src/contracts/aggregate-commit.ts
|
|
213
|
+
import { z as z3 } from "zod";
|
|
214
|
+
var AggregateIdentifierSchema = z3.string().trim().min(1).max(128);
|
|
215
|
+
var AggregateRequestIdentifierSchema = z3.string().trim().min(1).max(256);
|
|
69
216
|
var AggregateMutationsLimit = 500;
|
|
70
|
-
var AggregateAssetSchema =
|
|
217
|
+
var AggregateAssetSchema = z3.object({
|
|
71
218
|
id: AggregateIdentifierSchema,
|
|
72
|
-
name:
|
|
219
|
+
name: z3.string().trim().min(1).max(500),
|
|
73
220
|
asset_type: AggregateIdentifierSchema,
|
|
74
221
|
primary_content: JsonObjectSchema,
|
|
75
|
-
status:
|
|
222
|
+
status: z3.string().trim().min(1).max(64).optional(),
|
|
76
223
|
creator_user_id: AggregateIdentifierSchema.optional(),
|
|
77
224
|
properties: JsonObjectSchema.optional(),
|
|
78
|
-
files:
|
|
79
|
-
media:
|
|
80
|
-
thumbnail:
|
|
225
|
+
files: z3.array(JsonObjectSchema).max(100).optional(),
|
|
226
|
+
media: z3.string().max(4096).optional(),
|
|
227
|
+
thumbnail: z3.string().max(4096).optional(),
|
|
81
228
|
media_ref: JsonObjectSchema.optional(),
|
|
82
|
-
keywords:
|
|
229
|
+
keywords: z3.string().max(2e3).optional(),
|
|
83
230
|
extra: JsonObjectSchema.optional(),
|
|
84
|
-
sort:
|
|
231
|
+
sort: z3.number().int().nonnegative().optional()
|
|
85
232
|
}).strict();
|
|
86
|
-
var AggregateAssetUpsertSchema =
|
|
233
|
+
var AggregateAssetUpsertSchema = z3.object({
|
|
87
234
|
ontology_id: AggregateIdentifierSchema,
|
|
88
235
|
asset: AggregateAssetSchema,
|
|
89
|
-
tag_ids:
|
|
236
|
+
tag_ids: z3.array(AggregateIdentifierSchema).max(200).optional()
|
|
90
237
|
}).strict();
|
|
91
|
-
var AggregateAssetDeleteSchema =
|
|
238
|
+
var AggregateAssetDeleteSchema = z3.object({
|
|
92
239
|
ontology_id: AggregateIdentifierSchema,
|
|
93
240
|
asset_id: AggregateIdentifierSchema
|
|
94
241
|
}).strict();
|
|
95
|
-
var AggregateFeatureValueWriteSchema =
|
|
242
|
+
var AggregateFeatureValueWriteSchema = z3.object({
|
|
96
243
|
ontology_id: AggregateIdentifierSchema,
|
|
97
244
|
asset_id: AggregateIdentifierSchema,
|
|
98
245
|
column_id: AggregateIdentifierSchema,
|
|
99
|
-
value_text:
|
|
246
|
+
value_text: z3.string().max(1e6).nullable()
|
|
100
247
|
}).strict();
|
|
101
|
-
var AggregateFeatureRelationTargetSchema =
|
|
248
|
+
var AggregateFeatureRelationTargetSchema = z3.object({
|
|
102
249
|
ontology_id: AggregateIdentifierSchema,
|
|
103
250
|
asset_id: AggregateIdentifierSchema
|
|
104
251
|
}).strict();
|
|
105
|
-
var AggregateFeatureRelationReplaceSchema =
|
|
252
|
+
var AggregateFeatureRelationReplaceSchema = z3.object({
|
|
106
253
|
ontology_id: AggregateIdentifierSchema,
|
|
107
254
|
asset_id: AggregateIdentifierSchema,
|
|
108
255
|
column_id: AggregateIdentifierSchema,
|
|
109
|
-
targets:
|
|
256
|
+
targets: z3.array(AggregateFeatureRelationTargetSchema).max(AggregateMutationsLimit)
|
|
110
257
|
}).strict();
|
|
111
|
-
var AggregateAssetRelationObjectSchema =
|
|
112
|
-
object_kind:
|
|
113
|
-
object_id:
|
|
258
|
+
var AggregateAssetRelationObjectSchema = z3.object({
|
|
259
|
+
object_kind: z3.string().trim().min(1).max(64),
|
|
260
|
+
object_id: z3.string().trim().min(1).max(256),
|
|
114
261
|
properties: JsonObjectSchema.optional()
|
|
115
262
|
}).strict();
|
|
116
|
-
var AggregateAssetRelationReplaceSchema =
|
|
263
|
+
var AggregateAssetRelationReplaceSchema = z3.object({
|
|
117
264
|
ontology_id: AggregateIdentifierSchema,
|
|
118
265
|
asset_id: AggregateIdentifierSchema,
|
|
119
|
-
relation_kind:
|
|
120
|
-
objects:
|
|
266
|
+
relation_kind: z3.string().trim().min(1).max(64),
|
|
267
|
+
objects: z3.array(AggregateAssetRelationObjectSchema).max(AggregateMutationsLimit)
|
|
121
268
|
}).strict();
|
|
122
|
-
var AggregateContainerMembershipWriteSchema =
|
|
269
|
+
var AggregateContainerMembershipWriteSchema = z3.object({
|
|
123
270
|
ontology_id: AggregateIdentifierSchema,
|
|
124
271
|
container_view_id: AggregateIdentifierSchema,
|
|
125
272
|
asset_id: AggregateIdentifierSchema,
|
|
126
|
-
present:
|
|
273
|
+
present: z3.boolean()
|
|
127
274
|
}).strict();
|
|
128
|
-
var AggregateCommitRequestSchema =
|
|
129
|
-
contract:
|
|
275
|
+
var AggregateCommitRequestSchema = z3.object({
|
|
276
|
+
contract: z3.literal("AggregateCommitRequest"),
|
|
130
277
|
aggregate_id: AggregateIdentifierSchema,
|
|
131
278
|
request_id: AggregateRequestIdentifierSchema,
|
|
132
279
|
idempotency_key: AggregateIdentifierSchema,
|
|
133
280
|
expected_head_commit_id: AggregateIdentifierSchema.optional(),
|
|
134
|
-
message:
|
|
135
|
-
assets:
|
|
136
|
-
asset_deletes:
|
|
137
|
-
feature_values:
|
|
138
|
-
feature_relations:
|
|
139
|
-
asset_relations:
|
|
140
|
-
container_memberships:
|
|
281
|
+
message: z3.string().trim().max(500).optional(),
|
|
282
|
+
assets: z3.array(AggregateAssetUpsertSchema).max(AggregateMutationsLimit).optional(),
|
|
283
|
+
asset_deletes: z3.array(AggregateAssetDeleteSchema).max(AggregateMutationsLimit).optional(),
|
|
284
|
+
feature_values: z3.array(AggregateFeatureValueWriteSchema).max(AggregateMutationsLimit).optional(),
|
|
285
|
+
feature_relations: z3.array(AggregateFeatureRelationReplaceSchema).max(AggregateMutationsLimit).optional(),
|
|
286
|
+
asset_relations: z3.array(AggregateAssetRelationReplaceSchema).max(AggregateMutationsLimit).optional(),
|
|
287
|
+
container_memberships: z3.array(AggregateContainerMembershipWriteSchema).max(AggregateMutationsLimit).optional()
|
|
141
288
|
}).strict().superRefine((request, context) => {
|
|
142
289
|
const mutationCount = (request.assets?.length ?? 0) + (request.asset_deletes?.length ?? 0) + (request.feature_values?.length ?? 0) + (request.feature_relations?.length ?? 0) + (request.asset_relations?.length ?? 0) + (request.container_memberships?.length ?? 0);
|
|
143
290
|
if (mutationCount === 0) {
|
|
@@ -146,38 +293,38 @@ var AggregateCommitRequestSchema = z2.object({
|
|
|
146
293
|
});
|
|
147
294
|
|
|
148
295
|
// src/contracts/context.ts
|
|
149
|
-
import { z as
|
|
150
|
-
var ActorRefSchema =
|
|
151
|
-
kind:
|
|
296
|
+
import { z as z4 } from "zod";
|
|
297
|
+
var ActorRefSchema = z4.object({
|
|
298
|
+
kind: z4.enum(["human", "agent", "service", "tenant", "public"]),
|
|
152
299
|
id: ContractIdentifierSchema.optional(),
|
|
153
300
|
userId: ContractIdentifierSchema.optional(),
|
|
154
301
|
agentId: ContractIdentifierSchema.optional(),
|
|
155
302
|
serviceId: ContractIdentifierSchema.optional()
|
|
156
303
|
}).strict();
|
|
157
|
-
var AuthorityScopeSchema =
|
|
304
|
+
var AuthorityScopeSchema = z4.object({
|
|
158
305
|
resource: ContractIdentifierSchema,
|
|
159
|
-
actions:
|
|
160
|
-
constraints:
|
|
306
|
+
actions: z4.array(ContractIdentifierSchema).min(1),
|
|
307
|
+
constraints: z4.record(z4.string(), JsonValueSchema).optional()
|
|
161
308
|
}).strict();
|
|
162
|
-
var RequestScopeSchema =
|
|
163
|
-
contract:
|
|
309
|
+
var RequestScopeSchema = z4.object({
|
|
310
|
+
contract: z4.literal("RequestScope"),
|
|
164
311
|
requestId: ContractIdentifierSchema,
|
|
165
312
|
traceId: ContractIdentifierSchema.optional(),
|
|
166
313
|
appId: ContractIdentifierSchema,
|
|
167
314
|
tenantId: ContractIdentifierSchema.optional(),
|
|
168
315
|
teamId: ContractIdentifierSchema.optional(),
|
|
169
316
|
actor: ActorRefSchema,
|
|
170
|
-
session:
|
|
317
|
+
session: z4.object({
|
|
171
318
|
authType: ContractIdentifierSchema,
|
|
172
|
-
authenticated:
|
|
173
|
-
membershipVerified:
|
|
319
|
+
authenticated: z4.boolean(),
|
|
320
|
+
membershipVerified: z4.boolean()
|
|
174
321
|
}).strict(),
|
|
175
|
-
permissionCodes:
|
|
176
|
-
authority:
|
|
322
|
+
permissionCodes: z4.array(ContractIdentifierSchema).default([]),
|
|
323
|
+
authority: z4.array(AuthorityScopeSchema).default([]),
|
|
177
324
|
issuedAt: IsoDateTimeSchema
|
|
178
325
|
}).strict();
|
|
179
|
-
var ExecutionLinkSchema =
|
|
180
|
-
contract:
|
|
326
|
+
var ExecutionLinkSchema = z4.object({
|
|
327
|
+
contract: z4.literal("ExecutionLink"),
|
|
181
328
|
requestId: ContractIdentifierSchema,
|
|
182
329
|
traceId: ContractIdentifierSchema.optional(),
|
|
183
330
|
correlationId: ContractIdentifierSchema.optional(),
|
|
@@ -187,43 +334,43 @@ var ExecutionLinkSchema = z3.object({
|
|
|
187
334
|
taskRef: EntityRefSchema.optional(),
|
|
188
335
|
parentRunRef: EntityRefSchema.optional()
|
|
189
336
|
}).strict();
|
|
190
|
-
var CompletionHeaderSchema =
|
|
191
|
-
contract:
|
|
337
|
+
var CompletionHeaderSchema = z4.object({
|
|
338
|
+
contract: z4.literal("CompletionHeader"),
|
|
192
339
|
eventId: ContractIdentifierSchema,
|
|
193
340
|
runtimeEventId: ContractIdentifierSchema,
|
|
194
341
|
idempotencyKey: ContractIdentifierSchema,
|
|
195
|
-
sequence:
|
|
342
|
+
sequence: z4.number().int().nonnegative(),
|
|
196
343
|
execution: ExecutionLinkSchema,
|
|
197
|
-
producer:
|
|
344
|
+
producer: z4.object({
|
|
198
345
|
service: ContractIdentifierSchema,
|
|
199
346
|
runtime: ContractIdentifierSchema,
|
|
200
347
|
version: ContractIdentifierSchema
|
|
201
348
|
}).strict(),
|
|
202
|
-
status:
|
|
349
|
+
status: z4.enum(["SUCCEEDED", "FAILED", "CANCELLED", "TIMED_OUT"]),
|
|
203
350
|
occurredAt: IsoDateTimeSchema,
|
|
204
351
|
payloadSchemaRef: ContractIdentifierSchema.optional()
|
|
205
352
|
}).strict();
|
|
206
|
-
var CompletionEventSchema =
|
|
353
|
+
var CompletionEventSchema = z4.object({
|
|
207
354
|
header: CompletionHeaderSchema,
|
|
208
355
|
payload: JsonValueSchema.optional()
|
|
209
356
|
}).strict();
|
|
210
|
-
var AgentRuntimeEventSchema =
|
|
211
|
-
contract:
|
|
357
|
+
var AgentRuntimeEventSchema = z4.object({
|
|
358
|
+
contract: z4.literal("AgentRuntimeEvent"),
|
|
212
359
|
runtimeEventId: ContractIdentifierSchema,
|
|
213
360
|
streamId: ContractIdentifierSchema,
|
|
214
|
-
sequence:
|
|
361
|
+
sequence: z4.number().int().nonnegative(),
|
|
215
362
|
requestId: ContractIdentifierSchema,
|
|
216
363
|
teamId: ContractIdentifierSchema,
|
|
217
364
|
threadId: ContractIdentifierSchema.optional(),
|
|
218
|
-
eventType:
|
|
365
|
+
eventType: z4.enum(["messages:append", "messages:update", "thread:update", "tool-call:upsert", "session:event"]),
|
|
219
366
|
payload: JsonValueSchema,
|
|
220
367
|
occurredAt: IsoDateTimeSchema
|
|
221
368
|
}).strict();
|
|
222
369
|
|
|
223
370
|
// src/contracts/continuity.ts
|
|
224
|
-
import { z as
|
|
225
|
-
var DataContinuityEnvelopeSchema =
|
|
226
|
-
contract:
|
|
371
|
+
import { z as z5 } from "zod";
|
|
372
|
+
var DataContinuityEnvelopeSchema = z5.object({
|
|
373
|
+
contract: z5.literal("DataContinuityEnvelope"),
|
|
227
374
|
tenantId: ContractIdentifierSchema,
|
|
228
375
|
teamId: ContractIdentifierSchema,
|
|
229
376
|
sourceRef: EntityRefSchema.optional(),
|
|
@@ -238,28 +385,28 @@ var DataContinuityEnvelopeSchema = z4.object({
|
|
|
238
385
|
(value) => Boolean(value.sourceRef || value.bodyRef || value.runRef || value.outputRef || value.artifactRef),
|
|
239
386
|
"At least one continuity ref is required."
|
|
240
387
|
);
|
|
241
|
-
var BodyRelationRecordSchema =
|
|
242
|
-
contract:
|
|
388
|
+
var BodyRelationRecordSchema = z5.object({
|
|
389
|
+
contract: z5.literal("BodyRelationRecord"),
|
|
243
390
|
relationId: ContractIdentifierSchema,
|
|
244
391
|
relationKind: ContractIdentifierSchema,
|
|
245
392
|
subjectRef: EntityRefSchema,
|
|
246
393
|
objectRef: EntityRefSchema,
|
|
247
394
|
ownerRepo: ContractIdentifierSchema,
|
|
248
|
-
authorityScope:
|
|
395
|
+
authorityScope: z5.enum(["tenant", "team", "global"]),
|
|
249
396
|
properties: JsonObjectSchema.default({}),
|
|
250
397
|
createdAt: IsoDateTimeSchema,
|
|
251
398
|
updatedAt: IsoDateTimeSchema
|
|
252
399
|
}).strict();
|
|
253
|
-
var ApplicationRunSchema =
|
|
254
|
-
contract:
|
|
400
|
+
var ApplicationRunSchema = z5.object({
|
|
401
|
+
contract: z5.literal("ApplicationRun"),
|
|
255
402
|
runId: ContractIdentifierSchema,
|
|
256
403
|
definitionRef: EntityRefSchema,
|
|
257
404
|
runtimeLedgerRef: EntityRefSchema.optional(),
|
|
258
405
|
requestId: ContractIdentifierSchema,
|
|
259
406
|
actorRef: EntityRefSchema,
|
|
260
|
-
status:
|
|
261
|
-
inputRefs:
|
|
262
|
-
outputRefs:
|
|
407
|
+
status: z5.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED", "EXPIRED"]),
|
|
408
|
+
inputRefs: z5.array(EntityRefSchema).default([]),
|
|
409
|
+
outputRefs: z5.array(EntityRefSchema).default([]),
|
|
263
410
|
startedAt: IsoDateTimeSchema.optional(),
|
|
264
411
|
completedAt: IsoDateTimeSchema.optional(),
|
|
265
412
|
expiresAt: IsoDateTimeSchema.optional(),
|
|
@@ -301,57 +448,57 @@ var ApplicationRunSchema = z4.object({
|
|
|
301
448
|
});
|
|
302
449
|
}
|
|
303
450
|
});
|
|
304
|
-
var ExpiringAccessGrantSchema =
|
|
305
|
-
contract:
|
|
451
|
+
var ExpiringAccessGrantSchema = z5.object({
|
|
452
|
+
contract: z5.literal("ExpiringAccessGrant"),
|
|
306
453
|
grantId: ContractIdentifierSchema,
|
|
307
454
|
subjectRef: EntityRefSchema,
|
|
308
455
|
resourceRef: EntityRefSchema,
|
|
309
|
-
permissions:
|
|
456
|
+
permissions: z5.array(ContractIdentifierSchema).min(1),
|
|
310
457
|
issuedAt: IsoDateTimeSchema,
|
|
311
458
|
expiresAt: IsoDateTimeSchema,
|
|
312
459
|
revokedAt: IsoDateTimeSchema.optional()
|
|
313
460
|
}).strict().refine((value) => Date.parse(value.expiresAt) > Date.parse(value.issuedAt), "expiresAt must be after issuedAt");
|
|
314
461
|
|
|
315
462
|
// src/contracts/declarative-publication-verification.ts
|
|
316
|
-
import { z as
|
|
463
|
+
import { z as z6 } from "zod";
|
|
317
464
|
var DECLARATIVE_PUBLICATION_SCOPE_HEADER = "x-monkeys-declarative-scope";
|
|
318
465
|
var DECLARATIVE_PUBLICATION_SURFACE_HEADER = "x-monkeys-declarative-surface";
|
|
319
|
-
var DeclarativePublicationScopeSchema =
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
kind:
|
|
466
|
+
var DeclarativePublicationScopeSchema = z6.discriminatedUnion("kind", [
|
|
467
|
+
z6.object({ kind: z6.literal("global") }).strict(),
|
|
468
|
+
z6.object({
|
|
469
|
+
kind: z6.literal("team"),
|
|
323
470
|
teamId: ContractIdentifierSchema.refine((value) => value !== "0", "Use global scope for the reserved namespace.")
|
|
324
471
|
}).strict()
|
|
325
472
|
]);
|
|
326
|
-
var DeclarativePublicationVerificationRequestSchema =
|
|
327
|
-
resourceKind:
|
|
473
|
+
var DeclarativePublicationVerificationRequestSchema = z6.object({
|
|
474
|
+
resourceKind: z6.enum(["page", "navigation", "workbench"]),
|
|
328
475
|
resourceId: ContractIdentifierSchema,
|
|
329
476
|
releaseSlotId: ContractIdentifierSchema,
|
|
330
|
-
releaseVersion:
|
|
477
|
+
releaseVersion: z6.number().int().positive().optional(),
|
|
331
478
|
expectedReleaseRevisionRef: RevisionRefSchema.optional(),
|
|
332
479
|
expectedDefinitionRevisionRef: RevisionRefSchema.optional(),
|
|
333
|
-
idempotencyKey:
|
|
334
|
-
audience:
|
|
480
|
+
idempotencyKey: z6.string().trim().min(1).max(256).optional(),
|
|
481
|
+
audience: z6.object({
|
|
335
482
|
teamId: ContractIdentifierSchema.optional(),
|
|
336
|
-
path:
|
|
483
|
+
path: z6.string().trim().min(1).max(4096).optional()
|
|
337
484
|
}).strict().optional()
|
|
338
485
|
}).strict();
|
|
339
|
-
var DeclarativePublicationVerificationSchema =
|
|
340
|
-
contract:
|
|
341
|
-
schemaVersion:
|
|
342
|
-
resourceKind:
|
|
486
|
+
var DeclarativePublicationVerificationSchema = z6.object({
|
|
487
|
+
contract: z6.literal("DeclarativePublicationVerification"),
|
|
488
|
+
schemaVersion: z6.literal(1),
|
|
489
|
+
resourceKind: z6.enum(["page", "navigation", "workbench"]),
|
|
343
490
|
resourceId: ContractIdentifierSchema,
|
|
344
491
|
scope: DeclarativePublicationScopeSchema,
|
|
345
|
-
publication:
|
|
346
|
-
activation:
|
|
347
|
-
integrity:
|
|
348
|
-
runtime:
|
|
349
|
-
retryable:
|
|
492
|
+
publication: z6.enum(["committed", "unknown"]),
|
|
493
|
+
activation: z6.enum(["active", "superseded", "deactivated", "unavailable"]),
|
|
494
|
+
integrity: z6.enum(["verified", "unverified", "failed"]),
|
|
495
|
+
runtime: z6.enum(["not-requested", "verified", "context-required", "forbidden", "failed"]),
|
|
496
|
+
retryable: z6.boolean().default(false),
|
|
350
497
|
releaseRevisionRef: RevisionRefSchema.optional(),
|
|
351
498
|
definitionRevisionRef: RevisionRefSchema.optional(),
|
|
352
|
-
runtimeContentHash:
|
|
353
|
-
requestId:
|
|
354
|
-
diagnostics:
|
|
499
|
+
runtimeContentHash: z6.string().regex(/^[a-f0-9]{64}$/).optional(),
|
|
500
|
+
requestId: z6.string().max(256).optional(),
|
|
501
|
+
diagnostics: z6.array(DeclarativeDiagnosticSchema).max(32)
|
|
355
502
|
}).strict().superRefine((value, context) => {
|
|
356
503
|
if ((value.integrity === "verified" || value.runtime === "verified") && (value.publication !== "committed" || value.activation !== "active" || !value.releaseRevisionRef || !value.definitionRevisionRef)) {
|
|
357
504
|
context.addIssue({ code: "custom", path: ["integrity"], message: "Verification requires an exact committed active Release and definition." });
|
|
@@ -362,11 +509,11 @@ var DeclarativePublicationVerificationSchema = z5.object({
|
|
|
362
509
|
});
|
|
363
510
|
|
|
364
511
|
// src/contracts/declarative-document-import.ts
|
|
365
|
-
import { z as
|
|
512
|
+
import { z as z7 } from "zod";
|
|
366
513
|
var sameScope = (left, right) => ["tenantRef", "dataSpaceRef", "teamRef"].every(
|
|
367
514
|
(key) => left[key]?.kind === right[key]?.kind && left[key]?.id === right[key]?.id && left[key]?.ownerRepo === right[key]?.ownerRepo
|
|
368
515
|
);
|
|
369
|
-
var DeclarativeImportDocumentSchema =
|
|
516
|
+
var DeclarativeImportDocumentSchema = z7.union([
|
|
370
517
|
PageSchema,
|
|
371
518
|
NavigationSchema
|
|
372
519
|
]);
|
|
@@ -378,48 +525,48 @@ var requestShape = {
|
|
|
378
525
|
function supportsSurface(value) {
|
|
379
526
|
return value.document.contract === "Page" ? value.document.surface === value.surface : value.document.supportedSurfaces.includes(value.surface);
|
|
380
527
|
}
|
|
381
|
-
var DeclarativeDocumentImportRequestSchema =
|
|
528
|
+
var DeclarativeDocumentImportRequestSchema = z7.object(requestShape).strict().refine(supportsSurface, {
|
|
382
529
|
path: ["surface"],
|
|
383
530
|
message: "The document does not support the selected surface."
|
|
384
531
|
});
|
|
385
|
-
var DeclarativeDocumentImportIntentSchema =
|
|
532
|
+
var DeclarativeDocumentImportIntentSchema = z7.object({
|
|
386
533
|
...requestShape,
|
|
387
|
-
expectedVersion:
|
|
534
|
+
expectedVersion: z7.number().int().nonnegative(),
|
|
388
535
|
expectedPlanHash: Sha256Schema,
|
|
389
|
-
idempotencyKey:
|
|
536
|
+
idempotencyKey: z7.string().trim().min(1).max(256)
|
|
390
537
|
}).strict().refine(supportsSurface, {
|
|
391
538
|
path: ["surface"],
|
|
392
539
|
message: "The document does not support the selected surface."
|
|
393
540
|
});
|
|
394
|
-
var DeclarativeAuthoringEnvelopeSchema =
|
|
395
|
-
document:
|
|
541
|
+
var DeclarativeAuthoringEnvelopeSchema = z7.object({
|
|
542
|
+
document: z7.record(z7.string(), z7.unknown()),
|
|
396
543
|
surface: ProductSurfaceSchema.optional(),
|
|
397
544
|
environmentId: ContractIdentifierSchema.optional()
|
|
398
545
|
}).strict();
|
|
399
546
|
var DeclarativeAuthoringImportIntentSchema = DeclarativeAuthoringEnvelopeSchema.extend({
|
|
400
547
|
expectedPlanHash: Sha256Schema,
|
|
401
|
-
expectedVersion:
|
|
402
|
-
idempotencyKey:
|
|
548
|
+
expectedVersion: z7.number().int().nonnegative(),
|
|
549
|
+
idempotencyKey: z7.string().trim().min(1).max(256)
|
|
403
550
|
}).strict();
|
|
404
551
|
var DeclarativeAuthoringPublishEnvelopeSchema = DeclarativeAuthoringEnvelopeSchema.extend({
|
|
405
552
|
placement: ContractIdentifierSchema.optional(),
|
|
406
|
-
routeClaimIndex:
|
|
553
|
+
routeClaimIndex: z7.number().int().nonnegative().optional()
|
|
407
554
|
}).strict();
|
|
408
|
-
var DeclarativeDocumentImportPlanSchema =
|
|
409
|
-
contract:
|
|
410
|
-
schemaVersion:
|
|
411
|
-
resourceKind:
|
|
555
|
+
var DeclarativeDocumentImportPlanSchema = z7.object({
|
|
556
|
+
contract: z7.literal("DeclarativeDocumentImportPlan"),
|
|
557
|
+
schemaVersion: z7.literal(1),
|
|
558
|
+
resourceKind: z7.enum(["page", "navigation"]),
|
|
412
559
|
resourceId: ContractIdentifierSchema,
|
|
413
560
|
surface: ProductSurfaceSchema,
|
|
414
561
|
sourceContentHash: Sha256Schema,
|
|
415
562
|
environmentRevisionRef: RevisionRefSchema,
|
|
416
563
|
document: DeclarativeImportDocumentSchema,
|
|
417
564
|
tenantScope: TenantScopeSchema.nullable(),
|
|
418
|
-
requiresInitialization:
|
|
419
|
-
expectedVersion:
|
|
565
|
+
requiresInitialization: z7.boolean(),
|
|
566
|
+
expectedVersion: z7.number().int().nonnegative(),
|
|
420
567
|
currentContentHash: Sha256Schema.nullable(),
|
|
421
|
-
changed:
|
|
422
|
-
diagnostics:
|
|
568
|
+
changed: z7.boolean(),
|
|
569
|
+
diagnostics: z7.array(DeclarativeDiagnosticSchema),
|
|
423
570
|
dependencyContentHash: Sha256Schema,
|
|
424
571
|
planHash: Sha256Schema
|
|
425
572
|
}).strict().superRefine((value, context) => {
|
|
@@ -450,9 +597,9 @@ var DeclarativeDocumentImportPlanSchema = z6.object({
|
|
|
450
597
|
message: "The plan and bound document must belong to the same scope."
|
|
451
598
|
});
|
|
452
599
|
});
|
|
453
|
-
var DeclarativeDocumentImportResultSchema =
|
|
454
|
-
action:
|
|
455
|
-
changed:
|
|
600
|
+
var DeclarativeDocumentImportResultSchema = z7.object({
|
|
601
|
+
action: z7.literal("import"),
|
|
602
|
+
changed: z7.boolean(),
|
|
456
603
|
plan: DeclarativeDocumentImportPlanSchema,
|
|
457
604
|
revisionRef: RevisionRefSchema
|
|
458
605
|
}).strict().superRefine((value, context) => {
|
|
@@ -466,227 +613,227 @@ var DeclarativeDocumentImportResultSchema = z6.object({
|
|
|
466
613
|
});
|
|
467
614
|
|
|
468
615
|
// src/contracts/trend.ts
|
|
469
|
-
import { z as
|
|
470
|
-
var RadarDecisionMetricsSchema =
|
|
471
|
-
currentSales:
|
|
472
|
-
forecastSales:
|
|
473
|
-
searchHeat:
|
|
474
|
-
socialHeat:
|
|
475
|
-
confidence:
|
|
476
|
-
}).strict();
|
|
477
|
-
var TrendSourceSchema =
|
|
616
|
+
import { z as z8 } from "zod";
|
|
617
|
+
var RadarDecisionMetricsSchema = z8.object({
|
|
618
|
+
currentSales: z8.number().finite(),
|
|
619
|
+
forecastSales: z8.number().finite(),
|
|
620
|
+
searchHeat: z8.number().finite(),
|
|
621
|
+
socialHeat: z8.number().finite(),
|
|
622
|
+
confidence: z8.number().min(0).max(1)
|
|
623
|
+
}).strict();
|
|
624
|
+
var TrendSourceSchema = z8.object({
|
|
478
625
|
sourceId: ContractIdentifierSchema,
|
|
479
626
|
provider: ContractIdentifierSchema,
|
|
480
|
-
channel:
|
|
627
|
+
channel: z8.enum(["trend", "ecommerce", "social", "search", "internal"]),
|
|
481
628
|
collectedAt: IsoDateTimeSchema,
|
|
482
|
-
sourceUrl:
|
|
483
|
-
evidenceRefs:
|
|
629
|
+
sourceUrl: z8.string().url().optional(),
|
|
630
|
+
evidenceRefs: z8.array(EntityRefSchema).default([])
|
|
484
631
|
}).strict();
|
|
485
|
-
var TrendIngestRunSchema =
|
|
486
|
-
contract:
|
|
632
|
+
var TrendIngestRunSchema = z8.object({
|
|
633
|
+
contract: z8.literal("TrendIngestRun"),
|
|
487
634
|
ingestRunId: ContractIdentifierSchema,
|
|
488
635
|
sourceId: ContractIdentifierSchema,
|
|
489
636
|
requestId: ContractIdentifierSchema,
|
|
490
637
|
idempotencyKey: ContractIdentifierSchema,
|
|
491
|
-
status:
|
|
492
|
-
recordCount:
|
|
493
|
-
errorCount:
|
|
638
|
+
status: z8.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
|
|
639
|
+
recordCount: z8.number().int().nonnegative(),
|
|
640
|
+
errorCount: z8.number().int().nonnegative(),
|
|
494
641
|
startedAt: IsoDateTimeSchema,
|
|
495
642
|
completedAt: IsoDateTimeSchema.optional()
|
|
496
643
|
}).strict();
|
|
497
|
-
var TrendSourceRecordSchema =
|
|
498
|
-
contract:
|
|
644
|
+
var TrendSourceRecordSchema = z8.object({
|
|
645
|
+
contract: z8.literal("TrendSourceRecord"),
|
|
499
646
|
sourceRecordId: ContractIdentifierSchema,
|
|
500
647
|
source: TrendSourceSchema,
|
|
501
648
|
ingestRunRef: EntityRefSchema,
|
|
502
|
-
recordVersion:
|
|
649
|
+
recordVersion: z8.number().int().positive(),
|
|
503
650
|
contentHash: Sha256Schema,
|
|
504
651
|
payload: JsonValueSchema,
|
|
505
652
|
idempotencyKey: ContractIdentifierSchema,
|
|
506
653
|
collectedAt: IsoDateTimeSchema
|
|
507
654
|
}).strict();
|
|
508
|
-
var HotwordBodySchema =
|
|
509
|
-
contract:
|
|
655
|
+
var HotwordBodySchema = z8.object({
|
|
656
|
+
contract: z8.literal("HotwordBody"),
|
|
510
657
|
hotwordId: ContractIdentifierSchema,
|
|
511
|
-
label:
|
|
512
|
-
normalizedLabel:
|
|
513
|
-
categories:
|
|
514
|
-
sourceRefs:
|
|
515
|
-
relationRefs:
|
|
658
|
+
label: z8.string().trim().min(1),
|
|
659
|
+
normalizedLabel: z8.string().trim().min(1),
|
|
660
|
+
categories: z8.array(ContractIdentifierSchema).default([]),
|
|
661
|
+
sourceRefs: z8.array(TrendSourceSchema).min(1),
|
|
662
|
+
relationRefs: z8.array(EntityRefSchema).default([]),
|
|
516
663
|
createdAt: IsoDateTimeSchema,
|
|
517
664
|
updatedAt: IsoDateTimeSchema
|
|
518
665
|
}).strict();
|
|
519
666
|
var CommerceBodyFieldsSchema = {
|
|
520
|
-
displayName:
|
|
521
|
-
normalizedName:
|
|
522
|
-
categories:
|
|
523
|
-
sourceRefs:
|
|
524
|
-
relationRefs:
|
|
667
|
+
displayName: z8.string().trim().min(1),
|
|
668
|
+
normalizedName: z8.string().trim().min(1),
|
|
669
|
+
categories: z8.array(ContractIdentifierSchema).default([]),
|
|
670
|
+
sourceRefs: z8.array(EntityRefSchema).min(1),
|
|
671
|
+
relationRefs: z8.array(EntityRefSchema).default([]),
|
|
525
672
|
createdAt: IsoDateTimeSchema,
|
|
526
673
|
updatedAt: IsoDateTimeSchema
|
|
527
674
|
};
|
|
528
|
-
var BrandBodySchema =
|
|
529
|
-
contract:
|
|
675
|
+
var BrandBodySchema = z8.object({
|
|
676
|
+
contract: z8.literal("BrandBody"),
|
|
530
677
|
brandId: ContractIdentifierSchema,
|
|
531
678
|
...CommerceBodyFieldsSchema
|
|
532
679
|
}).strict();
|
|
533
|
-
var ProductBodySchema =
|
|
534
|
-
contract:
|
|
680
|
+
var ProductBodySchema = z8.object({
|
|
681
|
+
contract: z8.literal("ProductBody"),
|
|
535
682
|
productId: ContractIdentifierSchema,
|
|
536
683
|
brandRef: EntityRefSchema.optional(),
|
|
537
684
|
...CommerceBodyFieldsSchema
|
|
538
685
|
}).strict();
|
|
539
|
-
var TrendMetricSnapshotSchema =
|
|
540
|
-
contract:
|
|
686
|
+
var TrendMetricSnapshotSchema = z8.object({
|
|
687
|
+
contract: z8.literal("TrendMetricSnapshot"),
|
|
541
688
|
snapshotId: ContractIdentifierSchema,
|
|
542
689
|
subjectRef: EntityRefSchema,
|
|
543
690
|
observedAt: IsoDateTimeSchema,
|
|
544
|
-
metrics:
|
|
545
|
-
confidence:
|
|
546
|
-
evidenceRefs:
|
|
691
|
+
metrics: z8.record(z8.string(), z8.number().finite()),
|
|
692
|
+
confidence: z8.number().min(0).max(1),
|
|
693
|
+
evidenceRefs: z8.array(EntityRefSchema).min(1)
|
|
547
694
|
}).strict();
|
|
548
|
-
var RadarScoreModelBodySchema =
|
|
549
|
-
contract:
|
|
695
|
+
var RadarScoreModelBodySchema = z8.object({
|
|
696
|
+
contract: z8.literal("RadarScoreModelBody"),
|
|
550
697
|
modelId: ContractIdentifierSchema,
|
|
551
|
-
version:
|
|
698
|
+
version: z8.number().int().positive(),
|
|
552
699
|
weights: RadarDecisionMetricsSchema,
|
|
553
|
-
thresholds:
|
|
554
|
-
explanationRules:
|
|
700
|
+
thresholds: z8.record(z8.string(), z8.number().finite()).default({}),
|
|
701
|
+
explanationRules: z8.record(z8.string(), z8.string().trim().min(1)).default({}),
|
|
555
702
|
createdAt: IsoDateTimeSchema
|
|
556
703
|
}).strict();
|
|
557
|
-
var RadarScoreProjectionSchema =
|
|
558
|
-
contract:
|
|
704
|
+
var RadarScoreProjectionSchema = z8.object({
|
|
705
|
+
contract: z8.literal("RadarScoreProjection"),
|
|
559
706
|
projectionId: ContractIdentifierSchema,
|
|
560
707
|
subjectRef: EntityRefSchema,
|
|
561
708
|
modelRef: EntityRefSchema,
|
|
562
|
-
totalScore:
|
|
709
|
+
totalScore: z8.number().finite(),
|
|
563
710
|
dimensions: RadarDecisionMetricsSchema,
|
|
564
|
-
evidenceRefs:
|
|
711
|
+
evidenceRefs: z8.array(EntityRefSchema).min(1),
|
|
565
712
|
freshnessAt: IsoDateTimeSchema
|
|
566
713
|
}).strict();
|
|
567
|
-
var RadarPanoramaNodeSchema =
|
|
714
|
+
var RadarPanoramaNodeSchema = z8.object({
|
|
568
715
|
ref: EntityRefSchema,
|
|
569
|
-
label:
|
|
570
|
-
categories:
|
|
571
|
-
score:
|
|
716
|
+
label: z8.string().trim().min(1),
|
|
717
|
+
categories: z8.array(ContractIdentifierSchema).default([]),
|
|
718
|
+
score: z8.number().finite().optional(),
|
|
572
719
|
freshnessAt: IsoDateTimeSchema.optional()
|
|
573
720
|
}).strict();
|
|
574
|
-
var RadarPanoramaEdgeSchema =
|
|
721
|
+
var RadarPanoramaEdgeSchema = z8.object({
|
|
575
722
|
sourceRef: EntityRefSchema,
|
|
576
723
|
targetRef: EntityRefSchema,
|
|
577
724
|
relation: ContractIdentifierSchema,
|
|
578
|
-
evidenceRefs:
|
|
725
|
+
evidenceRefs: z8.array(EntityRefSchema).default([])
|
|
579
726
|
}).strict();
|
|
580
|
-
var RadarPanoramaSchema =
|
|
581
|
-
contract:
|
|
582
|
-
nodes:
|
|
583
|
-
edges:
|
|
727
|
+
var RadarPanoramaSchema = z8.object({
|
|
728
|
+
contract: z8.literal("RadarPanorama"),
|
|
729
|
+
nodes: z8.array(RadarPanoramaNodeSchema),
|
|
730
|
+
edges: z8.array(RadarPanoramaEdgeSchema),
|
|
584
731
|
generatedAt: IsoDateTimeSchema
|
|
585
732
|
}).strict();
|
|
586
|
-
var BrandGeneticsProfileSchema =
|
|
587
|
-
contract:
|
|
733
|
+
var BrandGeneticsProfileSchema = z8.object({
|
|
734
|
+
contract: z8.literal("BrandGeneticsProfile"),
|
|
588
735
|
brandRef: EntityRefSchema,
|
|
589
|
-
categories:
|
|
590
|
-
signature:
|
|
591
|
-
relatedRefs:
|
|
592
|
-
evidenceRefs:
|
|
736
|
+
categories: z8.array(ContractIdentifierSchema).default([]),
|
|
737
|
+
signature: z8.record(ContractIdentifierSchema, z8.number().finite()),
|
|
738
|
+
relatedRefs: z8.array(EntityRefSchema).default([]),
|
|
739
|
+
evidenceRefs: z8.array(EntityRefSchema).default([]),
|
|
593
740
|
computedAt: IsoDateTimeSchema
|
|
594
741
|
}).strict();
|
|
595
|
-
var RadarOpportunityMatrixPointSchema =
|
|
742
|
+
var RadarOpportunityMatrixPointSchema = z8.object({
|
|
596
743
|
subjectRef: EntityRefSchema,
|
|
597
|
-
label:
|
|
598
|
-
x:
|
|
599
|
-
y:
|
|
600
|
-
score:
|
|
601
|
-
evidenceRefs:
|
|
602
|
-
}).strict();
|
|
603
|
-
var RadarOpportunityMatrixSchema =
|
|
604
|
-
contract:
|
|
605
|
-
xMetric:
|
|
606
|
-
yMetric:
|
|
607
|
-
points:
|
|
744
|
+
label: z8.string().trim().min(1),
|
|
745
|
+
x: z8.number().finite(),
|
|
746
|
+
y: z8.number().finite(),
|
|
747
|
+
score: z8.number().finite(),
|
|
748
|
+
evidenceRefs: z8.array(EntityRefSchema).default([])
|
|
749
|
+
}).strict();
|
|
750
|
+
var RadarOpportunityMatrixSchema = z8.object({
|
|
751
|
+
contract: z8.literal("RadarOpportunityMatrix"),
|
|
752
|
+
xMetric: z8.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
|
|
753
|
+
yMetric: z8.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
|
|
754
|
+
points: z8.array(RadarOpportunityMatrixPointSchema),
|
|
608
755
|
computedAt: IsoDateTimeSchema
|
|
609
756
|
}).strict();
|
|
610
|
-
var RadarQueryBodySchema =
|
|
611
|
-
contract:
|
|
757
|
+
var RadarQueryBodySchema = z8.object({
|
|
758
|
+
contract: z8.literal("RadarQueryBody"),
|
|
612
759
|
queryId: ContractIdentifierSchema,
|
|
613
|
-
filters:
|
|
614
|
-
sort:
|
|
760
|
+
filters: z8.record(z8.string(), JsonValueSchema).default({}),
|
|
761
|
+
sort: z8.object({
|
|
615
762
|
field: ContractIdentifierSchema,
|
|
616
|
-
direction:
|
|
763
|
+
direction: z8.enum(["asc", "desc"])
|
|
617
764
|
}).strict(),
|
|
618
|
-
pageSize:
|
|
765
|
+
pageSize: z8.number().int().min(1).max(200),
|
|
619
766
|
updatedAt: IsoDateTimeSchema
|
|
620
767
|
}).strict();
|
|
621
|
-
var SavedRadarQuerySchema =
|
|
622
|
-
contract:
|
|
768
|
+
var SavedRadarQuerySchema = z8.object({
|
|
769
|
+
contract: z8.literal("SavedRadarQuery"),
|
|
623
770
|
savedQueryId: ContractIdentifierSchema,
|
|
624
771
|
teamId: ContractIdentifierSchema,
|
|
625
772
|
ownerRef: EntityRefSchema,
|
|
626
|
-
name:
|
|
773
|
+
name: z8.string().trim().min(1),
|
|
627
774
|
queryRef: EntityRefSchema,
|
|
628
|
-
expectedVersion:
|
|
775
|
+
expectedVersion: z8.number().int().nonnegative(),
|
|
629
776
|
updatedAt: IsoDateTimeSchema
|
|
630
777
|
}).strict();
|
|
631
|
-
var RadarSelectionSchema =
|
|
632
|
-
contract:
|
|
778
|
+
var RadarSelectionSchema = z8.object({
|
|
779
|
+
contract: z8.literal("RadarSelection"),
|
|
633
780
|
selectionId: ContractIdentifierSchema,
|
|
634
781
|
teamId: ContractIdentifierSchema,
|
|
635
782
|
ownerRef: EntityRefSchema,
|
|
636
|
-
subjectRefs:
|
|
637
|
-
status:
|
|
638
|
-
note:
|
|
639
|
-
expectedVersion:
|
|
783
|
+
subjectRefs: z8.array(EntityRefSchema),
|
|
784
|
+
status: z8.enum(["stashed", "selected", "rejected", "archived"]),
|
|
785
|
+
note: z8.string().optional(),
|
|
786
|
+
expectedVersion: z8.number().int().nonnegative(),
|
|
640
787
|
updatedAt: IsoDateTimeSchema
|
|
641
788
|
}).strict();
|
|
642
789
|
var versionedRefFields = {
|
|
643
790
|
id: ContractIdentifierSchema,
|
|
644
|
-
version:
|
|
791
|
+
version: z8.union([z8.number().int().positive(), z8.string().trim().min(1)]).optional(),
|
|
645
792
|
ownerRepo: ContractIdentifierSchema.optional()
|
|
646
793
|
};
|
|
647
|
-
var TrendRadarCollectionAssetRefSchema =
|
|
648
|
-
kind:
|
|
794
|
+
var TrendRadarCollectionAssetRefSchema = z8.object({
|
|
795
|
+
kind: z8.literal("asset"),
|
|
649
796
|
...versionedRefFields
|
|
650
797
|
}).strict();
|
|
651
|
-
var TrendRadarCollectionSelectionRefSchema =
|
|
652
|
-
kind:
|
|
798
|
+
var TrendRadarCollectionSelectionRefSchema = z8.object({
|
|
799
|
+
kind: z8.literal("radar-selection"),
|
|
653
800
|
...versionedRefFields
|
|
654
801
|
}).strict();
|
|
655
|
-
var TrendRadarCollectionRunRefSchema =
|
|
656
|
-
kind:
|
|
802
|
+
var TrendRadarCollectionRunRefSchema = z8.object({
|
|
803
|
+
kind: z8.literal("radar-analysis-run"),
|
|
657
804
|
...versionedRefFields
|
|
658
805
|
}).strict();
|
|
659
|
-
var TrendRadarCollectionSubjectRefSchema =
|
|
660
|
-
kind:
|
|
806
|
+
var TrendRadarCollectionSubjectRefSchema = z8.object({
|
|
807
|
+
kind: z8.literal("hotword"),
|
|
661
808
|
...versionedRefFields
|
|
662
809
|
}).strict();
|
|
663
|
-
var TrendRadarCollectionArtifactRefSchema =
|
|
664
|
-
kind:
|
|
810
|
+
var TrendRadarCollectionArtifactRefSchema = z8.object({
|
|
811
|
+
kind: z8.literal("artifact"),
|
|
665
812
|
...versionedRefFields
|
|
666
813
|
}).strict();
|
|
667
|
-
var TrendRadarCollectionRecipeEntrySchema =
|
|
814
|
+
var TrendRadarCollectionRecipeEntrySchema = z8.object({
|
|
668
815
|
subjectRef: TrendRadarCollectionSubjectRefSchema,
|
|
669
|
-
label:
|
|
816
|
+
label: z8.string().trim().min(1).max(200)
|
|
670
817
|
}).strict();
|
|
671
|
-
var TrendRadarCollectionRecipeSchema =
|
|
672
|
-
category:
|
|
673
|
-
design:
|
|
674
|
-
audience:
|
|
818
|
+
var TrendRadarCollectionRecipeSchema = z8.object({
|
|
819
|
+
category: z8.array(TrendRadarCollectionRecipeEntrySchema),
|
|
820
|
+
design: z8.array(TrendRadarCollectionRecipeEntrySchema),
|
|
821
|
+
audience: z8.array(TrendRadarCollectionRecipeEntrySchema)
|
|
675
822
|
}).strict().refine(
|
|
676
823
|
(recipe) => recipe.category.length + recipe.design.length + recipe.audience.length > 0,
|
|
677
824
|
"A Trend Radar collection recipe must contain at least one subject."
|
|
678
825
|
);
|
|
679
|
-
var TrendRadarCollectionDecisionAxisSchema =
|
|
826
|
+
var TrendRadarCollectionDecisionAxisSchema = z8.object({
|
|
680
827
|
key: ContractIdentifierSchema,
|
|
681
|
-
label:
|
|
682
|
-
value:
|
|
683
|
-
}).strict();
|
|
684
|
-
var TrendRadarCollectionDecisionProjectionSchema =
|
|
685
|
-
axes:
|
|
686
|
-
overallScore:
|
|
687
|
-
itemRank:
|
|
688
|
-
sourceRefs:
|
|
689
|
-
outputRefs:
|
|
828
|
+
label: z8.string().trim().min(1).max(200).optional(),
|
|
829
|
+
value: z8.number().finite()
|
|
830
|
+
}).strict();
|
|
831
|
+
var TrendRadarCollectionDecisionProjectionSchema = z8.object({
|
|
832
|
+
axes: z8.array(TrendRadarCollectionDecisionAxisSchema).max(32).optional(),
|
|
833
|
+
overallScore: z8.number().finite().optional(),
|
|
834
|
+
itemRank: z8.number().finite().optional(),
|
|
835
|
+
sourceRefs: z8.array(EntityRefSchema).optional(),
|
|
836
|
+
outputRefs: z8.array(EntityRefSchema).optional()
|
|
690
837
|
}).strict().superRefine((projection, context) => {
|
|
691
838
|
const hasProjection = Boolean(
|
|
692
839
|
projection.axes?.length || projection.overallScore !== void 0 || projection.itemRank !== void 0 || projection.sourceRefs?.length || projection.outputRefs?.length
|
|
@@ -709,20 +856,20 @@ var TrendRadarCollectionDecisionProjectionSchema = z7.object({
|
|
|
709
856
|
seenAxisKeys.add(axis.key);
|
|
710
857
|
});
|
|
711
858
|
});
|
|
712
|
-
var TrendRadarCollectionArtifactProjectionSchema =
|
|
859
|
+
var TrendRadarCollectionArtifactProjectionSchema = z8.object({
|
|
713
860
|
artifactRef: TrendRadarCollectionArtifactRefSchema,
|
|
714
|
-
url:
|
|
715
|
-
thumbnailUrl:
|
|
716
|
-
mimeType:
|
|
861
|
+
url: z8.string().url().optional(),
|
|
862
|
+
thumbnailUrl: z8.string().url().optional(),
|
|
863
|
+
mimeType: z8.string().trim().min(1).optional(),
|
|
717
864
|
metadata: JsonObjectSchema.optional()
|
|
718
865
|
}).strict();
|
|
719
|
-
var TrendRadarCollectionProjectionWritebackSchema =
|
|
720
|
-
status:
|
|
866
|
+
var TrendRadarCollectionProjectionWritebackSchema = z8.object({
|
|
867
|
+
status: z8.enum(["PENDING", "APPLIED", "FAILED"]),
|
|
721
868
|
updatedAt: IsoDateTimeSchema,
|
|
722
|
-
error:
|
|
869
|
+
error: z8.object({
|
|
723
870
|
code: ContractIdentifierSchema,
|
|
724
|
-
message:
|
|
725
|
-
retryable:
|
|
871
|
+
message: z8.string().trim().min(1),
|
|
872
|
+
retryable: z8.boolean()
|
|
726
873
|
}).strict().optional()
|
|
727
874
|
}).strict().superRefine((writeback, context) => {
|
|
728
875
|
if (writeback.status === "FAILED" && !writeback.error) {
|
|
@@ -740,12 +887,12 @@ var TrendRadarCollectionProjectionWritebackSchema = z7.object({
|
|
|
740
887
|
});
|
|
741
888
|
}
|
|
742
889
|
});
|
|
743
|
-
var TrendRadarCollectionItemSchema =
|
|
744
|
-
contract:
|
|
745
|
-
schemaVersion:
|
|
890
|
+
var TrendRadarCollectionItemSchema = z8.object({
|
|
891
|
+
contract: z8.literal("TrendRadarCollectionItem"),
|
|
892
|
+
schemaVersion: z8.literal(1),
|
|
746
893
|
selectionRef: TrendRadarCollectionSelectionRefSchema,
|
|
747
894
|
recipe: TrendRadarCollectionRecipeSchema,
|
|
748
|
-
status:
|
|
895
|
+
status: z8.enum(["SAVED", "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
|
|
749
896
|
latestRunRef: TrendRadarCollectionRunRefSchema.optional(),
|
|
750
897
|
decisionProjection: TrendRadarCollectionDecisionProjectionSchema.optional(),
|
|
751
898
|
artifactProjection: TrendRadarCollectionArtifactProjectionSchema.optional(),
|
|
@@ -753,8 +900,8 @@ var TrendRadarCollectionItemSchema = z7.object({
|
|
|
753
900
|
updatedAt: IsoDateTimeSchema,
|
|
754
901
|
generatedAt: IsoDateTimeSchema.optional()
|
|
755
902
|
}).strict();
|
|
756
|
-
var RadarAnalysisRunSchema =
|
|
757
|
-
contract:
|
|
903
|
+
var RadarAnalysisRunSchema = z8.object({
|
|
904
|
+
contract: z8.literal("RadarAnalysisRun"),
|
|
758
905
|
runId: ContractIdentifierSchema,
|
|
759
906
|
teamId: ContractIdentifierSchema,
|
|
760
907
|
selectionRef: EntityRefSchema,
|
|
@@ -765,79 +912,79 @@ var RadarAnalysisRunSchema = z7.object({
|
|
|
765
912
|
collectionAssetRef: TrendRadarCollectionAssetRefSchema.optional(),
|
|
766
913
|
collectionProjectionWriteback: TrendRadarCollectionProjectionWritebackSchema.optional(),
|
|
767
914
|
workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
|
|
768
|
-
workflowInput:
|
|
769
|
-
createDesignProject:
|
|
770
|
-
designProjectName:
|
|
915
|
+
workflowInput: z8.record(z8.string(), JsonValueSchema).default({}),
|
|
916
|
+
createDesignProject: z8.boolean().default(true),
|
|
917
|
+
designProjectName: z8.string().trim().min(1).max(200).optional(),
|
|
771
918
|
modelRef: EntityRefSchema,
|
|
772
919
|
requestId: ContractIdentifierSchema,
|
|
773
920
|
idempotencyKey: ContractIdentifierSchema,
|
|
774
|
-
status:
|
|
775
|
-
outputRefs:
|
|
776
|
-
error:
|
|
921
|
+
status: z8.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
|
|
922
|
+
outputRefs: z8.array(EntityRefSchema).default([]),
|
|
923
|
+
error: z8.object({
|
|
777
924
|
code: ContractIdentifierSchema,
|
|
778
|
-
message:
|
|
779
|
-
retryable:
|
|
925
|
+
message: z8.string().trim().min(1),
|
|
926
|
+
retryable: z8.boolean()
|
|
780
927
|
}).strict().optional(),
|
|
781
928
|
startedAt: IsoDateTimeSchema.optional(),
|
|
782
929
|
completedAt: IsoDateTimeSchema.optional(),
|
|
783
930
|
createdAt: IsoDateTimeSchema
|
|
784
931
|
}).strict();
|
|
785
|
-
var RadarAnalysisAssetSchema =
|
|
932
|
+
var RadarAnalysisAssetSchema = z8.object({
|
|
786
933
|
artifactRef: EntityRefSchema,
|
|
787
934
|
kind: ContractIdentifierSchema,
|
|
788
|
-
mimeType:
|
|
789
|
-
url:
|
|
790
|
-
metadata:
|
|
935
|
+
mimeType: z8.string().trim().min(1).optional(),
|
|
936
|
+
url: z8.string().url(),
|
|
937
|
+
metadata: z8.record(z8.string(), JsonValueSchema).default({}),
|
|
791
938
|
createdAt: IsoDateTimeSchema
|
|
792
939
|
}).strict();
|
|
793
|
-
var RadarAnalysisDetailSchema =
|
|
794
|
-
contract:
|
|
940
|
+
var RadarAnalysisDetailSchema = z8.object({
|
|
941
|
+
contract: z8.literal("RadarAnalysisDetail"),
|
|
795
942
|
run: RadarAnalysisRunSchema,
|
|
796
|
-
runVersion:
|
|
943
|
+
runVersion: z8.number().int().positive(),
|
|
797
944
|
selection: RadarSelectionSchema,
|
|
798
|
-
outputs:
|
|
799
|
-
assets:
|
|
800
|
-
lineage:
|
|
945
|
+
outputs: z8.array(OutputRecordSchema),
|
|
946
|
+
assets: z8.array(RadarAnalysisAssetSchema),
|
|
947
|
+
lineage: z8.array(LineageRecordSchema)
|
|
801
948
|
}).strict();
|
|
802
|
-
var RadarActionRecordSchema =
|
|
803
|
-
contract:
|
|
949
|
+
var RadarActionRecordSchema = z8.object({
|
|
950
|
+
contract: z8.literal("RadarActionRecord"),
|
|
804
951
|
actionId: ContractIdentifierSchema,
|
|
805
952
|
teamId: ContractIdentifierSchema,
|
|
806
953
|
actorRef: EntityRefSchema,
|
|
807
|
-
action:
|
|
954
|
+
action: z8.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
|
|
808
955
|
targetRef: EntityRefSchema,
|
|
809
956
|
requestId: ContractIdentifierSchema,
|
|
810
957
|
idempotencyKey: ContractIdentifierSchema,
|
|
811
|
-
expectedVersion:
|
|
958
|
+
expectedVersion: z8.number().int().nonnegative(),
|
|
812
959
|
occurredAt: IsoDateTimeSchema
|
|
813
960
|
}).strict();
|
|
814
|
-
var RadarWritebackRecordSchema =
|
|
815
|
-
contract:
|
|
961
|
+
var RadarWritebackRecordSchema = z8.object({
|
|
962
|
+
contract: z8.literal("RadarWritebackRecord"),
|
|
816
963
|
writebackId: ContractIdentifierSchema,
|
|
817
964
|
actionRef: EntityRefSchema,
|
|
818
965
|
targetRef: EntityRefSchema,
|
|
819
|
-
status:
|
|
820
|
-
resultingVersion:
|
|
821
|
-
error:
|
|
966
|
+
status: z8.enum(["PENDING", "APPLIED", "FAILED"]),
|
|
967
|
+
resultingVersion: z8.number().int().nonnegative().optional(),
|
|
968
|
+
error: z8.string().trim().min(1).optional(),
|
|
822
969
|
recordedAt: IsoDateTimeSchema
|
|
823
970
|
}).strict();
|
|
824
971
|
|
|
825
972
|
// src/contracts/workflow-runtime.ts
|
|
826
|
-
import { z as
|
|
827
|
-
var WorkflowCatalogEntrySchema =
|
|
828
|
-
contract:
|
|
973
|
+
import { z as z9 } from "zod";
|
|
974
|
+
var WorkflowCatalogEntrySchema = z9.object({
|
|
975
|
+
contract: z9.literal("WorkflowCatalogEntry"),
|
|
829
976
|
workflowId: ContractIdentifierSchema,
|
|
830
977
|
teamId: ContractIdentifierSchema,
|
|
831
978
|
creatorRef: EntityRefSchema,
|
|
832
979
|
currentDefinitionRef: EntityRefSchema,
|
|
833
|
-
lifecycle:
|
|
834
|
-
asset:
|
|
835
|
-
preset:
|
|
836
|
-
marketplacePublished:
|
|
980
|
+
lifecycle: z9.enum(["ACTIVE", "DELETED"]),
|
|
981
|
+
asset: z9.object({
|
|
982
|
+
preset: z9.boolean(),
|
|
983
|
+
marketplacePublished: z9.boolean(),
|
|
837
984
|
publishConfig: JsonObjectSchema.optional(),
|
|
838
|
-
sort:
|
|
985
|
+
sort: z9.number().int(),
|
|
839
986
|
forkFromRef: EntityRefSchema.optional(),
|
|
840
|
-
notAuthorized:
|
|
987
|
+
notAuthorized: z9.boolean()
|
|
841
988
|
}).strict(),
|
|
842
989
|
createdAt: IsoDateTimeSchema,
|
|
843
990
|
updatedAt: IsoDateTimeSchema,
|
|
@@ -872,17 +1019,17 @@ var WorkflowCatalogEntrySchema = z8.object({
|
|
|
872
1019
|
});
|
|
873
1020
|
}
|
|
874
1021
|
});
|
|
875
|
-
var WorkflowPublicationSchema =
|
|
876
|
-
contract:
|
|
1022
|
+
var WorkflowPublicationSchema = z9.object({
|
|
1023
|
+
contract: z9.literal("WorkflowPublication"),
|
|
877
1024
|
publicationId: ContractIdentifierSchema,
|
|
878
1025
|
definitionRef: EntityRefSchema,
|
|
879
1026
|
runtimeDefinitionRef: EntityRefSchema,
|
|
880
1027
|
sourceHash: Sha256Schema,
|
|
881
1028
|
compiledHash: Sha256Schema,
|
|
882
|
-
status:
|
|
1029
|
+
status: z9.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
|
|
883
1030
|
publisherRef: EntityRefSchema,
|
|
884
1031
|
publishedAt: IsoDateTimeSchema.optional(),
|
|
885
|
-
failureReason:
|
|
1032
|
+
failureReason: z9.string().trim().min(1).optional()
|
|
886
1033
|
}).strict().superRefine((publication, context) => {
|
|
887
1034
|
if (publication.definitionRef.kind !== "workflow-definition") {
|
|
888
1035
|
context.addIssue({
|
|
@@ -913,12 +1060,12 @@ var WorkflowPublicationSchema = z8.object({
|
|
|
913
1060
|
});
|
|
914
1061
|
}
|
|
915
1062
|
});
|
|
916
|
-
var WorkflowCompletionCommitSchema =
|
|
917
|
-
contract:
|
|
1063
|
+
var WorkflowCompletionCommitSchema = z9.object({
|
|
1064
|
+
contract: z9.literal("WorkflowCompletionCommit"),
|
|
918
1065
|
commitId: ContractIdentifierSchema,
|
|
919
1066
|
run: ApplicationRunSchema,
|
|
920
|
-
outputs:
|
|
921
|
-
artifacts:
|
|
1067
|
+
outputs: z9.array(OutputRecordSchema),
|
|
1068
|
+
artifacts: z9.array(ArtifactManifestSchema),
|
|
922
1069
|
lineage: LineageRecordSchema,
|
|
923
1070
|
completedAt: IsoDateTimeSchema
|
|
924
1071
|
}).strict().superRefine((commit, context) => {
|
|
@@ -960,15 +1107,15 @@ var WorkflowCompletionCommitSchema = z8.object({
|
|
|
960
1107
|
}
|
|
961
1108
|
});
|
|
962
1109
|
});
|
|
963
|
-
var WorkflowCompletionReceiptSchema =
|
|
964
|
-
contract:
|
|
1110
|
+
var WorkflowCompletionReceiptSchema = z9.object({
|
|
1111
|
+
contract: z9.literal("WorkflowCompletionReceipt"),
|
|
965
1112
|
commitId: ContractIdentifierSchema,
|
|
966
1113
|
runRef: EntityRefSchema,
|
|
967
|
-
outputRefs:
|
|
968
|
-
artifactRefs:
|
|
1114
|
+
outputRefs: z9.array(EntityRefSchema),
|
|
1115
|
+
artifactRefs: z9.array(EntityRefSchema),
|
|
969
1116
|
contentHash: Sha256Schema,
|
|
970
1117
|
committedAt: IsoDateTimeSchema,
|
|
971
|
-
idempotentReplay:
|
|
1118
|
+
idempotentReplay: z9.boolean()
|
|
972
1119
|
}).strict().superRefine((receipt, context) => {
|
|
973
1120
|
if (receipt.runRef.kind !== "application-run") {
|
|
974
1121
|
context.addIssue({
|
|
@@ -1002,6 +1149,18 @@ export {
|
|
|
1002
1149
|
ArtifactAccessSchema,
|
|
1003
1150
|
ArtifactManifestSchema,
|
|
1004
1151
|
OutputRecordSchema,
|
|
1152
|
+
Vec3Schema,
|
|
1153
|
+
Transform3DSchema,
|
|
1154
|
+
CadFeatureNodeSchema,
|
|
1155
|
+
CadConstraintSchema,
|
|
1156
|
+
CadAnnotationPinSchema,
|
|
1157
|
+
CadArtifactDocumentSchema,
|
|
1158
|
+
EdaSheetSchema,
|
|
1159
|
+
EdaComponentInstanceSchema,
|
|
1160
|
+
EdaNetSchema,
|
|
1161
|
+
EdaWireSchema,
|
|
1162
|
+
EdaPcbTraceSchema,
|
|
1163
|
+
EdaCircuitDocumentSchema,
|
|
1005
1164
|
AggregateAssetSchema,
|
|
1006
1165
|
AggregateAssetUpsertSchema,
|
|
1007
1166
|
AggregateAssetDeleteSchema,
|
|
@@ -1077,4 +1236,4 @@ export {
|
|
|
1077
1236
|
WorkflowCompletionCommitSchema,
|
|
1078
1237
|
WorkflowCompletionReceiptSchema
|
|
1079
1238
|
};
|
|
1080
|
-
//# sourceMappingURL=chunk-
|
|
1239
|
+
//# sourceMappingURL=chunk-5ZGNWCL4.mjs.map
|