declare const USAGE_OPERATION_TYPES: readonly ["AI_CHAT_TOKEN", "AI_WORKFLOW_TOKEN", "WORKFLOW_EXECUTION", "CODE_EXECUTION", "WEB_SEARCH", "CALL_RECORDING", "EMAIL_SEND"]; type UsageOperationTypeValue = (typeof USAGE_OPERATION_TYPES)[number]; type ChargeCreditsParams = { creditsUsedMicro: number; quantity?: number; userWorkspaceId?: string; } & ({ operation: string; operationType?: never; resourceContext?: never; } | { operationType: UsageOperationTypeValue; operation?: never; resourceContext?: string; }); declare const chargeCredits: ({ creditsUsedMicro, quantity, operation, operationType, resourceContext, userWorkspaceId, }: ChargeCreditsParams) => Promise; declare const CREDIT_UNAVAILABLE_REASONS: readonly ["workspace-suspended", "no-subscription", "no-credits"]; type CreditUnavailableReason = (typeof CREDIT_UNAVAILABLE_REASONS)[number]; type CreditAvailability = { hasAvailableCredits: true; } | { hasAvailableCredits: false; reason: CreditUnavailableReason; }; declare const getCreditAvailability: () => Promise; export { chargeCredits, getCreditAvailability }; export type { ChargeCreditsParams };