Skip to main content

TypeAlias.InboxItem

type InboxItem =
| {
actor: {
image: string | null;
kind: "user" | "agent";
label: string;
};
createdAt: string;
currency: string;
decidedAt: string | null;
expiresAt: string | null;
id: string;
intent: {
amountNative: string;
amountRef: string;
amountRefMilli: string;
approvedAmountRef?: string | null;
asset: string;
consumedAt?: string | null;
createdAt: string;
currentAmountRef?: string | null;
currentAmountRefMilli?: string | null;
decidedAt?: string | null;
decidedBy?: string | null;
events: {
amountRef: string;
at: string;
kind: | "expired"
| "consumed"
| "created"
| "human_approved"
| "human_declined"
| "agent_abandoned"
| "revalidated"
| "revalidation_required"
| "settlement_failed";
}[];
expiresAt?: string | null;
funding: {
kind: "prepaid" | "self-custody" | "sponsor";
signedBy: "client" | "server";
};
hash: string;
id: string;
kind: string;
missionRun: | {
id: string;
kind: "trial" | "regular";
missionId: string;
missionTitle: string;
}
| null;
recipient: string;
resource?: string | null;
sponsored: boolean;
state: | "failed"
| "expired"
| "declined"
| "abandoned"
| "approved"
| "consumed"
| "pending_human_approval";
updatedAt: string;
wallet: {
id: string;
label: string;
network: string;
};
};
service: | {
name: string;
via: string | null;
}
| null;
standing: "primary" | "fallback" | "none";
status: string;
subject: {
applicationId: string | null;
id: string;
kind: "application" | "agent-wallet" | "treasury" | "mission";
label: string;
network: string;
};
threshold: string | null;
type: "payment_approval";
}
| {
actor: | {
image: string | null;
kind: "user" | "agent";
label: string;
}
| null;
createdAt: string;
decidedAt: string | null;
decidedBy: string | null;
declineReason: string | null;
deliveredAmount: string;
expiresAt: string | null;
id: string;
note: string | null;
requestedAmount: string | null;
standing: "primary" | "fallback" | "none";
status: string;
subject: {
applicationId: string | null;
id: string;
kind: "application" | "agent-wallet" | "treasury" | "mission";
label: string;
network: string;
};
type: "refill_request";
}
| {
actor: | {
image: string | null;
kind: "user" | "agent";
label: string;
}
| null;
createdAt: string;
currency: string;
decidedAt: string | null;
decidedBy: string | null;
digest: string;
expiresAt: string | null;
id: string;
requestedCapRef: string;
standing: "primary" | "fallback" | "none";
status: string;
steps: {
fromRef: string | null;
id: string;
level: "application" | "wallet" | "organization";
toRef: string;
}[];
subject: {
applicationId: string | null;
id: string;
kind: "application" | "agent-wallet" | "treasury" | "mission";
label: string;
network: string;
};
target: {
id: string;
level: "application" | "wallet";
};
type: "budget_raise_request";
}
| {
actor: | {
image: string | null;
kind: "user" | "agent";
label: string;
}
| null;
approvalCount: number;
createdAt: string;
decidedAt: string | null;
expiresAt: string | null;
id: string;
standing: "primary" | "fallback" | "none";
status: string;
subject: {
applicationId: string | null;
id: string;
kind: "application" | "agent-wallet" | "treasury" | "mission";
label: string;
network: string;
};
threshold: number;
totalAmount: string;
type: "treasury_signature";
}
| {
actor: {
image: string | null;
kind: "user" | "agent";
label: string;
};
createdAt: string;
decidedAt: string | null;
expiresAt: string | null;
id: string;
standing: "primary" | "fallback" | "none";
status: string;
subject: {
applicationId: string | null;
id: string;
kind: "application" | "agent-wallet" | "treasury" | "mission";
label: string;
network: string;
};
type: "signer_validation";
}
| {
actor: {
image: string | null;
kind: "user" | "agent";
label: string;
};
createdAt: string;
decidedAt: string | null;
decidedBy: string | null;
digest: string;
draft: {
brief: string;
contentDigest: string;
createdAt: string;
currency: string;
digest: string;
durationDays: number;
envelopeRef: string;
exemptFromWalletBudgets: boolean;
frequency: | {
count: number;
period: "day" | "week" | "month";
}
| null;
id: string;
maxActiveRunsPerWallet: number | null;
maxPaymentRef: string | null;
mode: "on_demand" | "auto" | "frequency";
number: number;
overrides: {
applicationId?: string;
channel?: "x402" | "relay";
kind: "budget" | "destination" | "payment_cap";
scope?: "application" | "organization";
value?: string;
}[];
overridesApproval: | {
approvedAt: string;
approvedBy: string;
digest: string;
}
| null;
publishedAt: string | null;
publishedBy: string | null;
recipients: string[] | null;
sharing: "application" | "wallet" | "organization";
sources: | {
callPriceRef: string | null;
callsPerUnit: number | null;
endpoint: string;
label: string | null;
}[]
| null;
status: "draft" | "published" | "superseded" | "discarded";
title: string;
unitCount: number | null;
unitLabel: string | null;
unitPriceRef: string | null;
updatedAt: string;
walletId: string;
};
expiresAt: string | null;
id: string;
mission: {
createdAt: string;
createdBy: string | null;
createdVia: "api_key" | "session";
draft: | {
brief: string;
contentDigest: string;
createdAt: string;
currency: string;
digest: string;
durationDays: number;
envelopeRef: string;
exemptFromWalletBudgets: boolean;
frequency: | {
count: number;
period: "day" | "week" | "month";
}
| null;
id: string;
maxActiveRunsPerWallet: number | null;
maxPaymentRef: string | null;
mode: "on_demand" | "auto" | "frequency";
number: number;
overrides: {
applicationId?: string;
channel?: "x402" | "relay";
kind: "budget" | "destination" | "payment_cap";
scope?: "application" | "organization";
value?: string;
}[];
overridesApproval: | {
approvedAt: string;
approvedBy: string;
digest: string;
}
| null;
publishedAt: string | null;
publishedBy: string | null;
recipients: string[] | null;
sharing: "application" | "wallet" | "organization";
sources: | {
callPriceRef: string | null;
callsPerUnit: number | null;
endpoint: string;
label: string | null;
}[]
| null;
status: "draft" | "published" | "superseded" | "discarded";
title: string;
unitCount: number | null;
unitLabel: string | null;
unitPriceRef: string | null;
updatedAt: string;
walletId: string;
}
| null;
homeWalletId: string;
id: string;
key: string;
limits: {
kind: "frequency";
retryAt: string | null;
walletId: string | null;
}[];
published: | {
brief: string;
contentDigest: string;
createdAt: string;
currency: string;
digest: string;
durationDays: number;
envelopeRef: string;
exemptFromWalletBudgets: boolean;
frequency: | {
count: number;
period: "day" | "week" | "month";
}
| null;
id: string;
maxActiveRunsPerWallet: number | null;
maxPaymentRef: string | null;
mode: "on_demand" | "auto" | "frequency";
number: number;
overrides: {
applicationId?: string;
channel?: "x402" | "relay";
kind: "budget" | "destination" | "payment_cap";
scope?: "application" | "organization";
value?: string;
}[];
overridesApproval: | {
approvedAt: string;
approvedBy: string;
digest: string;
}
| null;
publishedAt: string | null;
publishedBy: string | null;
recipients: string[] | null;
sharing: "application" | "wallet" | "organization";
sources: | {
callPriceRef: string | null;
callsPerUnit: number | null;
endpoint: string;
label: string | null;
}[]
| null;
status: "draft" | "published" | "superseded" | "discarded";
title: string;
unitCount: number | null;
unitLabel: string | null;
unitPriceRef: string | null;
updatedAt: string;
walletId: string;
}
| null;
stats: {
averageEnvelopeRef: string | null;
observedUnitPriceRef: string | null;
runsByStatus: Record<
| "active"
| "expired"
| "completed"
| "pending_approval"
| "declined"
| "abandoned"
| "cancelled", number>;
spentCents: string;
spentRef: string;
};
status: "active" | "archived";
updatedAt: string;
};
overrides: {
applicationId?: string;
channel?: "x402" | "relay";
kind: "budget" | "destination" | "payment_cap";
scope?: "application" | "organization";
value?: string;
}[];
standing: "primary" | "fallback" | "none";
status: string;
subject: {
applicationId: string | null;
id: string;
kind: "application" | "agent-wallet" | "treasury" | "mission";
label: string;
network: string;
};
type: "mission_overrides_approval";
}
| {
actor: {
image: string | null;
kind: "user" | "agent";
label: string;
};
createdAt: string;
decidedAt: string | null;
decidedBy: string | null;
expiresAt: string | null;
id: string;
mission: {
id: string;
title: string;
};
run: {
approval: | {
kind: "publication";
publishedBy: string | null;
versionDigest: string;
}
| {
decidedAt: string;
decidedBy: string;
kind: "human";
}
| null;
completedAt: string | null;
createdAt: string;
currency: string;
decidedAt: string | null;
decidedBy: string | null;
envelopeRef: string;
events: {
actor: string | null;
createdAt: string;
id: string;
kind: | "expired"
| "completed"
| "trial_requested"
| "declined"
| "abandoned"
| "cancelled"
| "started"
| "auto_approved"
| "approved"
| "progress";
note: string | null;
}[];
exemptFromWalletBudgets: boolean;
expiresAt: string;
id: string;
intents: {
amountRef: string;
amountRefMilli: string;
createdAt: string;
destination: string;
id: string;
state: string;
}[];
kind: "trial" | "regular";
maxPaymentRef: string | null;
missionId: string;
missionTitle: string;
overrides: {
applicationId?: string;
channel?: "x402" | "relay";
kind: "budget" | "destination" | "payment_cap";
scope?: "application" | "organization";
value?: string;
}[];
payments: number;
recalibratedEnvelopeRef: string | null;
recalibratedUnitPriceRef: string | null;
recipients: string[] | null;
remainingRef: string;
sources: | {
callPriceRef: string | null;
callsPerUnit: number | null;
endpoint: string;
label: string | null;
}[]
| null;
sourceUsage: | {
asset: string | null;
callPriceRef: string | null;
calls: number;
callsPerUnit: number | null;
endpoint: string;
intentIds: string[];
label: string | null;
paidCents: string;
paidNative: string | null;
paidRef: string;
}[]
| null;
spentAsset: string | null;
spentCents: string;
spentNative: string | null;
spentRef: string;
startedBy: string | null;
startedVia: "api_key" | "session";
status: | "active"
| "expired"
| "completed"
| "pending_approval"
| "declined"
| "abandoned"
| "cancelled";
unitCount: number | null;
unitLabel: string | null;
unitPriceRef: string | null;
unitsDoneCount: number;
unitsRemaining: string[];
updatedAt: string;
versionDigest: string;
versionNumber: number;
walletId: string;
};
standing: "primary" | "fallback" | "none";
status: string;
subject: {
applicationId: string | null;
id: string;
kind: "application" | "agent-wallet" | "treasury" | "mission";
label: string;
network: string;
};
type: "mission_trial_approval";
}
| {
actor: {
image: string | null;
kind: "user" | "agent";
label: string;
};
createdAt: string;
decidedAt: string | null;
decidedBy: string | null;
expiresAt: string | null;
id: string;
mission: {
id: string;
title: string;
};
run: {
approval: | {
kind: "publication";
publishedBy: string | null;
versionDigest: string;
}
| {
decidedAt: string;
decidedBy: string;
kind: "human";
}
| null;
completedAt: string | null;
createdAt: string;
currency: string;
decidedAt: string | null;
decidedBy: string | null;
envelopeRef: string;
events: {
actor: string | null;
createdAt: string;
id: string;
kind: | "expired"
| "completed"
| "trial_requested"
| "declined"
| "abandoned"
| "cancelled"
| "started"
| "auto_approved"
| "approved"
| "progress";
note: string | null;
}[];
exemptFromWalletBudgets: boolean;
expiresAt: string;
id: string;
intents: {
amountRef: string;
amountRefMilli: string;
createdAt: string;
destination: string;
id: string;
state: string;
}[];
kind: "trial" | "regular";
maxPaymentRef: string | null;
missionId: string;
missionTitle: string;
overrides: {
applicationId?: string;
channel?: "x402" | "relay";
kind: "budget" | "destination" | "payment_cap";
scope?: "application" | "organization";
value?: string;
}[];
payments: number;
recalibratedEnvelopeRef: string | null;
recalibratedUnitPriceRef: string | null;
recipients: string[] | null;
remainingRef: string;
sources: | {
callPriceRef: string | null;
callsPerUnit: number | null;
endpoint: string;
label: string | null;
}[]
| null;
sourceUsage: | {
asset: string | null;
callPriceRef: string | null;
calls: number;
callsPerUnit: number | null;
endpoint: string;
intentIds: string[];
label: string | null;
paidCents: string;
paidNative: string | null;
paidRef: string;
}[]
| null;
spentAsset: string | null;
spentCents: string;
spentNative: string | null;
spentRef: string;
startedBy: string | null;
startedVia: "api_key" | "session";
status: | "active"
| "expired"
| "completed"
| "pending_approval"
| "declined"
| "abandoned"
| "cancelled";
unitCount: number | null;
unitLabel: string | null;
unitPriceRef: string | null;
unitsDoneCount: number;
unitsRemaining: string[];
updatedAt: string;
versionDigest: string;
versionNumber: number;
walletId: string;
};
standing: "primary" | "fallback" | "none";
status: string;
subject: {
applicationId: string | null;
id: string;
kind: "application" | "agent-wallet" | "treasury" | "mission";
label: string;
network: string;
};
type: "mission_run_approval";
};