@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.
- package/CHANGELOG.md +25 -0
- package/client.d.mts +29 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +29 -4
- package/client.d.ts.map +1 -1
- package/client.js +32 -3
- package/client.js.map +1 -1
- package/client.mjs +32 -3
- package/client.mjs.map +1 -1
- package/lib/credentials/client-auth.d.mts +88 -0
- package/lib/credentials/client-auth.d.mts.map +1 -0
- package/lib/credentials/client-auth.d.ts +88 -0
- package/lib/credentials/client-auth.d.ts.map +1 -0
- package/lib/credentials/client-auth.js +166 -0
- package/lib/credentials/client-auth.js.map +1 -0
- package/lib/credentials/client-auth.mjs +162 -0
- package/lib/credentials/client-auth.mjs.map +1 -0
- package/lib/credentials/credential-chain.d.mts +20 -0
- package/lib/credentials/credential-chain.d.mts.map +1 -0
- package/lib/credentials/credential-chain.d.ts +20 -0
- package/lib/credentials/credential-chain.d.ts.map +1 -0
- package/lib/credentials/credential-chain.js +81 -0
- package/lib/credentials/credential-chain.js.map +1 -0
- package/lib/credentials/credential-chain.mjs +77 -0
- package/lib/credentials/credential-chain.mjs.map +1 -0
- package/lib/credentials/identity-token.d.mts +59 -0
- package/lib/credentials/identity-token.d.mts.map +1 -0
- package/lib/credentials/identity-token.d.ts +59 -0
- package/lib/credentials/identity-token.d.ts.map +1 -0
- package/lib/credentials/identity-token.js +243 -0
- package/lib/credentials/identity-token.js.map +1 -0
- package/lib/credentials/identity-token.mjs +202 -0
- package/lib/credentials/identity-token.mjs.map +1 -0
- package/lib/credentials/oidc-federation.d.mts +65 -0
- package/lib/credentials/oidc-federation.d.mts.map +1 -0
- package/lib/credentials/oidc-federation.d.ts +65 -0
- package/lib/credentials/oidc-federation.d.ts.map +1 -0
- package/lib/credentials/oidc-federation.js +200 -0
- package/lib/credentials/oidc-federation.js.map +1 -0
- package/lib/credentials/oidc-federation.mjs +196 -0
- package/lib/credentials/oidc-federation.mjs.map +1 -0
- package/lib/credentials/token-cache.d.mts +64 -0
- package/lib/credentials/token-cache.d.mts.map +1 -0
- package/lib/credentials/token-cache.d.ts +64 -0
- package/lib/credentials/token-cache.d.ts.map +1 -0
- package/lib/credentials/token-cache.js +147 -0
- package/lib/credentials/token-cache.js.map +1 -0
- package/lib/credentials/token-cache.mjs +143 -0
- package/lib/credentials/token-cache.mjs.map +1 -0
- package/lib/credentials/types.d.mts +126 -0
- package/lib/credentials/types.d.mts.map +1 -0
- package/lib/credentials/types.d.ts +126 -0
- package/lib/credentials/types.d.ts.map +1 -0
- package/lib/credentials/types.js +182 -0
- package/lib/credentials/types.js.map +1 -0
- package/lib/credentials/types.mjs +169 -0
- package/lib/credentials/types.mjs.map +1 -0
- package/lib/credentials.d.mts +6 -0
- package/lib/credentials.d.mts.map +1 -0
- package/lib/credentials.d.ts +6 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +19 -0
- package/lib/credentials.js.map +1 -0
- package/lib/credentials.mjs +6 -0
- package/lib/credentials.mjs.map +1 -0
- package/package.json +9 -1
- package/resources/api-keys.d.mts +192 -16
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +192 -16
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +19 -7
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +19 -7
- package/resources/api-keys.mjs.map +1 -1
- package/resources/auth/auth.d.mts +2 -2
- package/resources/auth/auth.d.mts.map +1 -1
- package/resources/auth/auth.d.ts +2 -2
- package/resources/auth/auth.d.ts.map +1 -1
- package/resources/auth/auth.js.map +1 -1
- package/resources/auth/auth.mjs.map +1 -1
- package/resources/auth/connections.d.mts +16 -2
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +16 -2
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/auth/context.d.mts +69 -3
- package/resources/auth/context.d.mts.map +1 -1
- package/resources/auth/context.d.ts +69 -3
- package/resources/auth/context.d.ts.map +1 -1
- package/resources/auth/index.d.mts +1 -1
- package/resources/auth/index.d.mts.map +1 -1
- package/resources/auth/index.d.ts +1 -1
- package/resources/auth/index.d.ts.map +1 -1
- package/resources/auth/index.js.map +1 -1
- package/resources/auth/index.mjs.map +1 -1
- package/resources/browser-pools.d.mts +41 -6
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +41 -6
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browsers/browsers.d.mts +105 -45
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +105 -45
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/browsers/index.d.mts +1 -1
- package/resources/browsers/index.d.mts.map +1 -1
- package/resources/browsers/index.d.ts +1 -1
- package/resources/browsers/index.d.ts.map +1 -1
- package/resources/browsers/index.js.map +1 -1
- package/resources/browsers/index.mjs.map +1 -1
- package/resources/browsers/telemetry.d.mts +4 -4
- package/resources/browsers/telemetry.d.mts.map +1 -1
- package/resources/browsers/telemetry.d.ts +4 -4
- package/resources/browsers/telemetry.d.ts.map +1 -1
- package/resources/index.d.mts +6 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invocations.d.mts +13 -1
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +13 -1
- package/resources/invocations.d.ts.map +1 -1
- package/resources/service-accounts.d.mts +73 -0
- package/resources/service-accounts.d.mts.map +1 -0
- package/resources/service-accounts.d.ts +73 -0
- package/resources/service-accounts.d.ts.map +1 -0
- package/resources/service-accounts.js +50 -0
- package/resources/service-accounts.js.map +1 -0
- package/resources/service-accounts.mjs +46 -0
- package/resources/service-accounts.mjs.map +1 -0
- package/resources/vaults/items.d.mts +68 -2
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +68 -2
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/workload-identity-authentication-events.d.mts +36 -0
- package/resources/workload-identity-authentication-events.d.mts.map +1 -0
- package/resources/workload-identity-authentication-events.d.ts +36 -0
- package/resources/workload-identity-authentication-events.d.ts.map +1 -0
- package/resources/workload-identity-authentication-events.js +16 -0
- package/resources/workload-identity-authentication-events.js.map +1 -0
- package/resources/workload-identity-authentication-events.mjs +12 -0
- package/resources/workload-identity-authentication-events.mjs.map +1 -0
- package/resources/workload-identity-federation-rules.d.mts +194 -0
- package/resources/workload-identity-federation-rules.d.mts.map +1 -0
- package/resources/workload-identity-federation-rules.d.ts +194 -0
- package/resources/workload-identity-federation-rules.d.ts.map +1 -0
- package/resources/workload-identity-federation-rules.js +47 -0
- package/resources/workload-identity-federation-rules.js.map +1 -0
- package/resources/workload-identity-federation-rules.mjs +43 -0
- package/resources/workload-identity-federation-rules.mjs.map +1 -0
- package/resources/workload-identity-issuers.d.mts +169 -0
- package/resources/workload-identity-issuers.d.mts.map +1 -0
- package/resources/workload-identity-issuers.d.ts +169 -0
- package/resources/workload-identity-issuers.d.ts.map +1 -0
- package/resources/workload-identity-issuers.js +54 -0
- package/resources/workload-identity-issuers.js.map +1 -0
- package/resources/workload-identity-issuers.mjs +50 -0
- package/resources/workload-identity-issuers.mjs.map +1 -0
- package/src/client.ts +134 -1
- package/src/lib/credentials/client-auth.ts +194 -0
- package/src/lib/credentials/credential-chain.ts +95 -0
- package/src/lib/credentials/identity-token.ts +284 -0
- package/src/lib/credentials/oidc-federation.ts +304 -0
- package/src/lib/credentials/token-cache.ts +172 -0
- package/src/lib/credentials/types.ts +267 -0
- package/src/lib/credentials.ts +30 -0
- package/src/resources/api-keys.ts +217 -15
- package/src/resources/auth/auth.ts +6 -2
- package/src/resources/auth/connections.ts +17 -2
- package/src/resources/auth/context.ts +81 -3
- package/src/resources/auth/index.ts +1 -1
- package/src/resources/browser-pools.ts +46 -6
- package/src/resources/browsers/browsers.ts +115 -44
- package/src/resources/browsers/index.ts +1 -0
- package/src/resources/browsers/telemetry.ts +4 -3
- package/src/resources/index.ts +42 -0
- package/src/resources/invocations.ts +15 -1
- package/src/resources/service-accounts.ts +128 -0
- package/src/resources/vaults/items.ts +80 -2
- package/src/resources/workload-identity-authentication-events.ts +72 -0
- package/src/resources/workload-identity-federation-rules.ts +314 -0
- package/src/resources/workload-identity-issuers.ts +273 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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.
|
|
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.
|
|
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.
|
|
1
|
+
export declare const VERSION = "0.151.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.151.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|