@postman/sdk-config 0.23.0 → 0.25.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 (34) hide show
  1. package/dist/index.cjs +85 -2
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +2 -2
  4. package/dist/index.d.ts +2 -2
  5. package/dist/index.js +85 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/sdk-config/index.cjs +67 -1
  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 +67 -1
  12. package/dist/sdk-config/index.js.map +1 -1
  13. package/dist/sdk-config/v1/index.cjs +67 -1
  14. package/dist/sdk-config/v1/index.cjs.map +1 -1
  15. package/dist/sdk-config/v1/index.d.cts +16 -2
  16. package/dist/sdk-config/v1/index.d.ts +16 -2
  17. package/dist/sdk-config/v1/index.js +67 -1
  18. package/dist/sdk-config/v1/index.js.map +1 -1
  19. package/dist/sdk-config-ir/index.cjs +63 -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 +63 -2
  24. package/dist/sdk-config-ir/index.js.map +1 -1
  25. package/dist/sdk-config-ir/v1/index.cjs +63 -1
  26. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  27. package/dist/sdk-config-ir/v1/index.d.cts +39 -3
  28. package/dist/sdk-config-ir/v1/index.d.ts +39 -3
  29. package/dist/sdk-config-ir/v1/index.js +63 -2
  30. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  31. package/dist/{typescript-ZRqfOhMd.d.cts → typescript-BIq_eF34.d.cts} +10 -1
  32. package/dist/{typescript-ZRqfOhMd.d.ts → typescript-BIq_eF34.d.ts} +10 -1
  33. package/package.json +1 -1
  34. package/src/sdk-config/v1/README.md +31 -0
@@ -377,6 +377,9 @@ declare const mcpMergedToolSchema: z.ZodObject<{
377
377
  declare const mcpCustomToolSchema: z.ZodObject<{
378
378
  path: z.ZodString;
379
379
  }, z.core.$strict>;
380
+ declare const mcpHooksSchema: z.ZodObject<{
381
+ path: z.ZodString;
382
+ }, z.core.$strict>;
380
383
  declare const mcpGenerationConfigSchema: z.ZodObject<{
381
384
  typescriptVersion: z.ZodOptional<z.ZodString>;
382
385
  zodVersion: z.ZodOptional<z.ZodString>;
@@ -450,6 +453,8 @@ declare const mcpGenerationConfigSchema: z.ZodObject<{
450
453
  }, z.core.$strict>>>;
451
454
  serverName: z.ZodOptional<z.ZodString>;
452
455
  serverDescription: z.ZodOptional<z.ZodString>;
456
+ instructions: z.ZodOptional<z.ZodString>;
457
+ appendInstructions: z.ZodOptional<z.ZodString>;
453
458
  excludeAvailability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
454
459
  IN_DEVELOPMENT: "IN_DEVELOPMENT";
455
460
  PRE_RELEASE: "PRE_RELEASE";
@@ -477,10 +482,14 @@ declare const mcpGenerationConfigSchema: z.ZodObject<{
477
482
  customTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
478
483
  path: z.ZodString;
479
484
  }, z.core.$strict>>>;
485
+ hooks: z.ZodOptional<z.ZodObject<{
486
+ path: z.ZodString;
487
+ }, z.core.$strict>>;
480
488
  }, z.core.$strict>;
481
489
  type McpAvailabilityStatus = (typeof mcpAvailabilityStatuses)[number];
482
490
  type McpToolFilter = z.infer<typeof mcpToolFilterSchema>;
483
491
  type McpMergedTool = z.infer<typeof mcpMergedToolSchema>;
492
+ type McpHooks = z.infer<typeof mcpHooksSchema>;
484
493
  type McpCustomTool = z.infer<typeof mcpCustomToolSchema>;
485
494
  type McpGenerationConfig = z.infer<typeof mcpGenerationConfigSchema>;
486
495
 
@@ -684,4 +693,4 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
684
693
  }, z.core.$strict>;
685
694
  type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
686
695
 
687
- export { parentRelativePathSchema as $, cliGenerationConfigSchema as A, composerPackageNameSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, csharpGenerationConfigSchema as E, dependencySchema as F, type GoGenerationConfig as G, exactSemverSchema as H, githubActionsSecretNameSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, goGenerationConfigSchema as L, MCP_TOOL_NAME_PATTERN as M, goModulePathSchema as N, javaGenerationConfigSchema as O, type PackageConfig as P, jsonObjectSchema as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, jsonValueSchema as U, kotlinGenerationConfigSchema as V, mcpAvailabilityStatuses as W, mcpGenerationConfigSchema as X, nonEmptyStringSchema as Y, oauthTokenEndpointsIssues as Z, packageConfigSchema as _, type CliDistributionConfig as a, phpGenerationConfigSchema as a0, pythonGenerationConfigSchema as a1, relativePathSchema as a2, rubyGenerationConfigSchema as a3, rustGenerationConfigSchema as a4, swiftGenerationConfigSchema as a5, terraformGenerationConfigSchema as a6, typescriptGenerationConfigSchema as a7, type CliDistributionGithubAppConfig as b, type CliDistributionHomebrewConfig as c, type CliDistributionScoopConfig as d, type CliGenerationConfig as e, type CliOAuthTokenEndpoints as f, type CliProfilesConfig as g, type CliProfilesProvisionOperation as h, type CsharpGenerationConfig as i, type JsonObject as j, type JsonValue as k, type McpAvailabilityStatus as l, type McpCustomTool as m, type McpGenerationConfig as n, type McpMergedTool as o, type McpToolFilter as p, type PhpGenerationConfig as q, type PlanModifiers as r, type PythonGenerationConfig as s, type RustGenerationConfig as t, type SwiftGenerationConfig as u, type TypescriptGenerationConfig as v, cliDistributionConfigSchema as w, cliDistributionGithubAppSchema as x, cliDistributionHomebrewSchema as y, cliDistributionScoopSchema as z };
696
+ export { packageConfigSchema as $, cliDistributionScoopSchema as A, cliGenerationConfigSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, composerPackageNameSchema as E, csharpGenerationConfigSchema as F, type GoGenerationConfig as G, dependencySchema as H, exactSemverSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, githubActionsSecretNameSchema as L, MCP_TOOL_NAME_PATTERN as M, goGenerationConfigSchema as N, goModulePathSchema as O, type PackageConfig as P, javaGenerationConfigSchema as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, jsonObjectSchema as U, jsonValueSchema as V, kotlinGenerationConfigSchema as W, mcpAvailabilityStatuses as X, mcpGenerationConfigSchema as Y, nonEmptyStringSchema as Z, oauthTokenEndpointsIssues as _, type CliDistributionConfig as a, parentRelativePathSchema as a0, phpGenerationConfigSchema as a1, pythonGenerationConfigSchema as a2, relativePathSchema as a3, rubyGenerationConfigSchema as a4, rustGenerationConfigSchema as a5, swiftGenerationConfigSchema as a6, terraformGenerationConfigSchema as a7, typescriptGenerationConfigSchema as a8, type CliDistributionGithubAppConfig as b, type CliDistributionHomebrewConfig as c, type CliDistributionScoopConfig as d, type CliGenerationConfig as e, type CliOAuthTokenEndpoints as f, type CliProfilesConfig as g, type CliProfilesProvisionOperation as h, type CsharpGenerationConfig as i, type JsonObject as j, type JsonValue as k, type McpAvailabilityStatus as l, type McpCustomTool as m, type McpGenerationConfig as n, type McpHooks as o, type McpMergedTool as p, type McpToolFilter as q, type PhpGenerationConfig as r, type PlanModifiers as s, type PythonGenerationConfig as t, type RustGenerationConfig as u, type SwiftGenerationConfig as v, type TypescriptGenerationConfig as w, cliDistributionConfigSchema as x, cliDistributionGithubAppSchema as y, cliDistributionHomebrewSchema as z };
@@ -377,6 +377,9 @@ declare const mcpMergedToolSchema: z.ZodObject<{
377
377
  declare const mcpCustomToolSchema: z.ZodObject<{
378
378
  path: z.ZodString;
379
379
  }, z.core.$strict>;
380
+ declare const mcpHooksSchema: z.ZodObject<{
381
+ path: z.ZodString;
382
+ }, z.core.$strict>;
380
383
  declare const mcpGenerationConfigSchema: z.ZodObject<{
381
384
  typescriptVersion: z.ZodOptional<z.ZodString>;
382
385
  zodVersion: z.ZodOptional<z.ZodString>;
@@ -450,6 +453,8 @@ declare const mcpGenerationConfigSchema: z.ZodObject<{
450
453
  }, z.core.$strict>>>;
451
454
  serverName: z.ZodOptional<z.ZodString>;
452
455
  serverDescription: z.ZodOptional<z.ZodString>;
456
+ instructions: z.ZodOptional<z.ZodString>;
457
+ appendInstructions: z.ZodOptional<z.ZodString>;
453
458
  excludeAvailability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
454
459
  IN_DEVELOPMENT: "IN_DEVELOPMENT";
455
460
  PRE_RELEASE: "PRE_RELEASE";
@@ -477,10 +482,14 @@ declare const mcpGenerationConfigSchema: z.ZodObject<{
477
482
  customTools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
478
483
  path: z.ZodString;
479
484
  }, z.core.$strict>>>;
485
+ hooks: z.ZodOptional<z.ZodObject<{
486
+ path: z.ZodString;
487
+ }, z.core.$strict>>;
480
488
  }, z.core.$strict>;
481
489
  type McpAvailabilityStatus = (typeof mcpAvailabilityStatuses)[number];
482
490
  type McpToolFilter = z.infer<typeof mcpToolFilterSchema>;
483
491
  type McpMergedTool = z.infer<typeof mcpMergedToolSchema>;
492
+ type McpHooks = z.infer<typeof mcpHooksSchema>;
484
493
  type McpCustomTool = z.infer<typeof mcpCustomToolSchema>;
485
494
  type McpGenerationConfig = z.infer<typeof mcpGenerationConfigSchema>;
486
495
 
@@ -684,4 +693,4 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
684
693
  }, z.core.$strict>;
685
694
  type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
686
695
 
687
- export { parentRelativePathSchema as $, cliGenerationConfigSchema as A, composerPackageNameSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, csharpGenerationConfigSchema as E, dependencySchema as F, type GoGenerationConfig as G, exactSemverSchema as H, githubActionsSecretNameSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, goGenerationConfigSchema as L, MCP_TOOL_NAME_PATTERN as M, goModulePathSchema as N, javaGenerationConfigSchema as O, type PackageConfig as P, jsonObjectSchema as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, jsonValueSchema as U, kotlinGenerationConfigSchema as V, mcpAvailabilityStatuses as W, mcpGenerationConfigSchema as X, nonEmptyStringSchema as Y, oauthTokenEndpointsIssues as Z, packageConfigSchema as _, type CliDistributionConfig as a, phpGenerationConfigSchema as a0, pythonGenerationConfigSchema as a1, relativePathSchema as a2, rubyGenerationConfigSchema as a3, rustGenerationConfigSchema as a4, swiftGenerationConfigSchema as a5, terraformGenerationConfigSchema as a6, typescriptGenerationConfigSchema as a7, type CliDistributionGithubAppConfig as b, type CliDistributionHomebrewConfig as c, type CliDistributionScoopConfig as d, type CliGenerationConfig as e, type CliOAuthTokenEndpoints as f, type CliProfilesConfig as g, type CliProfilesProvisionOperation as h, type CsharpGenerationConfig as i, type JsonObject as j, type JsonValue as k, type McpAvailabilityStatus as l, type McpCustomTool as m, type McpGenerationConfig as n, type McpMergedTool as o, type McpToolFilter as p, type PhpGenerationConfig as q, type PlanModifiers as r, type PythonGenerationConfig as s, type RustGenerationConfig as t, type SwiftGenerationConfig as u, type TypescriptGenerationConfig as v, cliDistributionConfigSchema as w, cliDistributionGithubAppSchema as x, cliDistributionHomebrewSchema as y, cliDistributionScoopSchema as z };
696
+ export { packageConfigSchema as $, cliDistributionScoopSchema as A, cliGenerationConfigSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, composerPackageNameSchema as E, csharpGenerationConfigSchema as F, type GoGenerationConfig as G, dependencySchema as H, exactSemverSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, githubActionsSecretNameSchema as L, MCP_TOOL_NAME_PATTERN as M, goGenerationConfigSchema as N, goModulePathSchema as O, type PackageConfig as P, javaGenerationConfigSchema as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, jsonObjectSchema as U, jsonValueSchema as V, kotlinGenerationConfigSchema as W, mcpAvailabilityStatuses as X, mcpGenerationConfigSchema as Y, nonEmptyStringSchema as Z, oauthTokenEndpointsIssues as _, type CliDistributionConfig as a, parentRelativePathSchema as a0, phpGenerationConfigSchema as a1, pythonGenerationConfigSchema as a2, relativePathSchema as a3, rubyGenerationConfigSchema as a4, rustGenerationConfigSchema as a5, swiftGenerationConfigSchema as a6, terraformGenerationConfigSchema as a7, typescriptGenerationConfigSchema as a8, type CliDistributionGithubAppConfig as b, type CliDistributionHomebrewConfig as c, type CliDistributionScoopConfig as d, type CliGenerationConfig as e, type CliOAuthTokenEndpoints as f, type CliProfilesConfig as g, type CliProfilesProvisionOperation as h, type CsharpGenerationConfig as i, type JsonObject as j, type JsonValue as k, type McpAvailabilityStatus as l, type McpCustomTool as m, type McpGenerationConfig as n, type McpHooks as o, type McpMergedTool as p, type McpToolFilter as q, type PhpGenerationConfig as r, type PlanModifiers as s, type PythonGenerationConfig as t, type RustGenerationConfig as u, type SwiftGenerationConfig as v, type TypescriptGenerationConfig as w, cliDistributionConfigSchema as x, cliDistributionGithubAppSchema as y, cliDistributionHomebrewSchema as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postman/sdk-config",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "description": "Shared SDK configuration contracts and transformations for Postman SDK generation",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,
@@ -165,6 +165,37 @@ The flow-level `clientId` of an `authorization-code` flow is optional so existin
165
165
  parsing. A generator that needs it for an interactive login reports an error when it is absent. A
166
166
  `device-code` flow exists only for interactive login, so it requires it.
167
167
 
168
+ ### OAuth token URL per environment
169
+
170
+ A `client-credentials` flow has one required `tokenUrl`. When the API's token endpoint differs per
171
+ environment (production, staging, development), add `environmentTokenUrls`, a map from environment
172
+ name to token URL:
173
+
174
+ ```yaml
175
+ api:
176
+ environments:
177
+ - name: Production
178
+ urls: [{ name: default, url: https://api.example.com }]
179
+ - name: Staging
180
+ urls: [{ name: default, url: https://api.stage.example.com }]
181
+ auth:
182
+ schemes:
183
+ - id: oauth
184
+ type: oauth2
185
+ flows:
186
+ - type: client-credentials
187
+ tokenUrl: https://auth.example.com/token
188
+ environmentTokenUrls:
189
+ Staging: https://auth.stage.example.com/token
190
+ ```
191
+
192
+ When the selected environment has an entry, its URL replaces `tokenUrl`; an environment without an
193
+ entry uses `tokenUrl`. Every key must name an entry of `api.environments`, so a misspelled name is
194
+ rejected instead of leaving that environment on the production endpoint. The field is only accepted on
195
+ `client-credentials` flows. Because a generator that ignores it would call the production token endpoint
196
+ from every environment, serializing an IR that uses it requires the
197
+ `api.auth.oauth.environmentTokenUrls` capability.
198
+
168
199
  ### OAuth interactive login
169
200
 
170
201
  The flows a CLI logs in with take a few more settings, all optional (they carry what the identity