@speakai/shared
Advanced tools
| /** | ||
| * Dashboard feature — shared wire contract. | ||
| * | ||
| * Single source of truth for the Dashboards API shape, consumed by speak-client | ||
| * (builder + queries) and speak-server (@speak-dashboards). The server's Mongoose | ||
| * document type may extend these; the client imports them directly. | ||
| */ | ||
| /** Built-in dashboard widget types. */ | ||
| export type DashboardWidgetType = 'stat-cards' | 'sentiment' | 'media-list' | 'field-distribution' | 'upload-timeline' | 'themes' | 'team-activity' | 'kpi-trend'; | ||
| /** Grid placement for a widget (react-grid-layout geometry; legacy order/colSpan optional). */ | ||
| export interface IDashboardWidgetLayout { | ||
| x?: number; | ||
| y?: number; | ||
| w?: number; | ||
| h?: number; | ||
| minW?: number; | ||
| minH?: number; | ||
| /** @deprecated legacy linear ordering — superseded by x/y. */ | ||
| order?: number; | ||
| /** @deprecated legacy column span — superseded by w. */ | ||
| colSpan?: number; | ||
| } | ||
| /** A single configured widget on a dashboard. */ | ||
| export interface IDashboardWidget { | ||
| id: string; | ||
| type: DashboardWidgetType | string; | ||
| title: string; | ||
| /** Render-only, widget-type-specific settings (chartType, fieldId, accentColor, …). */ | ||
| config: Record<string, unknown>; | ||
| layout: IDashboardWidgetLayout; | ||
| } | ||
| /** Date scope for a dashboard (preset key, with optional explicit bounds). */ | ||
| export interface IDashboardDateRange { | ||
| preset?: string; | ||
| startDate?: string | Date; | ||
| endDate?: string | Date; | ||
| } | ||
| /** Full dashboard wire shape (owner/authed view). */ | ||
| export interface IDashboard { | ||
| dashboardId: string; | ||
| title: string; | ||
| description?: string; | ||
| icon?: string; | ||
| /** Folder ids the dashboard is scoped to (empty = all accessible). */ | ||
| folderScope: string[]; | ||
| dateRange?: IDashboardDateRange; | ||
| filters?: Record<string, unknown>; | ||
| widgets: IDashboardWidget[]; | ||
| /** Public share token — present only to the owner when sharing is enabled. */ | ||
| shareToken?: string; | ||
| isShareEnabled?: boolean; | ||
| /** Team/group ids the dashboard is shared with ("<id> (G)" convention). */ | ||
| sharedWithGroups?: string[]; | ||
| isDefault?: boolean; | ||
| schemaVersion?: number; | ||
| createdAt?: string | Date; | ||
| updatedAt?: string | Date; | ||
| } | ||
| /** Public (token-resolved, unauthenticated) projection — secret/internal fields stripped. */ | ||
| export interface IPublicDashboard { | ||
| title: string; | ||
| description?: string; | ||
| icon?: string; | ||
| widgets: IDashboardWidget[]; | ||
| folderScope: string[]; | ||
| dateRange?: IDashboardDateRange; | ||
| } | ||
| /** Create payload. */ | ||
| export interface ICreateDashboardPayload { | ||
| title: string; | ||
| description?: string; | ||
| icon?: string; | ||
| folderScope?: string[]; | ||
| dateRange?: IDashboardDateRange; | ||
| filters?: Record<string, unknown>; | ||
| widgets?: IDashboardWidget[]; | ||
| sharedWithGroups?: string[]; | ||
| isDefault?: boolean; | ||
| } | ||
| /** Update payload (partial). */ | ||
| export type IUpdateDashboardPayload = Partial<ICreateDashboardPayload>; | ||
| //# sourceMappingURL=dashboard.d.ts.map |
| {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/interfaces/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,uCAAuC;AACvC,MAAM,MAAM,mBAAmB,GAC3B,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,oBAAoB,GACpB,iBAAiB,GACjB,QAAQ,GACR,eAAe,GACf,WAAW,CAAC;AAEhB,+FAA+F;AAC/F,MAAM,WAAW,sBAAsB;IACrC,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,iDAAiD;AACjD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,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B,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,sBAAsB;AACtB,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,gCAAgC;AAChC,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC"} |
| /** | ||
| * Dashboard feature — shared wire contract. | ||
| * | ||
| * Single source of truth for the Dashboards API shape, consumed by speak-client | ||
| * (builder + queries) and speak-server (@speak-dashboards). The server's Mongoose | ||
| * document type may extend these; the client imports them directly. | ||
| */ | ||
| export {}; | ||
| //# sourceMappingURL=dashboard.js.map |
| {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/interfaces/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"} |
@@ -20,2 +20,3 @@ export * from './api.js'; | ||
| export * from './clip.js'; | ||
| export * from './dashboard.js'; | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"} |
@@ -20,2 +20,3 @@ export * from './api.js'; | ||
| export * from './clip.js'; | ||
| export * from './dashboard.js'; | ||
| //# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"} |
+1
-1
| { | ||
| "name": "@speakai/shared", | ||
| "version": "1.14.0", | ||
| "version": "1.15.0", | ||
| "description": "Shared types, enums and interfaces for Speak AI platform", | ||
@@ -5,0 +5,0 @@ "type": "module", |
187169
3.16%198
2.06%3076
3.05%