@postman/sdk-config 0.19.1 → 0.21.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 +367 -54
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +367 -55
  6. package/dist/index.js.map +1 -1
  7. package/dist/sdk-config/index.cjs +313 -9
  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 +313 -9
  12. package/dist/sdk-config/index.js.map +1 -1
  13. package/dist/sdk-config/v1/index.cjs +313 -9
  14. package/dist/sdk-config/v1/index.cjs.map +1 -1
  15. package/dist/sdk-config/v1/index.d.cts +929 -30
  16. package/dist/sdk-config/v1/index.d.ts +929 -30
  17. package/dist/sdk-config/v1/index.js +313 -9
  18. package/dist/sdk-config/v1/index.js.map +1 -1
  19. package/dist/sdk-config-ir/index.cjs +348 -51
  20. package/dist/sdk-config-ir/index.cjs.map +1 -1
  21. package/dist/sdk-config-ir/index.d.cts +1 -1
  22. package/dist/sdk-config-ir/index.d.ts +1 -1
  23. package/dist/sdk-config-ir/index.js +348 -52
  24. package/dist/sdk-config-ir/index.js.map +1 -1
  25. package/dist/sdk-config-ir/v1/index.cjs +348 -51
  26. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  27. package/dist/sdk-config-ir/v1/index.d.cts +607 -4
  28. package/dist/sdk-config-ir/v1/index.d.ts +607 -4
  29. package/dist/sdk-config-ir/v1/index.js +348 -52
  30. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  31. package/dist/{typescript-D0YeGxxS.d.cts → typescript-DNic6Rq5.d.cts} +80 -1
  32. package/dist/{typescript-D0YeGxxS.d.ts → typescript-DNic6Rq5.d.ts} +80 -1
  33. package/package.json +2 -2
  34. package/src/sdk-config/v1/README.md +82 -15
  35. package/src/sdk-config-ir/v1/README.md +39 -0
@@ -195,6 +195,9 @@ declare const profilesProvisionOperationSchema: z.ZodObject<{
195
195
  operation: z.ZodString;
196
196
  credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
197
197
  revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
198
+ flag: z.ZodOptional<z.ZodString>;
199
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
200
+ profileParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
198
201
  }, z.core.$strict>;
199
202
  declare const profilesConfigSchema: z.ZodObject<{
200
203
  enabled: z.ZodBoolean;
@@ -204,8 +207,45 @@ declare const profilesConfigSchema: z.ZodObject<{
204
207
  operation: z.ZodString;
205
208
  credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
206
209
  revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
210
+ flag: z.ZodOptional<z.ZodString>;
211
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
212
+ profileParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
207
213
  }, z.core.$strict>>;
208
214
  }, z.core.$strict>;
215
+ declare const oauthTokenEndpointsSchema: z.ZodObject<{
216
+ token: z.ZodOptional<z.ZodObject<{
217
+ requestProperties: z.ZodOptional<z.ZodObject<{
218
+ clientId: z.ZodOptional<z.ZodString>;
219
+ clientSecret: z.ZodOptional<z.ZodString>;
220
+ scopes: z.ZodOptional<z.ZodString>;
221
+ }, z.core.$strict>>;
222
+ responseProperties: z.ZodOptional<z.ZodObject<{
223
+ accessToken: z.ZodOptional<z.ZodString>;
224
+ expiresIn: z.ZodOptional<z.ZodString>;
225
+ refreshToken: z.ZodOptional<z.ZodString>;
226
+ }, z.core.$strict>>;
227
+ }, z.core.$strict>>;
228
+ refresh: z.ZodOptional<z.ZodObject<{
229
+ requestProperties: z.ZodOptional<z.ZodObject<{
230
+ refreshToken: z.ZodOptional<z.ZodString>;
231
+ }, z.core.$strict>>;
232
+ responseProperties: z.ZodOptional<z.ZodObject<{
233
+ accessToken: z.ZodOptional<z.ZodString>;
234
+ expiresIn: z.ZodOptional<z.ZodString>;
235
+ refreshToken: z.ZodOptional<z.ZodString>;
236
+ }, z.core.$strict>>;
237
+ }, z.core.$strict>>;
238
+ }, z.core.$strict>;
239
+ type CliOAuthTokenEndpoints = z.infer<typeof oauthTokenEndpointsSchema>;
240
+ interface CrossCheckIssue {
241
+ message: string;
242
+ path: (string | number)[];
243
+ }
244
+ /**
245
+ * Checks the token endpoint settings against the auth schemes of the same document: each key must be the id of an
246
+ * OAuth scheme with a client credentials flow, and refresh settings need the flow's refreshUrl.
247
+ */
248
+ declare function oauthTokenEndpointsIssues(oauthTokenEndpoints: Record<string, CliOAuthTokenEndpoints> | undefined, schemes: readonly unknown[] | undefined, basePath: (string | number)[]): CrossCheckIssue[];
209
249
  /**
210
250
  * Omitted fields are left undefined; the CLI generator applies its own defaults: a binary name
211
251
  * derived from the API display name, custom commands on, no root group, profiles off, a single
@@ -215,6 +255,7 @@ declare const cliGenerationConfigSchema: z.ZodObject<{
215
255
  paginationParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
216
256
  skills: z.ZodOptional<z.ZodBoolean>;
217
257
  binaryName: z.ZodOptional<z.ZodString>;
258
+ crateName: z.ZodOptional<z.ZodString>;
218
259
  customCommands: z.ZodOptional<z.ZodBoolean>;
219
260
  rootGroup: z.ZodOptional<z.ZodString>;
220
261
  profiles: z.ZodOptional<z.ZodObject<{
@@ -225,10 +266,48 @@ declare const cliGenerationConfigSchema: z.ZodObject<{
225
266
  operation: z.ZodString;
226
267
  credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
227
268
  revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
269
+ flag: z.ZodOptional<z.ZodString>;
270
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
271
+ profileParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
228
272
  }, z.core.$strict>>;
229
273
  }, z.core.$strict>>;
230
274
  splitTypeCrates: z.ZodOptional<z.ZodBoolean>;
231
275
  userAgentSuffixFlag: z.ZodOptional<z.ZodString>;
276
+ banner: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
277
+ text: z.ZodString;
278
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
279
+ lineColors: z.ZodOptional<z.ZodArray<z.ZodString>>;
280
+ direction: z.ZodOptional<z.ZodEnum<{
281
+ horizontal: "horizontal";
282
+ vertical: "vertical";
283
+ diagonal: "diagonal";
284
+ }>>;
285
+ animate: z.ZodOptional<z.ZodBoolean>;
286
+ }, z.core.$strict>]>>;
287
+ oauthTokenEndpoints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
288
+ token: z.ZodOptional<z.ZodObject<{
289
+ requestProperties: z.ZodOptional<z.ZodObject<{
290
+ clientId: z.ZodOptional<z.ZodString>;
291
+ clientSecret: z.ZodOptional<z.ZodString>;
292
+ scopes: z.ZodOptional<z.ZodString>;
293
+ }, z.core.$strict>>;
294
+ responseProperties: z.ZodOptional<z.ZodObject<{
295
+ accessToken: z.ZodOptional<z.ZodString>;
296
+ expiresIn: z.ZodOptional<z.ZodString>;
297
+ refreshToken: z.ZodOptional<z.ZodString>;
298
+ }, z.core.$strict>>;
299
+ }, z.core.$strict>>;
300
+ refresh: z.ZodOptional<z.ZodObject<{
301
+ requestProperties: z.ZodOptional<z.ZodObject<{
302
+ refreshToken: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strict>>;
304
+ responseProperties: z.ZodOptional<z.ZodObject<{
305
+ accessToken: z.ZodOptional<z.ZodString>;
306
+ expiresIn: z.ZodOptional<z.ZodString>;
307
+ refreshToken: z.ZodOptional<z.ZodString>;
308
+ }, z.core.$strict>>;
309
+ }, z.core.$strict>>;
310
+ }, z.core.$strict>>>;
232
311
  }, z.core.$strict>;
233
312
  type CliProfilesProvisionOperation = z.infer<typeof profilesProvisionOperationSchema>;
234
313
  type CliProfilesConfig = z.infer<typeof profilesConfigSchema>;
@@ -603,4 +682,4 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
603
682
  }, z.core.$strict>;
604
683
  type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
605
684
 
606
- export { rustGenerationConfigSchema as $, exactSemverSchema as A, githubActionsSecretNameSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, goGenerationConfigSchema as E, goModulePathSchema as F, type GoGenerationConfig as G, javaGenerationConfigSchema as H, jsonObjectSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, jsonValueSchema as L, type McpAvailabilityStatus as M, kotlinGenerationConfigSchema as N, mcpAvailabilityStatuses as O, type PackageConfig as P, mcpGenerationConfigSchema as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, nonEmptyStringSchema as U, packageConfigSchema as V, parentRelativePathSchema as W, phpGenerationConfigSchema as X, pythonGenerationConfigSchema as Y, relativePathSchema as Z, rubyGenerationConfigSchema as _, type CliDistributionConfig as a, swiftGenerationConfigSchema as a0, terraformGenerationConfigSchema as a1, typescriptGenerationConfigSchema as a2, type CliDistributionGithubAppConfig as b, type CliDistributionHomebrewConfig as c, type CliDistributionScoopConfig as d, type CliGenerationConfig as e, type CliProfilesConfig as f, type CliProfilesProvisionOperation as g, type CsharpGenerationConfig as h, type JsonObject as i, type JsonValue as j, type McpGenerationConfig as k, type McpToolFilter as l, type PhpGenerationConfig as m, type PlanModifiers as n, type PythonGenerationConfig as o, type RustGenerationConfig as p, type SwiftGenerationConfig as q, type TypescriptGenerationConfig as r, cliDistributionConfigSchema as s, cliDistributionGithubAppSchema as t, cliDistributionHomebrewSchema as u, cliDistributionScoopSchema as v, cliGenerationConfigSchema as w, composerPackageNameSchema as x, csharpGenerationConfigSchema as y, dependencySchema as z };
685
+ export { relativePathSchema as $, dependencySchema as A, exactSemverSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, githubActionsSecretNameSchema as E, goGenerationConfigSchema as F, type GoGenerationConfig as G, goModulePathSchema as H, javaGenerationConfigSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, jsonObjectSchema as L, type McpAvailabilityStatus as M, jsonValueSchema as N, kotlinGenerationConfigSchema as O, type PackageConfig as P, mcpAvailabilityStatuses as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, mcpGenerationConfigSchema as U, nonEmptyStringSchema as V, oauthTokenEndpointsIssues as W, packageConfigSchema as X, parentRelativePathSchema as Y, phpGenerationConfigSchema as Z, pythonGenerationConfigSchema as _, type CliDistributionConfig as a, rubyGenerationConfigSchema as a0, rustGenerationConfigSchema as a1, swiftGenerationConfigSchema as a2, terraformGenerationConfigSchema as a3, typescriptGenerationConfigSchema as a4, 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 McpGenerationConfig as l, type McpToolFilter as m, type PhpGenerationConfig as n, type PlanModifiers as o, type PythonGenerationConfig as p, type RustGenerationConfig as q, type SwiftGenerationConfig as r, type TypescriptGenerationConfig as s, cliDistributionConfigSchema as t, cliDistributionGithubAppSchema as u, cliDistributionHomebrewSchema as v, cliDistributionScoopSchema as w, cliGenerationConfigSchema as x, composerPackageNameSchema as y, csharpGenerationConfigSchema as z };
@@ -195,6 +195,9 @@ declare const profilesProvisionOperationSchema: z.ZodObject<{
195
195
  operation: z.ZodString;
196
196
  credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
197
197
  revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
198
+ flag: z.ZodOptional<z.ZodString>;
199
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
200
+ profileParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
198
201
  }, z.core.$strict>;
199
202
  declare const profilesConfigSchema: z.ZodObject<{
200
203
  enabled: z.ZodBoolean;
@@ -204,8 +207,45 @@ declare const profilesConfigSchema: z.ZodObject<{
204
207
  operation: z.ZodString;
205
208
  credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
206
209
  revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
210
+ flag: z.ZodOptional<z.ZodString>;
211
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
212
+ profileParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
207
213
  }, z.core.$strict>>;
208
214
  }, z.core.$strict>;
215
+ declare const oauthTokenEndpointsSchema: z.ZodObject<{
216
+ token: z.ZodOptional<z.ZodObject<{
217
+ requestProperties: z.ZodOptional<z.ZodObject<{
218
+ clientId: z.ZodOptional<z.ZodString>;
219
+ clientSecret: z.ZodOptional<z.ZodString>;
220
+ scopes: z.ZodOptional<z.ZodString>;
221
+ }, z.core.$strict>>;
222
+ responseProperties: z.ZodOptional<z.ZodObject<{
223
+ accessToken: z.ZodOptional<z.ZodString>;
224
+ expiresIn: z.ZodOptional<z.ZodString>;
225
+ refreshToken: z.ZodOptional<z.ZodString>;
226
+ }, z.core.$strict>>;
227
+ }, z.core.$strict>>;
228
+ refresh: z.ZodOptional<z.ZodObject<{
229
+ requestProperties: z.ZodOptional<z.ZodObject<{
230
+ refreshToken: z.ZodOptional<z.ZodString>;
231
+ }, z.core.$strict>>;
232
+ responseProperties: z.ZodOptional<z.ZodObject<{
233
+ accessToken: z.ZodOptional<z.ZodString>;
234
+ expiresIn: z.ZodOptional<z.ZodString>;
235
+ refreshToken: z.ZodOptional<z.ZodString>;
236
+ }, z.core.$strict>>;
237
+ }, z.core.$strict>>;
238
+ }, z.core.$strict>;
239
+ type CliOAuthTokenEndpoints = z.infer<typeof oauthTokenEndpointsSchema>;
240
+ interface CrossCheckIssue {
241
+ message: string;
242
+ path: (string | number)[];
243
+ }
244
+ /**
245
+ * Checks the token endpoint settings against the auth schemes of the same document: each key must be the id of an
246
+ * OAuth scheme with a client credentials flow, and refresh settings need the flow's refreshUrl.
247
+ */
248
+ declare function oauthTokenEndpointsIssues(oauthTokenEndpoints: Record<string, CliOAuthTokenEndpoints> | undefined, schemes: readonly unknown[] | undefined, basePath: (string | number)[]): CrossCheckIssue[];
209
249
  /**
210
250
  * Omitted fields are left undefined; the CLI generator applies its own defaults: a binary name
211
251
  * derived from the API display name, custom commands on, no root group, profiles off, a single
@@ -215,6 +255,7 @@ declare const cliGenerationConfigSchema: z.ZodObject<{
215
255
  paginationParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
216
256
  skills: z.ZodOptional<z.ZodBoolean>;
217
257
  binaryName: z.ZodOptional<z.ZodString>;
258
+ crateName: z.ZodOptional<z.ZodString>;
218
259
  customCommands: z.ZodOptional<z.ZodBoolean>;
219
260
  rootGroup: z.ZodOptional<z.ZodString>;
220
261
  profiles: z.ZodOptional<z.ZodObject<{
@@ -225,10 +266,48 @@ declare const cliGenerationConfigSchema: z.ZodObject<{
225
266
  operation: z.ZodString;
226
267
  credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
227
268
  revokeParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
269
+ flag: z.ZodOptional<z.ZodString>;
270
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
271
+ profileParameters: z.ZodOptional<z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>>;
228
272
  }, z.core.$strict>>;
229
273
  }, z.core.$strict>>;
230
274
  splitTypeCrates: z.ZodOptional<z.ZodBoolean>;
231
275
  userAgentSuffixFlag: z.ZodOptional<z.ZodString>;
276
+ banner: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
277
+ text: z.ZodString;
278
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
279
+ lineColors: z.ZodOptional<z.ZodArray<z.ZodString>>;
280
+ direction: z.ZodOptional<z.ZodEnum<{
281
+ horizontal: "horizontal";
282
+ vertical: "vertical";
283
+ diagonal: "diagonal";
284
+ }>>;
285
+ animate: z.ZodOptional<z.ZodBoolean>;
286
+ }, z.core.$strict>]>>;
287
+ oauthTokenEndpoints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
288
+ token: z.ZodOptional<z.ZodObject<{
289
+ requestProperties: z.ZodOptional<z.ZodObject<{
290
+ clientId: z.ZodOptional<z.ZodString>;
291
+ clientSecret: z.ZodOptional<z.ZodString>;
292
+ scopes: z.ZodOptional<z.ZodString>;
293
+ }, z.core.$strict>>;
294
+ responseProperties: z.ZodOptional<z.ZodObject<{
295
+ accessToken: z.ZodOptional<z.ZodString>;
296
+ expiresIn: z.ZodOptional<z.ZodString>;
297
+ refreshToken: z.ZodOptional<z.ZodString>;
298
+ }, z.core.$strict>>;
299
+ }, z.core.$strict>>;
300
+ refresh: z.ZodOptional<z.ZodObject<{
301
+ requestProperties: z.ZodOptional<z.ZodObject<{
302
+ refreshToken: z.ZodOptional<z.ZodString>;
303
+ }, z.core.$strict>>;
304
+ responseProperties: z.ZodOptional<z.ZodObject<{
305
+ accessToken: z.ZodOptional<z.ZodString>;
306
+ expiresIn: z.ZodOptional<z.ZodString>;
307
+ refreshToken: z.ZodOptional<z.ZodString>;
308
+ }, z.core.$strict>>;
309
+ }, z.core.$strict>>;
310
+ }, z.core.$strict>>>;
232
311
  }, z.core.$strict>;
233
312
  type CliProfilesProvisionOperation = z.infer<typeof profilesProvisionOperationSchema>;
234
313
  type CliProfilesConfig = z.infer<typeof profilesConfigSchema>;
@@ -603,4 +682,4 @@ declare const typescriptGenerationConfigSchema: z.ZodObject<{
603
682
  }, z.core.$strict>;
604
683
  type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
605
684
 
606
- export { rustGenerationConfigSchema as $, exactSemverSchema as A, githubActionsSecretNameSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, goGenerationConfigSchema as E, goModulePathSchema as F, type GoGenerationConfig as G, javaGenerationConfigSchema as H, jsonObjectSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, jsonValueSchema as L, type McpAvailabilityStatus as M, kotlinGenerationConfigSchema as N, mcpAvailabilityStatuses as O, type PackageConfig as P, mcpGenerationConfigSchema as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, nonEmptyStringSchema as U, packageConfigSchema as V, parentRelativePathSchema as W, phpGenerationConfigSchema as X, pythonGenerationConfigSchema as Y, relativePathSchema as Z, rubyGenerationConfigSchema as _, type CliDistributionConfig as a, swiftGenerationConfigSchema as a0, terraformGenerationConfigSchema as a1, typescriptGenerationConfigSchema as a2, type CliDistributionGithubAppConfig as b, type CliDistributionHomebrewConfig as c, type CliDistributionScoopConfig as d, type CliGenerationConfig as e, type CliProfilesConfig as f, type CliProfilesProvisionOperation as g, type CsharpGenerationConfig as h, type JsonObject as i, type JsonValue as j, type McpGenerationConfig as k, type McpToolFilter as l, type PhpGenerationConfig as m, type PlanModifiers as n, type PythonGenerationConfig as o, type RustGenerationConfig as p, type SwiftGenerationConfig as q, type TypescriptGenerationConfig as r, cliDistributionConfigSchema as s, cliDistributionGithubAppSchema as t, cliDistributionHomebrewSchema as u, cliDistributionScoopSchema as v, cliGenerationConfigSchema as w, composerPackageNameSchema as x, csharpGenerationConfigSchema as y, dependencySchema as z };
685
+ export { relativePathSchema as $, dependencySchema as A, exactSemverSchema as B, CLI_DISTRIBUTION_NON_RELEASE_MODE_CODE as C, type Dependency as D, githubActionsSecretNameSchema as E, goGenerationConfigSchema as F, type GoGenerationConfig as G, goModulePathSchema as H, javaGenerationConfigSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, jsonObjectSchema as L, type McpAvailabilityStatus as M, jsonValueSchema as N, kotlinGenerationConfigSchema as O, type PackageConfig as P, mcpAvailabilityStatuses as Q, type RubyGenerationConfig as R, type SdkConfigDiagnostic as S, type TerraformGenerationConfig as T, mcpGenerationConfigSchema as U, nonEmptyStringSchema as V, oauthTokenEndpointsIssues as W, packageConfigSchema as X, parentRelativePathSchema as Y, phpGenerationConfigSchema as Z, pythonGenerationConfigSchema as _, type CliDistributionConfig as a, rubyGenerationConfigSchema as a0, rustGenerationConfigSchema as a1, swiftGenerationConfigSchema as a2, terraformGenerationConfigSchema as a3, typescriptGenerationConfigSchema as a4, 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 McpGenerationConfig as l, type McpToolFilter as m, type PhpGenerationConfig as n, type PlanModifiers as o, type PythonGenerationConfig as p, type RustGenerationConfig as q, type SwiftGenerationConfig as r, type TypescriptGenerationConfig as s, cliDistributionConfigSchema as t, cliDistributionGithubAppSchema as u, cliDistributionHomebrewSchema as v, cliDistributionScoopSchema as w, cliGenerationConfigSchema as x, composerPackageNameSchema as y, csharpGenerationConfigSchema as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postman/sdk-config",
3
- "version": "0.19.1",
3
+ "version": "0.21.0",
4
4
  "description": "Shared SDK configuration contracts and transformations for Postman SDK generation",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,
@@ -65,7 +65,7 @@
65
65
  "test:watch": "vitest",
66
66
  "typecheck": "tsc --noEmit",
67
67
  "check": "npm run format:check && npm run lint && npm run typecheck && npm test && npm run build && npm run test:exports",
68
- "prepack": "npm run build"
68
+ "prepack": "npm run format:check && npm run lint && npm run typecheck && npm run build && npm run test:exports"
69
69
  },
70
70
  "dependencies": {
71
71
  "semver": "^7.7.4",
@@ -156,13 +156,41 @@ An OAuth 2.0 scheme distinguishes two kinds of client identity:
156
156
  - `api.auth.schemes[].clientId` and `clientSecret` describe SDK parameters that the caller supplies
157
157
  at runtime, optionally from an environment variable. They carry confidential-client credentials
158
158
  and never contain literal values.
159
- - `api.auth.schemes[].flows[].clientId` is accepted only on `authorization-code` flows. It is the
160
- literal, public (RFC 6749 §2.2) identifier of an installed application, such as a CLI that runs
159
+ - `api.auth.schemes[].flows[].clientId` is accepted on `authorization-code` and `device-code` flows.
160
+ It is the literal, public (RFC 6749 §2.2) identifier of an installed application, such as a CLI that runs
161
161
  browser login with PKCE. Generators embed it verbatim, so environment expressions are rejected and
162
162
  it must never hold a client secret.
163
163
 
164
- The flow-level `clientId` is optional so existing documents keep parsing. A generator that needs it
165
- for an interactive login reports an error when it is absent.
164
+ The flow-level `clientId` of an `authorization-code` flow is optional so existing documents keep
165
+ parsing. A generator that needs it for an interactive login reports an error when it is absent. A
166
+ `device-code` flow exists only for interactive login, so it requires it.
167
+
168
+ ### OAuth interactive login
169
+
170
+ The flows a CLI logs in with take a few more settings, all optional (they carry what the identity
171
+ provider asks for):
172
+
173
+ - `authorization-code`: `redirectUri` pins the loopback callback (an `http` URL on `127.0.0.1` or
174
+ `localhost` with a port, such as `http://127.0.0.1:8484/callback`); `redirectUriBackupPorts` lists
175
+ ports tried when that port is busy (it requires `redirectUri`); `successRedirectUrl` and
176
+ `errorRedirectUrl` are hosted pages the browser is sent to afterwards; `authorizationParameters`,
177
+ `tokenParameters` and `refreshParameters` add literal parameters (such as `audience`) to the
178
+ authorization, code exchange and refresh requests. PKCE with `S256` is always applied.
179
+ - `device-code` (RFC 8628): `clientId`, `deviceAuthorizationUrl` and `tokenUrl` are required;
180
+ `refreshUrl`, `scopes`, `deviceAuthorizationParameters`, `tokenParameters` and
181
+ `refreshParameters` are optional. It has no browser callback, so the callback settings above are
182
+ rejected on it.
183
+
184
+ ```yaml
185
+ - type: authorization-code
186
+ authorizationUrl: https://auth.example.com/authorize
187
+ tokenUrl: https://auth.example.com/token
188
+ clientId: acme-cli
189
+ redirectUri: http://127.0.0.1:8484/callback
190
+ redirectUriBackupPorts: [8483, 8482]
191
+ authorizationParameters:
192
+ audience: https://api.example.com
193
+ ```
166
194
 
167
195
  ```yaml
168
196
  api:
@@ -177,6 +205,32 @@ api:
177
205
  clientId: acme-cli
178
206
  ```
179
207
 
208
+ ### OAuth token endpoint properties (CLI)
209
+
210
+ A CLI that logs in with the client credentials flow builds the token request and reads the token
211
+ response itself. It uses the RFC 6749 names (`client_id`, `client_secret`, `scope` out;
212
+ `access_token`, `expires_in`, `refresh_token` in). For a token endpoint that names them differently,
213
+ the CLI option `oauthTokenEndpoints` gives, per OAuth scheme id, the names to use:
214
+
215
+ - `token.requestProperties`: `clientId`, `clientSecret`, `scopes`.
216
+ - `token.responseProperties`: `accessToken`, `expiresIn`, `refreshToken`.
217
+ - `refresh.requestProperties`: `refreshToken`; `refresh.responseProperties`: as for the token.
218
+
219
+ Each value is a property name, or a dotted path to a nested one (`data.token`). The token endpoint
220
+ is the `tokenUrl` of the scheme's client-credentials flow and the refresh endpoint its `refreshUrl`,
221
+ so `refresh` settings need a `refreshUrl`. Other properties of the token request are filled from
222
+ environment variables by the CLI.
223
+
224
+ ```yaml
225
+ targets:
226
+ - language: cli
227
+ generation:
228
+ oauthTokenEndpoints:
229
+ oauth:
230
+ token:
231
+ requestProperties: { clientId: username, clientSecret: password }
232
+ ```
233
+
180
234
  ## Shape
181
235
 
182
236
  ```json
@@ -428,8 +482,16 @@ targets:
428
482
  operation: iam.keys.create
429
483
  credential: { username: sid, password: secret }
430
484
  revokeParameters: { Sid: sid }
485
+ flag: api-key
486
+ parameters: { FriendlyName: '{cli} for {user} on {host}' }
487
+ profileParameters: { AccountSid: username }
431
488
  splitTypeCrates: true
432
489
  userAgentSuffixFlag: via
490
+ banner:
491
+ text: ACME
492
+ colors: ['#2929CC', '#30F2B1']
493
+ direction: diagonal
494
+ animate: true
433
495
  ```
434
496
 
435
497
  Omitted settings stay omitted in both SDK Config and IR. The CLI generator then applies the
@@ -437,17 +499,22 @@ default shown below. Fern migration copies these keys verbatim from the CLI gene
437
499
  A legacy `profiles` block without `enabled` migrates as `enabled: false`. A legacy value this schema
438
500
  rejects is left out and reported as `FERN_CONFIG_VALUE_INVALID`.
439
501
 
440
- | Setting | Behavior | Validation | Generator default when omitted |
441
- | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
442
- | `binaryName` | Executable name. The generator kebab-cases it (`Acme CLI` becomes `acme-cli`) and uses the result for the Cargo binary, the CLI source directory, the runtime app name, and the fallback environment-variable prefix. | Non-empty string with at least one ASCII letter or digit, since the generator rejects names that kebab-case to empty. | Kebab-cased API display name |
443
- | `customCommands` | Generates hand-written command support: the model and SDK crates, `sdk.rs`, and `custom.rs`. | Boolean | `true` |
444
- | `rootGroup` | Nests every spec-derived command under one group, so `acme users list` becomes `acme api users list`. | `^[a-z][a-z0-9_-]*$` | No group |
445
- | `profiles.enabled` | Emits the profile command group and the global `--profile` / `-p` flag. Profiles store per-profile credentials and request defaults. | Required boolean when `profiles` is present, following the SDK Config convention for feature objects. The generator itself treats a missing `enabled` as `false`. | Profiles off |
446
- | `profiles.commandName` | Name of the profile command group. | `^[a-z][a-z0-9-]*$`, excluding `auth`, `completion`, `man`, `errors`, `generate-skills`, and `help` | `profiles` |
447
- | `profiles.revokeOperation` | Operation that `profiles remove --revoke` calls. | Dotted command path, such as `iam.keys.remove` | No `--revoke` flag |
448
- | `profiles.provisionOperation` | Operation that `profiles create --provision` calls, and how its response fills the stored credential. | `operation` is a required dotted path. `credential` maps at least one field. Map keys and values match `^[A-Za-z0-9_.-]+$`. | No `--provision` flag |
449
- | `splitTypeCrates` | Splits generated types into one crate per API behind a facade crate. | Boolean | `false` |
450
- | `userAgentSuffixFlag` | Long flag that appends a product token to the User-Agent. The environment variable is `<BINARY>_<FLAG>`, with hyphens changed to underscores. | `^[a-z][a-z0-9-]*$` without the leading `--`. Built-in global flag names such as `help` and `base-url` are rejected. | `user-agent-suffix` |
502
+ | Setting | Behavior | Validation | Generator default when omitted |
503
+ | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
504
+ | `binaryName` | Executable name. The generator kebab-cases it (`Acme CLI` becomes `acme-cli`) and uses the result for the Cargo binary, the CLI source directory, the runtime app name, and the fallback environment-variable prefix. | Non-empty string with at least one ASCII letter or digit, since the generator rejects names that kebab-case to empty. | Kebab-cased API display name |
505
+ | `crateName` | Name of the generated Cargo package, which release archives and installers (`<name>-installer.sh`) are named after. Defaults to the binary name when the output is delivered to GitHub. | Cargo package name: starts with a letter, then letters, digits, `-` or `_`, at most 64 characters. |
506
+ | `customCommands` | Generates hand-written command support: the model and SDK crates, `sdk.rs`, and `custom.rs`. | Boolean | `true` |
507
+ | `rootGroup` | Nests every spec-derived command under one group, so `acme users list` becomes `acme api users list`. | `^[a-z][a-z0-9_-]*$` | No group |
508
+ | `profiles.enabled` | Emits the profile command group and the global `--profile` / `-p` flag. Profiles store per-profile credentials and request defaults. | Required boolean when `profiles` is present, following the SDK Config convention for feature objects. The generator itself treats a missing `enabled` as `false`. | Profiles off |
509
+ | `profiles.commandName` | Name of the profile command group. | `^[a-z][a-z0-9-]*$`, excluding `auth`, `completion`, `man`, `errors`, `generate-skills`, and `help` | `profiles` |
510
+ | `profiles.revokeOperation` | Operation that `profiles remove --revoke` calls. | Dotted command path, such as `iam.keys.remove` | No `--revoke` flag |
511
+ | `profiles.provisionOperation` | Operation that `profiles create --provision` calls, and how its response fills the stored credential. | `operation` is a required dotted path. `credential` maps at least one field. Map keys and values match `^[A-Za-z0-9_.-]+$`. | No `--provision` flag |
512
+ | `profiles.provisionOperation.flag` | Long name of the `profiles create` flag. `--provision` stays accepted as a hidden alias. | `^[a-z][a-z0-9-]*$` without the leading `--` | `provision` |
513
+ | `profiles.provisionOperation.parameters` | Extra request values sent with the operation. `{cli}`, `{profile}`, `{user}` and `{host}` are substituted; a value the profile sets wins. | Keys match `^[A-Za-z0-9_.-]+$`. Values contain no quotes, backslashes or control characters. | None |
514
+ | `profiles.provisionOperation.profileParameters` | Maps each profile parameter to the typed credential field it is copied from, so requests keep it once the credential is replaced by the provisioned key. | Keys and values match `^[A-Za-z0-9_.-]+$`. | None |
515
+ | `splitTypeCrates` | Splits generated types into one crate per API behind a facade crate. | Boolean | `false` |
516
+ | `userAgentSuffixFlag` | Long flag that appends a product token to the User-Agent. The environment variable is `<BINARY>_<FLAG>`, with hyphens changed to underscores. | `^[a-z][a-z0-9-]*$` without the leading `--`. Built-in global flag names such as `help` and `base-url` are rejected. | `user-agent-suffix` |
517
+ | `banner` | Banner printed above root `--help`: a string, or `text` with `colors` (one colour is solid, several make a gradient along `direction`), `lineColors` (one colour per line) and `animate` (a short shimmer on an interactive terminal). | `text` is non-empty. Colours are `#RRGGBB`. `colors` and `lineColors` are exclusive. `direction` is `horizontal`, `vertical` or `diagonal`. | No banner |
451
518
 
452
519
  ## Precedence
453
520
 
@@ -379,6 +379,29 @@ than generated-language presentation.
379
379
  | `path-parameter-order` | `pathParameterOrder` | 2 |
380
380
  | `type-dates-as-strings` | `typeDatesAsStrings` | 12 |
381
381
  | `default-integer-format` | `defaultIntegerFormat` | Importer defaults to `int32`. |
382
+ | `respect-per-spec-base-path` | `respectPerSpecBasePath` | Not in the project snapshot; see below. |
383
+ | `error-responses` | `errorResponses` | Not in the project snapshot; see below. |
384
+ | `additional-properties-defaults-to` | `additionalPropertiesDefaultsTo` | Not in the project snapshot; see below. |
385
+ | `optional-additional-properties` | `optionalAdditionalProperties` | Not in the project snapshot; see below. |
386
+ | `any-of-sibling-properties-as-object` | `anyOfSiblingPropertiesAsObject` | Not in the project snapshot; see below. |
387
+ | `preserve-single-schema-oneof` | `preserveSingleSchemaOneOf` | Not in the project snapshot; see below. |
388
+ | `preserve-one-of-in-all-of` | `preserveOneOfInAllOf` | Not in the project snapshot; see below. |
389
+ | `remove-discriminants-from-schemas` | `removeDiscriminantsFromSchemas` | Not in the project snapshot; see below. |
390
+ | `coerce-consts-to` | `coerceConstsTo` | Not in the project snapshot; see below. |
391
+ | `resolve-aliases` | `resolveAliases` | Not in the project snapshot; see below. |
392
+ | `respect-forward-compatible-enums` | `respectForwardCompatibleEnums` | Not in the project snapshot; see below. |
393
+ | `infer-forward-compatible` | `inferForwardCompatible` | Not in the project snapshot; see below. |
394
+ | `respect-operation-id-word-boundaries` | `respectOperationIdWordBoundaries` | Not in the project snapshot; see below. |
395
+ | `namespaced-errors` | `namespacedErrors` | Not in the project snapshot; see below. |
396
+ | `default-form-parameter-encoding` | `defaultFormParameterEncoding` | Not in the project snapshot; see below. |
397
+ | `respect-parameter-content` | `respectParameterContent` | Not in the project snapshot; see below. |
398
+ | `use-bytes-for-binary-response` | `useBytesForBinaryResponse` | Not in the project snapshot; see below. |
399
+ | `use-read-variant-for-responses` | `useReadVariantForResponses` | Not in the project snapshot; see below. |
400
+ | `example-generation` | `exampleGeneration` | Not in the project snapshot; see below. |
401
+ | `filter` | `filter` | Not in the project snapshot; see below. |
402
+ | `group-environments-by-host` | `groupEnvironmentsByHost` | Not in the project snapshot; see below. |
403
+ | `multi-server-strategy` | `multiServerStrategy` | Not in the project snapshot; see below. |
404
+ | `infer-default-environment` | `inferDefaultEnvironment` | Not in the project snapshot; see below. |
382
405
 
383
406
  `ignoreTags` and `disambiguateRequestNames` postdate the project snapshot. Twilio declares both
384
407
  across its namespaced API specs. They stay undefaulted so omission remains distinguishable from an
@@ -413,6 +436,22 @@ importer default, which blocks the declaring customer from a post-cutover genera
413
436
  names AsyncAPI messages, but the importer resolves it as part of one shared settings object, so a
414
437
  project's OpenAPI specs carry it too and are refused for it.
415
438
 
439
+ `respectPerSpecBasePath` and `errorResponses` serve the CLI generator's parity with Fern. Both stay
440
+ undefaulted. `respectPerSpecBasePath` applies each document's plain `x-fern-base-path` to that
441
+ document's endpoints. `errorResponses` is Fern's `error-responses` with the keys camel-cased
442
+ (`apply-to` is `applyTo`, `status-code` is `statusCode`). Its `schema` is the schema object itself:
443
+ Fern also accepts a path relative to `generators.yml`, which no service can read, so the client
444
+ resolves the file and sends its content. The same holds for a CLI `banner` read from a file: the
445
+ client sends its `text`.
446
+
447
+ The remaining Fern import settings (`additionalPropertiesDefaultsTo` through `inferDefaultEnvironment` in the table above)
448
+ complete the set Fern's `getAPIDefinitionSettings` maps, so a config that declares one is no longer refused. All stay
449
+ undefaulted: absent must leave an existing SDK's shapes alone, and the generator applies Fern's own default. Fern's
450
+ `shared-error-responses` is not a setting: it is derived from `errorResponses` set API-wide, and the generator derives it
451
+ the same way. `resolveAliases` takes `true`, `false` or `{ except: [...] }`; `exampleGeneration` and `filter` are objects
452
+ with the keys camel-cased (`maxDepth`, `endpoints`). This reverses the earlier removal of environment grouping and
453
+ default-environment inference: both are modeled again because Fern still reads them.
454
+
416
455
  ## Fern language-specific migration map
417
456
 
418
457
  Only options that remain language-specific stay in `generation.language`.