@conto_finance/sdk 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -155,7 +155,17 @@ const confirmed = await conto.checkout.confirm(result.checkpoint, {
155
155
  or `link-cli` is missing or logged out, `getLinkCard()` cancels the checkpoint to release the
156
156
  held spend and throws `LinkCardDeniedError`, `LinkCardExpiredError`, `LinkCardTimeoutError`, or
157
157
  `LinkWalletUnavailableError`. All extend `LinkCardError`. Do not pay.
158
- - Retrying with the same input resumes the same checkpoint and Link request.
158
+ - Retrying with the same input resumes the same checkpoint and Link request while Conto's approval
159
+ is open. That approval lasts 30 minutes. For about 5 to 10 minutes after it lapses, the stage can
160
+ still read `APPROVED`, so a retry can return the card, but `confirm()` refuses it. Once the stage
161
+ is `OUTCOME_UNKNOWN`, a retry throws `CHECKOUT_CHECKPOINT_NOT_APPROVED`.
162
+ - `getLinkCard()` and `replaceLinkCard()` tell Conto the Link request ID as soon as Stripe Link
163
+ creates it. If Conto's approval then lapses, or a rule stops `confirm()`, Conto keeps the spend held,
164
+ because the card may still work. The checkpoint moves to stage `OUTCOME_UNKNOWN`. Cancel the Link
165
+ request, then call `conto.checkout.cancel(id)` to release the spend. Otherwise the owner gets a
166
+ review alert and records what happened. If Conto cannot record the request, the SDK cancels it in
167
+ Link, then cancels the checkpoint, and throws `LinkCardError` with code `LINK_CARD_NOT_RECORDED`.
168
+ `holdReleased` says whether the spend was released.
159
169
  - Pass `onLinkApproval` to get Stripe Link's approval page, so a person without the Link app can
160
170
  approve on the web while signed in to Link. It is called once, after Conto approves and Link
161
171
  creates the request, with `{ checkpoint, linkRequestId, approvalUrl, approvalExpiresAt }`.
@@ -164,19 +174,105 @@ const confirmed = await conto.checkout.confirm(result.checkpoint, {
164
174
  - The card (`number`, `securityValue` for the CVC, `expMonth`, `expYear`, `validUntil`, `last4`,
165
175
  `brand`) stays in this process. Printing or serializing the result shows only the last four
166
176
  digits. It never appears in an error.
167
- - The card covers the approved total, so `confirm()` with a `paymentReference` refuses a
168
- different total. Call `conto.checkout.replaceLinkCard(result, { wallet, amountMinor })` to
177
+ - The card covers the approved total, so `confirm()` refuses a different total for a checkpoint from
178
+ `getLinkCard()` or `onLinkApproval`, even when `paymentReference` is not passed. Call
179
+ `conto.checkout.replaceLinkCard(result, { wallet, amountMinor })` to
169
180
  cancel the old card and checkpoint and get a card for the final total.
170
181
  - Any `LinkWallet` works in place of `linkCliWallet()`: it creates a card request, waits for
171
182
  approval, retrieves the card, and cancels.
172
183
  - The protection holds only when the agent cannot also run `link-cli`, use a shell, or call Link
173
184
  with your credentials itself.
174
185
  - Pass observed final items and charges to `confirm()` even when the total is unchanged.
175
- The server rejects a changed cart against the approved intent. The trusted host must
186
+ The server checks the items and the final total. Other rows, such as tax and shipping, may
187
+ differ from the ones passed to `begin()`. The trusted host must
176
188
  validate the actual merchant and checkout, own a durable one-use payment dispatch
177
189
  claim, and keep card use outside model tools. Replaying a confirmed checkpoint is
178
190
  not permission to submit payment again.
179
191
 
192
+ ## Shared budgets
193
+
194
+ A shared budget is one limit that several agents draw on. The budget holder sets it in Spending
195
+ controls or with `admin.spending`. Agents no budget covers are not affected, except a buyer linked to
196
+ an owner workspace. Until a budget in that workspace covers it, those paths fail with `reasonCode`
197
+ `LINKED_BUDGET_REQUIRED`.
198
+
199
+ ```typescript
200
+ // Agent key. Nothing on conto.spending can raise a limit, approve a task, or release a hold.
201
+ const { budgets } = await conto.spending.budgets();
202
+ await conto.spending.preview({
203
+ amount: '40',
204
+ currency: 'USDC',
205
+ sourceId: walletId,
206
+ merchant: recipientAddress,
207
+ });
208
+
209
+ // Organization API key.
210
+ await admin.spending.createBudget({
211
+ name: 'Team tools',
212
+ scope: 'AGENTS',
213
+ participantIds: [agentA, agentB],
214
+ amount: '500',
215
+ currency: 'USDC',
216
+ period: 'MONTHLY',
217
+ periodStart: new Date().toISOString(),
218
+ periodEnd: new Date(Date.now() + 365 * 86_400_000).toISOString(),
219
+ });
220
+ ```
221
+
222
+ **A budget stops other payment paths.** While it exists, it stops x402, MPP, external wallet
223
+ payments, agent-to-agent payments, payment grants, checkout relay, hosted Stripe Link, guarded browser
224
+ checkout (`runGuardedCheckout()`), card overlays and checkout checkpoints, including
225
+ `checkout.getLinkCard()`, for every agent it covers. A paused, expired or not yet started budget still
226
+ stops them. Until its start date, while paused, and after its end date, a budget also refuses the
227
+ managed wallet payments and connected card draws it covers, for those agents. A task's budget does
228
+ neither. It applies only to a managed wallet payment or connected card draw that names the task.
229
+ `updateBudget()` can resume a paused budget or extend an
230
+ expired one, and a start date cannot be changed. To end a budget, call `admin.spending.deleteBudget(id, { version })`. It fails with
231
+ `reasonCode` `BUDGET_HAS_HOLDS` while a purchase holds spend against the budget. Try budgets on a test
232
+ organization first.
233
+
234
+ - A budget covers purchases in its own currency, so set it to what the wallets pay in: `USDC` on
235
+ Base, `USDC.e` on Tempo or `pathUSD` on Tempo Testnet. `USD`, `USDC` and `USDC.e` budgets cover one
236
+ another at par when no budget at that level, workspace or agent, is in the exact currency. A
237
+ managed wallet payment or connected card draw is refused, whatever the budget's state, when a level
238
+ has budgets for that agent and none covers its currency. `preview()` gives `reasonCode`
239
+ `BUDGET_CURRENCY_UNSUPPORTED`. A budget's currency cannot be changed.
240
+ - `preview()` needs a managed wallet linked to the agent, and that wallet's stablecoin as `currency`.
241
+ It holds nothing and approves nothing, so keep the request, approval and execute flow.
242
+ - When a budget requires a task, ask for one with `conto.spending.requestTask()`. Once the budget
243
+ holder approves it, pass its id as `context.taskRequestId` on `payments.request()` from a managed
244
+ wallet, or as `taskRequestId` on `connectedCards.draw()`. With a self-custody wallet,
245
+ `payments.request()` returns `DENIED`, and `payments.approve()` refuses the task fields.
246
+ - `context.purchaseKey` identifies one purchase. A key cannot be used again, even after its purchase
247
+ is released, so use a new key for a new attempt.
248
+ - `payments.request()` can return `APPROVED` for a purchase a budget refuses. `payments.execute()`
249
+ then throws status 409 and code `SHARED_BUDGET_BLOCKED`. With `autoExecute`, the request stays
250
+ `APPROVED` and nothing is thrown. To see why, call `preview()` with the same `taskRequestId` and
251
+ `purchaseKey`.
252
+ - `purchases()` lists purchases against budgets in the agent's organization, not Commerce
253
+ `conto.purchases`. It is empty when none of those budgets has applied. A buyer linked to an owner
254
+ workspace has no row for a purchase that only an owner budget covered. The owner reads those with
255
+ `admin.spending.purchases()`.
256
+ - `admin.spending` needs an organization API key. `createBudget()`, `updateBudget()`, `deleteBudget()`
257
+ and `decideTask()` need `policies:write`. `accounting()`, `attachEvidence()` and `reviewEvidence()`
258
+ need `transactions:write`. `reconcile()` needs `spending:reconcile`, which Standard keys do not
259
+ have. An admin SDK key cannot change budgets, decide tasks, or reconcile.
260
+ - `attachEvidence()` takes a PDF, PNG or JPEG of at most 2 MiB, with up to 10 files per purchase. Set
261
+ the Blob's `type`, for example `new Blob([bytes], { type: 'application/pdf' })`. A Blob with no type,
262
+ or with a type that does not match the file's first bytes, fails with `reasonCode` `INVALID_FILE`.
263
+ Conto does not take the amount, currency or merchant from the file. The budget holder enters them
264
+ with `reviewEvidence()`.
265
+ - `exportPurchases()` returns CSV bytes and fails with `reasonCode` `EXPORT_TOO_LARGE` above 10,000
266
+ purchases.
267
+ - Budget errors have `code` `POLICY_VIOLATION`, so read `reasonCode` on `ContoError` and
268
+ `ContoAdminError`. Some also have `nextActions`, such as `SHARED_BUDGET_EXCEEDED` with
269
+ `REQUEST_BUDGET_INCREASE`. `checkout.begin()`, `getLinkCard()` and `replaceLinkCard()` have `code`
270
+ `CHECKPOINT_BUDGET_NOT_SUPPORTED` with that `reasonCode` set. `payments.execute()` has `code`
271
+ `SHARED_BUDGET_BLOCKED` and no `reasonCode`.
272
+ - A `VALIDATION_ERROR` on a spending call usually lists the fields in `fieldErrors`. It does not when
273
+ the call got a field it does not accept, such as `periodStart` or `currency` on `updateBudget()`. A
274
+ `payments.request()` validation failure never has `fieldErrors`.
275
+
180
276
  ## External-card Policy Overlay
181
277
 
182
278
  The admin client registers only a masked card alias and assigns cooperative
@@ -322,9 +418,10 @@ Shop Pay, or PayPal browser action without requiring private provider integratio
322
418
  privileged browser executor must be available only through this wrapper. An unrestricted click or
323
419
  payment tool would bypass the control. Persist its stable dispatch attempt before calling the
324
420
  helper. The helper owns authorization, one-use claim, the privileged callback, and finalization.
325
- The
326
- [Stripe Link guide](https://conto.finance/docs/guides/stripe-link#make-the-check-enforceable)
327
- describes the runtime boundary and includes an example.
421
+ When a rule requires the owner's approval, `runGuardedCheckout` stops with status 409 and code
422
+ `APPROVAL_REQUIRED`. Checkpoints wait for the owner instead, so for Stripe Link prefer the
423
+ [checkpoints in the Stripe Link guide](https://conto.finance/docs/guides/stripe-link#add-the-checkpoints)
424
+ or `getLinkCard()`.
328
425
 
329
426
  Isolated browser processes can implement `PrivilegedBrowserCheckoutDriver` and use
330
427
  `runGuardedCheckoutWithDriver`. The agent model must receive only that guarded wrapper, never the
@@ -527,7 +624,8 @@ and other non-idempotent mutations are never retried automatically. If execution
527
624
  payment until an operator has resolved it.
528
625
 
529
626
  `ContoError` and `ContoAdminError` expose a stable error contract: `code`, `status`, `requestId`,
530
- `retryAfter`, and locally generated `retryGuidance` where applicable. Arbitrary server details,
627
+ `retryAfter`, `fieldErrors` on most spending validation failures, `reasonCode` and `nextActions` on a
628
+ budget refusal, and locally generated `retryGuidance` where applicable. Arbitrary server details,
531
629
  context, hints, and workflow steps are not forwarded through SDK errors:
532
630
 
533
631
  ```typescript
package/dist/index.d.mts CHANGED
@@ -839,6 +839,311 @@ declare function verifyPurchaseWebhook(input: {
839
839
  data: PurchaseEvent;
840
840
  };
841
841
 
842
+ /**
843
+ * Shared budgets: one limit that several agents draw on, set in Spending controls.
844
+ *
845
+ * `conto.spending` uses an agent key. `admin.spending` is for the budget holder and uses an
846
+ * organization API key. Exact amounts are decimal strings. These APIs never give agents authority
847
+ * to raise ceilings.
848
+ */
849
+ /**
850
+ * File bytes. `new Blob()`, `new File()` and `new Response()` accept them on every supported
851
+ * TypeScript, with or without the DOM lib.
852
+ */
853
+ type DownloadBytes = ReturnType<Uint8Array['slice']> & {
854
+ readonly buffer: ArrayBuffer;
855
+ };
856
+ type SpendingRequester = {
857
+ download(path: string): Promise<DownloadBytes>;
858
+ request<T>(method: string, path: string, body?: Record<string, unknown> | FormData): Promise<T>;
859
+ };
860
+ interface BudgetSnapshot {
861
+ id: string;
862
+ name: string;
863
+ scope: string;
864
+ currency: string;
865
+ period: 'ONCE' | 'MONTHLY';
866
+ periodStart: string;
867
+ periodEnd: string;
868
+ authorizationStartsAt?: string;
869
+ authorizationEndsAt?: string;
870
+ amount: string;
871
+ held: string;
872
+ settled: string;
873
+ refunded: string;
874
+ available: string;
875
+ status: string;
876
+ isActive: boolean;
877
+ version: number;
878
+ requiresTask: boolean;
879
+ taskRequestId: string | null;
880
+ participantIds?: string[];
881
+ }
882
+ interface TaskInput {
883
+ purpose: string;
884
+ amount: string;
885
+ currency: string;
886
+ expiresAt: string;
887
+ permittedMerchants?: string[];
888
+ permittedSourceIds?: string[];
889
+ }
890
+ interface TaskSnapshot {
891
+ id: string;
892
+ purpose: string;
893
+ status: string;
894
+ amount: string;
895
+ currency: string;
896
+ expiresAt: string;
897
+ budgetId: string | null;
898
+ agentId: string;
899
+ participantIds: string[];
900
+ permittedMerchants: string[];
901
+ permittedSourceIds: string[];
902
+ }
903
+ /** A purchase against shared budgets. These are separate from Commerce `conto.purchases`. */
904
+ interface PurchaseSnapshot {
905
+ id: string;
906
+ agentId: string;
907
+ executionReference: string;
908
+ sourceType: string;
909
+ sourceId: string;
910
+ merchant: string;
911
+ purpose: string;
912
+ currency: string;
913
+ authorizedAmount: string;
914
+ heldAmount: string;
915
+ settledAmount: string;
916
+ refundedAmount: string;
917
+ status: string;
918
+ enforcementMode: string;
919
+ verification: string;
920
+ nextActions: string[];
921
+ taskRequestId: string | null;
922
+ department: string | null;
923
+ project: string | null;
924
+ accountingCode: string | null;
925
+ createdAt: string;
926
+ }
927
+ interface PurchaseDetail extends PurchaseSnapshot {
928
+ events: Array<{
929
+ id: string;
930
+ kind: string;
931
+ createdAt: string;
932
+ evidenceRef: string;
933
+ heldAmount: string;
934
+ settledAmount: string;
935
+ refundedAmount: string;
936
+ }>;
937
+ evidence: Array<{
938
+ id: string;
939
+ filename: string;
940
+ matchStatus: string;
941
+ createdAt: string;
942
+ }>;
943
+ }
944
+ interface PreviewInput {
945
+ amount: string;
946
+ currency: string;
947
+ sourceId: string;
948
+ merchant: string;
949
+ purpose?: string;
950
+ taskRequestId?: string;
951
+ purchaseKey?: string;
952
+ }
953
+ interface BudgetInput {
954
+ name: string;
955
+ scope: 'WORKSPACE' | 'AGENT' | 'AGENTS';
956
+ participantIds?: string[];
957
+ amount: string;
958
+ currency: string;
959
+ period: 'ONCE' | 'MONTHLY';
960
+ periodStart: string;
961
+ periodEnd: string;
962
+ requiresTask?: boolean;
963
+ }
964
+ declare class SpendingClient {
965
+ private client;
966
+ constructor(client: SpendingRequester);
967
+ /**
968
+ * CSV of this agent's purchases against budgets in its own organization. Fails with `reasonCode`
969
+ * `EXPORT_TOO_LARGE` above 10,000 purchases.
970
+ */
971
+ exportPurchases(): Promise<DownloadBytes>;
972
+ downloadEvidence(purchaseId: string, evidenceId: string): Promise<DownloadBytes>;
973
+ /** The budgets that cover this agent, with what is held, settled and available. */
974
+ budgets(): Promise<{
975
+ snapshotAt: string;
976
+ timezone: string;
977
+ budgets: BudgetSnapshot[];
978
+ buyerConnection?: {
979
+ revoked: boolean;
980
+ participantId: string;
981
+ };
982
+ }>;
983
+ tasks(cursor?: string): Promise<{
984
+ tasks: TaskSnapshot[];
985
+ nextCursor: string | null;
986
+ }>;
987
+ /**
988
+ * Ask the budget holder to approve a task budget. Once it is approved, pass its id as
989
+ * `context.taskRequestId` on `payments.request()` from a managed wallet, or as `taskRequestId` on
990
+ * `connectedCards.draw()`. A task's budget applies only to a payment or draw that names the task,
991
+ * and it stops nothing on other paths.
992
+ */
993
+ requestTask(input: TaskInput): Promise<{
994
+ id: string;
995
+ status: string;
996
+ nextActions: string[];
997
+ }>;
998
+ /** This agent's purchases against budgets in its own organization. Empty when none has applied. */
999
+ purchases(cursor?: string): Promise<{
1000
+ purchases: PurchaseSnapshot[];
1001
+ nextCursor: string | null;
1002
+ }>;
1003
+ purchase(purchaseId: string): Promise<PurchaseDetail>;
1004
+ /**
1005
+ * Check a purchase against shared budgets before requesting the payment. It holds nothing and
1006
+ * approves nothing. `sourceId` must be a managed wallet linked to this agent, and `currency` must
1007
+ * be that wallet's stablecoin, such as `USDC` on Base, `USDC.e` on Tempo or `pathUSD` on Tempo
1008
+ * Testnet. A purchase the budgets would refuse throws a `ContoError`.
1009
+ */
1010
+ preview(input: PreviewInput): Promise<{
1011
+ budgetCheck: string;
1012
+ configured: boolean;
1013
+ authorizationGranted: false;
1014
+ scope: "SHARED_BUDGET_ONLY";
1015
+ snapshotAt: string;
1016
+ nextActions: string[];
1017
+ }>;
1018
+ /**
1019
+ * Attach a PDF, PNG or JPEG of at most 2 MiB, with up to 10 files per purchase. Set the Blob's
1020
+ * `type` to `application/pdf`, `image/png` or `image/jpeg`. A Blob with no type, or with a type
1021
+ * that does not match the file's first bytes, fails with `reasonCode` `INVALID_FILE`.
1022
+ */
1023
+ attachEvidence(purchaseId: string, file: Blob, filename: string): Promise<{
1024
+ id: string;
1025
+ matchStatus: string;
1026
+ }>;
1027
+ }
1028
+ declare class AdminSpendingClient {
1029
+ private client;
1030
+ constructor(client: SpendingRequester);
1031
+ /**
1032
+ * CSV of the organization's purchases against shared budgets. Fails with `reasonCode`
1033
+ * `EXPORT_TOO_LARGE` above 10,000 purchases.
1034
+ */
1035
+ exportPurchases(): Promise<DownloadBytes>;
1036
+ /**
1037
+ * Attach a PDF, PNG or JPEG of at most 2 MiB, with up to 10 files per purchase. Set the Blob's
1038
+ * `type` to `application/pdf`, `image/png` or `image/jpeg`. A Blob with no type, or with a type
1039
+ * that does not match the file's first bytes, fails with `reasonCode` `INVALID_FILE`.
1040
+ */
1041
+ attachEvidence(purchaseId: string, file: Blob, filename: string): Promise<{
1042
+ id: string;
1043
+ matchStatus: string;
1044
+ }>;
1045
+ downloadEvidence(purchaseId: string, evidenceId: string): Promise<DownloadBytes>;
1046
+ budgets(): Promise<{
1047
+ snapshotAt: string;
1048
+ timezone: string;
1049
+ budgets: BudgetSnapshot[];
1050
+ buyerConnection?: {
1051
+ revoked: boolean;
1052
+ participantId: string;
1053
+ };
1054
+ }>;
1055
+ /**
1056
+ * Create a shared budget. Needs an organization API key with `policies:write`.
1057
+ *
1058
+ * While a budget exists, it stops x402, MPP, external wallet payments, agent-to-agent payments,
1059
+ * payment grants, checkout relay, hosted Stripe Link, guarded browser checkout
1060
+ * (`runGuardedCheckout()`), card overlays and checkout checkpoints, including
1061
+ * `checkout.getLinkCard()`, for every agent it covers. A paused, expired or not yet started budget
1062
+ * still stops them. Until its start date, while paused, and after its end date, it also refuses
1063
+ * the managed wallet payments and connected card draws it covers, for those agents. A start date
1064
+ * cannot be changed.
1065
+ * `deleteBudget()` ends a budget. Fails with `reasonCode`
1066
+ * `ENROLLMENT_RECONCILIATION_REQUIRED` while the organization or a participating agent has an
1067
+ * open commitment.
1068
+ */
1069
+ createBudget(input: BudgetInput): Promise<{
1070
+ id: string;
1071
+ version: number;
1072
+ }>;
1073
+ /**
1074
+ * Change a budget's amount or active state, or move its end date to a later time in the future.
1075
+ * Needs the budget's current `version`. A task budget can only change its active state. Pausing
1076
+ * stops new purchases on it, and does not lift what it stops on other payment paths.
1077
+ */
1078
+ updateBudget(budgetId: string, input: {
1079
+ version: number;
1080
+ amount?: string;
1081
+ isActive?: boolean;
1082
+ periodEnd?: string;
1083
+ }): Promise<{
1084
+ id: string;
1085
+ version: number;
1086
+ }>;
1087
+ /**
1088
+ * End a budget, so it stops applying on every path. Needs the budget's current `version`. Fails
1089
+ * with `reasonCode` `BUDGET_HAS_HOLDS` while a purchase holds spend against it, and `TASK_BUDGET`
1090
+ * for a task's budget, which ends by closing the task. A linked buyer with no budget left fails
1091
+ * with `reasonCode` `LINKED_BUDGET_REQUIRED`.
1092
+ */
1093
+ deleteBudget(budgetId: string, input: {
1094
+ version: number;
1095
+ }): Promise<{
1096
+ id: string;
1097
+ deleted: true;
1098
+ }>;
1099
+ tasks(cursor?: string): Promise<{
1100
+ tasks: TaskSnapshot[];
1101
+ nextCursor: string | null;
1102
+ }>;
1103
+ /** Approve, reject or close a task. Needs an organization API key with `policies:write`. */
1104
+ decideTask(taskId: string, input: {
1105
+ decision: 'APPROVE' | 'REJECT' | 'CLOSE';
1106
+ amount?: string;
1107
+ participantIds?: string[];
1108
+ }): Promise<{
1109
+ id: string;
1110
+ status: string;
1111
+ }>;
1112
+ purchases(cursor?: string): Promise<{
1113
+ purchases: PurchaseSnapshot[];
1114
+ nextCursor: string | null;
1115
+ }>;
1116
+ purchase(purchaseId: string): Promise<PurchaseDetail>;
1117
+ /** Record what happened to a purchase. Needs an API key with the `spending:reconcile` scope. */
1118
+ reconcile(purchaseId: string, input: {
1119
+ eventKey: string;
1120
+ kind: 'RELEASED' | 'SETTLED' | 'REFUNDED' | 'UNKNOWN';
1121
+ settledAmount?: string;
1122
+ refundedAmount?: string;
1123
+ final?: boolean;
1124
+ evidenceRef: string;
1125
+ }): Promise<PurchaseSnapshot | null>;
1126
+ accounting(purchaseId: string, input: {
1127
+ department: string | null;
1128
+ project: string | null;
1129
+ accountingCode: string | null;
1130
+ }): Promise<{
1131
+ id: string;
1132
+ department: string | null;
1133
+ project: string | null;
1134
+ accountingCode: string | null;
1135
+ }>;
1136
+ /** Record the amount, currency and merchant on a file. Conto does not take them from the file. */
1137
+ reviewEvidence(purchaseId: string, evidenceId: string, input: {
1138
+ amount: string;
1139
+ currency: string;
1140
+ merchant: string;
1141
+ }): Promise<{
1142
+ id: string;
1143
+ matchStatus: string;
1144
+ }>;
1145
+ }
1146
+
842
1147
  interface ApiErrorMetadata {
843
1148
  code: string;
844
1149
  status: number;
@@ -851,6 +1156,8 @@ interface ApiErrorMetadata {
851
1156
  message: string;
852
1157
  }>;
853
1158
  reasons?: string[];
1159
+ reasonCode?: string;
1160
+ nextActions?: string[];
854
1161
  }
855
1162
 
856
1163
  /**
@@ -894,6 +1201,9 @@ declare class ContoAdminError extends Error {
894
1201
  readonly requestId?: string;
895
1202
  readonly retryAfter?: number;
896
1203
  readonly retryGuidance?: string;
1204
+ readonly reasonCode?: string;
1205
+ readonly nextActions?: string[];
1206
+ readonly fieldErrors?: ApiErrorMetadata['fieldErrors'];
897
1207
  constructor(message: string, metadata: ApiErrorMetadata);
898
1208
  }
899
1209
  interface PaginationParams {
@@ -1506,6 +1816,7 @@ declare class ContoAdmin {
1506
1816
  #private;
1507
1817
  private baseUrl;
1508
1818
  private timeout;
1819
+ spending: AdminSpendingClient;
1509
1820
  agents: AgentsClient;
1510
1821
  wallets: WalletsClient;
1511
1822
  cards: AdminCardsClient;
@@ -1523,11 +1834,16 @@ declare class ContoAdmin {
1523
1834
  signal?: AbortSignal;
1524
1835
  lastEventId?: string;
1525
1836
  }): Promise<Response>;
1837
+ /**
1838
+ * Download a file from the Conto API as bytes. It retries like a read, and
1839
+ * failures throw ContoAdminError as request() does.
1840
+ */
1841
+ download(path: string): Promise<DownloadBytes>;
1526
1842
  /**
1527
1843
  * Make an authenticated request to the Conto API. Reads retry. A write retries
1528
1844
  * only when `idempotent` says the API deduplicates it, as purchase creation does.
1529
1845
  */
1530
- request<T>(method: string, path: string, body?: Record<string, unknown>, options?: {
1846
+ request<T>(method: string, path: string, body?: Record<string, unknown> | FormData, options?: {
1531
1847
  idempotent?: boolean;
1532
1848
  }): Promise<T>;
1533
1849
  }
@@ -1858,6 +2174,13 @@ interface PaymentRequestInput {
1858
2174
  currency?: string;
1859
2175
  dueDate?: string;
1860
2176
  };
2177
+ /** An approved shared budget task, from `conto.spending.requestTask()`. */
2178
+ taskRequestId?: string;
2179
+ /**
2180
+ * A stable id for this purchase against shared budgets. A key cannot be used again, even after
2181
+ * its purchase is released, so use a new key for a new attempt.
2182
+ */
2183
+ purchaseKey?: string;
1861
2184
  };
1862
2185
  /** Specific wallet ID to use (optional) */
1863
2186
  walletId?: string;
@@ -2023,7 +2346,8 @@ interface ExternalWalletApprovalInput {
2023
2346
  recipientName?: string;
2024
2347
  purpose?: string;
2025
2348
  category?: string;
2026
- context?: PaymentRequestInput['context'];
2349
+ /** A self-custody wallet cannot pay against a shared task, so the task fields are refused. */
2350
+ context?: Omit<NonNullable<PaymentRequestInput['context']>, 'taskRequestId' | 'purchaseKey'>;
2027
2351
  }
2028
2352
  interface ExternalWalletApprovalResult {
2029
2353
  approved: boolean;
@@ -2326,6 +2650,10 @@ interface ConnectedCardDrawInput {
2326
2650
  /** Only USD is supported. Defaults to USD. */
2327
2651
  currency?: 'USD';
2328
2652
  merchant: ConnectedCardDrawMerchant;
2653
+ /** Why the agent wants this purchase, up to 500 characters. Shown to the person reviewing it. */
2654
+ purpose?: string;
2655
+ /** An approved task, for a budget that requires one. Naming a task grants nothing. */
2656
+ taskRequestId?: string;
2329
2657
  }
2330
2658
  /**
2331
2659
  * Live single-use card material returned by {@link ConnectedCardsClient.draw}.
@@ -2355,6 +2683,8 @@ interface ConnectedCardDrawResult {
2355
2683
  replayed: boolean;
2356
2684
  decision: 'APPROVED' | 'DENIED' | 'REQUIRES_APPROVAL';
2357
2685
  reasons: string[];
2686
+ /** Present when a budget refused the draw, for example `TASK_REQUIRED`. */
2687
+ reasonCodes?: string[];
2358
2688
  /** Present when the draw outcome is ambiguous and needs reconciliation. */
2359
2689
  reconciliationRequired?: boolean;
2360
2690
  /**
@@ -2454,6 +2784,8 @@ interface TestCardDrawResult {
2454
2784
  replayed: boolean;
2455
2785
  decision: 'APPROVED' | 'DENIED' | 'REQUIRES_APPROVAL';
2456
2786
  reasons: string[];
2787
+ /** Present when a budget refused the draw, for example `TASK_REQUIRED`. */
2788
+ reasonCodes?: string[];
2457
2789
  reconciliationRequired?: boolean;
2458
2790
  /** Present only on the response that issues it. A replay never returns it again. */
2459
2791
  testCredential?: TestCardCredential;
@@ -2585,7 +2917,10 @@ interface ConfirmCheckoutCheckpointInput {
2585
2917
  currency?: 'USD';
2586
2918
  /** Observed final items. Supplied items are checked even when the total is unchanged. */
2587
2919
  lineItems?: CommerceLineItemInput[];
2588
- /** Observed final charges. Supplied charges are checked even when the total is unchanged. */
2920
+ /**
2921
+ * Observed final charges, such as subtotal, tax and shipping. Conto checks that the final
2922
+ * total matches. The other rows may differ from the ones passed to begin().
2923
+ */
2589
2924
  totals?: CommerceTotalInput[];
2590
2925
  /** Page where the payment is submitted: the merchant's site or the payment method's. */
2591
2926
  pageUrl?: string;
@@ -3338,6 +3673,8 @@ declare class ContoError extends Error {
3338
3673
  readonly actionUrl?: string;
3339
3674
  readonly fieldErrors?: ApiErrorMetadata['fieldErrors'];
3340
3675
  readonly reasons?: string[];
3676
+ readonly reasonCode?: string;
3677
+ readonly nextActions?: string[];
3341
3678
  readonly diagnostics?: SetupDiagnostics;
3342
3679
  constructor(message: string, metadata: ApiErrorMetadata, diagnostics?: unknown);
3343
3680
  }
@@ -3458,6 +3795,7 @@ declare class Conto {
3458
3795
  private timeout;
3459
3796
  /** Lightweight checkpoints before the payment method opens and before payment. */
3460
3797
  checkout: CheckoutClient;
3798
+ spending: SpendingClient;
3461
3799
  payments: PaymentsClient;
3462
3800
  cards: CardsClient;
3463
3801
  connectedCards: ConnectedCardsClient;
@@ -3555,8 +3893,13 @@ declare class Conto {
3555
3893
  signal?: AbortSignal;
3556
3894
  lastEventId?: string;
3557
3895
  }): Promise<Response>;
3896
+ /**
3897
+ * Download a file from the Conto API as bytes. It retries like a read, and
3898
+ * failures throw ContoError as request() does.
3899
+ */
3900
+ download(path: string): Promise<DownloadBytes>;
3558
3901
  /** Make an authenticated request to the Conto API */
3559
- request<T>(method: string, path: string, body?: Record<string, unknown>, options?: ContoRequestOptions): Promise<T>;
3902
+ request<T>(method: string, path: string, body?: Record<string, unknown> | FormData, options?: ContoRequestOptions): Promise<T>;
3560
3903
  }
3561
3904
  /** Agent client for the cooperative external-card policy overlay. */
3562
3905
  declare class CardsClient {
@@ -3893,9 +4236,10 @@ declare class CheckoutClient {
3893
4236
  * 1. Conto runs checkpoint 1 and holds the spend. When a rule requires the
3894
4237
  * owner's approval, this waits for it.
3895
4238
  * 2. Only then does the wallet ask Link for a card for exactly the approved
3896
- * amount at this merchant. The person approves it in Link. Pass
3897
- * onLinkApproval to get Link's approval page, so they can approve on the
3898
- * web without the Link app.
4239
+ * amount at this merchant. Conto records the Link request at once, so the
4240
+ * hold stays while the card may be usable. The person approves it in
4241
+ * Link. Pass onLinkApproval to get Link's approval page, so they can
4242
+ * approve on the web without the Link app.
3899
4243
  * 3. The card is returned. It never reaches Conto.
3900
4244
  *
3901
4245
  * Then fill in the card, call confirm(result.checkpoint, { amountMinor,
@@ -3908,7 +4252,9 @@ declare class CheckoutClient {
3908
4252
  * held spend and throws a LinkCardError. When Conto cannot cancel an open Link
3909
4253
  * request, it keeps the hold and throws LINK_CARD_NOT_CANCELLED with the
3910
4254
  * request id. Retrying with the same input resumes the same checkpoint and
3911
- * Link request.
4255
+ * Link request while Conto's approval is open. Once the stage is OUTCOME_UNKNOWN,
4256
+ * a retry throws CHECKOUT_CHECKPOINT_NOT_APPROVED: cancel the Link request, then
4257
+ * the checkpoint.
3912
4258
  */
3913
4259
  getLinkCard(input: GetLinkCardInput): Promise<LinkCardResult>;
3914
4260
  /**
@@ -3920,5 +4266,5 @@ declare class CheckoutClient {
3920
4266
  replaceLinkCard(previous: LinkCardResult, input: ReplaceLinkCardInput): Promise<LinkCardResult>;
3921
4267
  }
3922
4268
 
3923
- export { AdminPurchasingClient, BrowserActionFinalizationPendingError, BrowserCheckoutTargetVerificationError, CardsClient, CheckoutApprovalDeniedError, CheckoutApprovalExpiredError, CheckoutApprovalPendingError, CheckoutApprovalTimeoutError, CheckoutCheckpointClosedError, CheckoutClient, ConnectedCardsClient, Conto, ContoAdmin, ContoAdminError, ContoError, ControlledExternalCardPaymentTool, ExternalCardConfirmationPendingError, Conto as Giro, ContoError as GiroError, LinkCardCredential, LinkCardDeniedError, LinkCardError, LinkCardExpiredError, LinkCardTimeoutError, LinkWallet, LinkWalletUnavailableError, OrganizationPurchasesClient, OrganizationRecurringPurchasesClient, PurchasesClient, RecurringPurchasesClient, TestCardsClient, canonicalizeBrowserCheckoutTarget, createVerifiedBrowserCheckoutDriver, Conto as default, fingerprintBrowserCheckoutTarget, isFinalPurchaseStatus, parseServerSentEvents, verifyPurchaseWebhook };
3924
- export type { AdminExternalCardOverlayEnforcement, Agent, AgentCheckoutAction, AgentCheckoutActionKind, AgentExternalCard, AgentSetupResult, AgentStatus, AgentType, AgentWalletLink, ApprovedExternalCardExecution, AssignExternalCardInput, AssignedPolicy, AuthorizeCheckoutActionResult, BeginCheckoutCheckpointInput, BeginCommerceExecutionInput, BrowserActionClaimResult, BrowserActionDispatchObservationInput, BrowserActionFinalizeResult, BrowserCheckoutAction, BrowserCheckoutTargetResolver, BrowserCheckoutTargetSnapshot, BrowserCheckoutTargetVerificationCode, CancellationOutcome, CanonicalBrowserCheckoutTargetSnapshot, ChainType, CheckoutActionAuthorization, CheckoutCheckpoint, CheckoutCheckpointApproval, CheckoutCheckpointMethod, CheckoutCheckpointNextAction, CheckoutCheckpointStage, CheckoutOutcome, CheckoutPaymentReference, CommerceCheckoutMethod, CommerceContextRequirement, CommerceExecution, CommerceExecutionAdapterKind, CommerceExecutionArtifactKind, CommerceExecutionChannel, CommerceExecutionConstraint, CommerceExecutionConstraintCoverage, CommerceExecutionConstraintCoverageLevel, CommerceExecutionDeliveryMode, CommerceExecutionEvidence, CommerceExecutionProvider, CommerceExecutionResult, CommerceExecutionSourceKind, CommerceExecutionStatus, CommerceFactConfidence, CommerceFactProvenanceInput, CommerceFactSource, CommerceFulfillmentInput, CommerceLineItemInput, CommerceProposalFactKey, CommerceProposalMissingFact, CommerceProposalResolution, CommerceProposalState, CommerceSettlementRail, CommerceTotalInput, CommerceTotalType, ComparePolicyVersionsResponse, ConfirmCheckoutCheckpointInput, ConnectedCardBrief, ConnectedCardCredential, ConnectedCardDrawInput, ConnectedCardDrawMerchant, ConnectedCardDrawResult, ConnectedCardDrawable, ConnectedCardListResult, ConnectedCardMandate, ConnectedCardMandateMerchant, ConnectedCardOutcomeReport, ConnectedCardOutcomeReportResult, ConnectedCardReference, ContoAdminConfig, ContoConfig, ContoRequestOptions, ControlledExternalCardPaymentResult, CreateAgentInput, CreatePolicyInput, CreatePolicyRuleInput, CreatePurchaseInput, CreateSdkKeyInput, CreateSdkKeyResult, CreateWalletInput, CustodyType, CustomerCustodyMode, CustomerWalletControlModel, CustomerWalletKeyAccess, DelegationType, ExecuteCommerceExecutionResult, ExternalCard, ExternalCardApprovalInput, ExternalCardApprovalResult, ExternalCardConfirmationInput, ExternalCardConfirmationResult, ExternalCardExecutionClaimResult, ExternalCardExecutionResult, ExternalCardExecutor, ExternalCardOverlayEnforcement, ExternalCardRequestStatusResult, ExternalWalletApprovalInput, ExternalWalletApprovalResult, ExternalWalletConfirmationInput, ExternalWalletConfirmationResult, FreezeAgentInput, GetLinkCardInput, ContoConfig as GiroConfig, GuardCheckoutResult, GuardedBrowserDispatchResult, GuardedCheckoutInput, LinkApprovalCallback, LinkApprovalEvent, LinkCardResult, LinkWalletInput, ListAgentsParams, ListAgentsResponse, ListPoliciesParams, ListPoliciesResponse, ListPolicyVersionsResponse, ListWalletsParams, ListWalletsResponse, MppBudgetResult, MppPreAuthorizeInput, MppPreAuthorizeResult, MppRecordInput, MppRecordResult, NormalizeCommerceProposalInput, OrganizationMember, PaginatedResponse, PaginationParams, PauseExternalCardAssignmentResult, PaymentExecuteResult, PaymentRequestInput, PaymentRequestResult, PaymentStatusResult, Policy, PolicyRule, PolicyType, PolicyVersionChangeType, PolicyVersionDetail, PolicyVersionDiff, PolicyVersionFieldChange, PolicyVersionSnapshot, PolicyVersionSnapshotRule, PolicyVersionSummary, PrivilegedBrowserCheckoutDriver, ProtocolBudgetResult, ProtocolPreAuthorizeResult, ProtocolRecordGrant, ProtocolRecordGrantResult, ProtocolServiceSummary, ProtocolServicesResult, ProveWalletOwnershipInput, ProvisionWalletResult, Purchase, PurchaseAction, PurchaseActionAuthority, PurchaseActionKind, PurchaseAllowance, PurchaseBuyer, PurchaseBuyerCompanyCard, PurchaseBuyerCompanyCardLimits, PurchaseBuyerKitchenContext, PurchaseCompanyCard, PurchaseDelegation, PurchaseEvent, PurchaseEventPage, PurchaseEvidence, PurchaseGrocery, PurchaseGroceryItem, PurchaseGroceryList, PurchaseHostedLink, PurchaseItem, PurchaseKitchenContext, PurchaseKitchenInventoryItem, PurchaseKitchenListItem, PurchaseKitchenPreferences, PurchaseKitchenRecipe, PurchaseKitchenUsual, PurchaseList, PurchaseMoney, PurchasePaymentMethod, PurchasePhase, PurchaseRequest, PurchaseResponseAck, PurchaseStatus, PurchasingCapabilities, PurchasingSettings, RecurringPurchase, RecurringPurchaseCycleResult, RecurringPurchaseCycleStatus, RefreshBalanceResult, RegisterExternalCardInput, ReplaceLinkCardInput, ReportCheckoutOutcomeInput, RollbackPolicyVersionResponse, RuleAction, RuleOperator, RuleType, RunGuardedCheckoutResult, SdkKey, SdkKeyType, SetupCapabilityState, SetupCardDiagnostics, SetupDiagnosticAction, SetupDiagnosticIssue, SetupDiagnosticIssueCode, SetupDiagnostics, SetupWalletDiagnostics, TestCardCredential, TestCardDrawResult, TestCardDrawable, TestCardListResult, TestCardReceipt, TestCheckoutInput, TestCheckoutResult, TestMerchant, TestMerchantProduct, UnfreezeAgentInput, UpdateAgentInput, UpdateExternalCardAssignmentInput, UpdatePolicyInput, UpdatePolicyRuleInput, UpdateWalletInput, VerifiedBrowserCheckoutTarget, WaitForCheckoutApprovalOptions, Wallet, WalletChainBalanceSnapshot, WalletOwnershipChallenge, WalletOwnershipProof, WalletStatus, WalletType, WatchPurchaseOptions, X402Authorization, X402BudgetResult, X402PayInput, X402PayResult, X402PaymentRequirements, X402PreAuthorizeInput, X402PreAuthorizeResult, X402RecordInput, X402RecordResult };
4269
+ export { AdminPurchasingClient, AdminSpendingClient, BrowserActionFinalizationPendingError, BrowserCheckoutTargetVerificationError, CardsClient, CheckoutApprovalDeniedError, CheckoutApprovalExpiredError, CheckoutApprovalPendingError, CheckoutApprovalTimeoutError, CheckoutCheckpointClosedError, CheckoutClient, ConnectedCardsClient, Conto, ContoAdmin, ContoAdminError, ContoError, ControlledExternalCardPaymentTool, ExternalCardConfirmationPendingError, Conto as Giro, ContoError as GiroError, LinkCardCredential, LinkCardDeniedError, LinkCardError, LinkCardExpiredError, LinkCardTimeoutError, LinkWallet, LinkWalletUnavailableError, OrganizationPurchasesClient, OrganizationRecurringPurchasesClient, PurchasesClient, RecurringPurchasesClient, SpendingClient, TestCardsClient, canonicalizeBrowserCheckoutTarget, createVerifiedBrowserCheckoutDriver, Conto as default, fingerprintBrowserCheckoutTarget, isFinalPurchaseStatus, parseServerSentEvents, verifyPurchaseWebhook };
4270
+ export type { AdminExternalCardOverlayEnforcement, Agent, AgentCheckoutAction, AgentCheckoutActionKind, AgentExternalCard, AgentSetupResult, AgentStatus, AgentType, AgentWalletLink, ApprovedExternalCardExecution, AssignExternalCardInput, AssignedPolicy, AuthorizeCheckoutActionResult, BeginCheckoutCheckpointInput, BeginCommerceExecutionInput, BrowserActionClaimResult, BrowserActionDispatchObservationInput, BrowserActionFinalizeResult, BrowserCheckoutAction, BrowserCheckoutTargetResolver, BrowserCheckoutTargetSnapshot, BrowserCheckoutTargetVerificationCode, BudgetInput, BudgetSnapshot, CancellationOutcome, CanonicalBrowserCheckoutTargetSnapshot, ChainType, CheckoutActionAuthorization, CheckoutCheckpoint, CheckoutCheckpointApproval, CheckoutCheckpointMethod, CheckoutCheckpointNextAction, CheckoutCheckpointStage, CheckoutOutcome, CheckoutPaymentReference, CommerceCheckoutMethod, CommerceContextRequirement, CommerceExecution, CommerceExecutionAdapterKind, CommerceExecutionArtifactKind, CommerceExecutionChannel, CommerceExecutionConstraint, CommerceExecutionConstraintCoverage, CommerceExecutionConstraintCoverageLevel, CommerceExecutionDeliveryMode, CommerceExecutionEvidence, CommerceExecutionProvider, CommerceExecutionResult, CommerceExecutionSourceKind, CommerceExecutionStatus, CommerceFactConfidence, CommerceFactProvenanceInput, CommerceFactSource, CommerceFulfillmentInput, CommerceLineItemInput, CommerceProposalFactKey, CommerceProposalMissingFact, CommerceProposalResolution, CommerceProposalState, CommerceSettlementRail, CommerceTotalInput, CommerceTotalType, ComparePolicyVersionsResponse, ConfirmCheckoutCheckpointInput, ConnectedCardBrief, ConnectedCardCredential, ConnectedCardDrawInput, ConnectedCardDrawMerchant, ConnectedCardDrawResult, ConnectedCardDrawable, ConnectedCardListResult, ConnectedCardMandate, ConnectedCardMandateMerchant, ConnectedCardOutcomeReport, ConnectedCardOutcomeReportResult, ConnectedCardReference, ContoAdminConfig, ContoConfig, ContoRequestOptions, ControlledExternalCardPaymentResult, CreateAgentInput, CreatePolicyInput, CreatePolicyRuleInput, CreatePurchaseInput, CreateSdkKeyInput, CreateSdkKeyResult, CreateWalletInput, CustodyType, CustomerCustodyMode, CustomerWalletControlModel, CustomerWalletKeyAccess, DelegationType, DownloadBytes, ExecuteCommerceExecutionResult, ExternalCard, ExternalCardApprovalInput, ExternalCardApprovalResult, ExternalCardConfirmationInput, ExternalCardConfirmationResult, ExternalCardExecutionClaimResult, ExternalCardExecutionResult, ExternalCardExecutor, ExternalCardOverlayEnforcement, ExternalCardRequestStatusResult, ExternalWalletApprovalInput, ExternalWalletApprovalResult, ExternalWalletConfirmationInput, ExternalWalletConfirmationResult, FreezeAgentInput, GetLinkCardInput, ContoConfig as GiroConfig, GuardCheckoutResult, GuardedBrowserDispatchResult, GuardedCheckoutInput, LinkApprovalCallback, LinkApprovalEvent, LinkCardResult, LinkWalletInput, ListAgentsParams, ListAgentsResponse, ListPoliciesParams, ListPoliciesResponse, ListPolicyVersionsResponse, ListWalletsParams, ListWalletsResponse, MppBudgetResult, MppPreAuthorizeInput, MppPreAuthorizeResult, MppRecordInput, MppRecordResult, NormalizeCommerceProposalInput, OrganizationMember, PaginatedResponse, PaginationParams, PauseExternalCardAssignmentResult, PaymentExecuteResult, PaymentRequestInput, PaymentRequestResult, PaymentStatusResult, Policy, PolicyRule, PolicyType, PolicyVersionChangeType, PolicyVersionDetail, PolicyVersionDiff, PolicyVersionFieldChange, PolicyVersionSnapshot, PolicyVersionSnapshotRule, PolicyVersionSummary, PreviewInput, PrivilegedBrowserCheckoutDriver, ProtocolBudgetResult, ProtocolPreAuthorizeResult, ProtocolRecordGrant, ProtocolRecordGrantResult, ProtocolServiceSummary, ProtocolServicesResult, ProveWalletOwnershipInput, ProvisionWalletResult, Purchase, PurchaseAction, PurchaseActionAuthority, PurchaseActionKind, PurchaseAllowance, PurchaseBuyer, PurchaseBuyerCompanyCard, PurchaseBuyerCompanyCardLimits, PurchaseBuyerKitchenContext, PurchaseCompanyCard, PurchaseDelegation, PurchaseDetail, PurchaseEvent, PurchaseEventPage, PurchaseEvidence, PurchaseGrocery, PurchaseGroceryItem, PurchaseGroceryList, PurchaseHostedLink, PurchaseItem, PurchaseKitchenContext, PurchaseKitchenInventoryItem, PurchaseKitchenListItem, PurchaseKitchenPreferences, PurchaseKitchenRecipe, PurchaseKitchenUsual, PurchaseList, PurchaseMoney, PurchasePaymentMethod, PurchasePhase, PurchaseRequest, PurchaseResponseAck, PurchaseSnapshot, PurchaseStatus, PurchasingCapabilities, PurchasingSettings, RecurringPurchase, RecurringPurchaseCycleResult, RecurringPurchaseCycleStatus, RefreshBalanceResult, RegisterExternalCardInput, ReplaceLinkCardInput, ReportCheckoutOutcomeInput, RollbackPolicyVersionResponse, RuleAction, RuleOperator, RuleType, RunGuardedCheckoutResult, SdkKey, SdkKeyType, SetupCapabilityState, SetupCardDiagnostics, SetupDiagnosticAction, SetupDiagnosticIssue, SetupDiagnosticIssueCode, SetupDiagnostics, SetupWalletDiagnostics, SpendingRequester, TaskInput, TaskSnapshot, TestCardCredential, TestCardDrawResult, TestCardDrawable, TestCardListResult, TestCardReceipt, TestCheckoutInput, TestCheckoutResult, TestMerchant, TestMerchantProduct, UnfreezeAgentInput, UpdateAgentInput, UpdateExternalCardAssignmentInput, UpdatePolicyInput, UpdatePolicyRuleInput, UpdateWalletInput, VerifiedBrowserCheckoutTarget, WaitForCheckoutApprovalOptions, Wallet, WalletChainBalanceSnapshot, WalletOwnershipChallenge, WalletOwnershipProof, WalletStatus, WalletType, WatchPurchaseOptions, X402Authorization, X402BudgetResult, X402PayInput, X402PayResult, X402PaymentRequirements, X402PreAuthorizeInput, X402PreAuthorizeResult, X402RecordInput, X402RecordResult };