{"version":3,"file":"error-codes-vwTWW2ez.mjs","names":[],"sources":["../src/error-codes.ts"],"sourcesContent":["import { defineErrorCodes } from \"@better-auth/core/utils/error-codes\";\n\nexport const API_KEY_ERROR_CODES = defineErrorCodes({\n\tINVALID_METADATA_TYPE: \"metadata must be an object or undefined\",\n\tREFILL_AMOUNT_AND_INTERVAL_REQUIRED:\n\t\t\"refillAmount is required when refillInterval is provided\",\n\tREFILL_INTERVAL_AND_AMOUNT_REQUIRED:\n\t\t\"refillInterval is required when refillAmount is provided\",\n\tUSER_BANNED: \"User is banned\",\n\tUNAUTHORIZED_SESSION: \"Unauthorized or invalid session\",\n\tKEY_NOT_FOUND: \"API Key not found\",\n\tKEY_DISABLED: \"API Key is disabled\",\n\tKEY_EXPIRED: \"API Key has expired\",\n\tUSAGE_EXCEEDED: \"API Key has reached its usage limit\",\n\tKEY_NOT_RECOVERABLE: \"API Key is not recoverable\",\n\tEXPIRES_IN_IS_TOO_SMALL:\n\t\t\"The expiresIn is smaller than the predefined minimum value.\",\n\tEXPIRES_IN_IS_TOO_LARGE:\n\t\t\"The expiresIn is larger than the predefined maximum value.\",\n\tINVALID_REMAINING: \"The remaining count is either too large or too small.\",\n\tINVALID_PREFIX_LENGTH: \"The prefix length is either too large or too small.\",\n\tINVALID_NAME_LENGTH: \"The name length is either too large or too small.\",\n\tMETADATA_DISABLED: \"Metadata is disabled.\",\n\tRATE_LIMIT_EXCEEDED: \"Rate limit exceeded.\",\n\tNO_VALUES_TO_UPDATE: \"No values to update.\",\n\tKEY_DISABLED_EXPIRATION: \"Custom key expiration values are disabled.\",\n\tINVALID_API_KEY: \"Invalid API key.\",\n\tINVALID_USER_ID_FROM_API_KEY: \"The user id from the API key is invalid.\",\n\tINVALID_REFERENCE_ID_FROM_API_KEY:\n\t\t\"The reference id from the API key is invalid.\",\n\tINVALID_API_KEY_GETTER_RETURN_TYPE:\n\t\t\"API Key getter returned an invalid key type. Expected string.\",\n\tSERVER_ONLY_PROPERTY:\n\t\t\"The property you're trying to set can only be set from the server auth instance only.\",\n\tFAILED_TO_UPDATE_API_KEY: \"Failed to update API key\",\n\tNAME_REQUIRED: \"API Key name is required.\",\n\tORGANIZATION_ID_REQUIRED:\n\t\t\"Organization ID is required for organization-owned API keys.\",\n\tUSER_NOT_MEMBER_OF_ORGANIZATION:\n\t\t\"You are not a member of the organization that owns this API key.\",\n\tINSUFFICIENT_API_KEY_PERMISSIONS:\n\t\t\"You do not have permission to perform this action on organization API keys.\",\n\tNO_DEFAULT_API_KEY_CONFIGURATION_FOUND:\n\t\t\"No default api-key configuration found.\",\n\tORGANIZATION_PLUGIN_REQUIRED:\n\t\t\"Organization plugin is required for organization-owned API keys. Please install and configure the organization plugin.\",\n});\n"],"mappings":";;;AAEA,MAAa,sBAAsB,iBAAiB;CACnD,uBAAuB;CACvB,qCACC;CACD,qCACC;CACD,aAAa;CACb,sBAAsB;CACtB,eAAe;CACf,cAAc;CACd,aAAa;CACb,gBAAgB;CAChB,qBAAqB;CACrB,yBACC;CACD,yBACC;CACD,mBAAmB;CACnB,uBAAuB;CACvB,qBAAqB;CACrB,mBAAmB;CACnB,qBAAqB;CACrB,qBAAqB;CACrB,yBAAyB;CACzB,iBAAiB;CACjB,8BAA8B;CAC9B,mCACC;CACD,oCACC;CACD,sBACC;CACD,0BAA0B;CAC1B,eAAe;CACf,0BACC;CACD,iCACC;CACD,kCACC;CACD,wCACC;CACD,8BACC;CACD,CAAC"}