@postman/sdk-config 0.19.1 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/index.cjs +367 -54
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +367 -55
  6. package/dist/index.js.map +1 -1
  7. package/dist/sdk-config/index.cjs +313 -9
  8. package/dist/sdk-config/index.cjs.map +1 -1
  9. package/dist/sdk-config/index.d.cts +1 -1
  10. package/dist/sdk-config/index.d.ts +1 -1
  11. package/dist/sdk-config/index.js +313 -9
  12. package/dist/sdk-config/index.js.map +1 -1
  13. package/dist/sdk-config/v1/index.cjs +313 -9
  14. package/dist/sdk-config/v1/index.cjs.map +1 -1
  15. package/dist/sdk-config/v1/index.d.cts +929 -30
  16. package/dist/sdk-config/v1/index.d.ts +929 -30
  17. package/dist/sdk-config/v1/index.js +313 -9
  18. package/dist/sdk-config/v1/index.js.map +1 -1
  19. package/dist/sdk-config-ir/index.cjs +348 -51
  20. package/dist/sdk-config-ir/index.cjs.map +1 -1
  21. package/dist/sdk-config-ir/index.d.cts +1 -1
  22. package/dist/sdk-config-ir/index.d.ts +1 -1
  23. package/dist/sdk-config-ir/index.js +348 -52
  24. package/dist/sdk-config-ir/index.js.map +1 -1
  25. package/dist/sdk-config-ir/v1/index.cjs +348 -51
  26. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  27. package/dist/sdk-config-ir/v1/index.d.cts +607 -4
  28. package/dist/sdk-config-ir/v1/index.d.ts +607 -4
  29. package/dist/sdk-config-ir/v1/index.js +348 -52
  30. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  31. package/dist/{typescript-D0YeGxxS.d.cts → typescript-DNic6Rq5.d.cts} +80 -1
  32. package/dist/{typescript-D0YeGxxS.d.ts → typescript-DNic6Rq5.d.ts} +80 -1
  33. package/package.json +2 -2
  34. package/src/sdk-config/v1/README.md +82 -15
  35. package/src/sdk-config-ir/v1/README.md +39 -0
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { FernConfigMappingDiagnostic, FernConfigMappingError, FernConfigMappingResult, FernResolvedGeneratorGroupInput, FernResolvedGeneratorInput, FernSdkConfigLanguage, SDK_CONFIG_V1_SCHEMA_VERSION, SdkConfigV1, SdkConfigV1ApiConfig, SdkConfigV1ApiConfigInput, SdkConfigV1CliOutputConfig, SdkConfigV1ClientConfig, SdkConfigV1ClientConfigInput, SdkConfigV1ClientConfigOverride, SdkConfigV1Dependency, SdkConfigV1DocsConfig, SdkConfigV1Document, SdkConfigV1GenerationConfig, SdkConfigV1GenerationConfigInput, SdkConfigV1GenerationConfigOverride, SdkConfigV1GitRemote, SdkConfigV1Input, SdkConfigV1McpOutputConfig, SdkConfigV1OutputConfig, SdkConfigV1PackageConfig, SdkConfigV1ProtobufRoot, SdkConfigV1ProtobufSource, SdkConfigV1PublishConfig, SdkConfigV1PublishRegistry, SdkConfigV1ReplayConfig, SdkConfigV1SourceConfig, SdkConfigV1SourceSpec, SdkConfigV1Target, SdkConfigV1WebhookSignature, SdkConfigV1WebhookSignatureInput, getSdkConfigV1Diagnostics, mapFernConfigToSdkConfigV1, parseSdkConfigV1, parseSdkConfigV1ForConsumption, sdkConfigV1ApiConfigSchema, sdkConfigV1AuthConfigSchema, sdkConfigV1AuthSchemeSchema, sdkConfigV1CliOutputConfigSchema, sdkConfigV1ClientConfigOverrideSchema, sdkConfigV1ClientConfigSchema, sdkConfigV1DependencySchema, sdkConfigV1DocsConfigSchema, sdkConfigV1GenerationConfigOverrideSchema, sdkConfigV1GenerationConfigSchema, sdkConfigV1GitRemoteSchema, sdkConfigV1McpOutputConfigSchema, sdkConfigV1OutputConfigSchema, sdkConfigV1PackageConfigSchema, sdkConfigV1ProtobufRootSchema, sdkConfigV1ProtobufSourceSchema, sdkConfigV1PublishConfigSchema, sdkConfigV1PublishRegistrySchema, sdkConfigV1ReadmeCustomSectionSchema, sdkConfigV1ReadmeEndpointSchema, sdkConfigV1ReplayConfigSchema, sdkConfigV1Schema, sdkConfigV1SourceConfigSchema, sdkConfigV1SourceSpecSchema, sdkConfigV1TargetSchema, sdkConfigV1WebhookSignatureSchema, splitSdkConfigV1TargetGeneration, validateSdkConfigV1 } from './sdk-config/v1/index.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 CliProfilesConfig, g as CliProfilesProvisionOperation, h as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, i as JsonObject, j as JsonValue, K as KotlinGenerationConfig, M as McpAvailabilityStatus, k as McpGenerationConfig, l as McpToolFilter, P as PackageConfig, m as PhpGenerationConfig, n as PlanModifiers, o as PythonGenerationConfig, R as RubyGenerationConfig, p as RustGenerationConfig, C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, S as SdkConfigIrV1Diagnostic, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, S as SdkConfigV1Diagnostic, q as SwiftGenerationConfig, T as TerraformGenerationConfig, r as TypescriptGenerationConfig, s as cliDistributionConfigSchema, t as cliDistributionGithubAppSchema, u as cliDistributionHomebrewSchema, v as cliDistributionScoopSchema, w as cliGenerationConfigSchema, x as composerPackageNameSchema, y as csharpGenerationConfigSchema, z as dependencySchema, A as exactSemverSchema, B as githubActionsSecretNameSchema, E as goGenerationConfigSchema, F as goModulePathSchema, H as javaGenerationConfigSchema, I as jsonObjectSchema, L as jsonValueSchema, N as kotlinGenerationConfigSchema, O as mcpAvailabilityStatuses, Q as mcpGenerationConfigSchema, U as nonEmptyStringSchema, V as packageConfigSchema, W as parentRelativePathSchema, X as phpGenerationConfigSchema, Y as pythonGenerationConfigSchema, Z as relativePathSchema, _ as rubyGenerationConfigSchema, $ as rustGenerationConfigSchema, s as sdkConfigV1CliDistributionConfigSchema, t as sdkConfigV1CliDistributionGithubAppSchema, u as sdkConfigV1CliDistributionHomebrewSchema, v as sdkConfigV1CliDistributionScoopSchema, w as sdkConfigV1CliGenerationConfigSchema, x as sdkConfigV1ComposerPackageNameSchema, y as sdkConfigV1CsharpGenerationConfigSchema, A as sdkConfigV1ExactSemverSchema, B as sdkConfigV1GithubActionsSecretNameSchema, E as sdkConfigV1GoGenerationConfigSchema, F as sdkConfigV1GoModulePathSchema, H as sdkConfigV1JavaGenerationConfigSchema, N as sdkConfigV1KotlinGenerationConfigSchema, Q as sdkConfigV1McpGenerationConfigSchema, U as sdkConfigV1NonEmptyStringSchema, W as sdkConfigV1ParentRelativePathSchema, X as sdkConfigV1PhpGenerationConfigSchema, Y as sdkConfigV1PythonGenerationConfigSchema, Z as sdkConfigV1RelativePathSchema, _ as sdkConfigV1RubyGenerationConfigSchema, $ as sdkConfigV1RustGenerationConfigSchema, a0 as sdkConfigV1SwiftGenerationConfigSchema, a1 as sdkConfigV1TerraformGenerationConfigSchema, a2 as sdkConfigV1TypescriptGenerationConfigSchema, a0 as swiftGenerationConfigSchema, a1 as terraformGenerationConfigSchema, a2 as typescriptGenerationConfigSchema } from './typescript-D0YeGxxS.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, j as JsonObject, k as JsonValue, K as KotlinGenerationConfig, M as McpAvailabilityStatus, l as McpGenerationConfig, m as McpToolFilter, P as PackageConfig, n as PhpGenerationConfig, o as PlanModifiers, p as PythonGenerationConfig, R as RubyGenerationConfig, q as RustGenerationConfig, C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, S as SdkConfigIrV1Diagnostic, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, S as SdkConfigV1Diagnostic, r as SwiftGenerationConfig, T as TerraformGenerationConfig, s as TypescriptGenerationConfig, t as cliDistributionConfigSchema, u as cliDistributionGithubAppSchema, v as cliDistributionHomebrewSchema, w as cliDistributionScoopSchema, x as cliGenerationConfigSchema, y as composerPackageNameSchema, z as csharpGenerationConfigSchema, A as dependencySchema, B as exactSemverSchema, E as githubActionsSecretNameSchema, F as goGenerationConfigSchema, H as goModulePathSchema, I as javaGenerationConfigSchema, L as jsonObjectSchema, N as jsonValueSchema, O as kotlinGenerationConfigSchema, Q as mcpAvailabilityStatuses, U as mcpGenerationConfigSchema, V as nonEmptyStringSchema, W as oauthTokenEndpointsIssues, X as packageConfigSchema, Y as parentRelativePathSchema, Z as phpGenerationConfigSchema, _ as pythonGenerationConfigSchema, $ as relativePathSchema, a0 as rubyGenerationConfigSchema, a1 as rustGenerationConfigSchema, t as sdkConfigV1CliDistributionConfigSchema, u as sdkConfigV1CliDistributionGithubAppSchema, v as sdkConfigV1CliDistributionHomebrewSchema, w as sdkConfigV1CliDistributionScoopSchema, x as sdkConfigV1CliGenerationConfigSchema, y as sdkConfigV1ComposerPackageNameSchema, z as sdkConfigV1CsharpGenerationConfigSchema, B as sdkConfigV1ExactSemverSchema, E as sdkConfigV1GithubActionsSecretNameSchema, F as sdkConfigV1GoGenerationConfigSchema, H as sdkConfigV1GoModulePathSchema, I as sdkConfigV1JavaGenerationConfigSchema, O as sdkConfigV1KotlinGenerationConfigSchema, U as sdkConfigV1McpGenerationConfigSchema, V as sdkConfigV1NonEmptyStringSchema, Y as sdkConfigV1ParentRelativePathSchema, Z as sdkConfigV1PhpGenerationConfigSchema, _ as sdkConfigV1PythonGenerationConfigSchema, $ as sdkConfigV1RelativePathSchema, a0 as sdkConfigV1RubyGenerationConfigSchema, a1 as sdkConfigV1RustGenerationConfigSchema, a2 as sdkConfigV1SwiftGenerationConfigSchema, a3 as sdkConfigV1TerraformGenerationConfigSchema, a4 as sdkConfigV1TypescriptGenerationConfigSchema, a2 as swiftGenerationConfigSchema, a3 as terraformGenerationConfigSchema, a4 as typescriptGenerationConfigSchema } from './typescript-DNic6Rq5.cjs';
3
3
  export { ApiConfig, ApiConfigInput, ApiImportSettings, AuthConfig, AuthScheme, ClientConfig, ClientConfigInput, ClientConfigOverride, CompatibilityConfig, CredentialResolution, DocsConfig, GenerationConfig, LanguageGenerationConfig, LegacyInput, OutputConfig, PublishConfig, PublishRegistry, ReadmeCustomSection, ReadmeEndpoint, ReplayConfig, SDK_CONFIG_IR_V1_SCHEMA_VERSION, SdkConfigIrCapability, SdkConfigIrV1, SdkConfigIrV1Input, SerializedSdkConfigIrV1, SourceConfig, SourceSpecConfig, SourceSpecOrigin, SourceSpecType, TargetConfig, TargetLanguage, UnsupportedField, WebhookSignature, 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 } from './sdk-config-ir/v1/index.cjs';
4
4
  import 'zod';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { FernConfigMappingDiagnostic, FernConfigMappingError, FernConfigMappingResult, FernResolvedGeneratorGroupInput, FernResolvedGeneratorInput, FernSdkConfigLanguage, SDK_CONFIG_V1_SCHEMA_VERSION, SdkConfigV1, SdkConfigV1ApiConfig, SdkConfigV1ApiConfigInput, SdkConfigV1CliOutputConfig, SdkConfigV1ClientConfig, SdkConfigV1ClientConfigInput, SdkConfigV1ClientConfigOverride, SdkConfigV1Dependency, SdkConfigV1DocsConfig, SdkConfigV1Document, SdkConfigV1GenerationConfig, SdkConfigV1GenerationConfigInput, SdkConfigV1GenerationConfigOverride, SdkConfigV1GitRemote, SdkConfigV1Input, SdkConfigV1McpOutputConfig, SdkConfigV1OutputConfig, SdkConfigV1PackageConfig, SdkConfigV1ProtobufRoot, SdkConfigV1ProtobufSource, SdkConfigV1PublishConfig, SdkConfigV1PublishRegistry, SdkConfigV1ReplayConfig, SdkConfigV1SourceConfig, SdkConfigV1SourceSpec, SdkConfigV1Target, SdkConfigV1WebhookSignature, SdkConfigV1WebhookSignatureInput, getSdkConfigV1Diagnostics, mapFernConfigToSdkConfigV1, parseSdkConfigV1, parseSdkConfigV1ForConsumption, sdkConfigV1ApiConfigSchema, sdkConfigV1AuthConfigSchema, sdkConfigV1AuthSchemeSchema, sdkConfigV1CliOutputConfigSchema, sdkConfigV1ClientConfigOverrideSchema, sdkConfigV1ClientConfigSchema, sdkConfigV1DependencySchema, sdkConfigV1DocsConfigSchema, sdkConfigV1GenerationConfigOverrideSchema, sdkConfigV1GenerationConfigSchema, sdkConfigV1GitRemoteSchema, sdkConfigV1McpOutputConfigSchema, sdkConfigV1OutputConfigSchema, sdkConfigV1PackageConfigSchema, sdkConfigV1ProtobufRootSchema, sdkConfigV1ProtobufSourceSchema, sdkConfigV1PublishConfigSchema, sdkConfigV1PublishRegistrySchema, sdkConfigV1ReadmeCustomSectionSchema, sdkConfigV1ReadmeEndpointSchema, sdkConfigV1ReplayConfigSchema, sdkConfigV1Schema, sdkConfigV1SourceConfigSchema, sdkConfigV1SourceSpecSchema, sdkConfigV1TargetSchema, sdkConfigV1WebhookSignatureSchema, splitSdkConfigV1TargetGeneration, validateSdkConfigV1 } from './sdk-config/v1/index.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 CliProfilesConfig, g as CliProfilesProvisionOperation, h as CsharpGenerationConfig, D as Dependency, G as GoGenerationConfig, J as JavaGenerationConfig, i as JsonObject, j as JsonValue, K as KotlinGenerationConfig, M as McpAvailabilityStatus, k as McpGenerationConfig, l as McpToolFilter, P as PackageConfig, m as PhpGenerationConfig, n as PlanModifiers, o as PythonGenerationConfig, R as RubyGenerationConfig, p as RustGenerationConfig, C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, S as SdkConfigIrV1Diagnostic, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, S as SdkConfigV1Diagnostic, q as SwiftGenerationConfig, T as TerraformGenerationConfig, r as TypescriptGenerationConfig, s as cliDistributionConfigSchema, t as cliDistributionGithubAppSchema, u as cliDistributionHomebrewSchema, v as cliDistributionScoopSchema, w as cliGenerationConfigSchema, x as composerPackageNameSchema, y as csharpGenerationConfigSchema, z as dependencySchema, A as exactSemverSchema, B as githubActionsSecretNameSchema, E as goGenerationConfigSchema, F as goModulePathSchema, H as javaGenerationConfigSchema, I as jsonObjectSchema, L as jsonValueSchema, N as kotlinGenerationConfigSchema, O as mcpAvailabilityStatuses, Q as mcpGenerationConfigSchema, U as nonEmptyStringSchema, V as packageConfigSchema, W as parentRelativePathSchema, X as phpGenerationConfigSchema, Y as pythonGenerationConfigSchema, Z as relativePathSchema, _ as rubyGenerationConfigSchema, $ as rustGenerationConfigSchema, s as sdkConfigV1CliDistributionConfigSchema, t as sdkConfigV1CliDistributionGithubAppSchema, u as sdkConfigV1CliDistributionHomebrewSchema, v as sdkConfigV1CliDistributionScoopSchema, w as sdkConfigV1CliGenerationConfigSchema, x as sdkConfigV1ComposerPackageNameSchema, y as sdkConfigV1CsharpGenerationConfigSchema, A as sdkConfigV1ExactSemverSchema, B as sdkConfigV1GithubActionsSecretNameSchema, E as sdkConfigV1GoGenerationConfigSchema, F as sdkConfigV1GoModulePathSchema, H as sdkConfigV1JavaGenerationConfigSchema, N as sdkConfigV1KotlinGenerationConfigSchema, Q as sdkConfigV1McpGenerationConfigSchema, U as sdkConfigV1NonEmptyStringSchema, W as sdkConfigV1ParentRelativePathSchema, X as sdkConfigV1PhpGenerationConfigSchema, Y as sdkConfigV1PythonGenerationConfigSchema, Z as sdkConfigV1RelativePathSchema, _ as sdkConfigV1RubyGenerationConfigSchema, $ as sdkConfigV1RustGenerationConfigSchema, a0 as sdkConfigV1SwiftGenerationConfigSchema, a1 as sdkConfigV1TerraformGenerationConfigSchema, a2 as sdkConfigV1TypescriptGenerationConfigSchema, a0 as swiftGenerationConfigSchema, a1 as terraformGenerationConfigSchema, a2 as typescriptGenerationConfigSchema } from './typescript-D0YeGxxS.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, j as JsonObject, k as JsonValue, K as KotlinGenerationConfig, M as McpAvailabilityStatus, l as McpGenerationConfig, m as McpToolFilter, P as PackageConfig, n as PhpGenerationConfig, o as PlanModifiers, p as PythonGenerationConfig, R as RubyGenerationConfig, q as RustGenerationConfig, C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, S as SdkConfigIrV1Diagnostic, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, S as SdkConfigV1Diagnostic, r as SwiftGenerationConfig, T as TerraformGenerationConfig, s as TypescriptGenerationConfig, t as cliDistributionConfigSchema, u as cliDistributionGithubAppSchema, v as cliDistributionHomebrewSchema, w as cliDistributionScoopSchema, x as cliGenerationConfigSchema, y as composerPackageNameSchema, z as csharpGenerationConfigSchema, A as dependencySchema, B as exactSemverSchema, E as githubActionsSecretNameSchema, F as goGenerationConfigSchema, H as goModulePathSchema, I as javaGenerationConfigSchema, L as jsonObjectSchema, N as jsonValueSchema, O as kotlinGenerationConfigSchema, Q as mcpAvailabilityStatuses, U as mcpGenerationConfigSchema, V as nonEmptyStringSchema, W as oauthTokenEndpointsIssues, X as packageConfigSchema, Y as parentRelativePathSchema, Z as phpGenerationConfigSchema, _ as pythonGenerationConfigSchema, $ as relativePathSchema, a0 as rubyGenerationConfigSchema, a1 as rustGenerationConfigSchema, t as sdkConfigV1CliDistributionConfigSchema, u as sdkConfigV1CliDistributionGithubAppSchema, v as sdkConfigV1CliDistributionHomebrewSchema, w as sdkConfigV1CliDistributionScoopSchema, x as sdkConfigV1CliGenerationConfigSchema, y as sdkConfigV1ComposerPackageNameSchema, z as sdkConfigV1CsharpGenerationConfigSchema, B as sdkConfigV1ExactSemverSchema, E as sdkConfigV1GithubActionsSecretNameSchema, F as sdkConfigV1GoGenerationConfigSchema, H as sdkConfigV1GoModulePathSchema, I as sdkConfigV1JavaGenerationConfigSchema, O as sdkConfigV1KotlinGenerationConfigSchema, U as sdkConfigV1McpGenerationConfigSchema, V as sdkConfigV1NonEmptyStringSchema, Y as sdkConfigV1ParentRelativePathSchema, Z as sdkConfigV1PhpGenerationConfigSchema, _ as sdkConfigV1PythonGenerationConfigSchema, $ as sdkConfigV1RelativePathSchema, a0 as sdkConfigV1RubyGenerationConfigSchema, a1 as sdkConfigV1RustGenerationConfigSchema, a2 as sdkConfigV1SwiftGenerationConfigSchema, a3 as sdkConfigV1TerraformGenerationConfigSchema, a4 as sdkConfigV1TypescriptGenerationConfigSchema, a2 as swiftGenerationConfigSchema, a3 as terraformGenerationConfigSchema, a4 as typescriptGenerationConfigSchema } from './typescript-DNic6Rq5.js';
3
3
  export { ApiConfig, ApiConfigInput, ApiImportSettings, AuthConfig, AuthScheme, ClientConfig, ClientConfigInput, ClientConfigOverride, CompatibilityConfig, CredentialResolution, DocsConfig, GenerationConfig, LanguageGenerationConfig, LegacyInput, OutputConfig, PublishConfig, PublishRegistry, ReadmeCustomSection, ReadmeEndpoint, ReplayConfig, SDK_CONFIG_IR_V1_SCHEMA_VERSION, SdkConfigIrCapability, SdkConfigIrV1, SdkConfigIrV1Input, SerializedSdkConfigIrV1, SourceConfig, SourceSpecConfig, SourceSpecOrigin, SourceSpecType, TargetConfig, TargetLanguage, UnsupportedField, WebhookSignature, 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 } from './sdk-config-ir/v1/index.js';
4
4
  import 'zod';
package/dist/index.js CHANGED
@@ -134,6 +134,39 @@ var publicClientIdSchema = nonEmptyStringSchema.refine((value) => value.trim() =
134
134
  }).refine((value) => !value.includes("${"), {
135
135
  message: "must be a literal public client ID, not an environment expression"
136
136
  });
137
+ var oauthExtraParametersSchema = z.record(z.string().min(1), z.string());
138
+ function parseUrl(value) {
139
+ try {
140
+ return new URL(value);
141
+ } catch {
142
+ return void 0;
143
+ }
144
+ }
145
+ var loopbackRedirectUriSchema = nonEmptyStringSchema.refine(
146
+ (value) => {
147
+ const url = parseUrl(value);
148
+ return url !== void 0 && url.protocol === "http:" && (url.hostname === "127.0.0.1" || url.hostname === "localhost") && url.port !== "";
149
+ },
150
+ {
151
+ message: "must be an http URL on 127.0.0.1 or localhost that pins a port, such as http://127.0.0.1:8484/callback"
152
+ }
153
+ );
154
+ function containsControlCharacter(value) {
155
+ return [...value].some((character) => {
156
+ const code = character.charCodeAt(0);
157
+ return code <= 31 || code === 127;
158
+ });
159
+ }
160
+ var hostedPageUrlSchema = nonEmptyStringSchema.refine(
161
+ (value) => {
162
+ const url = parseUrl(value);
163
+ return url !== void 0 && (url.protocol === "http:" || url.protocol === "https:");
164
+ },
165
+ { message: "must be an absolute http or https URL" }
166
+ ).refine((value) => !containsControlCharacter(value), {
167
+ message: "must not contain control characters"
168
+ });
169
+ var redirectPortSchema = z.number().int().min(1).max(65535);
137
170
  var oauthFlowSchema = z.discriminatedUnion("type", [
138
171
  z.strictObject({
139
172
  type: z.literal("authorization-code").describe("Uses the OAuth authorization code flow."),
@@ -143,7 +176,25 @@ var oauthFlowSchema = z.discriminatedUnion("type", [
143
176
  scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow."),
144
177
  clientId: publicClientIdSchema.optional().describe(
145
178
  "The public, non-secret OAuth client ID that generated interactive login flows, such as CLI browser login with PKCE, send to the authorization and token endpoints. It is embedded verbatim in generated code, so it must never be a client secret."
146
- )
179
+ ),
180
+ redirectUri: loopbackRedirectUriSchema.optional().describe(
181
+ "The loopback callback of the interactive login, such as http://127.0.0.1:8484/callback. The login binds this exact host, port and path and sends it to the authorization server, so it must match the redirect registered there. Without it the login uses a free port chosen by the operating system."
182
+ ),
183
+ redirectUriBackupPorts: z.array(redirectPortSchema).min(1).optional().describe(
184
+ "Ports tried in order when the port of redirectUri is busy. Each reuses the host and path of redirectUri, and every resulting URI must be registered with the authorization server. Requires redirectUri."
185
+ ),
186
+ successRedirectUrl: hostedPageUrlSchema.optional().describe(
187
+ "A page the browser is sent to once the login captured the authorization code. Without it the login shows its own page."
188
+ ),
189
+ errorRedirectUrl: hostedPageUrlSchema.optional().describe(
190
+ "A page the browser is sent to when the login fails; the error and error_description query parameters are added. Without it the login shows its own page."
191
+ ),
192
+ authorizationParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the authorization request, such as audience."),
193
+ tokenParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the authorization code exchange request."),
194
+ refreshParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the token refresh request.")
195
+ }).refine((flow) => flow.redirectUriBackupPorts === void 0 || flow.redirectUri !== void 0, {
196
+ message: "redirectUriBackupPorts requires redirectUri",
197
+ path: ["redirectUriBackupPorts"]
147
198
  }),
148
199
  z.strictObject({
149
200
  type: z.literal("client-credentials").describe("Uses the OAuth client credentials flow."),
@@ -162,21 +213,47 @@ var oauthFlowSchema = z.discriminatedUnion("type", [
162
213
  tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
163
214
  refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
164
215
  scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
216
+ }),
217
+ z.strictObject({
218
+ type: z.literal("device-code").describe(
219
+ "Uses the OAuth device authorization flow (RFC 8628) for logins without a browser."
220
+ ),
221
+ clientId: publicClientIdSchema.describe(
222
+ "The public, non-secret OAuth client ID sent to the device authorization and token endpoints. It is embedded verbatim in generated code, so it must never be a client secret."
223
+ ),
224
+ deviceAuthorizationUrl: nonEmptyStringSchema.describe(
225
+ "The URL that issues the device code, the user code and the verification URL."
226
+ ),
227
+ tokenUrl: nonEmptyStringSchema.describe(
228
+ "The URL polled to exchange the device code for tokens once the user approved."
229
+ ),
230
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
231
+ scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow."),
232
+ deviceAuthorizationParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the device authorization request, such as audience."),
233
+ tokenParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the token polling request."),
234
+ refreshParameters: oauthExtraParametersSchema.optional().describe("Extra parameters added to the token refresh request.")
165
235
  })
166
236
  ]);
167
- var oauth2AuthSchema = z.strictObject({
237
+ var oauth2AuthObjectSchema = z.strictObject({
168
238
  id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
169
239
  type: z.literal("oauth2").describe("Identifies an OAuth 2.0 authentication scheme."),
170
240
  flows: z.array(oauthFlowSchema).min(1).describe("The OAuth flows supported by the API."),
171
241
  clientId: authVariableSchema.optional().describe("The OAuth client ID parameter exposed by the SDK."),
172
242
  clientSecret: authVariableSchema.optional().describe("The OAuth client secret parameter exposed by the SDK."),
173
243
  tokenHeader: nonEmptyStringSchema.optional().describe("The request header that carries the OAuth access token."),
174
- tokenPrefix: nonEmptyStringSchema.optional().describe("The prefix added before the OAuth access token."),
244
+ tokenPrefix: nonEmptyStringSchema.optional().describe('The prefix added before the OAuth access token. Defaults to "Bearer" when omitted.'),
245
+ omitTokenPrefix: z.boolean().optional().describe(
246
+ 'Whether the OAuth access token is sent as-is, with no prefix. Without it, a missing tokenPrefix means "Bearer". Cannot be combined with tokenPrefix.'
247
+ ),
175
248
  refreshBufferSeconds: z.number().nonnegative().optional().describe("How early, in seconds, the client refreshes a token before it expires."),
176
249
  description: z.string().optional().describe(
177
250
  "A description of the authentication scheme included in generated SDK documentation."
178
251
  )
179
252
  });
253
+ var oauth2AuthSchema = oauth2AuthObjectSchema.refine(
254
+ (scheme) => !(scheme.omitTokenPrefix === true && scheme.tokenPrefix !== void 0),
255
+ { message: "omitTokenPrefix cannot be combined with tokenPrefix", path: ["omitTokenPrefix"] }
256
+ );
180
257
  var customAuthParameterSchema = z.strictObject({
181
258
  location: z.enum(["header", "query", "cookie"]).describe("Where the custom authentication value is sent."),
182
259
  name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
@@ -832,6 +909,9 @@ var RESERVED_PROFILES_COMMAND_NAMES = /* @__PURE__ */ new Set([
832
909
  var binaryNameSchema = nonEmptyStringSchema.regex(ALPHANUMERIC_PATTERN, {
833
910
  message: "binaryName must contain at least one ASCII letter or digit"
834
911
  });
912
+ var crateNameSchema = z.string().regex(/^[A-Za-z][A-Za-z0-9_-]{0,63}$/, {
913
+ message: "crateName must start with a letter, contain only letters, digits, hyphens, and underscores, and be at most 64 characters"
914
+ });
835
915
  var rootGroupSchema = z.string().regex(ROOT_GROUP_PATTERN, {
836
916
  message: "rootGroup must start with a lowercase letter and contain only lowercase letters, digits, hyphens, and underscores"
837
917
  });
@@ -881,6 +961,28 @@ function fieldNameMapSchema(field) {
881
961
  }
882
962
  });
883
963
  }
964
+ var SAFE_TEXT_PATTERN = /^[^"\\\x00-\x1f]*$/;
965
+ var HEX_COLOR_PATTERN = /^#[0-9a-fA-F]{6}$/;
966
+ var provisionFlagSchema = z.string().regex(KEBAB_NAME_PATTERN, {
967
+ message: 'profiles.provisionOperation.flag must be a kebab-case flag name without dashes, such as "api-key"'
968
+ });
969
+ var provisionParametersSchema = z.record(z.string(), z.string()).superRefine((value, context) => {
970
+ for (const [key, text] of Object.entries(value)) {
971
+ if (!FIELD_NAME_PATTERN.test(key)) {
972
+ context.addIssue({
973
+ code: "custom",
974
+ message: "profiles.provisionOperation.parameters keys must be field names containing only [A-Za-z0-9_.-]",
975
+ path: [key]
976
+ });
977
+ } else if (!SAFE_TEXT_PATTERN.test(text)) {
978
+ context.addIssue({
979
+ code: "custom",
980
+ message: "profiles.provisionOperation.parameters values must not contain quotes, backslashes or control characters",
981
+ path: [key]
982
+ });
983
+ }
984
+ }
985
+ });
884
986
  var profilesProvisionOperationSchema = z.strictObject({
885
987
  operation: dottedCommandPathSchema("profiles.provisionOperation.operation").describe(
886
988
  "The dotted command path of the operation that mints a profile credential."
@@ -888,7 +990,16 @@ var profilesProvisionOperationSchema = z.strictObject({
888
990
  credential: fieldNameMapSchema("profiles.provisionOperation.credential").refine((value) => Object.keys(value).length > 0, {
889
991
  message: "profiles.provisionOperation.credential must map at least one credential field"
890
992
  }).describe("Maps each stored credential field to the response field that supplies it."),
891
- revokeParameters: fieldNameMapSchema("profiles.provisionOperation.revokeParameters").optional().describe("Maps each revoke-operation parameter to the response field that supplies it.")
993
+ revokeParameters: fieldNameMapSchema("profiles.provisionOperation.revokeParameters").optional().describe("Maps each revoke-operation parameter to the response field that supplies it."),
994
+ flag: provisionFlagSchema.optional().describe(
995
+ 'The long name of the "profiles create" flag, without "--". The generator defaults it to "provision", which stays accepted as a hidden alias.'
996
+ ),
997
+ parameters: provisionParametersSchema.optional().describe(
998
+ "Extra request values sent with the operation. {cli}, {profile}, {user} and {host} are substituted; a value the profile sets wins."
999
+ ),
1000
+ profileParameters: fieldNameMapSchema("profiles.provisionOperation.profileParameters").optional().describe(
1001
+ "Maps each profile parameter to the typed credential field it is copied from, so requests keep it once the credential is replaced by the provisioned key."
1002
+ )
892
1003
  });
893
1004
  var profilesConfigSchema = z.strictObject({
894
1005
  enabled: z.boolean().describe("Whether the CLI emits profile commands and the global --profile flag."),
@@ -896,17 +1007,99 @@ var profilesConfigSchema = z.strictObject({
896
1007
  revokeOperation: dottedCommandPathSchema("profiles.revokeOperation").optional().describe('The dotted command path called by "profiles remove --revoke".'),
897
1008
  provisionOperation: profilesProvisionOperationSchema.optional().describe('The operation called by "profiles create --provision" and its response mapping.')
898
1009
  });
1010
+ var bannerColorsSchema = (field) => z.array(
1011
+ z.string().regex(HEX_COLOR_PATTERN, {
1012
+ message: `banner.${field} must hold 6-digit hex colours such as "#4949F2"`
1013
+ })
1014
+ );
1015
+ var bannerObjectSchema = z.strictObject({
1016
+ text: nonEmptyStringSchema.describe("The banner text. May span several lines."),
1017
+ colors: bannerColorsSchema("colors").optional().describe("One colour for a solid banner, or several for a gradient along the direction."),
1018
+ lineColors: bannerColorsSchema("lineColors").optional().describe("One colour per line of the banner. Exclusive with colors."),
1019
+ direction: z.enum(["horizontal", "vertical", "diagonal"]).optional().describe("The direction of the gradient. The generator defaults to horizontal."),
1020
+ animate: z.boolean().optional().describe(
1021
+ "Whether root --help on an interactive terminal plays a short shimmer across the banner before printing it."
1022
+ )
1023
+ }).refine((banner) => banner.colors === void 0 || banner.lineColors === void 0, {
1024
+ message: "banner must set either colors (a gradient) or lineColors (one colour per line), not both",
1025
+ path: ["lineColors"]
1026
+ });
1027
+ var bannerSchema = z.union([nonEmptyStringSchema, bannerObjectSchema]);
1028
+ var oauthPropertyPathSchema = z.string().regex(FIELD_NAME_PATTERN, {
1029
+ message: 'must be a property name, or a dotted path to a nested property, such as "data.token"'
1030
+ }).regex(/^[^.]+(\.[^.]+)*$/, { message: "must not have an empty path segment" });
1031
+ var oauthTokenRequestPropertiesSchema = z.strictObject({
1032
+ clientId: oauthPropertyPathSchema.optional().describe('The request property that carries the client ID. Defaults to "client_id".'),
1033
+ clientSecret: oauthPropertyPathSchema.optional().describe('The request property that carries the client secret. Defaults to "client_secret".'),
1034
+ scopes: oauthPropertyPathSchema.optional().describe('The request property that carries the scopes. Defaults to "scope".')
1035
+ });
1036
+ var oauthTokenResponsePropertiesSchema = z.strictObject({
1037
+ accessToken: oauthPropertyPathSchema.optional().describe('The response property that holds the access token. Defaults to "access_token".'),
1038
+ expiresIn: oauthPropertyPathSchema.optional().describe(
1039
+ 'The response property that holds the lifetime in seconds. Defaults to "expires_in".'
1040
+ ),
1041
+ refreshToken: oauthPropertyPathSchema.optional().describe('The response property that holds the refresh token. Defaults to "refresh_token".')
1042
+ });
1043
+ var oauthTokenEndpointsSchema = z.strictObject({
1044
+ token: z.strictObject({
1045
+ requestProperties: oauthTokenRequestPropertiesSchema.optional().describe("The names of the properties of the token request."),
1046
+ responseProperties: oauthTokenResponsePropertiesSchema.optional().describe("The names of the properties of the token response.")
1047
+ }).optional().describe("The token endpoint of the client credentials flow (its tokenUrl)."),
1048
+ refresh: z.strictObject({
1049
+ requestProperties: z.strictObject({
1050
+ refreshToken: oauthPropertyPathSchema.optional().describe(
1051
+ 'The request property that carries the refresh token. Defaults to "refresh_token".'
1052
+ )
1053
+ }).optional().describe("The names of the properties of the refresh request."),
1054
+ responseProperties: oauthTokenResponsePropertiesSchema.optional().describe("The names of the properties of the refresh response.")
1055
+ }).optional().describe("The refresh endpoint of the client credentials flow (its refreshUrl).")
1056
+ });
1057
+ function oauthTokenEndpointsIssues(oauthTokenEndpoints, schemes, basePath) {
1058
+ const flowsById = /* @__PURE__ */ new Map();
1059
+ for (const scheme of schemes ?? []) {
1060
+ const flow = scheme.type === "oauth2" ? scheme.flows?.find((f) => f.type === "client-credentials") : void 0;
1061
+ if (flow !== void 0) {
1062
+ flowsById.set(scheme.id, flow);
1063
+ }
1064
+ }
1065
+ return Object.entries(oauthTokenEndpoints ?? {}).flatMap(([id, endpoints]) => {
1066
+ const flow = flowsById.get(id);
1067
+ if (flow === void 0) {
1068
+ return [
1069
+ {
1070
+ message: `oauthTokenEndpoints "${id}" must name an OAuth scheme with a client-credentials flow`,
1071
+ path: [...basePath, id]
1072
+ }
1073
+ ];
1074
+ }
1075
+ return endpoints.refresh !== void 0 && flow.refreshUrl === void 0 ? [
1076
+ {
1077
+ message: `oauthTokenEndpoints "${id}" has refresh settings, but its flow has no refreshUrl`,
1078
+ path: [...basePath, id, "refresh"]
1079
+ }
1080
+ ] : [];
1081
+ });
1082
+ }
899
1083
  var cliGenerationConfigSchema = z.strictObject({
900
1084
  paginationParameters: z.array(nonEmptyStringSchema).optional().describe("Request parameter names treated as pagination controls by the CLI."),
901
1085
  skills: z.boolean().optional().describe("Whether the generated CLI includes skills that teach AI agents to invoke commands."),
902
1086
  binaryName: binaryNameSchema.optional().describe(
903
1087
  "The CLI executable name. The generator kebab-cases it and also uses it for the source directory and env-var prefix."
904
1088
  ),
1089
+ crateName: crateNameSchema.optional().describe(
1090
+ "The name of the generated Cargo package, which release archives and installers are named after. The generator defaults it to the binary name when the output is delivered to GitHub."
1091
+ ),
905
1092
  customCommands: z.boolean().optional().describe("Whether hand-written command support is generated. The generator defaults to true."),
906
1093
  rootGroup: rootGroupSchema.optional().describe("A command group that every spec-derived command is nested under."),
907
1094
  profiles: profilesConfigSchema.optional().describe("Named profile command configuration."),
908
1095
  splitTypeCrates: z.boolean().optional().describe("Whether generated types are split into one crate per API behind a facade crate."),
909
- userAgentSuffixFlag: userAgentSuffixFlagSchema.optional().describe('The long flag name, without "--", that appends a product token to the User-Agent.')
1096
+ userAgentSuffixFlag: userAgentSuffixFlagSchema.optional().describe('The long flag name, without "--", that appends a product token to the User-Agent.'),
1097
+ banner: bannerSchema.optional().describe(
1098
+ "The banner printed above root --help: a string, or text with colours, a gradient direction, per-line colours and an animation switch."
1099
+ ),
1100
+ oauthTokenEndpoints: z.record(nonEmptyStringSchema, oauthTokenEndpointsSchema).optional().describe(
1101
+ "Per OAuth scheme id (api.auth.schemes[].id), the names of the properties of the token and refresh requests and responses, for the client credentials flow of an API whose token endpoint does not use the RFC 6749 names."
1102
+ )
910
1103
  });
911
1104
 
912
1105
  // src/sdk-config/v1/fern-config-mapper-cli.ts
@@ -916,10 +1109,18 @@ var CLI_GENERATION_FIELDS = [
916
1109
  "rootGroup",
917
1110
  "profiles",
918
1111
  "splitTypeCrates",
919
- "userAgentSuffixFlag"
1112
+ "userAgentSuffixFlag",
1113
+ "banner"
920
1114
  ];
921
1115
  var PROFILES_FIELDS = ["enabled", "commandName", "revokeOperation"];
922
- var PROVISION_OPERATION_FIELDS = ["operation", "credential", "revokeParameters"];
1116
+ var PROVISION_OPERATION_FIELDS = [
1117
+ "operation",
1118
+ "credential",
1119
+ "revokeParameters",
1120
+ "flag",
1121
+ "parameters",
1122
+ "profileParameters"
1123
+ ];
923
1124
  function mapCliGeneration(config, state, basePath, targetIndex) {
924
1125
  const generation = {};
925
1126
  for (const field of CLI_GENERATION_FIELDS) {
@@ -2516,6 +2717,52 @@ var sdkConfigV1CliOutputConfigSchema = z.discriminatedUnion(
2516
2717
  var sdkConfigV1ReplayConfigSchema = z.strictObject({
2517
2718
  enabled: z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
2518
2719
  });
2720
+ var errorResponsesHttpMethodSchema = z.enum([
2721
+ "get",
2722
+ "post",
2723
+ "put",
2724
+ "patch",
2725
+ "delete",
2726
+ "head",
2727
+ "options",
2728
+ "trace"
2729
+ ]);
2730
+ var errorResponsesEnsureSchema = z.strictObject({
2731
+ statusCode: z.number().int().min(400).max(599).describe("The 4xx or 5xx status code added to an operation that does not declare it."),
2732
+ methods: z.array(errorResponsesHttpMethodSchema).optional().describe("The HTTP methods whose operations receive the response. Defaults to all methods.")
2733
+ });
2734
+ var errorResponsesSchema = z.strictObject({
2735
+ schema: z.record(z.string(), z.unknown()).describe(
2736
+ "The OpenAPI schema of error response bodies, inline. The client resolves a schema file to its content before the config reaches the generator. Any $ref inside must be a local #/components/... pointer into the spec it is applied to."
2737
+ ),
2738
+ name: nonEmptyStringSchema.optional().describe(
2739
+ "The name of the generated error body type. Defaults to the schema title, then ProblemDetails."
2740
+ ),
2741
+ applyTo: z.enum(["all", "untyped"]).optional().describe(
2742
+ "all replaces the body of every 4xx/5xx response with the schema. untyped only fills in 4xx/5xx responses that declare no body schema. Defaults to all."
2743
+ ),
2744
+ ensure: z.array(errorResponsesEnsureSchema).optional().describe("Error responses added to operations that do not already declare them.")
2745
+ });
2746
+ var exampleDepthSchema = z.strictObject({
2747
+ maxDepth: z.number().int().min(0).optional().describe("How many levels of optional properties an example includes. 0 leaves them out.")
2748
+ });
2749
+ var exampleGenerationSchema = z.strictObject({
2750
+ request: exampleDepthSchema.optional().describe("Depth of generated request examples."),
2751
+ response: exampleDepthSchema.optional().describe("Depth of generated response examples.")
2752
+ });
2753
+ var resolveAliasesSchema = z.union([
2754
+ z.boolean(),
2755
+ z.strictObject({
2756
+ except: z.array(nonEmptyStringSchema).optional().describe("Component schema names whose aliases are kept.")
2757
+ })
2758
+ ]);
2759
+ var endpointFilterSchema = z.strictObject({
2760
+ endpoints: z.array(
2761
+ nonEmptyStringSchema.describe(
2762
+ 'An endpoint to keep, as "METHOD /path/template". An entry in another shape is ignored.'
2763
+ )
2764
+ ).describe("The only endpoints imported. Every other operation is dropped before conversion.")
2765
+ });
2519
2766
  var apiImportSettingsSchema = z.strictObject({
2520
2767
  respectNullableSchemas: z.boolean().optional().describe("Whether nullable schemas remain nullable in generated types."),
2521
2768
  titleAsSchemaName: z.boolean().optional().describe("Whether a schema title can determine the generated type name."),
@@ -2544,7 +2791,56 @@ var apiImportSettingsSchema = z.strictObject({
2544
2791
  resolveSchemaCollisions: z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
2545
2792
  asyncApiMessageNaming: z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
2546
2793
  defaultIntegerFormat: z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one."),
2547
- respectByteFormat: z.boolean().optional().describe("Whether string schemas with format byte are imported as base64-encoded bytes.")
2794
+ respectByteFormat: z.boolean().optional().describe("Whether string schemas with format byte are imported as base64-encoded bytes."),
2795
+ additionalPropertiesDefaultsTo: z.boolean().optional().describe(
2796
+ "Whether an object schema that does not declare additionalProperties admits any extra property."
2797
+ ),
2798
+ optionalAdditionalProperties: z.boolean().optional().describe("Whether the values of a nullable map are also nullable."),
2799
+ anyOfSiblingPropertiesAsObject: z.boolean().optional().describe(
2800
+ "Whether an anyOf that only constrains which sibling properties are present imports as the object it sits beside."
2801
+ ),
2802
+ preserveSingleSchemaOneOf: z.boolean().optional().describe(
2803
+ "Whether a oneOf with a single member stays a union instead of collapsing to that member."
2804
+ ),
2805
+ preserveOneOfInAllOf: z.boolean().optional().describe(
2806
+ "Whether a oneOf inside an allOf stays a union of the merged variants instead of being flattened."
2807
+ ),
2808
+ removeDiscriminantsFromSchemas: z.enum(["always", "never"]).optional().describe(
2809
+ "Whether the discriminator property is removed from the schemas of a discriminated union."
2810
+ ),
2811
+ coerceConstsTo: z.enum(["literals", "enums", "enums-coerceable-to-literals"]).optional().describe(
2812
+ "What a const imports as: a literal, a single-value enum, or an enum that coerceEnumsToLiterals can turn into a literal."
2813
+ ),
2814
+ resolveAliases: resolveAliasesSchema.optional().describe(
2815
+ "Whether references to alias-like schemas are replaced by the schema they alias, optionally keeping the named exceptions."
2816
+ ),
2817
+ respectForwardCompatibleEnums: z.boolean().optional().describe(
2818
+ "Whether a query or header parameter that accepts an enum or any string keeps both options."
2819
+ ),
2820
+ inferForwardCompatible: z.boolean().optional().describe(
2821
+ "Whether a oneOf or anyOf of an enum and a plain string imports as a forward-compatible enum."
2822
+ ),
2823
+ respectOperationIdWordBoundaries: z.boolean().optional().describe(
2824
+ "Whether operation ids are split at every word boundary when method names are derived."
2825
+ ),
2826
+ namespacedErrors: z.boolean().optional().describe("Whether an error response takes the x-fern-sdk-namespace it declares."),
2827
+ defaultFormParameterEncoding: z.enum(["form", "json"]).optional().describe("How multipart form properties without an explicit content type are encoded."),
2828
+ respectParameterContent: z.boolean().optional().describe(
2829
+ "Whether a header declared with a JSON content entry instead of a schema is typed by that content."
2830
+ ),
2831
+ useBytesForBinaryResponse: z.boolean().optional().describe("Whether a binary response is returned as bytes instead of a file stream."),
2832
+ useReadVariantForResponses: z.boolean().optional().describe(
2833
+ "Whether responses use the read variant of a schema that has read-only properties. Needs respectReadonlySchemas."
2834
+ ),
2835
+ exampleGeneration: exampleGenerationSchema.optional().describe("How deep the examples generated for operations without one go."),
2836
+ filter: endpointFilterSchema.optional().describe("Restricts the import to a list of endpoints."),
2837
+ groupEnvironmentsByHost: z.boolean().optional().describe("Whether HTTP and WebSocket servers with the same host become one environment."),
2838
+ multiServerStrategy: z.enum(["environment-per-server", "urls-per-environment"]).optional().describe(
2839
+ "Whether each named server is its own environment or a named URL of one environment."
2840
+ ),
2841
+ inferDefaultEnvironment: z.boolean().optional().describe("Whether the first server becomes the default environment."),
2842
+ respectPerSpecBasePath: z.boolean().optional().describe("Whether each spec's plain x-fern-base-path applies to that spec's endpoints."),
2843
+ errorResponses: errorResponsesSchema.optional().describe("A shared error body schema applied to the 4xx/5xx responses of the specs.")
2548
2844
  });
2549
2845
  var sourceSpecTypeSchema = z.enum([
2550
2846
  "openapi",
@@ -3049,7 +3345,7 @@ var sdkConfigV1Schema = z.strictObject({
3049
3345
  docs: sdkConfigV1DocsConfigSchema.prefault({}).describe("Documentation settings inherited by every target."),
3050
3346
  generation: sdkConfigV1GenerationConfigSchema.prefault({}).describe("Generation settings inherited by every target."),
3051
3347
  targets: z.array(sdkConfigV1TargetSchema).min(1).describe("Language targets to generate; each language may appear once.")
3052
- }).superRefine(({ output, package: globalPackage, targets }, context) => {
3348
+ }).superRefine(({ api, output, package: globalPackage, targets }, context) => {
3053
3349
  const configuredLanguages = /* @__PURE__ */ new Set();
3054
3350
  targets.forEach((target, targetIndex) => {
3055
3351
  if (configuredLanguages.has(target.language)) {
@@ -3061,6 +3357,14 @@ var sdkConfigV1Schema = z.strictObject({
3061
3357
  }
3062
3358
  configuredLanguages.add(target.language);
3063
3359
  validateTargetPublishing(target, targetIndex, globalPackage, output, context);
3360
+ if (target.language === "cli") {
3361
+ oauthTokenEndpointsIssues(target.generation?.oauthTokenEndpoints, api.auth?.schemes, [
3362
+ "targets",
3363
+ targetIndex,
3364
+ "generation",
3365
+ "oauthTokenEndpoints"
3366
+ ]).forEach((issue) => context.addIssue({ code: "custom", ...issue }));
3367
+ }
3064
3368
  });
3065
3369
  });
3066
3370
  function validateSdkConfigV1(value) {
@@ -4913,63 +5217,71 @@ var sdkConfigIrV1Schema = z.strictObject({
4913
5217
  "Shared and language-specific generation behavior."
4914
5218
  ),
4915
5219
  compatibility: compatibilityConfigSchema.optional().describe("Temporary provenance and diagnostics retained during legacy migration.")
4916
- }).superRefine(({ compatibility, generation, output, package: packageConfig, target }, context) => {
4917
- const configuredLanguages = Object.keys(generation.language ?? {});
4918
- const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;
4919
- if (requiresExternalPublishIdentity) {
4920
- [
4921
- ["apiName", "target.apiName is required for external publishing"],
4922
- ["organizationName", "target.organizationName is required for external publishing"]
4923
- ].forEach(([field, message]) => {
4924
- if (!target[field]) {
5220
+ }).superRefine(
5221
+ ({ api, compatibility, generation, output, package: packageConfig, target }, context) => {
5222
+ const configuredLanguages = Object.keys(generation.language ?? {});
5223
+ const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;
5224
+ if (requiresExternalPublishIdentity) {
5225
+ [
5226
+ ["apiName", "target.apiName is required for external publishing"],
5227
+ ["organizationName", "target.organizationName is required for external publishing"]
5228
+ ].forEach(([field, message]) => {
5229
+ if (!target[field]) {
5230
+ context.addIssue({
5231
+ code: "custom",
5232
+ message,
5233
+ path: ["target", field]
5234
+ });
5235
+ }
5236
+ });
5237
+ }
5238
+ oauthTokenEndpointsIssues(generation.language?.cli?.oauthTokenEndpoints, api.auth?.schemes, [
5239
+ "generation",
5240
+ "language",
5241
+ "cli",
5242
+ "oauthTokenEndpoints"
5243
+ ]).forEach((issue) => context.addIssue({ code: "custom", ...issue }));
5244
+ configuredLanguages.forEach((language) => {
5245
+ if (language !== target.language) {
4925
5246
  context.addIssue({
4926
5247
  code: "custom",
4927
- message,
4928
- path: ["target", field]
5248
+ message: `generation.language.${language} does not match target language "${target.language}"`,
5249
+ path: ["generation", "language", language]
4929
5250
  });
4930
5251
  }
4931
5252
  });
4932
- }
4933
- configuredLanguages.forEach((language) => {
4934
- if (language !== target.language) {
5253
+ if (output.publish && !publishRegistryLanguages2[output.publish.registry].some(
5254
+ (language) => language === target.language
5255
+ )) {
4935
5256
  context.addIssue({
4936
5257
  code: "custom",
4937
- message: `generation.language.${language} does not match target language "${target.language}"`,
4938
- path: ["generation", "language", language]
5258
+ message: `registry "${output.publish.registry}" is not supported for target language "${target.language}"`,
5259
+ path: ["output", "publish", "registry"]
4939
5260
  });
4940
5261
  }
4941
- });
4942
- if (output.publish && !publishRegistryLanguages2[output.publish.registry].some(
4943
- (language) => language === target.language
4944
- )) {
4945
- context.addIssue({
4946
- code: "custom",
4947
- message: `registry "${output.publish.registry}" is not supported for target language "${target.language}"`,
4948
- path: ["output", "publish", "registry"]
4949
- });
4950
- }
4951
- if (output.publish) {
4952
- validatePublishingIdentity2(packageConfig, output.publish.registry, context);
4953
- if (output.delivery !== "github" && output.publish.shouldGeneratePublishWorkflow === true) {
4954
- context.addIssue({
4955
- code: "custom",
4956
- message: "output.publish.shouldGeneratePublishWorkflow requires GitHub delivery",
4957
- path: ["output", "publish", "shouldGeneratePublishWorkflow"]
4958
- });
5262
+ if (output.publish) {
5263
+ validatePublishingIdentity2(packageConfig, output.publish.registry, context);
5264
+ if (output.delivery !== "github" && output.publish.shouldGeneratePublishWorkflow === true) {
5265
+ context.addIssue({
5266
+ code: "custom",
5267
+ message: "output.publish.shouldGeneratePublishWorkflow requires GitHub delivery",
5268
+ path: ["output", "publish", "shouldGeneratePublishWorkflow"]
5269
+ });
5270
+ }
4959
5271
  }
4960
- }
4961
- validateCliOutput(output, target.language, context);
4962
- if (compatibility?.legacyInput) {
4963
- const expectedKind = target.sourceOrigin === "postman" ? "postman-build-parameters" : "fern-generator-invocation";
4964
- if (compatibility.legacyInput.kind !== expectedKind) {
4965
- context.addIssue({
4966
- code: "custom",
4967
- message: `compatibility.legacyInput kind "${compatibility.legacyInput.kind}" does not match target.sourceOrigin "${target.sourceOrigin}"`,
4968
- path: ["compatibility", "legacyInput", "kind"]
4969
- });
5272
+ validateCliOutput(output, target.language, context);
5273
+ if (compatibility?.legacyInput) {
5274
+ const expectedKind = target.sourceOrigin === "postman" ? "postman-build-parameters" : "fern-generator-invocation";
5275
+ if (compatibility.legacyInput.kind !== expectedKind) {
5276
+ context.addIssue({
5277
+ code: "custom",
5278
+ message: `compatibility.legacyInput kind "${compatibility.legacyInput.kind}" does not match target.sourceOrigin "${target.sourceOrigin}"`,
5279
+ path: ["compatibility", "legacyInput", "kind"]
5280
+ });
5281
+ }
4970
5282
  }
4971
5283
  }
4972
- });
5284
+ );
4973
5285
  function parseSdkConfigIrV1(value) {
4974
5286
  return sdkConfigIrV1Schema.parse(value);
4975
5287
  }
@@ -4998,6 +5310,6 @@ function parseSdkConfigIrV1ForConsumption(value) {
4998
5310
  return parseSdkConfigIrV1(stripUnknownProperties(value, sdkConfigIrV1InputJsonSchema));
4999
5311
  }
5000
5312
 
5001
- export { CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, FernConfigMappingError, SDK_CONFIG_IR_V1_SCHEMA_VERSION, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, SDK_CONFIG_V1_SCHEMA_VERSION, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, cliDistributionConfigSchema, cliDistributionGithubAppSchema, cliDistributionHomebrewSchema, cliDistributionScoopSchema, cliGenerationConfigSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, composerPackageNameSchema, csharpGenerationConfigSchema, dependencySchema, docsConfigSchema, exactSemverSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, getSdkConfigV1Diagnostics, githubActionsSecretNameSchema, goGenerationConfigSchema, goModulePathSchema, javaGenerationConfigSchema, jsonObjectSchema, jsonValueSchema, kotlinGenerationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, mapFernConfigToSdkConfigV1, mcpAvailabilityStatuses, mcpGenerationConfigSchema, nonEmptyStringSchema, outputConfigSchema, packageConfigSchema, parentRelativePathSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, parseSdkConfigV1, parseSdkConfigV1ForConsumption, phpGenerationConfigSchema, publishConfigSchema, publishRegistrySchema, pythonGenerationConfigSchema, readmeCustomSectionSchema, readmeEndpointSchema, relativePathSchema, replayConfigSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, sdkConfigV1ApiConfigSchema, sdkConfigV1AuthConfigSchema, sdkConfigV1AuthSchemeSchema, cliDistributionConfigSchema as sdkConfigV1CliDistributionConfigSchema, cliDistributionGithubAppSchema as sdkConfigV1CliDistributionGithubAppSchema, cliDistributionHomebrewSchema as sdkConfigV1CliDistributionHomebrewSchema, cliDistributionScoopSchema as sdkConfigV1CliDistributionScoopSchema, cliGenerationConfigSchema as sdkConfigV1CliGenerationConfigSchema, sdkConfigV1CliOutputConfigSchema, sdkConfigV1ClientConfigOverrideSchema, sdkConfigV1ClientConfigSchema, composerPackageNameSchema as sdkConfigV1ComposerPackageNameSchema, csharpGenerationConfigSchema as sdkConfigV1CsharpGenerationConfigSchema, sdkConfigV1DependencySchema, sdkConfigV1DocsConfigSchema, exactSemverSchema as sdkConfigV1ExactSemverSchema, sdkConfigV1GenerationConfigOverrideSchema, sdkConfigV1GenerationConfigSchema, sdkConfigV1GitRemoteSchema, githubActionsSecretNameSchema as sdkConfigV1GithubActionsSecretNameSchema, goGenerationConfigSchema as sdkConfigV1GoGenerationConfigSchema, goModulePathSchema as sdkConfigV1GoModulePathSchema, javaGenerationConfigSchema as sdkConfigV1JavaGenerationConfigSchema, kotlinGenerationConfigSchema as sdkConfigV1KotlinGenerationConfigSchema, mcpGenerationConfigSchema as sdkConfigV1McpGenerationConfigSchema, sdkConfigV1McpOutputConfigSchema, nonEmptyStringSchema as sdkConfigV1NonEmptyStringSchema, sdkConfigV1OutputConfigSchema, sdkConfigV1PackageConfigSchema, parentRelativePathSchema as sdkConfigV1ParentRelativePathSchema, phpGenerationConfigSchema as sdkConfigV1PhpGenerationConfigSchema, sdkConfigV1ProtobufRootSchema, sdkConfigV1ProtobufSourceSchema, sdkConfigV1PublishConfigSchema, sdkConfigV1PublishRegistrySchema, pythonGenerationConfigSchema as sdkConfigV1PythonGenerationConfigSchema, sdkConfigV1ReadmeCustomSectionSchema, sdkConfigV1ReadmeEndpointSchema, relativePathSchema as sdkConfigV1RelativePathSchema, sdkConfigV1ReplayConfigSchema, rubyGenerationConfigSchema as sdkConfigV1RubyGenerationConfigSchema, rustGenerationConfigSchema as sdkConfigV1RustGenerationConfigSchema, sdkConfigV1Schema, sdkConfigV1SourceConfigSchema, sdkConfigV1SourceSpecSchema, swiftGenerationConfigSchema as sdkConfigV1SwiftGenerationConfigSchema, sdkConfigV1TargetSchema, terraformGenerationConfigSchema as sdkConfigV1TerraformGenerationConfigSchema, typescriptGenerationConfigSchema as sdkConfigV1TypescriptGenerationConfigSchema, sdkConfigV1WebhookSignatureSchema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, splitSdkConfigV1TargetGeneration, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema, validateSdkConfigV1, webhookSignatureSchema };
5313
+ export { CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, FernConfigMappingError, SDK_CONFIG_IR_V1_SCHEMA_VERSION, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, SDK_CONFIG_V1_SCHEMA_VERSION, apiConfigSchema, apiImportSettingsSchema, authConfigSchema, authSchemeSchema, cliDistributionConfigSchema, cliDistributionGithubAppSchema, cliDistributionHomebrewSchema, cliDistributionScoopSchema, cliGenerationConfigSchema, clientConfigOverrideSchema, clientConfigSchema, clientRetryOverrideSchema, compatibilityConfigSchema, composerPackageNameSchema, csharpGenerationConfigSchema, dependencySchema, docsConfigSchema, exactSemverSchema, generationConfigSchema, getSdkConfigIrV1Diagnostics, getSdkConfigV1Diagnostics, githubActionsSecretNameSchema, goGenerationConfigSchema, goModulePathSchema, javaGenerationConfigSchema, jsonObjectSchema, jsonValueSchema, kotlinGenerationConfigSchema, languageGenerationConfigSchema, legacyInputSchema, mapFernConfigToSdkConfigV1, mcpAvailabilityStatuses, mcpGenerationConfigSchema, nonEmptyStringSchema, oauthTokenEndpointsIssues, outputConfigSchema, packageConfigSchema, parentRelativePathSchema, parseSdkConfigIrV1, parseSdkConfigIrV1ForConsumption, parseSdkConfigV1, parseSdkConfigV1ForConsumption, phpGenerationConfigSchema, publishConfigSchema, publishRegistrySchema, pythonGenerationConfigSchema, readmeCustomSectionSchema, readmeEndpointSchema, relativePathSchema, replayConfigSchema, rubyGenerationConfigSchema, rustGenerationConfigSchema, sdkConfigIrCapabilitySchema, sdkConfigIrV1Schema, sdkConfigV1ApiConfigSchema, sdkConfigV1AuthConfigSchema, sdkConfigV1AuthSchemeSchema, cliDistributionConfigSchema as sdkConfigV1CliDistributionConfigSchema, cliDistributionGithubAppSchema as sdkConfigV1CliDistributionGithubAppSchema, cliDistributionHomebrewSchema as sdkConfigV1CliDistributionHomebrewSchema, cliDistributionScoopSchema as sdkConfigV1CliDistributionScoopSchema, cliGenerationConfigSchema as sdkConfigV1CliGenerationConfigSchema, sdkConfigV1CliOutputConfigSchema, sdkConfigV1ClientConfigOverrideSchema, sdkConfigV1ClientConfigSchema, composerPackageNameSchema as sdkConfigV1ComposerPackageNameSchema, csharpGenerationConfigSchema as sdkConfigV1CsharpGenerationConfigSchema, sdkConfigV1DependencySchema, sdkConfigV1DocsConfigSchema, exactSemverSchema as sdkConfigV1ExactSemverSchema, sdkConfigV1GenerationConfigOverrideSchema, sdkConfigV1GenerationConfigSchema, sdkConfigV1GitRemoteSchema, githubActionsSecretNameSchema as sdkConfigV1GithubActionsSecretNameSchema, goGenerationConfigSchema as sdkConfigV1GoGenerationConfigSchema, goModulePathSchema as sdkConfigV1GoModulePathSchema, javaGenerationConfigSchema as sdkConfigV1JavaGenerationConfigSchema, kotlinGenerationConfigSchema as sdkConfigV1KotlinGenerationConfigSchema, mcpGenerationConfigSchema as sdkConfigV1McpGenerationConfigSchema, sdkConfigV1McpOutputConfigSchema, nonEmptyStringSchema as sdkConfigV1NonEmptyStringSchema, sdkConfigV1OutputConfigSchema, sdkConfigV1PackageConfigSchema, parentRelativePathSchema as sdkConfigV1ParentRelativePathSchema, phpGenerationConfigSchema as sdkConfigV1PhpGenerationConfigSchema, sdkConfigV1ProtobufRootSchema, sdkConfigV1ProtobufSourceSchema, sdkConfigV1PublishConfigSchema, sdkConfigV1PublishRegistrySchema, pythonGenerationConfigSchema as sdkConfigV1PythonGenerationConfigSchema, sdkConfigV1ReadmeCustomSectionSchema, sdkConfigV1ReadmeEndpointSchema, relativePathSchema as sdkConfigV1RelativePathSchema, sdkConfigV1ReplayConfigSchema, rubyGenerationConfigSchema as sdkConfigV1RubyGenerationConfigSchema, rustGenerationConfigSchema as sdkConfigV1RustGenerationConfigSchema, sdkConfigV1Schema, sdkConfigV1SourceConfigSchema, sdkConfigV1SourceSpecSchema, swiftGenerationConfigSchema as sdkConfigV1SwiftGenerationConfigSchema, sdkConfigV1TargetSchema, terraformGenerationConfigSchema as sdkConfigV1TerraformGenerationConfigSchema, typescriptGenerationConfigSchema as sdkConfigV1TypescriptGenerationConfigSchema, sdkConfigV1WebhookSignatureSchema, serializeSdkConfigIrV1, sourceConfigSchema, sourceSpecConfigSchema, sourceSpecOriginSchema, sourceSpecTypeSchema, splitSdkConfigV1TargetGeneration, swiftGenerationConfigSchema, targetConfigSchema, targetLanguageSchema, terraformGenerationConfigSchema, typescriptGenerationConfigSchema, unsupportedFieldSchema, validateSdkConfigV1, webhookSignatureSchema };
5002
5314
  //# sourceMappingURL=index.js.map
5003
5315
  //# sourceMappingURL=index.js.map