@postman/sdk-config 0.20.0 → 0.23.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 +192 -94
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +192 -95
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +191 -94
- 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 +191 -94
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +191 -94
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +20 -2
- package/dist/sdk-config/v1/index.d.ts +20 -2
- package/dist/sdk-config/v1/index.js +191 -94
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +24 -1
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +1 -1
- package/dist/sdk-config-ir/index.d.ts +1 -1
- package/dist/sdk-config-ir/index.js +24 -2
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +24 -1
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +29 -2
- package/dist/sdk-config-ir/v1/index.d.ts +29 -2
- package/dist/sdk-config-ir/v1/index.js +24 -2
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-VEqEGvnA.d.cts → typescript-ZRqfOhMd.d.cts} +23 -1
- package/dist/{typescript-VEqEGvnA.d.ts → typescript-ZRqfOhMd.d.ts} +23 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-
|
|
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,
|
|
1
|
+
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-ZRqfOhMd.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, w as sdkConfigV1CliDistributionConfigSchema, x as sdkConfigV1CliDistributionGithubAppSchema, y as sdkConfigV1CliDistributionHomebrewSchema, z as sdkConfigV1CliDistributionScoopSchema, A as sdkConfigV1CliGenerationConfigSchema, B as sdkConfigV1ComposerPackageNameSchema, E as sdkConfigV1CsharpGenerationConfigSchema, H as sdkConfigV1ExactSemverSchema, I as sdkConfigV1GithubActionsSecretNameSchema, L as sdkConfigV1GoGenerationConfigSchema, N as sdkConfigV1GoModulePathSchema, O as sdkConfigV1JavaGenerationConfigSchema, V as sdkConfigV1KotlinGenerationConfigSchema, X as sdkConfigV1McpGenerationConfigSchema, Y as sdkConfigV1NonEmptyStringSchema, $ as sdkConfigV1ParentRelativePathSchema, a0 as sdkConfigV1PhpGenerationConfigSchema, a1 as sdkConfigV1PythonGenerationConfigSchema, a2 as sdkConfigV1RelativePathSchema, a3 as sdkConfigV1RubyGenerationConfigSchema, a4 as sdkConfigV1RustGenerationConfigSchema, a5 as sdkConfigV1SwiftGenerationConfigSchema, a6 as sdkConfigV1TerraformGenerationConfigSchema, a7 as sdkConfigV1TypescriptGenerationConfigSchema } from '../../typescript-ZRqfOhMd.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const sdkConfigV1AuthSchemeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -10814,6 +10814,15 @@ declare const sdkConfigV1Schema: z.ZodObject<{
|
|
|
10814
10814
|
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10815
10815
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10816
10816
|
}, z.core.$strict>>>;
|
|
10817
|
+
mergedTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
10818
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10819
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10820
|
+
dispatchOn: z.ZodString;
|
|
10821
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10822
|
+
}, z.core.$strict>>>;
|
|
10823
|
+
customTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
10824
|
+
path: z.ZodString;
|
|
10825
|
+
}, z.core.$strict>>>;
|
|
10817
10826
|
}, z.core.$strict>>;
|
|
10818
10827
|
}, z.core.$strict>, z.ZodObject<{
|
|
10819
10828
|
generatorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -22758,6 +22767,15 @@ declare const sdkConfigV1TargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
22758
22767
|
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22759
22768
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22760
22769
|
}, z.core.$strict>>>;
|
|
22770
|
+
mergedTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
22771
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22772
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22773
|
+
dispatchOn: z.ZodString;
|
|
22774
|
+
description: z.ZodOptional<z.ZodString>;
|
|
22775
|
+
}, z.core.$strict>>>;
|
|
22776
|
+
customTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
22777
|
+
path: z.ZodString;
|
|
22778
|
+
}, z.core.$strict>>>;
|
|
22761
22779
|
}, z.core.$strict>>;
|
|
22762
22780
|
}, z.core.$strict>, z.ZodObject<{
|
|
22763
22781
|
generatorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-
|
|
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,
|
|
1
|
+
import { j as JsonObject, S as SdkConfigDiagnostic } from '../../typescript-ZRqfOhMd.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, w as sdkConfigV1CliDistributionConfigSchema, x as sdkConfigV1CliDistributionGithubAppSchema, y as sdkConfigV1CliDistributionHomebrewSchema, z as sdkConfigV1CliDistributionScoopSchema, A as sdkConfigV1CliGenerationConfigSchema, B as sdkConfigV1ComposerPackageNameSchema, E as sdkConfigV1CsharpGenerationConfigSchema, H as sdkConfigV1ExactSemverSchema, I as sdkConfigV1GithubActionsSecretNameSchema, L as sdkConfigV1GoGenerationConfigSchema, N as sdkConfigV1GoModulePathSchema, O as sdkConfigV1JavaGenerationConfigSchema, V as sdkConfigV1KotlinGenerationConfigSchema, X as sdkConfigV1McpGenerationConfigSchema, Y as sdkConfigV1NonEmptyStringSchema, $ as sdkConfigV1ParentRelativePathSchema, a0 as sdkConfigV1PhpGenerationConfigSchema, a1 as sdkConfigV1PythonGenerationConfigSchema, a2 as sdkConfigV1RelativePathSchema, a3 as sdkConfigV1RubyGenerationConfigSchema, a4 as sdkConfigV1RustGenerationConfigSchema, a5 as sdkConfigV1SwiftGenerationConfigSchema, a6 as sdkConfigV1TerraformGenerationConfigSchema, a7 as sdkConfigV1TypescriptGenerationConfigSchema } from '../../typescript-ZRqfOhMd.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare const sdkConfigV1AuthSchemeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -10814,6 +10814,15 @@ declare const sdkConfigV1Schema: z.ZodObject<{
|
|
|
10814
10814
|
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10815
10815
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10816
10816
|
}, z.core.$strict>>>;
|
|
10817
|
+
mergedTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
10818
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10819
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10820
|
+
dispatchOn: z.ZodString;
|
|
10821
|
+
description: z.ZodOptional<z.ZodString>;
|
|
10822
|
+
}, z.core.$strict>>>;
|
|
10823
|
+
customTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
10824
|
+
path: z.ZodString;
|
|
10825
|
+
}, z.core.$strict>>>;
|
|
10817
10826
|
}, z.core.$strict>>;
|
|
10818
10827
|
}, z.core.$strict>, z.ZodObject<{
|
|
10819
10828
|
generatorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -22758,6 +22767,15 @@ declare const sdkConfigV1TargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
22758
22767
|
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22759
22768
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22760
22769
|
}, z.core.$strict>>>;
|
|
22770
|
+
mergedTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
22771
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22772
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22773
|
+
dispatchOn: z.ZodString;
|
|
22774
|
+
description: z.ZodOptional<z.ZodString>;
|
|
22775
|
+
}, z.core.$strict>>>;
|
|
22776
|
+
customTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
22777
|
+
path: z.ZodString;
|
|
22778
|
+
}, z.core.$strict>>>;
|
|
22761
22779
|
}, z.core.$strict>>;
|
|
22762
22780
|
}, z.core.$strict>, z.ZodObject<{
|
|
22763
22781
|
generatorVersion: z.ZodOptional<z.ZodString>;
|
|
@@ -694,6 +694,121 @@ var docsConfigSchema = z.strictObject({
|
|
|
694
694
|
var sdkConfigV1ReadmeEndpointSchema = readmeEndpointSchema;
|
|
695
695
|
var sdkConfigV1ReadmeCustomSectionSchema = readmeCustomSectionSchema;
|
|
696
696
|
var sdkConfigV1DocsConfigSchema = docsConfigSchema;
|
|
697
|
+
var compilerOptionsSchema = z.strictObject({
|
|
698
|
+
target: nonEmptyStringSchema.optional().describe("The JavaScript language target passed to TypeScript."),
|
|
699
|
+
module: nonEmptyStringSchema.optional().describe("The module format passed to TypeScript."),
|
|
700
|
+
lib: z.array(nonEmptyStringSchema).optional().describe("The runtime library definitions passed to TypeScript.")
|
|
701
|
+
});
|
|
702
|
+
var packageScriptSchema = z.strictObject({
|
|
703
|
+
name: nonEmptyStringSchema.describe("The package script name."),
|
|
704
|
+
command: nonEmptyStringSchema.describe("The command executed by the package script.")
|
|
705
|
+
});
|
|
706
|
+
var httpClientSchema = z.strictObject({
|
|
707
|
+
name: z.enum(["axios", "fetch", "node-fetch"]).describe("The HTTP client used by generated TypeScript code.")
|
|
708
|
+
});
|
|
709
|
+
var typescriptGenerationConfigSchema = z.strictObject({
|
|
710
|
+
typescriptVersion: nonEmptyStringSchema.optional().describe("The TypeScript version used by the generated project."),
|
|
711
|
+
zodVersion: nonEmptyStringSchema.optional().describe("The Zod version used by generated runtime schemas."),
|
|
712
|
+
compilerOptions: compilerOptionsSchema.optional().describe("TypeScript compiler options for the generated project."),
|
|
713
|
+
httpClient: httpClientSchema.optional().describe("The HTTP client used by generated TypeScript code."),
|
|
714
|
+
packageManager: z.enum(["pnpm", "yarn"]).optional().describe("The package manager used by the generated project."),
|
|
715
|
+
packageManagerVersion: nonEmptyStringSchema.optional().describe("The package manager version used by the generated project."),
|
|
716
|
+
testFramework: z.enum(["jest", "vitest"]).optional().describe("The test framework used by generated tests."),
|
|
717
|
+
namingStrategy: z.enum(["base", "originalPropertyNames"]).optional().describe("How schema property names are converted into TypeScript identifiers."),
|
|
718
|
+
bundle: z.boolean().optional().describe("Whether the generated package includes bundled output."),
|
|
719
|
+
exportClassDefault: z.boolean().optional().describe("Whether the client class is also exported as the default export."),
|
|
720
|
+
/** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
|
|
721
|
+
namespaceExportName: nonEmptyStringSchema.optional().describe("The top-level namespace export name."),
|
|
722
|
+
consolidateTypeFiles: z.boolean().optional().describe("Whether generated types are consolidated into fewer source files."),
|
|
723
|
+
formDataSupport: z.enum(["Node16", "Node18"]).optional().describe(
|
|
724
|
+
"The multipart form-data implementation: Node16 uses the form-data packages, Node18 uses the platform FormData."
|
|
725
|
+
),
|
|
726
|
+
allowExtraFields: z.boolean().optional().describe(
|
|
727
|
+
"Whether response parsing keeps unrecognized object keys and accepts unrecognized union members and enum values."
|
|
728
|
+
),
|
|
729
|
+
generateSubpackageExports: z.boolean().optional().describe(
|
|
730
|
+
"Whether the package manifest exports each subpackage client as its own entry point."
|
|
731
|
+
),
|
|
732
|
+
exportAllRequestsAtRoot: z.boolean().optional().describe("Whether every request type is also exported from the package root."),
|
|
733
|
+
generateEndpointMetadata: z.boolean().optional().describe("Whether generated clients expose metadata for each endpoint."),
|
|
734
|
+
outputEsm: z.boolean().optional().describe(
|
|
735
|
+
"Whether the package is marked as an ES module while still shipping its CommonJS build."
|
|
736
|
+
),
|
|
737
|
+
neverThrowErrors: z.boolean().optional().describe(
|
|
738
|
+
"Whether client methods return a wrapped response instead of throwing on a non-2xx status."
|
|
739
|
+
),
|
|
740
|
+
includeOtherInUnionTypes: z.boolean().optional().describe("Whether union types gain a member for variants the SDK does not recognize."),
|
|
741
|
+
includeUtilsOnUnionMembers: z.boolean().optional().describe("Whether helper utilities are generated on each member of a union type."),
|
|
742
|
+
omitFernHeaders: z.boolean().optional().describe("Whether requests omit the SDK identification headers and the User-Agent header."),
|
|
743
|
+
linter: z.enum(["biome", "oxlint", "none"]).optional().describe("The linter configured in the generated project."),
|
|
744
|
+
formatter: z.enum(["prettier", "biome", "oxfmt", "none"]).optional().describe("The formatter configured in the generated project."),
|
|
745
|
+
exports: jsonObjectSchema.optional().describe(
|
|
746
|
+
"package.json exports entries, keyed by subpath, applied over the generated exports. Each subpath replaces the generated one."
|
|
747
|
+
),
|
|
748
|
+
files: z.array(nonEmptyStringSchema).optional().describe("package.json files entries, listed ahead of the generated ones."),
|
|
749
|
+
engines: z.record(nonEmptyStringSchema, nonEmptyStringSchema).optional().describe("package.json engines version ranges, keyed by engine name such as node."),
|
|
750
|
+
lintStaged: z.record(nonEmptyStringSchema, z.array(nonEmptyStringSchema).min(1)).optional().describe("lint-staged commands to run, keyed by file glob."),
|
|
751
|
+
browser: z.record(nonEmptyStringSchema, z.union([z.boolean(), nonEmptyStringSchema])).optional().describe(
|
|
752
|
+
"package.json browser field: a module or file is excluded (false) or replaced by another path."
|
|
753
|
+
),
|
|
754
|
+
allowCustomFetcher: z.boolean().optional().describe("Whether callers can supply a custom fetch implementation."),
|
|
755
|
+
useBrandedStringAliases: z.boolean().optional().describe("Whether string aliases are emitted as distinct branded types."),
|
|
756
|
+
useLegacyExports: z.boolean().optional().describe("Whether the package emits the legacy export layout."),
|
|
757
|
+
useBigInt: z.boolean().optional().describe("Whether 64-bit integer values are represented with bigint."),
|
|
758
|
+
serdeLayer: z.boolean().optional().describe("Whether generated models use Fern serialization and deserialization helpers."),
|
|
759
|
+
/** Ship only the ESM build (drops CJS) to avoid the Node dual-package hazard. */
|
|
760
|
+
esmOnly: z.boolean().optional().describe("Whether the package emits only ECMAScript modules."),
|
|
761
|
+
scripts: z.array(packageScriptSchema).optional().describe("Additional scripts added to the generated package manifest.")
|
|
762
|
+
});
|
|
763
|
+
|
|
764
|
+
// src/sdk-config-domain/v1/language/mcp.ts
|
|
765
|
+
var mcpAvailabilityStatuses = [
|
|
766
|
+
"IN_DEVELOPMENT",
|
|
767
|
+
"PRE_RELEASE",
|
|
768
|
+
"GENERAL_AVAILABILITY",
|
|
769
|
+
"DEPRECATED",
|
|
770
|
+
"ALPHA",
|
|
771
|
+
"BETA",
|
|
772
|
+
"PREVIEW",
|
|
773
|
+
"LEGACY"
|
|
774
|
+
];
|
|
775
|
+
var mcpToolFilterSchema = z.strictObject({
|
|
776
|
+
include: z.array(nonEmptyStringSchema).optional().describe("Operations explicitly included as MCP tools."),
|
|
777
|
+
exclude: z.array(nonEmptyStringSchema).optional().describe("Operations explicitly excluded from MCP tools.")
|
|
778
|
+
});
|
|
779
|
+
var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
|
|
780
|
+
(name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
|
|
781
|
+
'toolset names must match [a-z0-9-]+ and cannot be "default"'
|
|
782
|
+
);
|
|
783
|
+
var MCP_TOOL_NAME_PATTERN = /^[a-zA-Z0-9_-]{1,64}$/;
|
|
784
|
+
var mcpToolNameSchema = nonEmptyStringSchema.refine(
|
|
785
|
+
(name) => MCP_TOOL_NAME_PATTERN.test(name),
|
|
786
|
+
"tool names must match [a-zA-Z0-9_-]{1,64}"
|
|
787
|
+
);
|
|
788
|
+
var mcpMergedToolSchema = mcpToolFilterSchema.extend({
|
|
789
|
+
dispatchOn: nonEmptyStringSchema.describe(
|
|
790
|
+
"The tool argument whose value selects which member operation to call."
|
|
791
|
+
),
|
|
792
|
+
description: nonEmptyStringSchema.optional().describe("Overrides the generated description of the merged tool.")
|
|
793
|
+
});
|
|
794
|
+
var mcpCustomToolSchema = z.strictObject({
|
|
795
|
+
path: relativePathSchema.describe(
|
|
796
|
+
"Path to a TypeScript module that exports the tool `definition` and `handler`."
|
|
797
|
+
)
|
|
798
|
+
});
|
|
799
|
+
var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
|
|
800
|
+
serverName: nonEmptyStringSchema.optional().describe("The name advertised by the generated MCP server."),
|
|
801
|
+
serverDescription: nonEmptyStringSchema.optional().describe("The description advertised by the generated MCP server."),
|
|
802
|
+
excludeAvailability: z.array(z.enum(mcpAvailabilityStatuses)).optional().describe("Operation availability statuses excluded from MCP tool generation."),
|
|
803
|
+
tools: mcpToolFilterSchema.optional().describe("Global operation filters for generated MCP tools."),
|
|
804
|
+
toolsets: z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional().describe("Named MCP toolsets and the operation filters for each toolset."),
|
|
805
|
+
mergedTools: z.record(mcpToolNameSchema, mcpMergedToolSchema).optional().describe(
|
|
806
|
+
"Tools that fan several operations into one, dispatching on an argument. Each entry selects its member operations with the same include/exclude filter as `tools`."
|
|
807
|
+
),
|
|
808
|
+
customTools: z.record(mcpToolNameSchema, mcpCustomToolSchema).optional().describe(
|
|
809
|
+
"Hand-written tools, keyed by tool name, each pointing at a TypeScript module that exports its `definition` and `handler`. Emitted alongside the operation-derived tools."
|
|
810
|
+
)
|
|
811
|
+
});
|
|
697
812
|
|
|
698
813
|
// src/sdk-config/v1/fern-config-mapper-types.ts
|
|
699
814
|
var FernConfigMappingError = class extends Error {
|
|
@@ -2799,99 +2914,6 @@ var javaGenerationConfigSchema = jvmGenerationConfigSchema.extend({
|
|
|
2799
2914
|
|
|
2800
2915
|
// src/sdk-config-domain/v1/language/kotlin.ts
|
|
2801
2916
|
var kotlinGenerationConfigSchema = jvmGenerationConfigSchema;
|
|
2802
|
-
var compilerOptionsSchema = z.strictObject({
|
|
2803
|
-
target: nonEmptyStringSchema.optional().describe("The JavaScript language target passed to TypeScript."),
|
|
2804
|
-
module: nonEmptyStringSchema.optional().describe("The module format passed to TypeScript."),
|
|
2805
|
-
lib: z.array(nonEmptyStringSchema).optional().describe("The runtime library definitions passed to TypeScript.")
|
|
2806
|
-
});
|
|
2807
|
-
var packageScriptSchema = z.strictObject({
|
|
2808
|
-
name: nonEmptyStringSchema.describe("The package script name."),
|
|
2809
|
-
command: nonEmptyStringSchema.describe("The command executed by the package script.")
|
|
2810
|
-
});
|
|
2811
|
-
var httpClientSchema = z.strictObject({
|
|
2812
|
-
name: z.enum(["axios", "fetch", "node-fetch"]).describe("The HTTP client used by generated TypeScript code.")
|
|
2813
|
-
});
|
|
2814
|
-
var typescriptGenerationConfigSchema = z.strictObject({
|
|
2815
|
-
typescriptVersion: nonEmptyStringSchema.optional().describe("The TypeScript version used by the generated project."),
|
|
2816
|
-
zodVersion: nonEmptyStringSchema.optional().describe("The Zod version used by generated runtime schemas."),
|
|
2817
|
-
compilerOptions: compilerOptionsSchema.optional().describe("TypeScript compiler options for the generated project."),
|
|
2818
|
-
httpClient: httpClientSchema.optional().describe("The HTTP client used by generated TypeScript code."),
|
|
2819
|
-
packageManager: z.enum(["pnpm", "yarn"]).optional().describe("The package manager used by the generated project."),
|
|
2820
|
-
packageManagerVersion: nonEmptyStringSchema.optional().describe("The package manager version used by the generated project."),
|
|
2821
|
-
testFramework: z.enum(["jest", "vitest"]).optional().describe("The test framework used by generated tests."),
|
|
2822
|
-
namingStrategy: z.enum(["base", "originalPropertyNames"]).optional().describe("How schema property names are converted into TypeScript identifiers."),
|
|
2823
|
-
bundle: z.boolean().optional().describe("Whether the generated package includes bundled output."),
|
|
2824
|
-
exportClassDefault: z.boolean().optional().describe("Whether the client class is also exported as the default export."),
|
|
2825
|
-
/** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
|
|
2826
|
-
namespaceExportName: nonEmptyStringSchema.optional().describe("The top-level namespace export name."),
|
|
2827
|
-
consolidateTypeFiles: z.boolean().optional().describe("Whether generated types are consolidated into fewer source files."),
|
|
2828
|
-
formDataSupport: z.enum(["Node16", "Node18"]).optional().describe(
|
|
2829
|
-
"The multipart form-data implementation: Node16 uses the form-data packages, Node18 uses the platform FormData."
|
|
2830
|
-
),
|
|
2831
|
-
allowExtraFields: z.boolean().optional().describe(
|
|
2832
|
-
"Whether response parsing keeps unrecognized object keys and accepts unrecognized union members and enum values."
|
|
2833
|
-
),
|
|
2834
|
-
generateSubpackageExports: z.boolean().optional().describe(
|
|
2835
|
-
"Whether the package manifest exports each subpackage client as its own entry point."
|
|
2836
|
-
),
|
|
2837
|
-
exportAllRequestsAtRoot: z.boolean().optional().describe("Whether every request type is also exported from the package root."),
|
|
2838
|
-
generateEndpointMetadata: z.boolean().optional().describe("Whether generated clients expose metadata for each endpoint."),
|
|
2839
|
-
outputEsm: z.boolean().optional().describe(
|
|
2840
|
-
"Whether the package is marked as an ES module while still shipping its CommonJS build."
|
|
2841
|
-
),
|
|
2842
|
-
neverThrowErrors: z.boolean().optional().describe(
|
|
2843
|
-
"Whether client methods return a wrapped response instead of throwing on a non-2xx status."
|
|
2844
|
-
),
|
|
2845
|
-
includeOtherInUnionTypes: z.boolean().optional().describe("Whether union types gain a member for variants the SDK does not recognize."),
|
|
2846
|
-
includeUtilsOnUnionMembers: z.boolean().optional().describe("Whether helper utilities are generated on each member of a union type."),
|
|
2847
|
-
omitFernHeaders: z.boolean().optional().describe("Whether requests omit the SDK identification headers and the User-Agent header."),
|
|
2848
|
-
linter: z.enum(["biome", "oxlint", "none"]).optional().describe("The linter configured in the generated project."),
|
|
2849
|
-
formatter: z.enum(["prettier", "biome", "oxfmt", "none"]).optional().describe("The formatter configured in the generated project."),
|
|
2850
|
-
exports: jsonObjectSchema.optional().describe(
|
|
2851
|
-
"package.json exports entries, keyed by subpath, applied over the generated exports. Each subpath replaces the generated one."
|
|
2852
|
-
),
|
|
2853
|
-
files: z.array(nonEmptyStringSchema).optional().describe("package.json files entries, listed ahead of the generated ones."),
|
|
2854
|
-
engines: z.record(nonEmptyStringSchema, nonEmptyStringSchema).optional().describe("package.json engines version ranges, keyed by engine name such as node."),
|
|
2855
|
-
lintStaged: z.record(nonEmptyStringSchema, z.array(nonEmptyStringSchema).min(1)).optional().describe("lint-staged commands to run, keyed by file glob."),
|
|
2856
|
-
browser: z.record(nonEmptyStringSchema, z.union([z.boolean(), nonEmptyStringSchema])).optional().describe(
|
|
2857
|
-
"package.json browser field: a module or file is excluded (false) or replaced by another path."
|
|
2858
|
-
),
|
|
2859
|
-
allowCustomFetcher: z.boolean().optional().describe("Whether callers can supply a custom fetch implementation."),
|
|
2860
|
-
useBrandedStringAliases: z.boolean().optional().describe("Whether string aliases are emitted as distinct branded types."),
|
|
2861
|
-
useLegacyExports: z.boolean().optional().describe("Whether the package emits the legacy export layout."),
|
|
2862
|
-
useBigInt: z.boolean().optional().describe("Whether 64-bit integer values are represented with bigint."),
|
|
2863
|
-
serdeLayer: z.boolean().optional().describe("Whether generated models use Fern serialization and deserialization helpers."),
|
|
2864
|
-
/** Ship only the ESM build (drops CJS) to avoid the Node dual-package hazard. */
|
|
2865
|
-
esmOnly: z.boolean().optional().describe("Whether the package emits only ECMAScript modules."),
|
|
2866
|
-
scripts: z.array(packageScriptSchema).optional().describe("Additional scripts added to the generated package manifest.")
|
|
2867
|
-
});
|
|
2868
|
-
|
|
2869
|
-
// src/sdk-config-domain/v1/language/mcp.ts
|
|
2870
|
-
var mcpAvailabilityStatuses = [
|
|
2871
|
-
"IN_DEVELOPMENT",
|
|
2872
|
-
"PRE_RELEASE",
|
|
2873
|
-
"GENERAL_AVAILABILITY",
|
|
2874
|
-
"DEPRECATED",
|
|
2875
|
-
"ALPHA",
|
|
2876
|
-
"BETA",
|
|
2877
|
-
"PREVIEW",
|
|
2878
|
-
"LEGACY"
|
|
2879
|
-
];
|
|
2880
|
-
var mcpToolFilterSchema = z.strictObject({
|
|
2881
|
-
include: z.array(nonEmptyStringSchema).optional().describe("Operations explicitly included as MCP tools."),
|
|
2882
|
-
exclude: z.array(nonEmptyStringSchema).optional().describe("Operations explicitly excluded from MCP tools.")
|
|
2883
|
-
});
|
|
2884
|
-
var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
|
|
2885
|
-
(name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
|
|
2886
|
-
'toolset names must match [a-z0-9-]+ and cannot be "default"'
|
|
2887
|
-
);
|
|
2888
|
-
var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
|
|
2889
|
-
serverName: nonEmptyStringSchema.optional().describe("The name advertised by the generated MCP server."),
|
|
2890
|
-
serverDescription: nonEmptyStringSchema.optional().describe("The description advertised by the generated MCP server."),
|
|
2891
|
-
excludeAvailability: z.array(z.enum(mcpAvailabilityStatuses)).optional().describe("Operation availability statuses excluded from MCP tool generation."),
|
|
2892
|
-
tools: mcpToolFilterSchema.optional().describe("Global operation filters for generated MCP tools."),
|
|
2893
|
-
toolsets: z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional().describe("Named MCP toolsets and the operation filters for each toolset.")
|
|
2894
|
-
});
|
|
2895
2917
|
var phpGenerationConfigSchema = z.strictObject({
|
|
2896
2918
|
propertyAccess: z.enum(["public", "private"]).optional().describe("The visibility of generated PHP model properties."),
|
|
2897
2919
|
generateClientInterfaces: z.boolean().optional().describe("Whether interfaces are generated for PHP client classes.")
|
|
@@ -4125,7 +4147,9 @@ function mapMcp(config, state, basePath) {
|
|
|
4125
4147
|
basePath
|
|
4126
4148
|
),
|
|
4127
4149
|
tools: takeToolFilter(config, ["tools"], state, basePath),
|
|
4128
|
-
toolsets: takeToolsets(config, ["toolsets"], state, basePath)
|
|
4150
|
+
toolsets: takeToolsets(config, ["toolsets"], state, basePath),
|
|
4151
|
+
mergedTools: takeMergedTools(config, ["mergedTools"], state, basePath),
|
|
4152
|
+
customTools: takeCustomTools(config, ["customTools"], state, basePath)
|
|
4129
4153
|
});
|
|
4130
4154
|
}
|
|
4131
4155
|
function mapReadme(value, language, activeLanguages, state, basePath) {
|
|
@@ -4479,6 +4503,79 @@ function takeToolsets(value, aliases, state, basePath) {
|
|
|
4479
4503
|
consume(state, located.path);
|
|
4480
4504
|
return Object.fromEntries(entries.filter((entry) => entry !== void 0));
|
|
4481
4505
|
}
|
|
4506
|
+
function takeCustomTools(value, aliases, state, basePath) {
|
|
4507
|
+
const located = takeObject(value, aliases, state, basePath);
|
|
4508
|
+
if (!located) return void 0;
|
|
4509
|
+
const entries = Object.entries(located.value).map(([name, spec]) => {
|
|
4510
|
+
if (!MCP_TOOL_NAME_PATTERN.test(name)) {
|
|
4511
|
+
fail(
|
|
4512
|
+
"FERN_MCP_CUSTOM_TOOL_NAME_INVALID",
|
|
4513
|
+
[...located.path, name],
|
|
4514
|
+
`MCP custom tool name "${name}" is not valid in SDK Config v1`,
|
|
4515
|
+
"Rename the custom tool to match [a-zA-Z0-9_-] and at most 64 characters.",
|
|
4516
|
+
["targets", basePath[2], "generation", "customTools", name]
|
|
4517
|
+
);
|
|
4518
|
+
}
|
|
4519
|
+
if (!isObject(spec) || typeof spec.path !== "string") {
|
|
4520
|
+
fail(
|
|
4521
|
+
"FERN_MCP_CUSTOM_TOOL_SPEC_INVALID",
|
|
4522
|
+
[...located.path, name],
|
|
4523
|
+
`MCP custom tool "${name}" must be an object with a string "path"`,
|
|
4524
|
+
'Give the custom tool a "path" pointing at the TypeScript module that exports its definition and handler.',
|
|
4525
|
+
["targets", basePath[2], "generation", "customTools", name]
|
|
4526
|
+
);
|
|
4527
|
+
}
|
|
4528
|
+
return [name, { path: spec.path }];
|
|
4529
|
+
});
|
|
4530
|
+
if (entries.some((entry) => !entry)) return void 0;
|
|
4531
|
+
consume(state, located.path);
|
|
4532
|
+
return Object.fromEntries(entries.filter((entry) => entry !== void 0));
|
|
4533
|
+
}
|
|
4534
|
+
function takeMergedTools(value, aliases, state, basePath) {
|
|
4535
|
+
const located = takeObject(value, aliases, state, basePath);
|
|
4536
|
+
if (!located) return void 0;
|
|
4537
|
+
const entries = Object.entries(located.value).map(([name, spec]) => {
|
|
4538
|
+
if (!MCP_TOOL_NAME_PATTERN.test(name)) {
|
|
4539
|
+
fail(
|
|
4540
|
+
"FERN_MCP_MERGED_TOOL_NAME_INVALID",
|
|
4541
|
+
[...located.path, name],
|
|
4542
|
+
`MCP merged tool name "${name}" is not valid in SDK Config v1`,
|
|
4543
|
+
"Rename the merged tool to match [a-zA-Z0-9_-] and at most 64 characters.",
|
|
4544
|
+
["targets", basePath[2], "generation", "mergedTools", name]
|
|
4545
|
+
);
|
|
4546
|
+
}
|
|
4547
|
+
if (!isObject(spec)) {
|
|
4548
|
+
fail(
|
|
4549
|
+
"FERN_MCP_MERGED_TOOL_SPEC_INVALID",
|
|
4550
|
+
[...located.path, name],
|
|
4551
|
+
`MCP merged tool "${name}" must be an object`,
|
|
4552
|
+
'Give the merged tool a "dispatchOn" argument and an include/exclude filter selecting its member operations.',
|
|
4553
|
+
["targets", basePath[2], "generation", "mergedTools", name]
|
|
4554
|
+
);
|
|
4555
|
+
}
|
|
4556
|
+
if (typeof spec.dispatchOn !== "string") {
|
|
4557
|
+
fail(
|
|
4558
|
+
"FERN_MCP_MERGED_TOOL_DISPATCH_ON_MISSING",
|
|
4559
|
+
[...located.path, name, "dispatchOn"],
|
|
4560
|
+
`MCP merged tool "${name}" is missing a string "dispatchOn"`,
|
|
4561
|
+
'Set "dispatchOn" to the tool argument whose value selects which member operation to call.',
|
|
4562
|
+
["targets", basePath[2], "generation", "mergedTools", name, "dispatchOn"]
|
|
4563
|
+
);
|
|
4564
|
+
}
|
|
4565
|
+
return [
|
|
4566
|
+
name,
|
|
4567
|
+
compact({
|
|
4568
|
+
dispatchOn: spec.dispatchOn,
|
|
4569
|
+
description: typeof spec.description === "string" ? spec.description : void 0,
|
|
4570
|
+
include: stringArrayValue(spec.include),
|
|
4571
|
+
exclude: stringArrayValue(spec.exclude)
|
|
4572
|
+
})
|
|
4573
|
+
];
|
|
4574
|
+
});
|
|
4575
|
+
if (entries.some((entry) => !entry)) return void 0;
|
|
4576
|
+
consume(state, located.path);
|
|
4577
|
+
return Object.fromEntries(entries.filter((entry) => entry !== void 0));
|
|
4578
|
+
}
|
|
4482
4579
|
|
|
4483
4580
|
export { FernConfigMappingError, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as SDK_CONFIG_V1_CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE, SDK_CONFIG_V1_SCHEMA_VERSION, getSdkConfigV1Diagnostics, mapFernConfigToSdkConfigV1, parseSdkConfigV1, parseSdkConfigV1ForConsumption, 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, splitSdkConfigV1TargetGeneration, validateSdkConfigV1 };
|
|
4484
4581
|
//# sourceMappingURL=index.js.map
|