
const { v4: uuid } = require("uuid");

module.exports = {
  /**
   * @param{import("sequelize").QueryInterface} queryInterface
   * @return {Promise<void>}
   */
  async up(queryInterface) {
    const createdAt = new Date();
    const updatedAt = new Date();

    /** @type {Map<string, string>} */
    const idMap = new Map();

    /**
     * @param {string} key
     * @return {string}
     */
    function getId(key) {
      if (idMap.has(key)) {
        return idMap.get(key);
      }
      const id = uuid();
      idMap.set(key, id);
      return id;
    }

    await queryInterface.bulkInsert("roles", [
      
      { id: getId("SuperAdmin"), name: "Super Administrator", createdAt, updatedAt },
      
      
      { id: getId("Administrator"), name: "Administrator", createdAt, updatedAt },
      
      
        
          { id: getId("PlatformOwner"), name: "PlatformOwner", createdAt, updatedAt },
        
          { id: getId("SecurityAuditor"), name: "SecurityAuditor", createdAt, updatedAt },
        
          { id: getId("WorkspaceManager"), name: "WorkspaceManager", createdAt, updatedAt },
        
          { id: getId("AutomationEngineer"), name: "AutomationEngineer", createdAt, updatedAt },
        
          { id: getId("Member"), name: "Member", createdAt, updatedAt },
        
      
      
      { id: getId("Public"), name: "Public", createdAt, updatedAt },
    ]);

    /**
     * @param {string} name
     */
    function createPermissions(name) {
      return [
        { id: getId(`CREATE_${name.toUpperCase()}`), createdAt, updatedAt, name: `CREATE_${name.toUpperCase()}` },
        { id: getId(`READ_${name.toUpperCase()}`), createdAt, updatedAt, name: `READ_${name.toUpperCase()}` },
        { id: getId(`UPDATE_${name.toUpperCase()}`), createdAt, updatedAt, name: `UPDATE_${name.toUpperCase()}` },
        { id: getId(`DELETE_${name.toUpperCase()}`), createdAt, updatedAt, name: `DELETE_${name.toUpperCase()}` }
      ];
    }

    const entities = [
      "users","roles","permissions","organizations","workspaces","user_settings","assistant_profiles","conversations","messages","voice_sessions","tool_providers","tools","tool_actions","integrations","memory_items","tasks","task_steps","tool_runs","confirmations","meetings","calendar_events","contacts","outbound_messages","travel_requests","travel_bookings","payment_transactions","native_app_checks","audit_logs",,
    ];
await queryInterface.bulkInsert("permissions", entities.flatMap(createPermissions));
await queryInterface.bulkInsert("permissions", [{ id: getId(`READ_API_DOCS`), createdAt, updatedAt, name: `READ_API_DOCS` }]);
await queryInterface.bulkInsert("permissions", [{ id: getId(`CREATE_SEARCH`), createdAt, updatedAt, name: `CREATE_SEARCH`}]);

await queryInterface.bulkUpdate('roles', { globalAccess: true }, { id: getId('SuperAdmin') });


await queryInterface.sequelize.query(`create table "rolesPermissionsPermissions"
(
"createdAt"           timestamp with time zone not null,
"updatedAt"           timestamp with time zone not null,
"roles_permissionsId" uuid                     not null,
"permissionId"        uuid                     not null,
primary key ("roles_permissionsId", "permissionId")
);`);


await queryInterface.bulkInsert("rolesPermissionsPermissions", [
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_WORKSPACES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_WORKSPACES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_WORKSPACES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_WORKSPACES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_WORKSPACES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_WORKSPACES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_WORKSPACES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_WORKSPACES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_WORKSPACES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_USER_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_USER_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_USER_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_USER_SETTINGS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_USER_SETTINGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_USER_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_USER_SETTINGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_USER_SETTINGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_USER_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_USER_SETTINGS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_ASSISTANT_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_ASSISTANT_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_ASSISTANT_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_ASSISTANT_PROFILES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_ASSISTANT_PROFILES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_ASSISTANT_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_ASSISTANT_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_ASSISTANT_PROFILES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('CREATE_ASSISTANT_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_ASSISTANT_PROFILES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_ASSISTANT_PROFILES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_ASSISTANT_PROFILES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CONVERSATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CONVERSATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CONVERSATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CONVERSATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_CONVERSATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_CONVERSATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_CONVERSATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_CONVERSATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_CONVERSATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_CONVERSATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_CONVERSATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_CONVERSATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_CONVERSATIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_MESSAGES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_MESSAGES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_VOICE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_VOICE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_VOICE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_VOICE_SESSIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_VOICE_SESSIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_VOICE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_VOICE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_VOICE_SESSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_VOICE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_VOICE_SESSIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_VOICE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_VOICE_SESSIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_VOICE_SESSIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TOOL_PROVIDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TOOL_PROVIDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TOOL_PROVIDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TOOL_PROVIDERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_TOOL_PROVIDERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_TOOL_PROVIDERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('CREATE_TOOL_PROVIDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_TOOL_PROVIDERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_TOOL_PROVIDERS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_TOOL_PROVIDERS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TOOLS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TOOLS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TOOLS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TOOLS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_TOOLS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_TOOLS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_TOOLS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('CREATE_TOOLS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_TOOLS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_TOOLS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_TOOLS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TOOL_ACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TOOL_ACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TOOL_ACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TOOL_ACTIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_TOOL_ACTIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_TOOL_ACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_TOOL_ACTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('CREATE_TOOL_ACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_TOOL_ACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_TOOL_ACTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_TOOL_ACTIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_INTEGRATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_INTEGRATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_INTEGRATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_INTEGRATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_INTEGRATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_INTEGRATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_INTEGRATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_INTEGRATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('CREATE_INTEGRATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_INTEGRATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_INTEGRATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_INTEGRATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_INTEGRATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_INTEGRATIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_MEMORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_MEMORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_MEMORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_MEMORY_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_MEMORY_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_MEMORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_MEMORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_MEMORY_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_MEMORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_MEMORY_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_MEMORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_MEMORY_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_MEMORY_ITEMS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TASKS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_TASKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_TASKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('CREATE_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_TASKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_TASKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_TASKS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TASK_STEPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TASK_STEPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TASK_STEPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TASK_STEPS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_TASK_STEPS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_TASK_STEPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_TASK_STEPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_TASK_STEPS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('CREATE_TASK_STEPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_TASK_STEPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_TASK_STEPS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_TASK_STEPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_TASK_STEPS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_TASK_STEPS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TOOL_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TOOL_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TOOL_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TOOL_RUNS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_TOOL_RUNS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_TOOL_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_TOOL_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_TOOL_RUNS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('CREATE_TOOL_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_TOOL_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_TOOL_RUNS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_TOOL_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_TOOL_RUNS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_TOOL_RUNS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CONFIRMATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CONFIRMATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CONFIRMATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CONFIRMATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_CONFIRMATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_CONFIRMATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_CONFIRMATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_CONFIRMATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_CONFIRMATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_CONFIRMATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_CONFIRMATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_CONFIRMATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_CONFIRMATIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_MEETINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_MEETINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_MEETINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_MEETINGS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_MEETINGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_MEETINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_MEETINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_MEETINGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_MEETINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_MEETINGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_MEETINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_MEETINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_MEETINGS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CALENDAR_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CALENDAR_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CALENDAR_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CALENDAR_EVENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_CALENDAR_EVENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_CALENDAR_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_CALENDAR_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_CALENDAR_EVENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_CALENDAR_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_CALENDAR_EVENTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_CALENDAR_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_CALENDAR_EVENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_CALENDAR_EVENTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_CONTACTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_CONTACTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_CONTACTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_CONTACTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_CONTACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_CONTACTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_OUTBOUND_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_OUTBOUND_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_OUTBOUND_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_OUTBOUND_MESSAGES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_OUTBOUND_MESSAGES') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_OUTBOUND_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_OUTBOUND_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_OUTBOUND_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_OUTBOUND_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_OUTBOUND_MESSAGES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_OUTBOUND_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_OUTBOUND_MESSAGES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_OUTBOUND_MESSAGES') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TRAVEL_REQUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TRAVEL_REQUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TRAVEL_REQUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TRAVEL_REQUESTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_TRAVEL_REQUESTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_TRAVEL_REQUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_TRAVEL_REQUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_TRAVEL_REQUESTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_TRAVEL_REQUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_TRAVEL_REQUESTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_TRAVEL_REQUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_TRAVEL_REQUESTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_TRAVEL_REQUESTS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_TRAVEL_BOOKINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_TRAVEL_BOOKINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_TRAVEL_BOOKINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_TRAVEL_BOOKINGS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_TRAVEL_BOOKINGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_TRAVEL_BOOKINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_TRAVEL_BOOKINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_TRAVEL_BOOKINGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_TRAVEL_BOOKINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_TRAVEL_BOOKINGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_TRAVEL_BOOKINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_TRAVEL_BOOKINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_TRAVEL_BOOKINGS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_PAYMENT_TRANSACTIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_PAYMENT_TRANSACTIONS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_NATIVE_APP_CHECKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_NATIVE_APP_CHECKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_NATIVE_APP_CHECKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_NATIVE_APP_CHECKS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_NATIVE_APP_CHECKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_NATIVE_APP_CHECKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_NATIVE_APP_CHECKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('UPDATE_NATIVE_APP_CHECKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('CREATE_NATIVE_APP_CHECKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_NATIVE_APP_CHECKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('UPDATE_NATIVE_APP_CHECKS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_NATIVE_APP_CHECKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_NATIVE_APP_CHECKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('UPDATE_NATIVE_APP_CHECKS') },
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_AUDIT_LOGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('READ_AUDIT_LOGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('UPDATE_AUDIT_LOGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('DELETE_AUDIT_LOGS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('READ_AUDIT_LOGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('READ_AUDIT_LOGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('READ_AUDIT_LOGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('READ_AUDIT_LOGS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
     
  
      
      
        
            { createdAt, updatedAt, roles_permissionsId: getId("PlatformOwner"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("SecurityAuditor"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("WorkspaceManager"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("AutomationEngineer"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("Member"), permissionId: getId('CREATE_SEARCH') },
        
      
      
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_USERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_WORKSPACES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_USER_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_USER_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_USER_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_USER_SETTINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ASSISTANT_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ASSISTANT_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ASSISTANT_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ASSISTANT_PROFILES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CONVERSATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CONVERSATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CONVERSATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CONVERSATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MESSAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_VOICE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_VOICE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_VOICE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_VOICE_SESSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TOOL_PROVIDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TOOL_PROVIDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TOOL_PROVIDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TOOL_PROVIDERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TOOLS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TOOLS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TOOLS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TOOLS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TOOL_ACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TOOL_ACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TOOL_ACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TOOL_ACTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_INTEGRATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_INTEGRATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_INTEGRATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_INTEGRATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MEMORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MEMORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MEMORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MEMORY_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TASKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TASK_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TASK_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TASK_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TASK_STEPS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TOOL_RUNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TOOL_RUNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TOOL_RUNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TOOL_RUNS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CONFIRMATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CONFIRMATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CONFIRMATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CONFIRMATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_MEETINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_MEETINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_MEETINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_MEETINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CALENDAR_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CALENDAR_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CALENDAR_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CALENDAR_EVENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CONTACTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_OUTBOUND_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_OUTBOUND_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_OUTBOUND_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_OUTBOUND_MESSAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TRAVEL_REQUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TRAVEL_REQUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TRAVEL_REQUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TRAVEL_REQUESTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_TRAVEL_BOOKINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_TRAVEL_BOOKINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_TRAVEL_BOOKINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_TRAVEL_BOOKINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PAYMENT_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PAYMENT_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PAYMENT_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PAYMENT_TRANSACTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_NATIVE_APP_CHECKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_NATIVE_APP_CHECKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_NATIVE_APP_CHECKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_NATIVE_APP_CHECKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_AUDIT_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_AUDIT_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_AUDIT_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_AUDIT_LOGS') },
    
    
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_USERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_USERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ROLES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ROLES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PERMISSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PERMISSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ORGANIZATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ORGANIZATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_WORKSPACES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_WORKSPACES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_USER_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_USER_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_USER_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_USER_SETTINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ASSISTANT_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ASSISTANT_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ASSISTANT_PROFILES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ASSISTANT_PROFILES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CONVERSATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CONVERSATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CONVERSATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CONVERSATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_MESSAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_VOICE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_VOICE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_VOICE_SESSIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_VOICE_SESSIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TOOL_PROVIDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TOOL_PROVIDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TOOL_PROVIDERS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TOOL_PROVIDERS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TOOLS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TOOLS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TOOLS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TOOLS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TOOL_ACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TOOL_ACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TOOL_ACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TOOL_ACTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_INTEGRATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_INTEGRATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_INTEGRATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_INTEGRATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_MEMORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_MEMORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_MEMORY_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_MEMORY_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TASKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TASKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TASK_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TASK_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TASK_STEPS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TASK_STEPS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TOOL_RUNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TOOL_RUNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TOOL_RUNS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TOOL_RUNS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CONFIRMATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CONFIRMATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CONFIRMATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CONFIRMATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_MEETINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_MEETINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_MEETINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_MEETINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CALENDAR_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CALENDAR_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CALENDAR_EVENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CALENDAR_EVENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CONTACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CONTACTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_OUTBOUND_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_OUTBOUND_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_OUTBOUND_MESSAGES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_OUTBOUND_MESSAGES') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TRAVEL_REQUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TRAVEL_REQUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TRAVEL_REQUESTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TRAVEL_REQUESTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_TRAVEL_BOOKINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_TRAVEL_BOOKINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_TRAVEL_BOOKINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_TRAVEL_BOOKINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PAYMENT_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PAYMENT_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PAYMENT_TRANSACTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PAYMENT_TRANSACTIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_NATIVE_APP_CHECKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_NATIVE_APP_CHECKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_NATIVE_APP_CHECKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_NATIVE_APP_CHECKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_AUDIT_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_AUDIT_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_AUDIT_LOGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_AUDIT_LOGS') },
    
    
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_API_DOCS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SEARCH') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_API_DOCS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SEARCH') },
    ]);


  await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("SuperAdmin")}' WHERE "email"='super_admin@flatlogic.com'`);
  await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("Administrator")}' WHERE "email"='admin@flatlogic.com'`);
  
   
      
      
        
        
           await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("PlatformOwner")}' WHERE "email"='client@hello.com'`);
        await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("SecurityAuditor")}' WHERE "email"='john@doe.com'`);
       
      
      

}
};

