import { EventType, UserAgentType } from "./enums"; export const secretEvents: EventType[] = [ EventType.GET_SECRETS, EventType.GET_SECRET, EventType.DELETE_SECRETS, EventType.CREATE_SECRETS, EventType.UPDATE_SECRETS, EventType.CREATE_SECRET, EventType.UPDATE_SECRET, EventType.DELETE_SECRET ]; export const eventToNameMap: { [K in EventType]: string } = { [EventType.GET_SECRETS]: "List secrets", [EventType.GET_SECRET]: "Read secret", [EventType.DELETE_SECRETS]: "Delete secrets", [EventType.CREATE_SECRETS]: "Create secrets", [EventType.UPDATE_SECRETS]: "Update secrets", [EventType.CREATE_SECRET]: "Create secret", [EventType.UPDATE_SECRET]: "Update secret", [EventType.DELETE_SECRET]: "Delete secret", [EventType.GET_WORKSPACE_KEY]: "Read project key", [EventType.AUTHORIZE_INTEGRATION]: "Authorize integration", [EventType.UPDATE_INTEGRATION_AUTH]: "Update integration auth", [EventType.UNAUTHORIZE_INTEGRATION]: "Unauthorize integration", [EventType.CREATE_INTEGRATION]: "Create integration", [EventType.DELETE_INTEGRATION]: "Delete integration", [EventType.ADD_TRUSTED_IP]: "Add trusted IP", [EventType.UPDATE_TRUSTED_IP]: "Update trusted IP", [EventType.DELETE_TRUSTED_IP]: "Delete trusted IP", [EventType.CREATE_SERVICE_TOKEN]: "Create service token", [EventType.DELETE_SERVICE_TOKEN]: "Delete service token", [EventType.CREATE_IDENTITY]: "Create identity", [EventType.UPDATE_IDENTITY]: "Update identity", [EventType.DELETE_IDENTITY]: "Delete identity", [EventType.LOGIN_IDENTITY_UNIVERSAL_AUTH]: "Login via universal auth", [EventType.ADD_IDENTITY_UNIVERSAL_AUTH]: "Add universal auth", [EventType.UPDATE_IDENTITY_UNIVERSAL_AUTH]: "Update universal auth", [EventType.GET_IDENTITY_UNIVERSAL_AUTH]: "Get universal auth", [EventType.CREATE_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET]: "Create universal auth client secret", [EventType.REVOKE_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRET]: "Revoke universal auth client secret", [EventType.GET_IDENTITY_UNIVERSAL_AUTH_CLIENT_SECRETS]: "Get universal auth client secrets", [EventType.CREATE_ENVIRONMENT]: "Create environment", [EventType.UPDATE_ENVIRONMENT]: "Update environment", [EventType.DELETE_ENVIRONMENT]: "Delete environment", [EventType.ADD_WORKSPACE_MEMBER]: "Add member", [EventType.REMOVE_WORKSPACE_MEMBER]: "Remove member", [EventType.CREATE_FOLDER]: "Create folder", [EventType.UPDATE_FOLDER]: "Update folder", [EventType.DELETE_FOLDER]: "Delete folder", [EventType.CREATE_WEBHOOK]: "Create webhook", [EventType.UPDATE_WEBHOOK_STATUS]: "Update webhook status", [EventType.DELETE_WEBHOOK]: "Delete webhook", [EventType.GET_SECRET_IMPORTS]: "List secret imports", [EventType.CREATE_SECRET_IMPORT]: "Create secret import", [EventType.UPDATE_SECRET_IMPORT]: "Update secret import", [EventType.DELETE_SECRET_IMPORT]: "Delete secret import", [EventType.UPDATE_USER_WORKSPACE_DENIED_PERMISSIONS]: "Update denied permissions", [EventType.UPDATE_USER_WORKSPACE_ROLE]: "Update user role", [EventType.CREATE_CA]: "Create CA", [EventType.GET_CA]: "Get CA", [EventType.UPDATE_CA]: "Update CA", [EventType.DELETE_CA]: "Delete CA", [EventType.GET_CA_CSR]: "Get CA CSR", [EventType.GET_CA_CERT]: "Get CA certificate", [EventType.SIGN_INTERMEDIATE]: "Sign intermediate", [EventType.IMPORT_CA_CERT]: "Import CA certificate", [EventType.GET_CA_CRL]: "Get CA CRL", [EventType.ISSUE_CERT]: "Issue certificate", [EventType.GET_CERT]: "Get certificate", [EventType.DELETE_CERT]: "Delete certificate", [EventType.REVOKE_CERT]: "Revoke certificate", [EventType.GET_CERT_BODY]: "Get certificate body", [EventType.CREATE_PKI_ALERT]: "Create PKI alert", [EventType.GET_PKI_ALERT]: "Get PKI alert", [EventType.UPDATE_PKI_ALERT]: "Update PKI alert", [EventType.DELETE_PKI_ALERT]: "Delete PKI alert", [EventType.CREATE_PKI_COLLECTION]: "Create PKI collection", [EventType.GET_PKI_COLLECTION]: "Get PKI collection", [EventType.UPDATE_PKI_COLLECTION]: "Update PKI collection", [EventType.DELETE_PKI_COLLECTION]: "Delete PKI collection", [EventType.GET_PKI_COLLECTION_ITEMS]: "Get PKI collection items", [EventType.ADD_PKI_COLLECTION_ITEM]: "Add PKI collection item", [EventType.DELETE_PKI_COLLECTION_ITEM]: "Delete PKI collection item", [EventType.ORG_ADMIN_ACCESS_PROJECT]: "Org admin accessed project", [EventType.ORG_ADMIN_BYPASS_SSO]: "Org admin bypassed SSO enforcement", [EventType.CREATE_CERTIFICATE_TEMPLATE]: "Create certificate template", [EventType.UPDATE_CERTIFICATE_TEMPLATE]: "Update certificate template", [EventType.DELETE_CERTIFICATE_TEMPLATE]: "Delete certificate template", [EventType.GET_CERTIFICATE_TEMPLATE]: "Get certificate template", [EventType.GET_CERTIFICATE_TEMPLATE_EST_CONFIG]: "Get certificate template EST configuration", [EventType.CREATE_CERTIFICATE_TEMPLATE_EST_CONFIG]: "Create certificate template EST configuration", [EventType.UPDATE_CERTIFICATE_TEMPLATE_EST_CONFIG]: "Update certificate template EST configuration", [EventType.UPDATE_PROJECT_SLACK_CONFIG]: "Update project slack configuration", [EventType.GET_PROJECT_SLACK_CONFIG]: "Get project slack configuration", [EventType.INTEGRATION_SYNCED]: "Integration sync", [EventType.CREATE_SHARED_SECRET]: "Create shared secret", [EventType.DELETE_SHARED_SECRET]: "Delete shared secret", [EventType.READ_SHARED_SECRET]: "Read shared secret", [EventType.CREATE_CMEK]: "Create KMS key", [EventType.UPDATE_CMEK]: "Update KMS key", [EventType.DELETE_CMEK]: "Delete KMS key", [EventType.GET_CMEKS]: "List KMS keys", [EventType.GET_CMEK]: "Get KMS key", [EventType.CMEK_ENCRYPT]: "Encrypt with KMS key", [EventType.CMEK_DECRYPT]: "Decrypt with KMS key", [EventType.CMEK_SIGN]: "Sign with KMS key", [EventType.CMEK_VERIFY]: "Verify with KMS key", [EventType.CMEK_LIST_SIGNING_ALGORITHMS]: "List signing algorithms for KMS key", [EventType.CMEK_GET_PUBLIC_KEY]: "Get public key for KMS key", [EventType.UPDATE_EXTERNAL_GROUP_ORG_ROLE_MAPPINGS]: "Update SSO group to organization role mapping", [EventType.GET_EXTERNAL_GROUP_ORG_ROLE_MAPPINGS]: "List SSO group to organization role mapping", [EventType.GET_PROJECT_TEMPLATES]: "List project templates", [EventType.GET_PROJECT_TEMPLATE]: "Get project template", [EventType.CREATE_PROJECT_TEMPLATE]: "Create project template", [EventType.UPDATE_PROJECT_TEMPLATE]: "Update project template", [EventType.DELETE_PROJECT_TEMPLATE]: "Delete project template", [EventType.APPLY_PROJECT_TEMPLATE]: "Apply project template", [EventType.GET_APP_CONNECTIONS]: "List App Connections", [EventType.GET_AVAILABLE_APP_CONNECTIONS_DETAILS]: "List App Connections Details", [EventType.GET_APP_CONNECTION]: "Get App Connection", [EventType.CREATE_APP_CONNECTION]: "Create App Connection", [EventType.UPDATE_APP_CONNECTION]: "Update App Connection", [EventType.DELETE_APP_CONNECTION]: "Delete App Connection", [EventType.GET_SECRET_SYNCS]: "List secret syncs", [EventType.GET_SECRET_SYNC]: "Get Secret Sync", [EventType.CREATE_SECRET_SYNC]: "Create Secret Sync", [EventType.UPDATE_SECRET_SYNC]: "Update Secret Sync", [EventType.DELETE_SECRET_SYNC]: "Delete Secret Sync", [EventType.SECRET_SYNC_SYNC_SECRETS]: "Secret Sync synced secrets", [EventType.SECRET_SYNC_IMPORT_SECRETS]: "Secret Sync imported secrets", [EventType.SECRET_SYNC_REMOVE_SECRETS]: "Secret Sync removed secrets", [EventType.OIDC_GROUP_MEMBERSHIP_MAPPING_ASSIGN_USER]: "OIDC group membership mapping assigned user to groups", [EventType.OIDC_GROUP_MEMBERSHIP_MAPPING_REMOVE_USER]: "OIDC group membership mapping removed user from groups", [EventType.SECRET_APPROVAL_REQUEST_REVIEW]: "Review Secret Approval Request", [EventType.CREATE_KMIP_CLIENT]: "Create KMIP client", [EventType.UPDATE_KMIP_CLIENT]: "Update KMIP client", [EventType.DELETE_KMIP_CLIENT]: "Delete KMIP client", [EventType.GET_KMIP_CLIENT]: "Get KMIP client", [EventType.GET_KMIP_CLIENTS]: "Get KMIP clients", [EventType.CREATE_KMIP_CLIENT_CERTIFICATE]: "Create KMIP client certificate", [EventType.SETUP_KMIP]: "Setup KMIP configuration", [EventType.GET_KMIP]: "Get KMIP configuration", [EventType.REGISTER_KMIP_SERVER]: "Register KMIP server", [EventType.KMIP_OPERATION_CREATE]: "KMIP operation create", [EventType.KMIP_OPERATION_GET]: "KMIP operation get", [EventType.KMIP_OPERATION_DESTROY]: "KMIP operation destroy", [EventType.KMIP_OPERATION_GET_ATTRIBUTES]: "KMIP operation get attributes", [EventType.KMIP_OPERATION_ACTIVATE]: "KMIP operation activate", [EventType.KMIP_OPERATION_REVOKE]: "KMIP operation revoke", [EventType.KMIP_OPERATION_LOCATE]: "KMIP operation locate", [EventType.KMIP_OPERATION_REGISTER]: "KMIP operation register", [EventType.GET_SECRET_ROTATIONS]: "List Secret Rotations", [EventType.GET_SECRET_ROTATION]: "Get Secret Rotation", [EventType.GET_SECRET_ROTATION_GENERATED_CREDENTIALS]: "Get Secret Rotation generated credentials", [EventType.CREATE_SECRET_ROTATION]: "Create Secret Rotation", [EventType.UPDATE_SECRET_ROTATION]: "Update Secret Rotation", [EventType.DELETE_SECRET_ROTATION]: "Delete Secret Rotation", [EventType.SECRET_ROTATION_ROTATE_SECRETS]: "Secret Rotation secrets rotated" }; export const userAgentTTypeoNameMap: { [K in UserAgentType]: string } = { [UserAgentType.WEB]: "Web", [UserAgentType.CLI]: "CLI", [UserAgentType.K8_OPERATOR]: "K8s operator", [UserAgentType.TERRAFORM]: "Terraform", [UserAgentType.NODE_SDK]: "InfisicalNodeSDK", [UserAgentType.PYTHON_SDK]: "InfisicalPythonSDK", [UserAgentType.OTHER]: "Other" };