refactor(policy): add centralized decision helpers
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export type ReasonCode =
|
||||
| "AUTH_REQUIRED"
|
||||
| "NOT_FOUND"
|
||||
| "NOT_PARTICIPANT"
|
||||
| "ROLE_FORBIDDEN"
|
||||
| "INVALID_STATUS"
|
||||
| "ALREADY_DONE"
|
||||
| "DISPUTE_LOCKED"
|
||||
| "PAYMENT_FAILED"
|
||||
| "IDEMPOTENT_NOOP"
|
||||
| "VALIDATION_FAILED"
|
||||
|
||||
export interface PolicyDecision {
|
||||
ok: boolean
|
||||
reasonCode?: ReasonCode
|
||||
message?: string
|
||||
}
|
||||
Reference in New Issue
Block a user