Skip to main content

TypeAlias.Mission

type Mission = {
createdAt: string;
createdBy: string | null;
createdVia: "api_key" | "session";
draft: | {
brief: string;
contentDigest: string;
createdAt: string;
currency: string;
digest: string;
durationDays: number;
endpoints: string[] | null;
envelopeRef: string;
exemptFromWalletBudgets: boolean;
frequency: | {
count: number;
period: "day" | "week" | "month";
}
| null;
id: string;
maxActiveRunsPerWallet: number;
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" | "organization" | "wallet";
status: "draft" | "published" | "superseded" | "discarded";
title: string;
totalBudgetRef: string | null;
unitCount: number | null;
unitLabel: string | null;
unitPriceRef: string | null;
updatedAt: string;
walletId: string;
}
| null;
homeWalletId: string;
id: string;
key: string;
limits: {
kind: "frequency" | "total_budget";
retryAt: string | null;
walletId: string | null;
}[];
published: | {
brief: string;
contentDigest: string;
createdAt: string;
currency: string;
digest: string;
durationDays: number;
endpoints: string[] | null;
envelopeRef: string;
exemptFromWalletBudgets: boolean;
frequency: | {
count: number;
period: "day" | "week" | "month";
}
| null;
id: string;
maxActiveRunsPerWallet: number;
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" | "organization" | "wallet";
status: "draft" | "published" | "superseded" | "discarded";
title: string;
totalBudgetRef: string | null;
unitCount: number | null;
unitLabel: string | null;
unitPriceRef: string | null;
updatedAt: string;
walletId: string;
}
| null;
stats: {
averageEnvelopeRef: string | null;
observedUnitPriceRef: string | null;
remainingTotalRef: string | null;
runsByStatus: Record<
| "active"
| "expired"
| "completed"
| "pending_approval"
| "declined"
| "abandoned"
| "cancelled", number>;
spentRef: string;
};
status: "active" | "archived";
updatedAt: string;
};

Type Declaration​

NameType
createdAtstring
createdBystring
createdVia"api_key"
draft
homeWalletIdstring
idstring
keystring
limits{ kind: "frequency"
published
stats{ averageEnvelopeRef: string
stats.averageEnvelopeRefstring
stats.observedUnitPriceRefstring
stats.remainingTotalRefstring
stats.runsByStatusRecord<
stats.spentRefstring
status"active"
updatedAtstring