@objectstack/spec 0.1.0 → 0.1.2
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/README.md +134 -121
- package/dist/ai/agent.zod.d.ts +164 -0
- package/dist/ai/agent.zod.d.ts.map +1 -0
- package/dist/ai/agent.zod.js +51 -0
- package/dist/api/contract.zod.d.ts +1733 -0
- package/dist/api/contract.zod.d.ts.map +1 -0
- package/dist/api/contract.zod.js +138 -0
- package/dist/data/dataset.zod.d.ts +60 -0
- package/dist/data/dataset.zod.d.ts.map +1 -0
- package/dist/data/dataset.zod.js +54 -0
- package/dist/data/field.zod.d.ts +1808 -0
- package/dist/data/field.zod.d.ts.map +1 -0
- package/dist/data/field.zod.js +222 -0
- package/dist/data/flow.zod.d.ts +242 -0
- package/dist/data/flow.zod.d.ts.map +1 -0
- package/dist/data/flow.zod.js +77 -0
- package/dist/data/mapping.zod.d.ts +470 -0
- package/dist/data/mapping.zod.d.ts.map +1 -0
- package/dist/data/mapping.zod.js +65 -0
- package/dist/data/object.zod.d.ts +844 -0
- package/dist/data/object.zod.d.ts.map +1 -0
- package/dist/data/object.zod.js +81 -0
- package/dist/data/permission.zod.d.ts +163 -0
- package/dist/data/permission.zod.d.ts.map +1 -0
- package/dist/data/permission.zod.js +62 -0
- package/dist/data/query.zod.d.ts +438 -0
- package/dist/data/query.zod.d.ts.map +1 -0
- package/dist/data/query.zod.js +147 -0
- package/dist/data/sharing.zod.d.ts +63 -0
- package/dist/data/sharing.zod.d.ts.map +1 -0
- package/dist/data/sharing.zod.js +57 -0
- package/dist/data/trigger.zod.d.ts +354 -0
- package/dist/data/trigger.zod.d.ts.map +1 -0
- package/dist/data/trigger.zod.js +195 -0
- package/dist/data/validation.zod.d.ts +276 -0
- package/dist/data/validation.zod.d.ts.map +1 -0
- package/dist/data/validation.zod.js +105 -0
- package/dist/data/workflow.zod.d.ts +195 -0
- package/dist/data/workflow.zod.d.ts.map +1 -0
- package/dist/data/workflow.zod.js +64 -0
- package/dist/index.d.ts +41 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -5
- package/dist/system/api.zod.d.ts +294 -0
- package/dist/system/api.zod.d.ts.map +1 -0
- package/dist/system/api.zod.js +56 -0
- package/dist/system/constants/index.d.ts +11 -0
- package/dist/system/constants/index.d.ts.map +1 -0
- package/dist/system/constants/index.js +26 -0
- package/dist/system/constants/paths.d.ts +71 -0
- package/dist/system/constants/paths.d.ts.map +1 -0
- package/dist/system/constants/paths.js +65 -0
- package/dist/system/datasource.zod.d.ts +210 -0
- package/dist/system/datasource.zod.d.ts.map +1 -0
- package/dist/system/datasource.zod.js +90 -0
- package/dist/system/discovery.zod.d.ts +174 -0
- package/dist/system/discovery.zod.d.ts.map +1 -0
- package/dist/system/discovery.zod.js +53 -0
- package/dist/system/driver.zod.d.ts +1525 -0
- package/dist/system/driver.zod.d.ts.map +1 -0
- package/dist/system/driver.zod.js +290 -0
- package/dist/system/identity.zod.d.ts +204 -0
- package/dist/system/identity.zod.d.ts.map +1 -0
- package/dist/system/identity.zod.js +68 -0
- package/dist/system/license.zod.d.ts +110 -0
- package/dist/system/license.zod.d.ts.map +1 -0
- package/dist/system/license.zod.js +63 -0
- package/dist/system/manifest.zod.d.ts +397 -0
- package/dist/system/manifest.zod.d.ts.map +1 -0
- package/dist/system/manifest.zod.js +142 -0
- package/dist/system/plugin.zod.d.ts +3516 -0
- package/dist/system/plugin.zod.d.ts.map +1 -0
- package/dist/system/plugin.zod.js +226 -0
- package/dist/system/policy.zod.d.ts +209 -0
- package/dist/system/policy.zod.d.ts.map +1 -0
- package/dist/system/policy.zod.js +54 -0
- package/dist/system/role.zod.d.ts +34 -0
- package/dist/system/role.zod.d.ts.map +1 -0
- package/dist/system/role.zod.js +25 -0
- package/dist/system/territory.zod.d.ts +91 -0
- package/dist/system/territory.zod.d.ts.map +1 -0
- package/dist/system/territory.zod.js +64 -0
- package/dist/system/translation.zod.d.ts +171 -0
- package/dist/system/translation.zod.d.ts.map +1 -0
- package/dist/system/translation.zod.js +34 -0
- package/dist/system/types/index.d.ts +7 -0
- package/dist/system/types/index.d.ts.map +1 -0
- package/dist/system/types/index.js +22 -0
- package/dist/system/types/plugin.d.ts +113 -0
- package/dist/system/types/plugin.d.ts.map +1 -0
- package/dist/system/types/plugin.js +6 -0
- package/dist/system/webhook.zod.d.ts +106 -0
- package/dist/system/webhook.zod.d.ts.map +1 -0
- package/dist/system/webhook.zod.js +56 -0
- package/dist/ui/action.zod.d.ts +155 -0
- package/dist/ui/action.zod.d.ts.map +1 -0
- package/dist/ui/action.zod.js +54 -0
- package/dist/ui/app.zod.d.ts +405 -0
- package/dist/ui/app.zod.d.ts.map +1 -0
- package/dist/ui/app.zod.js +138 -0
- package/dist/ui/dashboard.zod.d.ts +213 -0
- package/dist/ui/dashboard.zod.d.ts.map +1 -0
- package/dist/ui/dashboard.zod.js +72 -0
- package/dist/ui/page.zod.d.ts +187 -0
- package/dist/ui/page.zod.d.ts.map +1 -0
- package/dist/ui/page.zod.js +48 -0
- package/dist/ui/report.zod.d.ts +233 -0
- package/dist/ui/report.zod.d.ts.map +1 -0
- package/dist/ui/report.zod.js +74 -0
- package/dist/ui/theme.zod.d.ts +1221 -0
- package/dist/ui/theme.zod.d.ts.map +1 -0
- package/dist/ui/theme.zod.js +202 -0
- package/dist/ui/view.zod.d.ts +887 -0
- package/dist/ui/view.zod.d.ts.map +1 -0
- package/dist/ui/view.zod.js +83 -0
- package/dist/ui/widget.zod.d.ts +350 -0
- package/dist/ui/widget.zod.d.ts.map +1 -0
- package/dist/ui/widget.zod.js +66 -0
- package/json-schema/AIKnowledge.json +30 -0
- package/json-schema/AIModelConfig.json +41 -0
- package/json-schema/AITool.json +33 -0
- package/json-schema/Action.json +162 -0
- package/json-schema/ActionParam.json +82 -0
- package/json-schema/Address.json +40 -0
- package/json-schema/Agent.json +140 -0
- package/json-schema/AggregationFunction.json +19 -0
- package/json-schema/AggregationNode.json +42 -0
- package/json-schema/Animation.json +56 -0
- package/json-schema/ApiCapabilities.json +28 -0
- package/json-schema/ApiEndpoint.json +162 -0
- package/json-schema/ApiError.json +27 -0
- package/json-schema/ApiMapping.json +28 -0
- package/json-schema/ApiRoutes.json +41 -0
- package/json-schema/App.json +297 -0
- package/json-schema/AppBranding.json +24 -0
- package/json-schema/AsyncValidation.json +70 -0
- package/json-schema/AuditPolicy.json +31 -0
- package/json-schema/AuthProtocol.json +17 -0
- package/json-schema/AuthProvider.json +171 -0
- package/json-schema/BaseResponse.json +63 -0
- package/json-schema/BorderRadius.json +44 -0
- package/json-schema/Breakpoints.json +36 -0
- package/json-schema/BulkRequest.json +29 -0
- package/json-schema/BulkResponse.json +108 -0
- package/json-schema/CalendarConfig.json +28 -0
- package/json-schema/ChartType.json +19 -0
- package/json-schema/ColorPalette.json +83 -0
- package/json-schema/ConditionalValidation.json +793 -0
- package/json-schema/CreateRequest.json +20 -0
- package/json-schema/CrossFieldValidation.json +56 -0
- package/json-schema/CustomValidator.json +57 -0
- package/json-schema/Dashboard.json +117 -0
- package/json-schema/DashboardNavItem.json +42 -0
- package/json-schema/DashboardWidget.json +89 -0
- package/json-schema/Dataset.json +63 -0
- package/json-schema/DatasetMode.json +16 -0
- package/json-schema/Datasource.json +75 -0
- package/json-schema/DatasourceCapabilities.json +36 -0
- package/json-schema/DeleteResponse.json +68 -0
- package/json-schema/Discovery.json +114 -0
- package/json-schema/DriverCapabilities.json +39 -0
- package/json-schema/DriverDefinition.json +66 -0
- package/json-schema/DriverInterface.json +58 -0
- package/json-schema/DriverOptions.json +23 -0
- package/json-schema/DriverType.json +10 -0
- package/json-schema/EmailAlertAction.json +37 -0
- package/json-schema/ExportRequest.json +786 -0
- package/json-schema/Feature.json +51 -0
- package/json-schema/Field.json +290 -0
- package/json-schema/FieldMapping.json +83 -0
- package/json-schema/FieldNode.json +32 -0
- package/json-schema/FieldPermission.json +22 -0
- package/json-schema/FieldType.json +42 -0
- package/json-schema/FieldUpdateAction.json +32 -0
- package/json-schema/FieldWidgetProps.json +327 -0
- package/json-schema/FilterNode.json +52 -0
- package/json-schema/FilterOperator.json +26 -0
- package/json-schema/Flow.json +186 -0
- package/json-schema/FlowEdge.json +37 -0
- package/json-schema/FlowNode.json +65 -0
- package/json-schema/FlowNodeAction.json +24 -0
- package/json-schema/FlowVariable.json +34 -0
- package/json-schema/FormSection.json +42 -0
- package/json-schema/FormView.json +99 -0
- package/json-schema/FormatValidation.json +59 -0
- package/json-schema/GanttConfig.json +32 -0
- package/json-schema/GroupNavItem.json +42 -0
- package/json-schema/HttpMethod.json +16 -0
- package/json-schema/I18nContext.json +12 -0
- package/json-schema/Index.json +30 -0
- package/json-schema/JoinNode.json +455 -0
- package/json-schema/JoinType.json +15 -0
- package/json-schema/KanbanConfig.json +31 -0
- package/json-schema/LDAPConfig.json +39 -0
- package/json-schema/License.json +57 -0
- package/json-schema/ListRecordResponse.json +103 -0
- package/json-schema/ListView.json +153 -0
- package/json-schema/Locale.json +10 -0
- package/json-schema/LocationCoordinates.json +36 -0
- package/json-schema/Logger.json +25 -0
- package/json-schema/LogicOperator.json +14 -0
- package/json-schema/Manifest.json +315 -0
- package/json-schema/Mapping.json +598 -0
- package/json-schema/MenuItem.json +28 -0
- package/json-schema/MetricType.json +14 -0
- package/json-schema/ModificationResult.json +46 -0
- package/json-schema/NavigationItem.json +214 -0
- package/json-schema/NetworkPolicy.json +31 -0
- package/json-schema/OIDCConfig.json +46 -0
- package/json-schema/OWDModel.json +14 -0
- package/json-schema/Object.json +428 -0
- package/json-schema/ObjectCapabilities.json +62 -0
- package/json-schema/ObjectNavItem.json +46 -0
- package/json-schema/ObjectPermission.json +42 -0
- package/json-schema/ObjectQLClient.json +12 -0
- package/json-schema/Page.json +117 -0
- package/json-schema/PageComponent.json +36 -0
- package/json-schema/PageNavItem.json +47 -0
- package/json-schema/PageRegion.json +63 -0
- package/json-schema/PasswordPolicy.json +41 -0
- package/json-schema/PermissionSet.json +96 -0
- package/json-schema/Plan.json +53 -0
- package/json-schema/Plugin.json +20 -0
- package/json-schema/PluginContext.json +91 -0
- package/json-schema/PluginLifecycle.json +11 -0
- package/json-schema/Policy.json +138 -0
- package/json-schema/Query.json +456 -0
- package/json-schema/RateLimit.json +26 -0
- package/json-schema/RecordData.json +11 -0
- package/json-schema/Report.json +219 -0
- package/json-schema/ReportChart.json +45 -0
- package/json-schema/ReportColumn.json +35 -0
- package/json-schema/ReportGrouping.json +38 -0
- package/json-schema/ReportType.json +15 -0
- package/json-schema/Role.json +32 -0
- package/json-schema/Router.json +12 -0
- package/json-schema/SAMLConfig.json +44 -0
- package/json-schema/Scheduler.json +12 -0
- package/json-schema/ScopedStorage.json +12 -0
- package/json-schema/ScriptValidation.json +48 -0
- package/json-schema/SelectOption.json +32 -0
- package/json-schema/SessionPolicy.json +27 -0
- package/json-schema/Shadow.json +44 -0
- package/json-schema/SharingLevel.json +13 -0
- package/json-schema/SharingRule.json +58 -0
- package/json-schema/SharingRuleType.json +15 -0
- package/json-schema/SingleRecordResponse.json +69 -0
- package/json-schema/SortNode.json +26 -0
- package/json-schema/Spacing.json +64 -0
- package/json-schema/StateMachineValidation.json +59 -0
- package/json-schema/SystemAPI.json +12 -0
- package/json-schema/Territory.json +77 -0
- package/json-schema/TerritoryModel.json +34 -0
- package/json-schema/TerritoryType.json +15 -0
- package/json-schema/Theme.json +543 -0
- package/json-schema/ThemeMode.json +14 -0
- package/json-schema/TransformType.json +18 -0
- package/json-schema/TranslationBundle.json +78 -0
- package/json-schema/TranslationData.json +75 -0
- package/json-schema/Trigger.json +73 -0
- package/json-schema/TriggerAction.json +14 -0
- package/json-schema/TriggerContext.json +61 -0
- package/json-schema/TriggerTiming.json +13 -0
- package/json-schema/Typography.json +142 -0
- package/json-schema/UniquenessValidation.json +59 -0
- package/json-schema/UpdateRequest.json +20 -0
- package/json-schema/UrlNavItem.json +51 -0
- package/json-schema/ValidationRule.json +794 -0
- package/json-schema/View.json +500 -0
- package/json-schema/Webhook.json +88 -0
- package/json-schema/WebhookReceiver.json +66 -0
- package/json-schema/WebhookTriggerType.json +16 -0
- package/json-schema/WindowFunction.json +24 -0
- package/json-schema/WindowFunctionNode.json +104 -0
- package/json-schema/WindowSpec.json +65 -0
- package/json-schema/WorkflowAction.json +84 -0
- package/json-schema/WorkflowRule.json +128 -0
- package/json-schema/WorkflowTriggerType.json +16 -0
- package/json-schema/ZIndex.json +44 -0
- package/package.json +34 -20
- package/dist/examples.d.ts +0 -28
- package/dist/examples.d.ts.map +0 -1
- package/dist/examples.js +0 -250
- package/dist/types/index.d.ts +0 -9
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -8
- package/dist/types/meta/field-type.d.ts +0 -54
- package/dist/types/meta/field-type.d.ts.map +0 -1
- package/dist/types/meta/field-type.js +0 -42
- package/dist/types/meta/index.d.ts +0 -13
- package/dist/types/meta/index.d.ts.map +0 -1
- package/dist/types/meta/index.js +0 -12
- package/dist/types/meta/object-entity.d.ts +0 -246
- package/dist/types/meta/object-entity.d.ts.map +0 -1
- package/dist/types/meta/object-entity.js +0 -9
- package/dist/types/meta/object-field.d.ts +0 -199
- package/dist/types/meta/object-field.d.ts.map +0 -1
- package/dist/types/meta/object-field.js +0 -9
- package/dist/types/meta/object-view.d.ts +0 -430
- package/dist/types/meta/object-view.d.ts.map +0 -1
- package/dist/types/meta/object-view.js +0 -9
- package/src/examples.ts +0 -257
- package/src/index.ts +0 -10
- package/src/types/index.ts +0 -9
- package/src/types/meta/field-type.ts +0 -91
- package/src/types/meta/index.ts +0 -13
- package/src/types/meta/object-entity.ts +0 -265
- package/src/types/meta/object-field.ts +0 -218
- package/src/types/meta/object-view.ts +0 -475
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Report Type Enum
|
|
4
|
+
*/
|
|
5
|
+
export declare const ReportType: z.ZodEnum<["tabular", "summary", "matrix", "joined"]>;
|
|
6
|
+
/**
|
|
7
|
+
* Report Column Schema
|
|
8
|
+
*/
|
|
9
|
+
export declare const ReportColumnSchema: z.ZodObject<{
|
|
10
|
+
field: z.ZodString;
|
|
11
|
+
label: z.ZodOptional<z.ZodString>;
|
|
12
|
+
aggregate: z.ZodOptional<z.ZodEnum<["sum", "avg", "max", "min", "count", "unique"]>>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
field: string;
|
|
15
|
+
label?: string | undefined;
|
|
16
|
+
aggregate?: "unique" | "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
field: string;
|
|
19
|
+
label?: string | undefined;
|
|
20
|
+
aggregate?: "unique" | "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Report Grouping Schema
|
|
24
|
+
*/
|
|
25
|
+
export declare const ReportGroupingSchema: z.ZodObject<{
|
|
26
|
+
field: z.ZodString;
|
|
27
|
+
sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
|
|
28
|
+
dateGranularity: z.ZodOptional<z.ZodEnum<["day", "week", "month", "quarter", "year"]>>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
field: string;
|
|
31
|
+
sortOrder: "asc" | "desc";
|
|
32
|
+
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
field: string;
|
|
35
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
36
|
+
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Report Chart Schema
|
|
40
|
+
* Embedded visualization configuration.
|
|
41
|
+
*/
|
|
42
|
+
export declare const ReportChartSchema: z.ZodObject<{
|
|
43
|
+
type: z.ZodEnum<["bar", "column", "line", "pie", "donut", "scatter", "funnel"]>;
|
|
44
|
+
title: z.ZodOptional<z.ZodString>;
|
|
45
|
+
showLegend: z.ZodDefault<z.ZodBoolean>;
|
|
46
|
+
xAxis: z.ZodString;
|
|
47
|
+
yAxis: z.ZodString;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
type: "bar" | "line" | "pie" | "donut" | "funnel" | "column" | "scatter";
|
|
50
|
+
showLegend: boolean;
|
|
51
|
+
xAxis: string;
|
|
52
|
+
yAxis: string;
|
|
53
|
+
title?: string | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
type: "bar" | "line" | "pie" | "donut" | "funnel" | "column" | "scatter";
|
|
56
|
+
xAxis: string;
|
|
57
|
+
yAxis: string;
|
|
58
|
+
title?: string | undefined;
|
|
59
|
+
showLegend?: boolean | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Report Schema
|
|
63
|
+
* Deep data analysis definition.
|
|
64
|
+
*/
|
|
65
|
+
export declare const ReportSchema: z.ZodObject<{
|
|
66
|
+
/** Identity */
|
|
67
|
+
name: z.ZodString;
|
|
68
|
+
label: z.ZodString;
|
|
69
|
+
description: z.ZodOptional<z.ZodString>;
|
|
70
|
+
/** Data Source */
|
|
71
|
+
objectName: z.ZodString;
|
|
72
|
+
/** Report Configuration */
|
|
73
|
+
type: z.ZodDefault<z.ZodEnum<["tabular", "summary", "matrix", "joined"]>>;
|
|
74
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
75
|
+
field: z.ZodString;
|
|
76
|
+
label: z.ZodOptional<z.ZodString>;
|
|
77
|
+
aggregate: z.ZodOptional<z.ZodEnum<["sum", "avg", "max", "min", "count", "unique"]>>;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
field: string;
|
|
80
|
+
label?: string | undefined;
|
|
81
|
+
aggregate?: "unique" | "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
82
|
+
}, {
|
|
83
|
+
field: string;
|
|
84
|
+
label?: string | undefined;
|
|
85
|
+
aggregate?: "unique" | "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
86
|
+
}>, "many">;
|
|
87
|
+
/** Grouping (for Summary/Matrix) */
|
|
88
|
+
groupingsDown: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
89
|
+
field: z.ZodString;
|
|
90
|
+
sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
|
|
91
|
+
dateGranularity: z.ZodOptional<z.ZodEnum<["day", "week", "month", "quarter", "year"]>>;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
field: string;
|
|
94
|
+
sortOrder: "asc" | "desc";
|
|
95
|
+
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
field: string;
|
|
98
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
99
|
+
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
100
|
+
}>, "many">>;
|
|
101
|
+
groupingsAcross: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
+
field: z.ZodString;
|
|
103
|
+
sortOrder: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
|
|
104
|
+
dateGranularity: z.ZodOptional<z.ZodEnum<["day", "week", "month", "quarter", "year"]>>;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
field: string;
|
|
107
|
+
sortOrder: "asc" | "desc";
|
|
108
|
+
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
field: string;
|
|
111
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
112
|
+
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
113
|
+
}>, "many">>;
|
|
114
|
+
/** Filtering */
|
|
115
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
116
|
+
filterItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
117
|
+
id: z.ZodNumber;
|
|
118
|
+
field: z.ZodString;
|
|
119
|
+
operator: z.ZodString;
|
|
120
|
+
value: z.ZodAny;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
field: string;
|
|
123
|
+
id: number;
|
|
124
|
+
operator: string;
|
|
125
|
+
value?: any;
|
|
126
|
+
}, {
|
|
127
|
+
field: string;
|
|
128
|
+
id: number;
|
|
129
|
+
operator: string;
|
|
130
|
+
value?: any;
|
|
131
|
+
}>, "many">>;
|
|
132
|
+
/** Visualization */
|
|
133
|
+
chart: z.ZodOptional<z.ZodObject<{
|
|
134
|
+
type: z.ZodEnum<["bar", "column", "line", "pie", "donut", "scatter", "funnel"]>;
|
|
135
|
+
title: z.ZodOptional<z.ZodString>;
|
|
136
|
+
showLegend: z.ZodDefault<z.ZodBoolean>;
|
|
137
|
+
xAxis: z.ZodString;
|
|
138
|
+
yAxis: z.ZodString;
|
|
139
|
+
}, "strip", z.ZodTypeAny, {
|
|
140
|
+
type: "bar" | "line" | "pie" | "donut" | "funnel" | "column" | "scatter";
|
|
141
|
+
showLegend: boolean;
|
|
142
|
+
xAxis: string;
|
|
143
|
+
yAxis: string;
|
|
144
|
+
title?: string | undefined;
|
|
145
|
+
}, {
|
|
146
|
+
type: "bar" | "line" | "pie" | "donut" | "funnel" | "column" | "scatter";
|
|
147
|
+
xAxis: string;
|
|
148
|
+
yAxis: string;
|
|
149
|
+
title?: string | undefined;
|
|
150
|
+
showLegend?: boolean | undefined;
|
|
151
|
+
}>>;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
type: "summary" | "tabular" | "matrix" | "joined";
|
|
154
|
+
label: string;
|
|
155
|
+
name: string;
|
|
156
|
+
objectName: string;
|
|
157
|
+
columns: {
|
|
158
|
+
field: string;
|
|
159
|
+
label?: string | undefined;
|
|
160
|
+
aggregate?: "unique" | "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
161
|
+
}[];
|
|
162
|
+
filter?: string | undefined;
|
|
163
|
+
description?: string | undefined;
|
|
164
|
+
groupingsDown?: {
|
|
165
|
+
field: string;
|
|
166
|
+
sortOrder: "asc" | "desc";
|
|
167
|
+
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
168
|
+
}[] | undefined;
|
|
169
|
+
groupingsAcross?: {
|
|
170
|
+
field: string;
|
|
171
|
+
sortOrder: "asc" | "desc";
|
|
172
|
+
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
173
|
+
}[] | undefined;
|
|
174
|
+
filterItems?: {
|
|
175
|
+
field: string;
|
|
176
|
+
id: number;
|
|
177
|
+
operator: string;
|
|
178
|
+
value?: any;
|
|
179
|
+
}[] | undefined;
|
|
180
|
+
chart?: {
|
|
181
|
+
type: "bar" | "line" | "pie" | "donut" | "funnel" | "column" | "scatter";
|
|
182
|
+
showLegend: boolean;
|
|
183
|
+
xAxis: string;
|
|
184
|
+
yAxis: string;
|
|
185
|
+
title?: string | undefined;
|
|
186
|
+
} | undefined;
|
|
187
|
+
}, {
|
|
188
|
+
label: string;
|
|
189
|
+
name: string;
|
|
190
|
+
objectName: string;
|
|
191
|
+
columns: {
|
|
192
|
+
field: string;
|
|
193
|
+
label?: string | undefined;
|
|
194
|
+
aggregate?: "unique" | "min" | "max" | "count" | "sum" | "avg" | undefined;
|
|
195
|
+
}[];
|
|
196
|
+
filter?: string | undefined;
|
|
197
|
+
type?: "summary" | "tabular" | "matrix" | "joined" | undefined;
|
|
198
|
+
description?: string | undefined;
|
|
199
|
+
groupingsDown?: {
|
|
200
|
+
field: string;
|
|
201
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
202
|
+
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
203
|
+
}[] | undefined;
|
|
204
|
+
groupingsAcross?: {
|
|
205
|
+
field: string;
|
|
206
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
207
|
+
dateGranularity?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
208
|
+
}[] | undefined;
|
|
209
|
+
filterItems?: {
|
|
210
|
+
field: string;
|
|
211
|
+
id: number;
|
|
212
|
+
operator: string;
|
|
213
|
+
value?: any;
|
|
214
|
+
}[] | undefined;
|
|
215
|
+
chart?: {
|
|
216
|
+
type: "bar" | "line" | "pie" | "donut" | "funnel" | "column" | "scatter";
|
|
217
|
+
xAxis: string;
|
|
218
|
+
yAxis: string;
|
|
219
|
+
title?: string | undefined;
|
|
220
|
+
showLegend?: boolean | undefined;
|
|
221
|
+
} | undefined;
|
|
222
|
+
}>;
|
|
223
|
+
export type Report = z.infer<typeof ReportSchema>;
|
|
224
|
+
export type ReportColumn = z.infer<typeof ReportColumnSchema>;
|
|
225
|
+
export type ReportGrouping = z.infer<typeof ReportGroupingSchema>;
|
|
226
|
+
export type ReportChart = z.infer<typeof ReportChartSchema>;
|
|
227
|
+
/**
|
|
228
|
+
* Report Factory Helper
|
|
229
|
+
*/
|
|
230
|
+
export declare const Report: {
|
|
231
|
+
readonly create: (config: z.input<typeof ReportSchema>) => Report;
|
|
232
|
+
};
|
|
233
|
+
//# sourceMappingURL=report.zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.zod.d.ts","sourceRoot":"","sources":["../../src/ui/report.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,UAAU,uDAKrB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAI7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAM5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,YAAY;IACvB,eAAe;;;;IAKf,kBAAkB;;IAGlB,2BAA2B;;;;;;;;;;;;;;;IAK3B,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIpC,gBAAgB;;;;;;;;;;;;;;;;;;IAShB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEpB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,MAAM;8BACA,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,KAAG,MAAM;CAC9C,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Report = exports.ReportSchema = exports.ReportChartSchema = exports.ReportGroupingSchema = exports.ReportColumnSchema = exports.ReportType = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Report Type Enum
|
|
7
|
+
*/
|
|
8
|
+
exports.ReportType = zod_1.z.enum([
|
|
9
|
+
'tabular', // Simple list
|
|
10
|
+
'summary', // Grouped by row
|
|
11
|
+
'matrix', // Grouped by row and column
|
|
12
|
+
'joined' // Joined multiple blocks
|
|
13
|
+
]);
|
|
14
|
+
/**
|
|
15
|
+
* Report Column Schema
|
|
16
|
+
*/
|
|
17
|
+
exports.ReportColumnSchema = zod_1.z.object({
|
|
18
|
+
field: zod_1.z.string().describe('Field name'),
|
|
19
|
+
label: zod_1.z.string().optional().describe('Override label'),
|
|
20
|
+
aggregate: zod_1.z.enum(['sum', 'avg', 'max', 'min', 'count', 'unique']).optional().describe('Aggregation function'),
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Report Grouping Schema
|
|
24
|
+
*/
|
|
25
|
+
exports.ReportGroupingSchema = zod_1.z.object({
|
|
26
|
+
field: zod_1.z.string().describe('Field to group by'),
|
|
27
|
+
sortOrder: zod_1.z.enum(['asc', 'desc']).default('asc'),
|
|
28
|
+
dateGranularity: zod_1.z.enum(['day', 'week', 'month', 'quarter', 'year']).optional().describe('For date fields'),
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Report Chart Schema
|
|
32
|
+
* Embedded visualization configuration.
|
|
33
|
+
*/
|
|
34
|
+
exports.ReportChartSchema = zod_1.z.object({
|
|
35
|
+
type: zod_1.z.enum(['bar', 'column', 'line', 'pie', 'donut', 'scatter', 'funnel']).describe('Chart type'),
|
|
36
|
+
title: zod_1.z.string().optional(),
|
|
37
|
+
showLegend: zod_1.z.boolean().default(true),
|
|
38
|
+
xAxis: zod_1.z.string().describe('Grouping field for X-Axis'),
|
|
39
|
+
yAxis: zod_1.z.string().describe('Summary field for Y-Axis'),
|
|
40
|
+
});
|
|
41
|
+
/**
|
|
42
|
+
* Report Schema
|
|
43
|
+
* Deep data analysis definition.
|
|
44
|
+
*/
|
|
45
|
+
exports.ReportSchema = zod_1.z.object({
|
|
46
|
+
/** Identity */
|
|
47
|
+
name: zod_1.z.string().regex(/^[a-z_][a-z0-9_]*$/).describe('Report unique name'),
|
|
48
|
+
label: zod_1.z.string().describe('Report label'),
|
|
49
|
+
description: zod_1.z.string().optional(),
|
|
50
|
+
/** Data Source */
|
|
51
|
+
objectName: zod_1.z.string().describe('Primary object'),
|
|
52
|
+
/** Report Configuration */
|
|
53
|
+
type: exports.ReportType.default('tabular').describe('Report format type'),
|
|
54
|
+
columns: zod_1.z.array(exports.ReportColumnSchema).describe('Columns to display'),
|
|
55
|
+
/** Grouping (for Summary/Matrix) */
|
|
56
|
+
groupingsDown: zod_1.z.array(exports.ReportGroupingSchema).optional().describe('Row groupings'),
|
|
57
|
+
groupingsAcross: zod_1.z.array(exports.ReportGroupingSchema).optional().describe('Column groupings (Matrix only)'),
|
|
58
|
+
/** Filtering */
|
|
59
|
+
filter: zod_1.z.string().optional().describe('Filter logic (e.g. "1 AND (2 OR 3)")'),
|
|
60
|
+
filterItems: zod_1.z.array(zod_1.z.object({
|
|
61
|
+
id: zod_1.z.number(),
|
|
62
|
+
field: zod_1.z.string(),
|
|
63
|
+
operator: zod_1.z.string(),
|
|
64
|
+
value: zod_1.z.any()
|
|
65
|
+
})).optional().describe('Filter criteria lines'),
|
|
66
|
+
/** Visualization */
|
|
67
|
+
chart: exports.ReportChartSchema.optional().describe('Embedded chart configuration'),
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* Report Factory Helper
|
|
71
|
+
*/
|
|
72
|
+
exports.Report = {
|
|
73
|
+
create: (config) => exports.ReportSchema.parse(config),
|
|
74
|
+
};
|