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