@1claw/openapi-spec 0.14.0 → 0.15.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/openapi.json +518 -0
- package/openapi.yaml +324 -0
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -83,6 +83,10 @@
|
|
|
83
83
|
"name": "Security",
|
|
84
84
|
"description": "IP rules and security configuration"
|
|
85
85
|
},
|
|
86
|
+
{
|
|
87
|
+
"name": "Treasury",
|
|
88
|
+
"description": "Multi-sig treasury wallets (Safe) and agent access requests"
|
|
89
|
+
},
|
|
86
90
|
{
|
|
87
91
|
"name": "Admin",
|
|
88
92
|
"description": "Platform administration"
|
|
@@ -2898,6 +2902,375 @@
|
|
|
2898
2902
|
}
|
|
2899
2903
|
}
|
|
2900
2904
|
},
|
|
2905
|
+
"/v1/treasury": {
|
|
2906
|
+
"post": {
|
|
2907
|
+
"tags": [
|
|
2908
|
+
"Treasury"
|
|
2909
|
+
],
|
|
2910
|
+
"summary": "Create a treasury (Safe multisig)",
|
|
2911
|
+
"operationId": "createTreasury",
|
|
2912
|
+
"security": [
|
|
2913
|
+
{
|
|
2914
|
+
"BearerAuth": []
|
|
2915
|
+
}
|
|
2916
|
+
],
|
|
2917
|
+
"requestBody": {
|
|
2918
|
+
"required": true,
|
|
2919
|
+
"content": {
|
|
2920
|
+
"application/json": {
|
|
2921
|
+
"schema": {
|
|
2922
|
+
"$ref": "#/components/schemas/CreateTreasuryRequest"
|
|
2923
|
+
}
|
|
2924
|
+
}
|
|
2925
|
+
}
|
|
2926
|
+
},
|
|
2927
|
+
"responses": {
|
|
2928
|
+
"201": {
|
|
2929
|
+
"description": "Treasury created",
|
|
2930
|
+
"content": {
|
|
2931
|
+
"application/json": {
|
|
2932
|
+
"schema": {
|
|
2933
|
+
"$ref": "#/components/schemas/TreasuryResponse"
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
},
|
|
2938
|
+
"400": {
|
|
2939
|
+
"$ref": "#/components/responses/BadRequest"
|
|
2940
|
+
},
|
|
2941
|
+
"401": {
|
|
2942
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
},
|
|
2946
|
+
"get": {
|
|
2947
|
+
"tags": [
|
|
2948
|
+
"Treasury"
|
|
2949
|
+
],
|
|
2950
|
+
"summary": "List treasuries",
|
|
2951
|
+
"operationId": "listTreasuries",
|
|
2952
|
+
"security": [
|
|
2953
|
+
{
|
|
2954
|
+
"BearerAuth": []
|
|
2955
|
+
}
|
|
2956
|
+
],
|
|
2957
|
+
"responses": {
|
|
2958
|
+
"200": {
|
|
2959
|
+
"description": "List of treasuries",
|
|
2960
|
+
"content": {
|
|
2961
|
+
"application/json": {
|
|
2962
|
+
"schema": {
|
|
2963
|
+
"type": "object",
|
|
2964
|
+
"properties": {
|
|
2965
|
+
"treasuries": {
|
|
2966
|
+
"type": "array",
|
|
2967
|
+
"items": {
|
|
2968
|
+
"$ref": "#/components/schemas/TreasuryResponse"
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
}
|
|
2975
|
+
},
|
|
2976
|
+
"401": {
|
|
2977
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
},
|
|
2982
|
+
"/v1/treasury/{treasury_id}": {
|
|
2983
|
+
"get": {
|
|
2984
|
+
"tags": [
|
|
2985
|
+
"Treasury"
|
|
2986
|
+
],
|
|
2987
|
+
"summary": "Get treasury details",
|
|
2988
|
+
"operationId": "getTreasury",
|
|
2989
|
+
"security": [
|
|
2990
|
+
{
|
|
2991
|
+
"BearerAuth": []
|
|
2992
|
+
}
|
|
2993
|
+
],
|
|
2994
|
+
"parameters": [
|
|
2995
|
+
{
|
|
2996
|
+
"name": "treasury_id",
|
|
2997
|
+
"in": "path",
|
|
2998
|
+
"required": true,
|
|
2999
|
+
"schema": {
|
|
3000
|
+
"type": "string",
|
|
3001
|
+
"format": "uuid"
|
|
3002
|
+
}
|
|
3003
|
+
}
|
|
3004
|
+
],
|
|
3005
|
+
"responses": {
|
|
3006
|
+
"200": {
|
|
3007
|
+
"description": "Treasury details",
|
|
3008
|
+
"content": {
|
|
3009
|
+
"application/json": {
|
|
3010
|
+
"schema": {
|
|
3011
|
+
"$ref": "#/components/schemas/TreasuryResponse"
|
|
3012
|
+
}
|
|
3013
|
+
}
|
|
3014
|
+
}
|
|
3015
|
+
},
|
|
3016
|
+
"404": {
|
|
3017
|
+
"$ref": "#/components/responses/NotFound"
|
|
3018
|
+
}
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
},
|
|
3022
|
+
"/v1/treasury/{treasury_id}/signers": {
|
|
3023
|
+
"post": {
|
|
3024
|
+
"tags": [
|
|
3025
|
+
"Treasury"
|
|
3026
|
+
],
|
|
3027
|
+
"summary": "Add a signer to a treasury",
|
|
3028
|
+
"operationId": "addTreasurySigner",
|
|
3029
|
+
"security": [
|
|
3030
|
+
{
|
|
3031
|
+
"BearerAuth": []
|
|
3032
|
+
}
|
|
3033
|
+
],
|
|
3034
|
+
"parameters": [
|
|
3035
|
+
{
|
|
3036
|
+
"name": "treasury_id",
|
|
3037
|
+
"in": "path",
|
|
3038
|
+
"required": true,
|
|
3039
|
+
"schema": {
|
|
3040
|
+
"type": "string",
|
|
3041
|
+
"format": "uuid"
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
],
|
|
3045
|
+
"requestBody": {
|
|
3046
|
+
"required": true,
|
|
3047
|
+
"content": {
|
|
3048
|
+
"application/json": {
|
|
3049
|
+
"schema": {
|
|
3050
|
+
"$ref": "#/components/schemas/AddSignerRequest"
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
},
|
|
3055
|
+
"responses": {
|
|
3056
|
+
"201": {
|
|
3057
|
+
"description": "Signer added"
|
|
3058
|
+
},
|
|
3059
|
+
"400": {
|
|
3060
|
+
"$ref": "#/components/responses/BadRequest"
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
},
|
|
3065
|
+
"/v1/treasury/{treasury_id}/signers/{signer_id}": {
|
|
3066
|
+
"delete": {
|
|
3067
|
+
"tags": [
|
|
3068
|
+
"Treasury"
|
|
3069
|
+
],
|
|
3070
|
+
"summary": "Remove a signer from a treasury",
|
|
3071
|
+
"operationId": "removeTreasurySigner",
|
|
3072
|
+
"security": [
|
|
3073
|
+
{
|
|
3074
|
+
"BearerAuth": []
|
|
3075
|
+
}
|
|
3076
|
+
],
|
|
3077
|
+
"parameters": [
|
|
3078
|
+
{
|
|
3079
|
+
"name": "treasury_id",
|
|
3080
|
+
"in": "path",
|
|
3081
|
+
"required": true,
|
|
3082
|
+
"schema": {
|
|
3083
|
+
"type": "string",
|
|
3084
|
+
"format": "uuid"
|
|
3085
|
+
}
|
|
3086
|
+
},
|
|
3087
|
+
{
|
|
3088
|
+
"name": "signer_id",
|
|
3089
|
+
"in": "path",
|
|
3090
|
+
"required": true,
|
|
3091
|
+
"schema": {
|
|
3092
|
+
"type": "string",
|
|
3093
|
+
"format": "uuid"
|
|
3094
|
+
}
|
|
3095
|
+
}
|
|
3096
|
+
],
|
|
3097
|
+
"responses": {
|
|
3098
|
+
"204": {
|
|
3099
|
+
"description": "Signer removed"
|
|
3100
|
+
},
|
|
3101
|
+
"404": {
|
|
3102
|
+
"$ref": "#/components/responses/NotFound"
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
},
|
|
3107
|
+
"/v1/treasury/{treasury_id}/access-requests": {
|
|
3108
|
+
"post": {
|
|
3109
|
+
"tags": [
|
|
3110
|
+
"Treasury"
|
|
3111
|
+
],
|
|
3112
|
+
"summary": "Request access to a treasury (agent-only)",
|
|
3113
|
+
"operationId": "requestTreasuryAccess",
|
|
3114
|
+
"security": [
|
|
3115
|
+
{
|
|
3116
|
+
"BearerAuth": []
|
|
3117
|
+
}
|
|
3118
|
+
],
|
|
3119
|
+
"parameters": [
|
|
3120
|
+
{
|
|
3121
|
+
"name": "treasury_id",
|
|
3122
|
+
"in": "path",
|
|
3123
|
+
"required": true,
|
|
3124
|
+
"schema": {
|
|
3125
|
+
"type": "string",
|
|
3126
|
+
"format": "uuid"
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3129
|
+
],
|
|
3130
|
+
"responses": {
|
|
3131
|
+
"201": {
|
|
3132
|
+
"description": "Access request created",
|
|
3133
|
+
"content": {
|
|
3134
|
+
"application/json": {
|
|
3135
|
+
"schema": {
|
|
3136
|
+
"$ref": "#/components/schemas/AccessRequestResponse"
|
|
3137
|
+
}
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
},
|
|
3141
|
+
"403": {
|
|
3142
|
+
"$ref": "#/components/responses/Forbidden"
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
},
|
|
3146
|
+
"get": {
|
|
3147
|
+
"tags": [
|
|
3148
|
+
"Treasury"
|
|
3149
|
+
],
|
|
3150
|
+
"summary": "List access requests for a treasury",
|
|
3151
|
+
"operationId": "listTreasuryAccessRequests",
|
|
3152
|
+
"security": [
|
|
3153
|
+
{
|
|
3154
|
+
"BearerAuth": []
|
|
3155
|
+
}
|
|
3156
|
+
],
|
|
3157
|
+
"parameters": [
|
|
3158
|
+
{
|
|
3159
|
+
"name": "treasury_id",
|
|
3160
|
+
"in": "path",
|
|
3161
|
+
"required": true,
|
|
3162
|
+
"schema": {
|
|
3163
|
+
"type": "string",
|
|
3164
|
+
"format": "uuid"
|
|
3165
|
+
}
|
|
3166
|
+
}
|
|
3167
|
+
],
|
|
3168
|
+
"responses": {
|
|
3169
|
+
"200": {
|
|
3170
|
+
"description": "List of access requests",
|
|
3171
|
+
"content": {
|
|
3172
|
+
"application/json": {
|
|
3173
|
+
"schema": {
|
|
3174
|
+
"type": "object",
|
|
3175
|
+
"properties": {
|
|
3176
|
+
"access_requests": {
|
|
3177
|
+
"type": "array",
|
|
3178
|
+
"items": {
|
|
3179
|
+
"$ref": "#/components/schemas/AccessRequestResponse"
|
|
3180
|
+
}
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
}
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
},
|
|
3190
|
+
"/v1/treasury/{treasury_id}/access-requests/{request_id}/approve": {
|
|
3191
|
+
"post": {
|
|
3192
|
+
"tags": [
|
|
3193
|
+
"Treasury"
|
|
3194
|
+
],
|
|
3195
|
+
"summary": "Approve an access request",
|
|
3196
|
+
"operationId": "approveTreasuryAccess",
|
|
3197
|
+
"security": [
|
|
3198
|
+
{
|
|
3199
|
+
"BearerAuth": []
|
|
3200
|
+
}
|
|
3201
|
+
],
|
|
3202
|
+
"parameters": [
|
|
3203
|
+
{
|
|
3204
|
+
"name": "treasury_id",
|
|
3205
|
+
"in": "path",
|
|
3206
|
+
"required": true,
|
|
3207
|
+
"schema": {
|
|
3208
|
+
"type": "string",
|
|
3209
|
+
"format": "uuid"
|
|
3210
|
+
}
|
|
3211
|
+
},
|
|
3212
|
+
{
|
|
3213
|
+
"name": "request_id",
|
|
3214
|
+
"in": "path",
|
|
3215
|
+
"required": true,
|
|
3216
|
+
"schema": {
|
|
3217
|
+
"type": "string",
|
|
3218
|
+
"format": "uuid"
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
],
|
|
3222
|
+
"responses": {
|
|
3223
|
+
"200": {
|
|
3224
|
+
"description": "Access request approved"
|
|
3225
|
+
},
|
|
3226
|
+
"404": {
|
|
3227
|
+
"$ref": "#/components/responses/NotFound"
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
},
|
|
3232
|
+
"/v1/treasury/{treasury_id}/access-requests/{request_id}/deny": {
|
|
3233
|
+
"post": {
|
|
3234
|
+
"tags": [
|
|
3235
|
+
"Treasury"
|
|
3236
|
+
],
|
|
3237
|
+
"summary": "Deny an access request",
|
|
3238
|
+
"operationId": "denyTreasuryAccess",
|
|
3239
|
+
"security": [
|
|
3240
|
+
{
|
|
3241
|
+
"BearerAuth": []
|
|
3242
|
+
}
|
|
3243
|
+
],
|
|
3244
|
+
"parameters": [
|
|
3245
|
+
{
|
|
3246
|
+
"name": "treasury_id",
|
|
3247
|
+
"in": "path",
|
|
3248
|
+
"required": true,
|
|
3249
|
+
"schema": {
|
|
3250
|
+
"type": "string",
|
|
3251
|
+
"format": "uuid"
|
|
3252
|
+
}
|
|
3253
|
+
},
|
|
3254
|
+
{
|
|
3255
|
+
"name": "request_id",
|
|
3256
|
+
"in": "path",
|
|
3257
|
+
"required": true,
|
|
3258
|
+
"schema": {
|
|
3259
|
+
"type": "string",
|
|
3260
|
+
"format": "uuid"
|
|
3261
|
+
}
|
|
3262
|
+
}
|
|
3263
|
+
],
|
|
3264
|
+
"responses": {
|
|
3265
|
+
"200": {
|
|
3266
|
+
"description": "Access request denied"
|
|
3267
|
+
},
|
|
3268
|
+
"404": {
|
|
3269
|
+
"$ref": "#/components/responses/NotFound"
|
|
3270
|
+
}
|
|
3271
|
+
}
|
|
3272
|
+
}
|
|
3273
|
+
},
|
|
2901
3274
|
"/v1/admin/settings": {
|
|
2902
3275
|
"get": {
|
|
2903
3276
|
"tags": [
|
|
@@ -6069,6 +6442,151 @@
|
|
|
6069
6442
|
}
|
|
6070
6443
|
}
|
|
6071
6444
|
},
|
|
6445
|
+
"CreateTreasuryRequest": {
|
|
6446
|
+
"type": "object",
|
|
6447
|
+
"required": [
|
|
6448
|
+
"name",
|
|
6449
|
+
"chain",
|
|
6450
|
+
"chain_id",
|
|
6451
|
+
"threshold"
|
|
6452
|
+
],
|
|
6453
|
+
"properties": {
|
|
6454
|
+
"name": {
|
|
6455
|
+
"type": "string"
|
|
6456
|
+
},
|
|
6457
|
+
"chain": {
|
|
6458
|
+
"type": "string"
|
|
6459
|
+
},
|
|
6460
|
+
"chain_id": {
|
|
6461
|
+
"type": "integer"
|
|
6462
|
+
},
|
|
6463
|
+
"threshold": {
|
|
6464
|
+
"type": "integer",
|
|
6465
|
+
"minimum": 1
|
|
6466
|
+
},
|
|
6467
|
+
"safe_address": {
|
|
6468
|
+
"type": "string",
|
|
6469
|
+
"description": "Pre-deployed Safe address (optional)"
|
|
6470
|
+
}
|
|
6471
|
+
}
|
|
6472
|
+
},
|
|
6473
|
+
"TreasuryResponse": {
|
|
6474
|
+
"type": "object",
|
|
6475
|
+
"properties": {
|
|
6476
|
+
"id": {
|
|
6477
|
+
"type": "string",
|
|
6478
|
+
"format": "uuid"
|
|
6479
|
+
},
|
|
6480
|
+
"org_id": {
|
|
6481
|
+
"type": "string",
|
|
6482
|
+
"format": "uuid"
|
|
6483
|
+
},
|
|
6484
|
+
"name": {
|
|
6485
|
+
"type": "string"
|
|
6486
|
+
},
|
|
6487
|
+
"safe_address": {
|
|
6488
|
+
"type": "string"
|
|
6489
|
+
},
|
|
6490
|
+
"chain": {
|
|
6491
|
+
"type": "string"
|
|
6492
|
+
},
|
|
6493
|
+
"chain_id": {
|
|
6494
|
+
"type": "integer"
|
|
6495
|
+
},
|
|
6496
|
+
"threshold": {
|
|
6497
|
+
"type": "integer"
|
|
6498
|
+
},
|
|
6499
|
+
"signers": {
|
|
6500
|
+
"type": "array",
|
|
6501
|
+
"items": {
|
|
6502
|
+
"$ref": "#/components/schemas/TreasurySignerResponse"
|
|
6503
|
+
}
|
|
6504
|
+
},
|
|
6505
|
+
"created_at": {
|
|
6506
|
+
"type": "string",
|
|
6507
|
+
"format": "date-time"
|
|
6508
|
+
}
|
|
6509
|
+
}
|
|
6510
|
+
},
|
|
6511
|
+
"TreasurySignerResponse": {
|
|
6512
|
+
"type": "object",
|
|
6513
|
+
"properties": {
|
|
6514
|
+
"id": {
|
|
6515
|
+
"type": "string",
|
|
6516
|
+
"format": "uuid"
|
|
6517
|
+
},
|
|
6518
|
+
"signer_type": {
|
|
6519
|
+
"type": "string",
|
|
6520
|
+
"enum": [
|
|
6521
|
+
"user",
|
|
6522
|
+
"agent"
|
|
6523
|
+
]
|
|
6524
|
+
},
|
|
6525
|
+
"signer_id": {
|
|
6526
|
+
"type": "string",
|
|
6527
|
+
"format": "uuid"
|
|
6528
|
+
},
|
|
6529
|
+
"evm_address": {
|
|
6530
|
+
"type": "string"
|
|
6531
|
+
},
|
|
6532
|
+
"created_at": {
|
|
6533
|
+
"type": "string",
|
|
6534
|
+
"format": "date-time"
|
|
6535
|
+
}
|
|
6536
|
+
}
|
|
6537
|
+
},
|
|
6538
|
+
"AddSignerRequest": {
|
|
6539
|
+
"type": "object",
|
|
6540
|
+
"required": [
|
|
6541
|
+
"signer_type",
|
|
6542
|
+
"signer_id"
|
|
6543
|
+
],
|
|
6544
|
+
"properties": {
|
|
6545
|
+
"signer_type": {
|
|
6546
|
+
"type": "string",
|
|
6547
|
+
"enum": [
|
|
6548
|
+
"user",
|
|
6549
|
+
"agent"
|
|
6550
|
+
]
|
|
6551
|
+
},
|
|
6552
|
+
"signer_id": {
|
|
6553
|
+
"type": "string",
|
|
6554
|
+
"format": "uuid"
|
|
6555
|
+
}
|
|
6556
|
+
}
|
|
6557
|
+
},
|
|
6558
|
+
"AccessRequestResponse": {
|
|
6559
|
+
"type": "object",
|
|
6560
|
+
"properties": {
|
|
6561
|
+
"id": {
|
|
6562
|
+
"type": "string",
|
|
6563
|
+
"format": "uuid"
|
|
6564
|
+
},
|
|
6565
|
+
"treasury_id": {
|
|
6566
|
+
"type": "string",
|
|
6567
|
+
"format": "uuid"
|
|
6568
|
+
},
|
|
6569
|
+
"agent_id": {
|
|
6570
|
+
"type": "string",
|
|
6571
|
+
"format": "uuid"
|
|
6572
|
+
},
|
|
6573
|
+
"status": {
|
|
6574
|
+
"type": "string",
|
|
6575
|
+
"enum": [
|
|
6576
|
+
"pending",
|
|
6577
|
+
"approved",
|
|
6578
|
+
"denied"
|
|
6579
|
+
]
|
|
6580
|
+
},
|
|
6581
|
+
"evm_address": {
|
|
6582
|
+
"type": "string"
|
|
6583
|
+
},
|
|
6584
|
+
"created_at": {
|
|
6585
|
+
"type": "string",
|
|
6586
|
+
"format": "date-time"
|
|
6587
|
+
}
|
|
6588
|
+
}
|
|
6589
|
+
},
|
|
6072
6590
|
"PaymentRequirement": {
|
|
6073
6591
|
"type": "object",
|
|
6074
6592
|
"properties": {
|
package/openapi.yaml
CHANGED
|
@@ -54,6 +54,8 @@ tags:
|
|
|
54
54
|
description: Immutable audit event log
|
|
55
55
|
- name: Security
|
|
56
56
|
description: IP rules and security configuration
|
|
57
|
+
- name: Treasury
|
|
58
|
+
description: Multi-sig treasury wallets (Safe) and agent access requests
|
|
57
59
|
- name: Admin
|
|
58
60
|
description: Platform administration
|
|
59
61
|
- name: Health
|
|
@@ -1849,6 +1851,232 @@ paths:
|
|
|
1849
1851
|
"204":
|
|
1850
1852
|
description: Rule deleted
|
|
1851
1853
|
|
|
1854
|
+
# ---------------------------------------------------------------------------
|
|
1855
|
+
# Treasury
|
|
1856
|
+
# ---------------------------------------------------------------------------
|
|
1857
|
+
|
|
1858
|
+
/v1/treasury:
|
|
1859
|
+
post:
|
|
1860
|
+
tags: [Treasury]
|
|
1861
|
+
summary: Create a treasury (Safe multisig)
|
|
1862
|
+
operationId: createTreasury
|
|
1863
|
+
security:
|
|
1864
|
+
- BearerAuth: []
|
|
1865
|
+
requestBody:
|
|
1866
|
+
required: true
|
|
1867
|
+
content:
|
|
1868
|
+
application/json:
|
|
1869
|
+
schema:
|
|
1870
|
+
$ref: "#/components/schemas/CreateTreasuryRequest"
|
|
1871
|
+
responses:
|
|
1872
|
+
"201":
|
|
1873
|
+
description: Treasury created
|
|
1874
|
+
content:
|
|
1875
|
+
application/json:
|
|
1876
|
+
schema:
|
|
1877
|
+
$ref: "#/components/schemas/TreasuryResponse"
|
|
1878
|
+
"400":
|
|
1879
|
+
$ref: "#/components/responses/BadRequest"
|
|
1880
|
+
"401":
|
|
1881
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1882
|
+
get:
|
|
1883
|
+
tags: [Treasury]
|
|
1884
|
+
summary: List treasuries
|
|
1885
|
+
operationId: listTreasuries
|
|
1886
|
+
security:
|
|
1887
|
+
- BearerAuth: []
|
|
1888
|
+
responses:
|
|
1889
|
+
"200":
|
|
1890
|
+
description: List of treasuries
|
|
1891
|
+
content:
|
|
1892
|
+
application/json:
|
|
1893
|
+
schema:
|
|
1894
|
+
type: object
|
|
1895
|
+
properties:
|
|
1896
|
+
treasuries:
|
|
1897
|
+
type: array
|
|
1898
|
+
items:
|
|
1899
|
+
$ref: "#/components/schemas/TreasuryResponse"
|
|
1900
|
+
"401":
|
|
1901
|
+
$ref: "#/components/responses/Unauthorized"
|
|
1902
|
+
|
|
1903
|
+
/v1/treasury/{treasury_id}:
|
|
1904
|
+
get:
|
|
1905
|
+
tags: [Treasury]
|
|
1906
|
+
summary: Get treasury details
|
|
1907
|
+
operationId: getTreasury
|
|
1908
|
+
security:
|
|
1909
|
+
- BearerAuth: []
|
|
1910
|
+
parameters:
|
|
1911
|
+
- name: treasury_id
|
|
1912
|
+
in: path
|
|
1913
|
+
required: true
|
|
1914
|
+
schema:
|
|
1915
|
+
type: string
|
|
1916
|
+
format: uuid
|
|
1917
|
+
responses:
|
|
1918
|
+
"200":
|
|
1919
|
+
description: Treasury details
|
|
1920
|
+
content:
|
|
1921
|
+
application/json:
|
|
1922
|
+
schema:
|
|
1923
|
+
$ref: "#/components/schemas/TreasuryResponse"
|
|
1924
|
+
"404":
|
|
1925
|
+
$ref: "#/components/responses/NotFound"
|
|
1926
|
+
|
|
1927
|
+
/v1/treasury/{treasury_id}/signers:
|
|
1928
|
+
post:
|
|
1929
|
+
tags: [Treasury]
|
|
1930
|
+
summary: Add a signer to a treasury
|
|
1931
|
+
operationId: addTreasurySigner
|
|
1932
|
+
security:
|
|
1933
|
+
- BearerAuth: []
|
|
1934
|
+
parameters:
|
|
1935
|
+
- name: treasury_id
|
|
1936
|
+
in: path
|
|
1937
|
+
required: true
|
|
1938
|
+
schema:
|
|
1939
|
+
type: string
|
|
1940
|
+
format: uuid
|
|
1941
|
+
requestBody:
|
|
1942
|
+
required: true
|
|
1943
|
+
content:
|
|
1944
|
+
application/json:
|
|
1945
|
+
schema:
|
|
1946
|
+
$ref: "#/components/schemas/AddSignerRequest"
|
|
1947
|
+
responses:
|
|
1948
|
+
"201":
|
|
1949
|
+
description: Signer added
|
|
1950
|
+
"400":
|
|
1951
|
+
$ref: "#/components/responses/BadRequest"
|
|
1952
|
+
|
|
1953
|
+
/v1/treasury/{treasury_id}/signers/{signer_id}:
|
|
1954
|
+
delete:
|
|
1955
|
+
tags: [Treasury]
|
|
1956
|
+
summary: Remove a signer from a treasury
|
|
1957
|
+
operationId: removeTreasurySigner
|
|
1958
|
+
security:
|
|
1959
|
+
- BearerAuth: []
|
|
1960
|
+
parameters:
|
|
1961
|
+
- name: treasury_id
|
|
1962
|
+
in: path
|
|
1963
|
+
required: true
|
|
1964
|
+
schema:
|
|
1965
|
+
type: string
|
|
1966
|
+
format: uuid
|
|
1967
|
+
- name: signer_id
|
|
1968
|
+
in: path
|
|
1969
|
+
required: true
|
|
1970
|
+
schema:
|
|
1971
|
+
type: string
|
|
1972
|
+
format: uuid
|
|
1973
|
+
responses:
|
|
1974
|
+
"204":
|
|
1975
|
+
description: Signer removed
|
|
1976
|
+
"404":
|
|
1977
|
+
$ref: "#/components/responses/NotFound"
|
|
1978
|
+
|
|
1979
|
+
/v1/treasury/{treasury_id}/access-requests:
|
|
1980
|
+
post:
|
|
1981
|
+
tags: [Treasury]
|
|
1982
|
+
summary: Request access to a treasury (agent-only)
|
|
1983
|
+
operationId: requestTreasuryAccess
|
|
1984
|
+
security:
|
|
1985
|
+
- BearerAuth: []
|
|
1986
|
+
parameters:
|
|
1987
|
+
- name: treasury_id
|
|
1988
|
+
in: path
|
|
1989
|
+
required: true
|
|
1990
|
+
schema:
|
|
1991
|
+
type: string
|
|
1992
|
+
format: uuid
|
|
1993
|
+
responses:
|
|
1994
|
+
"201":
|
|
1995
|
+
description: Access request created
|
|
1996
|
+
content:
|
|
1997
|
+
application/json:
|
|
1998
|
+
schema:
|
|
1999
|
+
$ref: "#/components/schemas/AccessRequestResponse"
|
|
2000
|
+
"403":
|
|
2001
|
+
$ref: "#/components/responses/Forbidden"
|
|
2002
|
+
get:
|
|
2003
|
+
tags: [Treasury]
|
|
2004
|
+
summary: List access requests for a treasury
|
|
2005
|
+
operationId: listTreasuryAccessRequests
|
|
2006
|
+
security:
|
|
2007
|
+
- BearerAuth: []
|
|
2008
|
+
parameters:
|
|
2009
|
+
- name: treasury_id
|
|
2010
|
+
in: path
|
|
2011
|
+
required: true
|
|
2012
|
+
schema:
|
|
2013
|
+
type: string
|
|
2014
|
+
format: uuid
|
|
2015
|
+
responses:
|
|
2016
|
+
"200":
|
|
2017
|
+
description: List of access requests
|
|
2018
|
+
content:
|
|
2019
|
+
application/json:
|
|
2020
|
+
schema:
|
|
2021
|
+
type: object
|
|
2022
|
+
properties:
|
|
2023
|
+
access_requests:
|
|
2024
|
+
type: array
|
|
2025
|
+
items:
|
|
2026
|
+
$ref: "#/components/schemas/AccessRequestResponse"
|
|
2027
|
+
|
|
2028
|
+
/v1/treasury/{treasury_id}/access-requests/{request_id}/approve:
|
|
2029
|
+
post:
|
|
2030
|
+
tags: [Treasury]
|
|
2031
|
+
summary: Approve an access request
|
|
2032
|
+
operationId: approveTreasuryAccess
|
|
2033
|
+
security:
|
|
2034
|
+
- BearerAuth: []
|
|
2035
|
+
parameters:
|
|
2036
|
+
- name: treasury_id
|
|
2037
|
+
in: path
|
|
2038
|
+
required: true
|
|
2039
|
+
schema:
|
|
2040
|
+
type: string
|
|
2041
|
+
format: uuid
|
|
2042
|
+
- name: request_id
|
|
2043
|
+
in: path
|
|
2044
|
+
required: true
|
|
2045
|
+
schema:
|
|
2046
|
+
type: string
|
|
2047
|
+
format: uuid
|
|
2048
|
+
responses:
|
|
2049
|
+
"200":
|
|
2050
|
+
description: Access request approved
|
|
2051
|
+
"404":
|
|
2052
|
+
$ref: "#/components/responses/NotFound"
|
|
2053
|
+
|
|
2054
|
+
/v1/treasury/{treasury_id}/access-requests/{request_id}/deny:
|
|
2055
|
+
post:
|
|
2056
|
+
tags: [Treasury]
|
|
2057
|
+
summary: Deny an access request
|
|
2058
|
+
operationId: denyTreasuryAccess
|
|
2059
|
+
security:
|
|
2060
|
+
- BearerAuth: []
|
|
2061
|
+
parameters:
|
|
2062
|
+
- name: treasury_id
|
|
2063
|
+
in: path
|
|
2064
|
+
required: true
|
|
2065
|
+
schema:
|
|
2066
|
+
type: string
|
|
2067
|
+
format: uuid
|
|
2068
|
+
- name: request_id
|
|
2069
|
+
in: path
|
|
2070
|
+
required: true
|
|
2071
|
+
schema:
|
|
2072
|
+
type: string
|
|
2073
|
+
format: uuid
|
|
2074
|
+
responses:
|
|
2075
|
+
"200":
|
|
2076
|
+
description: Access request denied
|
|
2077
|
+
"404":
|
|
2078
|
+
$ref: "#/components/responses/NotFound"
|
|
2079
|
+
|
|
1852
2080
|
# ---------------------------------------------------------------------------
|
|
1853
2081
|
# Admin
|
|
1854
2082
|
# ---------------------------------------------------------------------------
|
|
@@ -4042,6 +4270,102 @@ components:
|
|
|
4042
4270
|
minimum: 1
|
|
4043
4271
|
maximum: 3650
|
|
4044
4272
|
|
|
4273
|
+
# --- Treasury ---
|
|
4274
|
+
|
|
4275
|
+
CreateTreasuryRequest:
|
|
4276
|
+
type: object
|
|
4277
|
+
required: [name, chain, chain_id, threshold]
|
|
4278
|
+
properties:
|
|
4279
|
+
name:
|
|
4280
|
+
type: string
|
|
4281
|
+
chain:
|
|
4282
|
+
type: string
|
|
4283
|
+
chain_id:
|
|
4284
|
+
type: integer
|
|
4285
|
+
threshold:
|
|
4286
|
+
type: integer
|
|
4287
|
+
minimum: 1
|
|
4288
|
+
safe_address:
|
|
4289
|
+
type: string
|
|
4290
|
+
description: Pre-deployed Safe address (optional)
|
|
4291
|
+
|
|
4292
|
+
TreasuryResponse:
|
|
4293
|
+
type: object
|
|
4294
|
+
properties:
|
|
4295
|
+
id:
|
|
4296
|
+
type: string
|
|
4297
|
+
format: uuid
|
|
4298
|
+
org_id:
|
|
4299
|
+
type: string
|
|
4300
|
+
format: uuid
|
|
4301
|
+
name:
|
|
4302
|
+
type: string
|
|
4303
|
+
safe_address:
|
|
4304
|
+
type: string
|
|
4305
|
+
chain:
|
|
4306
|
+
type: string
|
|
4307
|
+
chain_id:
|
|
4308
|
+
type: integer
|
|
4309
|
+
threshold:
|
|
4310
|
+
type: integer
|
|
4311
|
+
signers:
|
|
4312
|
+
type: array
|
|
4313
|
+
items:
|
|
4314
|
+
$ref: "#/components/schemas/TreasurySignerResponse"
|
|
4315
|
+
created_at:
|
|
4316
|
+
type: string
|
|
4317
|
+
format: date-time
|
|
4318
|
+
|
|
4319
|
+
TreasurySignerResponse:
|
|
4320
|
+
type: object
|
|
4321
|
+
properties:
|
|
4322
|
+
id:
|
|
4323
|
+
type: string
|
|
4324
|
+
format: uuid
|
|
4325
|
+
signer_type:
|
|
4326
|
+
type: string
|
|
4327
|
+
enum: [user, agent]
|
|
4328
|
+
signer_id:
|
|
4329
|
+
type: string
|
|
4330
|
+
format: uuid
|
|
4331
|
+
evm_address:
|
|
4332
|
+
type: string
|
|
4333
|
+
created_at:
|
|
4334
|
+
type: string
|
|
4335
|
+
format: date-time
|
|
4336
|
+
|
|
4337
|
+
AddSignerRequest:
|
|
4338
|
+
type: object
|
|
4339
|
+
required: [signer_type, signer_id]
|
|
4340
|
+
properties:
|
|
4341
|
+
signer_type:
|
|
4342
|
+
type: string
|
|
4343
|
+
enum: [user, agent]
|
|
4344
|
+
signer_id:
|
|
4345
|
+
type: string
|
|
4346
|
+
format: uuid
|
|
4347
|
+
|
|
4348
|
+
AccessRequestResponse:
|
|
4349
|
+
type: object
|
|
4350
|
+
properties:
|
|
4351
|
+
id:
|
|
4352
|
+
type: string
|
|
4353
|
+
format: uuid
|
|
4354
|
+
treasury_id:
|
|
4355
|
+
type: string
|
|
4356
|
+
format: uuid
|
|
4357
|
+
agent_id:
|
|
4358
|
+
type: string
|
|
4359
|
+
format: uuid
|
|
4360
|
+
status:
|
|
4361
|
+
type: string
|
|
4362
|
+
enum: [pending, approved, denied]
|
|
4363
|
+
evm_address:
|
|
4364
|
+
type: string
|
|
4365
|
+
created_at:
|
|
4366
|
+
type: string
|
|
4367
|
+
format: date-time
|
|
4368
|
+
|
|
4045
4369
|
# --- x402 ---
|
|
4046
4370
|
|
|
4047
4371
|
PaymentRequirement:
|