@postman/sdk-config 0.24.0 → 0.25.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/dist/index.cjs +60 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +60 -2
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +42 -0
- package/dist/sdk-config/index.cjs.map +1 -1
- package/dist/sdk-config/index.d.cts +1 -1
- package/dist/sdk-config/index.d.ts +1 -1
- package/dist/sdk-config/index.js +42 -0
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +42 -0
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +10 -2
- package/dist/sdk-config/v1/index.d.ts +10 -2
- package/dist/sdk-config/v1/index.js +42 -0
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +55 -1
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +2 -2
- package/dist/sdk-config-ir/index.d.ts +2 -2
- package/dist/sdk-config-ir/index.js +55 -2
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +55 -1
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +30 -3
- package/dist/sdk-config-ir/v1/index.d.ts +30 -3
- package/dist/sdk-config-ir/v1/index.js +55 -2
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-BcBGIPrg.d.cts → typescript-BIq_eF34.d.cts} +2 -0
- package/dist/{typescript-BcBGIPrg.d.ts → typescript-BIq_eF34.d.ts} +2 -0
- package/package.json +1 -1
- package/src/sdk-config/v1/README.md +31 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-
|
|
2
|
-
export { C as CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as CliDistributionConfig, b as CliDistributionGithubAppConfig, c as CliDistributionHomebrewConfig, d as CliDistributionScoopConfig, e as CliGenerationConfig, f as CliOAuthTokenEndpoints, g as CliProfilesConfig, h as CliProfilesProvisionOperation, i as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, k as JsonValue, K as KotlinGenerationConfig, M as MCP_TOOL_NAME_PATTERN, l as McpAvailabilityStatus, m as McpCustomTool, n as McpGenerationConfig, o as McpHooks, p as McpMergedTool, q as McpToolFilter, P as PackageConfig, r as PhpGenerationConfig, s as PlanModifiers, t as PythonGenerationConfig, R as RubyGenerationConfig, u as RustGenerationConfig, v as SwiftGenerationConfig, T as TerraformGenerationConfig, w as TypescriptGenerationConfig, x as cliDistributionConfigSchema, y as cliDistributionGithubAppSchema, z as cliDistributionHomebrewSchema, A as cliDistributionScoopSchema, B as cliGenerationConfigSchema, E as composerPackageNameSchema, F as csharpGenerationConfigSchema, H as dependencySchema, I as exactSemverSchema, L as githubActionsSecretNameSchema, N as goGenerationConfigSchema, O as goModulePathSchema, Q as javaGenerationConfigSchema, U as jsonObjectSchema, V as jsonValueSchema, W as kotlinGenerationConfigSchema, X as mcpAvailabilityStatuses, Y as mcpGenerationConfigSchema, Z as nonEmptyStringSchema, _ as oauthTokenEndpointsIssues, $ as packageConfigSchema, a0 as parentRelativePathSchema, a1 as phpGenerationConfigSchema, a2 as pythonGenerationConfigSchema, a3 as relativePathSchema, a4 as rubyGenerationConfigSchema, a5 as rustGenerationConfigSchema, a6 as swiftGenerationConfigSchema, a7 as terraformGenerationConfigSchema, a8 as typescriptGenerationConfigSchema } from '../../typescript-
|
|
1
|
+
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-BIq_eF34.cjs';
|
|
2
|
+
export { C as CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as CliDistributionConfig, b as CliDistributionGithubAppConfig, c as CliDistributionHomebrewConfig, d as CliDistributionScoopConfig, e as CliGenerationConfig, f as CliOAuthTokenEndpoints, g as CliProfilesConfig, h as CliProfilesProvisionOperation, i as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, k as JsonValue, K as KotlinGenerationConfig, M as MCP_TOOL_NAME_PATTERN, l as McpAvailabilityStatus, m as McpCustomTool, n as McpGenerationConfig, o as McpHooks, p as McpMergedTool, q as McpToolFilter, P as PackageConfig, r as PhpGenerationConfig, s as PlanModifiers, t as PythonGenerationConfig, R as RubyGenerationConfig, u as RustGenerationConfig, v as SwiftGenerationConfig, T as TerraformGenerationConfig, w as TypescriptGenerationConfig, x as cliDistributionConfigSchema, y as cliDistributionGithubAppSchema, z as cliDistributionHomebrewSchema, A as cliDistributionScoopSchema, B as cliGenerationConfigSchema, E as composerPackageNameSchema, F as csharpGenerationConfigSchema, H as dependencySchema, I as exactSemverSchema, L as githubActionsSecretNameSchema, N as goGenerationConfigSchema, O as goModulePathSchema, Q as javaGenerationConfigSchema, U as jsonObjectSchema, V as jsonValueSchema, W as kotlinGenerationConfigSchema, X as mcpAvailabilityStatuses, Y as mcpGenerationConfigSchema, Z as nonEmptyStringSchema, _ as oauthTokenEndpointsIssues, $ as packageConfigSchema, a0 as parentRelativePathSchema, a1 as phpGenerationConfigSchema, a2 as pythonGenerationConfigSchema, a3 as relativePathSchema, a4 as rubyGenerationConfigSchema, a5 as rustGenerationConfigSchema, a6 as swiftGenerationConfigSchema, a7 as terraformGenerationConfigSchema, a8 as typescriptGenerationConfigSchema } from '../../typescript-BIq_eF34.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const authSchemeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -60,6 +60,7 @@ declare const authSchemeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
60
60
|
}, z.core.$strict>, z.ZodObject<{
|
|
61
61
|
type: z.ZodLiteral<"client-credentials">;
|
|
62
62
|
tokenUrl: z.ZodString;
|
|
63
|
+
environmentTokenUrls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
63
64
|
refreshUrl: z.ZodOptional<z.ZodString>;
|
|
64
65
|
scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
65
66
|
name: z.ZodString;
|
|
@@ -186,6 +187,7 @@ declare const authConfigSchema: z.ZodObject<{
|
|
|
186
187
|
}, z.core.$strict>, z.ZodObject<{
|
|
187
188
|
type: z.ZodLiteral<"client-credentials">;
|
|
188
189
|
tokenUrl: z.ZodString;
|
|
190
|
+
environmentTokenUrls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
189
191
|
refreshUrl: z.ZodOptional<z.ZodString>;
|
|
190
192
|
scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
191
193
|
name: z.ZodString;
|
|
@@ -334,6 +336,7 @@ declare const apiConfigSchema: z.ZodObject<{
|
|
|
334
336
|
}, z.core.$strict>, z.ZodObject<{
|
|
335
337
|
type: z.ZodLiteral<"client-credentials">;
|
|
336
338
|
tokenUrl: z.ZodString;
|
|
339
|
+
environmentTokenUrls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
337
340
|
refreshUrl: z.ZodOptional<z.ZodString>;
|
|
338
341
|
scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
339
342
|
name: z.ZodString;
|
|
@@ -482,6 +485,22 @@ type AuthScheme = z.infer<typeof authSchemeSchema>;
|
|
|
482
485
|
type AuthConfig = z.infer<typeof authConfigSchema>;
|
|
483
486
|
type ApiConfigInput = z.input<typeof apiConfigSchema>;
|
|
484
487
|
type ApiConfig = z.output<typeof apiConfigSchema>;
|
|
488
|
+
interface EnvironmentTokenUrlIssue {
|
|
489
|
+
message: string;
|
|
490
|
+
path: (string | number)[];
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Checks each client-credentials `environmentTokenUrls` key against the environments of the same
|
|
494
|
+
* document, so a typo cannot silently leave an environment on the production token endpoint.
|
|
495
|
+
*/
|
|
496
|
+
declare function oauthEnvironmentTokenUrlsIssues(api: {
|
|
497
|
+
environments?: readonly {
|
|
498
|
+
name: string;
|
|
499
|
+
}[] | undefined;
|
|
500
|
+
auth?: {
|
|
501
|
+
schemes: readonly AuthScheme[];
|
|
502
|
+
} | undefined;
|
|
503
|
+
}, basePath: (string | number)[]): EnvironmentTokenUrlIssue[];
|
|
485
504
|
|
|
486
505
|
declare const clientRetryOverrideSchema: z.ZodObject<{
|
|
487
506
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -897,6 +916,7 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
|
|
|
897
916
|
}, z.core.$strict>, z.ZodObject<{
|
|
898
917
|
type: z.ZodLiteral<"client-credentials">;
|
|
899
918
|
tokenUrl: z.ZodString;
|
|
919
|
+
environmentTokenUrls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
900
920
|
refreshUrl: z.ZodOptional<z.ZodString>;
|
|
901
921
|
scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
902
922
|
name: z.ZodString;
|
|
@@ -2714,6 +2734,8 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
|
|
|
2714
2734
|
}, z.core.$strict>>>;
|
|
2715
2735
|
serverName: z.ZodOptional<z.ZodString>;
|
|
2716
2736
|
serverDescription: z.ZodOptional<z.ZodString>;
|
|
2737
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
2738
|
+
appendInstructions: z.ZodOptional<z.ZodString>;
|
|
2717
2739
|
excludeAvailability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2718
2740
|
IN_DEVELOPMENT: "IN_DEVELOPMENT";
|
|
2719
2741
|
PRE_RELEASE: "PRE_RELEASE";
|
|
@@ -3195,6 +3217,8 @@ declare const languageGenerationConfigSchema: z.ZodObject<{
|
|
|
3195
3217
|
}, z.core.$strict>>>;
|
|
3196
3218
|
serverName: z.ZodOptional<z.ZodString>;
|
|
3197
3219
|
serverDescription: z.ZodOptional<z.ZodString>;
|
|
3220
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
3221
|
+
appendInstructions: z.ZodOptional<z.ZodString>;
|
|
3198
3222
|
excludeAvailability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3199
3223
|
IN_DEVELOPMENT: "IN_DEVELOPMENT";
|
|
3200
3224
|
PRE_RELEASE: "PRE_RELEASE";
|
|
@@ -3711,6 +3735,8 @@ declare const generationConfigSchema: z.ZodObject<{
|
|
|
3711
3735
|
}, z.core.$strict>>>;
|
|
3712
3736
|
serverName: z.ZodOptional<z.ZodString>;
|
|
3713
3737
|
serverDescription: z.ZodOptional<z.ZodString>;
|
|
3738
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
3739
|
+
appendInstructions: z.ZodOptional<z.ZodString>;
|
|
3714
3740
|
excludeAvailability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3715
3741
|
IN_DEVELOPMENT: "IN_DEVELOPMENT";
|
|
3716
3742
|
PRE_RELEASE: "PRE_RELEASE";
|
|
@@ -5622,6 +5648,7 @@ type WebhookSignature = z.output<typeof webhookSignatureSchema>;
|
|
|
5622
5648
|
|
|
5623
5649
|
declare const sdkConfigIrCapabilitySchema: z.ZodEnum<{
|
|
5624
5650
|
"generation.generateFullProject": "generation.generateFullProject";
|
|
5651
|
+
"api.auth.oauth.environmentTokenUrls": "api.auth.oauth.environmentTokenUrls";
|
|
5625
5652
|
}>;
|
|
5626
5653
|
type SdkConfigIrCapability = z.infer<typeof sdkConfigIrCapabilitySchema>;
|
|
5627
5654
|
interface SerializedSdkConfigIrV1 {
|
|
@@ -5642,4 +5669,4 @@ declare function serializeSdkConfigIrV1(value: SdkConfigIrV1Input | SdkConfigIrV
|
|
|
5642
5669
|
*/
|
|
5643
5670
|
declare function parseSdkConfigIrV1ForConsumption(value: unknown): SdkConfigIrV1;
|
|
5644
5671
|
|
|
5645
|
-
export { type ApiConfig, type ApiConfigInput, type ApiImportSettings, type AuthConfig, type AuthScheme, type ClientConfig, type ClientConfigInput, type ClientConfigOverride, type CompatibilityConfig, type CredentialResolution, type DocsConfig, type GenerationConfig, JsonObject, type LanguageGenerationConfig, type LegacyInput, type OutputConfig, type PublishConfig, type PublishRegistry, type ReadmeCustomSection, type ReadmeEndpoint, type ReplayConfig, SDK_CONFIG_IR_V1_SCHEMA_VERSION, type SdkConfigIrCapability, type SdkConfigIrV1, SdkConfigDiagnostic as SdkConfigIrV1Diagnostic, type SdkConfigIrV1Input, type SerializedSdkConfigIrV1, type SourceConfig, type SourceSpecConfig, type SourceSpecOrigin, type SourceSpecType, type TargetConfig, type TargetLanguage, type UnsupportedField, type WebhookSignature, type WebhookSignatureInput, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, docsConfigSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, languageGenerationConfigSchema, legacyInputSchema, outputConfigSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, publishConfigSchema, publishRegistrySchema, readmeCustomSectionSchema, readmeEndpointSchema, replayConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, targetConfigSchema, targetLanguageSchema, unsupportedFieldSchema, webhookSignatureSchema };
|
|
5672
|
+
export { type ApiConfig, type ApiConfigInput, type ApiImportSettings, type AuthConfig, type AuthScheme, type ClientConfig, type ClientConfigInput, type ClientConfigOverride, type CompatibilityConfig, type CredentialResolution, type DocsConfig, type GenerationConfig, JsonObject, type LanguageGenerationConfig, type LegacyInput, type OutputConfig, type PublishConfig, type PublishRegistry, type ReadmeCustomSection, type ReadmeEndpoint, type ReplayConfig, SDK_CONFIG_IR_V1_SCHEMA_VERSION, type SdkConfigIrCapability, type SdkConfigIrV1, SdkConfigDiagnostic as SdkConfigIrV1Diagnostic, type SdkConfigIrV1Input, type SerializedSdkConfigIrV1, type SourceConfig, type SourceSpecConfig, type SourceSpecOrigin, type SourceSpecType, type TargetConfig, type TargetLanguage, type UnsupportedField, type WebhookSignature, type WebhookSignatureInput, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, docsConfigSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, languageGenerationConfigSchema, legacyInputSchema, oauthEnvironmentTokenUrlsIssues, outputConfigSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, publishConfigSchema, publishRegistrySchema, readmeCustomSectionSchema, readmeEndpointSchema, replayConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, targetConfigSchema, targetLanguageSchema, unsupportedFieldSchema, webhookSignatureSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-
|
|
2
|
-
export { C as CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as CliDistributionConfig, b as CliDistributionGithubAppConfig, c as CliDistributionHomebrewConfig, d as CliDistributionScoopConfig, e as CliGenerationConfig, f as CliOAuthTokenEndpoints, g as CliProfilesConfig, h as CliProfilesProvisionOperation, i as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, k as JsonValue, K as KotlinGenerationConfig, M as MCP_TOOL_NAME_PATTERN, l as McpAvailabilityStatus, m as McpCustomTool, n as McpGenerationConfig, o as McpHooks, p as McpMergedTool, q as McpToolFilter, P as PackageConfig, r as PhpGenerationConfig, s as PlanModifiers, t as PythonGenerationConfig, R as RubyGenerationConfig, u as RustGenerationConfig, v as SwiftGenerationConfig, T as TerraformGenerationConfig, w as TypescriptGenerationConfig, x as cliDistributionConfigSchema, y as cliDistributionGithubAppSchema, z as cliDistributionHomebrewSchema, A as cliDistributionScoopSchema, B as cliGenerationConfigSchema, E as composerPackageNameSchema, F as csharpGenerationConfigSchema, H as dependencySchema, I as exactSemverSchema, L as githubActionsSecretNameSchema, N as goGenerationConfigSchema, O as goModulePathSchema, Q as javaGenerationConfigSchema, U as jsonObjectSchema, V as jsonValueSchema, W as kotlinGenerationConfigSchema, X as mcpAvailabilityStatuses, Y as mcpGenerationConfigSchema, Z as nonEmptyStringSchema, _ as oauthTokenEndpointsIssues, $ as packageConfigSchema, a0 as parentRelativePathSchema, a1 as phpGenerationConfigSchema, a2 as pythonGenerationConfigSchema, a3 as relativePathSchema, a4 as rubyGenerationConfigSchema, a5 as rustGenerationConfigSchema, a6 as swiftGenerationConfigSchema, a7 as terraformGenerationConfigSchema, a8 as typescriptGenerationConfigSchema } from '../../typescript-
|
|
1
|
+
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-BIq_eF34.js';
|
|
2
|
+
export { C as CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as CliDistributionConfig, b as CliDistributionGithubAppConfig, c as CliDistributionHomebrewConfig, d as CliDistributionScoopConfig, e as CliGenerationConfig, f as CliOAuthTokenEndpoints, g as CliProfilesConfig, h as CliProfilesProvisionOperation, i as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, k as JsonValue, K as KotlinGenerationConfig, M as MCP_TOOL_NAME_PATTERN, l as McpAvailabilityStatus, m as McpCustomTool, n as McpGenerationConfig, o as McpHooks, p as McpMergedTool, q as McpToolFilter, P as PackageConfig, r as PhpGenerationConfig, s as PlanModifiers, t as PythonGenerationConfig, R as RubyGenerationConfig, u as RustGenerationConfig, v as SwiftGenerationConfig, T as TerraformGenerationConfig, w as TypescriptGenerationConfig, x as cliDistributionConfigSchema, y as cliDistributionGithubAppSchema, z as cliDistributionHomebrewSchema, A as cliDistributionScoopSchema, B as cliGenerationConfigSchema, E as composerPackageNameSchema, F as csharpGenerationConfigSchema, H as dependencySchema, I as exactSemverSchema, L as githubActionsSecretNameSchema, N as goGenerationConfigSchema, O as goModulePathSchema, Q as javaGenerationConfigSchema, U as jsonObjectSchema, V as jsonValueSchema, W as kotlinGenerationConfigSchema, X as mcpAvailabilityStatuses, Y as mcpGenerationConfigSchema, Z as nonEmptyStringSchema, _ as oauthTokenEndpointsIssues, $ as packageConfigSchema, a0 as parentRelativePathSchema, a1 as phpGenerationConfigSchema, a2 as pythonGenerationConfigSchema, a3 as relativePathSchema, a4 as rubyGenerationConfigSchema, a5 as rustGenerationConfigSchema, a6 as swiftGenerationConfigSchema, a7 as terraformGenerationConfigSchema, a8 as typescriptGenerationConfigSchema } from '../../typescript-BIq_eF34.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const authSchemeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -60,6 +60,7 @@ declare const authSchemeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
60
60
|
}, z.core.$strict>, z.ZodObject<{
|
|
61
61
|
type: z.ZodLiteral<"client-credentials">;
|
|
62
62
|
tokenUrl: z.ZodString;
|
|
63
|
+
environmentTokenUrls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
63
64
|
refreshUrl: z.ZodOptional<z.ZodString>;
|
|
64
65
|
scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
65
66
|
name: z.ZodString;
|
|
@@ -186,6 +187,7 @@ declare const authConfigSchema: z.ZodObject<{
|
|
|
186
187
|
}, z.core.$strict>, z.ZodObject<{
|
|
187
188
|
type: z.ZodLiteral<"client-credentials">;
|
|
188
189
|
tokenUrl: z.ZodString;
|
|
190
|
+
environmentTokenUrls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
189
191
|
refreshUrl: z.ZodOptional<z.ZodString>;
|
|
190
192
|
scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
191
193
|
name: z.ZodString;
|
|
@@ -334,6 +336,7 @@ declare const apiConfigSchema: z.ZodObject<{
|
|
|
334
336
|
}, z.core.$strict>, z.ZodObject<{
|
|
335
337
|
type: z.ZodLiteral<"client-credentials">;
|
|
336
338
|
tokenUrl: z.ZodString;
|
|
339
|
+
environmentTokenUrls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
337
340
|
refreshUrl: z.ZodOptional<z.ZodString>;
|
|
338
341
|
scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
339
342
|
name: z.ZodString;
|
|
@@ -482,6 +485,22 @@ type AuthScheme = z.infer<typeof authSchemeSchema>;
|
|
|
482
485
|
type AuthConfig = z.infer<typeof authConfigSchema>;
|
|
483
486
|
type ApiConfigInput = z.input<typeof apiConfigSchema>;
|
|
484
487
|
type ApiConfig = z.output<typeof apiConfigSchema>;
|
|
488
|
+
interface EnvironmentTokenUrlIssue {
|
|
489
|
+
message: string;
|
|
490
|
+
path: (string | number)[];
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Checks each client-credentials `environmentTokenUrls` key against the environments of the same
|
|
494
|
+
* document, so a typo cannot silently leave an environment on the production token endpoint.
|
|
495
|
+
*/
|
|
496
|
+
declare function oauthEnvironmentTokenUrlsIssues(api: {
|
|
497
|
+
environments?: readonly {
|
|
498
|
+
name: string;
|
|
499
|
+
}[] | undefined;
|
|
500
|
+
auth?: {
|
|
501
|
+
schemes: readonly AuthScheme[];
|
|
502
|
+
} | undefined;
|
|
503
|
+
}, basePath: (string | number)[]): EnvironmentTokenUrlIssue[];
|
|
485
504
|
|
|
486
505
|
declare const clientRetryOverrideSchema: z.ZodObject<{
|
|
487
506
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -897,6 +916,7 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
|
|
|
897
916
|
}, z.core.$strict>, z.ZodObject<{
|
|
898
917
|
type: z.ZodLiteral<"client-credentials">;
|
|
899
918
|
tokenUrl: z.ZodString;
|
|
919
|
+
environmentTokenUrls: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
900
920
|
refreshUrl: z.ZodOptional<z.ZodString>;
|
|
901
921
|
scopes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
902
922
|
name: z.ZodString;
|
|
@@ -2714,6 +2734,8 @@ declare const sdkConfigIrV1Schema: z.ZodObject<{
|
|
|
2714
2734
|
}, z.core.$strict>>>;
|
|
2715
2735
|
serverName: z.ZodOptional<z.ZodString>;
|
|
2716
2736
|
serverDescription: z.ZodOptional<z.ZodString>;
|
|
2737
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
2738
|
+
appendInstructions: z.ZodOptional<z.ZodString>;
|
|
2717
2739
|
excludeAvailability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2718
2740
|
IN_DEVELOPMENT: "IN_DEVELOPMENT";
|
|
2719
2741
|
PRE_RELEASE: "PRE_RELEASE";
|
|
@@ -3195,6 +3217,8 @@ declare const languageGenerationConfigSchema: z.ZodObject<{
|
|
|
3195
3217
|
}, z.core.$strict>>>;
|
|
3196
3218
|
serverName: z.ZodOptional<z.ZodString>;
|
|
3197
3219
|
serverDescription: z.ZodOptional<z.ZodString>;
|
|
3220
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
3221
|
+
appendInstructions: z.ZodOptional<z.ZodString>;
|
|
3198
3222
|
excludeAvailability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3199
3223
|
IN_DEVELOPMENT: "IN_DEVELOPMENT";
|
|
3200
3224
|
PRE_RELEASE: "PRE_RELEASE";
|
|
@@ -3711,6 +3735,8 @@ declare const generationConfigSchema: z.ZodObject<{
|
|
|
3711
3735
|
}, z.core.$strict>>>;
|
|
3712
3736
|
serverName: z.ZodOptional<z.ZodString>;
|
|
3713
3737
|
serverDescription: z.ZodOptional<z.ZodString>;
|
|
3738
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
3739
|
+
appendInstructions: z.ZodOptional<z.ZodString>;
|
|
3714
3740
|
excludeAvailability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
3715
3741
|
IN_DEVELOPMENT: "IN_DEVELOPMENT";
|
|
3716
3742
|
PRE_RELEASE: "PRE_RELEASE";
|
|
@@ -5622,6 +5648,7 @@ type WebhookSignature = z.output<typeof webhookSignatureSchema>;
|
|
|
5622
5648
|
|
|
5623
5649
|
declare const sdkConfigIrCapabilitySchema: z.ZodEnum<{
|
|
5624
5650
|
"generation.generateFullProject": "generation.generateFullProject";
|
|
5651
|
+
"api.auth.oauth.environmentTokenUrls": "api.auth.oauth.environmentTokenUrls";
|
|
5625
5652
|
}>;
|
|
5626
5653
|
type SdkConfigIrCapability = z.infer<typeof sdkConfigIrCapabilitySchema>;
|
|
5627
5654
|
interface SerializedSdkConfigIrV1 {
|
|
@@ -5642,4 +5669,4 @@ declare function serializeSdkConfigIrV1(value: SdkConfigIrV1Input | SdkConfigIrV
|
|
|
5642
5669
|
*/
|
|
5643
5670
|
declare function parseSdkConfigIrV1ForConsumption(value: unknown): SdkConfigIrV1;
|
|
5644
5671
|
|
|
5645
|
-
export { type ApiConfig, type ApiConfigInput, type ApiImportSettings, type AuthConfig, type AuthScheme, type ClientConfig, type ClientConfigInput, type ClientConfigOverride, type CompatibilityConfig, type CredentialResolution, type DocsConfig, type GenerationConfig, JsonObject, type LanguageGenerationConfig, type LegacyInput, type OutputConfig, type PublishConfig, type PublishRegistry, type ReadmeCustomSection, type ReadmeEndpoint, type ReplayConfig, SDK_CONFIG_IR_V1_SCHEMA_VERSION, type SdkConfigIrCapability, type SdkConfigIrV1, SdkConfigDiagnostic as SdkConfigIrV1Diagnostic, type SdkConfigIrV1Input, type SerializedSdkConfigIrV1, type SourceConfig, type SourceSpecConfig, type SourceSpecOrigin, type SourceSpecType, type TargetConfig, type TargetLanguage, type UnsupportedField, type WebhookSignature, type WebhookSignatureInput, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, docsConfigSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, languageGenerationConfigSchema, legacyInputSchema, outputConfigSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, publishConfigSchema, publishRegistrySchema, readmeCustomSectionSchema, readmeEndpointSchema, replayConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, targetConfigSchema, targetLanguageSchema, unsupportedFieldSchema, webhookSignatureSchema };
|
|
5672
|
+
export { type ApiConfig, type ApiConfigInput, type ApiImportSettings, type AuthConfig, type AuthScheme, type ClientConfig, type ClientConfigInput, type ClientConfigOverride, type CompatibilityConfig, type CredentialResolution, type DocsConfig, type GenerationConfig, JsonObject, type LanguageGenerationConfig, type LegacyInput, type OutputConfig, type PublishConfig, type PublishRegistry, type ReadmeCustomSection, type ReadmeEndpoint, type ReplayConfig, SDK_CONFIG_IR_V1_SCHEMA_VERSION, type SdkConfigIrCapability, type SdkConfigIrV1, SdkConfigDiagnostic as SdkConfigIrV1Diagnostic, type SdkConfigIrV1Input, type SerializedSdkConfigIrV1, type SourceConfig, type SourceSpecConfig, type SourceSpecOrigin, type SourceSpecType, type TargetConfig, type TargetLanguage, type UnsupportedField, type WebhookSignature, type WebhookSignatureInput, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, docsConfigSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, languageGenerationConfigSchema, legacyInputSchema, oauthEnvironmentTokenUrlsIssues, outputConfigSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, publishConfigSchema, publishRegistrySchema, readmeCustomSectionSchema, readmeEndpointSchema, replayConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, targetConfigSchema, targetLanguageSchema, unsupportedFieldSchema, webhookSignatureSchema };
|
|
@@ -199,6 +199,9 @@ var oauthFlowSchema = z.discriminatedUnion("type", [
|
|
|
199
199
|
z.strictObject({
|
|
200
200
|
type: z.literal("client-credentials").describe("Uses the OAuth client credentials flow."),
|
|
201
201
|
tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
|
|
202
|
+
environmentTokenUrls: z.record(nonEmptyStringSchema, nonEmptyStringSchema).optional().describe(
|
|
203
|
+
"Token URLs by environment name, for an API whose token endpoint differs per environment. When the selected environment has an entry, its URL replaces tokenUrl, so staging and development do not call the production token endpoint. Each key must name an entry of api.environments; environments without an entry use tokenUrl."
|
|
204
|
+
),
|
|
202
205
|
refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
|
|
203
206
|
scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
|
|
204
207
|
}),
|
|
@@ -347,6 +350,34 @@ var apiConfigSchema = z.strictObject({
|
|
|
347
350
|
*/
|
|
348
351
|
webhookSignature: webhookSignatureSchema.optional().describe("How generated helpers verify webhook signatures from the API.")
|
|
349
352
|
});
|
|
353
|
+
function oauthEnvironmentTokenUrlsIssues(api, basePath) {
|
|
354
|
+
const environmentNames = new Set((api.environments ?? []).map(({ name }) => name));
|
|
355
|
+
const issues = [];
|
|
356
|
+
(api.auth?.schemes ?? []).forEach((scheme, schemeIndex) => {
|
|
357
|
+
if (scheme.type !== "oauth2") return;
|
|
358
|
+
scheme.flows.forEach((flow, flowIndex) => {
|
|
359
|
+
if (flow.type !== "client-credentials") return;
|
|
360
|
+
Object.keys(flow.environmentTokenUrls ?? {}).forEach((environment) => {
|
|
361
|
+
if (!environmentNames.has(environment)) {
|
|
362
|
+
issues.push({
|
|
363
|
+
message: `environmentTokenUrls "${environment}" must name an entry of api.environments`,
|
|
364
|
+
path: [
|
|
365
|
+
...basePath,
|
|
366
|
+
"auth",
|
|
367
|
+
"schemes",
|
|
368
|
+
schemeIndex,
|
|
369
|
+
"flows",
|
|
370
|
+
flowIndex,
|
|
371
|
+
"environmentTokenUrls",
|
|
372
|
+
environment
|
|
373
|
+
]
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
});
|
|
377
|
+
});
|
|
378
|
+
});
|
|
379
|
+
return issues;
|
|
380
|
+
}
|
|
350
381
|
var retryOverrideShape = {
|
|
351
382
|
enabled: z.boolean().optional().describe("Whether the generated client retries failed requests."),
|
|
352
383
|
maxAttempts: z.number().int().min(1).optional().describe("The maximum total request attempts, including the initial attempt."),
|
|
@@ -952,6 +983,12 @@ var mcpHooksSchema = z.strictObject({
|
|
|
952
983
|
var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
|
|
953
984
|
serverName: nonEmptyStringSchema.optional().describe("The name advertised by the generated MCP server."),
|
|
954
985
|
serverDescription: nonEmptyStringSchema.optional().describe("The description advertised by the generated MCP server."),
|
|
986
|
+
instructions: nonEmptyStringSchema.optional().describe(
|
|
987
|
+
"Replaces the auto-generated server instructions returned on initialize. WARNING: the generated instructions encode protocol wiring (the openapi:// resource and schema URI templates and the _meta keys the agent needs to browse docs and fetch full input schemas); replacing them drops that wiring and can break schema/doc browsing, so prefer appendInstructions unless you intend to restate it. Emitted verbatim and sent to the MCP client on every conversation, so keep it concise."
|
|
988
|
+
),
|
|
989
|
+
appendInstructions: nonEmptyStringSchema.optional().describe(
|
|
990
|
+
"Appended after the auto-generated server instructions returned on initialize, preserving the generated protocol wiring. When both instructions and appendInstructions are set, this is appended after the replacement text. Emitted verbatim and sent to the MCP client on every conversation, so keep it concise."
|
|
991
|
+
),
|
|
955
992
|
excludeAvailability: z.array(z.enum(mcpAvailabilityStatuses)).optional().describe("Operation availability statuses excluded from MCP tool generation."),
|
|
956
993
|
tools: mcpToolFilterSchema.optional().describe("Global operation filters for generated MCP tools."),
|
|
957
994
|
toolsets: z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional().describe("Named MCP toolsets and the operation filters for each toolset."),
|
|
@@ -1737,6 +1774,9 @@ var sdkConfigIrV1Schema = z.strictObject({
|
|
|
1737
1774
|
}
|
|
1738
1775
|
});
|
|
1739
1776
|
}
|
|
1777
|
+
oauthEnvironmentTokenUrlsIssues(api, ["api"]).forEach(
|
|
1778
|
+
(issue) => context.addIssue({ code: "custom", ...issue })
|
|
1779
|
+
);
|
|
1740
1780
|
oauthTokenEndpointsIssues(generation.language?.cli?.oauthTokenEndpoints, api.auth?.schemes, [
|
|
1741
1781
|
"generation",
|
|
1742
1782
|
"language",
|
|
@@ -1908,7 +1948,10 @@ function deepEqual(left, right) {
|
|
|
1908
1948
|
}
|
|
1909
1949
|
|
|
1910
1950
|
// src/sdk-config-ir/v1/wire.ts
|
|
1911
|
-
var sdkConfigIrCapabilitySchema = z.enum([
|
|
1951
|
+
var sdkConfigIrCapabilitySchema = z.enum([
|
|
1952
|
+
"generation.generateFullProject",
|
|
1953
|
+
"api.auth.oauth.environmentTokenUrls"
|
|
1954
|
+
]);
|
|
1912
1955
|
var sdkConfigIrV1InputJsonSchema = inputJsonSchema(sdkConfigIrV1Schema);
|
|
1913
1956
|
function serializeSdkConfigIrV1(value) {
|
|
1914
1957
|
const parsed = parseSdkConfigIrV1(value);
|
|
@@ -1920,6 +1963,9 @@ function serializeSdkConfigIrV1(value) {
|
|
|
1920
1963
|
if (parsed.generation.generateFullProject) {
|
|
1921
1964
|
requiredCapabilities.push("generation.generateFullProject");
|
|
1922
1965
|
}
|
|
1966
|
+
if (usesEnvironmentTokenUrls(parsed)) {
|
|
1967
|
+
requiredCapabilities.push("api.auth.oauth.environmentTokenUrls");
|
|
1968
|
+
}
|
|
1923
1969
|
const json = JSON.stringify(wireValue);
|
|
1924
1970
|
if (json === void 0) {
|
|
1925
1971
|
throw new Error("SDK Config IR v1 could not be serialized as JSON");
|
|
@@ -1932,7 +1978,14 @@ function serializeSdkConfigIrV1(value) {
|
|
|
1932
1978
|
function parseSdkConfigIrV1ForConsumption(value) {
|
|
1933
1979
|
return parseSdkConfigIrV1(stripUnknownProperties(value, sdkConfigIrV1InputJsonSchema));
|
|
1934
1980
|
}
|
|
1981
|
+
function usesEnvironmentTokenUrls(value) {
|
|
1982
|
+
return (value.api.auth?.schemes ?? []).some(
|
|
1983
|
+
(scheme) => scheme.type === "oauth2" && scheme.flows.some(
|
|
1984
|
+
(flow) => flow.type === "client-credentials" && flow.environmentTokenUrls !== void 0 && Object.keys(flow.environmentTokenUrls).length > 0
|
|
1985
|
+
)
|
|
1986
|
+
);
|
|
1987
|
+
}
|
|
1935
1988
|
|
|
1936
|
-
export { CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, MCP_TOOL_NAME_PATTERN, SDK_CONFIG_IR_V1_SCHEMA_VERSION, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, cliDistributionConfigSchema, cliDistributionGithubAppSchema, cliDistributionHomebrewSchema, cliDistributionScoopSchema, cliGenerationConfigSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, composerPackageNameSchema, csharpGenerationConfigSchema, dependencySchema, docsConfigSchema, exactSemverSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, githubActionsSecretNameSchema, goGenerationConfigSchema, goModulePathSchema, javaGenerationConfigSchema, jsonObjectSchema, jsonValueSchema, kotlinGenerationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, mcpAvailabilityStatuses, mcpGenerationConfigSchema, nonEmptyStringSchema, oauthTokenEndpointsIssues, outputConfigSchema, packageConfigSchema, parentRelativePathSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, phpGenerationConfigSchema, publishConfigSchema, publishRegistrySchema, pythonGenerationConfigSchema, readmeCustomSectionSchema, readmeEndpointSchema, relativePathSchema, replayConfigSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema, webhookSignatureSchema };
|
|
1989
|
+
export { CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, MCP_TOOL_NAME_PATTERN, SDK_CONFIG_IR_V1_SCHEMA_VERSION, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, cliDistributionConfigSchema, cliDistributionGithubAppSchema, cliDistributionHomebrewSchema, cliDistributionScoopSchema, cliGenerationConfigSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, composerPackageNameSchema, csharpGenerationConfigSchema, dependencySchema, docsConfigSchema, exactSemverSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, githubActionsSecretNameSchema, goGenerationConfigSchema, goModulePathSchema, javaGenerationConfigSchema, jsonObjectSchema, jsonValueSchema, kotlinGenerationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, mcpAvailabilityStatuses, mcpGenerationConfigSchema, nonEmptyStringSchema, oauthEnvironmentTokenUrlsIssues, oauthTokenEndpointsIssues, outputConfigSchema, packageConfigSchema, parentRelativePathSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, phpGenerationConfigSchema, publishConfigSchema, publishRegistrySchema, pythonGenerationConfigSchema, readmeCustomSectionSchema, readmeEndpointSchema, relativePathSchema, replayConfigSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema, webhookSignatureSchema };
|
|
1937
1990
|
//# sourceMappingURL=index.js.map
|
|
1938
1991
|
//# sourceMappingURL=index.js.map
|