@1claw/openapi-spec 0.50.0 → 0.52.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.
Files changed (3) hide show
  1. package/openapi.json +908 -1
  2. package/openapi.yaml +592 -1
  3. 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.36.0
5
+ version: 0.52.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,
@@ -110,6 +110,8 @@ tags:
110
110
  description: Sub-organization management
111
111
  - name: Portfolio
112
112
  description: Unified balance aggregator
113
+ - name: Environment Variables
114
+ description: Per-vault and org-shared environment variable management
113
115
 
114
116
  # =============================================================================
115
117
  # PATHS
@@ -1984,6 +1986,216 @@ paths:
1984
1986
  "404":
1985
1987
  $ref: "#/components/responses/NotFound"
1986
1988
 
1989
+ # ---------------------------------------------------------------------------
1990
+ # Environment Variables (per-vault)
1991
+ # ---------------------------------------------------------------------------
1992
+
1993
+ /v1/vaults/{vault_id}/env-vars:
1994
+ get:
1995
+ tags: [Environment Variables]
1996
+ summary: List environment variables
1997
+ description: List all environment variables for a vault, optionally filtered by environment.
1998
+ operationId: listEnvVars
1999
+ parameters:
2000
+ - $ref: "#/components/parameters/VaultId"
2001
+ - name: environment
2002
+ in: query
2003
+ schema:
2004
+ type: string
2005
+ description: Filter by environment (production, preview, development, or custom)
2006
+ responses:
2007
+ "200":
2008
+ description: Environment variable list
2009
+ content:
2010
+ application/json:
2011
+ schema:
2012
+ type: object
2013
+ properties:
2014
+ env_vars:
2015
+ type: array
2016
+ items:
2017
+ $ref: "#/components/schemas/EnvVar"
2018
+ post:
2019
+ tags: [Environment Variables]
2020
+ summary: Create environment variable
2021
+ operationId: createEnvVar
2022
+ parameters:
2023
+ - $ref: "#/components/parameters/VaultId"
2024
+ requestBody:
2025
+ required: true
2026
+ content:
2027
+ application/json:
2028
+ schema:
2029
+ $ref: "#/components/schemas/CreateEnvVarRequest"
2030
+ responses:
2031
+ "201":
2032
+ description: Environment variable created
2033
+ content:
2034
+ application/json:
2035
+ schema:
2036
+ $ref: "#/components/schemas/EnvVar"
2037
+ "400":
2038
+ $ref: "#/components/responses/BadRequest"
2039
+
2040
+ /v1/vaults/{vault_id}/env-vars/resolve:
2041
+ get:
2042
+ tags: [Environment Variables]
2043
+ summary: Resolve environment variables
2044
+ description: Resolve the final KEY=VALUE set for an environment with full precedence (shared < vault < branch override).
2045
+ operationId: resolveEnvVars
2046
+ parameters:
2047
+ - $ref: "#/components/parameters/VaultId"
2048
+ - name: environment
2049
+ in: query
2050
+ required: true
2051
+ schema:
2052
+ type: string
2053
+ - name: git_branch
2054
+ in: query
2055
+ schema:
2056
+ type: string
2057
+ responses:
2058
+ "200":
2059
+ description: Resolved environment variables
2060
+ content:
2061
+ application/json:
2062
+ schema:
2063
+ $ref: "#/components/schemas/ResolveEnvVarsResponse"
2064
+
2065
+ /v1/vaults/{vault_id}/env-vars/{key}:
2066
+ get:
2067
+ tags: [Environment Variables]
2068
+ summary: Get environment variable
2069
+ operationId: getEnvVar
2070
+ parameters:
2071
+ - $ref: "#/components/parameters/VaultId"
2072
+ - name: key
2073
+ in: path
2074
+ required: true
2075
+ schema:
2076
+ type: string
2077
+ - name: environment
2078
+ in: query
2079
+ schema:
2080
+ type: string
2081
+ responses:
2082
+ "200":
2083
+ description: Environment variable
2084
+ content:
2085
+ application/json:
2086
+ schema:
2087
+ $ref: "#/components/schemas/EnvVar"
2088
+ "404":
2089
+ $ref: "#/components/responses/NotFound"
2090
+ patch:
2091
+ tags: [Environment Variables]
2092
+ summary: Update environment variable
2093
+ operationId: updateEnvVar
2094
+ parameters:
2095
+ - $ref: "#/components/parameters/VaultId"
2096
+ - name: key
2097
+ in: path
2098
+ required: true
2099
+ schema:
2100
+ type: string
2101
+ - name: environment
2102
+ in: query
2103
+ schema:
2104
+ type: string
2105
+ requestBody:
2106
+ content:
2107
+ application/json:
2108
+ schema:
2109
+ $ref: "#/components/schemas/UpdateEnvVarRequest"
2110
+ responses:
2111
+ "200":
2112
+ description: Environment variable updated
2113
+ content:
2114
+ application/json:
2115
+ schema:
2116
+ $ref: "#/components/schemas/EnvVar"
2117
+ "404":
2118
+ $ref: "#/components/responses/NotFound"
2119
+ delete:
2120
+ tags: [Environment Variables]
2121
+ summary: Delete environment variable
2122
+ operationId: deleteEnvVar
2123
+ parameters:
2124
+ - $ref: "#/components/parameters/VaultId"
2125
+ - name: key
2126
+ in: path
2127
+ required: true
2128
+ schema:
2129
+ type: string
2130
+ - name: environment
2131
+ in: query
2132
+ schema:
2133
+ type: string
2134
+ responses:
2135
+ "204":
2136
+ description: Deleted
2137
+
2138
+ # ---------------------------------------------------------------------------
2139
+ # Vault Environments
2140
+ # ---------------------------------------------------------------------------
2141
+
2142
+ /v1/vaults/{vault_id}/environments:
2143
+ get:
2144
+ tags: [Environment Variables]
2145
+ summary: List vault environments
2146
+ operationId: listVaultEnvironments
2147
+ parameters:
2148
+ - $ref: "#/components/parameters/VaultId"
2149
+ responses:
2150
+ "200":
2151
+ description: Vault environment list
2152
+ content:
2153
+ application/json:
2154
+ schema:
2155
+ type: object
2156
+ properties:
2157
+ environments:
2158
+ type: array
2159
+ items:
2160
+ $ref: "#/components/schemas/VaultEnvironment"
2161
+ post:
2162
+ tags: [Environment Variables]
2163
+ summary: Create custom environment
2164
+ operationId: createVaultEnvironment
2165
+ parameters:
2166
+ - $ref: "#/components/parameters/VaultId"
2167
+ requestBody:
2168
+ required: true
2169
+ content:
2170
+ application/json:
2171
+ schema:
2172
+ $ref: "#/components/schemas/CreateEnvironmentRequest"
2173
+ responses:
2174
+ "201":
2175
+ description: Environment created
2176
+ content:
2177
+ application/json:
2178
+ schema:
2179
+ $ref: "#/components/schemas/VaultEnvironment"
2180
+ "400":
2181
+ $ref: "#/components/responses/BadRequest"
2182
+
2183
+ /v1/vaults/{vault_id}/environments/{slug}:
2184
+ delete:
2185
+ tags: [Environment Variables]
2186
+ summary: Delete custom environment
2187
+ operationId: deleteVaultEnvironment
2188
+ parameters:
2189
+ - $ref: "#/components/parameters/VaultId"
2190
+ - name: slug
2191
+ in: path
2192
+ required: true
2193
+ schema:
2194
+ type: string
2195
+ responses:
2196
+ "204":
2197
+ description: Deleted
2198
+
1987
2199
  # ---------------------------------------------------------------------------
1988
2200
  # Agent Self-Enrollment (public)
1989
2201
  # ---------------------------------------------------------------------------
@@ -3483,6 +3695,138 @@ paths:
3483
3695
  "204":
3484
3696
  description: Member removed
3485
3697
 
3698
+ # ---------------------------------------------------------------------------
3699
+ # Org Shared Environment Variables
3700
+ # ---------------------------------------------------------------------------
3701
+
3702
+ /v1/org/env-vars:
3703
+ get:
3704
+ tags: [Organization]
3705
+ summary: List org shared environment variables
3706
+ operationId: listOrgEnvVars
3707
+ responses:
3708
+ "200":
3709
+ description: Org shared environment variable list
3710
+ content:
3711
+ application/json:
3712
+ schema:
3713
+ type: object
3714
+ properties:
3715
+ env_vars:
3716
+ type: array
3717
+ items:
3718
+ $ref: "#/components/schemas/OrgEnvVar"
3719
+ post:
3720
+ tags: [Organization]
3721
+ summary: Create org shared environment variable
3722
+ operationId: createOrgEnvVar
3723
+ requestBody:
3724
+ required: true
3725
+ content:
3726
+ application/json:
3727
+ schema:
3728
+ $ref: "#/components/schemas/CreateOrgEnvVarRequest"
3729
+ responses:
3730
+ "201":
3731
+ description: Org shared env var created
3732
+ content:
3733
+ application/json:
3734
+ schema:
3735
+ $ref: "#/components/schemas/OrgEnvVar"
3736
+ "400":
3737
+ $ref: "#/components/responses/BadRequest"
3738
+
3739
+ /v1/org/env-vars/{key}:
3740
+ patch:
3741
+ tags: [Organization]
3742
+ summary: Update org shared environment variable
3743
+ operationId: updateOrgEnvVar
3744
+ parameters:
3745
+ - name: key
3746
+ in: path
3747
+ required: true
3748
+ schema:
3749
+ type: string
3750
+ requestBody:
3751
+ content:
3752
+ application/json:
3753
+ schema:
3754
+ $ref: "#/components/schemas/UpdateOrgEnvVarRequest"
3755
+ responses:
3756
+ "200":
3757
+ description: Org shared env var updated
3758
+ content:
3759
+ application/json:
3760
+ schema:
3761
+ $ref: "#/components/schemas/OrgEnvVar"
3762
+ "404":
3763
+ $ref: "#/components/responses/NotFound"
3764
+
3765
+ /v1/org/env-vars/{id}:
3766
+ delete:
3767
+ tags: [Organization]
3768
+ summary: Delete org shared environment variable
3769
+ operationId: deleteOrgEnvVar
3770
+ parameters:
3771
+ - name: id
3772
+ in: path
3773
+ required: true
3774
+ schema:
3775
+ type: string
3776
+ format: uuid
3777
+ responses:
3778
+ "204":
3779
+ description: Deleted
3780
+
3781
+ /v1/org/env-vars/{id}/link:
3782
+ post:
3783
+ tags: [Organization]
3784
+ summary: Link org shared env var to a vault
3785
+ operationId: linkOrgEnvVar
3786
+ parameters:
3787
+ - name: id
3788
+ in: path
3789
+ required: true
3790
+ schema:
3791
+ type: string
3792
+ format: uuid
3793
+ requestBody:
3794
+ required: true
3795
+ content:
3796
+ application/json:
3797
+ schema:
3798
+ type: object
3799
+ required: [vault_id]
3800
+ properties:
3801
+ vault_id:
3802
+ type: string
3803
+ format: uuid
3804
+ responses:
3805
+ "201":
3806
+ description: Linked
3807
+
3808
+ /v1/org/env-vars/{id}/links/{vault_id}:
3809
+ delete:
3810
+ tags: [Organization]
3811
+ summary: Unlink org shared env var from a vault
3812
+ operationId: unlinkOrgEnvVar
3813
+ parameters:
3814
+ - name: id
3815
+ in: path
3816
+ required: true
3817
+ schema:
3818
+ type: string
3819
+ format: uuid
3820
+ - name: vault_id
3821
+ in: path
3822
+ required: true
3823
+ schema:
3824
+ type: string
3825
+ format: uuid
3826
+ responses:
3827
+ "204":
3828
+ description: Unlinked
3829
+
3486
3830
  # ---------------------------------------------------------------------------
3487
3831
  # Billing
3488
3832
  # ---------------------------------------------------------------------------
@@ -11113,6 +11457,17 @@ components:
11113
11457
  format: date-time
11114
11458
  nullable: true
11115
11459
  description: Optional expiration time for the agent's API key.
11460
+ environment:
11461
+ type: string
11462
+ description: Named environment for this agent (production, preview, development, or custom).
11463
+ environment_locked:
11464
+ type: boolean
11465
+ default: false
11466
+ description: When true, the environment tag cannot be changed after creation.
11467
+ env_auto_resolve:
11468
+ type: boolean
11469
+ default: false
11470
+ description: When true, env var resolve endpoints auto-fill environment from this agent's tag.
11116
11471
 
11117
11472
  UpdateAgentRequest:
11118
11473
  type: object
@@ -11265,6 +11620,20 @@ components:
11265
11620
  format: date-time
11266
11621
  nullable: true
11267
11622
  description: Optional expiration time for the agent's API key. Set to null to clear.
11623
+ environment:
11624
+ type: string
11625
+ nullable: true
11626
+ description: Named environment for this agent (production, preview, development, or custom).
11627
+ environment_locked:
11628
+ type: boolean
11629
+ description: When true, the environment tag cannot be changed after creation.
11630
+ env_auto_resolve:
11631
+ type: boolean
11632
+ description: When true, env var resolve endpoints auto-fill environment from this agent's tag.
11633
+ per_environment_guardrails:
11634
+ type: object
11635
+ additionalProperties: true
11636
+ description: Per-environment guardrail overrides keyed by environment slug.
11268
11637
 
11269
11638
  AgentResponse:
11270
11639
  type: object
@@ -11493,6 +11862,20 @@ components:
11493
11862
  description: Multi-chain; one Safe per chain
11494
11863
  items:
11495
11864
  $ref: "#/components/schemas/AgentSmartAccountResponse"
11865
+ environment:
11866
+ type: string
11867
+ nullable: true
11868
+ description: Named environment this agent belongs to (production, preview, development, or custom).
11869
+ environment_locked:
11870
+ type: boolean
11871
+ description: When true, the environment tag is locked and cannot be changed.
11872
+ env_auto_resolve:
11873
+ type: boolean
11874
+ description: When true, env var resolve endpoints auto-fill environment from this agent's tag.
11875
+ per_environment_guardrails:
11876
+ type: object
11877
+ additionalProperties: true
11878
+ description: Per-environment guardrail overrides keyed by environment slug.
11496
11879
 
11497
11880
  KnownToken:
11498
11881
  type: object
@@ -15923,6 +16306,9 @@ components:
15923
16306
  type: string
15924
16307
  image:
15925
16308
  type: string
16309
+ environment:
16310
+ type: string
16311
+ description: Vault environment to resolve env vars from (e.g. production, preview, development)
15926
16312
  env_public:
15927
16313
  type: object
15928
16314
  additionalProperties:
@@ -15959,6 +16345,9 @@ components:
15959
16345
  type: string
15960
16346
  image:
15961
16347
  type: string
16348
+ environment:
16349
+ type: string
16350
+ description: Vault environment to resolve env vars from
15962
16351
  env_public:
15963
16352
  type: object
15964
16353
  additionalProperties:
@@ -16008,6 +16397,10 @@ components:
16008
16397
  image:
16009
16398
  type: string
16010
16399
  nullable: true
16400
+ environment:
16401
+ type: string
16402
+ nullable: true
16403
+ description: Vault environment for env var resolution
16011
16404
  env_public:
16012
16405
  type: object
16013
16406
  additionalProperties:
@@ -17773,3 +18166,201 @@ components:
17773
18166
  created_at:
17774
18167
  type: string
17775
18168
  format: date-time
18169
+
18170
+ # -------------------------------------------------------------------
18171
+ # Environment Variables
18172
+ # -------------------------------------------------------------------
18173
+
18174
+ EnvVar:
18175
+ type: object
18176
+ properties:
18177
+ id:
18178
+ type: string
18179
+ format: uuid
18180
+ key:
18181
+ type: string
18182
+ environments:
18183
+ type: array
18184
+ items:
18185
+ type: string
18186
+ git_branch:
18187
+ type: string
18188
+ nullable: true
18189
+ sensitive:
18190
+ type: boolean
18191
+ comment:
18192
+ type: string
18193
+ nullable: true
18194
+ value:
18195
+ type: string
18196
+ nullable: true
18197
+ description: Null for sensitive vars in list responses
18198
+ version:
18199
+ type: integer
18200
+ created_by:
18201
+ type: string
18202
+ nullable: true
18203
+ created_at:
18204
+ type: string
18205
+ format: date-time
18206
+ updated_at:
18207
+ type: string
18208
+ format: date-time
18209
+
18210
+ CreateEnvVarRequest:
18211
+ type: object
18212
+ required: [key, value]
18213
+ properties:
18214
+ key:
18215
+ type: string
18216
+ description: Uppercase alphanumeric + underscore, 1-256 chars
18217
+ value:
18218
+ type: string
18219
+ environments:
18220
+ type: array
18221
+ items:
18222
+ type: string
18223
+ default: [production, preview, development]
18224
+ git_branch:
18225
+ type: string
18226
+ description: Branch override (preview only)
18227
+ sensitive:
18228
+ type: boolean
18229
+ default: false
18230
+ comment:
18231
+ type: string
18232
+
18233
+ UpdateEnvVarRequest:
18234
+ type: object
18235
+ properties:
18236
+ value:
18237
+ type: string
18238
+ environments:
18239
+ type: array
18240
+ items:
18241
+ type: string
18242
+ sensitive:
18243
+ type: boolean
18244
+ comment:
18245
+ type: string
18246
+
18247
+ ResolveEnvVarsResponse:
18248
+ type: object
18249
+ properties:
18250
+ vars:
18251
+ type: object
18252
+ additionalProperties:
18253
+ type: string
18254
+ sources:
18255
+ type: object
18256
+ additionalProperties:
18257
+ type: string
18258
+ enum: [shared, vault, branch_override]
18259
+ environment:
18260
+ type: string
18261
+ git_branch:
18262
+ type: string
18263
+ nullable: true
18264
+ resolved_at:
18265
+ type: string
18266
+ format: date-time
18267
+
18268
+ VaultEnvironment:
18269
+ type: object
18270
+ properties:
18271
+ id:
18272
+ type: string
18273
+ format: uuid
18274
+ slug:
18275
+ type: string
18276
+ description:
18277
+ type: string
18278
+ nullable: true
18279
+ is_builtin:
18280
+ type: boolean
18281
+ copied_from:
18282
+ type: string
18283
+ nullable: true
18284
+ is_detached:
18285
+ type: boolean
18286
+ created_at:
18287
+ type: string
18288
+ format: date-time
18289
+
18290
+ CreateEnvironmentRequest:
18291
+ type: object
18292
+ required: [slug]
18293
+ properties:
18294
+ slug:
18295
+ type: string
18296
+ description: Lowercase alphanumeric + hyphens, 2-30 chars
18297
+ description:
18298
+ type: string
18299
+ copy_from:
18300
+ type: string
18301
+ description: Copy env vars from this environment
18302
+
18303
+ OrgEnvVar:
18304
+ type: object
18305
+ properties:
18306
+ id:
18307
+ type: string
18308
+ format: uuid
18309
+ key:
18310
+ type: string
18311
+ environments:
18312
+ type: array
18313
+ items:
18314
+ type: string
18315
+ sensitive:
18316
+ type: boolean
18317
+ comment:
18318
+ type: string
18319
+ nullable: true
18320
+ value:
18321
+ type: string
18322
+ nullable: true
18323
+ version:
18324
+ type: integer
18325
+ linked_vaults:
18326
+ type: array
18327
+ items:
18328
+ type: string
18329
+ format: uuid
18330
+ created_at:
18331
+ type: string
18332
+ format: date-time
18333
+ updated_at:
18334
+ type: string
18335
+ format: date-time
18336
+
18337
+ CreateOrgEnvVarRequest:
18338
+ type: object
18339
+ required: [key, value]
18340
+ properties:
18341
+ key:
18342
+ type: string
18343
+ value:
18344
+ type: string
18345
+ environments:
18346
+ type: array
18347
+ items:
18348
+ type: string
18349
+ default: [production, preview, development]
18350
+ sensitive:
18351
+ type: boolean
18352
+ default: false
18353
+ comment:
18354
+ type: string
18355
+
18356
+ UpdateOrgEnvVarRequest:
18357
+ type: object
18358
+ properties:
18359
+ value:
18360
+ type: string
18361
+ environments:
18362
+ type: array
18363
+ items:
18364
+ type: string
18365
+ comment:
18366
+ type: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1claw/openapi-spec",
3
- "version": "0.50.0",
3
+ "version": "0.52.0",
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": {