@postman/sdk-config 0.0.4 → 0.1.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/README.md +42 -17
- package/dist/index.cjs +2011 -181
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1974 -182
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +2233 -0
- package/dist/sdk-config/index.cjs.map +1 -0
- package/dist/sdk-config/index.d.cts +3 -0
- package/dist/sdk-config/index.d.ts +3 -0
- package/dist/sdk-config/index.js +2192 -0
- package/dist/sdk-config/index.js.map +1 -0
- package/dist/sdk-config/v1/index.cjs +2233 -0
- package/dist/sdk-config/v1/index.cjs.map +1 -0
- package/dist/sdk-config/v1/index.d.cts +8644 -0
- package/dist/sdk-config/v1/index.d.ts +8644 -0
- package/dist/sdk-config/v1/index.js +2192 -0
- package/dist/sdk-config/v1/index.js.map +1 -0
- package/dist/sdk-config-ir/index.cjs +147 -18
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +2 -1
- package/dist/sdk-config-ir/index.d.ts +2 -1
- package/dist/sdk-config-ir/index.js +146 -19
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +147 -18
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +422 -400
- package/dist/sdk-config-ir/v1/index.d.ts +422 -400
- package/dist/sdk-config-ir/v1/index.js +146 -19
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/typescript-ByDbin_v.d.cts +426 -0
- package/dist/typescript-ByDbin_v.d.ts +426 -0
- package/package.json +15 -2
- package/src/sdk-config/v1/README.md +135 -0
- package/src/sdk-config-ir/v1/README.md +44 -26
|
@@ -0,0 +1,426 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const nonEmptyStringSchema: z.ZodString;
|
|
4
|
+
declare const exactSemverSchema: z.ZodString;
|
|
5
|
+
type JsonValue = null | boolean | number | string | JsonValue[] | JsonObject;
|
|
6
|
+
type JsonObject = {
|
|
7
|
+
[key: string]: JsonValue;
|
|
8
|
+
};
|
|
9
|
+
declare const jsonValueSchema: z.ZodType<JsonValue>;
|
|
10
|
+
declare const jsonObjectSchema: z.ZodType<JsonObject>;
|
|
11
|
+
|
|
12
|
+
declare const goModulePathSchema: z.ZodString;
|
|
13
|
+
declare const composerPackageNameSchema: z.ZodString;
|
|
14
|
+
declare const dependencySchema: z.ZodObject<{
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
version: z.ZodOptional<z.ZodString>;
|
|
17
|
+
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
18
|
+
type: z.ZodLiteral<"registry">;
|
|
19
|
+
registry: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21
|
+
type: z.ZodLiteral<"git">;
|
|
22
|
+
url: z.ZodString;
|
|
23
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
24
|
+
subdirectory: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
26
|
+
type: z.ZodLiteral<"path">;
|
|
27
|
+
path: z.ZodString;
|
|
28
|
+
}, z.core.$strict>], "type">>;
|
|
29
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
30
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
|
+
extras: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
32
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
defaultFeatures: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
environmentMarker: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
declare const packageConfigSchema: z.ZodObject<{
|
|
37
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
38
|
+
moduleName: z.ZodOptional<z.ZodString>;
|
|
39
|
+
modulePath: z.ZodOptional<z.ZodString>;
|
|
40
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
41
|
+
groupId: z.ZodOptional<z.ZodString>;
|
|
42
|
+
artifactId: z.ZodOptional<z.ZodString>;
|
|
43
|
+
description: z.ZodOptional<z.ZodString>;
|
|
44
|
+
repository: z.ZodOptional<z.ZodString>;
|
|
45
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
46
|
+
documentationUrl: z.ZodOptional<z.ZodString>;
|
|
47
|
+
authors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
50
|
+
}, z.core.$strict>>>;
|
|
51
|
+
developers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
|
+
name: z.ZodString;
|
|
53
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
54
|
+
organization: z.ZodOptional<z.ZodString>;
|
|
55
|
+
organizationUrl: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, z.core.$strict>>>;
|
|
57
|
+
license: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
type: z.ZodString;
|
|
59
|
+
name: z.ZodOptional<z.ZodString>;
|
|
60
|
+
url: z.ZodOptional<z.ZodString>;
|
|
61
|
+
path: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strict>>;
|
|
63
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
64
|
+
classifiers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
|
+
projectUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
66
|
+
label: z.ZodString;
|
|
67
|
+
url: z.ZodString;
|
|
68
|
+
}, z.core.$strict>>>;
|
|
69
|
+
extraDependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
|
+
name: z.ZodString;
|
|
71
|
+
version: z.ZodOptional<z.ZodString>;
|
|
72
|
+
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
73
|
+
type: z.ZodLiteral<"registry">;
|
|
74
|
+
registry: z.ZodOptional<z.ZodString>;
|
|
75
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
76
|
+
type: z.ZodLiteral<"git">;
|
|
77
|
+
url: z.ZodString;
|
|
78
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
79
|
+
subdirectory: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
81
|
+
type: z.ZodLiteral<"path">;
|
|
82
|
+
path: z.ZodString;
|
|
83
|
+
}, z.core.$strict>], "type">>;
|
|
84
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
85
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
86
|
+
extras: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
+
defaultFeatures: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
environmentMarker: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strict>>>;
|
|
91
|
+
extraDevDependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
92
|
+
name: z.ZodString;
|
|
93
|
+
version: z.ZodOptional<z.ZodString>;
|
|
94
|
+
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
95
|
+
type: z.ZodLiteral<"registry">;
|
|
96
|
+
registry: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
98
|
+
type: z.ZodLiteral<"git">;
|
|
99
|
+
url: z.ZodString;
|
|
100
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
101
|
+
subdirectory: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
103
|
+
type: z.ZodLiteral<"path">;
|
|
104
|
+
path: z.ZodString;
|
|
105
|
+
}, z.core.$strict>], "type">>;
|
|
106
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
107
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
108
|
+
extras: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
defaultFeatures: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
+
environmentMarker: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strict>>>;
|
|
113
|
+
extraPeerDependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
114
|
+
name: z.ZodString;
|
|
115
|
+
version: z.ZodOptional<z.ZodString>;
|
|
116
|
+
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
117
|
+
type: z.ZodLiteral<"registry">;
|
|
118
|
+
registry: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
120
|
+
type: z.ZodLiteral<"git">;
|
|
121
|
+
url: z.ZodString;
|
|
122
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
123
|
+
subdirectory: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
125
|
+
type: z.ZodLiteral<"path">;
|
|
126
|
+
path: z.ZodString;
|
|
127
|
+
}, z.core.$strict>], "type">>;
|
|
128
|
+
packageName: z.ZodOptional<z.ZodString>;
|
|
129
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
130
|
+
extras: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
defaultFeatures: z.ZodOptional<z.ZodBoolean>;
|
|
133
|
+
environmentMarker: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strict>>>;
|
|
135
|
+
}, z.core.$strict>;
|
|
136
|
+
type Dependency = z.infer<typeof dependencySchema>;
|
|
137
|
+
type PackageConfig = z.infer<typeof packageConfigSchema>;
|
|
138
|
+
|
|
139
|
+
declare const cliGenerationConfigSchema: z.ZodObject<{
|
|
140
|
+
paginationParameters: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
141
|
+
skills: z.ZodOptional<z.ZodBoolean>;
|
|
142
|
+
}, z.core.$strict>;
|
|
143
|
+
type CliGenerationConfig = z.infer<typeof cliGenerationConfigSchema>;
|
|
144
|
+
|
|
145
|
+
declare const csharpGenerationConfigSchema: z.ZodObject<{
|
|
146
|
+
useOptionalWrapper: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
simplifyObjectDictionaries: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
+
explicitNamespaces: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
rootNamespaceForCoreClasses: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
+
includeExceptionHandler: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
+
experimentalExplicitNullableOptional: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
+
}, z.core.$strict>;
|
|
153
|
+
type CsharpGenerationConfig = z.infer<typeof csharpGenerationConfigSchema>;
|
|
154
|
+
|
|
155
|
+
declare const goGenerationConfigSchema: z.ZodObject<{
|
|
156
|
+
legacyComplexModels: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
+
/** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
|
|
158
|
+
smartCasing: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
+
/** Overrides the fern root-client constructor independently from the client type name. */
|
|
160
|
+
clientConstructorName: z.ZodOptional<z.ZodString>;
|
|
161
|
+
unionVersion: z.ZodOptional<z.ZodEnum<{
|
|
162
|
+
v0: "v0";
|
|
163
|
+
v1: "v1";
|
|
164
|
+
}>>;
|
|
165
|
+
includeLegacyClientOptions: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
+
}, z.core.$strict>;
|
|
167
|
+
type GoGenerationConfig = z.infer<typeof goGenerationConfigSchema>;
|
|
168
|
+
|
|
169
|
+
declare const javaGenerationConfigSchema: z.ZodObject<{
|
|
170
|
+
packageLayout: z.ZodOptional<z.ZodEnum<{
|
|
171
|
+
flat: "flat";
|
|
172
|
+
nested: "nested";
|
|
173
|
+
}>>;
|
|
174
|
+
useLocalDateForDates: z.ZodOptional<z.ZodBoolean>;
|
|
175
|
+
collapseOptionalNullable: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
+
gradleDistributionUrl: z.ZodOptional<z.ZodString>;
|
|
177
|
+
gradlePluginManagement: z.ZodOptional<z.ZodString>;
|
|
178
|
+
gradleCentralDependencyManagement: z.ZodOptional<z.ZodBoolean>;
|
|
179
|
+
asyncStyle: z.ZodOptional<z.ZodEnum<{
|
|
180
|
+
"dedicated-client": "dedicated-client";
|
|
181
|
+
"twin-methods": "twin-methods";
|
|
182
|
+
}>>;
|
|
183
|
+
includeKotlinSnippets: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
+
}, z.core.$strict>;
|
|
185
|
+
type JavaGenerationConfig = z.infer<typeof javaGenerationConfigSchema>;
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Kotlin targets use the shared Java/JVM generator and always include Kotlin-facing
|
|
189
|
+
* examples, snippets, and documentation.
|
|
190
|
+
*/
|
|
191
|
+
declare const kotlinGenerationConfigSchema: z.ZodObject<{
|
|
192
|
+
packageLayout: z.ZodOptional<z.ZodEnum<{
|
|
193
|
+
flat: "flat";
|
|
194
|
+
nested: "nested";
|
|
195
|
+
}>>;
|
|
196
|
+
useLocalDateForDates: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
+
collapseOptionalNullable: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
gradleDistributionUrl: z.ZodOptional<z.ZodString>;
|
|
199
|
+
gradlePluginManagement: z.ZodOptional<z.ZodString>;
|
|
200
|
+
gradleCentralDependencyManagement: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
asyncStyle: z.ZodOptional<z.ZodEnum<{
|
|
202
|
+
"dedicated-client": "dedicated-client";
|
|
203
|
+
"twin-methods": "twin-methods";
|
|
204
|
+
}>>;
|
|
205
|
+
}, z.core.$strict>;
|
|
206
|
+
type KotlinGenerationConfig = z.infer<typeof kotlinGenerationConfigSchema>;
|
|
207
|
+
|
|
208
|
+
declare const mcpAvailabilityStatuses: readonly ["IN_DEVELOPMENT", "PRE_RELEASE", "GENERAL_AVAILABILITY", "DEPRECATED", "ALPHA", "BETA", "PREVIEW", "LEGACY"];
|
|
209
|
+
declare const mcpToolFilterSchema: z.ZodObject<{
|
|
210
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
211
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
212
|
+
}, z.core.$strict>;
|
|
213
|
+
declare const mcpGenerationConfigSchema: z.ZodObject<{
|
|
214
|
+
typescriptVersion: z.ZodOptional<z.ZodString>;
|
|
215
|
+
zodVersion: z.ZodOptional<z.ZodString>;
|
|
216
|
+
compilerOptions: z.ZodOptional<z.ZodObject<{
|
|
217
|
+
target: z.ZodOptional<z.ZodString>;
|
|
218
|
+
module: z.ZodOptional<z.ZodString>;
|
|
219
|
+
lib: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
220
|
+
}, z.core.$strict>>;
|
|
221
|
+
httpClient: z.ZodOptional<z.ZodObject<{
|
|
222
|
+
name: z.ZodEnum<{
|
|
223
|
+
axios: "axios";
|
|
224
|
+
fetch: "fetch";
|
|
225
|
+
}>;
|
|
226
|
+
}, z.core.$strict>>;
|
|
227
|
+
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
228
|
+
pnpm: "pnpm";
|
|
229
|
+
yarn: "yarn";
|
|
230
|
+
}>>;
|
|
231
|
+
testFramework: z.ZodOptional<z.ZodEnum<{
|
|
232
|
+
jest: "jest";
|
|
233
|
+
vitest: "vitest";
|
|
234
|
+
}>>;
|
|
235
|
+
namingStrategy: z.ZodOptional<z.ZodEnum<{
|
|
236
|
+
base: "base";
|
|
237
|
+
originalPropertyNames: "originalPropertyNames";
|
|
238
|
+
}>>;
|
|
239
|
+
bundle: z.ZodOptional<z.ZodBoolean>;
|
|
240
|
+
exportClassDefault: z.ZodOptional<z.ZodBoolean>;
|
|
241
|
+
allowCustomFetcher: z.ZodOptional<z.ZodBoolean>;
|
|
242
|
+
useBrandedStringAliases: z.ZodOptional<z.ZodBoolean>;
|
|
243
|
+
useLegacyExports: z.ZodOptional<z.ZodBoolean>;
|
|
244
|
+
useBigInt: z.ZodOptional<z.ZodBoolean>;
|
|
245
|
+
serdeLayer: z.ZodOptional<z.ZodBoolean>;
|
|
246
|
+
scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
247
|
+
name: z.ZodString;
|
|
248
|
+
command: z.ZodString;
|
|
249
|
+
}, z.core.$strict>>>;
|
|
250
|
+
serverName: z.ZodOptional<z.ZodString>;
|
|
251
|
+
serverDescription: z.ZodOptional<z.ZodString>;
|
|
252
|
+
excludeAvailability: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
253
|
+
IN_DEVELOPMENT: "IN_DEVELOPMENT";
|
|
254
|
+
PRE_RELEASE: "PRE_RELEASE";
|
|
255
|
+
GENERAL_AVAILABILITY: "GENERAL_AVAILABILITY";
|
|
256
|
+
DEPRECATED: "DEPRECATED";
|
|
257
|
+
ALPHA: "ALPHA";
|
|
258
|
+
BETA: "BETA";
|
|
259
|
+
PREVIEW: "PREVIEW";
|
|
260
|
+
LEGACY: "LEGACY";
|
|
261
|
+
}>>>;
|
|
262
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
263
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
264
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
265
|
+
}, z.core.$strict>>;
|
|
266
|
+
toolsets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
267
|
+
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
268
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
269
|
+
}, z.core.$strict>>>;
|
|
270
|
+
}, z.core.$strict>;
|
|
271
|
+
type McpAvailabilityStatus = (typeof mcpAvailabilityStatuses)[number];
|
|
272
|
+
type McpToolFilter = z.infer<typeof mcpToolFilterSchema>;
|
|
273
|
+
type McpGenerationConfig = z.infer<typeof mcpGenerationConfigSchema>;
|
|
274
|
+
|
|
275
|
+
declare const phpGenerationConfigSchema: z.ZodObject<{
|
|
276
|
+
propertyAccess: z.ZodOptional<z.ZodEnum<{
|
|
277
|
+
public: "public";
|
|
278
|
+
private: "private";
|
|
279
|
+
}>>;
|
|
280
|
+
generateClientInterfaces: z.ZodOptional<z.ZodBoolean>;
|
|
281
|
+
}, z.core.$strict>;
|
|
282
|
+
type PhpGenerationConfig = z.infer<typeof phpGenerationConfigSchema>;
|
|
283
|
+
|
|
284
|
+
declare const pythonGenerationConfigSchema: z.ZodObject<{
|
|
285
|
+
pythonVersion: z.ZodOptional<z.ZodString>;
|
|
286
|
+
pydanticVersion: z.ZodOptional<z.ZodString>;
|
|
287
|
+
pydantic: z.ZodOptional<z.ZodObject<{
|
|
288
|
+
versionCompatibility: z.ZodOptional<z.ZodEnum<{
|
|
289
|
+
both: "both";
|
|
290
|
+
v1: "v1";
|
|
291
|
+
v2: "v2";
|
|
292
|
+
"v1-on-v2": "v1-on-v2";
|
|
293
|
+
}>>;
|
|
294
|
+
frozen: z.ZodOptional<z.ZodBoolean>;
|
|
295
|
+
requireOptionalFields: z.ZodOptional<z.ZodBoolean>;
|
|
296
|
+
unionNaming: z.ZodOptional<z.ZodEnum<{
|
|
297
|
+
v0: "v0";
|
|
298
|
+
v1: "v1";
|
|
299
|
+
}>>;
|
|
300
|
+
useFieldAliases: z.ZodOptional<z.ZodBoolean>;
|
|
301
|
+
}, z.core.$strict>>;
|
|
302
|
+
client: z.ZodOptional<z.ZodObject<{
|
|
303
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
304
|
+
exportedFileName: z.ZodOptional<z.ZodString>;
|
|
305
|
+
}, z.core.$strict>>;
|
|
306
|
+
alwaysInitializeOptionals: z.ZodOptional<z.ZodBoolean>;
|
|
307
|
+
useTypedDictRequests: z.ZodOptional<z.ZodBoolean>;
|
|
308
|
+
}, z.core.$strict>;
|
|
309
|
+
type PythonGenerationConfig = z.infer<typeof pythonGenerationConfigSchema>;
|
|
310
|
+
|
|
311
|
+
declare const rubyGenerationConfigSchema: z.ZodObject<{
|
|
312
|
+
requirePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
313
|
+
}, z.core.$strict>;
|
|
314
|
+
type RubyGenerationConfig = z.infer<typeof rubyGenerationConfigSchema>;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Rust keeps crate identity, client naming, and package metadata in the shared fields; only
|
|
318
|
+
* behavior with no cross-language equivalent lives here.
|
|
319
|
+
*/
|
|
320
|
+
declare const rustGenerationConfigSchema: z.ZodObject<{
|
|
321
|
+
/**
|
|
322
|
+
* Rust type for datetime primitives. `offset` maps to `DateTime<FixedOffset>` and preserves the
|
|
323
|
+
* timezone the payload carried; `utc` maps to `DateTime<Utc>` and normalizes to UTC.
|
|
324
|
+
*/
|
|
325
|
+
dateTimeType: z.ZodOptional<z.ZodEnum<{
|
|
326
|
+
offset: "offset";
|
|
327
|
+
utc: "utc";
|
|
328
|
+
}>>;
|
|
329
|
+
/** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
|
|
330
|
+
capitalizeInitialisms: z.ZodOptional<z.ZodBoolean>;
|
|
331
|
+
/** Cargo features, mapping a feature name to the dependencies or features it enables. */
|
|
332
|
+
features: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
333
|
+
/** Overrides which features make up Cargo's `default` feature set. */
|
|
334
|
+
defaultFeatures: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
335
|
+
}, z.core.$strict>;
|
|
336
|
+
type RustGenerationConfig = z.infer<typeof rustGenerationConfigSchema>;
|
|
337
|
+
|
|
338
|
+
declare const swiftGenerationConfigSchema: z.ZodObject<{
|
|
339
|
+
moduleName: z.ZodOptional<z.ZodString>;
|
|
340
|
+
nullableAsOptional: z.ZodOptional<z.ZodBoolean>;
|
|
341
|
+
}, z.core.$strict>;
|
|
342
|
+
type SwiftGenerationConfig = z.infer<typeof swiftGenerationConfigSchema>;
|
|
343
|
+
|
|
344
|
+
declare const planModifiersSchema: z.ZodObject<{
|
|
345
|
+
resources: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
346
|
+
enabled: z.ZodLiteral<true>;
|
|
347
|
+
sourceDir: z.ZodString;
|
|
348
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
349
|
+
enabled: z.ZodLiteral<false>;
|
|
350
|
+
}, z.core.$strict>], "enabled">;
|
|
351
|
+
attributes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
352
|
+
enabled: z.ZodLiteral<true>;
|
|
353
|
+
sourceDir: z.ZodString;
|
|
354
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
355
|
+
enabled: z.ZodLiteral<false>;
|
|
356
|
+
}, z.core.$strict>], "enabled">;
|
|
357
|
+
}, z.core.$strict>;
|
|
358
|
+
declare const terraformGenerationConfigSchema: z.ZodObject<{
|
|
359
|
+
providerName: z.ZodOptional<z.ZodString>;
|
|
360
|
+
providerVersion: z.ZodOptional<z.ZodString>;
|
|
361
|
+
providerModulePath: z.ZodOptional<z.ZodString>;
|
|
362
|
+
mockAcceptance: z.ZodOptional<z.ZodBoolean>;
|
|
363
|
+
hideComputedDiff: z.ZodOptional<z.ZodBoolean>;
|
|
364
|
+
providerSchema: z.ZodOptional<z.ZodObject<{
|
|
365
|
+
addressKey: z.ZodString;
|
|
366
|
+
authTokenKey: z.ZodString;
|
|
367
|
+
}, z.core.$strict>>;
|
|
368
|
+
planModifiers: z.ZodOptional<z.ZodObject<{
|
|
369
|
+
resources: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
370
|
+
enabled: z.ZodLiteral<true>;
|
|
371
|
+
sourceDir: z.ZodString;
|
|
372
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
373
|
+
enabled: z.ZodLiteral<false>;
|
|
374
|
+
}, z.core.$strict>], "enabled">;
|
|
375
|
+
attributes: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
376
|
+
enabled: z.ZodLiteral<true>;
|
|
377
|
+
sourceDir: z.ZodString;
|
|
378
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
379
|
+
enabled: z.ZodLiteral<false>;
|
|
380
|
+
}, z.core.$strict>], "enabled">;
|
|
381
|
+
}, z.core.$strict>>;
|
|
382
|
+
}, z.core.$strict>;
|
|
383
|
+
type PlanModifiers = z.infer<typeof planModifiersSchema>;
|
|
384
|
+
type TerraformGenerationConfig = z.infer<typeof terraformGenerationConfigSchema>;
|
|
385
|
+
|
|
386
|
+
declare const typescriptGenerationConfigSchema: z.ZodObject<{
|
|
387
|
+
typescriptVersion: z.ZodOptional<z.ZodString>;
|
|
388
|
+
zodVersion: z.ZodOptional<z.ZodString>;
|
|
389
|
+
compilerOptions: z.ZodOptional<z.ZodObject<{
|
|
390
|
+
target: z.ZodOptional<z.ZodString>;
|
|
391
|
+
module: z.ZodOptional<z.ZodString>;
|
|
392
|
+
lib: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
393
|
+
}, z.core.$strict>>;
|
|
394
|
+
httpClient: z.ZodOptional<z.ZodObject<{
|
|
395
|
+
name: z.ZodEnum<{
|
|
396
|
+
axios: "axios";
|
|
397
|
+
fetch: "fetch";
|
|
398
|
+
}>;
|
|
399
|
+
}, z.core.$strict>>;
|
|
400
|
+
packageManager: z.ZodOptional<z.ZodEnum<{
|
|
401
|
+
pnpm: "pnpm";
|
|
402
|
+
yarn: "yarn";
|
|
403
|
+
}>>;
|
|
404
|
+
testFramework: z.ZodOptional<z.ZodEnum<{
|
|
405
|
+
jest: "jest";
|
|
406
|
+
vitest: "vitest";
|
|
407
|
+
}>>;
|
|
408
|
+
namingStrategy: z.ZodOptional<z.ZodEnum<{
|
|
409
|
+
base: "base";
|
|
410
|
+
originalPropertyNames: "originalPropertyNames";
|
|
411
|
+
}>>;
|
|
412
|
+
bundle: z.ZodOptional<z.ZodBoolean>;
|
|
413
|
+
exportClassDefault: z.ZodOptional<z.ZodBoolean>;
|
|
414
|
+
allowCustomFetcher: z.ZodOptional<z.ZodBoolean>;
|
|
415
|
+
useBrandedStringAliases: z.ZodOptional<z.ZodBoolean>;
|
|
416
|
+
useLegacyExports: z.ZodOptional<z.ZodBoolean>;
|
|
417
|
+
useBigInt: z.ZodOptional<z.ZodBoolean>;
|
|
418
|
+
serdeLayer: z.ZodOptional<z.ZodBoolean>;
|
|
419
|
+
scripts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
420
|
+
name: z.ZodString;
|
|
421
|
+
command: z.ZodString;
|
|
422
|
+
}, z.core.$strict>>>;
|
|
423
|
+
}, z.core.$strict>;
|
|
424
|
+
type TypescriptGenerationConfig = z.infer<typeof typescriptGenerationConfigSchema>;
|
|
425
|
+
|
|
426
|
+
export { pythonGenerationConfigSchema as A, rubyGenerationConfigSchema as B, type CliGenerationConfig as C, type Dependency as D, rustGenerationConfigSchema as E, swiftGenerationConfigSchema as F, type GoGenerationConfig as G, terraformGenerationConfigSchema as H, typescriptGenerationConfigSchema as I, type JavaGenerationConfig as J, type KotlinGenerationConfig as K, 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
|
|
3
|
+
"version": "0.1.0",
|
|
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": {
|
|
@@ -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.
|