mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 19:01:23 +02:00
Merged credit-operations + shared-credit-service + shared-credit-ui into @manacore/credits with sub-path exports: - @manacore/credits — operations, costs, service - @manacore/credits/web — Svelte components - @manacore/credits/mobile — React Native components Package count: 47 → 44 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
/**
|
|
* @manacore/credits — Unified credit package
|
|
*
|
|
* Consolidates credit-operations + shared-credit-service + shared-credit-ui.
|
|
*
|
|
* Usage:
|
|
* - Operations/costs: import { CreditOperationType, CREDIT_COSTS } from '@manacore/credits'
|
|
* - Service: import { createCreditService } from '@manacore/credits'
|
|
* - Web UI: import { CreditBalance } from '@manacore/credits/web'
|
|
* - Mobile UI: import { CreditBalance } from '@manacore/credits/mobile'
|
|
*/
|
|
|
|
// === Operations (costs, types, metadata) ===
|
|
export {
|
|
CreditOperationType,
|
|
CreditCategory,
|
|
CREDIT_COSTS,
|
|
OPERATION_METADATA,
|
|
FREE_OPERATIONS,
|
|
getCreditCost,
|
|
getOperationMetadata,
|
|
getOperationsForApp,
|
|
getOperationsByCategory,
|
|
calculateBulkCost,
|
|
isFreeOperation,
|
|
isMicroCreditOperation,
|
|
isAiOperation,
|
|
formatCreditCost,
|
|
getPricingTable,
|
|
isFreeAction,
|
|
type OperationMetadata,
|
|
} from './operations';
|
|
|
|
// === Service (client-side credit management) ===
|
|
export { createCreditService, type CreditService } from './createCreditService';
|
|
export type {
|
|
CreditServiceConfig,
|
|
CreditBalance,
|
|
CreditCheckResponse,
|
|
CreditConsumptionResponse,
|
|
PricingResponse,
|
|
CreditUpdateCallback,
|
|
StandardOperationType,
|
|
} from './service-types';
|
|
export { DEFAULT_OPERATION_PRICING } from './service-types';
|