Skip to content

Commit 295baf1

Browse files
committed
feat: add schemas for Object Map, Gantt, Calendar, Kanban, and Chart components
1 parent c4d9b86 commit 295baf1

File tree

1 file changed

+87
-1
lines changed

1 file changed

+87
-1
lines changed

packages/types/src/objectql.ts

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,10 +674,96 @@ export interface ObjectViewSchema extends BaseSchema {
674674
className?: string;
675675
}
676676

677+
/**
678+
* Object Map Component Schema
679+
*/
680+
export interface ObjectMapSchema extends BaseSchema {
681+
type: 'object-map';
682+
/** ObjectQL object name */
683+
objectName: string;
684+
/** Field containing location data (or lat/long pair) */
685+
locationField?: string;
686+
/** Field for marker title */
687+
titleField?: string;
688+
}
689+
690+
/**
691+
* Object Gantt Component Schema
692+
*/
693+
export interface ObjectGanttSchema extends BaseSchema {
694+
type: 'object-gantt';
695+
/** ObjectQL object name */
696+
objectName: string;
697+
/** Field for task start date */
698+
startDateField?: string;
699+
/** Field for task end date */
700+
endDateField?: string;
701+
/** Field for task title/name */
702+
titleField?: string;
703+
/** Field for task dependencies */
704+
dependencyField?: string;
705+
/** Field for progress (0-100) */
706+
progressField?: string;
707+
}
708+
709+
/**
710+
* Object Calendar Component Schema
711+
*/
712+
export interface ObjectCalendarSchema extends BaseSchema {
713+
type: 'object-calendar';
714+
/** ObjectQL object name */
715+
objectName: string;
716+
/** Field for event start */
717+
startDateField?: string;
718+
/** Field for event end */
719+
endDateField?: string;
720+
/** Field for event title */
721+
titleField?: string;
722+
/** Default view mode */
723+
defaultView?: 'month' | 'week' | 'day' | 'agenda';
724+
}
725+
726+
/**
727+
* Object Kanban Component Schema
728+
*/
729+
export interface ObjectKanbanSchema extends BaseSchema {
730+
type: 'object-kanban';
731+
/** ObjectQL object name */
732+
objectName: string;
733+
/** Field to group columns by (e.g. status) */
734+
groupField: string;
735+
/** Field for card title */
736+
titleField?: string;
737+
/** Fields to display on card */
738+
cardFields?: string[];
739+
}
740+
741+
/**
742+
* Object Chart Component Schema
743+
*/
744+
export interface ObjectChartSchema extends BaseSchema {
745+
type: 'object-chart';
746+
/** ObjectQL object name */
747+
objectName: string;
748+
/** Chart type */
749+
chartType: 'bar' | 'line' | 'pie' | 'area' | 'scatter';
750+
/** Field for X axis (categories) */
751+
xAxisField: string;
752+
/** Fields for Y axis (values) */
753+
yAxisFields?: string[];
754+
/** Aggregation function */
755+
aggregation?: 'cardinality' | 'sum' | 'avg' | 'min' | 'max';
756+
}
757+
677758
/**
678759
* Union type of all ObjectQL component schemas
679760
*/
680761
export type ObjectQLComponentSchema =
681762
| ObjectGridSchema
682763
| ObjectFormSchema
683-
| ObjectViewSchema;
764+
| ObjectViewSchema
765+
| ObjectMapSchema
766+
| ObjectGanttSchema
767+
| ObjectCalendarSchema
768+
| ObjectKanbanSchema
769+
| ObjectChartSchema;

0 commit comments

Comments
 (0)