@postman/sdk-config 0.20.0 → 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.
- package/dist/index.cjs +159 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +159 -4
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +159 -4
- package/dist/sdk-config/index.cjs.map +1 -1
- package/dist/sdk-config/index.d.cts +1 -1
- package/dist/sdk-config/index.d.ts +1 -1
- package/dist/sdk-config/index.js +159 -4
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +159 -4
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +767 -2
- package/dist/sdk-config/v1/index.d.ts +767 -2
- package/dist/sdk-config/v1/index.js +159 -4
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +149 -2
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +1 -1
- package/dist/sdk-config-ir/index.d.ts +1 -1
- package/dist/sdk-config-ir/index.js +149 -2
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +149 -2
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +446 -2
- package/dist/sdk-config-ir/v1/index.d.ts +446 -2
- package/dist/sdk-config-ir/v1/index.js +149 -2
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-VEqEGvnA.d.cts → typescript-DNic6Rq5.d.cts} +20 -0
- package/dist/{typescript-VEqEGvnA.d.ts → typescript-DNic6Rq5.d.ts} +20 -0
- package/package.json +1 -1
- package/src/sdk-config/v1/README.md +24 -12
- 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,6 +207,9 @@ 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>;
|
|
209
215
|
declare const oauthTokenEndpointsSchema: z.ZodObject<{
|
|
@@ -260,10 +266,24 @@ declare const cliGenerationConfigSchema: z.ZodObject<{
|
|
|
260
266
|
operation: z.ZodString;
|
|
261
267
|
credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
|
|
262
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>>>;
|
|
263
272
|
}, z.core.$strict>>;
|
|
264
273
|
}, z.core.$strict>>;
|
|
265
274
|
splitTypeCrates: z.ZodOptional<z.ZodBoolean>;
|
|
266
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>]>>;
|
|
267
287
|
oauthTokenEndpoints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
268
288
|
token: z.ZodOptional<z.ZodObject<{
|
|
269
289
|
requestProperties: z.ZodOptional<z.ZodObject<{
|
|
@@ -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,6 +207,9 @@ 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>;
|
|
209
215
|
declare const oauthTokenEndpointsSchema: z.ZodObject<{
|
|
@@ -260,10 +266,24 @@ declare const cliGenerationConfigSchema: z.ZodObject<{
|
|
|
260
266
|
operation: z.ZodString;
|
|
261
267
|
credential: z.ZodType<Record<string, string>, unknown, z.core.$ZodTypeInternals<Record<string, string>, unknown>>;
|
|
262
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>>>;
|
|
263
272
|
}, z.core.$strict>>;
|
|
264
273
|
}, z.core.$strict>>;
|
|
265
274
|
splitTypeCrates: z.ZodOptional<z.ZodBoolean>;
|
|
266
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>]>>;
|
|
267
287
|
oauthTokenEndpoints: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
268
288
|
token: z.ZodOptional<z.ZodObject<{
|
|
269
289
|
requestProperties: z.ZodOptional<z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -482,8 +482,16 @@ targets:
|
|
|
482
482
|
operation: iam.keys.create
|
|
483
483
|
credential: { username: sid, password: secret }
|
|
484
484
|
revokeParameters: { Sid: sid }
|
|
485
|
+
flag: api-key
|
|
486
|
+
parameters: { FriendlyName: '{cli} for {user} on {host}' }
|
|
487
|
+
profileParameters: { AccountSid: username }
|
|
485
488
|
splitTypeCrates: true
|
|
486
489
|
userAgentSuffixFlag: via
|
|
490
|
+
banner:
|
|
491
|
+
text: ACME
|
|
492
|
+
colors: ['#2929CC', '#30F2B1']
|
|
493
|
+
direction: diagonal
|
|
494
|
+
animate: true
|
|
487
495
|
```
|
|
488
496
|
|
|
489
497
|
Omitted settings stay omitted in both SDK Config and IR. The CLI generator then applies the
|
|
@@ -491,18 +499,22 @@ default shown below. Fern migration copies these keys verbatim from the CLI gene
|
|
|
491
499
|
A legacy `profiles` block without `enabled` migrates as `enabled: false`. A legacy value this schema
|
|
492
500
|
rejects is left out and reported as `FERN_CONFIG_VALUE_INVALID`.
|
|
493
501
|
|
|
494
|
-
| Setting
|
|
495
|
-
|
|
|
496
|
-
| `binaryName`
|
|
497
|
-
| `crateName`
|
|
498
|
-
| `customCommands`
|
|
499
|
-
| `rootGroup`
|
|
500
|
-
| `profiles.enabled`
|
|
501
|
-
| `profiles.commandName`
|
|
502
|
-
| `profiles.revokeOperation`
|
|
503
|
-
| `profiles.provisionOperation`
|
|
504
|
-
| `
|
|
505
|
-
| `
|
|
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 |
|
|
506
518
|
|
|
507
519
|
## Precedence
|
|
508
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`.
|