Skip to main content

TypeAlias.SharedBudgetView

type SharedBudgetView = {
currency: string;
maxAmountPerDayRef: string | null;
maxAmountPerMonthRef: string | null;
maxAmountPerWeekRef: string | null;
scope: "application" | "organization";
scopeId: string;
timezone: string | null;
usage: {
day: {
cap: string | null;
spent: string;
};
month: {
cap: string | null;
spent: string;
};
week: {
cap: string | null;
spent: string;
};
};
};

Shared budget of an application or of the whole organization: it caps what every agent wallet of the scope spends together per calendar day, week (Monday to Sunday) and month, in the organization display currency. Amounts are decimal-integer strings in sub-units. usage.<window>.spent counts consumed payments in the window plus approved-unsigned and pending-human-approval holds.

Type Declaration​

NameType
currencystring
maxAmountPerDayRefstring
maxAmountPerMonthRefstring
maxAmountPerWeekRefstring
scope"application"
scopeIdstring
timezonestring
usage{ day: { cap: string
usage.day{ cap: string
usage.day.capstring
usage.day.spentstring
usage.month{ cap: string
usage.month.capstring
usage.month.spentstring
usage.week{ cap: string
usage.week.capstring
usage.week.spentstring