@1claw/sdk 0.41.2 → 0.41.4

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.
@@ -4017,6 +4017,12 @@ export interface paths {
4017
4017
  * Approve or reject
4018
4018
  * @description Submit a decision (approve or reject) for a pending approval.
4019
4019
  * Human-only. The approval must be in `pending` status.
4020
+ * For `card_order` approvals, approving auto-executes the x402 payment;
4021
+ * rejecting marks the card as `rejected`.
4022
+ * Risk tier 2+ approvals require step-up authentication via
4023
+ * `X-Auth-Confirm` (account password or `rat_` re-auth token from
4024
+ * `POST /v1/auth/reauth/begin` + `complete`). Risk tier 3 requires
4025
+ * passkey or TOTP re-auth token.
4020
4026
  */
4021
4027
  post: operations["decideApproval"];
4022
4028
  delete?: never;
@@ -4025,6 +4031,29 @@ export interface paths {
4025
4031
  patch?: never;
4026
4032
  trace?: never;
4027
4033
  };
4034
+ "/v1/approvals/quick-decide": {
4035
+ parameters: {
4036
+ query?: never;
4037
+ header?: never;
4038
+ path?: never;
4039
+ cookie?: never;
4040
+ };
4041
+ /**
4042
+ * One-click approve or deny (email link)
4043
+ * @description Public endpoint (no Bearer auth). The `token` query param is the
4044
+ * authenticator — SHA-256 hashed, single-use, 7-day TTL. On success
4045
+ * redirects to `{public_url}/approvals/{id}?decided=true`.
4046
+ * Auto-executes approved `card_order` and `policy_change` actions.
4047
+ */
4048
+ get: operations["quickDecideApproval"];
4049
+ put?: never;
4050
+ post?: never;
4051
+ delete?: never;
4052
+ options?: never;
4053
+ head?: never;
4054
+ patch?: never;
4055
+ trace?: never;
4056
+ };
4028
4057
  "/v1/deposit-destinations": {
4029
4058
  parameters: {
4030
4059
  query?: never;
@@ -4506,10 +4535,262 @@ export interface paths {
4506
4535
  patch?: never;
4507
4536
  trace?: never;
4508
4537
  };
4538
+ "/v1/agents/{agent_id}/cards/order": {
4539
+ parameters: {
4540
+ query?: never;
4541
+ header?: never;
4542
+ path?: never;
4543
+ cookie?: never;
4544
+ };
4545
+ get?: never;
4546
+ put?: never;
4547
+ /**
4548
+ * Order a payment card (x402)
4549
+ * @description Order a prepaid or gift card for an agent. Drives the x402 payment flow server-side using the agent's Ethereum signing key (funded with USDC on Base). Requires `cards_enabled` on the agent and a Pro or higher plan. An `Idempotency-Key` header is required. When `card_require_approval` is true (default), the order is held in `awaiting_approval` until a human approves via the dashboard, mobile app, or email one-click link; payment runs only after approval.
4550
+ */
4551
+ post: operations["orderCard"];
4552
+ delete?: never;
4553
+ options?: never;
4554
+ head?: never;
4555
+ patch?: never;
4556
+ trace?: never;
4557
+ };
4558
+ "/v1/cards": {
4559
+ parameters: {
4560
+ query?: never;
4561
+ header?: never;
4562
+ path?: never;
4563
+ cookie?: never;
4564
+ };
4565
+ /**
4566
+ * List payment cards
4567
+ * @description List cards for the caller (agents see only their own). Always masked (last4 only).
4568
+ */
4569
+ get: operations["listCards"];
4570
+ put?: never;
4571
+ post?: never;
4572
+ delete?: never;
4573
+ options?: never;
4574
+ head?: never;
4575
+ patch?: never;
4576
+ trace?: never;
4577
+ };
4578
+ "/v1/cards/import": {
4579
+ parameters: {
4580
+ query?: never;
4581
+ header?: never;
4582
+ path?: never;
4583
+ cookie?: never;
4584
+ };
4585
+ get?: never;
4586
+ put?: never;
4587
+ /**
4588
+ * Import a card (human-only)
4589
+ * @description Manually import an existing card. Full storage mode — PAN stored encrypted, CVV as a one-time-read secret. Human-only.
4590
+ */
4591
+ post: operations["importCard"];
4592
+ delete?: never;
4593
+ options?: never;
4594
+ head?: never;
4595
+ patch?: never;
4596
+ trace?: never;
4597
+ };
4598
+ "/v1/cards/gift-cards/search": {
4599
+ parameters: {
4600
+ query?: never;
4601
+ header?: never;
4602
+ path?: never;
4603
+ cookie?: never;
4604
+ };
4605
+ get?: never;
4606
+ put?: never;
4607
+ /**
4608
+ * Search gift-card brands
4609
+ * @description Search available Laso gift-card brands/servers for the org's Laso account.
4610
+ */
4611
+ post: operations["searchGiftCards"];
4612
+ delete?: never;
4613
+ options?: never;
4614
+ head?: never;
4615
+ patch?: never;
4616
+ trace?: never;
4617
+ };
4618
+ "/v1/cards/{card_id}": {
4619
+ parameters: {
4620
+ query?: never;
4621
+ header?: never;
4622
+ path?: never;
4623
+ cookie?: never;
4624
+ };
4625
+ /**
4626
+ * Get a payment card
4627
+ * @description Get a single card (masked — last4 only).
4628
+ */
4629
+ get: operations["getCard"];
4630
+ put?: never;
4631
+ post?: never;
4632
+ delete?: never;
4633
+ options?: never;
4634
+ head?: never;
4635
+ /** Update a card's reveal policy (human-only) */
4636
+ patch: operations["updateCard"];
4637
+ trace?: never;
4638
+ };
4639
+ "/v1/cards/{card_id}/reveal": {
4640
+ parameters: {
4641
+ query?: never;
4642
+ header?: never;
4643
+ path?: never;
4644
+ cookie?: never;
4645
+ };
4646
+ get?: never;
4647
+ put?: never;
4648
+ /**
4649
+ * Reveal card details
4650
+ * @description Reveal full card details (PAN/CVV or gift-card redemption). Humans must re-authenticate with their account password via the `X-Auth-Confirm` header. Agents may reveal only when a human has enabled a per-card reveal policy. Once revealed, the card can be used anywhere up to its balance — 1Claw has no further control.
4651
+ */
4652
+ post: operations["revealCard"];
4653
+ delete?: never;
4654
+ options?: never;
4655
+ head?: never;
4656
+ patch?: never;
4657
+ trace?: never;
4658
+ };
4659
+ "/v1/cards/{card_id}/void": {
4660
+ parameters: {
4661
+ query?: never;
4662
+ header?: never;
4663
+ path?: never;
4664
+ cookie?: never;
4665
+ };
4666
+ get?: never;
4667
+ put?: never;
4668
+ /**
4669
+ * Void a card
4670
+ * @description 1Claw-level lock that blocks all further reveals/refreshes. Forward-looking only — a card revealed before void remains live.
4671
+ */
4672
+ post: operations["voidCard"];
4673
+ delete?: never;
4674
+ options?: never;
4675
+ head?: never;
4676
+ patch?: never;
4677
+ trace?: never;
4678
+ };
4679
+ "/v1/cards/{card_id}/refresh": {
4680
+ parameters: {
4681
+ query?: never;
4682
+ header?: never;
4683
+ path?: never;
4684
+ cookie?: never;
4685
+ };
4686
+ get?: never;
4687
+ put?: never;
4688
+ /**
4689
+ * Refresh a card's balance
4690
+ * @description Proxy Laso refresh to update balance/status. Rate-limited to once per 5 minutes per card (429 on exceed).
4691
+ */
4692
+ post: operations["refreshCard"];
4693
+ delete?: never;
4694
+ options?: never;
4695
+ head?: never;
4696
+ patch?: never;
4697
+ trace?: never;
4698
+ };
4509
4699
  }
4510
4700
  export type webhooks = Record<string, never>;
4511
4701
  export interface components {
4512
4702
  schemas: {
4703
+ OrderCardRequest: {
4704
+ /** @enum {string} */
4705
+ kind: "prepaid" | "gift_card";
4706
+ /**
4707
+ * @description USD amount to load onto the card.
4708
+ * @example 25.00
4709
+ */
4710
+ amount_usd: string;
4711
+ /** @description Optional Laso gift-card server/brand id (gift cards only). */
4712
+ laso_server_id?: string;
4713
+ /** @description Optional country (prepaid cards; defaults to US). */
4714
+ country?: string;
4715
+ };
4716
+ /** @description Masked card view — never contains PAN/CVV. */
4717
+ CardResponse: {
4718
+ /** Format: uuid */
4719
+ id: string;
4720
+ /** Format: uuid */
4721
+ agent_id?: string | null;
4722
+ /** @enum {string} */
4723
+ issuer: "laso" | "manual";
4724
+ /** @enum {string} */
4725
+ kind: "prepaid" | "gift_card";
4726
+ brand?: string;
4727
+ last4?: string;
4728
+ exp_month?: number;
4729
+ exp_year?: number;
4730
+ currency: string;
4731
+ order_amount_usd?: string;
4732
+ balance?: string;
4733
+ /** @enum {string} */
4734
+ status: "ordering" | "pending" | "ready" | "depleted" | "expired" | "voided" | "orphaned_payment" | "awaiting_approval" | "rejected";
4735
+ /** @enum {string} */
4736
+ storage_mode: "reference" | "full";
4737
+ reveal_policy: {
4738
+ [key: string]: unknown;
4739
+ };
4740
+ /**
4741
+ * Format: uuid
4742
+ * @description Linked approval when status is awaiting_approval
4743
+ */
4744
+ approval_id?: string;
4745
+ /** Format: date-time */
4746
+ void_after?: string;
4747
+ /** Format: date-time */
4748
+ created_at: string;
4749
+ /** Format: date-time */
4750
+ updated_at: string;
4751
+ };
4752
+ CardListResponse: {
4753
+ cards: components["schemas"]["CardResponse"][];
4754
+ };
4755
+ /** @description Revealed card details — sensitive. Returned only by the reveal endpoint. */
4756
+ CardRevealResponse: {
4757
+ /** Format: uuid */
4758
+ id: string;
4759
+ pan?: string;
4760
+ cvv?: string;
4761
+ exp_month?: number;
4762
+ exp_year?: number;
4763
+ brand?: string;
4764
+ /** @description Gift-card redemption payload (URL/code/PIN) when applicable. */
4765
+ redemption?: {
4766
+ [key: string]: unknown;
4767
+ };
4768
+ disclaimer: string;
4769
+ };
4770
+ /** @description Human-settable per-card reveal policy + lifecycle controls. */
4771
+ UpdateCardRequest: {
4772
+ agent_reveal?: boolean;
4773
+ max_reveals?: number;
4774
+ /** Format: date-time */
4775
+ reveal_expires_at?: string | null;
4776
+ /** Format: date-time */
4777
+ void_after?: string | null;
4778
+ };
4779
+ ImportCardRequest: {
4780
+ pan: string;
4781
+ cvv: string;
4782
+ exp_month: number;
4783
+ exp_year: number;
4784
+ brand?: string;
4785
+ currency?: string;
4786
+ balance?: string;
4787
+ /** Format: uuid */
4788
+ agent_id?: string;
4789
+ };
4790
+ SearchGiftCardsRequest: {
4791
+ query?: string;
4792
+ country?: string;
4793
+ };
4513
4794
  /** @description RFC 7807 error envelope */
4514
4795
  ProblemDetails: {
4515
4796
  type?: string;
@@ -5047,6 +5328,21 @@ export interface components {
5047
5328
  } | null;
5048
5329
  /** @description Solana wallet addresses whose ATAs may be created. Empty = unrestricted. */
5049
5330
  solana_ata_allowlist?: string[];
5331
+ /** @description Whether this agent may order payment cards (x402 card ordering). Pro+ tier. */
5332
+ cards_enabled?: boolean;
5333
+ /** @description Maximum USD amount for a single card order. */
5334
+ card_max_order_usd?: string;
5335
+ /** @description Maximum cumulative USD spent ordering cards per rolling 24h window. */
5336
+ card_daily_limit_usd?: string;
5337
+ /** @description Allowed x402 payTo recipients for card orders (empty = built-in Laso recipients). */
5338
+ card_payto_allowlist?: string[];
5339
+ /** @description Whether agents may reveal card details subject to per-card reveal policy. */
5340
+ card_reveal_enabled?: boolean;
5341
+ /**
5342
+ * @description When true, card orders route through the human approval queue before x402 payment.
5343
+ * @default true
5344
+ */
5345
+ card_require_approval: boolean;
5050
5346
  /**
5051
5347
  * Format: date-time
5052
5348
  * @description Optional expiration time for the agent's API key.
@@ -5099,6 +5395,18 @@ export interface components {
5099
5395
  } | null;
5100
5396
  /** @description Solana wallet addresses whose ATAs may be created. */
5101
5397
  solana_ata_allowlist?: string[];
5398
+ /** @description Whether this agent may order payment cards (x402 card ordering). Pro+ tier. */
5399
+ cards_enabled?: boolean;
5400
+ /** @description Maximum USD amount for a single card order. null clears. */
5401
+ card_max_order_usd?: string | null;
5402
+ /** @description Maximum cumulative USD spent ordering cards per rolling 24h window. null clears. */
5403
+ card_daily_limit_usd?: string | null;
5404
+ /** @description Allowed x402 payTo recipients for card orders (empty = built-in Laso recipients). */
5405
+ card_payto_allowlist?: string[];
5406
+ /** @description Whether agents may reveal card details subject to per-card reveal policy. */
5407
+ card_reveal_enabled?: boolean;
5408
+ /** @description When true, card orders route through the human approval queue before x402 payment. */
5409
+ card_require_approval?: boolean;
5102
5410
  /**
5103
5411
  * @description Enable OIDC federation (RFC 8693 token-exchange) for this agent.
5104
5412
  * When true, the agent may call POST /v1/auth/federated-token to mint
@@ -5206,6 +5514,18 @@ export interface components {
5206
5514
  } | null;
5207
5515
  /** @description Solana wallet addresses whose ATAs may be created. */
5208
5516
  solana_ata_allowlist?: string[];
5517
+ /** @description Whether this agent may order payment cards (x402 card ordering). */
5518
+ cards_enabled?: boolean;
5519
+ /** @description Maximum USD amount for a single card order. */
5520
+ card_max_order_usd?: string;
5521
+ /** @description Maximum cumulative USD spent ordering cards per rolling 24h window. */
5522
+ card_daily_limit_usd?: string;
5523
+ /** @description Allowed x402 payTo recipients for card orders (empty = built-in Laso recipients). */
5524
+ card_payto_allowlist?: string[];
5525
+ /** @description Whether agents may reveal card details subject to per-card reveal policy. */
5526
+ card_reveal_enabled?: boolean;
5527
+ /** @description When true, card orders route through the human approval queue before x402 payment. */
5528
+ card_require_approval?: boolean;
5209
5529
  /** @description Today's transaction count (UTC calendar day). Present when intents_api_enabled. */
5210
5530
  tx_count_today?: number;
5211
5531
  /** @description Today's overhead spend by chain in native units. */
@@ -7494,6 +7814,7 @@ export interface components {
7494
7814
  SecretPath: string;
7495
7815
  AgentId: string;
7496
7816
  PolicyId: string;
7817
+ CardId: string;
7497
7818
  /** @description Set to `true` or `1` to include the raw signed transaction hex in the response. Omitted by default to reduce key exfiltration risk. Only the literal values "true" or "1" enable inclusion; any other value or omission returns responses without signed_tx. Applies to GET /v1/agents/{agent_id}/transactions and GET /v1/agents/{agent_id}/transactions/{tx_id}. */
7498
7819
  IncludeSignedTx: boolean;
7499
7820
  };
@@ -12410,6 +12731,30 @@ export interface operations {
12410
12731
  409: components["responses"]["Conflict"];
12411
12732
  };
12412
12733
  };
12734
+ quickDecideApproval: {
12735
+ parameters: {
12736
+ query: {
12737
+ token: string;
12738
+ decision: "approved" | "rejected";
12739
+ };
12740
+ header?: never;
12741
+ path?: never;
12742
+ cookie?: never;
12743
+ };
12744
+ requestBody?: never;
12745
+ responses: {
12746
+ /** @description Redirect to dashboard confirmation page */
12747
+ 302: {
12748
+ headers: {
12749
+ [name: string]: unknown;
12750
+ };
12751
+ content?: never;
12752
+ };
12753
+ 400: components["responses"]["BadRequest"];
12754
+ 404: components["responses"]["NotFound"];
12755
+ 409: components["responses"]["Conflict"];
12756
+ };
12757
+ };
12413
12758
  listDepositDestinations: {
12414
12759
  parameters: {
12415
12760
  query?: never;
@@ -13246,5 +13591,257 @@ export interface operations {
13246
13591
  403: components["responses"]["Forbidden"];
13247
13592
  };
13248
13593
  };
13594
+ orderCard: {
13595
+ parameters: {
13596
+ query?: never;
13597
+ header: {
13598
+ "Idempotency-Key": string;
13599
+ };
13600
+ path: {
13601
+ agent_id: components["parameters"]["AgentId"];
13602
+ };
13603
+ cookie?: never;
13604
+ };
13605
+ requestBody: {
13606
+ content: {
13607
+ "application/json": components["schemas"]["OrderCardRequest"];
13608
+ };
13609
+ };
13610
+ responses: {
13611
+ /** @description Idempotent replay of a prior order */
13612
+ 200: {
13613
+ headers: {
13614
+ [name: string]: unknown;
13615
+ };
13616
+ content: {
13617
+ "application/json": components["schemas"]["CardResponse"];
13618
+ };
13619
+ };
13620
+ /** @description Card order accepted and payment submitted (status pending) */
13621
+ 201: {
13622
+ headers: {
13623
+ [name: string]: unknown;
13624
+ };
13625
+ content: {
13626
+ "application/json": components["schemas"]["CardResponse"];
13627
+ };
13628
+ };
13629
+ /** @description Card order queued for human approval (status awaiting_approval) */
13630
+ 202: {
13631
+ headers: {
13632
+ [name: string]: unknown;
13633
+ };
13634
+ content: {
13635
+ "application/json": components["schemas"]["CardResponse"];
13636
+ };
13637
+ };
13638
+ 400: components["responses"]["BadRequest"];
13639
+ 403: components["responses"]["Forbidden"];
13640
+ 409: components["responses"]["Conflict"];
13641
+ };
13642
+ };
13643
+ listCards: {
13644
+ parameters: {
13645
+ query?: never;
13646
+ header?: never;
13647
+ path?: never;
13648
+ cookie?: never;
13649
+ };
13650
+ requestBody?: never;
13651
+ responses: {
13652
+ /** @description Card list */
13653
+ 200: {
13654
+ headers: {
13655
+ [name: string]: unknown;
13656
+ };
13657
+ content: {
13658
+ "application/json": components["schemas"]["CardListResponse"];
13659
+ };
13660
+ };
13661
+ };
13662
+ };
13663
+ importCard: {
13664
+ parameters: {
13665
+ query?: never;
13666
+ header?: never;
13667
+ path?: never;
13668
+ cookie?: never;
13669
+ };
13670
+ requestBody: {
13671
+ content: {
13672
+ "application/json": components["schemas"]["ImportCardRequest"];
13673
+ };
13674
+ };
13675
+ responses: {
13676
+ /** @description Card imported */
13677
+ 201: {
13678
+ headers: {
13679
+ [name: string]: unknown;
13680
+ };
13681
+ content: {
13682
+ "application/json": components["schemas"]["CardResponse"];
13683
+ };
13684
+ };
13685
+ 400: components["responses"]["BadRequest"];
13686
+ 403: components["responses"]["Forbidden"];
13687
+ };
13688
+ };
13689
+ searchGiftCards: {
13690
+ parameters: {
13691
+ query?: never;
13692
+ header?: never;
13693
+ path?: never;
13694
+ cookie?: never;
13695
+ };
13696
+ requestBody?: {
13697
+ content: {
13698
+ "application/json": components["schemas"]["SearchGiftCardsRequest"];
13699
+ };
13700
+ };
13701
+ responses: {
13702
+ /** @description Available gift-card brands (provider-shaped payload) */
13703
+ 200: {
13704
+ headers: {
13705
+ [name: string]: unknown;
13706
+ };
13707
+ content: {
13708
+ "application/json": {
13709
+ [key: string]: unknown;
13710
+ };
13711
+ };
13712
+ };
13713
+ };
13714
+ };
13715
+ getCard: {
13716
+ parameters: {
13717
+ query?: never;
13718
+ header?: never;
13719
+ path: {
13720
+ card_id: components["parameters"]["CardId"];
13721
+ };
13722
+ cookie?: never;
13723
+ };
13724
+ requestBody?: never;
13725
+ responses: {
13726
+ /** @description Card details */
13727
+ 200: {
13728
+ headers: {
13729
+ [name: string]: unknown;
13730
+ };
13731
+ content: {
13732
+ "application/json": components["schemas"]["CardResponse"];
13733
+ };
13734
+ };
13735
+ 404: components["responses"]["NotFound"];
13736
+ };
13737
+ };
13738
+ updateCard: {
13739
+ parameters: {
13740
+ query?: never;
13741
+ header?: never;
13742
+ path: {
13743
+ card_id: components["parameters"]["CardId"];
13744
+ };
13745
+ cookie?: never;
13746
+ };
13747
+ requestBody: {
13748
+ content: {
13749
+ "application/json": components["schemas"]["UpdateCardRequest"];
13750
+ };
13751
+ };
13752
+ responses: {
13753
+ /** @description Card updated */
13754
+ 200: {
13755
+ headers: {
13756
+ [name: string]: unknown;
13757
+ };
13758
+ content: {
13759
+ "application/json": components["schemas"]["CardResponse"];
13760
+ };
13761
+ };
13762
+ 403: components["responses"]["Forbidden"];
13763
+ 404: components["responses"]["NotFound"];
13764
+ };
13765
+ };
13766
+ revealCard: {
13767
+ parameters: {
13768
+ query?: never;
13769
+ header?: {
13770
+ /** @description Account password (humans) for re-authentication. */
13771
+ "X-Auth-Confirm"?: string;
13772
+ };
13773
+ path: {
13774
+ card_id: components["parameters"]["CardId"];
13775
+ };
13776
+ cookie?: never;
13777
+ };
13778
+ requestBody?: never;
13779
+ responses: {
13780
+ /** @description Revealed card details (sensitive) */
13781
+ 200: {
13782
+ headers: {
13783
+ [name: string]: unknown;
13784
+ };
13785
+ content: {
13786
+ "application/json": components["schemas"]["CardRevealResponse"];
13787
+ };
13788
+ };
13789
+ 403: components["responses"]["Forbidden"];
13790
+ 404: components["responses"]["NotFound"];
13791
+ };
13792
+ };
13793
+ voidCard: {
13794
+ parameters: {
13795
+ query?: never;
13796
+ header?: never;
13797
+ path: {
13798
+ card_id: components["parameters"]["CardId"];
13799
+ };
13800
+ cookie?: never;
13801
+ };
13802
+ requestBody?: never;
13803
+ responses: {
13804
+ /** @description Card voided */
13805
+ 200: {
13806
+ headers: {
13807
+ [name: string]: unknown;
13808
+ };
13809
+ content: {
13810
+ "application/json": components["schemas"]["CardResponse"];
13811
+ };
13812
+ };
13813
+ 404: components["responses"]["NotFound"];
13814
+ };
13815
+ };
13816
+ refreshCard: {
13817
+ parameters: {
13818
+ query?: never;
13819
+ header?: never;
13820
+ path: {
13821
+ card_id: components["parameters"]["CardId"];
13822
+ };
13823
+ cookie?: never;
13824
+ };
13825
+ requestBody?: never;
13826
+ responses: {
13827
+ /** @description Card refreshed */
13828
+ 200: {
13829
+ headers: {
13830
+ [name: string]: unknown;
13831
+ };
13832
+ content: {
13833
+ "application/json": components["schemas"]["CardResponse"];
13834
+ };
13835
+ };
13836
+ 404: components["responses"]["NotFound"];
13837
+ /** @description Refreshed too recently */
13838
+ 429: {
13839
+ headers: {
13840
+ [name: string]: unknown;
13841
+ };
13842
+ content?: never;
13843
+ };
13844
+ };
13845
+ };
13249
13846
  }
13250
13847
  //# sourceMappingURL=api-types.d.ts.map