@postman/sdk-config 0.0.4 → 0.1.1

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 (36) hide show
  1. package/README.md +124 -101
  2. package/dist/index.cjs +2119 -282
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +3 -1
  5. package/dist/index.d.ts +3 -1
  6. package/dist/index.js +2080 -283
  7. package/dist/index.js.map +1 -1
  8. package/dist/sdk-config/index.cjs +2238 -0
  9. package/dist/sdk-config/index.cjs.map +1 -0
  10. package/dist/sdk-config/index.d.cts +3 -0
  11. package/dist/sdk-config/index.d.ts +3 -0
  12. package/dist/sdk-config/index.js +2196 -0
  13. package/dist/sdk-config/index.js.map +1 -0
  14. package/dist/sdk-config/v1/index.cjs +2238 -0
  15. package/dist/sdk-config/v1/index.cjs.map +1 -0
  16. package/dist/sdk-config/v1/index.d.cts +8644 -0
  17. package/dist/sdk-config/v1/index.d.ts +8644 -0
  18. package/dist/sdk-config/v1/index.js +2196 -0
  19. package/dist/sdk-config/v1/index.js.map +1 -0
  20. package/dist/sdk-config-ir/index.cjs +160 -25
  21. package/dist/sdk-config-ir/index.cjs.map +1 -1
  22. package/dist/sdk-config-ir/index.d.cts +2 -1
  23. package/dist/sdk-config-ir/index.d.ts +2 -1
  24. package/dist/sdk-config-ir/index.js +158 -26
  25. package/dist/sdk-config-ir/index.js.map +1 -1
  26. package/dist/sdk-config-ir/v1/index.cjs +160 -25
  27. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  28. package/dist/sdk-config-ir/v1/index.d.cts +458 -428
  29. package/dist/sdk-config-ir/v1/index.d.ts +458 -428
  30. package/dist/sdk-config-ir/v1/index.js +158 -26
  31. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  32. package/dist/typescript-DK97815_.d.cts +427 -0
  33. package/dist/typescript-DK97815_.d.ts +427 -0
  34. package/package.json +16 -3
  35. package/src/sdk-config/v1/README.md +135 -0
  36. package/src/sdk-config-ir/v1/README.md +44 -26
@@ -0,0 +1,427 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const nonEmptyStringSchema: z.ZodString;
4
+ declare const relativePathSchema: z.ZodString;
5
+ declare const exactSemverSchema: z.ZodString;
6
+ type JsonValue = null | boolean | number | string | JsonValue[] | JsonObject;
7
+ type JsonObject = {
8
+ [key: string]: JsonValue;
9
+ };
10
+ declare const jsonValueSchema: z.ZodType<JsonValue>;
11
+ declare const jsonObjectSchema: z.ZodType<JsonObject>;
12
+
13
+ declare const goModulePathSchema: z.ZodString;
14
+ declare const composerPackageNameSchema: z.ZodString;
15
+ declare const dependencySchema: z.ZodObject<{
16
+ name: z.ZodString;
17
+ version: z.ZodOptional<z.ZodString>;
18
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
19
+ type: z.ZodLiteral<"registry">;
20
+ registry: z.ZodOptional<z.ZodString>;
21
+ }, z.core.$strict>, z.ZodObject<{
22
+ type: z.ZodLiteral<"git">;
23
+ url: z.ZodString;
24
+ ref: z.ZodOptional<z.ZodString>;
25
+ subdirectory: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strict>, z.ZodObject<{
27
+ type: z.ZodLiteral<"path">;
28
+ path: z.ZodString;
29
+ }, z.core.$strict>], "type">>;
30
+ packageName: z.ZodOptional<z.ZodString>;
31
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
32
+ extras: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
+ optional: z.ZodOptional<z.ZodBoolean>;
34
+ defaultFeatures: z.ZodOptional<z.ZodBoolean>;
35
+ environmentMarker: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strict>;
37
+ declare const packageConfigSchema: z.ZodObject<{
38
+ packageName: z.ZodOptional<z.ZodString>;
39
+ moduleName: z.ZodOptional<z.ZodString>;
40
+ modulePath: z.ZodOptional<z.ZodString>;
41
+ namespace: z.ZodOptional<z.ZodString>;
42
+ groupId: z.ZodOptional<z.ZodString>;
43
+ artifactId: z.ZodOptional<z.ZodString>;
44
+ description: z.ZodOptional<z.ZodString>;
45
+ repository: z.ZodOptional<z.ZodString>;
46
+ homepage: z.ZodOptional<z.ZodString>;
47
+ documentationUrl: z.ZodOptional<z.ZodString>;
48
+ authors: z.ZodOptional<z.ZodArray<z.ZodObject<{
49
+ name: z.ZodString;
50
+ email: z.ZodOptional<z.ZodEmail>;
51
+ }, z.core.$strict>>>;
52
+ developers: z.ZodOptional<z.ZodArray<z.ZodObject<{
53
+ name: z.ZodString;
54
+ email: z.ZodOptional<z.ZodEmail>;
55
+ organization: z.ZodOptional<z.ZodString>;
56
+ organizationUrl: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strict>>>;
58
+ license: z.ZodOptional<z.ZodObject<{
59
+ type: z.ZodString;
60
+ name: z.ZodOptional<z.ZodString>;
61
+ url: z.ZodOptional<z.ZodString>;
62
+ path: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$strict>>;
64
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
65
+ classifiers: z.ZodOptional<z.ZodArray<z.ZodString>>;
66
+ projectUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
67
+ label: z.ZodString;
68
+ url: z.ZodString;
69
+ }, z.core.$strict>>>;
70
+ extraDependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
71
+ name: z.ZodString;
72
+ version: z.ZodOptional<z.ZodString>;
73
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
74
+ type: z.ZodLiteral<"registry">;
75
+ registry: z.ZodOptional<z.ZodString>;
76
+ }, z.core.$strict>, z.ZodObject<{
77
+ type: z.ZodLiteral<"git">;
78
+ url: z.ZodString;
79
+ ref: z.ZodOptional<z.ZodString>;
80
+ subdirectory: z.ZodOptional<z.ZodString>;
81
+ }, z.core.$strict>, z.ZodObject<{
82
+ type: z.ZodLiteral<"path">;
83
+ path: z.ZodString;
84
+ }, z.core.$strict>], "type">>;
85
+ packageName: z.ZodOptional<z.ZodString>;
86
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
87
+ extras: z.ZodOptional<z.ZodArray<z.ZodString>>;
88
+ optional: z.ZodOptional<z.ZodBoolean>;
89
+ defaultFeatures: z.ZodOptional<z.ZodBoolean>;
90
+ environmentMarker: z.ZodOptional<z.ZodString>;
91
+ }, z.core.$strict>>>;
92
+ extraDevDependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
93
+ name: z.ZodString;
94
+ version: z.ZodOptional<z.ZodString>;
95
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
96
+ type: z.ZodLiteral<"registry">;
97
+ registry: z.ZodOptional<z.ZodString>;
98
+ }, z.core.$strict>, z.ZodObject<{
99
+ type: z.ZodLiteral<"git">;
100
+ url: z.ZodString;
101
+ ref: z.ZodOptional<z.ZodString>;
102
+ subdirectory: z.ZodOptional<z.ZodString>;
103
+ }, z.core.$strict>, z.ZodObject<{
104
+ type: z.ZodLiteral<"path">;
105
+ path: z.ZodString;
106
+ }, z.core.$strict>], "type">>;
107
+ packageName: z.ZodOptional<z.ZodString>;
108
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
109
+ extras: z.ZodOptional<z.ZodArray<z.ZodString>>;
110
+ optional: z.ZodOptional<z.ZodBoolean>;
111
+ defaultFeatures: z.ZodOptional<z.ZodBoolean>;
112
+ environmentMarker: z.ZodOptional<z.ZodString>;
113
+ }, z.core.$strict>>>;
114
+ extraPeerDependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
115
+ name: z.ZodString;
116
+ version: z.ZodOptional<z.ZodString>;
117
+ source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
118
+ type: z.ZodLiteral<"registry">;
119
+ registry: z.ZodOptional<z.ZodString>;
120
+ }, z.core.$strict>, z.ZodObject<{
121
+ type: z.ZodLiteral<"git">;
122
+ url: z.ZodString;
123
+ ref: z.ZodOptional<z.ZodString>;
124
+ subdirectory: z.ZodOptional<z.ZodString>;
125
+ }, z.core.$strict>, z.ZodObject<{
126
+ type: z.ZodLiteral<"path">;
127
+ path: z.ZodString;
128
+ }, z.core.$strict>], "type">>;
129
+ packageName: z.ZodOptional<z.ZodString>;
130
+ features: z.ZodOptional<z.ZodArray<z.ZodString>>;
131
+ extras: z.ZodOptional<z.ZodArray<z.ZodString>>;
132
+ optional: z.ZodOptional<z.ZodBoolean>;
133
+ defaultFeatures: z.ZodOptional<z.ZodBoolean>;
134
+ environmentMarker: z.ZodOptional<z.ZodString>;
135
+ }, z.core.$strict>>>;
136
+ }, z.core.$strict>;
137
+ type Dependency = z.infer<typeof dependencySchema>;
138
+ type PackageConfig = z.infer<typeof packageConfigSchema>;
139
+
140
+ declare const cliGenerationConfigSchema: z.ZodObject<{
141
+ paginationParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
142
+ skills: z.ZodOptional<z.ZodBoolean>;
143
+ }, z.core.$strict>;
144
+ type CliGenerationConfig = z.infer<typeof cliGenerationConfigSchema>;
145
+
146
+ declare const csharpGenerationConfigSchema: z.ZodObject<{
147
+ useOptionalWrapper: z.ZodOptional<z.ZodBoolean>;
148
+ simplifyObjectDictionaries: z.ZodOptional<z.ZodBoolean>;
149
+ explicitNamespaces: z.ZodOptional<z.ZodBoolean>;
150
+ rootNamespaceForCoreClasses: z.ZodOptional<z.ZodBoolean>;
151
+ includeExceptionHandler: z.ZodOptional<z.ZodBoolean>;
152
+ experimentalExplicitNullableOptional: z.ZodOptional<z.ZodBoolean>;
153
+ }, z.core.$strict>;
154
+ type CsharpGenerationConfig = z.infer<typeof csharpGenerationConfigSchema>;
155
+
156
+ declare const goGenerationConfigSchema: z.ZodObject<{
157
+ legacyComplexModels: z.ZodOptional<z.ZodBoolean>;
158
+ /** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
159
+ smartCasing: z.ZodOptional<z.ZodBoolean>;
160
+ /** Overrides the fern root-client constructor independently from the client type name. */
161
+ clientConstructorName: z.ZodOptional<z.ZodString>;
162
+ unionVersion: z.ZodOptional<z.ZodEnum<{
163
+ v0: "v0";
164
+ v1: "v1";
165
+ }>>;
166
+ includeLegacyClientOptions: z.ZodOptional<z.ZodBoolean>;
167
+ }, z.core.$strict>;
168
+ type GoGenerationConfig = z.infer<typeof goGenerationConfigSchema>;
169
+
170
+ declare const javaGenerationConfigSchema: z.ZodObject<{
171
+ packageLayout: z.ZodOptional<z.ZodEnum<{
172
+ flat: "flat";
173
+ nested: "nested";
174
+ }>>;
175
+ useLocalDateForDates: z.ZodOptional<z.ZodBoolean>;
176
+ collapseOptionalNullable: z.ZodOptional<z.ZodBoolean>;
177
+ gradleDistributionUrl: z.ZodOptional<z.ZodString>;
178
+ gradlePluginManagement: z.ZodOptional<z.ZodString>;
179
+ gradleCentralDependencyManagement: z.ZodOptional<z.ZodBoolean>;
180
+ asyncStyle: z.ZodOptional<z.ZodEnum<{
181
+ "dedicated-client": "dedicated-client";
182
+ "twin-methods": "twin-methods";
183
+ }>>;
184
+ includeKotlinSnippets: z.ZodOptional<z.ZodBoolean>;
185
+ }, z.core.$strict>;
186
+ type JavaGenerationConfig = z.infer<typeof javaGenerationConfigSchema>;
187
+
188
+ /**
189
+ * Kotlin targets use the shared Java/JVM generator and always include Kotlin-facing
190
+ * examples, snippets, and documentation.
191
+ */
192
+ declare const kotlinGenerationConfigSchema: z.ZodObject<{
193
+ packageLayout: z.ZodOptional<z.ZodEnum<{
194
+ flat: "flat";
195
+ nested: "nested";
196
+ }>>;
197
+ useLocalDateForDates: z.ZodOptional<z.ZodBoolean>;
198
+ collapseOptionalNullable: z.ZodOptional<z.ZodBoolean>;
199
+ gradleDistributionUrl: z.ZodOptional<z.ZodString>;
200
+ gradlePluginManagement: z.ZodOptional<z.ZodString>;
201
+ gradleCentralDependencyManagement: z.ZodOptional<z.ZodBoolean>;
202
+ asyncStyle: z.ZodOptional<z.ZodEnum<{
203
+ "dedicated-client": "dedicated-client";
204
+ "twin-methods": "twin-methods";
205
+ }>>;
206
+ }, z.core.$strict>;
207
+ type KotlinGenerationConfig = z.infer<typeof kotlinGenerationConfigSchema>;
208
+
209
+ declare const mcpAvailabilityStatuses: readonly ["IN_DEVELOPMENT", "PRE_RELEASE", "GENERAL_AVAILABILITY", "DEPRECATED", "ALPHA", "BETA", "PREVIEW", "LEGACY"];
210
+ declare const mcpToolFilterSchema: z.ZodObject<{
211
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
212
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
213
+ }, z.core.$strict>;
214
+ declare const mcpGenerationConfigSchema: z.ZodObject<{
215
+ typescriptVersion: z.ZodOptional<z.ZodString>;
216
+ zodVersion: z.ZodOptional<z.ZodString>;
217
+ compilerOptions: z.ZodOptional<z.ZodObject<{
218
+ target: z.ZodOptional<z.ZodString>;
219
+ module: z.ZodOptional<z.ZodString>;
220
+ lib: z.ZodOptional<z.ZodArray<z.ZodString>>;
221
+ }, z.core.$strict>>;
222
+ httpClient: z.ZodOptional<z.ZodObject<{
223
+ name: z.ZodEnum<{
224
+ axios: "axios";
225
+ fetch: "fetch";
226
+ }>;
227
+ }, z.core.$strict>>;
228
+ packageManager: z.ZodOptional<z.ZodEnum<{
229
+ pnpm: "pnpm";
230
+ yarn: "yarn";
231
+ }>>;
232
+ testFramework: z.ZodOptional<z.ZodEnum<{
233
+ jest: "jest";
234
+ vitest: "vitest";
235
+ }>>;
236
+ namingStrategy: z.ZodOptional<z.ZodEnum<{
237
+ base: "base";
238
+ originalPropertyNames: "originalPropertyNames";
239
+ }>>;
240
+ bundle: z.ZodOptional<z.ZodBoolean>;
241
+ exportClassDefault: z.ZodOptional<z.ZodBoolean>;
242
+ allowCustomFetcher: z.ZodOptional<z.ZodBoolean>;
243
+ useBrandedStringAliases: z.ZodOptional<z.ZodBoolean>;
244
+ useLegacyExports: z.ZodOptional<z.ZodBoolean>;
245
+ useBigInt: z.ZodOptional<z.ZodBoolean>;
246
+ serdeLayer: z.ZodOptional<z.ZodBoolean>;
247
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
248
+ name: z.ZodString;
249
+ command: z.ZodString;
250
+ }, z.core.$strict>>>;
251
+ serverName: z.ZodOptional<z.ZodString>;
252
+ serverDescription: z.ZodOptional<z.ZodString>;
253
+ excludeAvailability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
254
+ IN_DEVELOPMENT: "IN_DEVELOPMENT";
255
+ PRE_RELEASE: "PRE_RELEASE";
256
+ GENERAL_AVAILABILITY: "GENERAL_AVAILABILITY";
257
+ DEPRECATED: "DEPRECATED";
258
+ ALPHA: "ALPHA";
259
+ BETA: "BETA";
260
+ PREVIEW: "PREVIEW";
261
+ LEGACY: "LEGACY";
262
+ }>>>;
263
+ tools: z.ZodOptional<z.ZodObject<{
264
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
265
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
266
+ }, z.core.$strict>>;
267
+ toolsets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
268
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
269
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
270
+ }, z.core.$strict>>>;
271
+ }, z.core.$strict>;
272
+ type McpAvailabilityStatus = (typeof mcpAvailabilityStatuses)[number];
273
+ type McpToolFilter = z.infer<typeof mcpToolFilterSchema>;
274
+ type McpGenerationConfig = z.infer<typeof mcpGenerationConfigSchema>;
275
+
276
+ declare const phpGenerationConfigSchema: z.ZodObject<{
277
+ propertyAccess: z.ZodOptional<z.ZodEnum<{
278
+ public: "public";
279
+ private: "private";
280
+ }>>;
281
+ generateClientInterfaces: z.ZodOptional<z.ZodBoolean>;
282
+ }, z.core.$strict>;
283
+ type PhpGenerationConfig = z.infer<typeof phpGenerationConfigSchema>;
284
+
285
+ declare const pythonGenerationConfigSchema: z.ZodObject<{
286
+ pythonVersion: z.ZodOptional<z.ZodString>;
287
+ pydanticVersion: z.ZodOptional<z.ZodString>;
288
+ pydantic: z.ZodOptional<z.ZodObject<{
289
+ versionCompatibility: z.ZodOptional<z.ZodEnum<{
290
+ both: "both";
291
+ v1: "v1";
292
+ v2: "v2";
293
+ "v1-on-v2": "v1-on-v2";
294
+ }>>;
295
+ frozen: z.ZodOptional<z.ZodBoolean>;
296
+ requireOptionalFields: z.ZodOptional<z.ZodBoolean>;
297
+ unionNaming: z.ZodOptional<z.ZodEnum<{
298
+ v0: "v0";
299
+ v1: "v1";
300
+ }>>;
301
+ useFieldAliases: z.ZodOptional<z.ZodBoolean>;
302
+ }, z.core.$strict>>;
303
+ client: z.ZodOptional<z.ZodObject<{
304
+ fileName: z.ZodOptional<z.ZodString>;
305
+ exportedFileName: z.ZodOptional<z.ZodString>;
306
+ }, z.core.$strict>>;
307
+ alwaysInitializeOptionals: z.ZodOptional<z.ZodBoolean>;
308
+ useTypedDictRequests: z.ZodOptional<z.ZodBoolean>;
309
+ }, z.core.$strict>;
310
+ type PythonGenerationConfig = z.infer<typeof pythonGenerationConfigSchema>;
311
+
312
+ declare const rubyGenerationConfigSchema: z.ZodObject<{
313
+ requirePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
314
+ }, z.core.$strict>;
315
+ type RubyGenerationConfig = z.infer<typeof rubyGenerationConfigSchema>;
316
+
317
+ /**
318
+ * Rust keeps crate identity, client naming, and package metadata in the shared fields; only
319
+ * behavior with no cross-language equivalent lives here.
320
+ */
321
+ declare const rustGenerationConfigSchema: z.ZodObject<{
322
+ /**
323
+ * Rust type for datetime primitives. `offset` maps to `DateTime<FixedOffset>` and preserves the
324
+ * timezone the payload carried; `utc` maps to `DateTime<Utc>` and normalizes to UTC.
325
+ */
326
+ dateTimeType: z.ZodOptional<z.ZodEnum<{
327
+ offset: "offset";
328
+ utc: "utc";
329
+ }>>;
330
+ /** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
331
+ capitalizeInitialisms: z.ZodOptional<z.ZodBoolean>;
332
+ /** Cargo features, mapping a feature name to the dependencies or features it enables. */
333
+ features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
334
+ /** Overrides which features make up Cargo's `default` feature set. */
335
+ defaultFeatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
336
+ }, z.core.$strict>;
337
+ type RustGenerationConfig = z.infer<typeof rustGenerationConfigSchema>;
338
+
339
+ declare const swiftGenerationConfigSchema: z.ZodObject<{
340
+ moduleName: z.ZodOptional<z.ZodString>;
341
+ nullableAsOptional: z.ZodOptional<z.ZodBoolean>;
342
+ }, z.core.$strict>;
343
+ type SwiftGenerationConfig = z.infer<typeof swiftGenerationConfigSchema>;
344
+
345
+ declare const planModifiersSchema: z.ZodObject<{
346
+ resources: z.ZodDiscriminatedUnion<[z.ZodObject<{
347
+ enabled: z.ZodLiteral<true>;
348
+ sourceDir: z.ZodString;
349
+ }, z.core.$strict>, z.ZodObject<{
350
+ enabled: z.ZodLiteral<false>;
351
+ }, z.core.$strict>], "enabled">;
352
+ attributes: z.ZodDiscriminatedUnion<[z.ZodObject<{
353
+ enabled: z.ZodLiteral<true>;
354
+ sourceDir: z.ZodString;
355
+ }, z.core.$strict>, z.ZodObject<{
356
+ enabled: z.ZodLiteral<false>;
357
+ }, z.core.$strict>], "enabled">;
358
+ }, z.core.$strict>;
359
+ declare const terraformGenerationConfigSchema: z.ZodObject<{
360
+ providerName: z.ZodOptional<z.ZodString>;
361
+ providerVersion: z.ZodOptional<z.ZodString>;
362
+ providerModulePath: z.ZodOptional<z.ZodString>;
363
+ mockAcceptance: z.ZodOptional<z.ZodBoolean>;
364
+ hideComputedDiff: z.ZodOptional<z.ZodBoolean>;
365
+ providerSchema: z.ZodOptional<z.ZodObject<{
366
+ addressKey: z.ZodString;
367
+ authTokenKey: z.ZodString;
368
+ }, z.core.$strict>>;
369
+ planModifiers: z.ZodOptional<z.ZodObject<{
370
+ resources: z.ZodDiscriminatedUnion<[z.ZodObject<{
371
+ enabled: z.ZodLiteral<true>;
372
+ sourceDir: z.ZodString;
373
+ }, z.core.$strict>, z.ZodObject<{
374
+ enabled: z.ZodLiteral<false>;
375
+ }, z.core.$strict>], "enabled">;
376
+ attributes: z.ZodDiscriminatedUnion<[z.ZodObject<{
377
+ enabled: z.ZodLiteral<true>;
378
+ sourceDir: z.ZodString;
379
+ }, z.core.$strict>, z.ZodObject<{
380
+ enabled: z.ZodLiteral<false>;
381
+ }, z.core.$strict>], "enabled">;
382
+ }, z.core.$strict>>;
383
+ }, z.core.$strict>;
384
+ type PlanModifiers = z.infer<typeof planModifiersSchema>;
385
+ type TerraformGenerationConfig = z.infer<typeof terraformGenerationConfigSchema>;
386
+
387
+ declare const typescriptGenerationConfigSchema: z.ZodObject<{
388
+ typescriptVersion: z.ZodOptional<z.ZodString>;
389
+ zodVersion: z.ZodOptional<z.ZodString>;
390
+ compilerOptions: z.ZodOptional<z.ZodObject<{
391
+ target: z.ZodOptional<z.ZodString>;
392
+ module: z.ZodOptional<z.ZodString>;
393
+ lib: z.ZodOptional<z.ZodArray<z.ZodString>>;
394
+ }, z.core.$strict>>;
395
+ httpClient: z.ZodOptional<z.ZodObject<{
396
+ name: z.ZodEnum<{
397
+ axios: "axios";
398
+ fetch: "fetch";
399
+ }>;
400
+ }, z.core.$strict>>;
401
+ packageManager: z.ZodOptional<z.ZodEnum<{
402
+ pnpm: "pnpm";
403
+ yarn: "yarn";
404
+ }>>;
405
+ testFramework: z.ZodOptional<z.ZodEnum<{
406
+ jest: "jest";
407
+ vitest: "vitest";
408
+ }>>;
409
+ namingStrategy: z.ZodOptional<z.ZodEnum<{
410
+ base: "base";
411
+ originalPropertyNames: "originalPropertyNames";
412
+ }>>;
413
+ bundle: z.ZodOptional<z.ZodBoolean>;
414
+ exportClassDefault: z.ZodOptional<z.ZodBoolean>;
415
+ allowCustomFetcher: z.ZodOptional<z.ZodBoolean>;
416
+ useBrandedStringAliases: z.ZodOptional<z.ZodBoolean>;
417
+ useLegacyExports: z.ZodOptional<z.ZodBoolean>;
418
+ useBigInt: z.ZodOptional<z.ZodBoolean>;
419
+ serdeLayer: z.ZodOptional<z.ZodBoolean>;
420
+ scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
421
+ name: z.ZodString;
422
+ command: z.ZodString;
423
+ }, z.core.$strict>>>;
424
+ }, z.core.$strict>;
425
+ type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
426
+
427
+ export { pythonGenerationConfigSchema as A, relativePathSchema as B, type CliGenerationConfig as C, type Dependency as D, rubyGenerationConfigSchema as E, rustGenerationConfigSchema as F, type GoGenerationConfig as G, swiftGenerationConfigSchema as H, terraformGenerationConfigSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, typescriptGenerationConfigSchema as L, type McpAvailabilityStatus as M, type PackageConfig as P, type RubyGenerationConfig as R, type SwiftGenerationConfig as S, type TerraformGenerationConfig as T, type CsharpGenerationConfig as a, type JsonObject as b, type JsonValue as c, type McpGenerationConfig as d, type McpToolFilter as e, type PhpGenerationConfig as f, type PlanModifiers as g, type PythonGenerationConfig as h, type RustGenerationConfig as i, type TypescriptGenerationConfig as j, cliGenerationConfigSchema as k, composerPackageNameSchema as l, csharpGenerationConfigSchema as m, dependencySchema as n, exactSemverSchema as o, goGenerationConfigSchema as p, goModulePathSchema as q, javaGenerationConfigSchema as r, jsonObjectSchema as s, jsonValueSchema as t, kotlinGenerationConfigSchema as u, mcpAvailabilityStatuses as v, mcpGenerationConfigSchema as w, nonEmptyStringSchema as x, packageConfigSchema as y, phpGenerationConfigSchema as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postman/sdk-config",
3
- "version": "0.0.4",
3
+ "version": "0.1.1",
4
4
  "description": "Shared SDK configuration contracts and transformations for Postman SDK generation",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,
@@ -14,6 +14,16 @@
14
14
  "import": "./dist/index.js",
15
15
  "require": "./dist/index.cjs"
16
16
  },
17
+ "./sdk-config": {
18
+ "types": "./dist/sdk-config/index.d.ts",
19
+ "import": "./dist/sdk-config/index.js",
20
+ "require": "./dist/sdk-config/index.cjs"
21
+ },
22
+ "./sdk-config/v1": {
23
+ "types": "./dist/sdk-config/v1/index.d.ts",
24
+ "import": "./dist/sdk-config/v1/index.js",
25
+ "require": "./dist/sdk-config/v1/index.cjs"
26
+ },
17
27
  "./sdk-config-ir": {
18
28
  "types": "./dist/sdk-config-ir/index.d.ts",
19
29
  "import": "./dist/sdk-config-ir/index.js",
@@ -30,6 +40,7 @@
30
40
  "dist",
31
41
  "docs",
32
42
  "README.md",
43
+ "src/sdk-config/v1/README.md",
33
44
  "src/sdk-config-ir/v1/README.md"
34
45
  ],
35
46
  "repository": {
@@ -37,7 +48,7 @@
37
48
  "url": "git+https://github.com/postman-eng/sdk-config.git"
38
49
  },
39
50
  "publishConfig": {
40
- "access": "restricted"
51
+ "access": "public"
41
52
  },
42
53
  "engines": {
43
54
  "node": ">=24"
@@ -48,10 +59,12 @@
48
59
  "format": "prettier --write .",
49
60
  "format:check": "prettier --check .",
50
61
  "lint": "eslint .",
62
+ "release": "bash scripts/release.sh",
51
63
  "test": "vitest run",
64
+ "test:exports": "node tests/package-exports/sdk-config-subpaths.mjs",
52
65
  "test:watch": "vitest",
53
66
  "typecheck": "tsc --noEmit",
54
- "check": "npm run format:check && npm run lint && npm run typecheck && npm test && npm run build",
67
+ "check": "npm run format:check && npm run lint && npm run typecheck && npm test && npm run build && npm run test:exports",
55
68
  "prepublishOnly": "npm run check"
56
69
  },
57
70
  "dependencies": {
@@ -0,0 +1,135 @@
1
+ # SDK Config v1
2
+
3
+ `SdkConfigV1` is the public, customer-authored configuration for one or more SDK targets. It
4
+ describes portable generation intent and uses the discriminator `schemaVersion: "sdk-config/v1"`.
5
+
6
+ ```ts
7
+ import { parseSdkConfigV1, type SdkConfigV1 } from '@postman/sdk-config/sdk-config/v1';
8
+
9
+ const config: SdkConfigV1 = parseSdkConfigV1(untrustedInput);
10
+ ```
11
+
12
+ ### Convert a Fern generator group
13
+
14
+ The Fern CLI can convert its resolved in-memory generator group without serializing or reparsing
15
+ Fern project files. The mapper has no Fern package dependency: its input is a structural projection
16
+ of the resolved group and generator invocations.
17
+
18
+ ```ts
19
+ import { mapFernConfigToSdkConfigV1 } from '@postman/sdk-config/sdk-config/v1';
20
+
21
+ const { sdkConfig, unsupportedFields } = mapFernConfigToSdkConfigV1({
22
+ apiName: definition.rootApiFile.contents.name,
23
+ apiVersion: definition.specVersion,
24
+ sdkVersion,
25
+ group: {
26
+ name: group.groupName,
27
+ audiences: group.audiences,
28
+ generators: group.generators,
29
+ },
30
+ });
31
+ ```
32
+
33
+ Known generator configuration is normalized into SDK Config fields. Values that have no public v1
34
+ representation are returned in `unsupportedFields`; each issue includes a code, source path,
35
+ severity, reason, suggested manual action, and the SDK Config destination when one exists.
36
+ `FernConfigMappingError.issues` uses the same structure for missing information and other fatal
37
+ cases. Generation must not recover omitted values from legacy configuration. Differing
38
+ target-specific values for a shared SDK Config block are rejected because combining them would
39
+ change behavior. Optional `api` enrichment may be supplied after Fern's definition or IR has already
40
+ been lowered into the public API shape.
41
+
42
+ ## Contract boundaries
43
+
44
+ `SdkConfigV1` is distinct from both existing configuration contracts:
45
+
46
+ - `SdkConfigV1` is customer-facing, may contain multiple one-language targets, and does not select
47
+ the API source. A client or sdk-gen-api supplies a collection ID, specification ID, or uploaded
48
+ file separately.
49
+ - `SdkConfigIrV1` is the normalized, single-target internal input consumed by sdk-gen-core. A server
50
+ expands one `SdkConfigV1` into one IR document per target and supplies source and operational
51
+ metadata.
52
+ - The legacy Postman configuration (`BuildParameters`) is an older producer-specific input. It is
53
+ not accepted by `parseSdkConfigV1`; legacy translators normalize it independently.
54
+
55
+ The public schema deliberately has no `source`, `compatibility`, source-origin, artifact ID, signed
56
+ URL, S3 location, credential-resolution, or server-generated publishing control fields. Unknown
57
+ fields are rejected at every object boundary. Portable API, client, documentation, package, and
58
+ language field schemas come from a neutral shared domain layer to prevent drift; the public and
59
+ internal envelopes and their operational extensions remain separate explicit allowlists.
60
+
61
+ ## Shape
62
+
63
+ ```json
64
+ {
65
+ "schemaVersion": "sdk-config/v1",
66
+ "sdkName": "Acme SDK",
67
+ "sdkVersion": "1.0.0",
68
+ "api": {},
69
+ "client": {},
70
+ "package": { "description": "Acme API SDK" },
71
+ "output": { "delivery": "zip" },
72
+ "docs": {},
73
+ "generation": { "includeWatermark": true },
74
+ "targets": [
75
+ {
76
+ "language": "typescript",
77
+ "package": { "packageName": "@acme/sdk" },
78
+ "generation": { "packageManager": "pnpm" }
79
+ },
80
+ {
81
+ "language": "python",
82
+ "sdkName": "Acme Python SDK",
83
+ "package": { "packageName": "acme-sdk" },
84
+ "output": { "delivery": "files" },
85
+ "generation": { "pythonVersion": "3.11" }
86
+ }
87
+ ]
88
+ }
89
+ ```
90
+
91
+ Each target has exactly one `language`. A language may occur only once, so both identical duplicate
92
+ targets and differing targets that conflict on the same language are rejected. `generatorVersion`
93
+ is an optional target-only exact semantic version.
94
+
95
+ ## Supported languages
96
+
97
+ SdkConfig v1 is language-agnostic across every sdk-gen-core target available when this contract was
98
+ defined. Each language has an explicitly allowlisted `generation` shape:
99
+
100
+ | Language | `language` value | Representative target setting |
101
+ | ---------- | ---------------- | ----------------------------- |
102
+ | TypeScript | `typescript` | `packageManager` |
103
+ | Python | `python` | `pythonVersion` |
104
+ | Java | `java` | `includeKotlinSnippets` |
105
+ | Kotlin | `kotlin` | `asyncStyle` |
106
+ | Go | `go` | `clientConstructorName` |
107
+ | C# | `csharp` | `useOptionalWrapper` |
108
+ | PHP | `php` | `propertyAccess` |
109
+ | Ruby | `ruby` | `requirePaths` |
110
+ | Rust | `rust` | `dateTimeType` |
111
+ | Swift | `swift` | `moduleName` |
112
+ | CLI | `cli` | `skills` |
113
+ | MCP | `mcp` | `serverName` |
114
+ | Terraform | `terraform` | `providerName` |
115
+
116
+ Adding an internal language setting to `SdkConfigIrV1` does not add it here. Portable settings are
117
+ added to the shared domain deliberately; IR-only settings remain explicit internal extensions.
118
+
119
+ ## Precedence
120
+
121
+ When a server expands the public config into single-target IR documents, it applies these rules:
122
+
123
+ | Configuration | Rule |
124
+ | ----------------------- | --------------------------------------------------------------------------------------------------------------- |
125
+ | `api`, `client`, `docs` | Shared unchanged by every target; no target override exists. |
126
+ | Root `generation` | Shared generation behavior for every target. |
127
+ | Target `generation` | Language-specific settings for that target; it supplements the disjoint shared settings. |
128
+ | `sdkName`, `sdkVersion` | A target value wins; otherwise the root value is inherited. |
129
+ | `package` | Target properties override root properties; omitted properties inherit. Arrays replace rather than concatenate. |
130
+ | `output` | A target block replaces the complete root output block; otherwise the root block is inherited. |
131
+ | `apiVersion` | Shared unchanged by every target. |
132
+
133
+ Package publication requirements are validated after applying package and output precedence. For
134
+ example, a TypeScript target publishing to npm may inherit a root `packageName`, while a Python
135
+ target must replace an inherited npm output with a PyPI-compatible output.