@1claw/openapi-spec 0.23.1 → 0.24.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 +2 -2
- package/openapi.json +912 -48
- package/openapi.yaml +569 -1
- package/package.json +1 -1
package/openapi.yaml
CHANGED
|
@@ -2,7 +2,7 @@ openapi: 3.1.0
|
|
|
2
2
|
|
|
3
3
|
info:
|
|
4
4
|
title: 1Claw API
|
|
5
|
-
version: 2.
|
|
5
|
+
version: 2.14.0
|
|
6
6
|
description: |
|
|
7
7
|
Secure secret management for AI agents. Provides vaults, secrets,
|
|
8
8
|
policy-based access control, agent identity, Intents API,
|
|
@@ -62,6 +62,8 @@ tags:
|
|
|
62
62
|
description: Platform administration
|
|
63
63
|
- name: Health
|
|
64
64
|
description: Service health checks
|
|
65
|
+
- name: Approvals
|
|
66
|
+
description: Human-in-the-loop approval workflow for agent actions
|
|
65
67
|
- name: Platform
|
|
66
68
|
description: Platform API for developers building on 1Claw (plt_ keys, user provisioning, bootstrap templates)
|
|
67
69
|
|
|
@@ -871,6 +873,157 @@ paths:
|
|
|
871
873
|
"403":
|
|
872
874
|
$ref: "#/components/responses/Forbidden"
|
|
873
875
|
|
|
876
|
+
/v1/auth/devices:
|
|
877
|
+
post:
|
|
878
|
+
tags: [Authentication]
|
|
879
|
+
summary: Register a mobile device
|
|
880
|
+
description: |
|
|
881
|
+
Register a new mobile device for the authenticated user. Human-only.
|
|
882
|
+
The device public key is used for step-up authentication challenges.
|
|
883
|
+
operationId: registerDevice
|
|
884
|
+
requestBody:
|
|
885
|
+
required: true
|
|
886
|
+
content:
|
|
887
|
+
application/json:
|
|
888
|
+
schema:
|
|
889
|
+
$ref: "#/components/schemas/RegisterDeviceRequest"
|
|
890
|
+
responses:
|
|
891
|
+
"201":
|
|
892
|
+
description: Device registered
|
|
893
|
+
content:
|
|
894
|
+
application/json:
|
|
895
|
+
schema:
|
|
896
|
+
$ref: "#/components/schemas/RegisterDeviceResponse"
|
|
897
|
+
"400":
|
|
898
|
+
$ref: "#/components/responses/BadRequest"
|
|
899
|
+
"403":
|
|
900
|
+
$ref: "#/components/responses/Forbidden"
|
|
901
|
+
get:
|
|
902
|
+
tags: [Authentication]
|
|
903
|
+
summary: List devices for current user
|
|
904
|
+
description: Returns all registered mobile devices for the authenticated user.
|
|
905
|
+
operationId: listDevices
|
|
906
|
+
responses:
|
|
907
|
+
"200":
|
|
908
|
+
description: Device list
|
|
909
|
+
content:
|
|
910
|
+
application/json:
|
|
911
|
+
schema:
|
|
912
|
+
$ref: "#/components/schemas/DeviceListResponse"
|
|
913
|
+
|
|
914
|
+
/v1/auth/devices/{device_id}:
|
|
915
|
+
delete:
|
|
916
|
+
tags: [Authentication]
|
|
917
|
+
summary: Revoke a device
|
|
918
|
+
description: Removes a registered device, invalidating its keys and push tokens.
|
|
919
|
+
operationId: revokeDevice
|
|
920
|
+
parameters:
|
|
921
|
+
- name: device_id
|
|
922
|
+
in: path
|
|
923
|
+
required: true
|
|
924
|
+
schema:
|
|
925
|
+
type: string
|
|
926
|
+
format: uuid
|
|
927
|
+
responses:
|
|
928
|
+
"204":
|
|
929
|
+
description: Device revoked
|
|
930
|
+
"404":
|
|
931
|
+
$ref: "#/components/responses/NotFound"
|
|
932
|
+
|
|
933
|
+
/v1/auth/devices/{device_id}/challenge:
|
|
934
|
+
post:
|
|
935
|
+
tags: [Authentication]
|
|
936
|
+
summary: Create step-up auth challenge
|
|
937
|
+
description: |
|
|
938
|
+
Creates a cryptographic challenge bound to a specific action (e.g. approving
|
|
939
|
+
a high-risk transaction). The device signs the challenge nonce to prove
|
|
940
|
+
possession of the private key.
|
|
941
|
+
operationId: createDeviceChallenge
|
|
942
|
+
parameters:
|
|
943
|
+
- name: device_id
|
|
944
|
+
in: path
|
|
945
|
+
required: true
|
|
946
|
+
schema:
|
|
947
|
+
type: string
|
|
948
|
+
format: uuid
|
|
949
|
+
requestBody:
|
|
950
|
+
required: true
|
|
951
|
+
content:
|
|
952
|
+
application/json:
|
|
953
|
+
schema:
|
|
954
|
+
$ref: "#/components/schemas/CreateDeviceChallengeRequest"
|
|
955
|
+
responses:
|
|
956
|
+
"200":
|
|
957
|
+
description: Challenge created
|
|
958
|
+
content:
|
|
959
|
+
application/json:
|
|
960
|
+
schema:
|
|
961
|
+
$ref: "#/components/schemas/DeviceChallengeResponse"
|
|
962
|
+
"404":
|
|
963
|
+
$ref: "#/components/responses/NotFound"
|
|
964
|
+
|
|
965
|
+
/v1/auth/devices/{device_id}/attest:
|
|
966
|
+
post:
|
|
967
|
+
tags: [Authentication]
|
|
968
|
+
summary: Attest device challenge
|
|
969
|
+
description: |
|
|
970
|
+
Submit a signed challenge nonce to complete step-up authentication.
|
|
971
|
+
Returns a short-lived step-up token that can be used for the bound action.
|
|
972
|
+
operationId: attestDeviceChallenge
|
|
973
|
+
parameters:
|
|
974
|
+
- name: device_id
|
|
975
|
+
in: path
|
|
976
|
+
required: true
|
|
977
|
+
schema:
|
|
978
|
+
type: string
|
|
979
|
+
format: uuid
|
|
980
|
+
requestBody:
|
|
981
|
+
required: true
|
|
982
|
+
content:
|
|
983
|
+
application/json:
|
|
984
|
+
schema:
|
|
985
|
+
$ref: "#/components/schemas/AttestDeviceChallengeRequest"
|
|
986
|
+
responses:
|
|
987
|
+
"200":
|
|
988
|
+
description: Attestation successful
|
|
989
|
+
content:
|
|
990
|
+
application/json:
|
|
991
|
+
schema:
|
|
992
|
+
$ref: "#/components/schemas/AttestDeviceChallengeResponse"
|
|
993
|
+
"400":
|
|
994
|
+
$ref: "#/components/responses/BadRequest"
|
|
995
|
+
"404":
|
|
996
|
+
$ref: "#/components/responses/NotFound"
|
|
997
|
+
|
|
998
|
+
/v1/auth/devices/{device_id}/push-token:
|
|
999
|
+
post:
|
|
1000
|
+
tags: [Authentication]
|
|
1001
|
+
summary: Register push notification token
|
|
1002
|
+
description: |
|
|
1003
|
+
Associates a push notification token (APNs or FCM) with a registered device
|
|
1004
|
+
so the server can send approval requests and alerts.
|
|
1005
|
+
operationId: registerPushToken
|
|
1006
|
+
parameters:
|
|
1007
|
+
- name: device_id
|
|
1008
|
+
in: path
|
|
1009
|
+
required: true
|
|
1010
|
+
schema:
|
|
1011
|
+
type: string
|
|
1012
|
+
format: uuid
|
|
1013
|
+
requestBody:
|
|
1014
|
+
required: true
|
|
1015
|
+
content:
|
|
1016
|
+
application/json:
|
|
1017
|
+
schema:
|
|
1018
|
+
$ref: "#/components/schemas/RegisterPushTokenRequest"
|
|
1019
|
+
responses:
|
|
1020
|
+
"204":
|
|
1021
|
+
description: Push token registered
|
|
1022
|
+
"400":
|
|
1023
|
+
$ref: "#/components/responses/BadRequest"
|
|
1024
|
+
"404":
|
|
1025
|
+
$ref: "#/components/responses/NotFound"
|
|
1026
|
+
|
|
874
1027
|
# ---------------------------------------------------------------------------
|
|
875
1028
|
# Vaults
|
|
876
1029
|
# ---------------------------------------------------------------------------
|
|
@@ -3730,6 +3883,158 @@ paths:
|
|
|
3730
3883
|
"404":
|
|
3731
3884
|
description: Connection not found
|
|
3732
3885
|
|
|
3886
|
+
/v1/platform/claim/{token}:
|
|
3887
|
+
get:
|
|
3888
|
+
tags: [Platform]
|
|
3889
|
+
summary: Preview a claim token
|
|
3890
|
+
description: |
|
|
3891
|
+
Verify a claim token and preview what was provisioned (app name, vaults, agents, policies).
|
|
3892
|
+
Public endpoint — the token itself is the authentication.
|
|
3893
|
+
parameters:
|
|
3894
|
+
- in: path
|
|
3895
|
+
name: token
|
|
3896
|
+
required: true
|
|
3897
|
+
schema:
|
|
3898
|
+
type: string
|
|
3899
|
+
description: The `ct_` prefixed claim token from the bootstrap response
|
|
3900
|
+
responses:
|
|
3901
|
+
"200":
|
|
3902
|
+
description: Claim preview
|
|
3903
|
+
content:
|
|
3904
|
+
application/json:
|
|
3905
|
+
schema:
|
|
3906
|
+
$ref: "#/components/schemas/ClaimPreviewResponse"
|
|
3907
|
+
"404":
|
|
3908
|
+
description: Invalid or expired claim token
|
|
3909
|
+
post:
|
|
3910
|
+
tags: [Platform]
|
|
3911
|
+
summary: Redeem a claim token
|
|
3912
|
+
description: |
|
|
3913
|
+
Redeem a one-time claim token, marking the connection as claimed.
|
|
3914
|
+
Public endpoint — the token itself is the authentication. Returns 409 if already claimed, 410 if expired.
|
|
3915
|
+
parameters:
|
|
3916
|
+
- in: path
|
|
3917
|
+
name: token
|
|
3918
|
+
required: true
|
|
3919
|
+
schema:
|
|
3920
|
+
type: string
|
|
3921
|
+
description: The `ct_` prefixed claim token from the bootstrap response
|
|
3922
|
+
responses:
|
|
3923
|
+
"200":
|
|
3924
|
+
description: Claim redeemed
|
|
3925
|
+
content:
|
|
3926
|
+
application/json:
|
|
3927
|
+
schema:
|
|
3928
|
+
$ref: "#/components/schemas/ClaimRedeemResponse"
|
|
3929
|
+
"404":
|
|
3930
|
+
description: Invalid claim token
|
|
3931
|
+
"409":
|
|
3932
|
+
description: Claim token already used
|
|
3933
|
+
"410":
|
|
3934
|
+
description: Claim token has expired
|
|
3935
|
+
|
|
3936
|
+
# --- Approvals ---
|
|
3937
|
+
|
|
3938
|
+
/v1/approvals:
|
|
3939
|
+
get:
|
|
3940
|
+
tags: [Approvals]
|
|
3941
|
+
summary: List pending approvals
|
|
3942
|
+
description: |
|
|
3943
|
+
Returns approvals for the authenticated user's organization.
|
|
3944
|
+
Human-only. Supports filtering by status and pagination.
|
|
3945
|
+
operationId: listApprovals
|
|
3946
|
+
parameters:
|
|
3947
|
+
- name: status
|
|
3948
|
+
in: query
|
|
3949
|
+
required: false
|
|
3950
|
+
schema:
|
|
3951
|
+
type: string
|
|
3952
|
+
enum: [pending, approved, rejected, expired]
|
|
3953
|
+
description: Filter by approval status
|
|
3954
|
+
- name: limit
|
|
3955
|
+
in: query
|
|
3956
|
+
required: false
|
|
3957
|
+
schema:
|
|
3958
|
+
type: integer
|
|
3959
|
+
default: 50
|
|
3960
|
+
- name: offset
|
|
3961
|
+
in: query
|
|
3962
|
+
required: false
|
|
3963
|
+
schema:
|
|
3964
|
+
type: integer
|
|
3965
|
+
default: 0
|
|
3966
|
+
responses:
|
|
3967
|
+
"200":
|
|
3968
|
+
description: Approval list
|
|
3969
|
+
content:
|
|
3970
|
+
application/json:
|
|
3971
|
+
schema:
|
|
3972
|
+
type: object
|
|
3973
|
+
required: [approvals]
|
|
3974
|
+
properties:
|
|
3975
|
+
approvals:
|
|
3976
|
+
type: array
|
|
3977
|
+
items:
|
|
3978
|
+
$ref: "#/components/schemas/ApprovalResponse"
|
|
3979
|
+
|
|
3980
|
+
/v1/approvals/{approval_id}:
|
|
3981
|
+
get:
|
|
3982
|
+
tags: [Approvals]
|
|
3983
|
+
summary: Get approval details
|
|
3984
|
+
description: Returns details for a single approval by ID.
|
|
3985
|
+
operationId: getApproval
|
|
3986
|
+
parameters:
|
|
3987
|
+
- name: approval_id
|
|
3988
|
+
in: path
|
|
3989
|
+
required: true
|
|
3990
|
+
schema:
|
|
3991
|
+
type: string
|
|
3992
|
+
format: uuid
|
|
3993
|
+
responses:
|
|
3994
|
+
"200":
|
|
3995
|
+
description: Approval details
|
|
3996
|
+
content:
|
|
3997
|
+
application/json:
|
|
3998
|
+
schema:
|
|
3999
|
+
$ref: "#/components/schemas/ApprovalResponse"
|
|
4000
|
+
"404":
|
|
4001
|
+
$ref: "#/components/responses/NotFound"
|
|
4002
|
+
|
|
4003
|
+
/v1/approvals/{approval_id}/decide:
|
|
4004
|
+
post:
|
|
4005
|
+
tags: [Approvals]
|
|
4006
|
+
summary: Approve or reject
|
|
4007
|
+
description: |
|
|
4008
|
+
Submit a decision (approve or reject) for a pending approval.
|
|
4009
|
+
Human-only. The approval must be in `pending` status.
|
|
4010
|
+
operationId: decideApproval
|
|
4011
|
+
parameters:
|
|
4012
|
+
- name: approval_id
|
|
4013
|
+
in: path
|
|
4014
|
+
required: true
|
|
4015
|
+
schema:
|
|
4016
|
+
type: string
|
|
4017
|
+
format: uuid
|
|
4018
|
+
requestBody:
|
|
4019
|
+
required: true
|
|
4020
|
+
content:
|
|
4021
|
+
application/json:
|
|
4022
|
+
schema:
|
|
4023
|
+
$ref: "#/components/schemas/DecideApprovalRequest"
|
|
4024
|
+
responses:
|
|
4025
|
+
"200":
|
|
4026
|
+
description: Decision recorded
|
|
4027
|
+
content:
|
|
4028
|
+
application/json:
|
|
4029
|
+
schema:
|
|
4030
|
+
$ref: "#/components/schemas/ApprovalResponse"
|
|
4031
|
+
"400":
|
|
4032
|
+
$ref: "#/components/responses/BadRequest"
|
|
4033
|
+
"404":
|
|
4034
|
+
$ref: "#/components/responses/NotFound"
|
|
4035
|
+
"409":
|
|
4036
|
+
$ref: "#/components/responses/Conflict"
|
|
4037
|
+
|
|
3733
4038
|
# =============================================================================
|
|
3734
4039
|
# COMPONENTS
|
|
3735
4040
|
# =============================================================================
|
|
@@ -7172,6 +7477,29 @@ components:
|
|
|
7172
7477
|
items:
|
|
7173
7478
|
type: string
|
|
7174
7479
|
format: uuid
|
|
7480
|
+
signing_key_chains:
|
|
7481
|
+
type: array
|
|
7482
|
+
items:
|
|
7483
|
+
type: string
|
|
7484
|
+
description: Chains with provisioned signing keys
|
|
7485
|
+
agent_api_key:
|
|
7486
|
+
type: string
|
|
7487
|
+
nullable: true
|
|
7488
|
+
description: One-time agent API key (ocv_ prefix). Store securely — not retrievable later.
|
|
7489
|
+
signing_keys:
|
|
7490
|
+
type: array
|
|
7491
|
+
description: Provisioned signing key details (chain, address, public key)
|
|
7492
|
+
items:
|
|
7493
|
+
type: object
|
|
7494
|
+
properties:
|
|
7495
|
+
chain:
|
|
7496
|
+
type: string
|
|
7497
|
+
curve:
|
|
7498
|
+
type: string
|
|
7499
|
+
public_key:
|
|
7500
|
+
type: string
|
|
7501
|
+
address:
|
|
7502
|
+
type: string
|
|
7175
7503
|
|
|
7176
7504
|
ConnectedAppResponse:
|
|
7177
7505
|
type: object
|
|
@@ -7198,3 +7526,243 @@ components:
|
|
|
7198
7526
|
created_at:
|
|
7199
7527
|
type: string
|
|
7200
7528
|
format: date-time
|
|
7529
|
+
|
|
7530
|
+
ClaimPreviewResponse:
|
|
7531
|
+
type: object
|
|
7532
|
+
properties:
|
|
7533
|
+
app_name:
|
|
7534
|
+
type: string
|
|
7535
|
+
app_slug:
|
|
7536
|
+
type: string
|
|
7537
|
+
app_logo_url:
|
|
7538
|
+
type: string
|
|
7539
|
+
nullable: true
|
|
7540
|
+
auth_mode:
|
|
7541
|
+
type: string
|
|
7542
|
+
vault_ids:
|
|
7543
|
+
type: array
|
|
7544
|
+
items:
|
|
7545
|
+
type: string
|
|
7546
|
+
format: uuid
|
|
7547
|
+
agent_ids:
|
|
7548
|
+
type: array
|
|
7549
|
+
items:
|
|
7550
|
+
type: string
|
|
7551
|
+
format: uuid
|
|
7552
|
+
policy_count:
|
|
7553
|
+
type: integer
|
|
7554
|
+
status:
|
|
7555
|
+
type: string
|
|
7556
|
+
already_claimed:
|
|
7557
|
+
type: boolean
|
|
7558
|
+
expired:
|
|
7559
|
+
type: boolean
|
|
7560
|
+
return_to:
|
|
7561
|
+
type: string
|
|
7562
|
+
nullable: true
|
|
7563
|
+
|
|
7564
|
+
ClaimRedeemResponse:
|
|
7565
|
+
type: object
|
|
7566
|
+
properties:
|
|
7567
|
+
status:
|
|
7568
|
+
type: string
|
|
7569
|
+
connection_id:
|
|
7570
|
+
type: string
|
|
7571
|
+
format: uuid
|
|
7572
|
+
vault_ids:
|
|
7573
|
+
type: array
|
|
7574
|
+
items:
|
|
7575
|
+
type: string
|
|
7576
|
+
format: uuid
|
|
7577
|
+
agent_ids:
|
|
7578
|
+
type: array
|
|
7579
|
+
items:
|
|
7580
|
+
type: string
|
|
7581
|
+
format: uuid
|
|
7582
|
+
return_to:
|
|
7583
|
+
type: string
|
|
7584
|
+
nullable: true
|
|
7585
|
+
dashboard_url:
|
|
7586
|
+
type: string
|
|
7587
|
+
|
|
7588
|
+
# --- Mobile Companion App schemas ---
|
|
7589
|
+
|
|
7590
|
+
RegisterDeviceRequest:
|
|
7591
|
+
type: object
|
|
7592
|
+
required: [name, platform, public_key_pem]
|
|
7593
|
+
properties:
|
|
7594
|
+
name:
|
|
7595
|
+
type: string
|
|
7596
|
+
description: Human-readable device name (e.g. "Kevin's iPhone")
|
|
7597
|
+
example: My iPhone
|
|
7598
|
+
platform:
|
|
7599
|
+
type: string
|
|
7600
|
+
enum: [ios, android]
|
|
7601
|
+
public_key_pem:
|
|
7602
|
+
type: string
|
|
7603
|
+
description: PEM-encoded public key for step-up challenge signing
|
|
7604
|
+
attestation_blob:
|
|
7605
|
+
type: string
|
|
7606
|
+
description: Optional platform attestation (Apple DeviceCheck / Android SafetyNet)
|
|
7607
|
+
|
|
7608
|
+
RegisterDeviceResponse:
|
|
7609
|
+
type: object
|
|
7610
|
+
required: [device_id, attestation_verified]
|
|
7611
|
+
properties:
|
|
7612
|
+
device_id:
|
|
7613
|
+
type: string
|
|
7614
|
+
format: uuid
|
|
7615
|
+
attestation_verified:
|
|
7616
|
+
type: boolean
|
|
7617
|
+
|
|
7618
|
+
DeviceListResponse:
|
|
7619
|
+
type: object
|
|
7620
|
+
required: [devices]
|
|
7621
|
+
properties:
|
|
7622
|
+
devices:
|
|
7623
|
+
type: array
|
|
7624
|
+
items:
|
|
7625
|
+
$ref: "#/components/schemas/DeviceResponse"
|
|
7626
|
+
|
|
7627
|
+
DeviceResponse:
|
|
7628
|
+
type: object
|
|
7629
|
+
required: [id, name, platform, attestation_verified, created_at]
|
|
7630
|
+
properties:
|
|
7631
|
+
id:
|
|
7632
|
+
type: string
|
|
7633
|
+
format: uuid
|
|
7634
|
+
name:
|
|
7635
|
+
type: string
|
|
7636
|
+
platform:
|
|
7637
|
+
type: string
|
|
7638
|
+
attestation_verified:
|
|
7639
|
+
type: boolean
|
|
7640
|
+
last_used_at:
|
|
7641
|
+
type: string
|
|
7642
|
+
format: date-time
|
|
7643
|
+
nullable: true
|
|
7644
|
+
created_at:
|
|
7645
|
+
type: string
|
|
7646
|
+
format: date-time
|
|
7647
|
+
|
|
7648
|
+
CreateDeviceChallengeRequest:
|
|
7649
|
+
type: object
|
|
7650
|
+
required: [action, target_id]
|
|
7651
|
+
properties:
|
|
7652
|
+
action:
|
|
7653
|
+
type: string
|
|
7654
|
+
description: The action this challenge authorizes (e.g. "approve_transaction")
|
|
7655
|
+
target_id:
|
|
7656
|
+
type: string
|
|
7657
|
+
description: ID of the resource the action targets
|
|
7658
|
+
|
|
7659
|
+
DeviceChallengeResponse:
|
|
7660
|
+
type: object
|
|
7661
|
+
required: [challenge_nonce, expires_at, action_bound_hash]
|
|
7662
|
+
properties:
|
|
7663
|
+
challenge_nonce:
|
|
7664
|
+
type: string
|
|
7665
|
+
expires_at:
|
|
7666
|
+
type: string
|
|
7667
|
+
format: date-time
|
|
7668
|
+
action_bound_hash:
|
|
7669
|
+
type: string
|
|
7670
|
+
description: SHA-256 binding the challenge to the requested action and target
|
|
7671
|
+
|
|
7672
|
+
AttestDeviceChallengeRequest:
|
|
7673
|
+
type: object
|
|
7674
|
+
required: [challenge_nonce, signature]
|
|
7675
|
+
properties:
|
|
7676
|
+
challenge_nonce:
|
|
7677
|
+
type: string
|
|
7678
|
+
signature:
|
|
7679
|
+
type: string
|
|
7680
|
+
description: Signature over the challenge nonce using the device's private key
|
|
7681
|
+
|
|
7682
|
+
AttestDeviceChallengeResponse:
|
|
7683
|
+
type: object
|
|
7684
|
+
required: [step_up_token, expires_at]
|
|
7685
|
+
properties:
|
|
7686
|
+
step_up_token:
|
|
7687
|
+
type: string
|
|
7688
|
+
description: Short-lived token authorizing the bound action
|
|
7689
|
+
expires_at:
|
|
7690
|
+
type: string
|
|
7691
|
+
format: date-time
|
|
7692
|
+
|
|
7693
|
+
RegisterPushTokenRequest:
|
|
7694
|
+
type: object
|
|
7695
|
+
required: [token, platform]
|
|
7696
|
+
properties:
|
|
7697
|
+
token:
|
|
7698
|
+
type: string
|
|
7699
|
+
description: Push notification token from APNs or FCM
|
|
7700
|
+
platform:
|
|
7701
|
+
type: string
|
|
7702
|
+
enum: [apns, fcm]
|
|
7703
|
+
|
|
7704
|
+
DecideApprovalRequest:
|
|
7705
|
+
type: object
|
|
7706
|
+
required: [decision]
|
|
7707
|
+
properties:
|
|
7708
|
+
decision:
|
|
7709
|
+
type: string
|
|
7710
|
+
enum: [approve, reject]
|
|
7711
|
+
reason:
|
|
7712
|
+
type: string
|
|
7713
|
+
description: Optional human-readable reason for the decision
|
|
7714
|
+
|
|
7715
|
+
ApprovalResponse:
|
|
7716
|
+
type: object
|
|
7717
|
+
required: [id, org_id, user_id, action, target_type, target_id, risk_tier, status, summary, created_at]
|
|
7718
|
+
properties:
|
|
7719
|
+
id:
|
|
7720
|
+
type: string
|
|
7721
|
+
format: uuid
|
|
7722
|
+
org_id:
|
|
7723
|
+
type: string
|
|
7724
|
+
format: uuid
|
|
7725
|
+
user_id:
|
|
7726
|
+
type: string
|
|
7727
|
+
format: uuid
|
|
7728
|
+
agent_id:
|
|
7729
|
+
type: string
|
|
7730
|
+
format: uuid
|
|
7731
|
+
nullable: true
|
|
7732
|
+
action:
|
|
7733
|
+
type: string
|
|
7734
|
+
target_type:
|
|
7735
|
+
type: string
|
|
7736
|
+
target_id:
|
|
7737
|
+
type: string
|
|
7738
|
+
risk_tier:
|
|
7739
|
+
type: integer
|
|
7740
|
+
minimum: 1
|
|
7741
|
+
maximum: 3
|
|
7742
|
+
status:
|
|
7743
|
+
type: string
|
|
7744
|
+
enum: [pending, approved, rejected, expired]
|
|
7745
|
+
summary:
|
|
7746
|
+
type: object
|
|
7747
|
+
description: Structured summary of the action requiring approval
|
|
7748
|
+
reason:
|
|
7749
|
+
type: string
|
|
7750
|
+
nullable: true
|
|
7751
|
+
decision_reason:
|
|
7752
|
+
type: string
|
|
7753
|
+
nullable: true
|
|
7754
|
+
decided_by:
|
|
7755
|
+
type: string
|
|
7756
|
+
format: uuid
|
|
7757
|
+
nullable: true
|
|
7758
|
+
decided_at:
|
|
7759
|
+
type: string
|
|
7760
|
+
format: date-time
|
|
7761
|
+
nullable: true
|
|
7762
|
+
expires_at:
|
|
7763
|
+
type: string
|
|
7764
|
+
format: date-time
|
|
7765
|
+
nullable: true
|
|
7766
|
+
created_at:
|
|
7767
|
+
type: string
|
|
7768
|
+
format: date-time
|