@1claw/openapi-spec 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.
package/openapi.json CHANGED
@@ -8630,7 +8630,7 @@
8630
8630
  "Approvals"
8631
8631
  ],
8632
8632
  "summary": "Approve or reject",
8633
- "description": "Submit a decision (approve or reject) for a pending approval.\nHuman-only. The approval must be in `pending` status.\n",
8633
+ "description": "Submit a decision (approve or reject) for a pending approval.\nHuman-only. The approval must be in `pending` status.\nFor `card_order` approvals, approving auto-executes the x402 payment;\nrejecting marks the card as `rejected`.\nRisk tier 2+ approvals require step-up authentication via\n`X-Auth-Confirm` (account password or `rat_` re-auth token from\n`POST /v1/auth/reauth/begin` + `complete`). Risk tier 3 requires\npasskey or TOTP re-auth token.\n",
8634
8634
  "operationId": "decideApproval",
8635
8635
  "parameters": [
8636
8636
  {
@@ -8676,6 +8676,52 @@
8676
8676
  }
8677
8677
  }
8678
8678
  },
8679
+ "/v1/approvals/quick-decide": {
8680
+ "get": {
8681
+ "tags": [
8682
+ "Approvals"
8683
+ ],
8684
+ "summary": "One-click approve or deny (email link)",
8685
+ "description": "Public endpoint (no Bearer auth). The `token` query param is the\nauthenticator — SHA-256 hashed, single-use, 7-day TTL. On success\nredirects to `{public_url}/approvals/{id}?decided=true`.\nAuto-executes approved `card_order` and `policy_change` actions.\n",
8686
+ "operationId": "quickDecideApproval",
8687
+ "parameters": [
8688
+ {
8689
+ "name": "token",
8690
+ "in": "query",
8691
+ "required": true,
8692
+ "schema": {
8693
+ "type": "string"
8694
+ }
8695
+ },
8696
+ {
8697
+ "name": "decision",
8698
+ "in": "query",
8699
+ "required": true,
8700
+ "schema": {
8701
+ "type": "string",
8702
+ "enum": [
8703
+ "approved",
8704
+ "rejected"
8705
+ ]
8706
+ }
8707
+ }
8708
+ ],
8709
+ "responses": {
8710
+ "302": {
8711
+ "description": "Redirect to dashboard confirmation page"
8712
+ },
8713
+ "400": {
8714
+ "$ref": "#/components/responses/BadRequest"
8715
+ },
8716
+ "404": {
8717
+ "$ref": "#/components/responses/NotFound"
8718
+ },
8719
+ "409": {
8720
+ "$ref": "#/components/responses/Conflict"
8721
+ }
8722
+ }
8723
+ }
8724
+ },
8679
8725
  "/v1/deposit-destinations": {
8680
8726
  "post": {
8681
8727
  "tags": [
@@ -9968,7 +10014,7 @@
9968
10014
  "Payment Cards"
9969
10015
  ],
9970
10016
  "summary": "Order a payment card (x402)",
9971
- "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.\n",
10017
+ "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.\n",
9972
10018
  "operationId": "orderCard",
9973
10019
  "parameters": [
9974
10020
  {
@@ -9994,8 +10040,28 @@
9994
10040
  }
9995
10041
  },
9996
10042
  "responses": {
10043
+ "200": {
10044
+ "description": "Idempotent replay of a prior order",
10045
+ "content": {
10046
+ "application/json": {
10047
+ "schema": {
10048
+ "$ref": "#/components/schemas/CardResponse"
10049
+ }
10050
+ }
10051
+ }
10052
+ },
9997
10053
  "201": {
9998
- "description": "Card order accepted (status pending)",
10054
+ "description": "Card order accepted and payment submitted (status pending)",
10055
+ "content": {
10056
+ "application/json": {
10057
+ "schema": {
10058
+ "$ref": "#/components/schemas/CardResponse"
10059
+ }
10060
+ }
10061
+ }
10062
+ },
10063
+ "202": {
10064
+ "description": "Card order queued for human approval (status awaiting_approval)",
9999
10065
  "content": {
10000
10066
  "application/json": {
10001
10067
  "schema": {
@@ -10516,7 +10582,9 @@
10516
10582
  "depleted",
10517
10583
  "expired",
10518
10584
  "voided",
10519
- "orphaned_payment"
10585
+ "orphaned_payment",
10586
+ "awaiting_approval",
10587
+ "rejected"
10520
10588
  ]
10521
10589
  },
10522
10590
  "storage_mode": {
@@ -10530,6 +10598,11 @@
10530
10598
  "type": "object",
10531
10599
  "additionalProperties": true
10532
10600
  },
10601
+ "approval_id": {
10602
+ "type": "string",
10603
+ "format": "uuid",
10604
+ "description": "Linked approval when status is awaiting_approval"
10605
+ },
10533
10606
  "void_after": {
10534
10607
  "type": "string",
10535
10608
  "format": "date-time"
@@ -12030,6 +12103,11 @@
12030
12103
  "type": "boolean",
12031
12104
  "description": "Whether agents may reveal card details subject to per-card reveal policy."
12032
12105
  },
12106
+ "card_require_approval": {
12107
+ "type": "boolean",
12108
+ "default": true,
12109
+ "description": "When true, card orders route through the human approval queue before x402 payment."
12110
+ },
12033
12111
  "api_key_expires_at": {
12034
12112
  "type": "string",
12035
12113
  "format": "date-time",
@@ -12170,6 +12248,10 @@
12170
12248
  "type": "boolean",
12171
12249
  "description": "Whether agents may reveal card details subject to per-card reveal policy."
12172
12250
  },
12251
+ "card_require_approval": {
12252
+ "type": "boolean",
12253
+ "description": "When true, card orders route through the human approval queue before x402 payment."
12254
+ },
12173
12255
  "federation_enabled": {
12174
12256
  "type": "boolean",
12175
12257
  "description": "Enable OIDC federation (RFC 8693 token-exchange) for this agent.\nWhen true, the agent may call POST /v1/auth/federated-token to mint\nfederation tokens for the audiences listed in `federation_audiences`.\n"
@@ -12400,6 +12482,10 @@
12400
12482
  "type": "boolean",
12401
12483
  "description": "Whether agents may reveal card details subject to per-card reveal policy."
12402
12484
  },
12485
+ "card_require_approval": {
12486
+ "type": "boolean",
12487
+ "description": "When true, card orders route through the human approval queue before x402 payment."
12488
+ },
12403
12489
  "tx_count_today": {
12404
12490
  "type": "integer",
12405
12491
  "description": "Today's transaction count (UTC calendar day). Present when intents_api_enabled."
package/openapi.yaml CHANGED
@@ -5560,6 +5560,12 @@ paths:
5560
5560
  description: |
5561
5561
  Submit a decision (approve or reject) for a pending approval.
5562
5562
  Human-only. The approval must be in `pending` status.
5563
+ For `card_order` approvals, approving auto-executes the x402 payment;
5564
+ rejecting marks the card as `rejected`.
5565
+ Risk tier 2+ approvals require step-up authentication via
5566
+ `X-Auth-Confirm` (account password or `rat_` re-auth token from
5567
+ `POST /v1/auth/reauth/begin` + `complete`). Risk tier 3 requires
5568
+ passkey or TOTP re-auth token.
5563
5569
  operationId: decideApproval
5564
5570
  parameters:
5565
5571
  - name: approval_id
@@ -5588,6 +5594,38 @@ paths:
5588
5594
  "409":
5589
5595
  $ref: "#/components/responses/Conflict"
5590
5596
 
5597
+ /v1/approvals/quick-decide:
5598
+ get:
5599
+ tags: [Approvals]
5600
+ summary: One-click approve or deny (email link)
5601
+ description: |
5602
+ Public endpoint (no Bearer auth). The `token` query param is the
5603
+ authenticator — SHA-256 hashed, single-use, 7-day TTL. On success
5604
+ redirects to `{public_url}/approvals/{id}?decided=true`.
5605
+ Auto-executes approved `card_order` and `policy_change` actions.
5606
+ operationId: quickDecideApproval
5607
+ parameters:
5608
+ - name: token
5609
+ in: query
5610
+ required: true
5611
+ schema:
5612
+ type: string
5613
+ - name: decision
5614
+ in: query
5615
+ required: true
5616
+ schema:
5617
+ type: string
5618
+ enum: [approved, rejected]
5619
+ responses:
5620
+ "302":
5621
+ description: Redirect to dashboard confirmation page
5622
+ "400":
5623
+ $ref: "#/components/responses/BadRequest"
5624
+ "404":
5625
+ $ref: "#/components/responses/NotFound"
5626
+ "409":
5627
+ $ref: "#/components/responses/Conflict"
5628
+
5591
5629
  /v1/deposit-destinations:
5592
5630
  post:
5593
5631
  tags: [Treasury]
@@ -6342,6 +6380,9 @@ paths:
6342
6380
  payment flow server-side using the agent's Ethereum signing key
6343
6381
  (funded with USDC on Base). Requires `cards_enabled` on the agent
6344
6382
  and a Pro or higher plan. An `Idempotency-Key` header is required.
6383
+ When `card_require_approval` is true (default), the order is held
6384
+ in `awaiting_approval` until a human approves via the dashboard,
6385
+ mobile app, or email one-click link; payment runs only after approval.
6345
6386
  operationId: orderCard
6346
6387
  parameters:
6347
6388
  - $ref: "#/components/parameters/AgentId"
@@ -6357,8 +6398,20 @@ paths:
6357
6398
  schema:
6358
6399
  $ref: "#/components/schemas/OrderCardRequest"
6359
6400
  responses:
6401
+ "202":
6402
+ description: Card order queued for human approval (status awaiting_approval)
6403
+ content:
6404
+ application/json:
6405
+ schema:
6406
+ $ref: "#/components/schemas/CardResponse"
6360
6407
  "201":
6361
- description: Card order accepted (status pending)
6408
+ description: Card order accepted and payment submitted (status pending)
6409
+ content:
6410
+ application/json:
6411
+ schema:
6412
+ $ref: "#/components/schemas/CardResponse"
6413
+ "200":
6414
+ description: Idempotent replay of a prior order
6362
6415
  content:
6363
6416
  application/json:
6364
6417
  schema:
@@ -6693,13 +6746,17 @@ components:
6693
6746
  type: string
6694
6747
  status:
6695
6748
  type: string
6696
- enum: [ordering, pending, ready, depleted, expired, voided, orphaned_payment]
6749
+ enum: [ordering, pending, ready, depleted, expired, voided, orphaned_payment, awaiting_approval, rejected]
6697
6750
  storage_mode:
6698
6751
  type: string
6699
6752
  enum: [reference, full]
6700
6753
  reveal_policy:
6701
6754
  type: object
6702
6755
  additionalProperties: true
6756
+ approval_id:
6757
+ type: string
6758
+ format: uuid
6759
+ description: Linked approval when status is awaiting_approval
6703
6760
  void_after:
6704
6761
  type: string
6705
6762
  format: date-time
@@ -7751,6 +7808,10 @@ components:
7751
7808
  card_reveal_enabled:
7752
7809
  type: boolean
7753
7810
  description: Whether agents may reveal card details subject to per-card reveal policy.
7811
+ card_require_approval:
7812
+ type: boolean
7813
+ default: true
7814
+ description: When true, card orders route through the human approval queue before x402 payment.
7754
7815
  api_key_expires_at:
7755
7816
  type: string
7756
7817
  format: date-time
@@ -7855,6 +7916,9 @@ components:
7855
7916
  card_reveal_enabled:
7856
7917
  type: boolean
7857
7918
  description: Whether agents may reveal card details subject to per-card reveal policy.
7919
+ card_require_approval:
7920
+ type: boolean
7921
+ description: When true, card orders route through the human approval queue before x402 payment.
7858
7922
  federation_enabled:
7859
7923
  type: boolean
7860
7924
  description: |
@@ -8039,6 +8103,9 @@ components:
8039
8103
  card_reveal_enabled:
8040
8104
  type: boolean
8041
8105
  description: Whether agents may reveal card details subject to per-card reveal policy.
8106
+ card_require_approval:
8107
+ type: boolean
8108
+ description: When true, card orders route through the human approval queue before x402 payment.
8042
8109
  tx_count_today:
8043
8110
  type: integer
8044
8111
  description: Today's transaction count (UTC calendar day). Present when intents_api_enabled.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1claw/openapi-spec",
3
- "version": "0.41.3",
3
+ "version": "0.41.4",
4
4
  "description": "OpenAPI 3.1.0 specification for the 1Claw Vault API \u2014 generate clients in any language",
5
5
  "license": "MIT",
6
6
  "repository": {