@alienplatform/manager-api 3.3.32 → 3.3.33

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 (124) hide show
  1. package/README.md +2 -5
  2. package/esm/funcs/{credentialsMintCredentials.d.ts → deploymentsSetQuotaWarningOverrides.d.ts} +5 -2
  3. package/esm/funcs/deploymentsSetQuotaWarningOverrides.d.ts.map +1 -0
  4. package/esm/funcs/{credentialsMintCredentials.js → deploymentsSetQuotaWarningOverrides.js} +30 -14
  5. package/esm/funcs/deploymentsSetQuotaWarningOverrides.js.map +1 -0
  6. package/esm/lib/config.d.ts +2 -2
  7. package/esm/lib/config.js +2 -2
  8. package/esm/models/containerresourceselection.d.ts +8 -0
  9. package/esm/models/containerresourceselection.d.ts.map +1 -1
  10. package/esm/models/containerresourceselection.js +2 -0
  11. package/esm/models/containerresourceselection.js.map +1 -1
  12. package/esm/models/index.d.ts +2 -12
  13. package/esm/models/index.d.ts.map +1 -1
  14. package/esm/models/index.js +2 -12
  15. package/esm/models/index.js.map +1 -1
  16. package/esm/models/operations/index.d.ts +1 -0
  17. package/esm/models/operations/index.d.ts.map +1 -1
  18. package/esm/models/operations/index.js +1 -0
  19. package/esm/models/operations/index.js.map +1 -1
  20. package/esm/models/operations/setquotawarningoverrides.d.ts +18 -0
  21. package/esm/models/operations/setquotawarningoverrides.d.ts.map +1 -0
  22. package/esm/models/operations/setquotawarningoverrides.js +19 -0
  23. package/esm/models/operations/setquotawarningoverrides.js.map +1 -0
  24. package/esm/models/setquotawarningoverridesrequest.d.ts +15 -0
  25. package/esm/models/setquotawarningoverridesrequest.d.ts.map +1 -0
  26. package/esm/models/setquotawarningoverridesrequest.js +12 -0
  27. package/esm/models/setquotawarningoverridesrequest.js.map +1 -0
  28. package/esm/models/setupmanagement.d.ts +18 -0
  29. package/esm/models/setupmanagement.d.ts.map +1 -0
  30. package/esm/models/setupmanagement.js +16 -0
  31. package/esm/models/setupmanagement.js.map +1 -0
  32. package/esm/models/stacksettings.d.ts +15 -0
  33. package/esm/models/stacksettings.d.ts.map +1 -1
  34. package/esm/models/stacksettings.js +5 -0
  35. package/esm/models/stacksettings.js.map +1 -1
  36. package/esm/sdk/deployments.d.ts +4 -0
  37. package/esm/sdk/deployments.d.ts.map +1 -1
  38. package/esm/sdk/deployments.js +7 -0
  39. package/esm/sdk/deployments.js.map +1 -1
  40. package/esm/sdk/sdk.d.ts +0 -3
  41. package/esm/sdk/sdk.d.ts.map +1 -1
  42. package/esm/sdk/sdk.js +0 -4
  43. package/esm/sdk/sdk.js.map +1 -1
  44. package/examples/package-lock.json +1 -1
  45. package/jsr.json +1 -1
  46. package/package.json +3 -3
  47. package/src/funcs/{credentialsMintCredentials.ts → deploymentsSetQuotaWarningOverrides.ts} +43 -18
  48. package/src/lib/config.ts +2 -2
  49. package/src/models/containerresourceselection.ts +10 -0
  50. package/src/models/index.ts +2 -12
  51. package/src/models/operations/index.ts +1 -0
  52. package/src/models/operations/setquotawarningoverrides.ts +46 -0
  53. package/src/models/setquotawarningoverridesrequest.ts +35 -0
  54. package/src/models/setupmanagement.ts +25 -0
  55. package/src/models/stacksettings.ts +23 -0
  56. package/src/sdk/deployments.ts +17 -0
  57. package/src/sdk/sdk.ts +0 -6
  58. package/esm/funcs/credentialsMintCredentials.d.ts.map +0 -1
  59. package/esm/funcs/credentialsMintCredentials.js.map +0 -1
  60. package/esm/models/awscredentials.d.ts +0 -121
  61. package/esm/models/awscredentials.d.ts.map +0 -1
  62. package/esm/models/awscredentials.js +0 -93
  63. package/esm/models/awscredentials.js.map +0 -1
  64. package/esm/models/awsserviceoverrides.d.ts +0 -21
  65. package/esm/models/awsserviceoverrides.d.ts.map +0 -1
  66. package/esm/models/awsserviceoverrides.js +0 -13
  67. package/esm/models/awsserviceoverrides.js.map +0 -1
  68. package/esm/models/awswebidentityconfig.d.ts +0 -28
  69. package/esm/models/awswebidentityconfig.d.ts.map +0 -1
  70. package/esm/models/awswebidentityconfig.js +0 -16
  71. package/esm/models/awswebidentityconfig.js.map +0 -1
  72. package/esm/models/azurecredentials.d.ts +0 -132
  73. package/esm/models/azurecredentials.d.ts.map +0 -1
  74. package/esm/models/azurecredentials.js +0 -97
  75. package/esm/models/azurecredentials.js.map +0 -1
  76. package/esm/models/azureserviceoverrides.d.ts +0 -21
  77. package/esm/models/azureserviceoverrides.d.ts.map +0 -1
  78. package/esm/models/azureserviceoverrides.js +0 -13
  79. package/esm/models/azureserviceoverrides.js.map +0 -1
  80. package/esm/models/clientconfigunion.d.ts +0 -284
  81. package/esm/models/clientconfigunion.d.ts.map +0 -1
  82. package/esm/models/clientconfigunion.js +0 -201
  83. package/esm/models/clientconfigunion.js.map +0 -1
  84. package/esm/models/gcpcredentials.d.ts +0 -138
  85. package/esm/models/gcpcredentials.d.ts.map +0 -1
  86. package/esm/models/gcpcredentials.js +0 -107
  87. package/esm/models/gcpcredentials.js.map +0 -1
  88. package/esm/models/gcpimpersonationconfig.d.ts +0 -42
  89. package/esm/models/gcpimpersonationconfig.d.ts.map +0 -1
  90. package/esm/models/gcpimpersonationconfig.js +0 -18
  91. package/esm/models/gcpimpersonationconfig.js.map +0 -1
  92. package/esm/models/gcpserviceoverrides.d.ts +0 -21
  93. package/esm/models/gcpserviceoverrides.d.ts.map +0 -1
  94. package/esm/models/gcpserviceoverrides.js +0 -13
  95. package/esm/models/gcpserviceoverrides.js.map +0 -1
  96. package/esm/models/kubernetesclientconfig.d.ts +0 -116
  97. package/esm/models/kubernetesclientconfig.d.ts.map +0 -1
  98. package/esm/models/kubernetesclientconfig.js +0 -73
  99. package/esm/models/kubernetesclientconfig.js.map +0 -1
  100. package/esm/models/mintcredentialsrequest.d.ts +0 -49
  101. package/esm/models/mintcredentialsrequest.d.ts.map +0 -1
  102. package/esm/models/mintcredentialsrequest.js +0 -15
  103. package/esm/models/mintcredentialsrequest.js.map +0 -1
  104. package/esm/models/mintcredentialsresponse.d.ts +0 -37
  105. package/esm/models/mintcredentialsresponse.d.ts.map +0 -1
  106. package/esm/models/mintcredentialsresponse.js +0 -16
  107. package/esm/models/mintcredentialsresponse.js.map +0 -1
  108. package/esm/sdk/credentials.d.ts +0 -6
  109. package/esm/sdk/credentials.d.ts.map +0 -1
  110. package/esm/sdk/credentials.js +0 -12
  111. package/esm/sdk/credentials.js.map +0 -1
  112. package/src/models/awscredentials.ts +0 -281
  113. package/src/models/awsserviceoverrides.ts +0 -39
  114. package/src/models/awswebidentityconfig.ts +0 -51
  115. package/src/models/azurecredentials.ts +0 -295
  116. package/src/models/azureserviceoverrides.ts +0 -39
  117. package/src/models/clientconfigunion.ts +0 -602
  118. package/src/models/gcpcredentials.ts +0 -335
  119. package/src/models/gcpimpersonationconfig.ts +0 -67
  120. package/src/models/gcpserviceoverrides.ts +0 -39
  121. package/src/models/kubernetesclientconfig.ts +0 -220
  122. package/src/models/mintcredentialsrequest.ts +0 -70
  123. package/src/models/mintcredentialsresponse.ts +0 -62
  124. package/src/sdk/credentials.ts +0 -21
@@ -1,335 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../lib/primitives.js";
7
- import { safeParse } from "../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../types/fp.js";
9
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
- import {
11
- GcpImpersonationConfig,
12
- GcpImpersonationConfig$inboundSchema,
13
- } from "./gcpimpersonationconfig.js";
14
-
15
- /**
16
- * Use gcloud Application Default Credentials (authorized_user).
17
- *
18
- * @remarks
19
- * Exchanges refresh_token for an access_token via Google's OAuth2 endpoint.
20
- */
21
- export type GcpCredentialsAuthorizedUser = {
22
- /**
23
- * OAuth2 client ID
24
- */
25
- clientId: string;
26
- /**
27
- * OAuth2 client secret
28
- */
29
- clientSecret: string;
30
- /**
31
- * OAuth2 refresh token
32
- */
33
- refreshToken: string;
34
- type: "authorizedUser";
35
- };
36
-
37
- /**
38
- * Use an external account credential configuration.
39
- */
40
- export type GcpCredentialsExternalAccount = {
41
- /**
42
- * Workload identity audience.
43
- */
44
- audience: string;
45
- /**
46
- * Path to the subject token file.
47
- */
48
- credentialSourceFile: string;
49
- /**
50
- * Optional service account impersonation URL.
51
- */
52
- serviceAccountImpersonationUrl?: string | null | undefined;
53
- /**
54
- * Subject token type for STS token exchange.
55
- */
56
- subjectTokenType: string;
57
- /**
58
- * STS token exchange URL.
59
- */
60
- tokenUrl: string;
61
- type: "externalAccount";
62
- };
63
-
64
- /**
65
- * Use projected service account token (for Kubernetes workload identity)
66
- */
67
- export type GcpCredentialsProjectedServiceAccount = {
68
- /**
69
- * Service account email
70
- */
71
- serviceAccountEmail: string;
72
- /**
73
- * Path to the projected service account token
74
- */
75
- tokenFile: string;
76
- type: "projectedServiceAccount";
77
- };
78
-
79
- /**
80
- * Use GCP metadata server for authentication (for instances running on GCP)
81
- */
82
- export type GcpCredentialsServiceMetadata = {
83
- type: "serviceMetadata";
84
- };
85
-
86
- /**
87
- * Use a full Service Account JSON key (as string). A short-lived JWT will
88
- *
89
- * @remarks
90
- * be created and exchanged for a bearer token automatically.
91
- */
92
- export type GcpCredentialsServiceAccountKey = {
93
- json: string;
94
- type: "serviceAccountKey";
95
- };
96
-
97
- /**
98
- * Source configuration used to call IAMCredentials.
99
- */
100
- export type Source = {};
101
-
102
- /**
103
- * Use a refreshable service account impersonation source.
104
- */
105
- export type GcpCredentialsImpersonatedServiceAccount = {
106
- /**
107
- * Configuration for GCP service account impersonation
108
- */
109
- config: GcpImpersonationConfig;
110
- /**
111
- * Source configuration used to call IAMCredentials.
112
- */
113
- source: Source;
114
- type: "impersonatedServiceAccount";
115
- };
116
-
117
- /**
118
- * Use an already-minted OAuth2 access token.
119
- */
120
- export type GcpCredentialsAccessToken = {
121
- token: string;
122
- type: "accessToken";
123
- };
124
-
125
- /**
126
- * Authentication options for talking to GCP APIs.
127
- */
128
- export type GcpCredentials =
129
- | GcpCredentialsAccessToken
130
- | GcpCredentialsImpersonatedServiceAccount
131
- | GcpCredentialsServiceAccountKey
132
- | GcpCredentialsServiceMetadata
133
- | GcpCredentialsProjectedServiceAccount
134
- | GcpCredentialsExternalAccount
135
- | GcpCredentialsAuthorizedUser;
136
-
137
- /** @internal */
138
- export const GcpCredentialsAuthorizedUser$inboundSchema: z.ZodType<
139
- GcpCredentialsAuthorizedUser,
140
- unknown
141
- > = z.object({
142
- client_id: z.string(),
143
- client_secret: z.string(),
144
- refresh_token: z.string(),
145
- type: z.literal("authorizedUser"),
146
- }).transform((v) => {
147
- return remap$(v, {
148
- "client_id": "clientId",
149
- "client_secret": "clientSecret",
150
- "refresh_token": "refreshToken",
151
- });
152
- });
153
-
154
- export function gcpCredentialsAuthorizedUserFromJSON(
155
- jsonString: string,
156
- ): SafeParseResult<GcpCredentialsAuthorizedUser, SDKValidationError> {
157
- return safeParse(
158
- jsonString,
159
- (x) => GcpCredentialsAuthorizedUser$inboundSchema.parse(JSON.parse(x)),
160
- `Failed to parse 'GcpCredentialsAuthorizedUser' from JSON`,
161
- );
162
- }
163
-
164
- /** @internal */
165
- export const GcpCredentialsExternalAccount$inboundSchema: z.ZodType<
166
- GcpCredentialsExternalAccount,
167
- unknown
168
- > = z.object({
169
- audience: z.string(),
170
- credential_source_file: z.string(),
171
- service_account_impersonation_url: z.nullable(z.string()).optional(),
172
- subject_token_type: z.string(),
173
- token_url: z.string(),
174
- type: z.literal("externalAccount"),
175
- }).transform((v) => {
176
- return remap$(v, {
177
- "credential_source_file": "credentialSourceFile",
178
- "service_account_impersonation_url": "serviceAccountImpersonationUrl",
179
- "subject_token_type": "subjectTokenType",
180
- "token_url": "tokenUrl",
181
- });
182
- });
183
-
184
- export function gcpCredentialsExternalAccountFromJSON(
185
- jsonString: string,
186
- ): SafeParseResult<GcpCredentialsExternalAccount, SDKValidationError> {
187
- return safeParse(
188
- jsonString,
189
- (x) => GcpCredentialsExternalAccount$inboundSchema.parse(JSON.parse(x)),
190
- `Failed to parse 'GcpCredentialsExternalAccount' from JSON`,
191
- );
192
- }
193
-
194
- /** @internal */
195
- export const GcpCredentialsProjectedServiceAccount$inboundSchema: z.ZodType<
196
- GcpCredentialsProjectedServiceAccount,
197
- unknown
198
- > = z.object({
199
- service_account_email: z.string(),
200
- token_file: z.string(),
201
- type: z.literal("projectedServiceAccount"),
202
- }).transform((v) => {
203
- return remap$(v, {
204
- "service_account_email": "serviceAccountEmail",
205
- "token_file": "tokenFile",
206
- });
207
- });
208
-
209
- export function gcpCredentialsProjectedServiceAccountFromJSON(
210
- jsonString: string,
211
- ): SafeParseResult<GcpCredentialsProjectedServiceAccount, SDKValidationError> {
212
- return safeParse(
213
- jsonString,
214
- (x) =>
215
- GcpCredentialsProjectedServiceAccount$inboundSchema.parse(JSON.parse(x)),
216
- `Failed to parse 'GcpCredentialsProjectedServiceAccount' from JSON`,
217
- );
218
- }
219
-
220
- /** @internal */
221
- export const GcpCredentialsServiceMetadata$inboundSchema: z.ZodType<
222
- GcpCredentialsServiceMetadata,
223
- unknown
224
- > = z.object({
225
- type: z.literal("serviceMetadata"),
226
- });
227
-
228
- export function gcpCredentialsServiceMetadataFromJSON(
229
- jsonString: string,
230
- ): SafeParseResult<GcpCredentialsServiceMetadata, SDKValidationError> {
231
- return safeParse(
232
- jsonString,
233
- (x) => GcpCredentialsServiceMetadata$inboundSchema.parse(JSON.parse(x)),
234
- `Failed to parse 'GcpCredentialsServiceMetadata' from JSON`,
235
- );
236
- }
237
-
238
- /** @internal */
239
- export const GcpCredentialsServiceAccountKey$inboundSchema: z.ZodType<
240
- GcpCredentialsServiceAccountKey,
241
- unknown
242
- > = z.object({
243
- json: z.string(),
244
- type: z.literal("serviceAccountKey"),
245
- });
246
-
247
- export function gcpCredentialsServiceAccountKeyFromJSON(
248
- jsonString: string,
249
- ): SafeParseResult<GcpCredentialsServiceAccountKey, SDKValidationError> {
250
- return safeParse(
251
- jsonString,
252
- (x) => GcpCredentialsServiceAccountKey$inboundSchema.parse(JSON.parse(x)),
253
- `Failed to parse 'GcpCredentialsServiceAccountKey' from JSON`,
254
- );
255
- }
256
-
257
- /** @internal */
258
- export const Source$inboundSchema: z.ZodType<Source, unknown> = z.object({});
259
-
260
- export function sourceFromJSON(
261
- jsonString: string,
262
- ): SafeParseResult<Source, SDKValidationError> {
263
- return safeParse(
264
- jsonString,
265
- (x) => Source$inboundSchema.parse(JSON.parse(x)),
266
- `Failed to parse 'Source' from JSON`,
267
- );
268
- }
269
-
270
- /** @internal */
271
- export const GcpCredentialsImpersonatedServiceAccount$inboundSchema: z.ZodType<
272
- GcpCredentialsImpersonatedServiceAccount,
273
- unknown
274
- > = z.object({
275
- config: GcpImpersonationConfig$inboundSchema,
276
- source: z.lazy(() => Source$inboundSchema),
277
- type: z.literal("impersonatedServiceAccount"),
278
- });
279
-
280
- export function gcpCredentialsImpersonatedServiceAccountFromJSON(
281
- jsonString: string,
282
- ): SafeParseResult<
283
- GcpCredentialsImpersonatedServiceAccount,
284
- SDKValidationError
285
- > {
286
- return safeParse(
287
- jsonString,
288
- (x) =>
289
- GcpCredentialsImpersonatedServiceAccount$inboundSchema.parse(
290
- JSON.parse(x),
291
- ),
292
- `Failed to parse 'GcpCredentialsImpersonatedServiceAccount' from JSON`,
293
- );
294
- }
295
-
296
- /** @internal */
297
- export const GcpCredentialsAccessToken$inboundSchema: z.ZodType<
298
- GcpCredentialsAccessToken,
299
- unknown
300
- > = z.object({
301
- token: z.string(),
302
- type: z.literal("accessToken"),
303
- });
304
-
305
- export function gcpCredentialsAccessTokenFromJSON(
306
- jsonString: string,
307
- ): SafeParseResult<GcpCredentialsAccessToken, SDKValidationError> {
308
- return safeParse(
309
- jsonString,
310
- (x) => GcpCredentialsAccessToken$inboundSchema.parse(JSON.parse(x)),
311
- `Failed to parse 'GcpCredentialsAccessToken' from JSON`,
312
- );
313
- }
314
-
315
- /** @internal */
316
- export const GcpCredentials$inboundSchema: z.ZodType<GcpCredentials, unknown> =
317
- z.union([
318
- z.lazy(() => GcpCredentialsAccessToken$inboundSchema),
319
- z.lazy(() => GcpCredentialsImpersonatedServiceAccount$inboundSchema),
320
- z.lazy(() => GcpCredentialsServiceAccountKey$inboundSchema),
321
- z.lazy(() => GcpCredentialsServiceMetadata$inboundSchema),
322
- z.lazy(() => GcpCredentialsProjectedServiceAccount$inboundSchema),
323
- z.lazy(() => GcpCredentialsExternalAccount$inboundSchema),
324
- z.lazy(() => GcpCredentialsAuthorizedUser$inboundSchema),
325
- ]);
326
-
327
- export function gcpCredentialsFromJSON(
328
- jsonString: string,
329
- ): SafeParseResult<GcpCredentials, SDKValidationError> {
330
- return safeParse(
331
- jsonString,
332
- (x) => GcpCredentials$inboundSchema.parse(JSON.parse(x)),
333
- `Failed to parse 'GcpCredentials' from JSON`,
334
- );
335
- }
@@ -1,67 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4";
6
- import { safeParse } from "../lib/schemas.js";
7
- import { Result as SafeParseResult } from "../types/fp.js";
8
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
9
-
10
- /**
11
- * Configuration for GCP service account impersonation
12
- */
13
- export type GcpImpersonationConfig = {
14
- /**
15
- * Optional sequence of service accounts in a delegation chain
16
- */
17
- delegates?: Array<string> | null | undefined;
18
- /**
19
- * Optional desired lifetime duration of the access token (max 3600s)
20
- */
21
- lifetime?: string | null | undefined;
22
- /**
23
- * The OAuth 2.0 scopes that define the access token's permissions
24
- */
25
- scopes: Array<string>;
26
- /**
27
- * The email of the service account to impersonate
28
- */
29
- serviceAccountEmail: string;
30
- /**
31
- * Optional target project ID override. When provided, the impersonated config
32
- *
33
- * @remarks
34
- * uses this project ID instead of inheriting the caller's project.
35
- */
36
- targetProjectId?: string | null | undefined;
37
- /**
38
- * Optional target region override. When provided, the impersonated config
39
- *
40
- * @remarks
41
- * uses this region instead of inheriting the caller's region.
42
- */
43
- targetRegion?: string | null | undefined;
44
- };
45
-
46
- /** @internal */
47
- export const GcpImpersonationConfig$inboundSchema: z.ZodType<
48
- GcpImpersonationConfig,
49
- unknown
50
- > = z.object({
51
- delegates: z.nullable(z.array(z.string())).optional(),
52
- lifetime: z.nullable(z.string()).optional(),
53
- scopes: z.array(z.string()),
54
- serviceAccountEmail: z.string(),
55
- targetProjectId: z.nullable(z.string()).optional(),
56
- targetRegion: z.nullable(z.string()).optional(),
57
- });
58
-
59
- export function gcpImpersonationConfigFromJSON(
60
- jsonString: string,
61
- ): SafeParseResult<GcpImpersonationConfig, SDKValidationError> {
62
- return safeParse(
63
- jsonString,
64
- (x) => GcpImpersonationConfig$inboundSchema.parse(JSON.parse(x)),
65
- `Failed to parse 'GcpImpersonationConfig' from JSON`,
66
- );
67
- }
@@ -1,39 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4";
6
- import { safeParse } from "../lib/schemas.js";
7
- import { Result as SafeParseResult } from "../types/fp.js";
8
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
9
-
10
- /**
11
- * Service endpoint overrides for testing GCP services
12
- */
13
- export type GcpServiceOverrides = {
14
- /**
15
- * Override endpoints for specific GCP services
16
- *
17
- * @remarks
18
- * Key is the service name (e.g., "cloudrun", "storage"), value is the base URL
19
- */
20
- endpoints: { [k: string]: string };
21
- };
22
-
23
- /** @internal */
24
- export const GcpServiceOverrides$inboundSchema: z.ZodType<
25
- GcpServiceOverrides,
26
- unknown
27
- > = z.object({
28
- endpoints: z.record(z.string(), z.string()),
29
- });
30
-
31
- export function gcpServiceOverridesFromJSON(
32
- jsonString: string,
33
- ): SafeParseResult<GcpServiceOverrides, SDKValidationError> {
34
- return safeParse(
35
- jsonString,
36
- (x) => GcpServiceOverrides$inboundSchema.parse(JSON.parse(x)),
37
- `Failed to parse 'GcpServiceOverrides' from JSON`,
38
- );
39
- }
@@ -1,220 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../lib/primitives.js";
7
- import { safeParse } from "../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../types/fp.js";
9
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
10
-
11
- /**
12
- * Manual configuration with explicit values
13
- */
14
- export type KubernetesClientConfigManual = {
15
- /**
16
- * Additional headers to include in requests
17
- */
18
- additionalHeaders: { [k: string]: string };
19
- /**
20
- * The cluster certificate authority data (base64 encoded)
21
- */
22
- certificateAuthorityData?: string | null | undefined;
23
- /**
24
- * Client certificate data (base64 encoded) for mutual TLS
25
- */
26
- clientCertificateData?: string | null | undefined;
27
- /**
28
- * Client key data (base64 encoded) for mutual TLS
29
- */
30
- clientKeyData?: string | null | undefined;
31
- /**
32
- * Skip TLS verification (insecure)
33
- */
34
- insecureSkipTlsVerify?: boolean | null | undefined;
35
- mode: "manual";
36
- /**
37
- * The namespace to operate in
38
- */
39
- namespace?: string | null | undefined;
40
- /**
41
- * Password for basic authentication
42
- */
43
- password?: string | null | undefined;
44
- /**
45
- * The Kubernetes cluster server URL
46
- */
47
- serverUrl: string;
48
- /**
49
- * Bearer token for authentication
50
- */
51
- token?: string | null | undefined;
52
- /**
53
- * Username for basic authentication
54
- */
55
- username?: string | null | undefined;
56
- };
57
-
58
- /**
59
- * Use kubeconfig file for configuration
60
- */
61
- export type KubernetesClientConfigKubeconfig = {
62
- /**
63
- * Additional headers to include in requests
64
- */
65
- additionalHeaders?: { [k: string]: string } | null | undefined;
66
- /**
67
- * Cluster name to use (optional, defaults to context's cluster)
68
- */
69
- cluster?: string | null | undefined;
70
- /**
71
- * Context name to use (optional, defaults to current-context)
72
- */
73
- context?: string | null | undefined;
74
- /**
75
- * Path to kubeconfig file (optional, defaults to standard locations)
76
- */
77
- kubeconfigPath?: string | null | undefined;
78
- mode: "kubeconfig";
79
- /**
80
- * The namespace to operate in
81
- */
82
- namespace?: string | null | undefined;
83
- /**
84
- * User name to use (optional, defaults to context's user)
85
- */
86
- user?: string | null | undefined;
87
- };
88
-
89
- /**
90
- * Use in-cluster configuration (service account tokens, etc.)
91
- */
92
- export type KubernetesClientConfigInCluster = {
93
- /**
94
- * Additional headers to include in requests
95
- */
96
- additionalHeaders?: { [k: string]: string } | null | undefined;
97
- mode: "inCluster";
98
- /**
99
- * The namespace to operate in
100
- */
101
- namespace?: string | null | undefined;
102
- };
103
-
104
- /**
105
- * Configuration mode for Kubernetes access
106
- */
107
- export type KubernetesClientConfig =
108
- | KubernetesClientConfigInCluster
109
- | KubernetesClientConfigKubeconfig
110
- | KubernetesClientConfigManual;
111
-
112
- /** @internal */
113
- export const KubernetesClientConfigManual$inboundSchema: z.ZodType<
114
- KubernetesClientConfigManual,
115
- unknown
116
- > = z.object({
117
- additional_headers: z.record(z.string(), z.string()),
118
- certificate_authority_data: z.nullable(z.string()).optional(),
119
- client_certificate_data: z.nullable(z.string()).optional(),
120
- client_key_data: z.nullable(z.string()).optional(),
121
- insecure_skip_tls_verify: z.nullable(z.boolean()).optional(),
122
- mode: z.literal("manual"),
123
- namespace: z.nullable(z.string()).optional(),
124
- password: z.nullable(z.string()).optional(),
125
- server_url: z.string(),
126
- token: z.nullable(z.string()).optional(),
127
- username: z.nullable(z.string()).optional(),
128
- }).transform((v) => {
129
- return remap$(v, {
130
- "additional_headers": "additionalHeaders",
131
- "certificate_authority_data": "certificateAuthorityData",
132
- "client_certificate_data": "clientCertificateData",
133
- "client_key_data": "clientKeyData",
134
- "insecure_skip_tls_verify": "insecureSkipTlsVerify",
135
- "server_url": "serverUrl",
136
- });
137
- });
138
-
139
- export function kubernetesClientConfigManualFromJSON(
140
- jsonString: string,
141
- ): SafeParseResult<KubernetesClientConfigManual, SDKValidationError> {
142
- return safeParse(
143
- jsonString,
144
- (x) => KubernetesClientConfigManual$inboundSchema.parse(JSON.parse(x)),
145
- `Failed to parse 'KubernetesClientConfigManual' from JSON`,
146
- );
147
- }
148
-
149
- /** @internal */
150
- export const KubernetesClientConfigKubeconfig$inboundSchema: z.ZodType<
151
- KubernetesClientConfigKubeconfig,
152
- unknown
153
- > = z.object({
154
- additional_headers: z.nullable(z.record(z.string(), z.string())).optional(),
155
- cluster: z.nullable(z.string()).optional(),
156
- context: z.nullable(z.string()).optional(),
157
- kubeconfig_path: z.nullable(z.string()).optional(),
158
- mode: z.literal("kubeconfig"),
159
- namespace: z.nullable(z.string()).optional(),
160
- user: z.nullable(z.string()).optional(),
161
- }).transform((v) => {
162
- return remap$(v, {
163
- "additional_headers": "additionalHeaders",
164
- "kubeconfig_path": "kubeconfigPath",
165
- });
166
- });
167
-
168
- export function kubernetesClientConfigKubeconfigFromJSON(
169
- jsonString: string,
170
- ): SafeParseResult<KubernetesClientConfigKubeconfig, SDKValidationError> {
171
- return safeParse(
172
- jsonString,
173
- (x) => KubernetesClientConfigKubeconfig$inboundSchema.parse(JSON.parse(x)),
174
- `Failed to parse 'KubernetesClientConfigKubeconfig' from JSON`,
175
- );
176
- }
177
-
178
- /** @internal */
179
- export const KubernetesClientConfigInCluster$inboundSchema: z.ZodType<
180
- KubernetesClientConfigInCluster,
181
- unknown
182
- > = z.object({
183
- additional_headers: z.nullable(z.record(z.string(), z.string())).optional(),
184
- mode: z.literal("inCluster"),
185
- namespace: z.nullable(z.string()).optional(),
186
- }).transform((v) => {
187
- return remap$(v, {
188
- "additional_headers": "additionalHeaders",
189
- });
190
- });
191
-
192
- export function kubernetesClientConfigInClusterFromJSON(
193
- jsonString: string,
194
- ): SafeParseResult<KubernetesClientConfigInCluster, SDKValidationError> {
195
- return safeParse(
196
- jsonString,
197
- (x) => KubernetesClientConfigInCluster$inboundSchema.parse(JSON.parse(x)),
198
- `Failed to parse 'KubernetesClientConfigInCluster' from JSON`,
199
- );
200
- }
201
-
202
- /** @internal */
203
- export const KubernetesClientConfig$inboundSchema: z.ZodType<
204
- KubernetesClientConfig,
205
- unknown
206
- > = z.union([
207
- z.lazy(() => KubernetesClientConfigInCluster$inboundSchema),
208
- z.lazy(() => KubernetesClientConfigKubeconfig$inboundSchema),
209
- z.lazy(() => KubernetesClientConfigManual$inboundSchema),
210
- ]);
211
-
212
- export function kubernetesClientConfigFromJSON(
213
- jsonString: string,
214
- ): SafeParseResult<KubernetesClientConfig, SDKValidationError> {
215
- return safeParse(
216
- jsonString,
217
- (x) => KubernetesClientConfig$inboundSchema.parse(JSON.parse(x)),
218
- `Failed to parse 'KubernetesClientConfig' from JSON`,
219
- );
220
- }