@postman/sdk-config 0.0.4 → 0.1.1
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/README.md +124 -101
- package/dist/index.cjs +2119 -282
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2080 -283
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +2238 -0
- package/dist/sdk-config/index.cjs.map +1 -0
- package/dist/sdk-config/index.d.cts +3 -0
- package/dist/sdk-config/index.d.ts +3 -0
- package/dist/sdk-config/index.js +2196 -0
- package/dist/sdk-config/index.js.map +1 -0
- package/dist/sdk-config/v1/index.cjs +2238 -0
- package/dist/sdk-config/v1/index.cjs.map +1 -0
- package/dist/sdk-config/v1/index.d.cts +8644 -0
- package/dist/sdk-config/v1/index.d.ts +8644 -0
- package/dist/sdk-config/v1/index.js +2196 -0
- package/dist/sdk-config/v1/index.js.map +1 -0
- package/dist/sdk-config-ir/index.cjs +160 -25
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +2 -1
- package/dist/sdk-config-ir/index.d.ts +2 -1
- package/dist/sdk-config-ir/index.js +158 -26
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +160 -25
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +458 -428
- package/dist/sdk-config-ir/v1/index.d.ts +458 -428
- package/dist/sdk-config-ir/v1/index.js +158 -26
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/typescript-DK97815_.d.cts +427 -0
- package/dist/typescript-DK97815_.d.ts +427 -0
- package/package.json +16 -3
- package/src/sdk-config/v1/README.md +135 -0
- package/src/sdk-config-ir/v1/README.md +44 -26
|
@@ -7,8 +7,12 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
7
7
|
|
|
8
8
|
var semver__default = /*#__PURE__*/_interopDefault(semver);
|
|
9
9
|
|
|
10
|
-
// src/sdk-config-
|
|
10
|
+
// src/sdk-config-domain/v1/api.ts
|
|
11
11
|
var nonEmptyStringSchema = zod.z.string().min(1);
|
|
12
|
+
var relativePathSchema = nonEmptyStringSchema.refine(
|
|
13
|
+
(value) => !/^(?:[\\/]|[A-Za-z]:)/.test(value) && !value.split(/[\\/]/).some((segment) => segment === ".."),
|
|
14
|
+
{ message: "must be a relative path without parent directory segments" }
|
|
15
|
+
);
|
|
12
16
|
var exactSemverSchema = zod.z.string().refine(
|
|
13
17
|
(value) => {
|
|
14
18
|
if (value.trim() !== value || !/^\d/.test(value)) {
|
|
@@ -31,7 +35,7 @@ var jsonValueSchema = zod.z.lazy(
|
|
|
31
35
|
);
|
|
32
36
|
var jsonObjectSchema = zod.z.record(zod.z.string(), jsonValueSchema);
|
|
33
37
|
|
|
34
|
-
// src/sdk-config-
|
|
38
|
+
// src/sdk-config-domain/v1/api.ts
|
|
35
39
|
var authVariableSchema = zod.z.strictObject({
|
|
36
40
|
name: nonEmptyStringSchema.optional(),
|
|
37
41
|
environmentVariable: nonEmptyStringSchema.optional(),
|
|
@@ -181,7 +185,14 @@ var apiConfigSchema = zod.z.strictObject({
|
|
|
181
185
|
environmentVariables: zod.z.array(environmentVariableSchema).default([]),
|
|
182
186
|
defaultEnvironment: nonEmptyStringSchema.optional(),
|
|
183
187
|
auth: authConfigSchema.optional(),
|
|
184
|
-
headers: zod.z.array(headerSchema).optional()
|
|
188
|
+
headers: zod.z.array(headerSchema).optional(),
|
|
189
|
+
/**
|
|
190
|
+
* Selects the named `x-fern-audiences`.
|
|
191
|
+
*
|
|
192
|
+
* Absent means all audiences. A present empty array selects no tagged audience: untagged nodes
|
|
193
|
+
* remain included, while every audience-tagged node is excluded.
|
|
194
|
+
*/
|
|
195
|
+
audiences: zod.z.array(nonEmptyStringSchema).optional()
|
|
185
196
|
});
|
|
186
197
|
var retryConfigSchema = zod.z.strictObject({
|
|
187
198
|
enabled: zod.z.boolean().default(true),
|
|
@@ -235,6 +246,7 @@ var clientConfigSchema = zod.z.strictObject({
|
|
|
235
246
|
pathParameterStyle: parameterStyleSchema.optional(),
|
|
236
247
|
filePropertyStyle: parameterStyleSchema.optional(),
|
|
237
248
|
useDefaultRequestParameterValues: zod.z.boolean().optional(),
|
|
249
|
+
respectOptionalRequestBody: zod.z.boolean().optional(),
|
|
238
250
|
tokenRefresh: tokenRefreshConfigSchema.optional()
|
|
239
251
|
});
|
|
240
252
|
var unsupportedFieldSchema = zod.z.strictObject({
|
|
@@ -280,12 +292,17 @@ var readmeEndpointSchema = zod.z.strictObject({
|
|
|
280
292
|
path: nonEmptyStringSchema,
|
|
281
293
|
stream: zod.z.boolean().optional()
|
|
282
294
|
});
|
|
295
|
+
var readmeCustomSectionSchema = zod.z.strictObject({
|
|
296
|
+
title: nonEmptyStringSchema,
|
|
297
|
+
content: zod.z.string()
|
|
298
|
+
});
|
|
283
299
|
var readmeConfigSchema = zod.z.strictObject({
|
|
284
300
|
apiName: nonEmptyStringSchema.optional(),
|
|
285
301
|
introduction: zod.z.string().optional(),
|
|
286
302
|
apiReferenceLink: nonEmptyStringSchema.optional(),
|
|
287
303
|
bannerLink: nonEmptyStringSchema.optional(),
|
|
288
304
|
disabledSections: zod.z.array(nonEmptyStringSchema).optional(),
|
|
305
|
+
customSections: zod.z.array(readmeCustomSectionSchema).optional(),
|
|
289
306
|
defaultEndpoint: readmeEndpointSchema.optional(),
|
|
290
307
|
features: zod.z.record(zod.z.string(), zod.z.array(readmeEndpointSchema)).optional()
|
|
291
308
|
});
|
|
@@ -309,10 +326,15 @@ var csharpGenerationConfigSchema = zod.z.strictObject({
|
|
|
309
326
|
simplifyObjectDictionaries: zod.z.boolean().optional(),
|
|
310
327
|
explicitNamespaces: zod.z.boolean().optional(),
|
|
311
328
|
rootNamespaceForCoreClasses: zod.z.boolean().optional(),
|
|
312
|
-
includeExceptionHandler: zod.z.boolean().optional()
|
|
329
|
+
includeExceptionHandler: zod.z.boolean().optional(),
|
|
330
|
+
experimentalExplicitNullableOptional: zod.z.boolean().optional()
|
|
313
331
|
});
|
|
314
332
|
var goGenerationConfigSchema = zod.z.strictObject({
|
|
315
333
|
legacyComplexModels: zod.z.boolean().optional(),
|
|
334
|
+
/** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
|
|
335
|
+
smartCasing: zod.z.boolean().optional(),
|
|
336
|
+
/** Overrides the fern root-client constructor independently from the client type name. */
|
|
337
|
+
clientConstructorName: nonEmptyStringSchema.optional(),
|
|
316
338
|
unionVersion: zod.z.enum(["v0", "v1"]).optional(),
|
|
317
339
|
includeLegacyClientOptions: zod.z.boolean().optional()
|
|
318
340
|
});
|
|
@@ -322,15 +344,17 @@ var jvmGenerationConfigSchema = zod.z.strictObject({
|
|
|
322
344
|
collapseOptionalNullable: zod.z.boolean().optional(),
|
|
323
345
|
gradleDistributionUrl: zod.z.string().min(1).optional(),
|
|
324
346
|
gradlePluginManagement: zod.z.string().optional(),
|
|
325
|
-
gradleCentralDependencyManagement: zod.z.boolean().optional()
|
|
347
|
+
gradleCentralDependencyManagement: zod.z.boolean().optional(),
|
|
348
|
+
/** Selects co-located async methods or a separate async client surface. */
|
|
349
|
+
asyncStyle: zod.z.enum(["dedicated-client", "twin-methods"]).optional()
|
|
326
350
|
});
|
|
327
351
|
|
|
328
|
-
// src/sdk-config-
|
|
352
|
+
// src/sdk-config-domain/v1/language/java.ts
|
|
329
353
|
var javaGenerationConfigSchema = jvmGenerationConfigSchema.extend({
|
|
330
354
|
includeKotlinSnippets: zod.z.boolean().optional()
|
|
331
355
|
});
|
|
332
356
|
|
|
333
|
-
// src/sdk-config-
|
|
357
|
+
// src/sdk-config-domain/v1/language/kotlin.ts
|
|
334
358
|
var kotlinGenerationConfigSchema = jvmGenerationConfigSchema;
|
|
335
359
|
var compilerOptionsSchema = zod.z.strictObject({
|
|
336
360
|
target: nonEmptyStringSchema.optional(),
|
|
@@ -362,8 +386,32 @@ var typescriptGenerationConfigSchema = zod.z.strictObject({
|
|
|
362
386
|
scripts: zod.z.array(packageScriptSchema).optional()
|
|
363
387
|
});
|
|
364
388
|
|
|
365
|
-
// src/sdk-config-
|
|
366
|
-
var
|
|
389
|
+
// src/sdk-config-domain/v1/language/mcp.ts
|
|
390
|
+
var mcpAvailabilityStatuses = [
|
|
391
|
+
"IN_DEVELOPMENT",
|
|
392
|
+
"PRE_RELEASE",
|
|
393
|
+
"GENERAL_AVAILABILITY",
|
|
394
|
+
"DEPRECATED",
|
|
395
|
+
"ALPHA",
|
|
396
|
+
"BETA",
|
|
397
|
+
"PREVIEW",
|
|
398
|
+
"LEGACY"
|
|
399
|
+
];
|
|
400
|
+
var mcpToolFilterSchema = zod.z.strictObject({
|
|
401
|
+
include: zod.z.array(nonEmptyStringSchema).optional(),
|
|
402
|
+
exclude: zod.z.array(nonEmptyStringSchema).optional()
|
|
403
|
+
});
|
|
404
|
+
var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
|
|
405
|
+
(name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
|
|
406
|
+
'toolset names must match [a-z0-9-]+ and cannot be "default"'
|
|
407
|
+
);
|
|
408
|
+
var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
|
|
409
|
+
serverName: nonEmptyStringSchema.optional(),
|
|
410
|
+
serverDescription: nonEmptyStringSchema.optional(),
|
|
411
|
+
excludeAvailability: zod.z.array(zod.z.enum(mcpAvailabilityStatuses)).optional(),
|
|
412
|
+
tools: mcpToolFilterSchema.optional(),
|
|
413
|
+
toolsets: zod.z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional()
|
|
414
|
+
});
|
|
367
415
|
var phpGenerationConfigSchema = zod.z.strictObject({
|
|
368
416
|
propertyAccess: zod.z.enum(["public", "private"]).optional(),
|
|
369
417
|
generateClientInterfaces: zod.z.boolean().optional()
|
|
@@ -404,9 +452,10 @@ var rustGenerationConfigSchema = zod.z.strictObject({
|
|
|
404
452
|
defaultFeatures: zod.z.array(nonEmptyStringSchema).optional()
|
|
405
453
|
});
|
|
406
454
|
var swiftGenerationConfigSchema = zod.z.strictObject({
|
|
407
|
-
moduleName: nonEmptyStringSchema.optional()
|
|
455
|
+
moduleName: nonEmptyStringSchema.optional(),
|
|
456
|
+
nullableAsOptional: zod.z.boolean().optional()
|
|
408
457
|
});
|
|
409
|
-
var goModulePathSchema =
|
|
458
|
+
var goModulePathSchema = relativePathSchema.regex(
|
|
410
459
|
/^(?!.*(?:^|\/)\.{1,2}(?:\/|$))[A-Za-z0-9._~-]+(?:\/[A-Za-z0-9._~-]+)+$/,
|
|
411
460
|
"Go module path must be a slash-delimited path using letters, numbers, dots, dashes, underscores, or tildes"
|
|
412
461
|
);
|
|
@@ -485,7 +534,7 @@ var packageConfigSchema = zod.z.strictObject({
|
|
|
485
534
|
extraPeerDependencies: zod.z.array(dependencySchema).optional()
|
|
486
535
|
});
|
|
487
536
|
|
|
488
|
-
// src/sdk-config-
|
|
537
|
+
// src/sdk-config-domain/v1/language/terraform.ts
|
|
489
538
|
var planModifierSourceSchema = zod.z.discriminatedUnion("enabled", [
|
|
490
539
|
zod.z.strictObject({ enabled: zod.z.literal(true), sourceDir: nonEmptyStringSchema }),
|
|
491
540
|
zod.z.strictObject({ enabled: zod.z.literal(false) })
|
|
@@ -509,10 +558,11 @@ var terraformGenerationConfigSchema = zod.z.strictObject({
|
|
|
509
558
|
});
|
|
510
559
|
|
|
511
560
|
// src/sdk-config-ir/v1/generation.ts
|
|
512
|
-
var generationAssetSchema = zod.z.
|
|
513
|
-
type: zod.z.
|
|
514
|
-
location: nonEmptyStringSchema
|
|
515
|
-
})
|
|
561
|
+
var generationAssetSchema = zod.z.discriminatedUnion("type", [
|
|
562
|
+
zod.z.strictObject({ type: zod.z.literal("path"), location: relativePathSchema }),
|
|
563
|
+
zod.z.strictObject({ type: zod.z.literal("url"), location: nonEmptyStringSchema }),
|
|
564
|
+
zod.z.strictObject({ type: zod.z.literal("artifact"), location: nonEmptyStringSchema })
|
|
565
|
+
]);
|
|
516
566
|
var hookDependencySchema = zod.z.strictObject({
|
|
517
567
|
name: nonEmptyStringSchema,
|
|
518
568
|
version: nonEmptyStringSchema,
|
|
@@ -532,7 +582,7 @@ var customCodeConfigSchema = zod.z.strictObject({
|
|
|
532
582
|
protectedFiles: zod.z.array(nonEmptyStringSchema).optional()
|
|
533
583
|
});
|
|
534
584
|
var workflowConfigSchema = zod.z.strictObject({
|
|
535
|
-
path:
|
|
585
|
+
path: relativePathSchema,
|
|
536
586
|
outputName: nonEmptyStringSchema.optional()
|
|
537
587
|
});
|
|
538
588
|
var analyticsHeaderSchema = zod.z.union([
|
|
@@ -567,6 +617,11 @@ var unitTestsSchema = zod.z.strictObject({
|
|
|
567
617
|
mode: zod.z.enum(["core-runtime", "schema-driven", "both"]).optional(),
|
|
568
618
|
exclusions: zod.z.array(nonEmptyStringSchema).optional()
|
|
569
619
|
});
|
|
620
|
+
var fernDefinitionMetadataSchema = zod.z.strictObject({
|
|
621
|
+
definitionS3DownloadUrl: nonEmptyStringSchema,
|
|
622
|
+
outputPath: nonEmptyStringSchema.optional(),
|
|
623
|
+
cliVersion: nonEmptyStringSchema.optional()
|
|
624
|
+
});
|
|
570
625
|
var streamsSchema = zod.z.strictObject({
|
|
571
626
|
enabled: zod.z.boolean(),
|
|
572
627
|
responseType: zod.z.enum(["wrapper", "native", "web"]).optional(),
|
|
@@ -618,11 +673,22 @@ var generationConfigSchema = zod.z.strictObject({
|
|
|
618
673
|
devContainer: zod.z.boolean().default(false),
|
|
619
674
|
allowMockClient: zod.z.boolean().default(false),
|
|
620
675
|
ignoreFiles: zod.z.array(nonEmptyStringSchema).optional(),
|
|
676
|
+
/**
|
|
677
|
+
* Raw .fernignore file contents supplied to external publishers that need Fern ignore semantics.
|
|
678
|
+
* This is separate from generation.ignoreFiles because raw contents preserve comments, ordering,
|
|
679
|
+
* blank lines, and negation rules.
|
|
680
|
+
*/
|
|
681
|
+
fernignoreContents: zod.z.string().optional(),
|
|
682
|
+
/**
|
|
683
|
+
* Optional Fern definition metadata for publisher paths that need to write definition or
|
|
684
|
+
* mock-server support files. This is not required for core GitHub artifact publishing.
|
|
685
|
+
*/
|
|
686
|
+
fernDefinitionMetadata: fernDefinitionMetadataSchema.optional(),
|
|
621
687
|
reservedKeywords: zod.z.array(nonEmptyStringSchema).optional(),
|
|
622
688
|
hooks: hooksConfigSchema.optional(),
|
|
623
689
|
customCode: customCodeConfigSchema.optional(),
|
|
624
690
|
workflows: zod.z.array(workflowConfigSchema).optional(),
|
|
625
|
-
customQueryPaths: zod.z.array(
|
|
691
|
+
customQueryPaths: zod.z.array(relativePathSchema).optional(),
|
|
626
692
|
analytics: analyticsConfigSchema.optional(),
|
|
627
693
|
wireTests: wireTestsSchema.optional(),
|
|
628
694
|
unitTests: unitTestsSchema.optional(),
|
|
@@ -643,8 +709,17 @@ var publishRegistrySchema = zod.z.enum([
|
|
|
643
709
|
"go",
|
|
644
710
|
"composer"
|
|
645
711
|
]);
|
|
712
|
+
var credentialResolutionSchema = zod.z.enum([
|
|
713
|
+
"refs-only",
|
|
714
|
+
"resolved-by-orchestrator",
|
|
715
|
+
"resolved-by-fiddle"
|
|
716
|
+
]);
|
|
646
717
|
var commonPublishShape = {
|
|
647
718
|
url: nonEmptyStringSchema.optional(),
|
|
719
|
+
/**
|
|
720
|
+
* Reference to registry publishing credentials. Raw tokens/passwords are intentionally not part of
|
|
721
|
+
* SDK Config IR; the external publisher or orchestrator resolves this reference before use.
|
|
722
|
+
*/
|
|
648
723
|
credentialsRef: nonEmptyStringSchema.optional(),
|
|
649
724
|
releaseBranch: nonEmptyStringSchema.optional(),
|
|
650
725
|
tolerateRepublish: zod.z.boolean().optional()
|
|
@@ -659,6 +734,10 @@ var publishConfigSchema = zod.z.discriminatedUnion("registry", [
|
|
|
659
734
|
zod.z.strictObject({ registry: zod.z.literal("composer"), ...commonPublishShape }),
|
|
660
735
|
zod.z.strictObject({
|
|
661
736
|
registry: zod.z.literal("maven"),
|
|
737
|
+
/**
|
|
738
|
+
* Reference to Maven signing credentials. Raw signing keys are intentionally not part of SDK
|
|
739
|
+
* Config IR; the external publisher or orchestrator resolves this reference before use.
|
|
740
|
+
*/
|
|
662
741
|
signingCredentialsRef: nonEmptyStringSchema.optional(),
|
|
663
742
|
...commonPublishShape
|
|
664
743
|
})
|
|
@@ -667,29 +746,54 @@ var reviewersSchema = zod.z.strictObject({
|
|
|
667
746
|
teams: zod.z.array(nonEmptyStringSchema).optional(),
|
|
668
747
|
users: zod.z.array(nonEmptyStringSchema).optional()
|
|
669
748
|
});
|
|
749
|
+
var replayControlSchema = zod.z.strictObject({
|
|
750
|
+
enabled: zod.z.boolean()
|
|
751
|
+
});
|
|
670
752
|
var githubOutputSchema = zod.z.strictObject({
|
|
671
753
|
repository: nonEmptyStringSchema,
|
|
672
754
|
host: nonEmptyStringSchema.optional(),
|
|
673
755
|
branch: nonEmptyStringSchema.optional(),
|
|
674
756
|
mode: zod.z.enum(["release", "pull-request", "push"]).optional(),
|
|
675
757
|
reviewers: reviewersSchema.optional(),
|
|
758
|
+
/**
|
|
759
|
+
* Reference to GitHub credentials. Raw tokens are intentionally not part of SDK Config IR; the
|
|
760
|
+
* external publisher or orchestrator resolves this reference before use.
|
|
761
|
+
*/
|
|
676
762
|
credentialsRef: nonEmptyStringSchema.optional(),
|
|
677
|
-
privateRepository: zod.z.boolean().optional()
|
|
678
|
-
|
|
763
|
+
privateRepository: zod.z.boolean().optional(),
|
|
764
|
+
/** GitHub replay control. If omitted, the external publisher applies its default behavior. */
|
|
765
|
+
replay: replayControlSchema.optional(),
|
|
766
|
+
/** Run GitHub publishing verification. Defaults to false to match current Fiddle job behavior. */
|
|
767
|
+
verify: zod.z.boolean().default(false),
|
|
768
|
+
/** Skip creating/updating a GitHub PR when no files changed. Defaults to false. */
|
|
769
|
+
skipIfNoDiff: zod.z.boolean().default(false),
|
|
770
|
+
/** Automatically merge the GitHub publishing PR. Defaults to false. */
|
|
771
|
+
autoMerge: zod.z.boolean().default(false)
|
|
772
|
+
});
|
|
773
|
+
var credentialResolutionShape = {
|
|
774
|
+
/**
|
|
775
|
+
* Where output credential references are resolved. SDK Config IR carries refs only; raw resolved
|
|
776
|
+
* credentials belong at the external publisher/orchestrator boundary, not in this config.
|
|
777
|
+
*/
|
|
778
|
+
credentialResolution: credentialResolutionSchema.default("refs-only")
|
|
779
|
+
};
|
|
679
780
|
var filesOutputSchema = zod.z.strictObject({
|
|
680
781
|
delivery: zod.z.literal("files"),
|
|
681
782
|
path: nonEmptyStringSchema.optional(),
|
|
682
|
-
publish: publishConfigSchema.optional()
|
|
783
|
+
publish: publishConfigSchema.optional(),
|
|
784
|
+
...credentialResolutionShape
|
|
683
785
|
});
|
|
684
786
|
var zipOutputSchema = zod.z.strictObject({
|
|
685
787
|
delivery: zod.z.literal("zip"),
|
|
686
788
|
fileName: nonEmptyStringSchema.optional(),
|
|
687
|
-
publish: publishConfigSchema.optional()
|
|
789
|
+
publish: publishConfigSchema.optional(),
|
|
790
|
+
...credentialResolutionShape
|
|
688
791
|
});
|
|
689
792
|
var githubDeliverySchema = zod.z.strictObject({
|
|
690
793
|
delivery: zod.z.literal("github"),
|
|
691
794
|
github: githubOutputSchema,
|
|
692
|
-
publish: publishConfigSchema.optional()
|
|
795
|
+
publish: publishConfigSchema.optional(),
|
|
796
|
+
...credentialResolutionShape
|
|
693
797
|
});
|
|
694
798
|
var outputConfigSchema = zod.z.discriminatedUnion(
|
|
695
799
|
"delivery",
|
|
@@ -709,7 +813,8 @@ var apiImportSettingsSchema = zod.z.strictObject({
|
|
|
709
813
|
onlyIncludeReferencedSchemas: zod.z.boolean().optional(),
|
|
710
814
|
objectQueryParameters: zod.z.boolean().optional(),
|
|
711
815
|
typeDatesAsStrings: zod.z.boolean().optional(),
|
|
712
|
-
groupMultiApiEnvironments: zod.z.boolean().optional()
|
|
816
|
+
groupMultiApiEnvironments: zod.z.boolean().optional(),
|
|
817
|
+
defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional()
|
|
713
818
|
});
|
|
714
819
|
var sourceSpecTypeSchema = zod.z.enum([
|
|
715
820
|
"openapi",
|
|
@@ -766,7 +871,19 @@ var targetConfigSchema = zod.z.strictObject({
|
|
|
766
871
|
generatorVersion: exactSemverSchema.optional(),
|
|
767
872
|
sourceOrigin: zod.z.enum(["postman", "fern"]),
|
|
768
873
|
sdkName: nonEmptyStringSchema,
|
|
874
|
+
/**
|
|
875
|
+
* Stable Fern/Fiddle API identity for external publishing.
|
|
876
|
+
* Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
|
|
877
|
+
* target.sdkName because SDK display names and Fern API names are not equivalent.
|
|
878
|
+
*/
|
|
879
|
+
apiName: nonEmptyStringSchema.optional(),
|
|
769
880
|
organization: nonEmptyStringSchema.optional(),
|
|
881
|
+
/**
|
|
882
|
+
* Stable Fern/Fiddle organization identity for external publishing.
|
|
883
|
+
* Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
|
|
884
|
+
* target.organization because source organization metadata is optional and may not match Fern.
|
|
885
|
+
*/
|
|
886
|
+
organizationName: nonEmptyStringSchema.optional(),
|
|
770
887
|
sdkVersion: nonEmptyStringSchema.default("1.0.0"),
|
|
771
888
|
apiVersion: nonEmptyStringSchema.optional()
|
|
772
889
|
});
|
|
@@ -774,7 +891,7 @@ var targetConfigSchema = zod.z.strictObject({
|
|
|
774
891
|
// src/sdk-config-ir/v1/sdk-config-ir-v1.ts
|
|
775
892
|
var SDK_CONFIG_IR_V1_SCHEMA_VERSION = "sdk-config-ir/v1";
|
|
776
893
|
var publishRegistryLanguages = {
|
|
777
|
-
npm: ["typescript"],
|
|
894
|
+
npm: ["typescript", "mcp"],
|
|
778
895
|
pypi: ["python"],
|
|
779
896
|
maven: ["java", "kotlin"],
|
|
780
897
|
nuget: ["csharp"],
|
|
@@ -842,6 +959,21 @@ var sdkConfigIrV1Schema = zod.z.strictObject({
|
|
|
842
959
|
compatibility: compatibilityConfigSchema.optional()
|
|
843
960
|
}).superRefine(({ compatibility, generation, output, package: packageConfig, target }, context) => {
|
|
844
961
|
const configuredLanguages = Object.keys(generation.language ?? {});
|
|
962
|
+
const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;
|
|
963
|
+
if (requiresExternalPublishIdentity) {
|
|
964
|
+
[
|
|
965
|
+
["apiName", "target.apiName is required for external publishing"],
|
|
966
|
+
["organizationName", "target.organizationName is required for external publishing"]
|
|
967
|
+
].forEach(([field, message]) => {
|
|
968
|
+
if (!target[field]) {
|
|
969
|
+
context.addIssue({
|
|
970
|
+
code: "custom",
|
|
971
|
+
message,
|
|
972
|
+
path: ["target", field]
|
|
973
|
+
});
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
}
|
|
845
977
|
configuredLanguages.forEach((language) => {
|
|
846
978
|
if (language !== target.language) {
|
|
847
979
|
context.addIssue({
|
|
@@ -900,6 +1032,7 @@ exports.jsonValueSchema = jsonValueSchema;
|
|
|
900
1032
|
exports.kotlinGenerationConfigSchema = kotlinGenerationConfigSchema;
|
|
901
1033
|
exports.languageGenerationConfigSchema = languageGenerationConfigSchema;
|
|
902
1034
|
exports.legacyInputSchema = legacyInputSchema;
|
|
1035
|
+
exports.mcpAvailabilityStatuses = mcpAvailabilityStatuses;
|
|
903
1036
|
exports.mcpGenerationConfigSchema = mcpGenerationConfigSchema;
|
|
904
1037
|
exports.nonEmptyStringSchema = nonEmptyStringSchema;
|
|
905
1038
|
exports.outputConfigSchema = outputConfigSchema;
|
|
@@ -909,7 +1042,9 @@ exports.phpGenerationConfigSchema = phpGenerationConfigSchema;
|
|
|
909
1042
|
exports.publishConfigSchema = publishConfigSchema;
|
|
910
1043
|
exports.publishRegistrySchema = publishRegistrySchema;
|
|
911
1044
|
exports.pythonGenerationConfigSchema = pythonGenerationConfigSchema;
|
|
1045
|
+
exports.readmeCustomSectionSchema = readmeCustomSectionSchema;
|
|
912
1046
|
exports.readmeEndpointSchema = readmeEndpointSchema;
|
|
1047
|
+
exports.relativePathSchema = relativePathSchema;
|
|
913
1048
|
exports.rubyGenerationConfigSchema = rubyGenerationConfigSchema;
|
|
914
1049
|
exports.rustGenerationConfigSchema = rustGenerationConfigSchema;
|
|
915
1050
|
exports.sdkConfigIrV1Schema = sdkConfigIrV1Schema;
|