@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
|
@@ -11149,9 +11149,14 @@ var TenantTrendRadarSourceSchema = z13.object({
|
|
|
11149
11149
|
ontologyId: ContractIdentifierSchema,
|
|
11150
11150
|
viewId: ContractIdentifierSchema
|
|
11151
11151
|
}).strict();
|
|
11152
|
+
var TenantTrendRadarCollectionTargetSchema = z13.object({
|
|
11153
|
+
ontologyId: ContractIdentifierSchema
|
|
11154
|
+
}).strict();
|
|
11152
11155
|
var TenantTrendRadarSourcesSchema = z13.object({
|
|
11156
|
+
products: TenantTrendRadarSourceSchema.optional(),
|
|
11153
11157
|
hotwords: TenantTrendRadarSourceSchema.optional(),
|
|
11154
|
-
brands: TenantTrendRadarSourceSchema.optional()
|
|
11158
|
+
brands: TenantTrendRadarSourceSchema.optional(),
|
|
11159
|
+
collection: TenantTrendRadarCollectionTargetSchema.optional()
|
|
11155
11160
|
}).strict();
|
|
11156
11161
|
var AssetVariantsSchema = z13.object({
|
|
11157
11162
|
light: z13.string().optional(),
|
|
@@ -11873,6 +11878,120 @@ var RadarSelectionSchema = z14.object({
|
|
|
11873
11878
|
expectedVersion: z14.number().int().nonnegative(),
|
|
11874
11879
|
updatedAt: IsoDateTimeSchema
|
|
11875
11880
|
}).strict();
|
|
11881
|
+
var versionedRefFields = {
|
|
11882
|
+
id: ContractIdentifierSchema,
|
|
11883
|
+
version: z14.union([z14.number().int().positive(), z14.string().trim().min(1)]).optional(),
|
|
11884
|
+
ownerRepo: ContractIdentifierSchema.optional()
|
|
11885
|
+
};
|
|
11886
|
+
var TrendRadarCollectionAssetRefSchema = z14.object({
|
|
11887
|
+
kind: z14.literal("asset"),
|
|
11888
|
+
...versionedRefFields
|
|
11889
|
+
}).strict();
|
|
11890
|
+
var TrendRadarCollectionSelectionRefSchema = z14.object({
|
|
11891
|
+
kind: z14.literal("radar-selection"),
|
|
11892
|
+
...versionedRefFields
|
|
11893
|
+
}).strict();
|
|
11894
|
+
var TrendRadarCollectionRunRefSchema = z14.object({
|
|
11895
|
+
kind: z14.literal("radar-analysis-run"),
|
|
11896
|
+
...versionedRefFields
|
|
11897
|
+
}).strict();
|
|
11898
|
+
var TrendRadarCollectionSubjectRefSchema = z14.object({
|
|
11899
|
+
kind: z14.literal("hotword"),
|
|
11900
|
+
...versionedRefFields
|
|
11901
|
+
}).strict();
|
|
11902
|
+
var TrendRadarCollectionArtifactRefSchema = z14.object({
|
|
11903
|
+
kind: z14.literal("artifact"),
|
|
11904
|
+
...versionedRefFields
|
|
11905
|
+
}).strict();
|
|
11906
|
+
var TrendRadarCollectionRecipeEntrySchema = z14.object({
|
|
11907
|
+
subjectRef: TrendRadarCollectionSubjectRefSchema,
|
|
11908
|
+
label: z14.string().trim().min(1).max(200)
|
|
11909
|
+
}).strict();
|
|
11910
|
+
var TrendRadarCollectionRecipeSchema = z14.object({
|
|
11911
|
+
category: z14.array(TrendRadarCollectionRecipeEntrySchema),
|
|
11912
|
+
design: z14.array(TrendRadarCollectionRecipeEntrySchema),
|
|
11913
|
+
audience: z14.array(TrendRadarCollectionRecipeEntrySchema)
|
|
11914
|
+
}).strict().refine(
|
|
11915
|
+
(recipe) => recipe.category.length + recipe.design.length + recipe.audience.length > 0,
|
|
11916
|
+
"A Trend Radar collection recipe must contain at least one subject."
|
|
11917
|
+
);
|
|
11918
|
+
var TrendRadarCollectionDecisionAxisSchema = z14.object({
|
|
11919
|
+
key: ContractIdentifierSchema,
|
|
11920
|
+
label: z14.string().trim().min(1).max(200).optional(),
|
|
11921
|
+
value: z14.number().finite()
|
|
11922
|
+
}).strict();
|
|
11923
|
+
var TrendRadarCollectionDecisionProjectionSchema = z14.object({
|
|
11924
|
+
axes: z14.array(TrendRadarCollectionDecisionAxisSchema).max(32).optional(),
|
|
11925
|
+
overallScore: z14.number().finite().optional(),
|
|
11926
|
+
itemRank: z14.number().finite().optional(),
|
|
11927
|
+
sourceRefs: z14.array(EntityRefSchema).optional(),
|
|
11928
|
+
outputRefs: z14.array(EntityRefSchema).optional()
|
|
11929
|
+
}).strict().superRefine((projection, context) => {
|
|
11930
|
+
const hasProjection = Boolean(
|
|
11931
|
+
projection.axes?.length || projection.overallScore !== void 0 || projection.itemRank !== void 0 || projection.sourceRefs?.length || projection.outputRefs?.length
|
|
11932
|
+
);
|
|
11933
|
+
if (!hasProjection) {
|
|
11934
|
+
context.addIssue({
|
|
11935
|
+
code: "custom",
|
|
11936
|
+
message: "A decision projection must contain canonical decision data or references."
|
|
11937
|
+
});
|
|
11938
|
+
}
|
|
11939
|
+
const seenAxisKeys = /* @__PURE__ */ new Set();
|
|
11940
|
+
projection.axes?.forEach((axis, index) => {
|
|
11941
|
+
if (seenAxisKeys.has(axis.key)) {
|
|
11942
|
+
context.addIssue({
|
|
11943
|
+
code: "custom",
|
|
11944
|
+
path: ["axes", index, "key"],
|
|
11945
|
+
message: `Duplicate decision axis key: ${axis.key}`
|
|
11946
|
+
});
|
|
11947
|
+
}
|
|
11948
|
+
seenAxisKeys.add(axis.key);
|
|
11949
|
+
});
|
|
11950
|
+
});
|
|
11951
|
+
var TrendRadarCollectionArtifactProjectionSchema = z14.object({
|
|
11952
|
+
artifactRef: TrendRadarCollectionArtifactRefSchema,
|
|
11953
|
+
url: z14.string().url().optional(),
|
|
11954
|
+
thumbnailUrl: z14.string().url().optional(),
|
|
11955
|
+
mimeType: z14.string().trim().min(1).optional(),
|
|
11956
|
+
metadata: JsonObjectSchema.optional()
|
|
11957
|
+
}).strict();
|
|
11958
|
+
var TrendRadarCollectionProjectionWritebackSchema = z14.object({
|
|
11959
|
+
status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
|
|
11960
|
+
updatedAt: IsoDateTimeSchema,
|
|
11961
|
+
error: z14.object({
|
|
11962
|
+
code: ContractIdentifierSchema,
|
|
11963
|
+
message: z14.string().trim().min(1),
|
|
11964
|
+
retryable: z14.boolean()
|
|
11965
|
+
}).strict().optional()
|
|
11966
|
+
}).strict().superRefine((writeback, context) => {
|
|
11967
|
+
if (writeback.status === "FAILED" && !writeback.error) {
|
|
11968
|
+
context.addIssue({
|
|
11969
|
+
code: "custom",
|
|
11970
|
+
path: ["error"],
|
|
11971
|
+
message: "A failed collection projection writeback must include an error."
|
|
11972
|
+
});
|
|
11973
|
+
}
|
|
11974
|
+
if (writeback.status !== "FAILED" && writeback.error) {
|
|
11975
|
+
context.addIssue({
|
|
11976
|
+
code: "custom",
|
|
11977
|
+
path: ["error"],
|
|
11978
|
+
message: "Only a failed collection projection writeback may include an error."
|
|
11979
|
+
});
|
|
11980
|
+
}
|
|
11981
|
+
});
|
|
11982
|
+
var TrendRadarCollectionItemSchema = z14.object({
|
|
11983
|
+
contract: z14.literal("TrendRadarCollectionItem"),
|
|
11984
|
+
schemaVersion: z14.literal(1),
|
|
11985
|
+
selectionRef: TrendRadarCollectionSelectionRefSchema,
|
|
11986
|
+
recipe: TrendRadarCollectionRecipeSchema,
|
|
11987
|
+
status: z14.enum(["SAVED", "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
|
|
11988
|
+
latestRunRef: TrendRadarCollectionRunRefSchema.optional(),
|
|
11989
|
+
decisionProjection: TrendRadarCollectionDecisionProjectionSchema.optional(),
|
|
11990
|
+
artifactProjection: TrendRadarCollectionArtifactProjectionSchema.optional(),
|
|
11991
|
+
createdAt: IsoDateTimeSchema,
|
|
11992
|
+
updatedAt: IsoDateTimeSchema,
|
|
11993
|
+
generatedAt: IsoDateTimeSchema.optional()
|
|
11994
|
+
}).strict();
|
|
11876
11995
|
var RadarAnalysisRunSchema = z14.object({
|
|
11877
11996
|
contract: z14.literal("RadarAnalysisRun"),
|
|
11878
11997
|
runId: ContractIdentifierSchema,
|
|
@@ -11882,6 +12001,8 @@ var RadarAnalysisRunSchema = z14.object({
|
|
|
11882
12001
|
executionRef: EntityRefSchema.optional(),
|
|
11883
12002
|
designProjectRef: EntityRefSchema.optional(),
|
|
11884
12003
|
replayedFromRef: EntityRefSchema.optional(),
|
|
12004
|
+
collectionAssetRef: TrendRadarCollectionAssetRefSchema.optional(),
|
|
12005
|
+
collectionProjectionWriteback: TrendRadarCollectionProjectionWritebackSchema.optional(),
|
|
11885
12006
|
workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
|
|
11886
12007
|
workflowInput: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11887
12008
|
createDesignProject: z14.boolean().default(true),
|
|
@@ -12604,6 +12725,7 @@ var canonicalContractSchemas = {
|
|
|
12604
12725
|
"tenant-product-config": TenantProductConfigSchema,
|
|
12605
12726
|
"tenant-runtime-config": TenantRuntimeConfigSchema,
|
|
12606
12727
|
"theme-tokens": ThemeTokensSchema,
|
|
12728
|
+
"trend-radar-collection-item": TrendRadarCollectionItemSchema,
|
|
12607
12729
|
"trend-ingest-run": TrendIngestRunSchema,
|
|
12608
12730
|
"trend-metric-snapshot": TrendMetricSnapshotSchema,
|
|
12609
12731
|
"trend-source-record": TrendSourceRecordSchema,
|
|
@@ -12776,6 +12898,9 @@ export {
|
|
|
12776
12898
|
TenantLandingPageConfigSchema,
|
|
12777
12899
|
TenantProductConfigSchema,
|
|
12778
12900
|
TenantRuntimeConfigSchema,
|
|
12901
|
+
TenantTrendRadarCollectionTargetSchema,
|
|
12902
|
+
TenantTrendRadarSourceSchema,
|
|
12903
|
+
TenantTrendRadarSourcesSchema,
|
|
12779
12904
|
TenantWorkbenchConfigSchema,
|
|
12780
12905
|
TenantWorkbenchPageContextSchema,
|
|
12781
12906
|
TenantWorkbenchPageEnvelopeSchema,
|
|
@@ -12786,6 +12911,18 @@ export {
|
|
|
12786
12911
|
ThemeTokensSchema,
|
|
12787
12912
|
TrendIngestRunSchema,
|
|
12788
12913
|
TrendMetricSnapshotSchema,
|
|
12914
|
+
TrendRadarCollectionArtifactProjectionSchema,
|
|
12915
|
+
TrendRadarCollectionArtifactRefSchema,
|
|
12916
|
+
TrendRadarCollectionAssetRefSchema,
|
|
12917
|
+
TrendRadarCollectionDecisionAxisSchema,
|
|
12918
|
+
TrendRadarCollectionDecisionProjectionSchema,
|
|
12919
|
+
TrendRadarCollectionItemSchema,
|
|
12920
|
+
TrendRadarCollectionProjectionWritebackSchema,
|
|
12921
|
+
TrendRadarCollectionRecipeEntrySchema,
|
|
12922
|
+
TrendRadarCollectionRecipeSchema,
|
|
12923
|
+
TrendRadarCollectionRunRefSchema,
|
|
12924
|
+
TrendRadarCollectionSelectionRefSchema,
|
|
12925
|
+
TrendRadarCollectionSubjectRefSchema,
|
|
12789
12926
|
TrendSourceRecordSchema,
|
|
12790
12927
|
TrendSourceSchema,
|
|
12791
12928
|
ViewProviderDescriptorSchema,
|