@postman/sdk-config 0.16.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 +76 -17
  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 +71 -18
  6. package/dist/index.js.map +1 -1
  7. package/dist/sdk-config/index.cjs +64 -17
  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 +61 -18
  12. package/dist/sdk-config/index.js.map +1 -1
  13. package/dist/sdk-config/v1/index.cjs +64 -17
  14. package/dist/sdk-config/v1/index.cjs.map +1 -1
  15. package/dist/sdk-config/v1/index.d.cts +222 -22
  16. package/dist/sdk-config/v1/index.d.ts +222 -22
  17. package/dist/sdk-config/v1/index.js +61 -18
  18. package/dist/sdk-config/v1/index.js.map +1 -1
  19. package/dist/sdk-config-ir/index.cjs +18 -1
  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 +17 -2
  24. package/dist/sdk-config-ir/index.js.map +1 -1
  25. package/dist/sdk-config-ir/v1/index.cjs +18 -1
  26. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  27. package/dist/sdk-config-ir/v1/index.d.cts +22 -3
  28. package/dist/sdk-config-ir/v1/index.d.ts +22 -3
  29. package/dist/sdk-config-ir/v1/index.js +17 -2
  30. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  31. package/dist/{typescript-Cc50beVo.d.cts → typescript-D0YeGxxS.d.cts} +6 -1
  32. package/dist/{typescript-Cc50beVo.d.ts → typescript-D0YeGxxS.d.ts} +6 -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)) {
@@ -1355,7 +1359,8 @@ var apiImportSettingsSchema = zod.z.strictObject({
1355
1359
  ),
1356
1360
  resolveSchemaCollisions: zod.z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
1357
1361
  asyncApiMessageNaming: zod.z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
1358
- 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.")
1359
1364
  });
1360
1365
  var sourceSpecTypeSchema = zod.z.enum([
1361
1366
  "openapi",
@@ -1366,6 +1371,7 @@ var sourceSpecTypeSchema = zod.z.enum([
1366
1371
  ]);
1367
1372
 
1368
1373
  // src/sdk-config-ir/v1/source.ts
1374
+ var sourceSpecOriginSchema = zod.z.enum(["protobuf"]);
1369
1375
  var sourceSpecConfigSchema = zod.z.strictObject({
1370
1376
  id: nonEmptyStringSchema.optional().describe("A unique identifier for this API source."),
1371
1377
  name: nonEmptyStringSchema.optional().describe("A human-readable name for this API source."),
@@ -1374,9 +1380,18 @@ var sourceSpecConfigSchema = zod.z.strictObject({
1374
1380
  "The materialized URL from which the generator retrieves the API source."
1375
1381
  ),
1376
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."),
1377
1384
  apiImportSettings: apiImportSettingsSchema.optional().describe("Import behavior that overrides the source-level defaults for this spec."),
1378
1385
  overlays: zod.z.array(nonEmptyStringSchema).optional().describe("Materialized overlays applied to this source in order."),
1379
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
+ }
1380
1395
  });
1381
1396
  var sourceConfigSchema = zod.z.strictObject({
1382
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."),
@@ -1773,6 +1788,7 @@ exports.mcpGenerationConfigSchema = mcpGenerationConfigSchema;
1773
1788
  exports.nonEmptyStringSchema = nonEmptyStringSchema;
1774
1789
  exports.outputConfigSchema = outputConfigSchema;
1775
1790
  exports.packageConfigSchema = packageConfigSchema;
1791
+ exports.parentRelativePathSchema = parentRelativePathSchema;
1776
1792
  exports.parseSdkConfigIrV1 = parseSdkConfigIrV1;
1777
1793
  exports.parseSdkConfigIrV1ForConsumption = parseSdkConfigIrV1ForConsumption;
1778
1794
  exports.phpGenerationConfigSchema = phpGenerationConfigSchema;
@@ -1790,6 +1806,7 @@ exports.sdkConfigIrV1Schema = sdkConfigIrV1Schema;
1790
1806
  exports.serializeSdkConfigIrV1 = serializeSdkConfigIrV1;
1791
1807
  exports.sourceConfigSchema = sourceConfigSchema;
1792
1808
  exports.sourceSpecConfigSchema = sourceSpecConfigSchema;
1809
+ exports.sourceSpecOriginSchema = sourceSpecOriginSchema;
1793
1810
  exports.sourceSpecTypeSchema = sourceSpecTypeSchema;
1794
1811
  exports.swiftGenerationConfigSchema = swiftGenerationConfigSchema;
1795
1812
  exports.targetConfigSchema = targetConfigSchema;