@1claw/sdk 0.41.3 → 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;
@@ -4517,7 +4546,7 @@ export interface paths {
4517
4546
  put?: never;
4518
4547
  /**
4519
4548
  * Order a payment card (x402)
4520
- * @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.
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.
4521
4550
  */
4522
4551
  post: operations["orderCard"];
4523
4552
  delete?: never;
@@ -4702,12 +4731,17 @@ export interface components {
4702
4731
  order_amount_usd?: string;
4703
4732
  balance?: string;
4704
4733
  /** @enum {string} */
4705
- status: "ordering" | "pending" | "ready" | "depleted" | "expired" | "voided" | "orphaned_payment";
4734
+ status: "ordering" | "pending" | "ready" | "depleted" | "expired" | "voided" | "orphaned_payment" | "awaiting_approval" | "rejected";
4706
4735
  /** @enum {string} */
4707
4736
  storage_mode: "reference" | "full";
4708
4737
  reveal_policy: {
4709
4738
  [key: string]: unknown;
4710
4739
  };
4740
+ /**
4741
+ * Format: uuid
4742
+ * @description Linked approval when status is awaiting_approval
4743
+ */
4744
+ approval_id?: string;
4711
4745
  /** Format: date-time */
4712
4746
  void_after?: string;
4713
4747
  /** Format: date-time */
@@ -5304,6 +5338,11 @@ export interface components {
5304
5338
  card_payto_allowlist?: string[];
5305
5339
  /** @description Whether agents may reveal card details subject to per-card reveal policy. */
5306
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;
5307
5346
  /**
5308
5347
  * Format: date-time
5309
5348
  * @description Optional expiration time for the agent's API key.
@@ -5366,6 +5405,8 @@ export interface components {
5366
5405
  card_payto_allowlist?: string[];
5367
5406
  /** @description Whether agents may reveal card details subject to per-card reveal policy. */
5368
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;
5369
5410
  /**
5370
5411
  * @description Enable OIDC federation (RFC 8693 token-exchange) for this agent.
5371
5412
  * When true, the agent may call POST /v1/auth/federated-token to mint
@@ -5483,6 +5524,8 @@ export interface components {
5483
5524
  card_payto_allowlist?: string[];
5484
5525
  /** @description Whether agents may reveal card details subject to per-card reveal policy. */
5485
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;
5486
5529
  /** @description Today's transaction count (UTC calendar day). Present when intents_api_enabled. */
5487
5530
  tx_count_today?: number;
5488
5531
  /** @description Today's overhead spend by chain in native units. */
@@ -12688,6 +12731,30 @@ export interface operations {
12688
12731
  409: components["responses"]["Conflict"];
12689
12732
  };
12690
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
+ };
12691
12758
  listDepositDestinations: {
12692
12759
  parameters: {
12693
12760
  query?: never;
@@ -13541,7 +13608,16 @@ export interface operations {
13541
13608
  };
13542
13609
  };
13543
13610
  responses: {
13544
- /** @description Card order accepted (status pending) */
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) */
13545
13621
  201: {
13546
13622
  headers: {
13547
13623
  [name: string]: unknown;
@@ -13550,6 +13626,15 @@ export interface operations {
13550
13626
  "application/json": components["schemas"]["CardResponse"];
13551
13627
  };
13552
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
+ };
13553
13638
  400: components["responses"]["BadRequest"];
13554
13639
  403: components["responses"]["Forbidden"];
13555
13640
  409: components["responses"]["Conflict"];