@postman/sdk-config 0.15.0 → 0.17.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 +83 -19
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +3 -3
  4. package/dist/index.d.ts +3 -3
  5. package/dist/index.js +78 -20
  6. package/dist/index.js.map +1 -1
  7. package/dist/sdk-config/index.cjs +71 -19
  8. package/dist/sdk-config/index.cjs.map +1 -1
  9. package/dist/sdk-config/index.d.cts +2 -2
  10. package/dist/sdk-config/index.d.ts +2 -2
  11. package/dist/sdk-config/index.js +68 -20
  12. package/dist/sdk-config/index.js.map +1 -1
  13. package/dist/sdk-config/v1/index.cjs +71 -19
  14. package/dist/sdk-config/v1/index.cjs.map +1 -1
  15. package/dist/sdk-config/v1/index.d.cts +230 -22
  16. package/dist/sdk-config/v1/index.d.ts +230 -22
  17. package/dist/sdk-config/v1/index.js +68 -20
  18. package/dist/sdk-config/v1/index.js.map +1 -1
  19. package/dist/sdk-config-ir/index.cjs +21 -2
  20. package/dist/sdk-config-ir/index.cjs.map +1 -1
  21. package/dist/sdk-config-ir/index.d.cts +2 -2
  22. package/dist/sdk-config-ir/index.d.ts +2 -2
  23. package/dist/sdk-config-ir/index.js +20 -3
  24. package/dist/sdk-config-ir/index.js.map +1 -1
  25. package/dist/sdk-config-ir/v1/index.cjs +21 -2
  26. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  27. package/dist/sdk-config-ir/v1/index.d.cts +34 -3
  28. package/dist/sdk-config-ir/v1/index.d.ts +34 -3
  29. package/dist/sdk-config-ir/v1/index.js +20 -3
  30. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  31. package/dist/{typescript-sGNHFomT.d.cts → typescript-D0YeGxxS.d.cts} +11 -1
  32. package/dist/{typescript-sGNHFomT.d.ts → typescript-D0YeGxxS.d.ts} +11 -1
  33. package/package.json +1 -1
  34. package/src/sdk-config/v1/README.md +31 -0
  35. package/src/sdk-config-ir/v1/README.md +7 -0
@@ -13,6 +13,10 @@ var relativePathSchema = nonEmptyStringSchema.refine(
13
13
  (value) => !/^(?:[\\/]|[A-Za-z]:)/.test(value) && !value.split(/[\\/]/).some((segment) => segment === ".."),
14
14
  { message: "must be a relative path without parent directory segments" }
15
15
  );
16
+ var parentRelativePathSchema = nonEmptyStringSchema.refine(
17
+ (value) => !/^(?:[\\/]|[A-Za-z]:)/.test(value),
18
+ { message: "must be a relative path" }
19
+ );
16
20
  var exactSemverSchema = zod.z.string().refine(
17
21
  (value) => {
18
22
  if (value.trim() !== value || !/^\d/.test(value)) {
@@ -681,7 +685,9 @@ var goGenerationConfigSchema = zod.z.strictObject({
681
685
  /** Overrides the fern root-client constructor independently from the client type name. */
682
686
  clientConstructorName: nonEmptyStringSchema.optional().describe("The generated root-client constructor name."),
683
687
  unionVersion: zod.z.enum(["v0", "v1"]).optional().describe("The representation used for generated Go unions."),
684
- includeLegacyClientOptions: zod.z.boolean().optional().describe("Whether the client retains legacy constructor option helpers.")
688
+ includeLegacyClientOptions: zod.z.boolean().optional().describe("Whether the client retains legacy constructor option helpers."),
689
+ /** `root` keeps Fern's layout; `types` moves the schema types into a `types` subpackage. */
690
+ packageLayout: zod.z.enum(["root", "types"]).optional().describe("Where the generated Go schema types are declared.")
685
691
  });
686
692
  var jvmGenerationConfigSchema = zod.z.strictObject({
687
693
  packageLayout: zod.z.enum(["flat", "nested"]).optional().describe("Whether generated JVM packages use a flat or nested resource layout."),
@@ -1353,7 +1359,8 @@ var apiImportSettingsSchema = zod.z.strictObject({
1353
1359
  ),
1354
1360
  resolveSchemaCollisions: zod.z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
1355
1361
  asyncApiMessageNaming: zod.z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
1356
- defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one.")
1362
+ defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one."),
1363
+ respectByteFormat: zod.z.boolean().optional().describe("Whether string schemas with format byte are imported as base64-encoded bytes.")
1357
1364
  });
1358
1365
  var sourceSpecTypeSchema = zod.z.enum([
1359
1366
  "openapi",
@@ -1364,6 +1371,7 @@ var sourceSpecTypeSchema = zod.z.enum([
1364
1371
  ]);
1365
1372
 
1366
1373
  // src/sdk-config-ir/v1/source.ts
1374
+ var sourceSpecOriginSchema = zod.z.enum(["protobuf"]);
1367
1375
  var sourceSpecConfigSchema = zod.z.strictObject({
1368
1376
  id: nonEmptyStringSchema.optional().describe("A unique identifier for this API source."),
1369
1377
  name: nonEmptyStringSchema.optional().describe("A human-readable name for this API source."),
@@ -1372,9 +1380,18 @@ var sourceSpecConfigSchema = zod.z.strictObject({
1372
1380
  "The materialized URL from which the generator retrieves the API source."
1373
1381
  ),
1374
1382
  specType: sourceSpecTypeSchema.describe("The API description format of this source."),
1383
+ origin: sourceSpecOriginSchema.optional().describe("The format this source was authored in before it was converted to specType."),
1375
1384
  apiImportSettings: apiImportSettingsSchema.optional().describe("Import behavior that overrides the source-level defaults for this spec."),
1376
1385
  overlays: zod.z.array(nonEmptyStringSchema).optional().describe("Materialized overlays applied to this source in order."),
1377
1386
  overrides: zod.z.array(nonEmptyStringSchema).optional().describe("Materialized source overrides applied in order.")
1387
+ }).superRefine(({ specType, origin }, context) => {
1388
+ if (origin === "protobuf" && specType !== "openapi") {
1389
+ context.addIssue({
1390
+ code: "custom",
1391
+ message: 'origin "protobuf" is only allowed on openapi specs',
1392
+ path: ["origin"]
1393
+ });
1394
+ }
1378
1395
  });
1379
1396
  var sourceConfigSchema = zod.z.strictObject({
1380
1397
  specs: zod.z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec").describe("Materialized API sources in authoritative processing order."),
@@ -1771,6 +1788,7 @@ exports.mcpGenerationConfigSchema = mcpGenerationConfigSchema;
1771
1788
  exports.nonEmptyStringSchema = nonEmptyStringSchema;
1772
1789
  exports.outputConfigSchema = outputConfigSchema;
1773
1790
  exports.packageConfigSchema = packageConfigSchema;
1791
+ exports.parentRelativePathSchema = parentRelativePathSchema;
1774
1792
  exports.parseSdkConfigIrV1 = parseSdkConfigIrV1;
1775
1793
  exports.parseSdkConfigIrV1ForConsumption = parseSdkConfigIrV1ForConsumption;
1776
1794
  exports.phpGenerationConfigSchema = phpGenerationConfigSchema;
@@ -1788,6 +1806,7 @@ exports.sdkConfigIrV1Schema = sdkConfigIrV1Schema;
1788
1806
  exports.serializeSdkConfigIrV1 = serializeSdkConfigIrV1;
1789
1807
  exports.sourceConfigSchema = sourceConfigSchema;
1790
1808
  exports.sourceSpecConfigSchema = sourceSpecConfigSchema;
1809
+ exports.sourceSpecOriginSchema = sourceSpecOriginSchema;
1791
1810
  exports.sourceSpecTypeSchema = sourceSpecTypeSchema;
1792
1811
  exports.swiftGenerationConfigSchema = swiftGenerationConfigSchema;
1793
1812
  exports.targetConfigSchema = targetConfigSchema;