@1claw/openapi-spec 0.14.0 → 0.15.1

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 CHANGED
@@ -40,7 +40,7 @@ openapi-generator generate \
40
40
  import spec from "@1claw/openapi-spec/openapi.json";
41
41
  ```
42
42
 
43
- ## What's in the spec (v0.14.0)
43
+ ## What's in the spec (v0.15.x)
44
44
 
45
45
  - **Vaults** — CRUD, CMEK enable/disable, key rotation with job tracking
46
46
  - **Secrets** — CRUD, versioning, CMEK-encrypted flag
@@ -51,6 +51,7 @@ import spec from "@1claw/openapi-spec/openapi.json";
51
51
  - **Audit** — Hash-chained event log
52
52
  - **Chains** — Supported blockchain registry
53
53
  - **Auth** — JWT, API keys, agent tokens, MFA, device flow, Google OAuth
54
+ - **Org** — List members, invite, update/remove member; `GET /v1/org/agent-keys-vault` (users only, returns __agent-keys vault id or 404)
54
55
 
55
56
  ## Included files
56
57
 
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"
@@ -2376,6 +2380,31 @@
2376
2380
  }
2377
2381
  }
2378
2382
  },
2383
+ "/v1/org/agent-keys-vault": {
2384
+ "get": {
2385
+ "tags": [
2386
+ "Organization"
2387
+ ],
2388
+ "summary": "Get the org's __agent-keys vault id",
2389
+ "description": "Returns the vault id for the caller's org agent-keys vault (used for revealing agent identity keys). Users only; 404 if the vault does not exist.",
2390
+ "operationId": "getAgentKeysVault",
2391
+ "responses": {
2392
+ "200": {
2393
+ "description": "Agent-keys vault id",
2394
+ "content": {
2395
+ "application/json": {
2396
+ "schema": {
2397
+ "$ref": "#/components/schemas/AgentKeysVaultResponse"
2398
+ }
2399
+ }
2400
+ }
2401
+ },
2402
+ "404": {
2403
+ "description": "Agent-keys vault not found"
2404
+ }
2405
+ }
2406
+ }
2407
+ },
2379
2408
  "/v1/org/invite": {
2380
2409
  "post": {
2381
2410
  "tags": [
@@ -2898,6 +2927,375 @@
2898
2927
  }
2899
2928
  }
2900
2929
  },
2930
+ "/v1/treasury": {
2931
+ "post": {
2932
+ "tags": [
2933
+ "Treasury"
2934
+ ],
2935
+ "summary": "Create a treasury (Safe multisig)",
2936
+ "operationId": "createTreasury",
2937
+ "security": [
2938
+ {
2939
+ "BearerAuth": []
2940
+ }
2941
+ ],
2942
+ "requestBody": {
2943
+ "required": true,
2944
+ "content": {
2945
+ "application/json": {
2946
+ "schema": {
2947
+ "$ref": "#/components/schemas/CreateTreasuryRequest"
2948
+ }
2949
+ }
2950
+ }
2951
+ },
2952
+ "responses": {
2953
+ "201": {
2954
+ "description": "Treasury created",
2955
+ "content": {
2956
+ "application/json": {
2957
+ "schema": {
2958
+ "$ref": "#/components/schemas/TreasuryResponse"
2959
+ }
2960
+ }
2961
+ }
2962
+ },
2963
+ "400": {
2964
+ "$ref": "#/components/responses/BadRequest"
2965
+ },
2966
+ "401": {
2967
+ "$ref": "#/components/responses/Unauthorized"
2968
+ }
2969
+ }
2970
+ },
2971
+ "get": {
2972
+ "tags": [
2973
+ "Treasury"
2974
+ ],
2975
+ "summary": "List treasuries",
2976
+ "operationId": "listTreasuries",
2977
+ "security": [
2978
+ {
2979
+ "BearerAuth": []
2980
+ }
2981
+ ],
2982
+ "responses": {
2983
+ "200": {
2984
+ "description": "List of treasuries",
2985
+ "content": {
2986
+ "application/json": {
2987
+ "schema": {
2988
+ "type": "object",
2989
+ "properties": {
2990
+ "treasuries": {
2991
+ "type": "array",
2992
+ "items": {
2993
+ "$ref": "#/components/schemas/TreasuryResponse"
2994
+ }
2995
+ }
2996
+ }
2997
+ }
2998
+ }
2999
+ }
3000
+ },
3001
+ "401": {
3002
+ "$ref": "#/components/responses/Unauthorized"
3003
+ }
3004
+ }
3005
+ }
3006
+ },
3007
+ "/v1/treasury/{treasury_id}": {
3008
+ "get": {
3009
+ "tags": [
3010
+ "Treasury"
3011
+ ],
3012
+ "summary": "Get treasury details",
3013
+ "operationId": "getTreasury",
3014
+ "security": [
3015
+ {
3016
+ "BearerAuth": []
3017
+ }
3018
+ ],
3019
+ "parameters": [
3020
+ {
3021
+ "name": "treasury_id",
3022
+ "in": "path",
3023
+ "required": true,
3024
+ "schema": {
3025
+ "type": "string",
3026
+ "format": "uuid"
3027
+ }
3028
+ }
3029
+ ],
3030
+ "responses": {
3031
+ "200": {
3032
+ "description": "Treasury details",
3033
+ "content": {
3034
+ "application/json": {
3035
+ "schema": {
3036
+ "$ref": "#/components/schemas/TreasuryResponse"
3037
+ }
3038
+ }
3039
+ }
3040
+ },
3041
+ "404": {
3042
+ "$ref": "#/components/responses/NotFound"
3043
+ }
3044
+ }
3045
+ }
3046
+ },
3047
+ "/v1/treasury/{treasury_id}/signers": {
3048
+ "post": {
3049
+ "tags": [
3050
+ "Treasury"
3051
+ ],
3052
+ "summary": "Add a signer to a treasury",
3053
+ "operationId": "addTreasurySigner",
3054
+ "security": [
3055
+ {
3056
+ "BearerAuth": []
3057
+ }
3058
+ ],
3059
+ "parameters": [
3060
+ {
3061
+ "name": "treasury_id",
3062
+ "in": "path",
3063
+ "required": true,
3064
+ "schema": {
3065
+ "type": "string",
3066
+ "format": "uuid"
3067
+ }
3068
+ }
3069
+ ],
3070
+ "requestBody": {
3071
+ "required": true,
3072
+ "content": {
3073
+ "application/json": {
3074
+ "schema": {
3075
+ "$ref": "#/components/schemas/AddSignerRequest"
3076
+ }
3077
+ }
3078
+ }
3079
+ },
3080
+ "responses": {
3081
+ "201": {
3082
+ "description": "Signer added"
3083
+ },
3084
+ "400": {
3085
+ "$ref": "#/components/responses/BadRequest"
3086
+ }
3087
+ }
3088
+ }
3089
+ },
3090
+ "/v1/treasury/{treasury_id}/signers/{signer_id}": {
3091
+ "delete": {
3092
+ "tags": [
3093
+ "Treasury"
3094
+ ],
3095
+ "summary": "Remove a signer from a treasury",
3096
+ "operationId": "removeTreasurySigner",
3097
+ "security": [
3098
+ {
3099
+ "BearerAuth": []
3100
+ }
3101
+ ],
3102
+ "parameters": [
3103
+ {
3104
+ "name": "treasury_id",
3105
+ "in": "path",
3106
+ "required": true,
3107
+ "schema": {
3108
+ "type": "string",
3109
+ "format": "uuid"
3110
+ }
3111
+ },
3112
+ {
3113
+ "name": "signer_id",
3114
+ "in": "path",
3115
+ "required": true,
3116
+ "schema": {
3117
+ "type": "string",
3118
+ "format": "uuid"
3119
+ }
3120
+ }
3121
+ ],
3122
+ "responses": {
3123
+ "204": {
3124
+ "description": "Signer removed"
3125
+ },
3126
+ "404": {
3127
+ "$ref": "#/components/responses/NotFound"
3128
+ }
3129
+ }
3130
+ }
3131
+ },
3132
+ "/v1/treasury/{treasury_id}/access-requests": {
3133
+ "post": {
3134
+ "tags": [
3135
+ "Treasury"
3136
+ ],
3137
+ "summary": "Request access to a treasury (agent-only)",
3138
+ "operationId": "requestTreasuryAccess",
3139
+ "security": [
3140
+ {
3141
+ "BearerAuth": []
3142
+ }
3143
+ ],
3144
+ "parameters": [
3145
+ {
3146
+ "name": "treasury_id",
3147
+ "in": "path",
3148
+ "required": true,
3149
+ "schema": {
3150
+ "type": "string",
3151
+ "format": "uuid"
3152
+ }
3153
+ }
3154
+ ],
3155
+ "responses": {
3156
+ "201": {
3157
+ "description": "Access request created",
3158
+ "content": {
3159
+ "application/json": {
3160
+ "schema": {
3161
+ "$ref": "#/components/schemas/AccessRequestResponse"
3162
+ }
3163
+ }
3164
+ }
3165
+ },
3166
+ "403": {
3167
+ "$ref": "#/components/responses/Forbidden"
3168
+ }
3169
+ }
3170
+ },
3171
+ "get": {
3172
+ "tags": [
3173
+ "Treasury"
3174
+ ],
3175
+ "summary": "List access requests for a treasury",
3176
+ "operationId": "listTreasuryAccessRequests",
3177
+ "security": [
3178
+ {
3179
+ "BearerAuth": []
3180
+ }
3181
+ ],
3182
+ "parameters": [
3183
+ {
3184
+ "name": "treasury_id",
3185
+ "in": "path",
3186
+ "required": true,
3187
+ "schema": {
3188
+ "type": "string",
3189
+ "format": "uuid"
3190
+ }
3191
+ }
3192
+ ],
3193
+ "responses": {
3194
+ "200": {
3195
+ "description": "List of access requests",
3196
+ "content": {
3197
+ "application/json": {
3198
+ "schema": {
3199
+ "type": "object",
3200
+ "properties": {
3201
+ "access_requests": {
3202
+ "type": "array",
3203
+ "items": {
3204
+ "$ref": "#/components/schemas/AccessRequestResponse"
3205
+ }
3206
+ }
3207
+ }
3208
+ }
3209
+ }
3210
+ }
3211
+ }
3212
+ }
3213
+ }
3214
+ },
3215
+ "/v1/treasury/{treasury_id}/access-requests/{request_id}/approve": {
3216
+ "post": {
3217
+ "tags": [
3218
+ "Treasury"
3219
+ ],
3220
+ "summary": "Approve an access request",
3221
+ "operationId": "approveTreasuryAccess",
3222
+ "security": [
3223
+ {
3224
+ "BearerAuth": []
3225
+ }
3226
+ ],
3227
+ "parameters": [
3228
+ {
3229
+ "name": "treasury_id",
3230
+ "in": "path",
3231
+ "required": true,
3232
+ "schema": {
3233
+ "type": "string",
3234
+ "format": "uuid"
3235
+ }
3236
+ },
3237
+ {
3238
+ "name": "request_id",
3239
+ "in": "path",
3240
+ "required": true,
3241
+ "schema": {
3242
+ "type": "string",
3243
+ "format": "uuid"
3244
+ }
3245
+ }
3246
+ ],
3247
+ "responses": {
3248
+ "200": {
3249
+ "description": "Access request approved"
3250
+ },
3251
+ "404": {
3252
+ "$ref": "#/components/responses/NotFound"
3253
+ }
3254
+ }
3255
+ }
3256
+ },
3257
+ "/v1/treasury/{treasury_id}/access-requests/{request_id}/deny": {
3258
+ "post": {
3259
+ "tags": [
3260
+ "Treasury"
3261
+ ],
3262
+ "summary": "Deny an access request",
3263
+ "operationId": "denyTreasuryAccess",
3264
+ "security": [
3265
+ {
3266
+ "BearerAuth": []
3267
+ }
3268
+ ],
3269
+ "parameters": [
3270
+ {
3271
+ "name": "treasury_id",
3272
+ "in": "path",
3273
+ "required": true,
3274
+ "schema": {
3275
+ "type": "string",
3276
+ "format": "uuid"
3277
+ }
3278
+ },
3279
+ {
3280
+ "name": "request_id",
3281
+ "in": "path",
3282
+ "required": true,
3283
+ "schema": {
3284
+ "type": "string",
3285
+ "format": "uuid"
3286
+ }
3287
+ }
3288
+ ],
3289
+ "responses": {
3290
+ "200": {
3291
+ "description": "Access request denied"
3292
+ },
3293
+ "404": {
3294
+ "$ref": "#/components/responses/NotFound"
3295
+ }
3296
+ }
3297
+ }
3298
+ },
2901
3299
  "/v1/admin/settings": {
2902
3300
  "get": {
2903
3301
  "tags": [
@@ -5507,6 +5905,15 @@
5507
5905
  }
5508
5906
  }
5509
5907
  },
5908
+ "AgentKeysVaultResponse": {
5909
+ "type": "object",
5910
+ "properties": {
5911
+ "vault_id": {
5912
+ "type": "string",
5913
+ "format": "uuid"
5914
+ }
5915
+ }
5916
+ },
5510
5917
  "UsageSummaryResponse": {
5511
5918
  "type": "object",
5512
5919
  "properties": {
@@ -6069,6 +6476,151 @@
6069
6476
  }
6070
6477
  }
6071
6478
  },
6479
+ "CreateTreasuryRequest": {
6480
+ "type": "object",
6481
+ "required": [
6482
+ "name",
6483
+ "chain",
6484
+ "chain_id",
6485
+ "threshold"
6486
+ ],
6487
+ "properties": {
6488
+ "name": {
6489
+ "type": "string"
6490
+ },
6491
+ "chain": {
6492
+ "type": "string"
6493
+ },
6494
+ "chain_id": {
6495
+ "type": "integer"
6496
+ },
6497
+ "threshold": {
6498
+ "type": "integer",
6499
+ "minimum": 1
6500
+ },
6501
+ "safe_address": {
6502
+ "type": "string",
6503
+ "description": "Pre-deployed Safe address (optional)"
6504
+ }
6505
+ }
6506
+ },
6507
+ "TreasuryResponse": {
6508
+ "type": "object",
6509
+ "properties": {
6510
+ "id": {
6511
+ "type": "string",
6512
+ "format": "uuid"
6513
+ },
6514
+ "org_id": {
6515
+ "type": "string",
6516
+ "format": "uuid"
6517
+ },
6518
+ "name": {
6519
+ "type": "string"
6520
+ },
6521
+ "safe_address": {
6522
+ "type": "string"
6523
+ },
6524
+ "chain": {
6525
+ "type": "string"
6526
+ },
6527
+ "chain_id": {
6528
+ "type": "integer"
6529
+ },
6530
+ "threshold": {
6531
+ "type": "integer"
6532
+ },
6533
+ "signers": {
6534
+ "type": "array",
6535
+ "items": {
6536
+ "$ref": "#/components/schemas/TreasurySignerResponse"
6537
+ }
6538
+ },
6539
+ "created_at": {
6540
+ "type": "string",
6541
+ "format": "date-time"
6542
+ }
6543
+ }
6544
+ },
6545
+ "TreasurySignerResponse": {
6546
+ "type": "object",
6547
+ "properties": {
6548
+ "id": {
6549
+ "type": "string",
6550
+ "format": "uuid"
6551
+ },
6552
+ "signer_type": {
6553
+ "type": "string",
6554
+ "enum": [
6555
+ "user",
6556
+ "agent"
6557
+ ]
6558
+ },
6559
+ "signer_id": {
6560
+ "type": "string",
6561
+ "format": "uuid"
6562
+ },
6563
+ "evm_address": {
6564
+ "type": "string"
6565
+ },
6566
+ "created_at": {
6567
+ "type": "string",
6568
+ "format": "date-time"
6569
+ }
6570
+ }
6571
+ },
6572
+ "AddSignerRequest": {
6573
+ "type": "object",
6574
+ "required": [
6575
+ "signer_type",
6576
+ "signer_id"
6577
+ ],
6578
+ "properties": {
6579
+ "signer_type": {
6580
+ "type": "string",
6581
+ "enum": [
6582
+ "user",
6583
+ "agent"
6584
+ ]
6585
+ },
6586
+ "signer_id": {
6587
+ "type": "string",
6588
+ "format": "uuid"
6589
+ }
6590
+ }
6591
+ },
6592
+ "AccessRequestResponse": {
6593
+ "type": "object",
6594
+ "properties": {
6595
+ "id": {
6596
+ "type": "string",
6597
+ "format": "uuid"
6598
+ },
6599
+ "treasury_id": {
6600
+ "type": "string",
6601
+ "format": "uuid"
6602
+ },
6603
+ "agent_id": {
6604
+ "type": "string",
6605
+ "format": "uuid"
6606
+ },
6607
+ "status": {
6608
+ "type": "string",
6609
+ "enum": [
6610
+ "pending",
6611
+ "approved",
6612
+ "denied"
6613
+ ]
6614
+ },
6615
+ "evm_address": {
6616
+ "type": "string"
6617
+ },
6618
+ "created_at": {
6619
+ "type": "string",
6620
+ "format": "date-time"
6621
+ }
6622
+ }
6623
+ },
6072
6624
  "PaymentRequirement": {
6073
6625
  "type": "object",
6074
6626
  "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
@@ -1516,6 +1518,22 @@ paths:
1516
1518
  schema:
1517
1519
  $ref: "#/components/schemas/OrgMemberListResponse"
1518
1520
 
1521
+ /v1/org/agent-keys-vault:
1522
+ get:
1523
+ tags: [Organization]
1524
+ summary: Get the org's __agent-keys vault id
1525
+ description: Returns the vault id for the caller's org agent-keys vault (used for revealing agent identity keys). Users only; 404 if the vault does not exist.
1526
+ operationId: getAgentKeysVault
1527
+ responses:
1528
+ "200":
1529
+ description: Agent-keys vault id
1530
+ content:
1531
+ application/json:
1532
+ schema:
1533
+ $ref: "#/components/schemas/AgentKeysVaultResponse"
1534
+ "404":
1535
+ description: Agent-keys vault not found
1536
+
1519
1537
  /v1/org/invite:
1520
1538
  post:
1521
1539
  tags: [Organization]
@@ -1849,6 +1867,232 @@ paths:
1849
1867
  "204":
1850
1868
  description: Rule deleted
1851
1869
 
1870
+ # ---------------------------------------------------------------------------
1871
+ # Treasury
1872
+ # ---------------------------------------------------------------------------
1873
+
1874
+ /v1/treasury:
1875
+ post:
1876
+ tags: [Treasury]
1877
+ summary: Create a treasury (Safe multisig)
1878
+ operationId: createTreasury
1879
+ security:
1880
+ - BearerAuth: []
1881
+ requestBody:
1882
+ required: true
1883
+ content:
1884
+ application/json:
1885
+ schema:
1886
+ $ref: "#/components/schemas/CreateTreasuryRequest"
1887
+ responses:
1888
+ "201":
1889
+ description: Treasury created
1890
+ content:
1891
+ application/json:
1892
+ schema:
1893
+ $ref: "#/components/schemas/TreasuryResponse"
1894
+ "400":
1895
+ $ref: "#/components/responses/BadRequest"
1896
+ "401":
1897
+ $ref: "#/components/responses/Unauthorized"
1898
+ get:
1899
+ tags: [Treasury]
1900
+ summary: List treasuries
1901
+ operationId: listTreasuries
1902
+ security:
1903
+ - BearerAuth: []
1904
+ responses:
1905
+ "200":
1906
+ description: List of treasuries
1907
+ content:
1908
+ application/json:
1909
+ schema:
1910
+ type: object
1911
+ properties:
1912
+ treasuries:
1913
+ type: array
1914
+ items:
1915
+ $ref: "#/components/schemas/TreasuryResponse"
1916
+ "401":
1917
+ $ref: "#/components/responses/Unauthorized"
1918
+
1919
+ /v1/treasury/{treasury_id}:
1920
+ get:
1921
+ tags: [Treasury]
1922
+ summary: Get treasury details
1923
+ operationId: getTreasury
1924
+ security:
1925
+ - BearerAuth: []
1926
+ parameters:
1927
+ - name: treasury_id
1928
+ in: path
1929
+ required: true
1930
+ schema:
1931
+ type: string
1932
+ format: uuid
1933
+ responses:
1934
+ "200":
1935
+ description: Treasury details
1936
+ content:
1937
+ application/json:
1938
+ schema:
1939
+ $ref: "#/components/schemas/TreasuryResponse"
1940
+ "404":
1941
+ $ref: "#/components/responses/NotFound"
1942
+
1943
+ /v1/treasury/{treasury_id}/signers:
1944
+ post:
1945
+ tags: [Treasury]
1946
+ summary: Add a signer to a treasury
1947
+ operationId: addTreasurySigner
1948
+ security:
1949
+ - BearerAuth: []
1950
+ parameters:
1951
+ - name: treasury_id
1952
+ in: path
1953
+ required: true
1954
+ schema:
1955
+ type: string
1956
+ format: uuid
1957
+ requestBody:
1958
+ required: true
1959
+ content:
1960
+ application/json:
1961
+ schema:
1962
+ $ref: "#/components/schemas/AddSignerRequest"
1963
+ responses:
1964
+ "201":
1965
+ description: Signer added
1966
+ "400":
1967
+ $ref: "#/components/responses/BadRequest"
1968
+
1969
+ /v1/treasury/{treasury_id}/signers/{signer_id}:
1970
+ delete:
1971
+ tags: [Treasury]
1972
+ summary: Remove a signer from a treasury
1973
+ operationId: removeTreasurySigner
1974
+ security:
1975
+ - BearerAuth: []
1976
+ parameters:
1977
+ - name: treasury_id
1978
+ in: path
1979
+ required: true
1980
+ schema:
1981
+ type: string
1982
+ format: uuid
1983
+ - name: signer_id
1984
+ in: path
1985
+ required: true
1986
+ schema:
1987
+ type: string
1988
+ format: uuid
1989
+ responses:
1990
+ "204":
1991
+ description: Signer removed
1992
+ "404":
1993
+ $ref: "#/components/responses/NotFound"
1994
+
1995
+ /v1/treasury/{treasury_id}/access-requests:
1996
+ post:
1997
+ tags: [Treasury]
1998
+ summary: Request access to a treasury (agent-only)
1999
+ operationId: requestTreasuryAccess
2000
+ security:
2001
+ - BearerAuth: []
2002
+ parameters:
2003
+ - name: treasury_id
2004
+ in: path
2005
+ required: true
2006
+ schema:
2007
+ type: string
2008
+ format: uuid
2009
+ responses:
2010
+ "201":
2011
+ description: Access request created
2012
+ content:
2013
+ application/json:
2014
+ schema:
2015
+ $ref: "#/components/schemas/AccessRequestResponse"
2016
+ "403":
2017
+ $ref: "#/components/responses/Forbidden"
2018
+ get:
2019
+ tags: [Treasury]
2020
+ summary: List access requests for a treasury
2021
+ operationId: listTreasuryAccessRequests
2022
+ security:
2023
+ - BearerAuth: []
2024
+ parameters:
2025
+ - name: treasury_id
2026
+ in: path
2027
+ required: true
2028
+ schema:
2029
+ type: string
2030
+ format: uuid
2031
+ responses:
2032
+ "200":
2033
+ description: List of access requests
2034
+ content:
2035
+ application/json:
2036
+ schema:
2037
+ type: object
2038
+ properties:
2039
+ access_requests:
2040
+ type: array
2041
+ items:
2042
+ $ref: "#/components/schemas/AccessRequestResponse"
2043
+
2044
+ /v1/treasury/{treasury_id}/access-requests/{request_id}/approve:
2045
+ post:
2046
+ tags: [Treasury]
2047
+ summary: Approve an access request
2048
+ operationId: approveTreasuryAccess
2049
+ security:
2050
+ - BearerAuth: []
2051
+ parameters:
2052
+ - name: treasury_id
2053
+ in: path
2054
+ required: true
2055
+ schema:
2056
+ type: string
2057
+ format: uuid
2058
+ - name: request_id
2059
+ in: path
2060
+ required: true
2061
+ schema:
2062
+ type: string
2063
+ format: uuid
2064
+ responses:
2065
+ "200":
2066
+ description: Access request approved
2067
+ "404":
2068
+ $ref: "#/components/responses/NotFound"
2069
+
2070
+ /v1/treasury/{treasury_id}/access-requests/{request_id}/deny:
2071
+ post:
2072
+ tags: [Treasury]
2073
+ summary: Deny an access request
2074
+ operationId: denyTreasuryAccess
2075
+ security:
2076
+ - BearerAuth: []
2077
+ parameters:
2078
+ - name: treasury_id
2079
+ in: path
2080
+ required: true
2081
+ schema:
2082
+ type: string
2083
+ format: uuid
2084
+ - name: request_id
2085
+ in: path
2086
+ required: true
2087
+ schema:
2088
+ type: string
2089
+ format: uuid
2090
+ responses:
2091
+ "200":
2092
+ description: Access request denied
2093
+ "404":
2094
+ $ref: "#/components/responses/NotFound"
2095
+
1852
2096
  # ---------------------------------------------------------------------------
1853
2097
  # Admin
1854
2098
  # ---------------------------------------------------------------------------
@@ -3653,6 +3897,13 @@ components:
3653
3897
  email:
3654
3898
  type: string
3655
3899
 
3900
+ AgentKeysVaultResponse:
3901
+ type: object
3902
+ properties:
3903
+ vault_id:
3904
+ type: string
3905
+ format: uuid
3906
+
3656
3907
  # --- Billing ---
3657
3908
 
3658
3909
  UsageSummaryResponse:
@@ -4042,6 +4293,102 @@ components:
4042
4293
  minimum: 1
4043
4294
  maximum: 3650
4044
4295
 
4296
+ # --- Treasury ---
4297
+
4298
+ CreateTreasuryRequest:
4299
+ type: object
4300
+ required: [name, chain, chain_id, threshold]
4301
+ properties:
4302
+ name:
4303
+ type: string
4304
+ chain:
4305
+ type: string
4306
+ chain_id:
4307
+ type: integer
4308
+ threshold:
4309
+ type: integer
4310
+ minimum: 1
4311
+ safe_address:
4312
+ type: string
4313
+ description: Pre-deployed Safe address (optional)
4314
+
4315
+ TreasuryResponse:
4316
+ type: object
4317
+ properties:
4318
+ id:
4319
+ type: string
4320
+ format: uuid
4321
+ org_id:
4322
+ type: string
4323
+ format: uuid
4324
+ name:
4325
+ type: string
4326
+ safe_address:
4327
+ type: string
4328
+ chain:
4329
+ type: string
4330
+ chain_id:
4331
+ type: integer
4332
+ threshold:
4333
+ type: integer
4334
+ signers:
4335
+ type: array
4336
+ items:
4337
+ $ref: "#/components/schemas/TreasurySignerResponse"
4338
+ created_at:
4339
+ type: string
4340
+ format: date-time
4341
+
4342
+ TreasurySignerResponse:
4343
+ type: object
4344
+ properties:
4345
+ id:
4346
+ type: string
4347
+ format: uuid
4348
+ signer_type:
4349
+ type: string
4350
+ enum: [user, agent]
4351
+ signer_id:
4352
+ type: string
4353
+ format: uuid
4354
+ evm_address:
4355
+ type: string
4356
+ created_at:
4357
+ type: string
4358
+ format: date-time
4359
+
4360
+ AddSignerRequest:
4361
+ type: object
4362
+ required: [signer_type, signer_id]
4363
+ properties:
4364
+ signer_type:
4365
+ type: string
4366
+ enum: [user, agent]
4367
+ signer_id:
4368
+ type: string
4369
+ format: uuid
4370
+
4371
+ AccessRequestResponse:
4372
+ type: object
4373
+ properties:
4374
+ id:
4375
+ type: string
4376
+ format: uuid
4377
+ treasury_id:
4378
+ type: string
4379
+ format: uuid
4380
+ agent_id:
4381
+ type: string
4382
+ format: uuid
4383
+ status:
4384
+ type: string
4385
+ enum: [pending, approved, denied]
4386
+ evm_address:
4387
+ type: string
4388
+ created_at:
4389
+ type: string
4390
+ format: date-time
4391
+
4045
4392
  # --- x402 ---
4046
4393
 
4047
4394
  PaymentRequirement:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1claw/openapi-spec",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "OpenAPI 3.1.0 specification for the 1Claw Vault API — generate clients in any language",
5
5
  "license": "MIT",
6
6
  "repository": {