@objectql/types 1.8.3 → 1.8.4
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/dist/api.d.ts +52 -0
- package/dist/api.js +25 -1
- package/dist/api.js.map +1 -1
- package/dist/form.d.ts +315 -0
- package/dist/form.js +12 -0
- package/dist/form.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/report.d.ts +276 -0
- package/dist/report.js +11 -0
- package/dist/report.js.map +1 -0
- package/dist/view.d.ts +304 -0
- package/dist/view.js +12 -0
- package/dist/view.js.map +1 -0
- package/dist/workflow.d.ts +358 -0
- package/dist/workflow.js +11 -0
- package/dist/workflow.js.map +1 -0
- package/package.json +1 -1
package/dist/report.d.ts
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Report Metadata Definition
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for reports, data summaries, and analytics in ObjectQL.
|
|
5
|
+
* Reports aggregate and visualize data from objects with grouping, filtering, and calculations.
|
|
6
|
+
*
|
|
7
|
+
* Based on patterns from Salesforce Reports, Tableau, and similar BI platforms.
|
|
8
|
+
*/
|
|
9
|
+
import { ViewFilter, ViewFilterGroup, ViewColumn } from './view';
|
|
10
|
+
/**
|
|
11
|
+
* Types of reports supported by ObjectQL
|
|
12
|
+
*/
|
|
13
|
+
export type ReportType = 'tabular' | 'summary' | 'matrix' | 'chart' | 'dashboard' | 'custom';
|
|
14
|
+
/**
|
|
15
|
+
* Chart types for visualization
|
|
16
|
+
*/
|
|
17
|
+
export type ChartType = 'bar' | 'column' | 'line' | 'area' | 'pie' | 'donut' | 'scatter' | 'bubble' | 'funnel' | 'gauge' | 'radar' | 'heatmap' | 'treemap' | 'waterfall' | 'custom';
|
|
18
|
+
/**
|
|
19
|
+
* Aggregation functions for report calculations
|
|
20
|
+
*/
|
|
21
|
+
export type AggregationFunction = 'count' | 'sum' | 'avg' | 'min' | 'max' | 'median' | 'mode' | 'stddev' | 'variance' | 'distinct_count' | 'first' | 'last' | 'custom';
|
|
22
|
+
/**
|
|
23
|
+
* Grouping configuration for reports
|
|
24
|
+
*/
|
|
25
|
+
export interface ReportGrouping {
|
|
26
|
+
/** Field to group by */
|
|
27
|
+
field: string;
|
|
28
|
+
/** Display label */
|
|
29
|
+
label?: string;
|
|
30
|
+
/** Sort order for groups */
|
|
31
|
+
sort?: 'asc' | 'desc';
|
|
32
|
+
/** Group by date interval (for date fields) */
|
|
33
|
+
date_interval?: 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
34
|
+
/** Group by numeric range (for numeric fields) */
|
|
35
|
+
numeric_range?: {
|
|
36
|
+
/** Range size */
|
|
37
|
+
size: number;
|
|
38
|
+
/** Starting value */
|
|
39
|
+
start?: number;
|
|
40
|
+
};
|
|
41
|
+
/** Show subtotals for this grouping */
|
|
42
|
+
show_subtotals?: boolean;
|
|
43
|
+
/** Limit number of groups */
|
|
44
|
+
limit?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Aggregation/calculation configuration
|
|
48
|
+
*/
|
|
49
|
+
export interface ReportAggregation {
|
|
50
|
+
/** Field to aggregate */
|
|
51
|
+
field: string;
|
|
52
|
+
/** Aggregation function */
|
|
53
|
+
function: AggregationFunction;
|
|
54
|
+
/** Display label */
|
|
55
|
+
label?: string;
|
|
56
|
+
/** Display format */
|
|
57
|
+
format?: string;
|
|
58
|
+
/** Custom aggregation expression */
|
|
59
|
+
expression?: string;
|
|
60
|
+
/** Show in totals row */
|
|
61
|
+
show_in_total?: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Formula field for calculated columns
|
|
65
|
+
*/
|
|
66
|
+
export interface ReportFormula {
|
|
67
|
+
/** Formula name */
|
|
68
|
+
name: string;
|
|
69
|
+
/** Display label */
|
|
70
|
+
label?: string;
|
|
71
|
+
/** Formula expression */
|
|
72
|
+
expression: string;
|
|
73
|
+
/** Data type of result */
|
|
74
|
+
type?: 'number' | 'text' | 'date' | 'boolean';
|
|
75
|
+
/** Display format */
|
|
76
|
+
format?: string;
|
|
77
|
+
/** Description of what this formula calculates */
|
|
78
|
+
description?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Chart configuration for report visualization
|
|
82
|
+
*/
|
|
83
|
+
export interface ReportChartConfig {
|
|
84
|
+
/** Chart type */
|
|
85
|
+
type: ChartType;
|
|
86
|
+
/** Chart title */
|
|
87
|
+
title?: string;
|
|
88
|
+
/** Field for X-axis */
|
|
89
|
+
x_axis?: string;
|
|
90
|
+
/** Field(s) for Y-axis */
|
|
91
|
+
y_axis?: string | string[];
|
|
92
|
+
/** Field for chart series/legend */
|
|
93
|
+
series_field?: string;
|
|
94
|
+
/** Chart colors */
|
|
95
|
+
colors?: string[];
|
|
96
|
+
/** Show legend */
|
|
97
|
+
show_legend?: boolean;
|
|
98
|
+
/** Legend position */
|
|
99
|
+
legend_position?: 'top' | 'bottom' | 'left' | 'right';
|
|
100
|
+
/** Show data labels */
|
|
101
|
+
show_data_labels?: boolean;
|
|
102
|
+
/** Chart height in pixels */
|
|
103
|
+
height?: number;
|
|
104
|
+
/** Chart width in pixels */
|
|
105
|
+
width?: number;
|
|
106
|
+
/** Enable drill-down */
|
|
107
|
+
enable_drill_down?: boolean;
|
|
108
|
+
/** Custom chart configuration */
|
|
109
|
+
custom_config?: Record<string, any>;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Matrix report dimension configuration
|
|
113
|
+
*/
|
|
114
|
+
export interface MatrixDimension {
|
|
115
|
+
/** Field for this dimension */
|
|
116
|
+
field: string;
|
|
117
|
+
/** Display label */
|
|
118
|
+
label?: string;
|
|
119
|
+
/** Sort order */
|
|
120
|
+
sort?: 'asc' | 'desc';
|
|
121
|
+
/** Show totals */
|
|
122
|
+
show_totals?: boolean;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Export configuration for reports
|
|
126
|
+
*/
|
|
127
|
+
export interface ReportExportConfig {
|
|
128
|
+
/** Enabled export formats */
|
|
129
|
+
formats?: ('pdf' | 'xlsx' | 'csv' | 'json' | 'html')[];
|
|
130
|
+
/** Include charts in export */
|
|
131
|
+
include_charts?: boolean;
|
|
132
|
+
/** Export filename template */
|
|
133
|
+
filename_template?: string;
|
|
134
|
+
/** Page orientation for PDF */
|
|
135
|
+
page_orientation?: 'portrait' | 'landscape';
|
|
136
|
+
/** Paper size for PDF */
|
|
137
|
+
paper_size?: 'A4' | 'Letter' | 'Legal';
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Scheduling configuration for automated reports
|
|
141
|
+
*/
|
|
142
|
+
export interface ReportScheduleConfig {
|
|
143
|
+
/** Enable scheduled execution */
|
|
144
|
+
enabled: boolean;
|
|
145
|
+
/** Cron expression for schedule */
|
|
146
|
+
cron?: string;
|
|
147
|
+
/** Timezone for schedule */
|
|
148
|
+
timezone?: string;
|
|
149
|
+
/** Email recipients for scheduled reports */
|
|
150
|
+
recipients?: string[];
|
|
151
|
+
/** Email subject template */
|
|
152
|
+
email_subject?: string;
|
|
153
|
+
/** Email body template */
|
|
154
|
+
email_body?: string;
|
|
155
|
+
/** Export format for scheduled report */
|
|
156
|
+
format?: 'pdf' | 'xlsx' | 'csv';
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Complete report configuration
|
|
160
|
+
*/
|
|
161
|
+
export interface ReportConfig {
|
|
162
|
+
/** Unique report identifier */
|
|
163
|
+
name: string;
|
|
164
|
+
/** Display label */
|
|
165
|
+
label: string;
|
|
166
|
+
/** Report type */
|
|
167
|
+
type: ReportType;
|
|
168
|
+
/** Primary object for the report */
|
|
169
|
+
object: string;
|
|
170
|
+
/** Report description */
|
|
171
|
+
description?: string;
|
|
172
|
+
/** Icon for the report */
|
|
173
|
+
icon?: string;
|
|
174
|
+
/** Columns to display */
|
|
175
|
+
columns?: ViewColumn[];
|
|
176
|
+
/** Filters to apply */
|
|
177
|
+
filters?: (ViewFilter | ViewFilterGroup)[];
|
|
178
|
+
/** Grouping configuration */
|
|
179
|
+
groupings?: ReportGrouping[];
|
|
180
|
+
/** Aggregations/calculations */
|
|
181
|
+
aggregations?: ReportAggregation[];
|
|
182
|
+
/** Formula fields */
|
|
183
|
+
formulas?: ReportFormula[];
|
|
184
|
+
/** Chart configuration */
|
|
185
|
+
chart?: ReportChartConfig;
|
|
186
|
+
/** Matrix report row dimension */
|
|
187
|
+
row_dimension?: MatrixDimension;
|
|
188
|
+
/** Matrix report column dimension */
|
|
189
|
+
column_dimension?: MatrixDimension;
|
|
190
|
+
/** Limit number of rows */
|
|
191
|
+
limit?: number;
|
|
192
|
+
/** Enable drill-down to records */
|
|
193
|
+
enable_drill_down?: boolean;
|
|
194
|
+
/** Show record count */
|
|
195
|
+
show_record_count?: boolean;
|
|
196
|
+
/** Show grand totals */
|
|
197
|
+
show_grand_total?: boolean;
|
|
198
|
+
/** Export configuration */
|
|
199
|
+
export?: ReportExportConfig;
|
|
200
|
+
/** Scheduling configuration */
|
|
201
|
+
schedule?: ReportScheduleConfig;
|
|
202
|
+
/** Cache configuration */
|
|
203
|
+
cache?: {
|
|
204
|
+
/** Enable caching */
|
|
205
|
+
enabled?: boolean;
|
|
206
|
+
/** Cache duration in seconds */
|
|
207
|
+
duration?: number;
|
|
208
|
+
};
|
|
209
|
+
/** Access control */
|
|
210
|
+
permissions?: {
|
|
211
|
+
/** Roles that can view this report */
|
|
212
|
+
view?: string[];
|
|
213
|
+
/** Roles that can edit report configuration */
|
|
214
|
+
edit?: string[];
|
|
215
|
+
/** Roles that can export */
|
|
216
|
+
export?: string[];
|
|
217
|
+
};
|
|
218
|
+
/** Whether this report is shared with all users */
|
|
219
|
+
is_public?: boolean;
|
|
220
|
+
/** Owner of the report (for personal reports) */
|
|
221
|
+
owner?: string;
|
|
222
|
+
/** Folder/category for organization */
|
|
223
|
+
folder?: string;
|
|
224
|
+
/** Custom report configuration */
|
|
225
|
+
config?: Record<string, any>;
|
|
226
|
+
/** AI context for report generation */
|
|
227
|
+
ai_context?: {
|
|
228
|
+
/** Business question this report answers */
|
|
229
|
+
intent?: string;
|
|
230
|
+
/** Target audience */
|
|
231
|
+
audience?: string;
|
|
232
|
+
/** Key insights to highlight */
|
|
233
|
+
insights?: string[];
|
|
234
|
+
/** Recommended visualizations */
|
|
235
|
+
visualizations?: string[];
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Report execution result
|
|
240
|
+
*/
|
|
241
|
+
export interface ReportResult {
|
|
242
|
+
/** Report name */
|
|
243
|
+
report_name: string;
|
|
244
|
+
/** Execution timestamp */
|
|
245
|
+
executed_at: string;
|
|
246
|
+
/** Data rows */
|
|
247
|
+
rows: any[];
|
|
248
|
+
/** Total record count */
|
|
249
|
+
total_count: number;
|
|
250
|
+
/** Aggregation results */
|
|
251
|
+
aggregations?: Record<string, any>;
|
|
252
|
+
/** Grand totals */
|
|
253
|
+
grand_total?: Record<string, any>;
|
|
254
|
+
/** Chart data */
|
|
255
|
+
chart_data?: any;
|
|
256
|
+
/** Execution time in milliseconds */
|
|
257
|
+
execution_time?: number;
|
|
258
|
+
/** Whether result was from cache */
|
|
259
|
+
from_cache?: boolean;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Lightweight report reference
|
|
263
|
+
* Used in navigation, dropdowns, and report selectors
|
|
264
|
+
*/
|
|
265
|
+
export interface ReportReference {
|
|
266
|
+
/** Report name/identifier */
|
|
267
|
+
name: string;
|
|
268
|
+
/** Display label */
|
|
269
|
+
label?: string;
|
|
270
|
+
/** Icon */
|
|
271
|
+
icon?: string;
|
|
272
|
+
/** Report type */
|
|
273
|
+
type?: ReportType;
|
|
274
|
+
/** Folder/category */
|
|
275
|
+
folder?: string;
|
|
276
|
+
}
|
package/dist/report.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Report Metadata Definition
|
|
4
|
+
*
|
|
5
|
+
* Defines the structure for reports, data summaries, and analytics in ObjectQL.
|
|
6
|
+
* Reports aggregate and visualize data from objects with grouping, filtering, and calculations.
|
|
7
|
+
*
|
|
8
|
+
* Based on patterns from Salesforce Reports, Tableau, and similar BI platforms.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
|
package/dist/view.d.ts
ADDED
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* View Metadata Definition
|
|
3
|
+
*
|
|
4
|
+
* Defines the structure for list views, grid views, and other data visualization views
|
|
5
|
+
* in ObjectQL applications. Views define how data from objects is displayed to users
|
|
6
|
+
* including columns, filters, sorting, and available actions.
|
|
7
|
+
*
|
|
8
|
+
* Based on common patterns from Salesforce List Views, Airtable Views, and similar platforms.
|
|
9
|
+
*/
|
|
10
|
+
import { ValidationOperator } from './validation';
|
|
11
|
+
/**
|
|
12
|
+
* Types of views supported by ObjectQL
|
|
13
|
+
*/
|
|
14
|
+
export type ViewType = 'list' | 'kanban' | 'calendar' | 'timeline' | 'gallery' | 'map' | 'pivot' | 'custom';
|
|
15
|
+
/**
|
|
16
|
+
* Column configuration for a view
|
|
17
|
+
*/
|
|
18
|
+
export interface ViewColumn {
|
|
19
|
+
/** Field name to display */
|
|
20
|
+
field: string;
|
|
21
|
+
/** Display label (defaults to field label) */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** Column width in pixels */
|
|
24
|
+
width?: number;
|
|
25
|
+
/** Whether this column is visible by default */
|
|
26
|
+
visible?: boolean;
|
|
27
|
+
/** Whether this column is sortable */
|
|
28
|
+
sortable?: boolean;
|
|
29
|
+
/** Whether this column is filterable */
|
|
30
|
+
filterable?: boolean;
|
|
31
|
+
/** Display format (date, currency, percent, etc.) */
|
|
32
|
+
format?: string;
|
|
33
|
+
/** Whether to display as a badge/chip */
|
|
34
|
+
badge?: boolean;
|
|
35
|
+
/** Custom template for rendering */
|
|
36
|
+
template?: string;
|
|
37
|
+
/** Alignment (left, center, right) */
|
|
38
|
+
align?: 'left' | 'center' | 'right';
|
|
39
|
+
/** Whether this column is frozen/pinned */
|
|
40
|
+
frozen?: boolean;
|
|
41
|
+
/** Truncate text after N characters */
|
|
42
|
+
truncate?: number;
|
|
43
|
+
/** Tooltip configuration */
|
|
44
|
+
tooltip?: string | {
|
|
45
|
+
field?: string;
|
|
46
|
+
template?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Filter condition for a view
|
|
51
|
+
*/
|
|
52
|
+
export interface ViewFilter {
|
|
53
|
+
/** Field to filter on */
|
|
54
|
+
field: string;
|
|
55
|
+
/** Comparison operator */
|
|
56
|
+
operator: ValidationOperator | 'is_null' | 'is_not_null';
|
|
57
|
+
/** Value to compare against */
|
|
58
|
+
value?: any;
|
|
59
|
+
/** Multiple values (for 'in' operator) */
|
|
60
|
+
values?: any[];
|
|
61
|
+
/** Label for this filter (for UI) */
|
|
62
|
+
label?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Logical grouping of filters
|
|
66
|
+
*/
|
|
67
|
+
export interface ViewFilterGroup {
|
|
68
|
+
/** Logical operator */
|
|
69
|
+
operator: 'and' | 'or';
|
|
70
|
+
/** Filters in this group */
|
|
71
|
+
filters: (ViewFilter | ViewFilterGroup)[];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Sort configuration for a view
|
|
75
|
+
*/
|
|
76
|
+
export interface ViewSort {
|
|
77
|
+
/** Field to sort by */
|
|
78
|
+
field: string;
|
|
79
|
+
/** Sort direction */
|
|
80
|
+
direction: 'asc' | 'desc';
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Action available in the view
|
|
84
|
+
*/
|
|
85
|
+
export interface ViewAction {
|
|
86
|
+
/** Action name/identifier */
|
|
87
|
+
name: string;
|
|
88
|
+
/** Display label */
|
|
89
|
+
label?: string;
|
|
90
|
+
/** Icon */
|
|
91
|
+
icon?: string;
|
|
92
|
+
/** Action type */
|
|
93
|
+
type?: 'standard' | 'custom';
|
|
94
|
+
/** Confirmation message before executing */
|
|
95
|
+
confirm?: string;
|
|
96
|
+
/** Visibility condition */
|
|
97
|
+
visible_when?: string;
|
|
98
|
+
/** Enabled condition */
|
|
99
|
+
enabled_when?: string;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Grouping configuration for a view
|
|
103
|
+
*/
|
|
104
|
+
export interface ViewGrouping {
|
|
105
|
+
/** Field to group by */
|
|
106
|
+
field: string;
|
|
107
|
+
/** Display label for the group */
|
|
108
|
+
label?: string;
|
|
109
|
+
/** Sort order within groups */
|
|
110
|
+
sort?: 'asc' | 'desc';
|
|
111
|
+
/** Whether groups are collapsed by default */
|
|
112
|
+
collapsed?: boolean;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Pagination configuration
|
|
116
|
+
*/
|
|
117
|
+
export interface ViewPagination {
|
|
118
|
+
/** Enable pagination */
|
|
119
|
+
enabled: boolean;
|
|
120
|
+
/** Default page size */
|
|
121
|
+
page_size?: number;
|
|
122
|
+
/** Available page size options */
|
|
123
|
+
page_size_options?: number[];
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Kanban view specific configuration
|
|
127
|
+
*/
|
|
128
|
+
export interface KanbanViewConfig {
|
|
129
|
+
/** Field to use for columns (status field) */
|
|
130
|
+
column_field: string;
|
|
131
|
+
/** Field to use for card title */
|
|
132
|
+
title_field: string;
|
|
133
|
+
/** Field to use for card subtitle */
|
|
134
|
+
subtitle_field?: string;
|
|
135
|
+
/** Additional fields to display on card */
|
|
136
|
+
card_fields?: string[];
|
|
137
|
+
/** Field to use for card color */
|
|
138
|
+
color_field?: string;
|
|
139
|
+
/** Field to use for card avatar/image */
|
|
140
|
+
avatar_field?: string;
|
|
141
|
+
/** Enable drag and drop */
|
|
142
|
+
enable_drag_drop?: boolean;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Calendar view specific configuration
|
|
146
|
+
*/
|
|
147
|
+
export interface CalendarViewConfig {
|
|
148
|
+
/** Field to use for event start date */
|
|
149
|
+
start_date_field: string;
|
|
150
|
+
/** Field to use for event end date */
|
|
151
|
+
end_date_field?: string;
|
|
152
|
+
/** Field to use for event title */
|
|
153
|
+
title_field: string;
|
|
154
|
+
/** Field to use for event color */
|
|
155
|
+
color_field?: string;
|
|
156
|
+
/** Default view mode (day, week, month) */
|
|
157
|
+
default_mode?: 'day' | 'week' | 'month' | 'year';
|
|
158
|
+
/** Enable all-day events */
|
|
159
|
+
all_day_field?: string;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Timeline view specific configuration
|
|
163
|
+
*/
|
|
164
|
+
export interface TimelineViewConfig {
|
|
165
|
+
/** Field to use for task start */
|
|
166
|
+
start_field: string;
|
|
167
|
+
/** Field to use for task end */
|
|
168
|
+
end_field: string;
|
|
169
|
+
/** Field to use for task name */
|
|
170
|
+
name_field: string;
|
|
171
|
+
/** Field to use for progress percentage */
|
|
172
|
+
progress_field?: string;
|
|
173
|
+
/** Field to use for dependencies */
|
|
174
|
+
dependencies_field?: string;
|
|
175
|
+
/** Enable drag to resize */
|
|
176
|
+
enable_resize?: boolean;
|
|
177
|
+
/** Enable drag to move */
|
|
178
|
+
enable_move?: boolean;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Gallery view specific configuration
|
|
182
|
+
*/
|
|
183
|
+
export interface GalleryViewConfig {
|
|
184
|
+
/** Field to use for card image */
|
|
185
|
+
image_field: string;
|
|
186
|
+
/** Field to use for card title */
|
|
187
|
+
title_field: string;
|
|
188
|
+
/** Field to use for card description */
|
|
189
|
+
description_field?: string;
|
|
190
|
+
/** Number of columns */
|
|
191
|
+
columns?: number;
|
|
192
|
+
/** Card aspect ratio */
|
|
193
|
+
aspect_ratio?: string;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Map view specific configuration
|
|
197
|
+
*/
|
|
198
|
+
export interface MapViewConfig {
|
|
199
|
+
/** Field containing location data */
|
|
200
|
+
location_field: string;
|
|
201
|
+
/** Field to use for marker title */
|
|
202
|
+
title_field: string;
|
|
203
|
+
/** Field to use for marker description */
|
|
204
|
+
description_field?: string;
|
|
205
|
+
/** Default map center [latitude, longitude] */
|
|
206
|
+
center?: [number, number];
|
|
207
|
+
/** Default zoom level */
|
|
208
|
+
zoom?: number;
|
|
209
|
+
/** Enable clustering */
|
|
210
|
+
enable_clustering?: boolean;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Complete view configuration
|
|
214
|
+
*/
|
|
215
|
+
export interface ViewConfig {
|
|
216
|
+
/** Unique view identifier */
|
|
217
|
+
name: string;
|
|
218
|
+
/** Display label */
|
|
219
|
+
label: string;
|
|
220
|
+
/** Object this view applies to */
|
|
221
|
+
object: string;
|
|
222
|
+
/** View description */
|
|
223
|
+
description?: string;
|
|
224
|
+
/** View type */
|
|
225
|
+
type?: ViewType;
|
|
226
|
+
/** Icon for the view */
|
|
227
|
+
icon?: string;
|
|
228
|
+
/** Columns to display (for list views) */
|
|
229
|
+
columns?: ViewColumn[];
|
|
230
|
+
/** Default filters */
|
|
231
|
+
filters?: (ViewFilter | ViewFilterGroup)[];
|
|
232
|
+
/** Default sorting */
|
|
233
|
+
sort?: ViewSort[];
|
|
234
|
+
/** Grouping configuration */
|
|
235
|
+
grouping?: ViewGrouping;
|
|
236
|
+
/** Pagination configuration */
|
|
237
|
+
pagination?: ViewPagination;
|
|
238
|
+
/** Maximum number of records to fetch */
|
|
239
|
+
limit?: number;
|
|
240
|
+
/** Available actions */
|
|
241
|
+
actions?: ViewAction[];
|
|
242
|
+
/** Enable search */
|
|
243
|
+
enable_search?: boolean;
|
|
244
|
+
/** Searchable fields */
|
|
245
|
+
search_fields?: string[];
|
|
246
|
+
/** Enable inline editing */
|
|
247
|
+
enable_inline_edit?: boolean;
|
|
248
|
+
/** Enable bulk selection */
|
|
249
|
+
enable_bulk_select?: boolean;
|
|
250
|
+
/** Enable export */
|
|
251
|
+
enable_export?: boolean;
|
|
252
|
+
/** Export formats */
|
|
253
|
+
export_formats?: ('csv' | 'xlsx' | 'pdf' | 'json')[];
|
|
254
|
+
/** Kanban-specific config */
|
|
255
|
+
kanban?: KanbanViewConfig;
|
|
256
|
+
/** Calendar-specific config */
|
|
257
|
+
calendar?: CalendarViewConfig;
|
|
258
|
+
/** Timeline-specific config */
|
|
259
|
+
timeline?: TimelineViewConfig;
|
|
260
|
+
/** Gallery-specific config */
|
|
261
|
+
gallery?: GalleryViewConfig;
|
|
262
|
+
/** Map-specific config */
|
|
263
|
+
map?: MapViewConfig;
|
|
264
|
+
/** Whether this is the default view */
|
|
265
|
+
is_default?: boolean;
|
|
266
|
+
/** Access control */
|
|
267
|
+
permissions?: {
|
|
268
|
+
/** Roles allowed to view */
|
|
269
|
+
view?: string[];
|
|
270
|
+
/** Roles allowed to edit view configuration */
|
|
271
|
+
edit?: string[];
|
|
272
|
+
};
|
|
273
|
+
/** Whether the view is shared with all users */
|
|
274
|
+
is_public?: boolean;
|
|
275
|
+
/** Owner of the view (for personal views) */
|
|
276
|
+
owner?: string;
|
|
277
|
+
/** Custom view configuration */
|
|
278
|
+
config?: Record<string, any>;
|
|
279
|
+
/** AI context for view generation */
|
|
280
|
+
ai_context?: {
|
|
281
|
+
/** Purpose of this view */
|
|
282
|
+
intent?: string;
|
|
283
|
+
/** Target user role */
|
|
284
|
+
persona?: string;
|
|
285
|
+
/** Key insights to display */
|
|
286
|
+
insights?: string[];
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Lightweight view reference
|
|
291
|
+
* Used in navigation, dropdowns, and view selectors
|
|
292
|
+
*/
|
|
293
|
+
export interface ViewReference {
|
|
294
|
+
/** View name/identifier */
|
|
295
|
+
name: string;
|
|
296
|
+
/** Display label */
|
|
297
|
+
label?: string;
|
|
298
|
+
/** Icon */
|
|
299
|
+
icon?: string;
|
|
300
|
+
/** View type */
|
|
301
|
+
type?: ViewType;
|
|
302
|
+
/** Whether this is the default view */
|
|
303
|
+
is_default?: boolean;
|
|
304
|
+
}
|
package/dist/view.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* View Metadata Definition
|
|
4
|
+
*
|
|
5
|
+
* Defines the structure for list views, grid views, and other data visualization views
|
|
6
|
+
* in ObjectQL applications. Views define how data from objects is displayed to users
|
|
7
|
+
* including columns, filters, sorting, and available actions.
|
|
8
|
+
*
|
|
9
|
+
* Based on common patterns from Salesforce List Views, Airtable Views, and similar platforms.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
//# sourceMappingURL=view.js.map
|
package/dist/view.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../src/view.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|