@postman/sdk-config 0.20.0 → 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 +159 -4
  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 +159 -4
  6. package/dist/index.js.map +1 -1
  7. package/dist/sdk-config/index.cjs +159 -4
  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 +159 -4
  12. package/dist/sdk-config/index.js.map +1 -1
  13. package/dist/sdk-config/v1/index.cjs +159 -4
  14. package/dist/sdk-config/v1/index.cjs.map +1 -1
  15. package/dist/sdk-config/v1/index.d.cts +767 -2
  16. package/dist/sdk-config/v1/index.d.ts +767 -2
  17. package/dist/sdk-config/v1/index.js +159 -4
  18. package/dist/sdk-config/v1/index.js.map +1 -1
  19. package/dist/sdk-config-ir/index.cjs +149 -2
  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 +149 -2
  24. package/dist/sdk-config-ir/index.js.map +1 -1
  25. package/dist/sdk-config-ir/v1/index.cjs +149 -2
  26. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  27. package/dist/sdk-config-ir/v1/index.d.cts +446 -2
  28. package/dist/sdk-config-ir/v1/index.d.ts +446 -2
  29. package/dist/sdk-config-ir/v1/index.js +149 -2
  30. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  31. package/dist/{typescript-VEqEGvnA.d.cts → typescript-DNic6Rq5.d.cts} +20 -0
  32. package/dist/{typescript-VEqEGvnA.d.ts → typescript-DNic6Rq5.d.ts} +20 -0
  33. package/package.json +1 -1
  34. package/src/sdk-config/v1/README.md +24 -12
  35. package/src/sdk-config-ir/v1/README.md +39 -0
@@ -1,3 +1,3 @@
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 './v1/index.cjs';
2
- export { C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, S as SdkConfigV1Diagnostic, 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 } from '../typescript-VEqEGvnA.cjs';
2
+ export { C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, S as SdkConfigV1Diagnostic, 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 } from '../typescript-DNic6Rq5.cjs';
3
3
  import 'zod';
@@ -1,3 +1,3 @@
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 './v1/index.js';
2
- export { C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, S as SdkConfigV1Diagnostic, 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 } from '../typescript-VEqEGvnA.js';
2
+ export { C as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, a as SdkConfigV1CliDistributionConfig, b as SdkConfigV1CliDistributionGithubAppConfig, c as SdkConfigV1CliDistributionHomebrewConfig, d as SdkConfigV1CliDistributionScoopConfig, S as SdkConfigV1Diagnostic, 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 } from '../typescript-DNic6Rq5.js';
3
3
  import 'zod';
@@ -961,6 +961,28 @@ function fieldNameMapSchema(field) {
961
961
  }
962
962
  });
963
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
+ });
964
986
  var profilesProvisionOperationSchema = z.strictObject({
965
987
  operation: dottedCommandPathSchema("profiles.provisionOperation.operation").describe(
966
988
  "The dotted command path of the operation that mints a profile credential."
@@ -968,7 +990,16 @@ var profilesProvisionOperationSchema = z.strictObject({
968
990
  credential: fieldNameMapSchema("profiles.provisionOperation.credential").refine((value) => Object.keys(value).length > 0, {
969
991
  message: "profiles.provisionOperation.credential must map at least one credential field"
970
992
  }).describe("Maps each stored credential field to the response field that supplies it."),
971
- 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
+ )
972
1003
  });
973
1004
  var profilesConfigSchema = z.strictObject({
974
1005
  enabled: z.boolean().describe("Whether the CLI emits profile commands and the global --profile flag."),
@@ -976,6 +1007,24 @@ var profilesConfigSchema = z.strictObject({
976
1007
  revokeOperation: dottedCommandPathSchema("profiles.revokeOperation").optional().describe('The dotted command path called by "profiles remove --revoke".'),
977
1008
  provisionOperation: profilesProvisionOperationSchema.optional().describe('The operation called by "profiles create --provision" and its response mapping.')
978
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]);
979
1028
  var oauthPropertyPathSchema = z.string().regex(FIELD_NAME_PATTERN, {
980
1029
  message: 'must be a property name, or a dotted path to a nested property, such as "data.token"'
981
1030
  }).regex(/^[^.]+(\.[^.]+)*$/, { message: "must not have an empty path segment" });
@@ -1045,6 +1094,9 @@ var cliGenerationConfigSchema = z.strictObject({
1045
1094
  profiles: profilesConfigSchema.optional().describe("Named profile command configuration."),
1046
1095
  splitTypeCrates: z.boolean().optional().describe("Whether generated types are split into one crate per API behind a facade crate."),
1047
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
+ ),
1048
1100
  oauthTokenEndpoints: z.record(nonEmptyStringSchema, oauthTokenEndpointsSchema).optional().describe(
1049
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."
1050
1102
  )
@@ -1057,10 +1109,18 @@ var CLI_GENERATION_FIELDS = [
1057
1109
  "rootGroup",
1058
1110
  "profiles",
1059
1111
  "splitTypeCrates",
1060
- "userAgentSuffixFlag"
1112
+ "userAgentSuffixFlag",
1113
+ "banner"
1061
1114
  ];
1062
1115
  var PROFILES_FIELDS = ["enabled", "commandName", "revokeOperation"];
1063
- 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
+ ];
1064
1124
  function mapCliGeneration(config, state, basePath, targetIndex) {
1065
1125
  const generation = {};
1066
1126
  for (const field of CLI_GENERATION_FIELDS) {
@@ -2645,6 +2705,52 @@ var sdkConfigV1CliOutputConfigSchema = z.discriminatedUnion(
2645
2705
  var sdkConfigV1ReplayConfigSchema = z.strictObject({
2646
2706
  enabled: z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
2647
2707
  });
2708
+ var errorResponsesHttpMethodSchema = z.enum([
2709
+ "get",
2710
+ "post",
2711
+ "put",
2712
+ "patch",
2713
+ "delete",
2714
+ "head",
2715
+ "options",
2716
+ "trace"
2717
+ ]);
2718
+ var errorResponsesEnsureSchema = z.strictObject({
2719
+ statusCode: z.number().int().min(400).max(599).describe("The 4xx or 5xx status code added to an operation that does not declare it."),
2720
+ methods: z.array(errorResponsesHttpMethodSchema).optional().describe("The HTTP methods whose operations receive the response. Defaults to all methods.")
2721
+ });
2722
+ var errorResponsesSchema = z.strictObject({
2723
+ schema: z.record(z.string(), z.unknown()).describe(
2724
+ "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."
2725
+ ),
2726
+ name: nonEmptyStringSchema.optional().describe(
2727
+ "The name of the generated error body type. Defaults to the schema title, then ProblemDetails."
2728
+ ),
2729
+ applyTo: z.enum(["all", "untyped"]).optional().describe(
2730
+ "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."
2731
+ ),
2732
+ ensure: z.array(errorResponsesEnsureSchema).optional().describe("Error responses added to operations that do not already declare them.")
2733
+ });
2734
+ var exampleDepthSchema = z.strictObject({
2735
+ maxDepth: z.number().int().min(0).optional().describe("How many levels of optional properties an example includes. 0 leaves them out.")
2736
+ });
2737
+ var exampleGenerationSchema = z.strictObject({
2738
+ request: exampleDepthSchema.optional().describe("Depth of generated request examples."),
2739
+ response: exampleDepthSchema.optional().describe("Depth of generated response examples.")
2740
+ });
2741
+ var resolveAliasesSchema = z.union([
2742
+ z.boolean(),
2743
+ z.strictObject({
2744
+ except: z.array(nonEmptyStringSchema).optional().describe("Component schema names whose aliases are kept.")
2745
+ })
2746
+ ]);
2747
+ var endpointFilterSchema = z.strictObject({
2748
+ endpoints: z.array(
2749
+ nonEmptyStringSchema.describe(
2750
+ 'An endpoint to keep, as "METHOD /path/template". An entry in another shape is ignored.'
2751
+ )
2752
+ ).describe("The only endpoints imported. Every other operation is dropped before conversion.")
2753
+ });
2648
2754
  var apiImportSettingsSchema = z.strictObject({
2649
2755
  respectNullableSchemas: z.boolean().optional().describe("Whether nullable schemas remain nullable in generated types."),
2650
2756
  titleAsSchemaName: z.boolean().optional().describe("Whether a schema title can determine the generated type name."),
@@ -2673,7 +2779,56 @@ var apiImportSettingsSchema = z.strictObject({
2673
2779
  resolveSchemaCollisions: z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
2674
2780
  asyncApiMessageNaming: z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
2675
2781
  defaultIntegerFormat: z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one."),
2676
- respectByteFormat: z.boolean().optional().describe("Whether string schemas with format byte are imported as base64-encoded bytes.")
2782
+ respectByteFormat: z.boolean().optional().describe("Whether string schemas with format byte are imported as base64-encoded bytes."),
2783
+ additionalPropertiesDefaultsTo: z.boolean().optional().describe(
2784
+ "Whether an object schema that does not declare additionalProperties admits any extra property."
2785
+ ),
2786
+ optionalAdditionalProperties: z.boolean().optional().describe("Whether the values of a nullable map are also nullable."),
2787
+ anyOfSiblingPropertiesAsObject: z.boolean().optional().describe(
2788
+ "Whether an anyOf that only constrains which sibling properties are present imports as the object it sits beside."
2789
+ ),
2790
+ preserveSingleSchemaOneOf: z.boolean().optional().describe(
2791
+ "Whether a oneOf with a single member stays a union instead of collapsing to that member."
2792
+ ),
2793
+ preserveOneOfInAllOf: z.boolean().optional().describe(
2794
+ "Whether a oneOf inside an allOf stays a union of the merged variants instead of being flattened."
2795
+ ),
2796
+ removeDiscriminantsFromSchemas: z.enum(["always", "never"]).optional().describe(
2797
+ "Whether the discriminator property is removed from the schemas of a discriminated union."
2798
+ ),
2799
+ coerceConstsTo: z.enum(["literals", "enums", "enums-coerceable-to-literals"]).optional().describe(
2800
+ "What a const imports as: a literal, a single-value enum, or an enum that coerceEnumsToLiterals can turn into a literal."
2801
+ ),
2802
+ resolveAliases: resolveAliasesSchema.optional().describe(
2803
+ "Whether references to alias-like schemas are replaced by the schema they alias, optionally keeping the named exceptions."
2804
+ ),
2805
+ respectForwardCompatibleEnums: z.boolean().optional().describe(
2806
+ "Whether a query or header parameter that accepts an enum or any string keeps both options."
2807
+ ),
2808
+ inferForwardCompatible: z.boolean().optional().describe(
2809
+ "Whether a oneOf or anyOf of an enum and a plain string imports as a forward-compatible enum."
2810
+ ),
2811
+ respectOperationIdWordBoundaries: z.boolean().optional().describe(
2812
+ "Whether operation ids are split at every word boundary when method names are derived."
2813
+ ),
2814
+ namespacedErrors: z.boolean().optional().describe("Whether an error response takes the x-fern-sdk-namespace it declares."),
2815
+ defaultFormParameterEncoding: z.enum(["form", "json"]).optional().describe("How multipart form properties without an explicit content type are encoded."),
2816
+ respectParameterContent: z.boolean().optional().describe(
2817
+ "Whether a header declared with a JSON content entry instead of a schema is typed by that content."
2818
+ ),
2819
+ useBytesForBinaryResponse: z.boolean().optional().describe("Whether a binary response is returned as bytes instead of a file stream."),
2820
+ useReadVariantForResponses: z.boolean().optional().describe(
2821
+ "Whether responses use the read variant of a schema that has read-only properties. Needs respectReadonlySchemas."
2822
+ ),
2823
+ exampleGeneration: exampleGenerationSchema.optional().describe("How deep the examples generated for operations without one go."),
2824
+ filter: endpointFilterSchema.optional().describe("Restricts the import to a list of endpoints."),
2825
+ groupEnvironmentsByHost: z.boolean().optional().describe("Whether HTTP and WebSocket servers with the same host become one environment."),
2826
+ multiServerStrategy: z.enum(["environment-per-server", "urls-per-environment"]).optional().describe(
2827
+ "Whether each named server is its own environment or a named URL of one environment."
2828
+ ),
2829
+ inferDefaultEnvironment: z.boolean().optional().describe("Whether the first server becomes the default environment."),
2830
+ respectPerSpecBasePath: z.boolean().optional().describe("Whether each spec's plain x-fern-base-path applies to that spec's endpoints."),
2831
+ errorResponses: errorResponsesSchema.optional().describe("A shared error body schema applied to the 4xx/5xx responses of the specs.")
2677
2832
  });
2678
2833
  var sourceSpecTypeSchema = z.enum([
2679
2834
  "openapi",