mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 17:06:41 +02:00
feat(shared-hono): add credit client for Hono backends
Add credits.ts to @manacore/shared-hono as replacement for CreditClientService from @mana-core/nestjs-integration. Exports: getBalance, validateCredits, consumeCredits, refundCredits Calls mana-credits service via MANA_CREDITS_URL + X-Service-Key. Same API surface as the NestJS version but as pure functions instead of an @Injectable() service class. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
87d7966b0f
commit
3fca0de680
3 changed files with 129 additions and 1 deletions
|
|
@ -12,7 +12,8 @@
|
|||
"./db": "./src/db.ts",
|
||||
"./health": "./src/health.ts",
|
||||
"./admin": "./src/admin.ts",
|
||||
"./error": "./src/error.ts"
|
||||
"./error": "./src/error.ts",
|
||||
"./credits": "./src/credits.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"type-check": "tsc --noEmit"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue