@inf-monkeys-tech/monkeys 1.1.63 → 1.1.65

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.
Files changed (50) hide show
  1. package/lib/contracts/bento-block.d.ts +491 -0
  2. package/lib/contracts/bento-block.d.ts.map +1 -1
  3. package/lib/contracts/bento-block.js +158 -12
  4. package/lib/contracts/bento-block.js.map +1 -1
  5. package/lib/contracts/declarative-control-http.d.ts +2358 -255
  6. package/lib/contracts/declarative-control-http.d.ts.map +1 -1
  7. package/lib/contracts/declarative-control.d.ts +193 -19
  8. package/lib/contracts/declarative-control.d.ts.map +1 -1
  9. package/lib/contracts/declarative-publication-job.d.ts +504 -64
  10. package/lib/contracts/declarative-publication-job.d.ts.map +1 -1
  11. package/lib/contracts/page.d.ts +1 -1
  12. package/lib/contracts/render.d.ts +118 -30
  13. package/lib/contracts/render.d.ts.map +1 -1
  14. package/lib/contracts/render.js +6 -1
  15. package/lib/contracts/render.js.map +1 -1
  16. package/lib/contracts/tenant.d.ts +7 -7
  17. package/lib/contracts/unified-view.d.ts +87 -0
  18. package/lib/contracts/unified-view.d.ts.map +1 -1
  19. package/lib/contracts/workflow-column.d.ts +2 -2
  20. package/lib/esm/{chunk-SDA2NWFB.mjs → chunk-AOAJSAI7.mjs} +2 -2
  21. package/lib/esm/chunk-AOAJSAI7.mjs.map +1 -0
  22. package/lib/esm/{chunk-766TRFRH.mjs → chunk-BFGFPBEU.mjs} +142 -12
  23. package/lib/esm/chunk-BFGFPBEU.mjs.map +1 -0
  24. package/lib/esm/{chunk-BTJGKWPM.mjs → chunk-E6UOE6OP.mjs} +6 -3
  25. package/lib/esm/{chunk-BTJGKWPM.mjs.map → chunk-E6UOE6OP.mjs.map} +1 -1
  26. package/lib/esm/{chunk-MP4OJWJ3.mjs → chunk-WC65QK2H.mjs} +2 -2
  27. package/lib/esm/contracts/index.mjs +24 -2
  28. package/lib/esm/index.mjs +26 -4
  29. package/lib/esm/index.mjs.map +1 -1
  30. package/lib/esm/runtime/index.mjs +3 -3
  31. package/lib/esm/schemas/index.mjs +26 -2
  32. package/lib/json-schema/bento-node.schema.json +425 -1
  33. package/lib/json-schema/overlay-node.schema.json +423 -1
  34. package/lib/json-schema/page-runtime-bundle.schema.json +720 -2
  35. package/lib/json-schema/render-node.schema.json +423 -1
  36. package/lib/json-schema/render-tree.schema.json +720 -2
  37. package/lib/json-schema/view-ontology-record.schema.json +722 -2
  38. package/lib/runtime/bento-render-tree.d.ts.map +1 -1
  39. package/lib/runtime/bento-render-tree.js +3 -0
  40. package/lib/runtime/bento-render-tree.js.map +1 -1
  41. package/lib/runtime/runtime-definition-wire.d.ts +252 -32
  42. package/lib/runtime/runtime-definition-wire.d.ts.map +1 -1
  43. package/lib/schemas/index.d.ts +189 -15
  44. package/lib/schemas/index.d.ts.map +1 -1
  45. package/lib/schemas/index.js +16 -3
  46. package/lib/schemas/index.js.map +1 -1
  47. package/package.json +2 -2
  48. package/lib/esm/chunk-766TRFRH.mjs.map +0 -1
  49. package/lib/esm/chunk-SDA2NWFB.mjs.map +0 -1
  50. /package/lib/esm/{chunk-MP4OJWJ3.mjs.map → chunk-WC65QK2H.mjs.map} +0 -0
@@ -6767,6 +6767,7 @@ var ViewSqlWhereSchema = z4.lazy(
6767
6767
  }).strict()
6768
6768
  ])
6769
6769
  );
6770
+ var ViewSqlFilterNodeSchema = ViewSqlWhereSchema;
6770
6771
  var ViewSqlOrderBySchema = z4.object({
6771
6772
  field: ContractIdentifierSchema,
6772
6773
  kind: z4.enum(["builtin", "feature"]).default("builtin"),
@@ -6789,9 +6790,65 @@ var ViewSqlAggregateMetricSchema = z4.object({
6789
6790
  "min",
6790
6791
  "max",
6791
6792
  "distinct_count",
6792
- "ratio"
6793
+ "ratio",
6794
+ "count_distinct",
6795
+ "percentile",
6796
+ "trimmed_avg",
6797
+ "first_by",
6798
+ "last_by"
6793
6799
  ]),
6794
- fieldKey: ContractIdentifierSchema.optional()
6800
+ fieldKey: ContractIdentifierSchema.optional(),
6801
+ numeric: z4.boolean().optional(),
6802
+ percentile: z4.number().finite().min(0).max(100).optional(),
6803
+ trimTopPct: z4.number().finite().min(0).max(100).optional(),
6804
+ orderColumnId: ContractIdentifierSchema.optional(),
6805
+ filter: ViewSqlFilterNodeSchema.optional()
6806
+ }).strict();
6807
+ var ViewSqlAggregateTimeBucketSchema = z4.object({
6808
+ column: ContractIdentifierSchema,
6809
+ granularity: z4.enum(["hour", "day", "week", "month", "quarter", "year"]),
6810
+ timezone: z4.string().trim().min(1).max(128).optional(),
6811
+ fillGaps: z4.boolean().optional()
6812
+ }).strict();
6813
+ var ViewSqlAggregateJoinSchema = z4.object({
6814
+ alias: ContractIdentifierSchema,
6815
+ ontologyId: ContractIdentifierSchema,
6816
+ assetType: ContractIdentifierSchema.optional(),
6817
+ joinType: z4.enum(["inner", "left"]).optional(),
6818
+ viaRelation: z4.object({
6819
+ columnId: ContractIdentifierSchema,
6820
+ direction: z4.enum(["outgoing", "incoming"])
6821
+ }).strict().optional(),
6822
+ onColumn: z4.object({
6823
+ localColumnId: ContractIdentifierSchema,
6824
+ foreignColumnId: ContractIdentifierSchema.optional(),
6825
+ foreignAssetId: z4.boolean().optional()
6826
+ }).strict().optional()
6827
+ }).strict();
6828
+ var ViewSqlAggregateHierarchyScopeSchema = z4.object({
6829
+ targetAlias: ContractIdentifierSchema.optional(),
6830
+ localColumnId: ContractIdentifierSchema.optional(),
6831
+ ontologyId: ContractIdentifierSchema,
6832
+ relationColumnId: ContractIdentifierSchema,
6833
+ direction: z4.enum(["incoming", "outgoing"]),
6834
+ seedIds: z4.array(ContractIdentifierSchema).max(500),
6835
+ maxDepth: z4.number().int().min(0).max(32).optional(),
6836
+ includeSelf: z4.boolean().optional()
6837
+ }).strict();
6838
+ var ViewSqlAggregateUnwindSchema = z4.object({
6839
+ columnId: ContractIdentifierSchema,
6840
+ jsonPath: z4.array(ContractIdentifierSchema).max(32).optional(),
6841
+ preserveEmpty: z4.boolean().optional()
6842
+ }).strict();
6843
+ var ViewSqlAggregateHavingSchema = z4.object({
6844
+ key: ContractIdentifierSchema,
6845
+ op: z4.enum(["eq", "ne", "gt", "gte", "lt", "lte"]),
6846
+ value: z4.number().finite()
6847
+ }).strict();
6848
+ var ViewSqlAggregatePaginationSchema = z4.object({
6849
+ offset: z4.number().int().min(0).optional(),
6850
+ limit: z4.number().int().min(1).max(1e4).optional(),
6851
+ includeTotalGroups: z4.boolean().optional()
6795
6852
  }).strict();
6796
6853
  var ViewSqlGraphSpecSchema = z4.object({
6797
6854
  graphKind: z4.enum([
@@ -6817,6 +6874,25 @@ var ViewSqlFromSourceSchema = z4.object({
6817
6874
  workflowId: ContractIdentifierSchema.optional(),
6818
6875
  includeSharedSlices: z4.boolean().optional()
6819
6876
  }).strict();
6877
+ var ViewSqlAggregateStatementSchema = z4.object({
6878
+ kind: z4.literal("aggregate"),
6879
+ from: ViewSqlFromSourceSchema,
6880
+ where: ViewSqlWhereSchema.optional(),
6881
+ groupBy: z4.array(ContractIdentifierSchema).max(16).optional(),
6882
+ metrics: z4.array(ViewSqlAggregateMetricSchema).min(1).max(32),
6883
+ orderBy: z4.array(ViewSqlOrderBySchema).max(16).optional(),
6884
+ limit: z4.number().int().min(1).max(1e3).optional(),
6885
+ engine: z4.enum(["auto", "canonical", "search"]).optional(),
6886
+ allTeams: z4.boolean().optional(),
6887
+ exact: z4.boolean().optional(),
6888
+ includeTotals: z4.boolean().optional(),
6889
+ timeBucket: ViewSqlAggregateTimeBucketSchema.optional(),
6890
+ joins: z4.array(ViewSqlAggregateJoinSchema).max(16).optional(),
6891
+ hierarchyScopes: z4.array(ViewSqlAggregateHierarchyScopeSchema).max(16).optional(),
6892
+ unwind: ViewSqlAggregateUnwindSchema.optional(),
6893
+ having: z4.array(ViewSqlAggregateHavingSchema).max(32).optional(),
6894
+ pagination: ViewSqlAggregatePaginationSchema.optional()
6895
+ }).strict();
6820
6896
  var ViewSqlStatementSchema = z4.discriminatedUnion("kind", [
6821
6897
  z4.object({
6822
6898
  kind: z4.literal("select"),
@@ -6826,15 +6902,7 @@ var ViewSqlStatementSchema = z4.discriminatedUnion("kind", [
6826
6902
  orderBy: z4.array(ViewSqlOrderBySchema).max(16).optional(),
6827
6903
  limit: z4.number().int().min(1).max(1e3).optional()
6828
6904
  }).strict(),
6829
- z4.object({
6830
- kind: z4.literal("aggregate"),
6831
- from: ViewSqlFromSourceSchema,
6832
- where: ViewSqlWhereSchema.optional(),
6833
- groupBy: z4.array(ContractIdentifierSchema).max(16).optional(),
6834
- metrics: z4.array(ViewSqlAggregateMetricSchema).min(1).max(32),
6835
- orderBy: z4.array(ViewSqlOrderBySchema).max(16).optional(),
6836
- limit: z4.number().int().min(1).max(1e3).optional()
6837
- }).strict(),
6905
+ ViewSqlAggregateStatementSchema,
6838
6906
  z4.object({
6839
6907
  kind: z4.literal("graph"),
6840
6908
  from: ViewSqlFromSourceSchema,
@@ -6913,6 +6981,39 @@ var BlockTypeSchema = z4.enum([
6913
6981
  "json-editor",
6914
6982
  "custom"
6915
6983
  ]);
6984
+ var RenderBentoOntologyRelationBindingSchema = z4.object({
6985
+ kind: z4.literal("ontology-relation"),
6986
+ sourceOntologyId: ContractIdentifierSchema,
6987
+ sourceRecordId: z4.string().trim().min(1).max(256),
6988
+ direction: z4.enum(["outgoing", "incoming", "both"]).optional(),
6989
+ columnId: ContractIdentifierSchema.optional(),
6990
+ targetOntologyIds: z4.array(ContractIdentifierSchema).max(64).optional(),
6991
+ maxHops: z4.number().int().min(1).max(6).optional(),
6992
+ includeTargetFields: z4.array(ContractIdentifierSchema).max(256).optional(),
6993
+ pageSize: z4.number().int().min(1).max(1e3).optional(),
6994
+ pageToken: z4.string().trim().min(1).max(1024).optional()
6995
+ }).strict();
6996
+ var RenderBentoOntologyActionBindingSchema = z4.object({
6997
+ kind: z4.literal("ontology-action"),
6998
+ action: z4.enum([
6999
+ "insert",
7000
+ "update",
7001
+ "delete",
7002
+ "mutate-relation",
7003
+ "workflow-call"
7004
+ ]),
7005
+ ontologyId: ContractIdentifierSchema.optional(),
7006
+ recordId: z4.string().trim().min(1).max(256).optional(),
7007
+ workflowId: ContractIdentifierSchema.optional(),
7008
+ payload: z4.record(z4.string(), z4.unknown()).optional(),
7009
+ invalidateOntologies: z4.array(ContractIdentifierSchema).max(64).optional()
7010
+ }).strict();
7011
+ var BentoActionResultSchema = z4.object({
7012
+ ok: z4.boolean(),
7013
+ data: z4.unknown().optional(),
7014
+ error: z4.string().optional(),
7015
+ invalidatedOntologies: z4.array(ContractIdentifierSchema)
7016
+ }).strict();
6916
7017
  var BlockDataSourceSchema = z4.discriminatedUnion("kind", [
6917
7018
  z4.object({
6918
7019
  kind: z4.literal("statement"),
@@ -6927,6 +7028,22 @@ var BlockDataSourceSchema = z4.discriminatedUnion("kind", [
6927
7028
  kind: z4.literal("record.fields"),
6928
7029
  recordRef: ContractIdentifierSchema.default("subject")
6929
7030
  }).strict(),
7031
+ RenderBentoOntologyRelationBindingSchema,
7032
+ z4.object({
7033
+ kind: z4.literal("ontology-action"),
7034
+ action: z4.enum([
7035
+ "insert",
7036
+ "update",
7037
+ "delete",
7038
+ "mutate-relation",
7039
+ "workflow-call"
7040
+ ]),
7041
+ ontologyId: ContractIdentifierSchema.optional(),
7042
+ recordId: z4.string().trim().min(1).max(256).optional(),
7043
+ workflowId: ContractIdentifierSchema.optional(),
7044
+ payload: JsonObjectSchema.optional(),
7045
+ invalidateOntologies: z4.array(ContractIdentifierSchema).max(64).optional()
7046
+ }).strict(),
6930
7047
  z4.object({
6931
7048
  kind: z4.literal("static")
6932
7049
  }).strict()
@@ -9169,6 +9286,8 @@ var RenderBentoBindingSchema = z10.union([
9169
9286
  kind: z10.literal("ontology-view"),
9170
9287
  viewId: ContractIdentifierSchema
9171
9288
  }).strict(),
9289
+ RenderBentoOntologyRelationBindingSchema,
9290
+ RenderBentoOntologyActionBindingSchema,
9172
9291
  z10.object({
9173
9292
  kind: z10.literal("self-managed")
9174
9293
  }).strict()
@@ -22290,15 +22409,26 @@ export {
22290
22409
  BENTO_GRID_MIN_H,
22291
22410
  BENTO_GRID_MAX_ROWS,
22292
22411
  ViewSqlWhereSchema,
22412
+ ViewSqlFilterNodeSchema,
22293
22413
  ViewSqlOrderBySchema,
22294
22414
  ViewSqlSelectProjectionSchema,
22295
22415
  ViewSqlAggregateMetricSchema,
22416
+ ViewSqlAggregateTimeBucketSchema,
22417
+ ViewSqlAggregateJoinSchema,
22418
+ ViewSqlAggregateHierarchyScopeSchema,
22419
+ ViewSqlAggregateUnwindSchema,
22420
+ ViewSqlAggregateHavingSchema,
22421
+ ViewSqlAggregatePaginationSchema,
22296
22422
  ViewSqlGraphSpecSchema,
22297
22423
  ViewSqlCachePolicySchema,
22298
22424
  ViewSqlFromSourceSchema,
22425
+ ViewSqlAggregateStatementSchema,
22299
22426
  ViewSqlStatementSchema,
22300
22427
  ViewDataDeclarationSchema,
22301
22428
  BlockTypeSchema,
22429
+ RenderBentoOntologyRelationBindingSchema,
22430
+ RenderBentoOntologyActionBindingSchema,
22431
+ BentoActionResultSchema,
22302
22432
  BlockDataSourceSchema,
22303
22433
  BlockSpecSchema,
22304
22434
  BentoWiringRuleSchema,
@@ -22950,4 +23080,4 @@ export {
22950
23080
  ViewShareLinkPolicySchema,
22951
23081
  ViewOntologyRecordSchema
22952
23082
  };
22953
- //# sourceMappingURL=chunk-766TRFRH.mjs.map
23083
+ //# sourceMappingURL=chunk-BFGFPBEU.mjs.map