mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 08:26:41 +02:00
feat(auth): add Gilden (guilds) shared Mana pool system
Replace removed B2B org credit system with consumer-friendly shared Mana pools. Members spend directly from a guild pool managed by the Gildenmeister (owner). Supports funding from personal balance, per-member spending limits, and credit source routing. New endpoints: /gilden/* (guild CRUD) and /credits/guild/* (pool ops). POST /credits/use now accepts optional creditSource for guild routing. Delete broken b2b-journey E2E tests that tested phantom endpoints. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
63376c1313
commit
17df7b32f5
19 changed files with 1900 additions and 969 deletions
|
|
@ -124,7 +124,8 @@ export class CreditClientService {
|
|||
operation: string,
|
||||
amount: number,
|
||||
description: string,
|
||||
metadata?: Record<string, any>
|
||||
metadata?: Record<string, any>,
|
||||
creditSource?: { type: 'personal' } | { type: 'guild'; guildId: string }
|
||||
): Promise<boolean> {
|
||||
const authUrl = this.getAuthUrl();
|
||||
const serviceKey = this.getServiceKey();
|
||||
|
|
@ -151,6 +152,7 @@ export class CreditClientService {
|
|||
operation,
|
||||
...metadata,
|
||||
},
|
||||
...(creditSource && { creditSource }),
|
||||
}),
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue