@1claw/openapi-spec 0.50.0 → 0.51.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 +862 -5
  2. package/openapi.yaml +553 -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.51.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
  # ---------------------------------------------------------------------------
@@ -15923,6 +16267,9 @@ components:
15923
16267
  type: string
15924
16268
  image:
15925
16269
  type: string
16270
+ environment:
16271
+ type: string
16272
+ description: Vault environment to resolve env vars from (e.g. production, preview, development)
15926
16273
  env_public:
15927
16274
  type: object
15928
16275
  additionalProperties:
@@ -15959,6 +16306,9 @@ components:
15959
16306
  type: string
15960
16307
  image:
15961
16308
  type: string
16309
+ environment:
16310
+ type: string
16311
+ description: Vault environment to resolve env vars from
15962
16312
  env_public:
15963
16313
  type: object
15964
16314
  additionalProperties:
@@ -16008,6 +16358,10 @@ components:
16008
16358
  image:
16009
16359
  type: string
16010
16360
  nullable: true
16361
+ environment:
16362
+ type: string
16363
+ nullable: true
16364
+ description: Vault environment for env var resolution
16011
16365
  env_public:
16012
16366
  type: object
16013
16367
  additionalProperties:
@@ -17773,3 +18127,201 @@ components:
17773
18127
  created_at:
17774
18128
  type: string
17775
18129
  format: date-time
18130
+
18131
+ # -------------------------------------------------------------------
18132
+ # Environment Variables
18133
+ # -------------------------------------------------------------------
18134
+
18135
+ EnvVar:
18136
+ type: object
18137
+ properties:
18138
+ id:
18139
+ type: string
18140
+ format: uuid
18141
+ key:
18142
+ type: string
18143
+ environments:
18144
+ type: array
18145
+ items:
18146
+ type: string
18147
+ git_branch:
18148
+ type: string
18149
+ nullable: true
18150
+ sensitive:
18151
+ type: boolean
18152
+ comment:
18153
+ type: string
18154
+ nullable: true
18155
+ value:
18156
+ type: string
18157
+ nullable: true
18158
+ description: Null for sensitive vars in list responses
18159
+ version:
18160
+ type: integer
18161
+ created_by:
18162
+ type: string
18163
+ nullable: true
18164
+ created_at:
18165
+ type: string
18166
+ format: date-time
18167
+ updated_at:
18168
+ type: string
18169
+ format: date-time
18170
+
18171
+ CreateEnvVarRequest:
18172
+ type: object
18173
+ required: [key, value]
18174
+ properties:
18175
+ key:
18176
+ type: string
18177
+ description: Uppercase alphanumeric + underscore, 1-256 chars
18178
+ value:
18179
+ type: string
18180
+ environments:
18181
+ type: array
18182
+ items:
18183
+ type: string
18184
+ default: [production, preview, development]
18185
+ git_branch:
18186
+ type: string
18187
+ description: Branch override (preview only)
18188
+ sensitive:
18189
+ type: boolean
18190
+ default: false
18191
+ comment:
18192
+ type: string
18193
+
18194
+ UpdateEnvVarRequest:
18195
+ type: object
18196
+ properties:
18197
+ value:
18198
+ type: string
18199
+ environments:
18200
+ type: array
18201
+ items:
18202
+ type: string
18203
+ sensitive:
18204
+ type: boolean
18205
+ comment:
18206
+ type: string
18207
+
18208
+ ResolveEnvVarsResponse:
18209
+ type: object
18210
+ properties:
18211
+ vars:
18212
+ type: object
18213
+ additionalProperties:
18214
+ type: string
18215
+ sources:
18216
+ type: object
18217
+ additionalProperties:
18218
+ type: string
18219
+ enum: [shared, vault, branch_override]
18220
+ environment:
18221
+ type: string
18222
+ git_branch:
18223
+ type: string
18224
+ nullable: true
18225
+ resolved_at:
18226
+ type: string
18227
+ format: date-time
18228
+
18229
+ VaultEnvironment:
18230
+ type: object
18231
+ properties:
18232
+ id:
18233
+ type: string
18234
+ format: uuid
18235
+ slug:
18236
+ type: string
18237
+ description:
18238
+ type: string
18239
+ nullable: true
18240
+ is_builtin:
18241
+ type: boolean
18242
+ copied_from:
18243
+ type: string
18244
+ nullable: true
18245
+ is_detached:
18246
+ type: boolean
18247
+ created_at:
18248
+ type: string
18249
+ format: date-time
18250
+
18251
+ CreateEnvironmentRequest:
18252
+ type: object
18253
+ required: [slug]
18254
+ properties:
18255
+ slug:
18256
+ type: string
18257
+ description: Lowercase alphanumeric + hyphens, 2-30 chars
18258
+ description:
18259
+ type: string
18260
+ copy_from:
18261
+ type: string
18262
+ description: Copy env vars from this environment
18263
+
18264
+ OrgEnvVar:
18265
+ type: object
18266
+ properties:
18267
+ id:
18268
+ type: string
18269
+ format: uuid
18270
+ key:
18271
+ type: string
18272
+ environments:
18273
+ type: array
18274
+ items:
18275
+ type: string
18276
+ sensitive:
18277
+ type: boolean
18278
+ comment:
18279
+ type: string
18280
+ nullable: true
18281
+ value:
18282
+ type: string
18283
+ nullable: true
18284
+ version:
18285
+ type: integer
18286
+ linked_vaults:
18287
+ type: array
18288
+ items:
18289
+ type: string
18290
+ format: uuid
18291
+ created_at:
18292
+ type: string
18293
+ format: date-time
18294
+ updated_at:
18295
+ type: string
18296
+ format: date-time
18297
+
18298
+ CreateOrgEnvVarRequest:
18299
+ type: object
18300
+ required: [key, value]
18301
+ properties:
18302
+ key:
18303
+ type: string
18304
+ value:
18305
+ type: string
18306
+ environments:
18307
+ type: array
18308
+ items:
18309
+ type: string
18310
+ default: [production, preview, development]
18311
+ sensitive:
18312
+ type: boolean
18313
+ default: false
18314
+ comment:
18315
+ type: string
18316
+
18317
+ UpdateOrgEnvVarRequest:
18318
+ type: object
18319
+ properties:
18320
+ value:
18321
+ type: string
18322
+ environments:
18323
+ type: array
18324
+ items:
18325
+ type: string
18326
+ comment:
18327
+ 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.51.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": {