Skip to content

Commit 5c17e2d

Browse files
feat: Limit free organizations to three vaults
Stainless-Generated-From: c92a896c34a16833a715e578fbfbaa4f487bcc1c
1 parent 0594999 commit 5c17e2d

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

‎src/resources/organization/entitlements.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ export namespace OrgEntitlements {
212212
* Effective organization-wide concurrent app invocation ceiling.
213213
*/
214214
max_concurrent_invocations: number;
215+
216+
/**
217+
* Maximum non-deleted vaults allowed org-wide across all projects. Null means
218+
* unlimited. The vaults feature flag still controls access.
219+
*/
220+
max_vaults: number | null;
215221
}
216222

217223
export interface Plan {

‎src/resources/organization/limits.ts‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { RequestOptions } from '../../internal/request-options';
99
*/
1010
export class Limits extends APIResource {
1111
/**
12-
* Get the organization's effective limits and managed auth usage.
12+
* Get the organization's effective limits and managed auth and vault usage.
1313
*/
1414
retrieve(options?: RequestOptions): APIPromise<OrgLimits> {
1515
return this._client.get('/org/limits', options);
@@ -39,13 +39,24 @@ export interface OrgLimits {
3939
*/
4040
max_auth_connections: number | null;
4141

42+
/**
43+
* Maximum non-deleted vaults allowed org-wide across all projects. Null means
44+
* unlimited.
45+
*/
46+
max_vaults: number | null;
47+
4248
/**
4349
* Smallest health_check_interval the organization's plan accepts on a managed auth
4450
* connection. Requests below this are rejected with 400. Existing connections
4551
* stored below the floor are grandfathered until edited.
4652
*/
4753
min_health_check_interval_seconds: number;
4854

55+
/**
56+
* Current non-deleted vault count across all projects in the organization.
57+
*/
58+
vaults_used: number;
59+
4960
/**
5061
* Default maximum concurrent browsers applied to every project that has no
5162
* explicit per-project override. Null means no org-level default, so such projects

‎src/resources/vaults/vaults.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ export class Vaults extends APIResource {
6060
}
6161

6262
/**
63-
* Create or retrieve a vault by immutable name
63+
* Free organizations can store up to 3 non-deleted vaults across all projects.
64+
* Paid plans and active trials have no vault cap. Retrieving an existing vault by
65+
* name succeeds even at the limit.
6466
*/
6567
upsert(body: VaultUpsertParams, options?: RequestOptions): APIPromise<Vault> {
6668
return this._client.post('/vaults', { body, ...options });

0 commit comments

Comments
 (0)