@onkernel/sdk 0.149.0 → 0.151.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 (191) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/client.d.mts +29 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +29 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +32 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +32 -3
  9. package/client.mjs.map +1 -1
  10. package/lib/credentials/client-auth.d.mts +88 -0
  11. package/lib/credentials/client-auth.d.mts.map +1 -0
  12. package/lib/credentials/client-auth.d.ts +88 -0
  13. package/lib/credentials/client-auth.d.ts.map +1 -0
  14. package/lib/credentials/client-auth.js +166 -0
  15. package/lib/credentials/client-auth.js.map +1 -0
  16. package/lib/credentials/client-auth.mjs +162 -0
  17. package/lib/credentials/client-auth.mjs.map +1 -0
  18. package/lib/credentials/credential-chain.d.mts +20 -0
  19. package/lib/credentials/credential-chain.d.mts.map +1 -0
  20. package/lib/credentials/credential-chain.d.ts +20 -0
  21. package/lib/credentials/credential-chain.d.ts.map +1 -0
  22. package/lib/credentials/credential-chain.js +81 -0
  23. package/lib/credentials/credential-chain.js.map +1 -0
  24. package/lib/credentials/credential-chain.mjs +77 -0
  25. package/lib/credentials/credential-chain.mjs.map +1 -0
  26. package/lib/credentials/identity-token.d.mts +59 -0
  27. package/lib/credentials/identity-token.d.mts.map +1 -0
  28. package/lib/credentials/identity-token.d.ts +59 -0
  29. package/lib/credentials/identity-token.d.ts.map +1 -0
  30. package/lib/credentials/identity-token.js +243 -0
  31. package/lib/credentials/identity-token.js.map +1 -0
  32. package/lib/credentials/identity-token.mjs +202 -0
  33. package/lib/credentials/identity-token.mjs.map +1 -0
  34. package/lib/credentials/oidc-federation.d.mts +65 -0
  35. package/lib/credentials/oidc-federation.d.mts.map +1 -0
  36. package/lib/credentials/oidc-federation.d.ts +65 -0
  37. package/lib/credentials/oidc-federation.d.ts.map +1 -0
  38. package/lib/credentials/oidc-federation.js +200 -0
  39. package/lib/credentials/oidc-federation.js.map +1 -0
  40. package/lib/credentials/oidc-federation.mjs +196 -0
  41. package/lib/credentials/oidc-federation.mjs.map +1 -0
  42. package/lib/credentials/token-cache.d.mts +64 -0
  43. package/lib/credentials/token-cache.d.mts.map +1 -0
  44. package/lib/credentials/token-cache.d.ts +64 -0
  45. package/lib/credentials/token-cache.d.ts.map +1 -0
  46. package/lib/credentials/token-cache.js +147 -0
  47. package/lib/credentials/token-cache.js.map +1 -0
  48. package/lib/credentials/token-cache.mjs +143 -0
  49. package/lib/credentials/token-cache.mjs.map +1 -0
  50. package/lib/credentials/types.d.mts +126 -0
  51. package/lib/credentials/types.d.mts.map +1 -0
  52. package/lib/credentials/types.d.ts +126 -0
  53. package/lib/credentials/types.d.ts.map +1 -0
  54. package/lib/credentials/types.js +182 -0
  55. package/lib/credentials/types.js.map +1 -0
  56. package/lib/credentials/types.mjs +169 -0
  57. package/lib/credentials/types.mjs.map +1 -0
  58. package/lib/credentials.d.mts +6 -0
  59. package/lib/credentials.d.mts.map +1 -0
  60. package/lib/credentials.d.ts +6 -0
  61. package/lib/credentials.d.ts.map +1 -0
  62. package/lib/credentials.js +19 -0
  63. package/lib/credentials.js.map +1 -0
  64. package/lib/credentials.mjs +6 -0
  65. package/lib/credentials.mjs.map +1 -0
  66. package/package.json +9 -1
  67. package/resources/api-keys.d.mts +192 -16
  68. package/resources/api-keys.d.mts.map +1 -1
  69. package/resources/api-keys.d.ts +192 -16
  70. package/resources/api-keys.d.ts.map +1 -1
  71. package/resources/api-keys.js +19 -7
  72. package/resources/api-keys.js.map +1 -1
  73. package/resources/api-keys.mjs +19 -7
  74. package/resources/api-keys.mjs.map +1 -1
  75. package/resources/auth/auth.d.mts +2 -2
  76. package/resources/auth/auth.d.mts.map +1 -1
  77. package/resources/auth/auth.d.ts +2 -2
  78. package/resources/auth/auth.d.ts.map +1 -1
  79. package/resources/auth/auth.js.map +1 -1
  80. package/resources/auth/auth.mjs.map +1 -1
  81. package/resources/auth/connections.d.mts +16 -2
  82. package/resources/auth/connections.d.mts.map +1 -1
  83. package/resources/auth/connections.d.ts +16 -2
  84. package/resources/auth/connections.d.ts.map +1 -1
  85. package/resources/auth/context.d.mts +69 -3
  86. package/resources/auth/context.d.mts.map +1 -1
  87. package/resources/auth/context.d.ts +69 -3
  88. package/resources/auth/context.d.ts.map +1 -1
  89. package/resources/auth/index.d.mts +1 -1
  90. package/resources/auth/index.d.mts.map +1 -1
  91. package/resources/auth/index.d.ts +1 -1
  92. package/resources/auth/index.d.ts.map +1 -1
  93. package/resources/auth/index.js.map +1 -1
  94. package/resources/auth/index.mjs.map +1 -1
  95. package/resources/browser-pools.d.mts +41 -6
  96. package/resources/browser-pools.d.mts.map +1 -1
  97. package/resources/browser-pools.d.ts +41 -6
  98. package/resources/browser-pools.d.ts.map +1 -1
  99. package/resources/browsers/browsers.d.mts +105 -45
  100. package/resources/browsers/browsers.d.mts.map +1 -1
  101. package/resources/browsers/browsers.d.ts +105 -45
  102. package/resources/browsers/browsers.d.ts.map +1 -1
  103. package/resources/browsers/browsers.js.map +1 -1
  104. package/resources/browsers/browsers.mjs.map +1 -1
  105. package/resources/browsers/index.d.mts +1 -1
  106. package/resources/browsers/index.d.mts.map +1 -1
  107. package/resources/browsers/index.d.ts +1 -1
  108. package/resources/browsers/index.d.ts.map +1 -1
  109. package/resources/browsers/index.js.map +1 -1
  110. package/resources/browsers/index.mjs.map +1 -1
  111. package/resources/browsers/telemetry.d.mts +4 -4
  112. package/resources/browsers/telemetry.d.mts.map +1 -1
  113. package/resources/browsers/telemetry.d.ts +4 -4
  114. package/resources/browsers/telemetry.d.ts.map +1 -1
  115. package/resources/index.d.mts +6 -2
  116. package/resources/index.d.mts.map +1 -1
  117. package/resources/index.d.ts +6 -2
  118. package/resources/index.d.ts.map +1 -1
  119. package/resources/index.js +9 -1
  120. package/resources/index.js.map +1 -1
  121. package/resources/index.mjs +4 -0
  122. package/resources/index.mjs.map +1 -1
  123. package/resources/invocations.d.mts +13 -1
  124. package/resources/invocations.d.mts.map +1 -1
  125. package/resources/invocations.d.ts +13 -1
  126. package/resources/invocations.d.ts.map +1 -1
  127. package/resources/service-accounts.d.mts +73 -0
  128. package/resources/service-accounts.d.mts.map +1 -0
  129. package/resources/service-accounts.d.ts +73 -0
  130. package/resources/service-accounts.d.ts.map +1 -0
  131. package/resources/service-accounts.js +50 -0
  132. package/resources/service-accounts.js.map +1 -0
  133. package/resources/service-accounts.mjs +46 -0
  134. package/resources/service-accounts.mjs.map +1 -0
  135. package/resources/vaults/items.d.mts +68 -2
  136. package/resources/vaults/items.d.mts.map +1 -1
  137. package/resources/vaults/items.d.ts +68 -2
  138. package/resources/vaults/items.d.ts.map +1 -1
  139. package/resources/workload-identity-authentication-events.d.mts +36 -0
  140. package/resources/workload-identity-authentication-events.d.mts.map +1 -0
  141. package/resources/workload-identity-authentication-events.d.ts +36 -0
  142. package/resources/workload-identity-authentication-events.d.ts.map +1 -0
  143. package/resources/workload-identity-authentication-events.js +16 -0
  144. package/resources/workload-identity-authentication-events.js.map +1 -0
  145. package/resources/workload-identity-authentication-events.mjs +12 -0
  146. package/resources/workload-identity-authentication-events.mjs.map +1 -0
  147. package/resources/workload-identity-federation-rules.d.mts +194 -0
  148. package/resources/workload-identity-federation-rules.d.mts.map +1 -0
  149. package/resources/workload-identity-federation-rules.d.ts +194 -0
  150. package/resources/workload-identity-federation-rules.d.ts.map +1 -0
  151. package/resources/workload-identity-federation-rules.js +47 -0
  152. package/resources/workload-identity-federation-rules.js.map +1 -0
  153. package/resources/workload-identity-federation-rules.mjs +43 -0
  154. package/resources/workload-identity-federation-rules.mjs.map +1 -0
  155. package/resources/workload-identity-issuers.d.mts +169 -0
  156. package/resources/workload-identity-issuers.d.mts.map +1 -0
  157. package/resources/workload-identity-issuers.d.ts +169 -0
  158. package/resources/workload-identity-issuers.d.ts.map +1 -0
  159. package/resources/workload-identity-issuers.js +54 -0
  160. package/resources/workload-identity-issuers.js.map +1 -0
  161. package/resources/workload-identity-issuers.mjs +50 -0
  162. package/resources/workload-identity-issuers.mjs.map +1 -0
  163. package/src/client.ts +134 -1
  164. package/src/lib/credentials/client-auth.ts +194 -0
  165. package/src/lib/credentials/credential-chain.ts +95 -0
  166. package/src/lib/credentials/identity-token.ts +284 -0
  167. package/src/lib/credentials/oidc-federation.ts +304 -0
  168. package/src/lib/credentials/token-cache.ts +172 -0
  169. package/src/lib/credentials/types.ts +267 -0
  170. package/src/lib/credentials.ts +30 -0
  171. package/src/resources/api-keys.ts +217 -15
  172. package/src/resources/auth/auth.ts +6 -2
  173. package/src/resources/auth/connections.ts +17 -2
  174. package/src/resources/auth/context.ts +81 -3
  175. package/src/resources/auth/index.ts +1 -1
  176. package/src/resources/browser-pools.ts +46 -6
  177. package/src/resources/browsers/browsers.ts +115 -44
  178. package/src/resources/browsers/index.ts +1 -0
  179. package/src/resources/browsers/telemetry.ts +4 -3
  180. package/src/resources/index.ts +42 -0
  181. package/src/resources/invocations.ts +15 -1
  182. package/src/resources/service-accounts.ts +128 -0
  183. package/src/resources/vaults/items.ts +80 -2
  184. package/src/resources/workload-identity-authentication-events.ts +72 -0
  185. package/src/resources/workload-identity-federation-rules.ts +314 -0
  186. package/src/resources/workload-identity-issuers.ts +273 -0
  187. package/src/version.ts +1 -1
  188. package/version.d.mts +1 -1
  189. package/version.d.ts +1 -1
  190. package/version.js +1 -1
  191. package/version.mjs +1 -1
@@ -0,0 +1,72 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
5
+ import { RequestOptions } from '../internal/request-options';
6
+
7
+ export class WorkloadIdentityAuthenticationEvents extends APIResource {
8
+ /**
9
+ * Any signed-in member of the organization can read this. API keys cannot.
10
+ */
11
+ list(
12
+ query: WorkloadIdentityAuthenticationEventListParams | null | undefined = {},
13
+ options?: RequestOptions,
14
+ ): PagePromise<WorkloadIdentityAuthenticationEventsOffsetPagination, WorkloadIdentityAuthenticationEvent> {
15
+ return this._client.getAPIList(
16
+ '/org/workload_identity_authentication_events',
17
+ OffsetPagination<WorkloadIdentityAuthenticationEvent>,
18
+ { query, ...options },
19
+ );
20
+ }
21
+ }
22
+
23
+ export type WorkloadIdentityAuthenticationEventsOffsetPagination =
24
+ OffsetPagination<WorkloadIdentityAuthenticationEvent>;
25
+
26
+ export interface WorkloadIdentityAuthenticationEvent {
27
+ id: string;
28
+
29
+ correlation_id: string;
30
+
31
+ created_at: string;
32
+
33
+ credential_id: string | null;
34
+
35
+ federation_rule_id: string | null;
36
+
37
+ issuer_id: string | null;
38
+
39
+ org_id: string;
40
+
41
+ outcome: 'success' | 'failure';
42
+
43
+ project_id: string | null;
44
+
45
+ reason: string;
46
+
47
+ service_account_id: string | null;
48
+ }
49
+
50
+ export interface WorkloadIdentityAuthenticationEventListParams extends OffsetPaginationParams {
51
+ end_time?: string;
52
+
53
+ federation_rule_id?: string;
54
+
55
+ issuer_id?: string;
56
+
57
+ outcome?: 'success' | 'failure';
58
+
59
+ project_id?: string;
60
+
61
+ service_account_id?: string;
62
+
63
+ start_time?: string;
64
+ }
65
+
66
+ export declare namespace WorkloadIdentityAuthenticationEvents {
67
+ export {
68
+ type WorkloadIdentityAuthenticationEvent as WorkloadIdentityAuthenticationEvent,
69
+ type WorkloadIdentityAuthenticationEventsOffsetPagination as WorkloadIdentityAuthenticationEventsOffsetPagination,
70
+ type WorkloadIdentityAuthenticationEventListParams as WorkloadIdentityAuthenticationEventListParams,
71
+ };
72
+ }
@@ -0,0 +1,314 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
6
+ import { buildHeaders } from '../internal/headers';
7
+ import { RequestOptions } from '../internal/request-options';
8
+ import { path } from '../internal/utils/path';
9
+
10
+ export class WorkloadIdentityFederationRules extends APIResource {
11
+ /**
12
+ * Organization credential administrators only. No external namespace-ownership or
13
+ * staff approval is required. New trust resources default disabled.
14
+ */
15
+ create(
16
+ body: WorkloadIdentityFederationRuleCreateParams,
17
+ options?: RequestOptions,
18
+ ): APIPromise<WorkloadIdentityFederationRule> {
19
+ return this._client.post('/org/workload_identity_federation_rules', { body, ...options });
20
+ }
21
+
22
+ /**
23
+ * Any signed-in member of the organization can read this. API keys cannot.
24
+ */
25
+ retrieve(id: string, options?: RequestOptions): APIPromise<WorkloadIdentityFederationRule> {
26
+ return this._client.get(path`/org/workload_identity_federation_rules/${id}`, options);
27
+ }
28
+
29
+ /**
30
+ * Update a workload identity federation rule
31
+ */
32
+ update(
33
+ id: string,
34
+ body: WorkloadIdentityFederationRuleUpdateParams,
35
+ options?: RequestOptions,
36
+ ): APIPromise<WorkloadIdentityFederationRule> {
37
+ return this._client.patch(path`/org/workload_identity_federation_rules/${id}`, { body, ...options });
38
+ }
39
+
40
+ /**
41
+ * Any signed-in member of the organization can read this. API keys cannot.
42
+ */
43
+ list(
44
+ query: WorkloadIdentityFederationRuleListParams | null | undefined = {},
45
+ options?: RequestOptions,
46
+ ): PagePromise<WorkloadIdentityFederationRulesOffsetPagination, WorkloadIdentityFederationRule> {
47
+ return this._client.getAPIList(
48
+ '/org/workload_identity_federation_rules',
49
+ OffsetPagination<WorkloadIdentityFederationRule>,
50
+ { query, ...options },
51
+ );
52
+ }
53
+
54
+ /**
55
+ * Retains history and invalidates associated authority within the documented
56
+ * status bound. Does not delete created browser resources.
57
+ */
58
+ delete(id: string, options?: RequestOptions): APIPromise<void> {
59
+ return this._client.delete(path`/org/workload_identity_federation_rules/${id}`, {
60
+ ...options,
61
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
62
+ });
63
+ }
64
+ }
65
+
66
+ export type WorkloadIdentityFederationRulesOffsetPagination =
67
+ OffsetPagination<WorkloadIdentityFederationRule>;
68
+
69
+ export interface WorkloadIdentityAuthorization {
70
+ /**
71
+ * Allow statements for resources in this rule's project, in the same format as a
72
+ * scoped API key policy. API key actions are not allowed.
73
+ */
74
+ policy: WorkloadIdentityAuthorization.Policy;
75
+
76
+ /**
77
+ * The one project credentials from this rule are limited to.
78
+ */
79
+ project_id: string;
80
+
81
+ token_audience: string;
82
+
83
+ max_token_ttl_seconds?: number;
84
+ }
85
+
86
+ export namespace WorkloadIdentityAuthorization {
87
+ /**
88
+ * Allow statements for resources in this rule's project, in the same format as a
89
+ * scoped API key policy. API key actions are not allowed.
90
+ */
91
+ export interface Policy {
92
+ /**
93
+ * Allow statements. Every action and resource not listed is denied.
94
+ */
95
+ statements: Array<Policy.Statement>;
96
+ }
97
+
98
+ export namespace Policy {
99
+ export interface Statement {
100
+ /**
101
+ * Permitted action, such as browsers:use or vaults:read.
102
+ */
103
+ action: string;
104
+
105
+ /**
106
+ * Resource the action applies to, in the format projects/{project_id}/{kind}/{id}.
107
+ * Wildcards are supported.
108
+ */
109
+ resource: string;
110
+
111
+ /**
112
+ * A condition narrows a policy statement to requests matching its constraint: the
113
+ * request attribute, a comparison operator, and that operator's values.
114
+ */
115
+ condition?: Statement.Condition;
116
+ }
117
+
118
+ export namespace Statement {
119
+ /**
120
+ * A condition narrows a policy statement to requests matching its constraint: the
121
+ * request attribute, a comparison operator, and that operator's values.
122
+ */
123
+ export interface Condition {
124
+ /**
125
+ * Request attribute the condition constrains. `source_ip` restricts the statement
126
+ * to requests whose client address falls inside one of `values`.
127
+ */
128
+ key: 'source_ip';
129
+
130
+ /**
131
+ * Comparison the condition applies between the request attribute and values.
132
+ */
133
+ operator: 'in';
134
+
135
+ /**
136
+ * Values the request attribute must match. For `source_ip`, CIDR networks: a bare
137
+ * address without a mask is rejected, and so are an entry with host bits set and
138
+ * an IPv4 network written in IPv6 notation.
139
+ */
140
+ values: Array<string>;
141
+ }
142
+ }
143
+ }
144
+ }
145
+
146
+ export interface WorkloadIdentityFederationRule {
147
+ id: string;
148
+
149
+ archived_at: string | null;
150
+
151
+ authorization: WorkloadIdentityAuthorization;
152
+
153
+ created_at: string;
154
+
155
+ created_by_user_id: string | null;
156
+
157
+ description: string;
158
+
159
+ enabled: boolean;
160
+
161
+ expected_audience: string;
162
+
163
+ issuer_id: string;
164
+
165
+ last_exchange_at: string | null;
166
+
167
+ match: WorkloadIdentityMatch;
168
+
169
+ name: string;
170
+
171
+ org_id: string;
172
+
173
+ /**
174
+ * Authority revision. Cosmetic updates do not widen permissions.
175
+ */
176
+ security_version: number;
177
+
178
+ target: WorkloadIdentityTarget;
179
+
180
+ updated_at: string;
181
+ }
182
+
183
+ export interface WorkloadIdentityFederationRuleConfig {
184
+ authorization: WorkloadIdentityAuthorization;
185
+
186
+ expected_audience: string;
187
+
188
+ issuer_id: string;
189
+
190
+ match: WorkloadIdentityMatch;
191
+
192
+ name: string;
193
+
194
+ target: WorkloadIdentityTarget;
195
+
196
+ description?: string;
197
+
198
+ enabled?: boolean;
199
+ }
200
+
201
+ export interface WorkloadIdentityMatch {
202
+ /**
203
+ * Must be the issuer's preset_type.
204
+ */
205
+ type: 'github_actions' | 'aws' | 'google_cloud' | 'microsoft_entra' | 'kubernetes' | 'custom_oidc';
206
+
207
+ /**
208
+ * Exact string conditions keyed by RFC 6901 JSON Pointers. All conditions are
209
+ * ANDed.
210
+ */
211
+ claims?: { [key: string]: string };
212
+
213
+ environment?: string;
214
+
215
+ event_names?: Array<string>;
216
+
217
+ job_workflow_ref?: string;
218
+
219
+ namespace?: string;
220
+
221
+ ref?: string;
222
+
223
+ /**
224
+ * Friendly display name. Immutable IDs define the repository identity.
225
+ */
226
+ repository?: string;
227
+
228
+ repository_id?: string;
229
+
230
+ repository_owner_id?: string;
231
+
232
+ service_account?: string;
233
+
234
+ subject?: string;
235
+
236
+ subject_prefix?: string;
237
+
238
+ workflow?: string;
239
+
240
+ workflow_ref?: string;
241
+ }
242
+
243
+ export interface WorkloadIdentityTarget {
244
+ service_account_id: string;
245
+
246
+ type: 'service_account';
247
+ }
248
+
249
+ export interface WorkloadIdentityFederationRuleCreateParams {
250
+ authorization: WorkloadIdentityAuthorization;
251
+
252
+ expected_audience: string;
253
+
254
+ issuer_id: string;
255
+
256
+ match: WorkloadIdentityMatch;
257
+
258
+ name: string;
259
+
260
+ target: WorkloadIdentityTarget;
261
+
262
+ description?: string;
263
+
264
+ enabled?: boolean;
265
+ }
266
+
267
+ export interface WorkloadIdentityFederationRuleUpdateParams {
268
+ expected_version: number;
269
+
270
+ authorization?: WorkloadIdentityAuthorization;
271
+
272
+ description?: string;
273
+
274
+ enabled?: boolean;
275
+
276
+ expected_audience?: string;
277
+
278
+ issuer_id?: string;
279
+
280
+ match?: WorkloadIdentityMatch;
281
+
282
+ name?: string;
283
+
284
+ target?: WorkloadIdentityTarget;
285
+ }
286
+
287
+ export interface WorkloadIdentityFederationRuleListParams extends OffsetPaginationParams {
288
+ issuer_id?: string;
289
+
290
+ project_id?: string;
291
+
292
+ /**
293
+ * Case-insensitive substring match against name or description; exact ID match.
294
+ */
295
+ query?: string;
296
+
297
+ service_account_id?: string;
298
+
299
+ status?: 'active' | 'archived' | 'all';
300
+ }
301
+
302
+ export declare namespace WorkloadIdentityFederationRules {
303
+ export {
304
+ type WorkloadIdentityAuthorization as WorkloadIdentityAuthorization,
305
+ type WorkloadIdentityFederationRule as WorkloadIdentityFederationRule,
306
+ type WorkloadIdentityFederationRuleConfig as WorkloadIdentityFederationRuleConfig,
307
+ type WorkloadIdentityMatch as WorkloadIdentityMatch,
308
+ type WorkloadIdentityTarget as WorkloadIdentityTarget,
309
+ type WorkloadIdentityFederationRulesOffsetPagination as WorkloadIdentityFederationRulesOffsetPagination,
310
+ type WorkloadIdentityFederationRuleCreateParams as WorkloadIdentityFederationRuleCreateParams,
311
+ type WorkloadIdentityFederationRuleUpdateParams as WorkloadIdentityFederationRuleUpdateParams,
312
+ type WorkloadIdentityFederationRuleListParams as WorkloadIdentityFederationRuleListParams,
313
+ };
314
+ }
@@ -0,0 +1,273 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { OffsetPagination, type OffsetPaginationParams, PagePromise } from '../core/pagination';
6
+ import { buildHeaders } from '../internal/headers';
7
+ import { RequestOptions } from '../internal/request-options';
8
+ import { path } from '../internal/utils/path';
9
+
10
+ export class WorkloadIdentityIssuers extends APIResource {
11
+ /**
12
+ * Organization credential administrators only. No external namespace-ownership or
13
+ * staff approval is required. New trust resources default disabled.
14
+ */
15
+ create(
16
+ body: WorkloadIdentityIssuerCreateParams,
17
+ options?: RequestOptions,
18
+ ): APIPromise<WorkloadIdentityIssuer> {
19
+ return this._client.post('/org/workload_identity_issuers', { body, ...options });
20
+ }
21
+
22
+ /**
23
+ * Any signed-in member of the organization can read this. API keys cannot.
24
+ */
25
+ retrieve(id: string, options?: RequestOptions): APIPromise<WorkloadIdentityIssuer> {
26
+ return this._client.get(path`/org/workload_identity_issuers/${id}`, options);
27
+ }
28
+
29
+ /**
30
+ * Update a workload identity issuer
31
+ */
32
+ update(
33
+ id: string,
34
+ body: WorkloadIdentityIssuerUpdateParams,
35
+ options?: RequestOptions,
36
+ ): APIPromise<WorkloadIdentityIssuer> {
37
+ return this._client.patch(path`/org/workload_identity_issuers/${id}`, { body, ...options });
38
+ }
39
+
40
+ /**
41
+ * Any signed-in member of the organization can read this. API keys cannot.
42
+ */
43
+ list(
44
+ query: WorkloadIdentityIssuerListParams | null | undefined = {},
45
+ options?: RequestOptions,
46
+ ): PagePromise<WorkloadIdentityIssuersOffsetPagination, WorkloadIdentityIssuer> {
47
+ return this._client.getAPIList(
48
+ '/org/workload_identity_issuers',
49
+ OffsetPagination<WorkloadIdentityIssuer>,
50
+ { query, ...options },
51
+ );
52
+ }
53
+
54
+ /**
55
+ * Retains history and invalidates associated authority within the documented
56
+ * status bound. Does not delete created browser resources.
57
+ */
58
+ delete(id: string, options?: RequestOptions): APIPromise<void> {
59
+ return this._client.delete(path`/org/workload_identity_issuers/${id}`, {
60
+ ...options,
61
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
62
+ });
63
+ }
64
+
65
+ /**
66
+ * Read-only. Does not enable trust, approve namespace ownership, create a grant or
67
+ * issue credentials.
68
+ */
69
+ verify(id: string, options?: RequestOptions): APIPromise<WorkloadIdentityIssuerKeyCheck> {
70
+ return this._client.post(path`/org/workload_identity_issuers/${id}/verify`, options);
71
+ }
72
+ }
73
+
74
+ export type WorkloadIdentityIssuersOffsetPagination = OffsetPagination<WorkloadIdentityIssuer>;
75
+
76
+ export interface WorkloadIdentityIssuer {
77
+ id: string;
78
+
79
+ archived_at: string | null;
80
+
81
+ created_at: string;
82
+
83
+ created_by_user_id: string | null;
84
+
85
+ description: string;
86
+
87
+ enabled: boolean;
88
+
89
+ /**
90
+ * Exact expected signed issuer. Optional for github_actions and google_cloud,
91
+ * which each have one fixed issuer.
92
+ */
93
+ issuer_url: string;
94
+
95
+ jwks: WorkloadIdentityKeySource;
96
+
97
+ name: string;
98
+
99
+ org_id: string;
100
+
101
+ /**
102
+ * The kind of identity provider. GitHub Actions, Google Cloud and Microsoft Entra
103
+ * issuers are recognized by their issuer URL and must use their own type. Defaults
104
+ * to the type the issuer URL belongs to, or custom_oidc.
105
+ */
106
+ preset_type: WorkloadIdentityPresetType;
107
+
108
+ /**
109
+ * Authority revision. Cosmetic updates do not widen permissions.
110
+ */
111
+ security_version: number;
112
+
113
+ token_validation: WorkloadIdentityTokenValidation;
114
+
115
+ updated_at: string;
116
+ }
117
+
118
+ export interface WorkloadIdentityIssuerConfig {
119
+ name: string;
120
+
121
+ description?: string;
122
+
123
+ enabled?: boolean;
124
+
125
+ /**
126
+ * Exact expected signed issuer. Optional for github_actions and google_cloud,
127
+ * which each have one fixed issuer.
128
+ */
129
+ issuer_url?: string;
130
+
131
+ jwks?: WorkloadIdentityKeySource;
132
+
133
+ /**
134
+ * The kind of identity provider. GitHub Actions, Google Cloud and Microsoft Entra
135
+ * issuers are recognized by their issuer URL and must use their own type. Defaults
136
+ * to the type the issuer URL belongs to, or custom_oidc.
137
+ */
138
+ preset_type?: WorkloadIdentityPresetType;
139
+
140
+ token_validation?: WorkloadIdentityTokenValidation;
141
+ }
142
+
143
+ export interface WorkloadIdentityIssuerKeyCheck {
144
+ issuer_id: string;
145
+
146
+ key_ids: Array<string>;
147
+ }
148
+
149
+ export interface WorkloadIdentityKeySource {
150
+ type: 'discovery' | 'explicit_url' | 'inline';
151
+
152
+ /**
153
+ * Optional public CA certificates. When set, only these CAs are trusted for key
154
+ * retrieval, in place of the system roots. Private keys and private-network
155
+ * retrieval are not supported.
156
+ */
157
+ ca_cert_pem?: string;
158
+
159
+ discovery_base_url?: string;
160
+
161
+ keys?: Array<{ [key: string]: unknown }>;
162
+
163
+ url?: string;
164
+ }
165
+
166
+ /**
167
+ * The kind of identity provider. GitHub Actions, Google Cloud and Microsoft Entra
168
+ * issuers are recognized by their issuer URL and must use their own type. Defaults
169
+ * to the type the issuer URL belongs to, or custom_oidc.
170
+ */
171
+ export type WorkloadIdentityPresetType =
172
+ | 'github_actions'
173
+ | 'aws'
174
+ | 'google_cloud'
175
+ | 'microsoft_entra'
176
+ | 'kubernetes'
177
+ | 'custom_oidc';
178
+
179
+ export interface WorkloadIdentityTokenValidation {
180
+ /**
181
+ * Maximum incoming signed exp minus iat, independent of outgoing token lifetime.
182
+ */
183
+ max_lifetime_seconds?: number;
184
+
185
+ /**
186
+ * Whether an incoming token can be exchanged more than once before it expires.
187
+ * Defaults to single_use for github_actions, aws, microsoft_entra and custom_oidc,
188
+ * and to allow_reuse for kubernetes, because a pod reads the same projected token
189
+ * until it is rotated. google_cloud is always allow_reuse because Google identity
190
+ * tokens carry no token ID. allow_reuse can be set on microsoft_entra and
191
+ * custom_oidc, and single_use on kubernetes. github_actions and aws are always
192
+ * single_use.
193
+ */
194
+ replay_protection?: 'single_use' | 'allow_reuse';
195
+ }
196
+
197
+ export interface WorkloadIdentityIssuerCreateParams {
198
+ name: string;
199
+
200
+ description?: string;
201
+
202
+ enabled?: boolean;
203
+
204
+ /**
205
+ * Exact expected signed issuer. Optional for github_actions and google_cloud,
206
+ * which each have one fixed issuer.
207
+ */
208
+ issuer_url?: string;
209
+
210
+ jwks?: WorkloadIdentityKeySource;
211
+
212
+ /**
213
+ * The kind of identity provider. GitHub Actions, Google Cloud and Microsoft Entra
214
+ * issuers are recognized by their issuer URL and must use their own type. Defaults
215
+ * to the type the issuer URL belongs to, or custom_oidc.
216
+ */
217
+ preset_type?: WorkloadIdentityPresetType;
218
+
219
+ token_validation?: WorkloadIdentityTokenValidation;
220
+ }
221
+
222
+ export interface WorkloadIdentityIssuerUpdateParams {
223
+ expected_version: number;
224
+
225
+ description?: string;
226
+
227
+ enabled?: boolean;
228
+
229
+ /**
230
+ * Exact expected signed issuer. Optional for github_actions and google_cloud,
231
+ * which each have one fixed issuer.
232
+ */
233
+ issuer_url?: string;
234
+
235
+ jwks?: WorkloadIdentityKeySource;
236
+
237
+ name?: string;
238
+
239
+ /**
240
+ * The kind of identity provider. GitHub Actions, Google Cloud and Microsoft Entra
241
+ * issuers are recognized by their issuer URL and must use their own type. Defaults
242
+ * to the type the issuer URL belongs to, or custom_oidc.
243
+ */
244
+ preset_type?: WorkloadIdentityPresetType;
245
+
246
+ token_validation?: WorkloadIdentityTokenValidation;
247
+ }
248
+
249
+ export interface WorkloadIdentityIssuerListParams extends OffsetPaginationParams {
250
+ enabled?: boolean;
251
+
252
+ /**
253
+ * Case-insensitive substring match against name or description; exact ID match.
254
+ */
255
+ query?: string;
256
+
257
+ status?: 'active' | 'archived' | 'all';
258
+ }
259
+
260
+ export declare namespace WorkloadIdentityIssuers {
261
+ export {
262
+ type WorkloadIdentityIssuer as WorkloadIdentityIssuer,
263
+ type WorkloadIdentityIssuerConfig as WorkloadIdentityIssuerConfig,
264
+ type WorkloadIdentityIssuerKeyCheck as WorkloadIdentityIssuerKeyCheck,
265
+ type WorkloadIdentityKeySource as WorkloadIdentityKeySource,
266
+ type WorkloadIdentityPresetType as WorkloadIdentityPresetType,
267
+ type WorkloadIdentityTokenValidation as WorkloadIdentityTokenValidation,
268
+ type WorkloadIdentityIssuersOffsetPagination as WorkloadIdentityIssuersOffsetPagination,
269
+ type WorkloadIdentityIssuerCreateParams as WorkloadIdentityIssuerCreateParams,
270
+ type WorkloadIdentityIssuerUpdateParams as WorkloadIdentityIssuerUpdateParams,
271
+ type WorkloadIdentityIssuerListParams as WorkloadIdentityIssuerListParams,
272
+ };
273
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.149.0'; // x-release-please-version
1
+ export const VERSION = '0.151.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.149.0";
1
+ export declare const VERSION = "0.151.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.149.0";
1
+ export declare const VERSION = "0.151.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.149.0'; // x-release-please-version
4
+ exports.VERSION = '0.151.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.149.0'; // x-release-please-version
1
+ export const VERSION = '0.151.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map