
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("platform_owner"), name: "platform_owner", createdAt, updatedAt },
        
          { id: getId("platform_ops_manager"), name: "platform_ops_manager", createdAt, updatedAt },
        
          { id: getId("org_governance_lead"), name: "org_governance_lead", createdAt, updatedAt },
        
          { id: getId("evidence_operations_lead"), name: "evidence_operations_lead", createdAt, updatedAt },
        
          { id: getId("audit_viewer"), name: "audit_viewer", 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","user_invitations","connected_systems","control_frameworks","control_requirements","identity_workflows","evidence_models","artifacts","sampled_subjects","proof_packets","remediation_items","access_reviews","access_review_items","exceptions","audit_logs","notifications","organization_settings","artifact_type_catalog","workflow_templates",,
    ];
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("platform_owner"), permissionId: getId('CREATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_USERS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('DELETE_USERS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_USERS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_USER_INVITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_USER_INVITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_USER_INVITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_USER_INVITATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('CREATE_USER_INVITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_USER_INVITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_USER_INVITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_USER_INVITATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_USER_INVITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_USER_INVITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_USER_INVITATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('DELETE_USER_INVITATIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_USER_INVITATIONS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_USER_INVITATIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_CONNECTED_SYSTEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_CONNECTED_SYSTEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_CONNECTED_SYSTEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_CONNECTED_SYSTEMS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_CONNECTED_SYSTEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_CONNECTED_SYSTEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_CONNECTED_SYSTEMS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_CONNECTED_SYSTEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_CONNECTED_SYSTEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_CONNECTED_SYSTEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_CONNECTED_SYSTEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_CONNECTED_SYSTEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_CONNECTED_SYSTEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_CONNECTED_SYSTEMS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_CONTROL_FRAMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_CONTROL_FRAMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_CONTROL_FRAMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_CONTROL_FRAMEWORKS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_CONTROL_FRAMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_CONTROL_FRAMEWORKS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_CONTROL_FRAMEWORKS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_CONTROL_FRAMEWORKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_CONTROL_FRAMEWORKS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_CONTROL_FRAMEWORKS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_CONTROL_REQUIREMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_CONTROL_REQUIREMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_CONTROL_REQUIREMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_CONTROL_REQUIREMENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_CONTROL_REQUIREMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_CONTROL_REQUIREMENTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_CONTROL_REQUIREMENTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_CONTROL_REQUIREMENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_CONTROL_REQUIREMENTS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_CONTROL_REQUIREMENTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_IDENTITY_WORKFLOWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_IDENTITY_WORKFLOWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_IDENTITY_WORKFLOWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_IDENTITY_WORKFLOWS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_IDENTITY_WORKFLOWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_IDENTITY_WORKFLOWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_IDENTITY_WORKFLOWS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_IDENTITY_WORKFLOWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_IDENTITY_WORKFLOWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_IDENTITY_WORKFLOWS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_IDENTITY_WORKFLOWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_IDENTITY_WORKFLOWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_IDENTITY_WORKFLOWS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_IDENTITY_WORKFLOWS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_EVIDENCE_MODELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_EVIDENCE_MODELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_EVIDENCE_MODELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_EVIDENCE_MODELS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_EVIDENCE_MODELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_EVIDENCE_MODELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_EVIDENCE_MODELS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_EVIDENCE_MODELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_EVIDENCE_MODELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_EVIDENCE_MODELS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_EVIDENCE_MODELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_EVIDENCE_MODELS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_EVIDENCE_MODELS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_EVIDENCE_MODELS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_ARTIFACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_ARTIFACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_ARTIFACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_ARTIFACTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_ARTIFACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_ARTIFACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_ARTIFACTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_ARTIFACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_ARTIFACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_ARTIFACTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_ARTIFACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_ARTIFACTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_ARTIFACTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_ARTIFACTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_SAMPLED_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_SAMPLED_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_SAMPLED_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_SAMPLED_SUBJECTS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_SAMPLED_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_SAMPLED_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_SAMPLED_SUBJECTS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_SAMPLED_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_SAMPLED_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_SAMPLED_SUBJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_SAMPLED_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_SAMPLED_SUBJECTS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_SAMPLED_SUBJECTS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_SAMPLED_SUBJECTS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_PROOF_PACKETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_PROOF_PACKETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_PROOF_PACKETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_PROOF_PACKETS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_PROOF_PACKETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_PROOF_PACKETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_PROOF_PACKETS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_PROOF_PACKETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_PROOF_PACKETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_PROOF_PACKETS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_PROOF_PACKETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_PROOF_PACKETS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_PROOF_PACKETS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_PROOF_PACKETS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_REMEDIATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_REMEDIATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_REMEDIATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_REMEDIATION_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_REMEDIATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_REMEDIATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_REMEDIATION_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_REMEDIATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_REMEDIATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_REMEDIATION_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_REMEDIATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_REMEDIATION_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_REMEDIATION_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_REMEDIATION_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_ACCESS_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_ACCESS_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_ACCESS_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_ACCESS_REVIEWS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_ACCESS_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_ACCESS_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_ACCESS_REVIEWS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_ACCESS_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_ACCESS_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_ACCESS_REVIEWS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_ACCESS_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_ACCESS_REVIEWS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_ACCESS_REVIEWS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_ACCESS_REVIEWS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_ACCESS_REVIEW_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_ACCESS_REVIEW_ITEMS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_ACCESS_REVIEW_ITEMS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_EXCEPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_EXCEPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_EXCEPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_EXCEPTIONS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_EXCEPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_EXCEPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_EXCEPTIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_EXCEPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_EXCEPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_EXCEPTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_EXCEPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_EXCEPTIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_EXCEPTIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_EXCEPTIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_AUDIT_LOGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_AUDIT_LOGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_AUDIT_LOGS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_AUDIT_LOGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_AUDIT_LOGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_AUDIT_LOGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_AUDIT_LOGS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_NOTIFICATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('CREATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_NOTIFICATIONS') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_NOTIFICATIONS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_NOTIFICATIONS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_ORGANIZATION_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_ORGANIZATION_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_ORGANIZATION_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_ORGANIZATION_SETTINGS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_ORGANIZATION_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_ORGANIZATION_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_ORGANIZATION_SETTINGS') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_ORGANIZATION_SETTINGS') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_ORGANIZATION_SETTINGS') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_ORGANIZATION_SETTINGS') },
                    
                  
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_ORGANIZATION_SETTINGS') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_ARTIFACT_TYPE_CATALOG') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_ARTIFACT_TYPE_CATALOG') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_ARTIFACT_TYPE_CATALOG') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
    
      
      
          
                
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_WORKFLOW_TEMPLATES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('READ_WORKFLOW_TEMPLATES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('UPDATE_WORKFLOW_TEMPLATES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('DELETE_WORKFLOW_TEMPLATES') },
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('READ_WORKFLOW_TEMPLATES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('UPDATE_WORKFLOW_TEMPLATES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('DELETE_WORKFLOW_TEMPLATES') },
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_WORKFLOW_TEMPLATES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('READ_WORKFLOW_TEMPLATES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('UPDATE_WORKFLOW_TEMPLATES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_WORKFLOW_TEMPLATES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('READ_WORKFLOW_TEMPLATES') },
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('UPDATE_WORKFLOW_TEMPLATES') },
                    
                  
                    
                  
                  
                
               
                
                  
                    
                  
                    
                      { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), permissionId: getId('READ_WORKFLOW_TEMPLATES') },
                    
                  
                    
                  
                    
                  
                  
             
          
    
  
    
     
  
      
      
        
            { createdAt, updatedAt, roles_permissionsId: getId("platform_owner"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("platform_ops_manager"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("org_governance_lead"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("evidence_operations_lead"), permissionId: getId('CREATE_SEARCH') },
        
            { createdAt, updatedAt, roles_permissionsId: getId("audit_viewer"), 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_USER_INVITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_USER_INVITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_USER_INVITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_USER_INVITATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CONNECTED_SYSTEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CONNECTED_SYSTEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CONNECTED_SYSTEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CONNECTED_SYSTEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CONTROL_FRAMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CONTROL_FRAMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CONTROL_FRAMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CONTROL_FRAMEWORKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_CONTROL_REQUIREMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_CONTROL_REQUIREMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_CONTROL_REQUIREMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_CONTROL_REQUIREMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_IDENTITY_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_IDENTITY_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_IDENTITY_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_IDENTITY_WORKFLOWS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_EVIDENCE_MODELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_EVIDENCE_MODELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_EVIDENCE_MODELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_EVIDENCE_MODELS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ARTIFACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ARTIFACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ARTIFACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ARTIFACTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_SAMPLED_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_SAMPLED_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_SAMPLED_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_SAMPLED_SUBJECTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_PROOF_PACKETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_PROOF_PACKETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_PROOF_PACKETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_PROOF_PACKETS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_REMEDIATION_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_REMEDIATION_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_REMEDIATION_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_REMEDIATION_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ACCESS_REVIEWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ACCESS_REVIEWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ACCESS_REVIEWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ACCESS_REVIEWS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ACCESS_REVIEW_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ACCESS_REVIEW_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ACCESS_REVIEW_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ACCESS_REVIEW_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_EXCEPTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_EXCEPTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_EXCEPTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_EXCEPTIONS') },
    
    { 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("Administrator"), permissionId: getId('CREATE_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_NOTIFICATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ORGANIZATION_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ORGANIZATION_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ORGANIZATION_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ORGANIZATION_SETTINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_ARTIFACT_TYPE_CATALOG') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_ARTIFACT_TYPE_CATALOG') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_ARTIFACT_TYPE_CATALOG') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_ARTIFACT_TYPE_CATALOG') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('CREATE_WORKFLOW_TEMPLATES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('READ_WORKFLOW_TEMPLATES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('UPDATE_WORKFLOW_TEMPLATES') },
    { createdAt, updatedAt, roles_permissionsId: getId("Administrator"), permissionId: getId('DELETE_WORKFLOW_TEMPLATES') },
    
    
    
    { 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_USER_INVITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_USER_INVITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_USER_INVITATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_USER_INVITATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CONNECTED_SYSTEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CONNECTED_SYSTEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CONNECTED_SYSTEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CONNECTED_SYSTEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CONTROL_FRAMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CONTROL_FRAMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CONTROL_FRAMEWORKS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CONTROL_FRAMEWORKS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_CONTROL_REQUIREMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_CONTROL_REQUIREMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_CONTROL_REQUIREMENTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_CONTROL_REQUIREMENTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_IDENTITY_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_IDENTITY_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_IDENTITY_WORKFLOWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_IDENTITY_WORKFLOWS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_EVIDENCE_MODELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_EVIDENCE_MODELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_EVIDENCE_MODELS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_EVIDENCE_MODELS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ARTIFACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ARTIFACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ARTIFACTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ARTIFACTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_SAMPLED_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_SAMPLED_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_SAMPLED_SUBJECTS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_SAMPLED_SUBJECTS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_PROOF_PACKETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_PROOF_PACKETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_PROOF_PACKETS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_PROOF_PACKETS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_REMEDIATION_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_REMEDIATION_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_REMEDIATION_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_REMEDIATION_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ACCESS_REVIEWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ACCESS_REVIEWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ACCESS_REVIEWS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ACCESS_REVIEWS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ACCESS_REVIEW_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ACCESS_REVIEW_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ACCESS_REVIEW_ITEMS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ACCESS_REVIEW_ITEMS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_EXCEPTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_EXCEPTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_EXCEPTIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_EXCEPTIONS') },
    
    { 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('CREATE_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_NOTIFICATIONS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_NOTIFICATIONS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ORGANIZATION_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ORGANIZATION_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ORGANIZATION_SETTINGS') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ORGANIZATION_SETTINGS') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_ARTIFACT_TYPE_CATALOG') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_ARTIFACT_TYPE_CATALOG') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_ARTIFACT_TYPE_CATALOG') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_ARTIFACT_TYPE_CATALOG') },
    
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('CREATE_WORKFLOW_TEMPLATES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('READ_WORKFLOW_TEMPLATES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('UPDATE_WORKFLOW_TEMPLATES') },
    { createdAt, updatedAt, roles_permissionsId: getId("SuperAdmin"), permissionId: getId('DELETE_WORKFLOW_TEMPLATES') },
    
    
    
    { 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("platform_owner")}' WHERE "email"='client@hello.com'`);
        await queryInterface.sequelize.query(`UPDATE "users" SET "app_roleId"='${getId("platform_ops_manager")}' WHERE "email"='john@doe.com'`);
       
      
      

}
};

