-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathentitlements.ts
More file actions
257 lines (210 loc) · 6.71 KB
/
Copy pathentitlements.ts
File metadata and controls
257 lines (210 loc) · 6.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../../core/resource';
import { APIPromise } from '../../core/api-promise';
import { RequestOptions } from '../../internal/request-options';
/**
* Read and manage organization-level limits.
*/
export class Entitlements extends APIResource {
/**
* Get the authenticated organization's effective feature access and constraints
* after applying its plan, active trial treatment, plan status, and
* organization-specific overrides. Null constraint values mean unlimited.
*/
retrieve(options?: RequestOptions): APIPromise<OrgEntitlements> {
return this._client.get('/org/entitlements', options);
}
}
/**
* Effective feature access and constraints for the authenticated organization.
* Values already include trial treatment, plan status, and organization-specific
* overrides; consumers should use these resolved values instead of comparing plan
* IDs.
*/
export interface OrgEntitlements {
features: OrgEntitlements.Features;
limits: OrgEntitlements.Limits;
plan: OrgEntitlements.Plan;
}
export namespace OrgEntitlements {
export interface Features {
browser_extensions: Features.BrowserExtensions;
browser_pools: Features.BrowserPools;
browser_replays: Features.BrowserReplays;
credential_providers: Features.CredentialProviders;
credentials: Features.Credentials;
custom_proxies: Features.CustomProxies;
file_io: Features.FileIo;
gpu: Features.GPU;
managed_auth: Features.ManagedAuth;
managed_proxies: Features.ManagedProxies;
profiles: Features.Profiles;
proxy_bypass_hosts: Features.ProxyBypassHosts;
/**
* Whether the organization can access vaults, using the same access check as vault
* API routes.
*/
vaults: Features.Vaults;
}
export namespace Features {
export interface BrowserExtensions {
/**
* Whether browser extensions are available.
*/
enabled: boolean;
/**
* Maximum active custom extensions the organization may store. Null means
* unlimited. Loading stored extensions into a browser is not plan-limited.
*/
max_stored_per_org: number | null;
}
export interface BrowserPools {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
export interface BrowserReplays {
/**
* Whether browser replay recording is available.
*/
enabled: boolean;
/**
* Number of days browser replays are retained, matching the replay reaper policy.
*/
retention_days: number;
}
export interface CredentialProviders {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
export interface Credentials {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
export interface CustomProxies {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
export interface FileIo {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
export interface GPU {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
export interface ManagedAuth {
/**
* Whether managed auth is available.
*/
enabled: boolean;
/**
* Effective interval in seconds used when a connection is created without an
* explicit health-check interval.
*/
health_check_interval_default_seconds: number;
/**
* Maximum accepted managed auth health-check interval in seconds.
*/
health_check_interval_max_seconds: number;
/**
* Minimum accepted managed auth health-check interval in seconds.
*/
health_check_interval_min_seconds: number;
/**
* Maximum active managed auth connections in the organization. Null means
* unlimited.
*/
max_connections: number | null;
}
export interface ManagedProxies {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
export interface Profiles {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
export interface ProxyBypassHosts {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
/**
* Whether the organization can access vaults, using the same access check as vault
* API routes.
*/
export interface Vaults {
/**
* Whether the organization is entitled to use this feature.
*/
enabled: boolean;
}
}
export interface Limits {
/**
* Effective org-level default concurrent invocation ceiling for apps without an
* app-specific override. App-specific overrides are not represented here.
*/
default_max_concurrent_invocations_per_app: number;
/**
* Effective organization-wide ceiling shared by on-demand browsers and browser
* pool reservations.
*/
max_concurrent_browsers: number;
/**
* Effective organization-wide concurrent app invocation ceiling.
*/
max_concurrent_invocations: number;
/**
* Maximum non-deleted vaults allowed org-wide across all projects. Null means
* unlimited. The vaults feature flag still controls access.
*/
max_vaults: number | null;
}
export interface Plan {
/**
* The organization's contractual plan identifier. Use the resolved feature and
* limit values, not this field, for access decisions.
*/
id: 'FREE' | 'HOBBYIST' | 'START_UP' | 'ENTERPRISE';
/**
* The plan used to resolve plan-based access. Active trials resolve to START_UP
* regardless of the contractual plan.
*/
effective_id: 'FREE' | 'HOBBYIST' | 'START_UP' | 'ENTERPRISE';
/**
* Whether the organization is currently within its trial period.
*/
is_trialing: boolean;
/**
* Current billing status of the contractual plan, or null when no billing status
* is recorded. Status-sensitive feature values already account for it.
*/
status: 'NEEDS_PAYMENT_METHOD' | 'ACTIVE' | 'CANCELED' | 'UNPAID' | null;
/**
* Configured trial end timestamp, or null when the organization has no trial. A
* past timestamp may be returned when is_trialing is false.
*/
trial_ends_at: string | null;
}
}
export declare namespace Entitlements {
export { type OrgEntitlements as OrgEntitlements };
}