@@ -8,18 +8,16 @@ import * as apis from './src/apis';
88import * as actions from './src/actions' ;
99import * as dashboards from './src/dashboards' ;
1010import * as reports from './src/reports' ;
11- import * as flows from './src/flows' ;
12- import * as agents from './src/agents' ;
11+ import { allFlows } from './src/flows' ;
12+ import { allAgents } from './src/agents' ;
1313import * as ragPipelines from './src/rag' ;
1414import * as profiles from './src/profiles' ;
1515import * as apps from './src/apps' ;
16- import * as interfaces from './src/interfaces' ;
1716import * as translations from './src/translations' ;
1817import { CrmSeedData } from './src/data' ;
1918
2019// ─── Sharing & Security (special: mixed single/array values) ───────
2120import {
22- OrganizationDefaults ,
2321 AccountTeamSharingRule , TerritorySharingRules ,
2422 OpportunitySalesSharingRule ,
2523 CaseEscalationSharingRule ,
@@ -56,12 +54,11 @@ export default defineStack({
5654 actions : Object . values ( actions ) ,
5755 dashboards : Object . values ( dashboards ) ,
5856 reports : Object . values ( reports ) ,
59- flows : Object . values ( flows ) as any ,
60- agents : Object . values ( agents ) as any ,
57+ flows : allFlows ,
58+ agents : allAgents ,
6159 ragPipelines : Object . values ( ragPipelines ) ,
62- profiles : Object . values ( profiles ) ,
60+ permissions : Object . values ( profiles ) ,
6361 apps : Object . values ( apps ) ,
64- interfaces : Object . values ( interfaces ) ,
6562
6663 // Seed Data (top-level, registered as metadata)
6764 data : CrmSeedData ,
@@ -77,13 +74,16 @@ export default defineStack({
7774 // I18n Translation Bundles (en, zh-CN, ja-JP, es-ES)
7875 translations : Object . values ( translations ) ,
7976
80- // Sharing & security (requires explicit wiring)
77+ // Sharing & security
8178 sharingRules : [
8279 AccountTeamSharingRule ,
8380 OpportunitySalesSharingRule ,
8481 CaseEscalationSharingRule ,
8582 ...TerritorySharingRules ,
8683 ] ,
87- roleHierarchy : RoleHierarchy ,
88- organizationDefaults : OrganizationDefaults ,
89- } as any ) ;
84+ roles : RoleHierarchy . roles . map ( ( r : { name : string ; label : string ; parentRole : string | null } ) => ( {
85+ name : r . name ,
86+ label : r . label ,
87+ parent : r . parentRole ?? undefined ,
88+ } ) ) ,
89+ } ) ;
0 commit comments