@inf-monkeys-tech/monkeys 1.0.40 → 1.0.41
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/tenant.d.ts +36 -1
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +10 -2
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/contracts/trend.d.ts +259 -0
- package/lib/contracts/trend.d.ts.map +1 -1
- package/lib/contracts/trend.js +146 -1
- package/lib/contracts/trend.js.map +1 -1
- package/lib/esm/contracts/index.mjs +135 -1
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +136 -1
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +6 -1
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +138 -1
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/index.json +1 -0
- package/lib/json-schema/radar-analysis-detail.schema.json +83 -0
- package/lib/json-schema/radar-analysis-run.schema.json +83 -0
- package/lib/json-schema/tenant-product-config.schema.json +34 -0
- package/lib/json-schema/tenant-runtime-config.schema.json +34 -0
- package/lib/json-schema/trend-radar-collection-item.schema.json +524 -0
- package/lib/schemas/index.d.ts +144 -2
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +19 -2
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
package/lib/esm/index.mjs
CHANGED
|
@@ -11283,9 +11283,14 @@ var TenantTrendRadarSourceSchema = z13.object({
|
|
|
11283
11283
|
ontologyId: ContractIdentifierSchema,
|
|
11284
11284
|
viewId: ContractIdentifierSchema
|
|
11285
11285
|
}).strict();
|
|
11286
|
+
var TenantTrendRadarCollectionTargetSchema = z13.object({
|
|
11287
|
+
ontologyId: ContractIdentifierSchema
|
|
11288
|
+
}).strict();
|
|
11286
11289
|
var TenantTrendRadarSourcesSchema = z13.object({
|
|
11290
|
+
products: TenantTrendRadarSourceSchema.optional(),
|
|
11287
11291
|
hotwords: TenantTrendRadarSourceSchema.optional(),
|
|
11288
|
-
brands: TenantTrendRadarSourceSchema.optional()
|
|
11292
|
+
brands: TenantTrendRadarSourceSchema.optional(),
|
|
11293
|
+
collection: TenantTrendRadarCollectionTargetSchema.optional()
|
|
11289
11294
|
}).strict();
|
|
11290
11295
|
var AssetVariantsSchema = z13.object({
|
|
11291
11296
|
light: z13.string().optional(),
|
|
@@ -12007,6 +12012,120 @@ var RadarSelectionSchema = z14.object({
|
|
|
12007
12012
|
expectedVersion: z14.number().int().nonnegative(),
|
|
12008
12013
|
updatedAt: IsoDateTimeSchema
|
|
12009
12014
|
}).strict();
|
|
12015
|
+
var versionedRefFields = {
|
|
12016
|
+
id: ContractIdentifierSchema,
|
|
12017
|
+
version: z14.union([z14.number().int().positive(), z14.string().trim().min(1)]).optional(),
|
|
12018
|
+
ownerRepo: ContractIdentifierSchema.optional()
|
|
12019
|
+
};
|
|
12020
|
+
var TrendRadarCollectionAssetRefSchema = z14.object({
|
|
12021
|
+
kind: z14.literal("asset"),
|
|
12022
|
+
...versionedRefFields
|
|
12023
|
+
}).strict();
|
|
12024
|
+
var TrendRadarCollectionSelectionRefSchema = z14.object({
|
|
12025
|
+
kind: z14.literal("radar-selection"),
|
|
12026
|
+
...versionedRefFields
|
|
12027
|
+
}).strict();
|
|
12028
|
+
var TrendRadarCollectionRunRefSchema = z14.object({
|
|
12029
|
+
kind: z14.literal("radar-analysis-run"),
|
|
12030
|
+
...versionedRefFields
|
|
12031
|
+
}).strict();
|
|
12032
|
+
var TrendRadarCollectionSubjectRefSchema = z14.object({
|
|
12033
|
+
kind: z14.literal("hotword"),
|
|
12034
|
+
...versionedRefFields
|
|
12035
|
+
}).strict();
|
|
12036
|
+
var TrendRadarCollectionArtifactRefSchema = z14.object({
|
|
12037
|
+
kind: z14.literal("artifact"),
|
|
12038
|
+
...versionedRefFields
|
|
12039
|
+
}).strict();
|
|
12040
|
+
var TrendRadarCollectionRecipeEntrySchema = z14.object({
|
|
12041
|
+
subjectRef: TrendRadarCollectionSubjectRefSchema,
|
|
12042
|
+
label: z14.string().trim().min(1).max(200)
|
|
12043
|
+
}).strict();
|
|
12044
|
+
var TrendRadarCollectionRecipeSchema = z14.object({
|
|
12045
|
+
category: z14.array(TrendRadarCollectionRecipeEntrySchema),
|
|
12046
|
+
design: z14.array(TrendRadarCollectionRecipeEntrySchema),
|
|
12047
|
+
audience: z14.array(TrendRadarCollectionRecipeEntrySchema)
|
|
12048
|
+
}).strict().refine(
|
|
12049
|
+
(recipe) => recipe.category.length + recipe.design.length + recipe.audience.length > 0,
|
|
12050
|
+
"A Trend Radar collection recipe must contain at least one subject."
|
|
12051
|
+
);
|
|
12052
|
+
var TrendRadarCollectionDecisionAxisSchema = z14.object({
|
|
12053
|
+
key: ContractIdentifierSchema,
|
|
12054
|
+
label: z14.string().trim().min(1).max(200).optional(),
|
|
12055
|
+
value: z14.number().finite()
|
|
12056
|
+
}).strict();
|
|
12057
|
+
var TrendRadarCollectionDecisionProjectionSchema = z14.object({
|
|
12058
|
+
axes: z14.array(TrendRadarCollectionDecisionAxisSchema).max(32).optional(),
|
|
12059
|
+
overallScore: z14.number().finite().optional(),
|
|
12060
|
+
itemRank: z14.number().finite().optional(),
|
|
12061
|
+
sourceRefs: z14.array(EntityRefSchema).optional(),
|
|
12062
|
+
outputRefs: z14.array(EntityRefSchema).optional()
|
|
12063
|
+
}).strict().superRefine((projection, context) => {
|
|
12064
|
+
const hasProjection = Boolean(
|
|
12065
|
+
projection.axes?.length || projection.overallScore !== void 0 || projection.itemRank !== void 0 || projection.sourceRefs?.length || projection.outputRefs?.length
|
|
12066
|
+
);
|
|
12067
|
+
if (!hasProjection) {
|
|
12068
|
+
context.addIssue({
|
|
12069
|
+
code: "custom",
|
|
12070
|
+
message: "A decision projection must contain canonical decision data or references."
|
|
12071
|
+
});
|
|
12072
|
+
}
|
|
12073
|
+
const seenAxisKeys = /* @__PURE__ */ new Set();
|
|
12074
|
+
projection.axes?.forEach((axis, index) => {
|
|
12075
|
+
if (seenAxisKeys.has(axis.key)) {
|
|
12076
|
+
context.addIssue({
|
|
12077
|
+
code: "custom",
|
|
12078
|
+
path: ["axes", index, "key"],
|
|
12079
|
+
message: `Duplicate decision axis key: ${axis.key}`
|
|
12080
|
+
});
|
|
12081
|
+
}
|
|
12082
|
+
seenAxisKeys.add(axis.key);
|
|
12083
|
+
});
|
|
12084
|
+
});
|
|
12085
|
+
var TrendRadarCollectionArtifactProjectionSchema = z14.object({
|
|
12086
|
+
artifactRef: TrendRadarCollectionArtifactRefSchema,
|
|
12087
|
+
url: z14.string().url().optional(),
|
|
12088
|
+
thumbnailUrl: z14.string().url().optional(),
|
|
12089
|
+
mimeType: z14.string().trim().min(1).optional(),
|
|
12090
|
+
metadata: JsonObjectSchema.optional()
|
|
12091
|
+
}).strict();
|
|
12092
|
+
var TrendRadarCollectionProjectionWritebackSchema = z14.object({
|
|
12093
|
+
status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
|
|
12094
|
+
updatedAt: IsoDateTimeSchema,
|
|
12095
|
+
error: z14.object({
|
|
12096
|
+
code: ContractIdentifierSchema,
|
|
12097
|
+
message: z14.string().trim().min(1),
|
|
12098
|
+
retryable: z14.boolean()
|
|
12099
|
+
}).strict().optional()
|
|
12100
|
+
}).strict().superRefine((writeback, context) => {
|
|
12101
|
+
if (writeback.status === "FAILED" && !writeback.error) {
|
|
12102
|
+
context.addIssue({
|
|
12103
|
+
code: "custom",
|
|
12104
|
+
path: ["error"],
|
|
12105
|
+
message: "A failed collection projection writeback must include an error."
|
|
12106
|
+
});
|
|
12107
|
+
}
|
|
12108
|
+
if (writeback.status !== "FAILED" && writeback.error) {
|
|
12109
|
+
context.addIssue({
|
|
12110
|
+
code: "custom",
|
|
12111
|
+
path: ["error"],
|
|
12112
|
+
message: "Only a failed collection projection writeback may include an error."
|
|
12113
|
+
});
|
|
12114
|
+
}
|
|
12115
|
+
});
|
|
12116
|
+
var TrendRadarCollectionItemSchema = z14.object({
|
|
12117
|
+
contract: z14.literal("TrendRadarCollectionItem"),
|
|
12118
|
+
schemaVersion: z14.literal(1),
|
|
12119
|
+
selectionRef: TrendRadarCollectionSelectionRefSchema,
|
|
12120
|
+
recipe: TrendRadarCollectionRecipeSchema,
|
|
12121
|
+
status: z14.enum(["SAVED", "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
|
|
12122
|
+
latestRunRef: TrendRadarCollectionRunRefSchema.optional(),
|
|
12123
|
+
decisionProjection: TrendRadarCollectionDecisionProjectionSchema.optional(),
|
|
12124
|
+
artifactProjection: TrendRadarCollectionArtifactProjectionSchema.optional(),
|
|
12125
|
+
createdAt: IsoDateTimeSchema,
|
|
12126
|
+
updatedAt: IsoDateTimeSchema,
|
|
12127
|
+
generatedAt: IsoDateTimeSchema.optional()
|
|
12128
|
+
}).strict();
|
|
12010
12129
|
var RadarAnalysisRunSchema = z14.object({
|
|
12011
12130
|
contract: z14.literal("RadarAnalysisRun"),
|
|
12012
12131
|
runId: ContractIdentifierSchema,
|
|
@@ -12016,6 +12135,8 @@ var RadarAnalysisRunSchema = z14.object({
|
|
|
12016
12135
|
executionRef: EntityRefSchema.optional(),
|
|
12017
12136
|
designProjectRef: EntityRefSchema.optional(),
|
|
12018
12137
|
replayedFromRef: EntityRefSchema.optional(),
|
|
12138
|
+
collectionAssetRef: TrendRadarCollectionAssetRefSchema.optional(),
|
|
12139
|
+
collectionProjectionWriteback: TrendRadarCollectionProjectionWritebackSchema.optional(),
|
|
12019
12140
|
workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
|
|
12020
12141
|
workflowInput: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
12021
12142
|
createDesignProject: z14.boolean().default(true),
|
|
@@ -12738,6 +12859,7 @@ var canonicalContractSchemas = {
|
|
|
12738
12859
|
"tenant-product-config": TenantProductConfigSchema,
|
|
12739
12860
|
"tenant-runtime-config": TenantRuntimeConfigSchema,
|
|
12740
12861
|
"theme-tokens": ThemeTokensSchema,
|
|
12862
|
+
"trend-radar-collection-item": TrendRadarCollectionItemSchema,
|
|
12741
12863
|
"trend-ingest-run": TrendIngestRunSchema,
|
|
12742
12864
|
"trend-metric-snapshot": TrendMetricSnapshotSchema,
|
|
12743
12865
|
"trend-source-record": TrendSourceRecordSchema,
|
|
@@ -14695,6 +14817,7 @@ export {
|
|
|
14695
14817
|
TenantLandingPageConfigSchema,
|
|
14696
14818
|
TenantProductConfigSchema,
|
|
14697
14819
|
TenantRuntimeConfigSchema,
|
|
14820
|
+
TenantTrendRadarCollectionTargetSchema,
|
|
14698
14821
|
TenantTrendRadarSourceSchema,
|
|
14699
14822
|
TenantTrendRadarSourcesSchema,
|
|
14700
14823
|
TenantWorkbenchConfigSchema,
|
|
@@ -14710,6 +14833,18 @@ export {
|
|
|
14710
14833
|
ToolType,
|
|
14711
14834
|
TrendIngestRunSchema,
|
|
14712
14835
|
TrendMetricSnapshotSchema,
|
|
14836
|
+
TrendRadarCollectionArtifactProjectionSchema,
|
|
14837
|
+
TrendRadarCollectionArtifactRefSchema,
|
|
14838
|
+
TrendRadarCollectionAssetRefSchema,
|
|
14839
|
+
TrendRadarCollectionDecisionAxisSchema,
|
|
14840
|
+
TrendRadarCollectionDecisionProjectionSchema,
|
|
14841
|
+
TrendRadarCollectionItemSchema,
|
|
14842
|
+
TrendRadarCollectionProjectionWritebackSchema,
|
|
14843
|
+
TrendRadarCollectionRecipeEntrySchema,
|
|
14844
|
+
TrendRadarCollectionRecipeSchema,
|
|
14845
|
+
TrendRadarCollectionRunRefSchema,
|
|
14846
|
+
TrendRadarCollectionSelectionRefSchema,
|
|
14847
|
+
TrendRadarCollectionSubjectRefSchema,
|
|
14713
14848
|
TrendSourceRecordSchema,
|
|
14714
14849
|
TrendSourceSchema,
|
|
14715
14850
|
ValidationIssueType,
|