Interface: IUsageCheckResult
Defined in: internal/usage-guard/types.ts:161
The adapter's answer to a check.
Read by the UsageGuard; on a denial the gateway refuses the call with the issue usage_denied and passes the app's
code and message through unchanged.
Properties
approved
approved:
boolean
Defined in: internal/usage-guard/types.ts:163
True runs the call; false refuses it with the issue usage_denied and the two fields below.
denyCode?
optionaldenyCode?:string
Defined in: internal/usage-guard/types.ts:169
The app's own code of the denial, for its UI to branch on.
Example
"daily_limit_reached" - the UI shows the plan upgrade
denyUserMessage?
optionaldenyUserMessage?:string
Defined in: internal/usage-guard/types.ts:171
A message for the end user, already in the user's language; the gateway shows it as it is.