@postman/sdk-config 0.6.0 → 0.8.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 +1 -3
- package/dist/index.cjs +916 -765
- 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 +916 -765
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +678 -562
- 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 +678 -562
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +678 -562
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +74 -934
- package/dist/sdk-config/v1/index.d.ts +74 -934
- package/dist/sdk-config/v1/index.js +678 -562
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +607 -537
- 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 +607 -537
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +607 -537
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +25 -7
- package/dist/sdk-config-ir/v1/index.d.ts +25 -7
- package/dist/sdk-config-ir/v1/index.js +607 -537
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-BruxA5zG.d.cts → typescript-Chge0X4f.d.cts} +8 -1
- package/dist/{typescript-BruxA5zG.d.ts → typescript-Chge0X4f.d.ts} +8 -1
- package/package.json +1 -1
- package/src/sdk-config/v1/README.md +15 -14
- package/src/sdk-config-ir/v1/README.md +4 -2
|
@@ -38,140 +38,152 @@ var hashAlgorithmSchema = zod.z.enum(["sha1", "sha256", "sha384", "sha512"]);
|
|
|
38
38
|
var encodingSchema = zod.z.enum(["base64", "hex"]);
|
|
39
39
|
var payloadComponentSchema = zod.z.enum(["body", "timestamp", "notification-url", "message-id"]);
|
|
40
40
|
var payloadFormatSchema = zod.z.strictObject({
|
|
41
|
-
components: zod.z.array(payloadComponentSchema).min(1),
|
|
42
|
-
delimiter: zod.z.string().optional(),
|
|
41
|
+
components: zod.z.array(payloadComponentSchema).min(1).describe("Payload components concatenated in declaration order before signing."),
|
|
42
|
+
delimiter: zod.z.string().optional().describe("The delimiter inserted between payload components."),
|
|
43
43
|
/**
|
|
44
44
|
* Set when the body is a form-encoded parameter map that must be canonicalized before signing:
|
|
45
45
|
* keys sorted, each key's values deduped and sorted, concatenated as key-value pairs.
|
|
46
46
|
*/
|
|
47
|
-
bodySort: zod.z.literal("alphabetical").optional()
|
|
47
|
+
bodySort: zod.z.literal("alphabetical").optional().describe("Canonicalizes form body keys and values alphabetically before signing.")
|
|
48
48
|
});
|
|
49
49
|
var timestampSchema = zod.z.strictObject({
|
|
50
|
-
header: nonEmptyStringSchema,
|
|
51
|
-
format: zod.z.enum(["unix-seconds", "unix-millis", "iso8601"]).optional(),
|
|
50
|
+
header: nonEmptyStringSchema.describe("The request header containing the signing timestamp."),
|
|
51
|
+
format: zod.z.enum(["unix-seconds", "unix-millis", "iso8601"]).optional().describe("The timestamp format used in the signature payload."),
|
|
52
52
|
/** Replay window in seconds. */
|
|
53
|
-
tolerance: zod.z.number().positive().optional()
|
|
53
|
+
tolerance: zod.z.number().positive().optional().describe("The maximum accepted timestamp age, in seconds.")
|
|
54
54
|
});
|
|
55
55
|
var bodyHashLocationSchema = zod.z.discriminatedUnion("type", [
|
|
56
56
|
zod.z.strictObject({
|
|
57
|
-
type: zod.z.literal("query-parameter"),
|
|
58
|
-
name: nonEmptyStringSchema
|
|
57
|
+
type: zod.z.literal("query-parameter").describe("Reads the body hash from a query parameter."),
|
|
58
|
+
name: nonEmptyStringSchema.describe("The query parameter containing the body hash.")
|
|
59
59
|
})
|
|
60
60
|
]);
|
|
61
61
|
var bodyHashBindingSchema = zod.z.strictObject({
|
|
62
|
-
algorithm: hashAlgorithmSchema,
|
|
63
|
-
encoding: encodingSchema.optional(),
|
|
64
|
-
location: bodyHashLocationSchema
|
|
62
|
+
algorithm: hashAlgorithmSchema.describe("The hash algorithm applied to the raw request body."),
|
|
63
|
+
encoding: encodingSchema.optional().describe("The encoding used for the body hash."),
|
|
64
|
+
location: bodyHashLocationSchema.describe("Where the expected body hash is read from.")
|
|
65
65
|
});
|
|
66
66
|
var urlNormalizationSchema = zod.z.strictObject({
|
|
67
67
|
/** Try the URL with and without an explicit default port. */
|
|
68
|
-
portVariants: zod.z.boolean().optional(),
|
|
68
|
+
portVariants: zod.z.boolean().optional().describe("Whether verification tries URLs with and without an explicit default port."),
|
|
69
69
|
/** Try the URL with the pre-RFC3986 query encoding (`+` for space, unescaped `*`). */
|
|
70
|
-
legacyQueryEncoding: zod.z.boolean().optional()
|
|
70
|
+
legacyQueryEncoding: zod.z.boolean().optional().describe("Whether verification also tries legacy form-style query encoding.")
|
|
71
71
|
}).refine(
|
|
72
72
|
({ portVariants, legacyQueryEncoding }) => portVariants === true || legacyQueryEncoding === true,
|
|
73
73
|
{ message: "url normalization must enable at least one variant" }
|
|
74
74
|
);
|
|
75
75
|
var webhookSignatureSchema = zod.z.discriminatedUnion("type", [
|
|
76
76
|
zod.z.strictObject({
|
|
77
|
-
type: zod.z.literal("hmac"),
|
|
77
|
+
type: zod.z.literal("hmac").describe("Identifies HMAC webhook signature verification."),
|
|
78
78
|
/** Request header carrying the signature. */
|
|
79
|
-
header: nonEmptyStringSchema,
|
|
80
|
-
algorithm: hashAlgorithmSchema.optional(),
|
|
81
|
-
encoding: encodingSchema.optional(),
|
|
79
|
+
header: nonEmptyStringSchema.describe("The request header containing the signature."),
|
|
80
|
+
algorithm: hashAlgorithmSchema.optional().describe("The HMAC hash algorithm."),
|
|
81
|
+
encoding: encodingSchema.optional().describe("The encoding used for the HMAC signature."),
|
|
82
82
|
/** Stripped from the header value before comparison, e.g. `sha256=`. */
|
|
83
|
-
signaturePrefix: zod.z.string().optional(),
|
|
84
|
-
payloadFormat: payloadFormatSchema.optional(),
|
|
85
|
-
timestamp: timestampSchema.optional(),
|
|
86
|
-
bodyHashBinding: bodyHashBindingSchema.optional(),
|
|
87
|
-
urlNormalization: urlNormalizationSchema.optional()
|
|
83
|
+
signaturePrefix: zod.z.string().optional().describe("A prefix removed from the signature header before comparison."),
|
|
84
|
+
payloadFormat: payloadFormatSchema.optional().describe("How the payload signed by the provider is assembled."),
|
|
85
|
+
timestamp: timestampSchema.optional().describe("Timestamp validation included in signature verification."),
|
|
86
|
+
bodyHashBinding: bodyHashBindingSchema.optional().describe("A separately transmitted hash that binds the raw body to the signed payload."),
|
|
87
|
+
urlNormalization: urlNormalizationSchema.optional().describe("Alternate notification URL forms accepted during verification.")
|
|
88
88
|
})
|
|
89
89
|
]);
|
|
90
90
|
|
|
91
91
|
// src/sdk-config-domain/v1/api.ts
|
|
92
92
|
var authVariableSchema = zod.z.strictObject({
|
|
93
|
-
name: nonEmptyStringSchema.optional(),
|
|
94
|
-
environmentVariable: nonEmptyStringSchema.optional(),
|
|
95
|
-
description: zod.z.string().optional()
|
|
96
|
-
|
|
93
|
+
name: nonEmptyStringSchema.optional().describe("The parameter name exposed by the SDK."),
|
|
94
|
+
environmentVariable: nonEmptyStringSchema.optional().describe("The environment variable used to populate the parameter."),
|
|
95
|
+
description: zod.z.string().optional().describe(
|
|
96
|
+
"A description of the authentication parameter included in generated SDK documentation."
|
|
97
|
+
),
|
|
98
|
+
omit: zod.z.boolean().optional().describe("Whether the parameter is omitted from the SDK surface.")
|
|
97
99
|
});
|
|
98
100
|
var apiKeyAuthSchema = zod.z.strictObject({
|
|
99
|
-
id: nonEmptyStringSchema,
|
|
100
|
-
type: zod.z.literal("api-key"),
|
|
101
|
-
location: zod.z.enum(["header", "query", "cookie"]),
|
|
102
|
-
name: nonEmptyStringSchema,
|
|
103
|
-
prefix: nonEmptyStringSchema.optional(),
|
|
104
|
-
environmentVariable: nonEmptyStringSchema.optional(),
|
|
105
|
-
description: zod.z.string().optional()
|
|
101
|
+
id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
|
|
102
|
+
type: zod.z.literal("api-key").describe("Identifies an API key authentication scheme."),
|
|
103
|
+
location: zod.z.enum(["header", "query", "cookie"]).describe("Where the API key is sent on requests."),
|
|
104
|
+
name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
|
|
105
|
+
prefix: nonEmptyStringSchema.optional().describe("A prefix added before the API key value."),
|
|
106
|
+
environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the API key."),
|
|
107
|
+
description: zod.z.string().optional().describe(
|
|
108
|
+
"A description of the authentication scheme included in generated SDK documentation."
|
|
109
|
+
)
|
|
106
110
|
});
|
|
107
111
|
var bearerAuthSchema = zod.z.strictObject({
|
|
108
|
-
id: nonEmptyStringSchema,
|
|
109
|
-
type: zod.z.literal("bearer"),
|
|
110
|
-
header: nonEmptyStringSchema.optional(),
|
|
111
|
-
prefix: nonEmptyStringSchema.optional(),
|
|
112
|
-
environmentVariable: nonEmptyStringSchema.optional(),
|
|
113
|
-
description: zod.z.string().optional()
|
|
112
|
+
id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
|
|
113
|
+
type: zod.z.literal("bearer").describe("Identifies a bearer token authentication scheme."),
|
|
114
|
+
header: nonEmptyStringSchema.optional().describe("The request header that carries the bearer token."),
|
|
115
|
+
prefix: nonEmptyStringSchema.optional().describe('The token prefix, such as "Bearer".'),
|
|
116
|
+
environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the bearer token."),
|
|
117
|
+
description: zod.z.string().optional().describe(
|
|
118
|
+
"A description of the authentication scheme included in generated SDK documentation."
|
|
119
|
+
)
|
|
114
120
|
});
|
|
115
121
|
var basicAuthSchema = zod.z.strictObject({
|
|
116
|
-
id: nonEmptyStringSchema,
|
|
117
|
-
type: zod.z.literal("basic"),
|
|
118
|
-
username: authVariableSchema.optional(),
|
|
119
|
-
password: authVariableSchema.optional(),
|
|
120
|
-
description: zod.z.string().optional()
|
|
122
|
+
id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
|
|
123
|
+
type: zod.z.literal("basic").describe("Identifies an HTTP Basic authentication scheme."),
|
|
124
|
+
username: authVariableSchema.optional().describe("The username parameter exposed by the SDK."),
|
|
125
|
+
password: authVariableSchema.optional().describe("The password parameter exposed by the SDK."),
|
|
126
|
+
description: zod.z.string().optional().describe(
|
|
127
|
+
"A description of the authentication scheme included in generated SDK documentation."
|
|
128
|
+
)
|
|
121
129
|
});
|
|
122
130
|
var oauthScopeSchema = zod.z.strictObject({
|
|
123
|
-
name: nonEmptyStringSchema,
|
|
124
|
-
description: zod.z.string().optional()
|
|
131
|
+
name: nonEmptyStringSchema.describe("The OAuth scope value requested from the provider."),
|
|
132
|
+
description: zod.z.string().optional().describe("A description of the OAuth scope included in generated SDK documentation.")
|
|
125
133
|
});
|
|
126
134
|
var oauthFlowSchema = zod.z.discriminatedUnion("type", [
|
|
127
135
|
zod.z.strictObject({
|
|
128
|
-
type: zod.z.literal("authorization-code"),
|
|
129
|
-
authorizationUrl: nonEmptyStringSchema,
|
|
130
|
-
tokenUrl: nonEmptyStringSchema,
|
|
131
|
-
refreshUrl: nonEmptyStringSchema.optional(),
|
|
132
|
-
scopes: zod.z.array(oauthScopeSchema).optional()
|
|
136
|
+
type: zod.z.literal("authorization-code").describe("Uses the OAuth authorization code flow."),
|
|
137
|
+
authorizationUrl: nonEmptyStringSchema.describe("The URL used to authorize the client."),
|
|
138
|
+
tokenUrl: nonEmptyStringSchema.describe("The URL used to exchange a code for tokens."),
|
|
139
|
+
refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
|
|
140
|
+
scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
|
|
133
141
|
}),
|
|
134
142
|
zod.z.strictObject({
|
|
135
|
-
type: zod.z.literal("client-credentials"),
|
|
136
|
-
tokenUrl: nonEmptyStringSchema,
|
|
137
|
-
refreshUrl: nonEmptyStringSchema.optional(),
|
|
138
|
-
scopes: zod.z.array(oauthScopeSchema).optional()
|
|
143
|
+
type: zod.z.literal("client-credentials").describe("Uses the OAuth client credentials flow."),
|
|
144
|
+
tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
|
|
145
|
+
refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
|
|
146
|
+
scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
|
|
139
147
|
}),
|
|
140
148
|
zod.z.strictObject({
|
|
141
|
-
type: zod.z.literal("implicit"),
|
|
142
|
-
authorizationUrl: nonEmptyStringSchema,
|
|
143
|
-
refreshUrl: nonEmptyStringSchema.optional(),
|
|
144
|
-
scopes: zod.z.array(oauthScopeSchema).optional()
|
|
149
|
+
type: zod.z.literal("implicit").describe("Uses the OAuth implicit flow."),
|
|
150
|
+
authorizationUrl: nonEmptyStringSchema.describe("The URL used to authorize the client."),
|
|
151
|
+
refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
|
|
152
|
+
scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
|
|
145
153
|
}),
|
|
146
154
|
zod.z.strictObject({
|
|
147
|
-
type: zod.z.literal("password"),
|
|
148
|
-
tokenUrl: nonEmptyStringSchema,
|
|
149
|
-
refreshUrl: nonEmptyStringSchema.optional(),
|
|
150
|
-
scopes: zod.z.array(oauthScopeSchema).optional()
|
|
155
|
+
type: zod.z.literal("password").describe("Uses the OAuth resource owner password flow."),
|
|
156
|
+
tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
|
|
157
|
+
refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
|
|
158
|
+
scopes: zod.z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
|
|
151
159
|
})
|
|
152
160
|
]);
|
|
153
161
|
var oauth2AuthSchema = zod.z.strictObject({
|
|
154
|
-
id: nonEmptyStringSchema,
|
|
155
|
-
type: zod.z.literal("oauth2"),
|
|
156
|
-
flows: zod.z.array(oauthFlowSchema).min(1),
|
|
157
|
-
clientId: authVariableSchema.optional(),
|
|
158
|
-
clientSecret: authVariableSchema.optional(),
|
|
159
|
-
tokenHeader: nonEmptyStringSchema.optional(),
|
|
160
|
-
tokenPrefix: nonEmptyStringSchema.optional(),
|
|
161
|
-
refreshBufferSeconds: zod.z.number().nonnegative().optional(),
|
|
162
|
-
description: zod.z.string().optional()
|
|
162
|
+
id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
|
|
163
|
+
type: zod.z.literal("oauth2").describe("Identifies an OAuth 2.0 authentication scheme."),
|
|
164
|
+
flows: zod.z.array(oauthFlowSchema).min(1).describe("The OAuth flows supported by the API."),
|
|
165
|
+
clientId: authVariableSchema.optional().describe("The OAuth client ID parameter exposed by the SDK."),
|
|
166
|
+
clientSecret: authVariableSchema.optional().describe("The OAuth client secret parameter exposed by the SDK."),
|
|
167
|
+
tokenHeader: nonEmptyStringSchema.optional().describe("The request header that carries the OAuth access token."),
|
|
168
|
+
tokenPrefix: nonEmptyStringSchema.optional().describe("The prefix added before the OAuth access token."),
|
|
169
|
+
refreshBufferSeconds: zod.z.number().nonnegative().optional().describe("How early, in seconds, the client refreshes a token before it expires."),
|
|
170
|
+
description: zod.z.string().optional().describe(
|
|
171
|
+
"A description of the authentication scheme included in generated SDK documentation."
|
|
172
|
+
)
|
|
163
173
|
});
|
|
164
174
|
var customAuthParameterSchema = zod.z.strictObject({
|
|
165
|
-
location: zod.z.enum(["header", "query", "cookie"]),
|
|
166
|
-
name: nonEmptyStringSchema,
|
|
167
|
-
prefix: nonEmptyStringSchema.optional(),
|
|
168
|
-
environmentVariable: nonEmptyStringSchema.optional()
|
|
175
|
+
location: zod.z.enum(["header", "query", "cookie"]).describe("Where the custom authentication value is sent."),
|
|
176
|
+
name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
|
|
177
|
+
prefix: nonEmptyStringSchema.optional().describe("A prefix added before the parameter value."),
|
|
178
|
+
environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the parameter.")
|
|
169
179
|
});
|
|
170
180
|
var customAuthSchema = zod.z.strictObject({
|
|
171
|
-
id: nonEmptyStringSchema,
|
|
172
|
-
type: zod.z.literal("custom"),
|
|
173
|
-
parameters: zod.z.array(customAuthParameterSchema).min(1),
|
|
174
|
-
description: zod.z.string().optional()
|
|
181
|
+
id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
|
|
182
|
+
type: zod.z.literal("custom").describe("Identifies a custom authentication scheme."),
|
|
183
|
+
parameters: zod.z.array(customAuthParameterSchema).min(1).describe("The request parameters that implement the custom scheme."),
|
|
184
|
+
description: zod.z.string().optional().describe(
|
|
185
|
+
"A description of the authentication scheme included in generated SDK documentation."
|
|
186
|
+
)
|
|
175
187
|
});
|
|
176
188
|
var authSchemeSchema = zod.z.discriminatedUnion("type", [
|
|
177
189
|
apiKeyAuthSchema,
|
|
@@ -181,12 +193,12 @@ var authSchemeSchema = zod.z.discriminatedUnion("type", [
|
|
|
181
193
|
customAuthSchema
|
|
182
194
|
]);
|
|
183
195
|
var authRequirementSchema = zod.z.strictObject({
|
|
184
|
-
schemes: zod.z.array(nonEmptyStringSchema).min(1)
|
|
196
|
+
schemes: zod.z.array(nonEmptyStringSchema).min(1).describe("Scheme identifiers that must be satisfied together.")
|
|
185
197
|
});
|
|
186
198
|
var authConfigSchema = zod.z.strictObject({
|
|
187
|
-
schemes: zod.z.array(authSchemeSchema).min(1),
|
|
188
|
-
requirements: zod.z.array(authRequirementSchema).optional(),
|
|
189
|
-
endpointSecurity: zod.z.boolean().optional()
|
|
199
|
+
schemes: zod.z.array(authSchemeSchema).min(1).describe("Authentication schemes offered by the API."),
|
|
200
|
+
requirements: zod.z.array(authRequirementSchema).optional().describe("Valid combinations of authentication schemes."),
|
|
201
|
+
endpointSecurity: zod.z.boolean().optional().describe("Whether generated endpoints expose their individual security requirements.")
|
|
190
202
|
}).superRefine(({ requirements, schemes }, context) => {
|
|
191
203
|
const schemeIds = /* @__PURE__ */ new Set();
|
|
192
204
|
schemes.forEach(({ id }, index) => {
|
|
@@ -212,57 +224,57 @@ var authConfigSchema = zod.z.strictObject({
|
|
|
212
224
|
});
|
|
213
225
|
});
|
|
214
226
|
var environmentUrlSchema = zod.z.strictObject({
|
|
215
|
-
name: nonEmptyStringSchema,
|
|
216
|
-
url: nonEmptyStringSchema,
|
|
217
|
-
serverName: nonEmptyStringSchema.optional()
|
|
227
|
+
name: nonEmptyStringSchema.describe("The display name for this environment URL."),
|
|
228
|
+
url: nonEmptyStringSchema.describe("The base URL used for this environment entry."),
|
|
229
|
+
serverName: nonEmptyStringSchema.optional().describe("The source server represented by this URL.")
|
|
218
230
|
});
|
|
219
231
|
var environmentSchema = zod.z.strictObject({
|
|
220
|
-
name: nonEmptyStringSchema,
|
|
221
|
-
urls: zod.z.array(environmentUrlSchema).min(1),
|
|
222
|
-
description: zod.z.string().optional()
|
|
232
|
+
name: nonEmptyStringSchema.describe("The environment name exposed by the SDK."),
|
|
233
|
+
urls: zod.z.array(environmentUrlSchema).min(1).describe("The base URLs available in this environment."),
|
|
234
|
+
description: zod.z.string().optional().describe("A description of the environment included in generated SDK documentation.")
|
|
223
235
|
});
|
|
224
236
|
var headerSchema = zod.z.strictObject({
|
|
225
|
-
name: nonEmptyStringSchema,
|
|
226
|
-
value: zod.z.string().optional(),
|
|
227
|
-
description: zod.z.string().optional(),
|
|
228
|
-
environmentVariable: nonEmptyStringSchema.optional()
|
|
237
|
+
name: nonEmptyStringSchema.describe("The HTTP header name."),
|
|
238
|
+
value: zod.z.string().optional().describe("A fixed value for the generated header."),
|
|
239
|
+
description: zod.z.string().optional().describe("A description of the header included in generated SDK documentation."),
|
|
240
|
+
environmentVariable: nonEmptyStringSchema.optional().describe("The environment variable used to populate the header.")
|
|
229
241
|
});
|
|
230
242
|
var environmentVariableSchema = zod.z.strictObject({
|
|
231
|
-
name: nonEmptyStringSchema,
|
|
232
|
-
description: zod.z.string().optional(),
|
|
233
|
-
defaultValue: zod.z.string().optional()
|
|
243
|
+
name: nonEmptyStringSchema.describe("The environment variable name exposed by the SDK."),
|
|
244
|
+
description: zod.z.string().optional().describe("A description of the environment variable included in generated SDK documentation."),
|
|
245
|
+
defaultValue: zod.z.string().optional().describe("The default value used when the variable is unset.")
|
|
234
246
|
});
|
|
235
247
|
var apiConfigSchema = zod.z.strictObject({
|
|
236
|
-
baseUrl: zod.z.string().default(""),
|
|
237
|
-
environments: zod.z.array(environmentSchema).default([]),
|
|
238
|
-
environmentVariables: zod.z.array(environmentVariableSchema).default([]),
|
|
239
|
-
defaultEnvironment: nonEmptyStringSchema.optional(),
|
|
240
|
-
auth: authConfigSchema.optional(),
|
|
241
|
-
headers: zod.z.array(headerSchema).optional(),
|
|
248
|
+
baseUrl: zod.z.string().default("").describe("The default base URL used by the generated client."),
|
|
249
|
+
environments: zod.z.array(environmentSchema).default([]).describe("Named API environments and their base URLs."),
|
|
250
|
+
environmentVariables: zod.z.array(environmentVariableSchema).default([]).describe("Environment variables exposed through generated client configuration."),
|
|
251
|
+
defaultEnvironment: nonEmptyStringSchema.optional().describe("The environment selected when a caller does not choose one."),
|
|
252
|
+
auth: authConfigSchema.optional().describe("Authentication supported by the API."),
|
|
253
|
+
headers: zod.z.array(headerSchema).optional().describe("Headers added to generated API requests."),
|
|
242
254
|
/**
|
|
243
255
|
* Selects the named `x-fern-audiences`.
|
|
244
256
|
*
|
|
245
257
|
* Absent means all audiences. A present empty array selects no tagged audience: untagged nodes
|
|
246
258
|
* remain included, while every audience-tagged node is excluded.
|
|
247
259
|
*/
|
|
248
|
-
audiences: zod.z.array(nonEmptyStringSchema).optional(),
|
|
260
|
+
audiences: zod.z.array(nonEmptyStringSchema).optional().describe("Named API audiences included in the generated SDK."),
|
|
249
261
|
/**
|
|
250
262
|
* How the API signs the webhooks it sends, enabling a generated verification helper. API-wide, and
|
|
251
263
|
* independent of whether any webhook is modeled — see {@link webhookSignatureSchema}.
|
|
252
264
|
*/
|
|
253
|
-
webhookSignature: webhookSignatureSchema.optional()
|
|
265
|
+
webhookSignature: webhookSignatureSchema.optional().describe("How generated helpers verify webhook signatures from the API.")
|
|
254
266
|
});
|
|
255
267
|
var retryOverrideShape = {
|
|
256
|
-
enabled: zod.z.boolean().optional(),
|
|
257
|
-
maxAttempts: zod.z.number().int().min(1).optional(),
|
|
258
|
-
retryDelayMs: zod.z.number().nonnegative().optional(),
|
|
259
|
-
maxDelayMs: zod.z.number().nonnegative().optional(),
|
|
260
|
-
jitterMs: zod.z.number().nonnegative().optional(),
|
|
261
|
-
backoffFactor: zod.z.number().positive().optional(),
|
|
262
|
-
statusCodes: zod.z.array(zod.z.number().int().min(100).max(599)).optional(),
|
|
263
|
-
methods: zod.z.array(nonEmptyStringSchema).optional(),
|
|
264
|
-
statusCodeProfile: zod.z.enum(["legacy", "recommended"]).optional(),
|
|
265
|
-
maxRetryAfterDelayMs: zod.z.number().nonnegative().optional()
|
|
268
|
+
enabled: zod.z.boolean().optional().describe("Whether the generated client retries failed requests."),
|
|
269
|
+
maxAttempts: zod.z.number().int().min(1).optional().describe("The maximum total request attempts, including the initial attempt."),
|
|
270
|
+
retryDelayMs: zod.z.number().nonnegative().optional().describe("The initial delay between retry attempts, in milliseconds."),
|
|
271
|
+
maxDelayMs: zod.z.number().nonnegative().optional().describe("The maximum backoff delay between attempts, in milliseconds."),
|
|
272
|
+
jitterMs: zod.z.number().nonnegative().optional().describe("The maximum random jitter added to retry delays, in milliseconds."),
|
|
273
|
+
backoffFactor: zod.z.number().positive().optional().describe("The multiplier applied to the delay after each failed attempt."),
|
|
274
|
+
statusCodes: zod.z.array(zod.z.number().int().min(100).max(599)).optional().describe("HTTP status codes that are eligible for retries."),
|
|
275
|
+
methods: zod.z.array(nonEmptyStringSchema).optional().describe("HTTP methods that are eligible for retries."),
|
|
276
|
+
statusCodeProfile: zod.z.enum(["legacy", "recommended"]).optional().describe("The built-in retryable status-code policy."),
|
|
277
|
+
maxRetryAfterDelayMs: zod.z.number().nonnegative().optional().describe("The longest Retry-After delay the client will honor, in milliseconds.")
|
|
266
278
|
};
|
|
267
279
|
function validateRetryDelays({
|
|
268
280
|
maxDelayMs,
|
|
@@ -279,27 +291,29 @@ function validateRetryDelays({
|
|
|
279
291
|
var clientRetryOverrideSchema = zod.z.strictObject(retryOverrideShape).superRefine(validateRetryDelays);
|
|
280
292
|
var retryConfigSchema = zod.z.strictObject({
|
|
281
293
|
...retryOverrideShape,
|
|
282
|
-
enabled: zod.z.boolean().default(true),
|
|
283
|
-
maxAttempts: zod.z.number().int().min(1).default(3),
|
|
284
|
-
retryDelayMs: zod.z.number().nonnegative().default(150),
|
|
285
|
-
maxDelayMs: zod.z.number().nonnegative().default(5e3),
|
|
286
|
-
jitterMs: zod.z.number().nonnegative().default(50),
|
|
287
|
-
backoffFactor: zod.z.number().positive().default(2),
|
|
288
|
-
methods: zod.z.array(nonEmptyStringSchema).default(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]),
|
|
289
|
-
maxRetryAfterDelayMs: zod.z.number().nonnegative().default(6e4)
|
|
294
|
+
enabled: zod.z.boolean().default(true).describe("Whether the generated client retries failed requests."),
|
|
295
|
+
maxAttempts: zod.z.number().int().min(1).default(3).describe("The maximum total request attempts, including the initial attempt."),
|
|
296
|
+
retryDelayMs: zod.z.number().nonnegative().default(150).describe("The initial delay between retry attempts, in milliseconds."),
|
|
297
|
+
maxDelayMs: zod.z.number().nonnegative().default(5e3).describe("The maximum backoff delay between attempts, in milliseconds."),
|
|
298
|
+
jitterMs: zod.z.number().nonnegative().default(50).describe("The maximum random jitter added to retry delays, in milliseconds."),
|
|
299
|
+
backoffFactor: zod.z.number().positive().default(2).describe("The multiplier applied to the delay after each failed attempt."),
|
|
300
|
+
methods: zod.z.array(nonEmptyStringSchema).default(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]).describe("HTTP methods that are eligible for retries."),
|
|
301
|
+
maxRetryAfterDelayMs: zod.z.number().nonnegative().default(6e4).describe("The longest Retry-After delay the client will honor, in milliseconds.")
|
|
290
302
|
}).superRefine(validateRetryDelays);
|
|
291
303
|
var constructorParameterSchema = zod.z.strictObject({
|
|
292
|
-
name: nonEmptyStringSchema,
|
|
293
|
-
example: zod.z.string().optional(),
|
|
294
|
-
description: zod.z.string().optional()
|
|
295
|
-
|
|
304
|
+
name: nonEmptyStringSchema.describe("The parameter name in the generated client constructor."),
|
|
305
|
+
example: zod.z.string().optional().describe("An example value shown in generated documentation."),
|
|
306
|
+
description: zod.z.string().optional().describe(
|
|
307
|
+
"A description of the constructor parameter included in generated SDK documentation."
|
|
308
|
+
),
|
|
309
|
+
required: zod.z.boolean().optional().describe("Whether callers must provide the parameter.")
|
|
296
310
|
});
|
|
297
311
|
var parameterStyleSchema = zod.z.enum(["wrapped", "inline", "language-default"]);
|
|
298
312
|
var tokenRefreshConfigSchema = zod.z.strictObject({
|
|
299
|
-
enabled: zod.z.boolean(),
|
|
300
|
-
endpoint: nonEmptyStringSchema.optional(),
|
|
301
|
-
accessTokenField: nonEmptyStringSchema.optional(),
|
|
302
|
-
refreshTokenField: nonEmptyStringSchema.optional()
|
|
313
|
+
enabled: zod.z.boolean().describe("Whether the client can exchange refresh tokens."),
|
|
314
|
+
endpoint: nonEmptyStringSchema.optional().describe("The API endpoint used to refresh tokens."),
|
|
315
|
+
accessTokenField: nonEmptyStringSchema.optional().describe("The response field containing the refreshed access token."),
|
|
316
|
+
refreshTokenField: nonEmptyStringSchema.optional().describe("The response field containing the refreshed refresh token.")
|
|
303
317
|
}).superRefine(({ enabled, endpoint }, context) => {
|
|
304
318
|
if (enabled && endpoint === void 0) {
|
|
305
319
|
context.addIssue({
|
|
@@ -310,53 +324,57 @@ var tokenRefreshConfigSchema = zod.z.strictObject({
|
|
|
310
324
|
}
|
|
311
325
|
});
|
|
312
326
|
var clientOverrideShape = {
|
|
313
|
-
retry: clientRetryOverrideSchema.optional(),
|
|
314
|
-
responseHeaders: zod.z.boolean().optional(),
|
|
315
|
-
responseValidation: zod.z.boolean().optional(),
|
|
316
|
-
multiTenant: zod.z.boolean().optional(),
|
|
317
|
-
additionalConstructorParameters: zod.z.array(constructorParameterSchema).optional(),
|
|
318
|
-
timeoutMs: zod.z.union([zod.z.number().nonnegative(), zod.z.literal("infinity")]).optional(),
|
|
319
|
-
requestParameterStyle: parameterStyleSchema.optional(),
|
|
320
|
-
pathParameterStyle: parameterStyleSchema.optional(),
|
|
321
|
-
filePropertyStyle: parameterStyleSchema.optional(),
|
|
322
|
-
useDefaultRequestParameterValues: zod.z.boolean().optional(),
|
|
323
|
-
respectOptionalRequestBody: zod.z.boolean().optional(),
|
|
324
|
-
tokenRefresh: tokenRefreshConfigSchema.optional()
|
|
327
|
+
retry: clientRetryOverrideSchema.optional().describe("Retry behavior for generated API requests."),
|
|
328
|
+
responseHeaders: zod.z.boolean().optional().describe("Whether generated operations expose HTTP response headers."),
|
|
329
|
+
responseValidation: zod.z.boolean().optional().describe("Whether the client validates API responses against the schema."),
|
|
330
|
+
multiTenant: zod.z.boolean().optional().describe("Whether the client exposes configuration for tenant-specific API access."),
|
|
331
|
+
additionalConstructorParameters: zod.z.array(constructorParameterSchema).optional().describe("Additional parameters added to the generated client constructor."),
|
|
332
|
+
timeoutMs: zod.z.union([zod.z.number().nonnegative(), zod.z.literal("infinity")]).optional().describe('The default request timeout in milliseconds, or "infinity" for no timeout.'),
|
|
333
|
+
requestParameterStyle: parameterStyleSchema.optional().describe("Whether generated operation parameters are wrapped or passed inline."),
|
|
334
|
+
pathParameterStyle: parameterStyleSchema.optional().describe("Whether generated path parameters are wrapped or passed inline."),
|
|
335
|
+
filePropertyStyle: parameterStyleSchema.optional().describe("Whether generated file properties are wrapped or passed inline."),
|
|
336
|
+
useDefaultRequestParameterValues: zod.z.boolean().optional().describe("Whether schema defaults are applied to omitted request parameters."),
|
|
337
|
+
respectOptionalRequestBody: zod.z.boolean().optional().describe("Whether an optional request body remains optional in generated methods."),
|
|
338
|
+
tokenRefresh: tokenRefreshConfigSchema.optional().describe("Refresh-token behavior for the generated client.")
|
|
325
339
|
};
|
|
326
340
|
var clientConfigOverrideSchema = zod.z.strictObject(clientOverrideShape);
|
|
327
341
|
var clientConfigSchema = zod.z.strictObject({
|
|
328
342
|
...clientOverrideShape,
|
|
329
|
-
retry: retryConfigSchema.prefault({}),
|
|
330
|
-
responseHeaders: zod.z.boolean().default(false),
|
|
331
|
-
multiTenant: zod.z.boolean().default(false),
|
|
332
|
-
additionalConstructorParameters: zod.z.array(constructorParameterSchema).default([])
|
|
343
|
+
retry: retryConfigSchema.prefault({}).describe("Retry behavior for generated API requests."),
|
|
344
|
+
responseHeaders: zod.z.boolean().default(false).describe("Whether generated operations expose HTTP response headers."),
|
|
345
|
+
multiTenant: zod.z.boolean().default(false).describe("Whether the client exposes configuration for tenant-specific API access."),
|
|
346
|
+
additionalConstructorParameters: zod.z.array(constructorParameterSchema).default([]).describe("Additional parameters added to the generated client constructor.")
|
|
333
347
|
});
|
|
334
348
|
var unsupportedFieldSchema = zod.z.strictObject({
|
|
335
|
-
source: zod.z.enum(["fern", "postman", "sdk-config-ir"]),
|
|
336
|
-
path: zod.z.array(zod.z.union([nonEmptyStringSchema, zod.z.number().int().nonnegative()])).min(1),
|
|
337
|
-
code: nonEmptyStringSchema.optional(),
|
|
338
|
-
reason: nonEmptyStringSchema
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
349
|
+
source: zod.z.enum(["fern", "postman", "sdk-config-ir"]).describe("The configuration surface containing the unsupported field."),
|
|
350
|
+
path: zod.z.array(zod.z.union([nonEmptyStringSchema, zod.z.number().int().nonnegative()])).min(1).describe("The property path to the unsupported field in its source configuration."),
|
|
351
|
+
code: nonEmptyStringSchema.optional().describe("A stable diagnostic code for the unsupported field."),
|
|
352
|
+
reason: nonEmptyStringSchema.describe(
|
|
353
|
+
"Why the field could not be represented in normalized configuration."
|
|
354
|
+
),
|
|
355
|
+
severity: zod.z.enum(["error", "warning", "info"]).describe("The diagnostic severity."),
|
|
356
|
+
risk: zod.z.enum(["high", "medium", "low"]).describe("The migration risk of omitting this field."),
|
|
357
|
+
owner: nonEmptyStringSchema.describe("The component or team responsible for resolving the gap."),
|
|
358
|
+
suggestedAction: nonEmptyStringSchema.describe(
|
|
359
|
+
"Recommended action for preserving the intended behavior."
|
|
360
|
+
)
|
|
343
361
|
});
|
|
344
362
|
var postmanLegacyInputSchema = zod.z.strictObject({
|
|
345
|
-
kind: zod.z.literal("postman-build-parameters"),
|
|
346
|
-
value: jsonObjectSchema
|
|
363
|
+
kind: zod.z.literal("postman-build-parameters").describe("Identifies legacy Postman build parameters."),
|
|
364
|
+
value: jsonObjectSchema.describe("A debugging copy of the original Postman build parameters.")
|
|
347
365
|
});
|
|
348
366
|
var fernLegacyInputSchema = zod.z.strictObject({
|
|
349
|
-
kind: zod.z.literal("fern-generator-invocation"),
|
|
350
|
-
value: jsonObjectSchema
|
|
367
|
+
kind: zod.z.literal("fern-generator-invocation").describe("Identifies a legacy Fern generator invocation."),
|
|
368
|
+
value: jsonObjectSchema.describe("A debugging copy of the original Fern generator invocation.")
|
|
351
369
|
});
|
|
352
370
|
var legacyInputSchema = zod.z.discriminatedUnion("kind", [
|
|
353
371
|
postmanLegacyInputSchema,
|
|
354
372
|
fernLegacyInputSchema
|
|
355
373
|
]);
|
|
356
374
|
var compatibilityConfigSchema = zod.z.strictObject({
|
|
357
|
-
outputProfile: zod.z.enum(["converged", "postman-legacy", "fern-legacy"]),
|
|
358
|
-
legacyInput: legacyInputSchema.optional(),
|
|
359
|
-
unsupportedFields: zod.z.array(unsupportedFieldSchema).optional()
|
|
375
|
+
outputProfile: zod.z.enum(["converged", "postman-legacy", "fern-legacy"]).describe("The output-default profile retained while legacy producers converge."),
|
|
376
|
+
legacyInput: legacyInputSchema.optional().describe("Original producer input retained only for migration debugging."),
|
|
377
|
+
unsupportedFields: zod.z.array(unsupportedFieldSchema).optional().describe("Legacy fields that could not be represented in normalized configuration.")
|
|
360
378
|
});
|
|
361
379
|
var httpMethodSchema = zod.z.enum([
|
|
362
380
|
"GET",
|
|
@@ -370,116 +388,122 @@ var httpMethodSchema = zod.z.enum([
|
|
|
370
388
|
"CONNECT"
|
|
371
389
|
]);
|
|
372
390
|
var readmeEndpointSchema = zod.z.strictObject({
|
|
373
|
-
method: httpMethodSchema,
|
|
374
|
-
path: nonEmptyStringSchema,
|
|
375
|
-
stream: zod.z.boolean().optional()
|
|
391
|
+
method: httpMethodSchema.describe("The HTTP method of the documented endpoint."),
|
|
392
|
+
path: nonEmptyStringSchema.describe("The endpoint path used in generated examples."),
|
|
393
|
+
stream: zod.z.boolean().optional().describe("Whether the example uses the streaming response API.")
|
|
376
394
|
});
|
|
377
395
|
var readmeCustomSectionSchema = zod.z.strictObject({
|
|
378
|
-
title: nonEmptyStringSchema,
|
|
379
|
-
content: zod.z.string()
|
|
396
|
+
title: nonEmptyStringSchema.describe("The heading displayed for this README section."),
|
|
397
|
+
content: zod.z.string().describe("The Markdown content of this README section.")
|
|
380
398
|
});
|
|
381
399
|
var readmeConfigSchema = zod.z.strictObject({
|
|
382
|
-
apiName: nonEmptyStringSchema.optional(),
|
|
383
|
-
introduction: zod.z.string().optional(),
|
|
384
|
-
apiReferenceLink: nonEmptyStringSchema.optional(),
|
|
385
|
-
bannerLink: nonEmptyStringSchema.optional(),
|
|
386
|
-
disabledSections: zod.z.array(nonEmptyStringSchema).optional(),
|
|
387
|
-
customSections: zod.z.array(readmeCustomSectionSchema).optional(),
|
|
388
|
-
defaultEndpoint: readmeEndpointSchema.optional(),
|
|
389
|
-
features: zod.z.record(zod.z.string(), zod.z.array(readmeEndpointSchema)).optional()
|
|
400
|
+
apiName: nonEmptyStringSchema.optional().describe("The API name displayed in the README."),
|
|
401
|
+
introduction: zod.z.string().optional().describe("Custom introductory Markdown for the README."),
|
|
402
|
+
apiReferenceLink: nonEmptyStringSchema.optional().describe("The URL linked as the API reference."),
|
|
403
|
+
bannerLink: nonEmptyStringSchema.optional().describe("The destination URL for the README banner."),
|
|
404
|
+
disabledSections: zod.z.array(nonEmptyStringSchema).optional().describe("Generated README sections to omit."),
|
|
405
|
+
customSections: zod.z.array(readmeCustomSectionSchema).optional().describe("Additional sections inserted into the README."),
|
|
406
|
+
defaultEndpoint: readmeEndpointSchema.optional().describe("The endpoint used for the primary README example."),
|
|
407
|
+
features: zod.z.record(zod.z.string(), zod.z.array(readmeEndpointSchema)).optional().describe("Named feature groups and the endpoints demonstrated by each group.")
|
|
390
408
|
});
|
|
391
409
|
var snippetsConfigSchema = zod.z.strictObject({
|
|
392
|
-
enabled: zod.z.boolean(),
|
|
393
|
-
format: zod.z.enum(["md", "json"]).optional(),
|
|
394
|
-
outputPath: nonEmptyStringSchema.optional()
|
|
410
|
+
enabled: zod.z.boolean().describe("Whether standalone usage snippets are generated."),
|
|
411
|
+
format: zod.z.enum(["md", "json"]).optional().describe("The output format for generated snippets."),
|
|
412
|
+
outputPath: nonEmptyStringSchema.optional().describe("The output path for generated snippet files.")
|
|
395
413
|
});
|
|
396
414
|
var docsConfigSchema = zod.z.strictObject({
|
|
397
|
-
readme: readmeConfigSchema.optional(),
|
|
398
|
-
snippets: snippetsConfigSchema.optional(),
|
|
399
|
-
referenceBaseUrl: nonEmptyStringSchema.optional(),
|
|
400
|
-
includeApiReference: zod.z.boolean().optional()
|
|
415
|
+
readme: readmeConfigSchema.optional().describe("README content and example configuration."),
|
|
416
|
+
snippets: snippetsConfigSchema.optional().describe("Standalone usage snippet generation."),
|
|
417
|
+
referenceBaseUrl: nonEmptyStringSchema.optional().describe("The base URL used for links to generated API reference files."),
|
|
418
|
+
includeApiReference: zod.z.boolean().optional().describe("Whether API reference documentation is included in the SDK output.")
|
|
401
419
|
});
|
|
402
420
|
var namingConfigSchema = zod.z.strictObject({
|
|
403
|
-
clientName: nonEmptyStringSchema.optional(),
|
|
404
|
-
exportedClientName: nonEmptyStringSchema.optional(),
|
|
405
|
-
environmentTypeName: nonEmptyStringSchema.optional(),
|
|
406
|
-
apiErrorName: nonEmptyStringSchema.optional(),
|
|
407
|
-
baseErrorName: nonEmptyStringSchema.optional(),
|
|
408
|
-
pagerName: nonEmptyStringSchema.optional(),
|
|
421
|
+
clientName: nonEmptyStringSchema.optional().describe("The generated client class name."),
|
|
422
|
+
exportedClientName: nonEmptyStringSchema.optional().describe("The client name exported from the generated package."),
|
|
423
|
+
environmentTypeName: nonEmptyStringSchema.optional().describe("The generated type name for API environments."),
|
|
424
|
+
apiErrorName: nonEmptyStringSchema.optional().describe("The generated API error class name."),
|
|
425
|
+
baseErrorName: nonEmptyStringSchema.optional().describe("The generated base error class name."),
|
|
426
|
+
pagerName: nonEmptyStringSchema.optional().describe("The generated pagination helper name."),
|
|
409
427
|
/** Apply Fern's initialism-aware casing rules when deriving generated identifiers. */
|
|
410
|
-
smartCasing: zod.z.boolean().optional(),
|
|
428
|
+
smartCasing: zod.z.boolean().optional().describe("Whether generated identifiers use initialism-aware casing."),
|
|
411
429
|
/** Preserve a word boundary after digits when Fern smart casing is enabled. */
|
|
412
|
-
smartCasingDigitWordBoundary: zod.z.boolean().optional()
|
|
430
|
+
smartCasingDigitWordBoundary: zod.z.boolean().optional().describe("Whether smart casing preserves a word boundary after digits.")
|
|
413
431
|
});
|
|
414
432
|
var cliGenerationConfigSchema = zod.z.strictObject({
|
|
415
|
-
paginationParameters: zod.z.array(nonEmptyStringSchema).optional(),
|
|
416
|
-
skills: zod.z.boolean().optional()
|
|
433
|
+
paginationParameters: zod.z.array(nonEmptyStringSchema).optional().describe("Request parameter names treated as pagination controls by the CLI."),
|
|
434
|
+
skills: zod.z.boolean().optional().describe("Whether the generated CLI includes skills that teach AI agents to invoke commands.")
|
|
417
435
|
});
|
|
418
436
|
var csharpGenerationConfigSchema = zod.z.strictObject({
|
|
419
|
-
useOptionalWrapper: zod.z.boolean().optional(),
|
|
420
|
-
simplifyObjectDictionaries: zod.z.boolean().optional(),
|
|
421
|
-
explicitNamespaces: zod.z.boolean().optional(),
|
|
422
|
-
rootNamespaceForCoreClasses: zod.z.boolean().optional(),
|
|
423
|
-
includeExceptionHandler: zod.z.boolean().optional(),
|
|
424
|
-
experimentalExplicitNullableOptional: zod.z.boolean().optional()
|
|
437
|
+
useOptionalWrapper: zod.z.boolean().optional().describe("Whether optional values use an explicit Optional wrapper."),
|
|
438
|
+
simplifyObjectDictionaries: zod.z.boolean().optional().describe("Whether object schemas with arbitrary values use simplified dictionary types."),
|
|
439
|
+
explicitNamespaces: zod.z.boolean().optional().describe("Whether generated resource groups use explicit nested namespaces."),
|
|
440
|
+
rootNamespaceForCoreClasses: zod.z.boolean().optional().describe("Whether shared client classes are emitted in the root namespace."),
|
|
441
|
+
includeExceptionHandler: zod.z.boolean().optional().describe("Whether generated client operations use a configurable exception handler."),
|
|
442
|
+
experimentalExplicitNullableOptional: zod.z.boolean().optional().describe(
|
|
443
|
+
"Whether optional nullable properties distinguish omitted values from explicit nulls."
|
|
444
|
+
)
|
|
425
445
|
});
|
|
426
446
|
var goGenerationConfigSchema = zod.z.strictObject({
|
|
427
|
-
legacyComplexModels: zod.z.boolean().optional(),
|
|
447
|
+
legacyComplexModels: zod.z.boolean().optional().describe("Whether complex models use the legacy Go representation."),
|
|
428
448
|
/** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
|
|
429
|
-
smartCasing: zod.z.boolean().optional(),
|
|
449
|
+
smartCasing: zod.z.boolean().optional().describe("Whether generated Go names capitalize common initialisms."),
|
|
430
450
|
/** Overrides the fern root-client constructor independently from the client type name. */
|
|
431
|
-
clientConstructorName: nonEmptyStringSchema.optional(),
|
|
432
|
-
unionVersion: zod.z.enum(["v0", "v1"]).optional(),
|
|
433
|
-
includeLegacyClientOptions: zod.z.boolean().optional()
|
|
451
|
+
clientConstructorName: nonEmptyStringSchema.optional().describe("The generated root-client constructor name."),
|
|
452
|
+
unionVersion: zod.z.enum(["v0", "v1"]).optional().describe("The representation used for generated Go unions."),
|
|
453
|
+
includeLegacyClientOptions: zod.z.boolean().optional().describe("Whether the client retains legacy constructor option helpers.")
|
|
434
454
|
});
|
|
435
455
|
var jvmGenerationConfigSchema = zod.z.strictObject({
|
|
436
|
-
packageLayout: zod.z.enum(["flat", "nested"]).optional(),
|
|
437
|
-
useLocalDateForDates: zod.z.boolean().optional(),
|
|
438
|
-
collapseOptionalNullable: zod.z.boolean().optional(),
|
|
439
|
-
gradleDistributionUrl: zod.z.string().min(1).optional(),
|
|
440
|
-
gradlePluginManagement: zod.z.string().optional(),
|
|
441
|
-
gradleCentralDependencyManagement: zod.z.boolean().optional(),
|
|
456
|
+
packageLayout: zod.z.enum(["flat", "nested"]).optional().describe("Whether generated JVM packages use a flat or nested resource layout."),
|
|
457
|
+
useLocalDateForDates: zod.z.boolean().optional().describe("Whether date-only values use LocalDate instead of OffsetDateTime."),
|
|
458
|
+
collapseOptionalNullable: zod.z.boolean().optional().describe("Whether optional nullable values collapse into a single nullable representation."),
|
|
459
|
+
gradleDistributionUrl: zod.z.string().min(1).optional().describe("The Gradle distribution URL written to the generated wrapper."),
|
|
460
|
+
gradlePluginManagement: zod.z.string().optional().describe("Plugin management configuration added to the generated Gradle settings."),
|
|
461
|
+
gradleCentralDependencyManagement: zod.z.boolean().optional().describe("Whether dependency versions are managed centrally in the Gradle project."),
|
|
442
462
|
/** Selects co-located async methods or a separate async client surface. */
|
|
443
|
-
asyncStyle: zod.z.enum(["dedicated-client", "twin-methods"]).optional()
|
|
463
|
+
asyncStyle: zod.z.enum(["dedicated-client", "twin-methods"]).optional().describe("Whether asynchronous operations use a separate client or co-located methods.")
|
|
444
464
|
});
|
|
445
465
|
|
|
446
466
|
// src/sdk-config-domain/v1/language/java.ts
|
|
447
467
|
var javaGenerationConfigSchema = jvmGenerationConfigSchema.extend({
|
|
448
|
-
includeKotlinSnippets: zod.z.boolean().optional()
|
|
468
|
+
includeKotlinSnippets: zod.z.boolean().optional().describe("Whether Java SDK documentation includes Kotlin usage snippets.")
|
|
449
469
|
});
|
|
450
470
|
|
|
451
471
|
// src/sdk-config-domain/v1/language/kotlin.ts
|
|
452
472
|
var kotlinGenerationConfigSchema = jvmGenerationConfigSchema;
|
|
453
473
|
var compilerOptionsSchema = zod.z.strictObject({
|
|
454
|
-
target: nonEmptyStringSchema.optional(),
|
|
455
|
-
module: nonEmptyStringSchema.optional(),
|
|
456
|
-
lib: zod.z.array(nonEmptyStringSchema).optional()
|
|
474
|
+
target: nonEmptyStringSchema.optional().describe("The JavaScript language target passed to TypeScript."),
|
|
475
|
+
module: nonEmptyStringSchema.optional().describe("The module format passed to TypeScript."),
|
|
476
|
+
lib: zod.z.array(nonEmptyStringSchema).optional().describe("The runtime library definitions passed to TypeScript.")
|
|
457
477
|
});
|
|
458
478
|
var packageScriptSchema = zod.z.strictObject({
|
|
459
|
-
name: nonEmptyStringSchema,
|
|
460
|
-
command: nonEmptyStringSchema
|
|
479
|
+
name: nonEmptyStringSchema.describe("The package script name."),
|
|
480
|
+
command: nonEmptyStringSchema.describe("The command executed by the package script.")
|
|
461
481
|
});
|
|
462
482
|
var httpClientSchema = zod.z.strictObject({
|
|
463
|
-
name: zod.z.enum(["axios", "fetch"])
|
|
483
|
+
name: zod.z.enum(["axios", "fetch"]).describe("The HTTP client used by generated TypeScript code.")
|
|
464
484
|
});
|
|
465
485
|
var typescriptGenerationConfigSchema = zod.z.strictObject({
|
|
466
|
-
typescriptVersion: nonEmptyStringSchema.optional(),
|
|
467
|
-
zodVersion: nonEmptyStringSchema.optional(),
|
|
468
|
-
compilerOptions: compilerOptionsSchema.optional(),
|
|
469
|
-
httpClient: httpClientSchema.optional(),
|
|
470
|
-
packageManager: zod.z.enum(["pnpm", "yarn"]).optional(),
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
486
|
+
typescriptVersion: nonEmptyStringSchema.optional().describe("The TypeScript version used by the generated project."),
|
|
487
|
+
zodVersion: nonEmptyStringSchema.optional().describe("The Zod version used by generated runtime schemas."),
|
|
488
|
+
compilerOptions: compilerOptionsSchema.optional().describe("TypeScript compiler options for the generated project."),
|
|
489
|
+
httpClient: httpClientSchema.optional().describe("The HTTP client used by generated TypeScript code."),
|
|
490
|
+
packageManager: zod.z.enum(["pnpm", "yarn"]).optional().describe("The package manager used by the generated project."),
|
|
491
|
+
packageManagerVersion: nonEmptyStringSchema.optional().describe("The package manager version used by the generated project."),
|
|
492
|
+
testFramework: zod.z.enum(["jest", "vitest"]).optional().describe("The test framework used by generated tests."),
|
|
493
|
+
namingStrategy: zod.z.enum(["base", "originalPropertyNames"]).optional().describe("How schema property names are converted into TypeScript identifiers."),
|
|
494
|
+
bundle: zod.z.boolean().optional().describe("Whether the generated package includes bundled output."),
|
|
495
|
+
exportClassDefault: zod.z.boolean().optional().describe("Whether the client class is also exported as the default export."),
|
|
475
496
|
/** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
|
|
476
|
-
namespaceExportName: nonEmptyStringSchema.optional(),
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
497
|
+
namespaceExportName: nonEmptyStringSchema.optional().describe("The top-level namespace export name."),
|
|
498
|
+
consolidateTypeFiles: zod.z.boolean().optional().describe("Whether generated types are consolidated into fewer source files."),
|
|
499
|
+
allowCustomFetcher: zod.z.boolean().optional().describe("Whether callers can supply a custom fetch implementation."),
|
|
500
|
+
useBrandedStringAliases: zod.z.boolean().optional().describe("Whether string aliases are emitted as distinct branded types."),
|
|
501
|
+
useLegacyExports: zod.z.boolean().optional().describe("Whether the package emits the legacy export layout."),
|
|
502
|
+
useBigInt: zod.z.boolean().optional().describe("Whether 64-bit integer values are represented with bigint."),
|
|
503
|
+
serdeLayer: zod.z.boolean().optional().describe("Whether generated models use Fern serialization and deserialization helpers."),
|
|
504
|
+
/** Ship only the ESM build (drops CJS) to avoid the Node dual-package hazard. */
|
|
505
|
+
esmOnly: zod.z.boolean().optional().describe("Whether the package emits only ECMAScript modules."),
|
|
506
|
+
scripts: zod.z.array(packageScriptSchema).optional().describe("Additional scripts added to the generated package manifest.")
|
|
483
507
|
});
|
|
484
508
|
|
|
485
509
|
// src/sdk-config-domain/v1/language/mcp.ts
|
|
@@ -494,75 +518,75 @@ var mcpAvailabilityStatuses = [
|
|
|
494
518
|
"LEGACY"
|
|
495
519
|
];
|
|
496
520
|
var mcpToolFilterSchema = zod.z.strictObject({
|
|
497
|
-
include: zod.z.array(nonEmptyStringSchema).optional(),
|
|
498
|
-
exclude: zod.z.array(nonEmptyStringSchema).optional()
|
|
521
|
+
include: zod.z.array(nonEmptyStringSchema).optional().describe("Operations explicitly included as MCP tools."),
|
|
522
|
+
exclude: zod.z.array(nonEmptyStringSchema).optional().describe("Operations explicitly excluded from MCP tools.")
|
|
499
523
|
});
|
|
500
524
|
var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
|
|
501
525
|
(name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
|
|
502
526
|
'toolset names must match [a-z0-9-]+ and cannot be "default"'
|
|
503
527
|
);
|
|
504
528
|
var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
|
|
505
|
-
serverName: nonEmptyStringSchema.optional(),
|
|
506
|
-
serverDescription: nonEmptyStringSchema.optional(),
|
|
507
|
-
excludeAvailability: zod.z.array(zod.z.enum(mcpAvailabilityStatuses)).optional(),
|
|
508
|
-
tools: mcpToolFilterSchema.optional(),
|
|
509
|
-
toolsets: zod.z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional()
|
|
529
|
+
serverName: nonEmptyStringSchema.optional().describe("The name advertised by the generated MCP server."),
|
|
530
|
+
serverDescription: nonEmptyStringSchema.optional().describe("The description advertised by the generated MCP server."),
|
|
531
|
+
excludeAvailability: zod.z.array(zod.z.enum(mcpAvailabilityStatuses)).optional().describe("Operation availability statuses excluded from MCP tool generation."),
|
|
532
|
+
tools: mcpToolFilterSchema.optional().describe("Global operation filters for generated MCP tools."),
|
|
533
|
+
toolsets: zod.z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional().describe("Named MCP toolsets and the operation filters for each toolset.")
|
|
510
534
|
});
|
|
511
535
|
var phpGenerationConfigSchema = zod.z.strictObject({
|
|
512
|
-
propertyAccess: zod.z.enum(["public", "private"]).optional(),
|
|
513
|
-
generateClientInterfaces: zod.z.boolean().optional()
|
|
536
|
+
propertyAccess: zod.z.enum(["public", "private"]).optional().describe("The visibility of generated PHP model properties."),
|
|
537
|
+
generateClientInterfaces: zod.z.boolean().optional().describe("Whether interfaces are generated for PHP client classes.")
|
|
514
538
|
});
|
|
515
539
|
var pythonClientSchema = zod.z.strictObject({
|
|
516
|
-
fileName: nonEmptyStringSchema.optional(),
|
|
517
|
-
exportedFileName: nonEmptyStringSchema.optional()
|
|
540
|
+
fileName: nonEmptyStringSchema.optional().describe("The source file name for the Python client."),
|
|
541
|
+
exportedFileName: nonEmptyStringSchema.optional().describe("The file name used when exporting the Python client.")
|
|
518
542
|
});
|
|
519
543
|
var pydanticConfigSchema = zod.z.strictObject({
|
|
520
|
-
versionCompatibility: zod.z.enum(["v1", "v2", "both", "v1-on-v2"]).optional(),
|
|
521
|
-
frozen: zod.z.boolean().optional(),
|
|
522
|
-
requireOptionalFields: zod.z.boolean().optional(),
|
|
523
|
-
unionNaming: zod.z.enum(["v0", "v1"]).optional(),
|
|
524
|
-
useFieldAliases: zod.z.boolean().optional()
|
|
544
|
+
versionCompatibility: zod.z.enum(["v1", "v2", "both", "v1-on-v2"]).optional().describe("The Pydantic major versions supported by generated models."),
|
|
545
|
+
frozen: zod.z.boolean().optional().describe("Whether generated Pydantic models are immutable."),
|
|
546
|
+
requireOptionalFields: zod.z.boolean().optional().describe("Whether Optional fields remain required unless they declare a default."),
|
|
547
|
+
unionNaming: zod.z.enum(["v0", "v1"]).optional().describe("The naming strategy for generated union types."),
|
|
548
|
+
useFieldAliases: zod.z.boolean().optional().describe("Whether Pydantic field aliases preserve wire names.")
|
|
525
549
|
});
|
|
526
550
|
var additionalInitExportSchema = zod.z.strictObject({
|
|
527
|
-
from: nonEmptyStringSchema,
|
|
528
|
-
imports: zod.z.array(nonEmptyStringSchema).min(1)
|
|
551
|
+
from: nonEmptyStringSchema.describe("The module from which names are re-exported."),
|
|
552
|
+
imports: zod.z.array(nonEmptyStringSchema).min(1).describe("Names re-exported from the module.")
|
|
529
553
|
});
|
|
530
554
|
var pythonGenerationConfigSchema = zod.z.strictObject({
|
|
531
|
-
pythonVersion: nonEmptyStringSchema.optional(),
|
|
532
|
-
pydanticVersion: nonEmptyStringSchema.optional(),
|
|
533
|
-
pydantic: pydanticConfigSchema.optional(),
|
|
534
|
-
client: pythonClientSchema.optional(),
|
|
555
|
+
pythonVersion: nonEmptyStringSchema.optional().describe("The Python version targeted by the generated project."),
|
|
556
|
+
pydanticVersion: nonEmptyStringSchema.optional().describe("The Pydantic dependency version requirement."),
|
|
557
|
+
pydantic: pydanticConfigSchema.optional().describe("Pydantic model-generation behavior."),
|
|
558
|
+
client: pythonClientSchema.optional().describe("Python client file naming."),
|
|
535
559
|
/** Default followed by generated sync and async HTTP clients when the caller does not override it. */
|
|
536
|
-
followRedirectsByDefault: zod.z.boolean().optional(),
|
|
560
|
+
followRedirectsByDefault: zod.z.boolean().optional().describe("Whether generated HTTP clients follow redirects by default."),
|
|
537
561
|
/** Chunk size passed to Python byte-stream iterators. */
|
|
538
|
-
defaultBytesStreamChunkSize: zod.z.number().int().positive().optional(),
|
|
562
|
+
defaultBytesStreamChunkSize: zod.z.number().int().positive().optional().describe("The default byte-stream iterator chunk size."),
|
|
539
563
|
/** Python interpreter recursion limit installed by the generated package at import time. */
|
|
540
|
-
recursionLimit: zod.z.number().int().gt(1e3).optional(),
|
|
564
|
+
recursionLimit: zod.z.number().int().gt(1e3).optional().describe("The Python recursion limit installed when the generated package is imported."),
|
|
541
565
|
/** Published Python extras, keyed by extra name with package dependency names as values. */
|
|
542
|
-
extras: zod.z.record(nonEmptyStringSchema, zod.z.array(nonEmptyStringSchema)).optional(),
|
|
543
|
-
alwaysInitializeOptionals: zod.z.boolean().optional(),
|
|
544
|
-
useTypedDictRequests: zod.z.boolean().optional(),
|
|
545
|
-
additionalInitExports: zod.z.array(additionalInitExportSchema).optional()
|
|
566
|
+
extras: zod.z.record(nonEmptyStringSchema, zod.z.array(nonEmptyStringSchema)).optional().describe("Published Python extras and their dependency names."),
|
|
567
|
+
alwaysInitializeOptionals: zod.z.boolean().optional().describe("Whether optional model fields are initialized even when omitted."),
|
|
568
|
+
useTypedDictRequests: zod.z.boolean().optional().describe("Whether request bodies are generated as TypedDict types."),
|
|
569
|
+
additionalInitExports: zod.z.array(additionalInitExportSchema).optional().describe("Additional names re-exported from the package initializer.")
|
|
546
570
|
});
|
|
547
571
|
var rubyGenerationConfigSchema = zod.z.strictObject({
|
|
548
|
-
requirePaths: zod.z.array(nonEmptyStringSchema).optional()
|
|
572
|
+
requirePaths: zod.z.array(nonEmptyStringSchema).optional().describe("Ruby load paths included in the generated gem specification.")
|
|
549
573
|
});
|
|
550
574
|
var rustGenerationConfigSchema = zod.z.strictObject({
|
|
551
575
|
/**
|
|
552
576
|
* Rust type for datetime primitives. `offset` maps to `DateTime<FixedOffset>` and preserves the
|
|
553
577
|
* timezone the payload carried; `utc` maps to `DateTime<Utc>` and normalizes to UTC.
|
|
554
578
|
*/
|
|
555
|
-
dateTimeType: zod.z.enum(["offset", "utc"]).optional(),
|
|
579
|
+
dateTimeType: zod.z.enum(["offset", "utc"]).optional().describe("Whether datetime values preserve their offset or normalize to UTC."),
|
|
556
580
|
/** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
|
|
557
|
-
capitalizeInitialisms: zod.z.boolean().optional(),
|
|
581
|
+
capitalizeInitialisms: zod.z.boolean().optional().describe("Whether generated Rust names capitalize common initialisms."),
|
|
558
582
|
/** Cargo features, mapping a feature name to the dependencies or features it enables. */
|
|
559
|
-
features: zod.z.record(zod.z.string(), zod.z.array(nonEmptyStringSchema)).optional(),
|
|
583
|
+
features: zod.z.record(zod.z.string(), zod.z.array(nonEmptyStringSchema)).optional().describe("Cargo features and the dependencies or features each enables."),
|
|
560
584
|
/** Overrides which features make up Cargo's `default` feature set. */
|
|
561
|
-
defaultFeatures: zod.z.array(nonEmptyStringSchema).optional()
|
|
585
|
+
defaultFeatures: zod.z.array(nonEmptyStringSchema).optional().describe("Cargo features included in the crate default feature set.")
|
|
562
586
|
});
|
|
563
587
|
var swiftGenerationConfigSchema = zod.z.strictObject({
|
|
564
|
-
moduleName: nonEmptyStringSchema.optional(),
|
|
565
|
-
nullableAsOptional: zod.z.boolean().optional()
|
|
588
|
+
moduleName: nonEmptyStringSchema.optional().describe("The Swift module name for the generated package."),
|
|
589
|
+
nullableAsOptional: zod.z.boolean().optional().describe("Whether nullable values are represented as Swift optionals.")
|
|
566
590
|
});
|
|
567
591
|
var goModulePathSchema = relativePathSchema.regex(
|
|
568
592
|
/^(?!.*(?:^|\/)\.{1,2}(?:\/|$))[A-Za-z0-9._~-]+(?:\/[A-Za-z0-9._~-]+)*$/,
|
|
@@ -573,140 +597,166 @@ var composerPackageNameSchema = nonEmptyStringSchema.regex(
|
|
|
573
597
|
'Composer package name must be a lowercase "vendor/package" name'
|
|
574
598
|
);
|
|
575
599
|
var authorSchema = zod.z.strictObject({
|
|
576
|
-
name: nonEmptyStringSchema,
|
|
577
|
-
email: zod.z.email().optional(),
|
|
578
|
-
url: nonEmptyStringSchema.optional()
|
|
600
|
+
name: nonEmptyStringSchema.describe("The package author name."),
|
|
601
|
+
email: zod.z.email().optional().describe("The package author email address."),
|
|
602
|
+
url: nonEmptyStringSchema.optional().describe("The package author website.")
|
|
579
603
|
});
|
|
580
604
|
var developerSchema = zod.z.strictObject({
|
|
581
|
-
name: nonEmptyStringSchema,
|
|
582
|
-
email: zod.z.email().optional(),
|
|
583
|
-
organization: nonEmptyStringSchema.optional(),
|
|
584
|
-
organizationUrl: nonEmptyStringSchema.optional()
|
|
605
|
+
name: nonEmptyStringSchema.describe("The package developer name."),
|
|
606
|
+
email: zod.z.email().optional().describe("The package developer email address."),
|
|
607
|
+
organization: nonEmptyStringSchema.optional().describe("The developer organization name."),
|
|
608
|
+
organizationUrl: nonEmptyStringSchema.optional().describe("The developer organization website.")
|
|
585
609
|
});
|
|
586
610
|
var licenseSchema = zod.z.strictObject({
|
|
587
|
-
type: nonEmptyStringSchema,
|
|
588
|
-
name: nonEmptyStringSchema.optional(),
|
|
589
|
-
url: nonEmptyStringSchema.optional(),
|
|
590
|
-
path: nonEmptyStringSchema.optional()
|
|
611
|
+
type: nonEmptyStringSchema.describe("The license identifier or license type."),
|
|
612
|
+
name: nonEmptyStringSchema.optional().describe("The human-readable license name."),
|
|
613
|
+
url: nonEmptyStringSchema.optional().describe("The URL containing the license text."),
|
|
614
|
+
path: nonEmptyStringSchema.optional().describe("The path to a custom license file.")
|
|
591
615
|
});
|
|
592
616
|
var dependencySourceSchema = zod.z.discriminatedUnion("type", [
|
|
593
617
|
zod.z.strictObject({
|
|
594
|
-
type: zod.z.literal("registry"),
|
|
595
|
-
registry: nonEmptyStringSchema.optional()
|
|
618
|
+
type: zod.z.literal("registry").describe("Resolves the dependency from a package registry."),
|
|
619
|
+
registry: nonEmptyStringSchema.optional().describe("The registry used to resolve the dependency.")
|
|
596
620
|
}),
|
|
597
621
|
zod.z.strictObject({
|
|
598
|
-
type: zod.z.literal("git"),
|
|
599
|
-
url: nonEmptyStringSchema,
|
|
600
|
-
ref: nonEmptyStringSchema.optional(),
|
|
601
|
-
subdirectory: nonEmptyStringSchema.optional()
|
|
622
|
+
type: zod.z.literal("git").describe("Resolves the dependency from a Git repository."),
|
|
623
|
+
url: nonEmptyStringSchema.describe("The Git repository URL."),
|
|
624
|
+
ref: nonEmptyStringSchema.optional().describe("The Git branch, tag, or commit to use."),
|
|
625
|
+
subdirectory: nonEmptyStringSchema.optional().describe("The package subdirectory within the Git repository.")
|
|
602
626
|
}),
|
|
603
627
|
zod.z.strictObject({
|
|
604
|
-
type: zod.z.literal("path"),
|
|
605
|
-
path: nonEmptyStringSchema
|
|
628
|
+
type: zod.z.literal("path").describe("Resolves the dependency from a local path."),
|
|
629
|
+
path: nonEmptyStringSchema.describe("The local path containing the dependency.")
|
|
606
630
|
})
|
|
607
631
|
]);
|
|
608
632
|
var dependencySchema = zod.z.strictObject({
|
|
609
|
-
name: nonEmptyStringSchema,
|
|
610
|
-
version: nonEmptyStringSchema.optional(),
|
|
611
|
-
source: dependencySourceSchema.optional(),
|
|
612
|
-
packageName: nonEmptyStringSchema.optional(),
|
|
613
|
-
features: zod.z.array(nonEmptyStringSchema).optional(),
|
|
614
|
-
extras: zod.z.array(nonEmptyStringSchema).optional(),
|
|
615
|
-
optional: zod.z.boolean().optional(),
|
|
616
|
-
defaultFeatures: zod.z.boolean().optional(),
|
|
617
|
-
environmentMarker: nonEmptyStringSchema.optional()
|
|
633
|
+
name: nonEmptyStringSchema.describe("The dependency name used by the package manager."),
|
|
634
|
+
version: nonEmptyStringSchema.optional().describe("The dependency version requirement."),
|
|
635
|
+
source: dependencySourceSchema.optional().describe("A non-default source for the dependency."),
|
|
636
|
+
packageName: nonEmptyStringSchema.optional().describe("The source package name when it differs from the dependency alias."),
|
|
637
|
+
features: zod.z.array(nonEmptyStringSchema).optional().describe("Cargo features enabled for this dependency."),
|
|
638
|
+
extras: zod.z.array(nonEmptyStringSchema).optional().describe("Python extras enabled for this dependency."),
|
|
639
|
+
optional: zod.z.boolean().optional().describe("Whether the dependency is optional."),
|
|
640
|
+
defaultFeatures: zod.z.boolean().optional().describe("Whether the dependency enables its default Cargo features."),
|
|
641
|
+
environmentMarker: nonEmptyStringSchema.optional().describe("A Python environment marker that conditions this dependency.")
|
|
618
642
|
}).refine(({ source, version }) => source !== void 0 || version !== void 0, {
|
|
619
643
|
message: "dependency must define a version or a source"
|
|
620
644
|
});
|
|
621
645
|
var projectUrlSchema = zod.z.strictObject({
|
|
622
|
-
label: nonEmptyStringSchema,
|
|
623
|
-
url: nonEmptyStringSchema
|
|
646
|
+
label: nonEmptyStringSchema.describe("The label displayed for the project link."),
|
|
647
|
+
url: nonEmptyStringSchema.describe("The project link URL.")
|
|
624
648
|
});
|
|
625
649
|
var packageConfigSchema = zod.z.strictObject({
|
|
626
|
-
packageName: nonEmptyStringSchema.optional(),
|
|
627
|
-
moduleName: nonEmptyStringSchema.optional(),
|
|
628
|
-
modulePath: goModulePathSchema.optional(),
|
|
629
|
-
namespace: nonEmptyStringSchema.optional(),
|
|
630
|
-
groupId: nonEmptyStringSchema.optional(),
|
|
631
|
-
artifactId: nonEmptyStringSchema.optional(),
|
|
632
|
-
description: zod.z.string().optional(),
|
|
633
|
-
repository: nonEmptyStringSchema.optional(),
|
|
634
|
-
homepage: nonEmptyStringSchema.optional(),
|
|
635
|
-
documentationUrl: nonEmptyStringSchema.optional(),
|
|
636
|
-
authors: zod.z.array(authorSchema).optional(),
|
|
637
|
-
developers: zod.z.array(developerSchema).optional(),
|
|
638
|
-
license: licenseSchema.optional(),
|
|
639
|
-
keywords: zod.z.array(nonEmptyStringSchema).optional(),
|
|
640
|
-
classifiers: zod.z.array(nonEmptyStringSchema).optional(),
|
|
641
|
-
projectUrls: zod.z.array(projectUrlSchema).optional(),
|
|
642
|
-
extraDependencies: zod.z.array(dependencySchema).optional(),
|
|
643
|
-
extraDevDependencies: zod.z.array(dependencySchema).optional(),
|
|
644
|
-
extraPeerDependencies: zod.z.array(dependencySchema).optional()
|
|
650
|
+
packageName: nonEmptyStringSchema.optional().describe("The package name used by the target language registry."),
|
|
651
|
+
moduleName: nonEmptyStringSchema.optional().describe("The generated module or import name when it differs from the package name."),
|
|
652
|
+
modulePath: goModulePathSchema.optional().describe("The Go module path used for imports and publishing."),
|
|
653
|
+
namespace: nonEmptyStringSchema.optional().describe("The namespace or package prefix for generated code."),
|
|
654
|
+
groupId: nonEmptyStringSchema.optional().describe("The Maven group identifier."),
|
|
655
|
+
artifactId: nonEmptyStringSchema.optional().describe("The Maven artifact identifier."),
|
|
656
|
+
description: zod.z.string().optional().describe("The package description used in generated metadata."),
|
|
657
|
+
repository: nonEmptyStringSchema.optional().describe("The source repository for the generated SDK."),
|
|
658
|
+
homepage: nonEmptyStringSchema.optional().describe("The package homepage URL."),
|
|
659
|
+
documentationUrl: nonEmptyStringSchema.optional().describe("The package documentation URL."),
|
|
660
|
+
authors: zod.z.array(authorSchema).optional().describe("Authors credited in package metadata."),
|
|
661
|
+
developers: zod.z.array(developerSchema).optional().describe("Developers credited in package metadata."),
|
|
662
|
+
license: licenseSchema.optional().describe("License metadata for the generated package."),
|
|
663
|
+
keywords: zod.z.array(nonEmptyStringSchema).optional().describe("Search keywords for package metadata."),
|
|
664
|
+
classifiers: zod.z.array(nonEmptyStringSchema).optional().describe("Package classifiers used by registries such as PyPI."),
|
|
665
|
+
projectUrls: zod.z.array(projectUrlSchema).optional().describe("Labeled project links for package metadata."),
|
|
666
|
+
extraDependencies: zod.z.array(dependencySchema).optional().describe("Additional runtime dependencies added to the generated package."),
|
|
667
|
+
extraDevDependencies: zod.z.array(dependencySchema).optional().describe("Additional development dependencies added to the generated package."),
|
|
668
|
+
extraPeerDependencies: zod.z.array(dependencySchema).optional().describe("Additional peer dependencies added to the generated package.")
|
|
645
669
|
});
|
|
646
670
|
|
|
647
671
|
// src/sdk-config-domain/v1/language/terraform.ts
|
|
648
672
|
var planModifierSourceSchema = zod.z.discriminatedUnion("enabled", [
|
|
649
|
-
zod.z.strictObject({
|
|
650
|
-
|
|
673
|
+
zod.z.strictObject({
|
|
674
|
+
enabled: zod.z.literal(true).describe("Enables custom Terraform plan modifiers."),
|
|
675
|
+
sourceDir: nonEmptyStringSchema.describe(
|
|
676
|
+
"The directory containing custom plan modifier source files."
|
|
677
|
+
)
|
|
678
|
+
}),
|
|
679
|
+
zod.z.strictObject({
|
|
680
|
+
enabled: zod.z.literal(false).describe("Disables custom Terraform plan modifiers.")
|
|
681
|
+
})
|
|
651
682
|
]);
|
|
652
683
|
var planModifiersSchema = zod.z.strictObject({
|
|
653
|
-
resources: planModifierSourceSchema,
|
|
654
|
-
attributes: planModifierSourceSchema
|
|
684
|
+
resources: planModifierSourceSchema.describe("Custom plan modifiers for generated resources."),
|
|
685
|
+
attributes: planModifierSourceSchema.describe("Custom plan modifiers for generated attributes.")
|
|
655
686
|
});
|
|
656
687
|
var providerSchemaSchema = zod.z.strictObject({
|
|
657
|
-
addressKey: nonEmptyStringSchema
|
|
658
|
-
|
|
688
|
+
addressKey: nonEmptyStringSchema.describe(
|
|
689
|
+
"The provider attribute used to configure the API address."
|
|
690
|
+
),
|
|
691
|
+
authTokenKey: nonEmptyStringSchema.describe(
|
|
692
|
+
"The provider attribute used to configure the authentication token."
|
|
693
|
+
)
|
|
659
694
|
});
|
|
660
695
|
var terraformGenerationConfigSchema = zod.z.strictObject({
|
|
661
|
-
providerName: nonEmptyStringSchema.optional(),
|
|
662
|
-
providerVersion: nonEmptyStringSchema.optional(),
|
|
663
|
-
providerModulePath: goModulePathSchema.optional(),
|
|
664
|
-
mockAcceptance: zod.z.boolean().optional(),
|
|
665
|
-
hideComputedDiff: zod.z.boolean().optional(),
|
|
666
|
-
providerSchema: providerSchemaSchema.optional(),
|
|
667
|
-
planModifiers: planModifiersSchema.optional()
|
|
696
|
+
providerName: nonEmptyStringSchema.optional().describe("The Terraform provider name."),
|
|
697
|
+
providerVersion: nonEmptyStringSchema.optional().describe("The generated Terraform provider version."),
|
|
698
|
+
providerModulePath: goModulePathSchema.optional().describe("The Go module path for the generated provider."),
|
|
699
|
+
mockAcceptance: zod.z.boolean().optional().describe("Whether acceptance tests use a mock API server."),
|
|
700
|
+
hideComputedDiff: zod.z.boolean().optional().describe("Whether computed-only changes are hidden from Terraform plans."),
|
|
701
|
+
providerSchema: providerSchemaSchema.optional().describe("Names of provider-level configuration attributes."),
|
|
702
|
+
planModifiers: planModifiersSchema.optional().describe("Custom plan modifier source configuration.")
|
|
668
703
|
});
|
|
669
704
|
|
|
670
705
|
// src/sdk-config-ir/v1/generation.ts
|
|
671
706
|
var generationAssetSchema = zod.z.discriminatedUnion("type", [
|
|
672
|
-
zod.z.strictObject({
|
|
673
|
-
|
|
674
|
-
|
|
707
|
+
zod.z.strictObject({
|
|
708
|
+
type: zod.z.literal("path").describe("Loads the generation asset from a relative path."),
|
|
709
|
+
location: relativePathSchema.describe("The relative path to the generation asset.")
|
|
710
|
+
}),
|
|
711
|
+
zod.z.strictObject({
|
|
712
|
+
type: zod.z.literal("url").describe("Loads the generation asset from a URL."),
|
|
713
|
+
location: nonEmptyStringSchema.describe("The URL of the generation asset.")
|
|
714
|
+
}),
|
|
715
|
+
zod.z.strictObject({
|
|
716
|
+
type: zod.z.literal("artifact").describe("Loads the generation asset from stored build output."),
|
|
717
|
+
location: nonEmptyStringSchema.describe("The artifact identifier or location.")
|
|
718
|
+
})
|
|
675
719
|
]);
|
|
676
720
|
var hookDependencySchema = zod.z.strictObject({
|
|
677
|
-
name: nonEmptyStringSchema,
|
|
678
|
-
version: nonEmptyStringSchema,
|
|
679
|
-
groupId: nonEmptyStringSchema.optional()
|
|
721
|
+
name: nonEmptyStringSchema.describe("The hook dependency name."),
|
|
722
|
+
version: nonEmptyStringSchema.describe("The hook dependency version requirement."),
|
|
723
|
+
groupId: nonEmptyStringSchema.optional().describe("The Maven group identifier for the dependency.")
|
|
680
724
|
});
|
|
681
725
|
var hooksConfigSchema = zod.z.strictObject({
|
|
682
|
-
enabled: zod.z.boolean(),
|
|
683
|
-
source: generationAssetSchema.optional(),
|
|
684
|
-
dependencies: zod.z.array(hookDependencySchema).optional()
|
|
726
|
+
enabled: zod.z.boolean().describe("Whether custom request and response hooks are generated."),
|
|
727
|
+
source: generationAssetSchema.optional().describe("The source containing custom hook implementations."),
|
|
728
|
+
dependencies: zod.z.array(hookDependencySchema).optional().describe("Dependencies required by custom hooks.")
|
|
685
729
|
});
|
|
686
730
|
var customCodeConfigSchema = zod.z.strictObject({
|
|
687
|
-
enabled: zod.z.boolean(),
|
|
688
|
-
source: generationAssetSchema.optional(),
|
|
689
|
-
conflictStrategy: zod.z.enum(["mark", "ours", "theirs"]).optional(),
|
|
690
|
-
trackChanges: zod.z.boolean().optional(),
|
|
691
|
-
previousBuildId: zod.z.number().int().positive().optional(),
|
|
692
|
-
protectedFiles: zod.z.array(nonEmptyStringSchema).optional()
|
|
731
|
+
enabled: zod.z.boolean().describe("Whether customer-authored code is merged into generated output."),
|
|
732
|
+
source: generationAssetSchema.optional().describe("The source containing customer-authored code."),
|
|
733
|
+
conflictStrategy: zod.z.enum(["mark", "ours", "theirs"]).optional().describe("How merge conflicts between generated and custom code are handled."),
|
|
734
|
+
trackChanges: zod.z.boolean().optional().describe("Whether custom-code changes are tracked between builds."),
|
|
735
|
+
previousBuildId: zod.z.number().int().positive().optional().describe("The previous build used as the merge baseline."),
|
|
736
|
+
protectedFiles: zod.z.array(nonEmptyStringSchema).optional().describe("Generated file paths that custom-code merging must not overwrite.")
|
|
693
737
|
});
|
|
694
738
|
var workflowConfigSchema = zod.z.strictObject({
|
|
695
|
-
path: relativePathSchema,
|
|
696
|
-
outputName: nonEmptyStringSchema.optional()
|
|
739
|
+
path: relativePathSchema.describe("The relative path to the workflow definition."),
|
|
740
|
+
outputName: nonEmptyStringSchema.optional().describe("The file name used for the generated workflow.")
|
|
697
741
|
});
|
|
698
742
|
var analyticsHeaderSchema = zod.z.union([
|
|
699
|
-
zod.z.strictObject({
|
|
700
|
-
|
|
743
|
+
zod.z.strictObject({
|
|
744
|
+
name: nonEmptyStringSchema.describe("The exported telemetry header name."),
|
|
745
|
+
value: zod.z.string().describe("The literal telemetry header value.")
|
|
746
|
+
}),
|
|
747
|
+
zod.z.strictObject({
|
|
748
|
+
name: nonEmptyStringSchema.describe("The exported telemetry header name."),
|
|
749
|
+
valueRef: nonEmptyStringSchema.describe("A reference to the telemetry header value.")
|
|
750
|
+
})
|
|
701
751
|
]);
|
|
702
752
|
var analyticsConfigSchema = zod.z.strictObject({
|
|
703
|
-
enabled: zod.z.boolean(),
|
|
704
|
-
endpoint: nonEmptyStringSchema.optional(),
|
|
705
|
-
exporter: zod.z.enum(["otlp-http", "console"]).optional(),
|
|
706
|
-
headers: zod.z.array(analyticsHeaderSchema).optional(),
|
|
707
|
-
batchSize: zod.z.number().int().positive().optional(),
|
|
708
|
-
scheduledDelayMs: zod.z.number().nonnegative().optional(),
|
|
709
|
-
exportTimeoutMs: zod.z.number().nonnegative().optional()
|
|
753
|
+
enabled: zod.z.boolean().describe("Whether generated clients export usage telemetry."),
|
|
754
|
+
endpoint: nonEmptyStringSchema.optional().describe("The telemetry export endpoint."),
|
|
755
|
+
exporter: zod.z.enum(["otlp-http", "console"]).optional().describe("The telemetry exporter implementation."),
|
|
756
|
+
headers: zod.z.array(analyticsHeaderSchema).optional().describe("Headers sent by the telemetry exporter."),
|
|
757
|
+
batchSize: zod.z.number().int().positive().optional().describe("The maximum spans in each export batch."),
|
|
758
|
+
scheduledDelayMs: zod.z.number().nonnegative().optional().describe("The delay between scheduled exports, in milliseconds."),
|
|
759
|
+
exportTimeoutMs: zod.z.number().nonnegative().optional().describe("The maximum time allowed for an export, in milliseconds.")
|
|
710
760
|
}).superRefine(({ enabled, endpoint }, context) => {
|
|
711
761
|
if (enabled && endpoint === void 0) {
|
|
712
762
|
context.addIssue({
|
|
@@ -717,91 +767,93 @@ var analyticsConfigSchema = zod.z.strictObject({
|
|
|
717
767
|
}
|
|
718
768
|
});
|
|
719
769
|
var wireTestsSchema = zod.z.strictObject({
|
|
720
|
-
enabled: zod.z.boolean(),
|
|
721
|
-
exclusions: zod.z.array(nonEmptyStringSchema).optional(),
|
|
722
|
-
fallbackToGeneratedErrorExamples: zod.z.boolean().optional(),
|
|
723
|
-
fixtureSource: zod.z.enum(["synthetic", "recorded", "auto"]).optional()
|
|
770
|
+
enabled: zod.z.boolean().describe("Whether wire-level request and response tests are generated."),
|
|
771
|
+
exclusions: zod.z.array(nonEmptyStringSchema).optional().describe("Operations excluded from wire tests."),
|
|
772
|
+
fallbackToGeneratedErrorExamples: zod.z.boolean().optional().describe("Whether missing error fixtures are synthesized from generated examples."),
|
|
773
|
+
fixtureSource: zod.z.enum(["synthetic", "recorded", "auto"]).optional().describe("Where wire-test fixtures are obtained.")
|
|
724
774
|
});
|
|
725
775
|
var unitTestsSchema = zod.z.strictObject({
|
|
726
|
-
enabled: zod.z.boolean(),
|
|
727
|
-
mode: zod.z.enum(["core-runtime", "schema-driven", "both"]).optional(),
|
|
728
|
-
exclusions: zod.z.array(nonEmptyStringSchema).optional()
|
|
776
|
+
enabled: zod.z.boolean().describe("Whether SDK unit tests are generated."),
|
|
777
|
+
mode: zod.z.enum(["core-runtime", "schema-driven", "both"]).optional().describe("The unit-test generation strategy."),
|
|
778
|
+
exclusions: zod.z.array(nonEmptyStringSchema).optional().describe("Operations excluded from unit tests.")
|
|
729
779
|
});
|
|
730
780
|
var fernDefinitionMetadataSchema = zod.z.strictObject({
|
|
731
|
-
definitionS3DownloadUrl: nonEmptyStringSchema
|
|
732
|
-
|
|
733
|
-
|
|
781
|
+
definitionS3DownloadUrl: nonEmptyStringSchema.describe(
|
|
782
|
+
"The download URL for the materialized Fern definition archive."
|
|
783
|
+
),
|
|
784
|
+
outputPath: nonEmptyStringSchema.optional().describe("The destination path for Fern definition support files."),
|
|
785
|
+
cliVersion: nonEmptyStringSchema.optional().describe("The Fern CLI version associated with the definition.")
|
|
734
786
|
});
|
|
735
787
|
var streamsSchema = zod.z.strictObject({
|
|
736
|
-
enabled: zod.z.boolean(),
|
|
737
|
-
responseType: zod.z.enum(["wrapper", "native", "web"]).optional(),
|
|
738
|
-
fileResponseType: zod.z.enum(["stream", "binary-response"]).optional(),
|
|
739
|
-
defaultChunkSizeBytes: zod.z.number().int().positive().optional()
|
|
788
|
+
enabled: zod.z.boolean().describe("Whether generated clients expose streaming response APIs."),
|
|
789
|
+
responseType: zod.z.enum(["wrapper", "native", "web"]).optional().describe("The streaming response abstraction exposed by generated clients."),
|
|
790
|
+
fileResponseType: zod.z.enum(["stream", "binary-response"]).optional().describe("The response type used for file downloads."),
|
|
791
|
+
defaultChunkSizeBytes: zod.z.number().int().positive().optional().describe("The default number of bytes yielded by streaming iterators.")
|
|
740
792
|
});
|
|
741
793
|
var layoutConfigSchema = zod.z.strictObject({
|
|
742
|
-
outputDirectory: zod.z.enum(["project-root", "source-root"]).optional(),
|
|
743
|
-
packagePath: nonEmptyStringSchema.optional()
|
|
794
|
+
outputDirectory: zod.z.enum(["project-root", "source-root"]).optional().describe("Whether generated source is rooted at the project or its source directory."),
|
|
795
|
+
packagePath: nonEmptyStringSchema.optional().describe("The package-relative path for generated source files.")
|
|
744
796
|
});
|
|
745
797
|
var serializationConfigSchema = zod.z.strictObject({
|
|
746
|
-
enumRepresentation: zod.z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional(),
|
|
747
|
-
additionalProperties: zod.z.enum(["allow", "forbid", "ignore", "language-default"]).optional(),
|
|
748
|
-
inlineTypes: zod.z.boolean().optional(),
|
|
749
|
-
omitUndefined: zod.z.boolean().optional()
|
|
798
|
+
enumRepresentation: zod.z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional().describe("How schema enums are represented in generated code."),
|
|
799
|
+
additionalProperties: zod.z.enum(["allow", "forbid", "ignore", "language-default"]).optional().describe("How undeclared object properties are handled."),
|
|
800
|
+
inlineTypes: zod.z.boolean().optional().describe("Whether inline schemas remain nested under their parent types."),
|
|
801
|
+
omitUndefined: zod.z.boolean().optional().describe("Whether undefined properties are omitted during serialization.")
|
|
750
802
|
});
|
|
751
803
|
var languageGenerationConfigSchema = zod.z.strictObject({
|
|
752
|
-
typescript: typescriptGenerationConfigSchema.optional(),
|
|
753
|
-
python: pythonGenerationConfigSchema.optional(),
|
|
754
|
-
java: javaGenerationConfigSchema.optional(),
|
|
755
|
-
kotlin: kotlinGenerationConfigSchema.optional(),
|
|
756
|
-
go: goGenerationConfigSchema.optional(),
|
|
757
|
-
csharp: csharpGenerationConfigSchema.optional(),
|
|
758
|
-
php: phpGenerationConfigSchema.optional(),
|
|
759
|
-
ruby: rubyGenerationConfigSchema.optional(),
|
|
760
|
-
rust: rustGenerationConfigSchema.optional(),
|
|
761
|
-
cli: cliGenerationConfigSchema.optional(),
|
|
762
|
-
mcp: mcpGenerationConfigSchema.optional(),
|
|
763
|
-
swift: swiftGenerationConfigSchema.optional(),
|
|
764
|
-
terraform: terraformGenerationConfigSchema.optional()
|
|
804
|
+
typescript: typescriptGenerationConfigSchema.optional().describe("TypeScript-specific generation settings."),
|
|
805
|
+
python: pythonGenerationConfigSchema.optional().describe("Python-specific generation settings."),
|
|
806
|
+
java: javaGenerationConfigSchema.optional().describe("Java-specific generation settings."),
|
|
807
|
+
kotlin: kotlinGenerationConfigSchema.optional().describe("Kotlin-specific generation settings."),
|
|
808
|
+
go: goGenerationConfigSchema.optional().describe("Go-specific generation settings."),
|
|
809
|
+
csharp: csharpGenerationConfigSchema.optional().describe("C#-specific generation settings."),
|
|
810
|
+
php: phpGenerationConfigSchema.optional().describe("PHP-specific generation settings."),
|
|
811
|
+
ruby: rubyGenerationConfigSchema.optional().describe("Ruby-specific generation settings."),
|
|
812
|
+
rust: rustGenerationConfigSchema.optional().describe("Rust-specific generation settings."),
|
|
813
|
+
cli: cliGenerationConfigSchema.optional().describe("CLI-specific generation settings."),
|
|
814
|
+
mcp: mcpGenerationConfigSchema.optional().describe("MCP-specific generation settings."),
|
|
815
|
+
swift: swiftGenerationConfigSchema.optional().describe("Swift-specific generation settings."),
|
|
816
|
+
terraform: terraformGenerationConfigSchema.optional().describe("Terraform-specific generation settings.")
|
|
765
817
|
});
|
|
766
818
|
var generationConfigSchema = zod.z.strictObject({
|
|
767
|
-
includeWatermark: zod.z.boolean().default(false),
|
|
819
|
+
includeWatermark: zod.z.boolean().default(false).describe("Whether generated files include a generator watermark."),
|
|
768
820
|
/** Emits an AI service into the generated SDK. Python, Java and TypeScript honour it. */
|
|
769
|
-
ai: zod.z.boolean().default(false),
|
|
770
|
-
includeOptionalSnippetParameters: zod.z.boolean().optional(),
|
|
771
|
-
buildAllModels: zod.z.boolean().default(false),
|
|
772
|
-
inferServiceNames: zod.z.boolean().default(false),
|
|
773
|
-
includeDeprecatedOperations: zod.z.boolean().default(true),
|
|
774
|
-
multipleResponses: zod.z.boolean().default(false),
|
|
821
|
+
ai: zod.z.boolean().default(false).describe("Whether the SDK includes generated AI service helpers."),
|
|
822
|
+
includeOptionalSnippetParameters: zod.z.boolean().optional().describe("Whether usage snippets include optional request parameters."),
|
|
823
|
+
buildAllModels: zod.z.boolean().default(false).describe("Whether models not referenced by operations are also generated."),
|
|
824
|
+
inferServiceNames: zod.z.boolean().default(false).describe("Whether service names are inferred from API structure."),
|
|
825
|
+
includeDeprecatedOperations: zod.z.boolean().default(true).describe("Whether deprecated API operations are generated."),
|
|
826
|
+
multipleResponses: zod.z.boolean().default(false).describe("Whether operations model multiple successful response types."),
|
|
775
827
|
/** Generate the entire SDK project, including package manifests and publishable artifacts. */
|
|
776
|
-
generateFullProject: zod.z.boolean().default(false),
|
|
777
|
-
devContainer: zod.z.boolean().default(false),
|
|
778
|
-
allowMockClient: zod.z.boolean().default(false),
|
|
779
|
-
ignoreFiles: zod.z.array(nonEmptyStringSchema).optional(),
|
|
828
|
+
generateFullProject: zod.z.boolean().default(false).describe("Whether generation emits a complete publishable project."),
|
|
829
|
+
devContainer: zod.z.boolean().default(false).describe("Whether development-container configuration is generated."),
|
|
830
|
+
allowMockClient: zod.z.boolean().default(false).describe("Whether a mock API client is included in the generated SDK."),
|
|
831
|
+
ignoreFiles: zod.z.array(nonEmptyStringSchema).optional().describe("Generated paths excluded from the final output."),
|
|
780
832
|
/**
|
|
781
833
|
* Raw .fernignore file contents supplied to external publishers that need Fern ignore semantics.
|
|
782
834
|
* This is separate from generation.ignoreFiles because raw contents preserve comments, ordering,
|
|
783
835
|
* blank lines, and negation rules.
|
|
784
836
|
*/
|
|
785
|
-
fernignoreContents: zod.z.string().optional(),
|
|
837
|
+
fernignoreContents: zod.z.string().optional().describe("The raw .fernignore contents retained for external publishers."),
|
|
786
838
|
/**
|
|
787
839
|
* Optional Fern definition metadata for publisher paths that need to write definition or
|
|
788
840
|
* mock-server support files. This is not required for core GitHub artifact publishing.
|
|
789
841
|
*/
|
|
790
|
-
fernDefinitionMetadata: fernDefinitionMetadataSchema.optional(),
|
|
791
|
-
reservedKeywords: zod.z.array(nonEmptyStringSchema).optional(),
|
|
792
|
-
hooks: hooksConfigSchema.optional(),
|
|
793
|
-
customCode: customCodeConfigSchema.optional(),
|
|
794
|
-
workflows: zod.z.array(workflowConfigSchema).optional(),
|
|
795
|
-
customQueryPaths: zod.z.array(relativePathSchema).optional(),
|
|
796
|
-
analytics: analyticsConfigSchema.optional(),
|
|
797
|
-
wireTests: wireTestsSchema.optional(),
|
|
798
|
-
unitTests: unitTestsSchema.optional(),
|
|
799
|
-
webSockets: zod.z.boolean().optional(),
|
|
800
|
-
streams: streamsSchema.optional(),
|
|
801
|
-
naming: namingConfigSchema.optional(),
|
|
802
|
-
layout: layoutConfigSchema.optional(),
|
|
803
|
-
serialization: serializationConfigSchema.optional(),
|
|
804
|
-
language: languageGenerationConfigSchema.optional()
|
|
842
|
+
fernDefinitionMetadata: fernDefinitionMetadataSchema.optional().describe("Materialized Fern definition metadata used by external publishers."),
|
|
843
|
+
reservedKeywords: zod.z.array(nonEmptyStringSchema).optional().describe("Additional identifiers treated as reserved words."),
|
|
844
|
+
hooks: hooksConfigSchema.optional().describe("Custom SDK request and response hook configuration."),
|
|
845
|
+
customCode: customCodeConfigSchema.optional().describe("Customer-authored code merge configuration."),
|
|
846
|
+
workflows: zod.z.array(workflowConfigSchema).optional().describe("Workflow definitions included in generated output."),
|
|
847
|
+
customQueryPaths: zod.z.array(relativePathSchema).optional().describe("Relative paths to custom query definitions."),
|
|
848
|
+
analytics: analyticsConfigSchema.optional().describe("Generated client telemetry configuration."),
|
|
849
|
+
wireTests: wireTestsSchema.optional().describe("Wire-level request and response test generation."),
|
|
850
|
+
unitTests: unitTestsSchema.optional().describe("SDK unit-test generation."),
|
|
851
|
+
webSockets: zod.z.boolean().optional().describe("Whether WebSocket clients are generated for supported channels."),
|
|
852
|
+
streams: streamsSchema.optional().describe("Streaming response generation behavior."),
|
|
853
|
+
naming: namingConfigSchema.optional().describe("Names and casing used by generated code."),
|
|
854
|
+
layout: layoutConfigSchema.optional().describe("Generated project and source layout."),
|
|
855
|
+
serialization: serializationConfigSchema.optional().describe("Generated model serialization behavior."),
|
|
856
|
+
language: languageGenerationConfigSchema.optional().describe("Settings specific to the selected target language.")
|
|
805
857
|
});
|
|
806
858
|
var publishRegistrySchema = zod.z.enum([
|
|
807
859
|
"npm",
|
|
@@ -819,154 +871,160 @@ var credentialResolutionSchema = zod.z.enum([
|
|
|
819
871
|
"resolved-by-fiddle"
|
|
820
872
|
]);
|
|
821
873
|
var registryCredentialsSchema = zod.z.strictObject({
|
|
822
|
-
username: nonEmptyStringSchema.optional(),
|
|
823
|
-
password: nonEmptyStringSchema.optional(),
|
|
824
|
-
token: nonEmptyStringSchema.optional(),
|
|
825
|
-
apiKey: nonEmptyStringSchema.optional()
|
|
874
|
+
username: nonEmptyStringSchema.optional().describe("The resolved credential username."),
|
|
875
|
+
password: nonEmptyStringSchema.optional().describe("The resolved credential password."),
|
|
876
|
+
token: nonEmptyStringSchema.optional().describe("The resolved credential token."),
|
|
877
|
+
apiKey: nonEmptyStringSchema.optional().describe("The resolved credential API key.")
|
|
826
878
|
});
|
|
827
879
|
var commonPublishShape = {
|
|
828
|
-
url: nonEmptyStringSchema.optional(),
|
|
880
|
+
url: nonEmptyStringSchema.optional().describe("A custom package registry URL."),
|
|
829
881
|
/** Reference to registry publishing credentials. */
|
|
830
|
-
credentialsRef: nonEmptyStringSchema.optional(),
|
|
882
|
+
credentialsRef: nonEmptyStringSchema.optional().describe("A reference to registry publishing credentials."),
|
|
831
883
|
/** Raw registry credentials. These values can be sensitive and must be handled as secrets. */
|
|
832
|
-
credentials: registryCredentialsSchema.optional(),
|
|
884
|
+
credentials: registryCredentialsSchema.optional().describe("Resolved registry publishing credentials."),
|
|
833
885
|
/**
|
|
834
886
|
* Registry-specific package version override. If omitted, the external publisher/orchestrator may
|
|
835
887
|
* fall back to target.sdkVersion.
|
|
836
888
|
*/
|
|
837
|
-
version: nonEmptyStringSchema.optional(),
|
|
838
|
-
releaseBranch: nonEmptyStringSchema.optional(),
|
|
839
|
-
tolerateRepublish: zod.z.boolean().optional(),
|
|
889
|
+
version: nonEmptyStringSchema.optional().describe("A registry-specific package version override."),
|
|
890
|
+
releaseBranch: nonEmptyStringSchema.optional().describe("The branch used by generated package release workflows."),
|
|
891
|
+
tolerateRepublish: zod.z.boolean().optional().describe("Whether publishing succeeds when this package version already exists."),
|
|
840
892
|
/** Generate registry publishing workflow files when publishing through GitHub delivery. */
|
|
841
|
-
shouldGeneratePublishWorkflow: zod.z.boolean().optional()
|
|
893
|
+
shouldGeneratePublishWorkflow: zod.z.boolean().optional().describe("Whether GitHub delivery includes a registry publishing workflow.")
|
|
842
894
|
};
|
|
843
895
|
var trustedPublishingShape = {
|
|
844
896
|
/** Use registry trusted publishing / OIDC instead of a static token secret. */
|
|
845
|
-
trustedPublishing: zod.z.boolean().optional()
|
|
897
|
+
trustedPublishing: zod.z.boolean().optional().describe("Whether registry publication uses trusted publishing or OIDC.")
|
|
846
898
|
};
|
|
847
899
|
var mavenCoordinateSchema = nonEmptyStringSchema.regex(
|
|
848
900
|
/^[A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+$/,
|
|
849
901
|
"Maven coordinate must be in groupId:artifactId form"
|
|
850
902
|
);
|
|
851
903
|
var mavenSignatureEnvironmentSchema = zod.z.strictObject({
|
|
852
|
-
keyIdEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
853
|
-
passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
854
|
-
secretKeyEnvironmentVariable: nonEmptyStringSchema.optional()
|
|
904
|
+
keyIdEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the signing key ID."),
|
|
905
|
+
passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the signing key password."),
|
|
906
|
+
secretKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the armored secret key.")
|
|
855
907
|
});
|
|
856
908
|
var mavenSignatureSchema = zod.z.strictObject({
|
|
857
|
-
keyId: nonEmptyStringSchema,
|
|
858
|
-
password: nonEmptyStringSchema,
|
|
859
|
-
secretKey: nonEmptyStringSchema
|
|
909
|
+
keyId: nonEmptyStringSchema.describe("The resolved signing key identifier."),
|
|
910
|
+
password: nonEmptyStringSchema.describe("The resolved signing key password."),
|
|
911
|
+
secretKey: nonEmptyStringSchema.describe("The resolved armored secret key.")
|
|
860
912
|
});
|
|
861
913
|
var publishConfigSchema = zod.z.discriminatedUnion("registry", [
|
|
862
914
|
zod.z.strictObject({
|
|
863
|
-
registry: zod.z.literal("npm"),
|
|
915
|
+
registry: zod.z.literal("npm").describe("Publishes the package to an npm-compatible registry."),
|
|
864
916
|
/** Environment variable name containing the npm registry token. */
|
|
865
|
-
tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
917
|
+
tokenEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the npm registry token."),
|
|
866
918
|
/** Write npm package metadata as private when the publisher creates/updates package.json. */
|
|
867
|
-
isPackagePrivate: zod.z.boolean().optional(),
|
|
919
|
+
isPackagePrivate: zod.z.boolean().optional().describe("Whether generated npm package metadata marks the package as private."),
|
|
868
920
|
/** Also publish the TypeScript package to JSR from the npm publishing path. */
|
|
869
|
-
publishToJsr: zod.z.boolean().optional(),
|
|
921
|
+
publishToJsr: zod.z.boolean().optional().describe("Whether the npm publishing flow also publishes the package to JSR."),
|
|
870
922
|
...trustedPublishingShape,
|
|
871
923
|
...commonPublishShape
|
|
872
924
|
}),
|
|
873
925
|
zod.z.strictObject({
|
|
874
|
-
registry: zod.z.literal("pypi"),
|
|
875
|
-
usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
876
|
-
passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
926
|
+
registry: zod.z.literal("pypi").describe("Publishes the package to a PyPI-compatible registry."),
|
|
927
|
+
usernameEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the PyPI username."),
|
|
928
|
+
passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the PyPI password or token."),
|
|
877
929
|
...trustedPublishingShape,
|
|
878
930
|
...commonPublishShape
|
|
879
931
|
}),
|
|
880
932
|
zod.z.strictObject({
|
|
881
|
-
registry: zod.z.literal("nuget"),
|
|
882
|
-
apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
933
|
+
registry: zod.z.literal("nuget").describe("Publishes the package to a NuGet-compatible registry."),
|
|
934
|
+
apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the NuGet API key."),
|
|
883
935
|
...trustedPublishingShape,
|
|
884
936
|
...commonPublishShape
|
|
885
937
|
}),
|
|
886
938
|
zod.z.strictObject({
|
|
887
|
-
registry: zod.z.literal("rubygems"),
|
|
888
|
-
apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
939
|
+
registry: zod.z.literal("rubygems").describe("Publishes the package to a RubyGems-compatible registry."),
|
|
940
|
+
apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the RubyGems API key."),
|
|
941
|
+
...commonPublishShape
|
|
942
|
+
}),
|
|
943
|
+
zod.z.strictObject({
|
|
944
|
+
registry: zod.z.literal("crates").describe("Publishes the crate to a Cargo-compatible registry."),
|
|
945
|
+
tokenEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Cargo registry token."),
|
|
946
|
+
...commonPublishShape
|
|
947
|
+
}),
|
|
948
|
+
zod.z.strictObject({
|
|
949
|
+
registry: zod.z.literal("go").describe("Publishes the SDK as a Go module."),
|
|
889
950
|
...commonPublishShape
|
|
890
951
|
}),
|
|
891
952
|
zod.z.strictObject({
|
|
892
|
-
registry: zod.z.literal("
|
|
893
|
-
tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
953
|
+
registry: zod.z.literal("composer").describe("Publishes the package to a Composer-compatible registry."),
|
|
894
954
|
...commonPublishShape
|
|
895
955
|
}),
|
|
896
|
-
zod.z.strictObject({ registry: zod.z.literal("go"), ...commonPublishShape }),
|
|
897
|
-
zod.z.strictObject({ registry: zod.z.literal("composer"), ...commonPublishShape }),
|
|
898
956
|
zod.z.strictObject({
|
|
899
|
-
registry: zod.z.literal("maven"),
|
|
957
|
+
registry: zod.z.literal("maven").describe("Publishes the package to a Maven-compatible repository."),
|
|
900
958
|
/** Maven coordinate in groupId:artifactId form when consumers need the combined value. */
|
|
901
|
-
coordinate: mavenCoordinateSchema.optional(),
|
|
902
|
-
usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
903
|
-
passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
904
|
-
mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
905
|
-
signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional(),
|
|
959
|
+
coordinate: mavenCoordinateSchema.optional().describe("The Maven coordinate in groupId:artifactId form."),
|
|
960
|
+
usernameEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven username."),
|
|
961
|
+
passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven password."),
|
|
962
|
+
mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven repository URL."),
|
|
963
|
+
signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional().describe("Environment variables containing Maven signing material."),
|
|
906
964
|
/** Reference to Maven signing credentials. */
|
|
907
|
-
signingCredentialsRef: nonEmptyStringSchema.optional(),
|
|
965
|
+
signingCredentialsRef: nonEmptyStringSchema.optional().describe("A reference to Maven signing credentials."),
|
|
908
966
|
/** Raw Maven signing material. These values can be sensitive and must be handled as secrets. */
|
|
909
|
-
signature: mavenSignatureSchema.optional(),
|
|
967
|
+
signature: mavenSignatureSchema.optional().describe("Resolved Maven signing material."),
|
|
910
968
|
...commonPublishShape
|
|
911
969
|
})
|
|
912
970
|
]);
|
|
913
971
|
var reviewersSchema = zod.z.strictObject({
|
|
914
|
-
teams: zod.z.array(nonEmptyStringSchema).optional(),
|
|
915
|
-
users: zod.z.array(nonEmptyStringSchema).optional()
|
|
972
|
+
teams: zod.z.array(nonEmptyStringSchema).optional().describe("GitHub teams requested as reviewers."),
|
|
973
|
+
users: zod.z.array(nonEmptyStringSchema).optional().describe("GitHub users requested as reviewers.")
|
|
916
974
|
});
|
|
917
975
|
var replayControlSchema = zod.z.strictObject({
|
|
918
|
-
enabled: zod.z.boolean()
|
|
976
|
+
enabled: zod.z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
|
|
919
977
|
});
|
|
920
978
|
var githubLicenseSchema = zod.z.strictObject({
|
|
921
979
|
/** SPDX identifier or license key for the repository license (for example, "MIT"). */
|
|
922
|
-
type: nonEmptyStringSchema.optional(),
|
|
980
|
+
type: nonEmptyStringSchema.optional().describe("The SPDX identifier or license key for the repository license."),
|
|
923
981
|
/** Path to a custom license file to be committed into the GitHub repository. */
|
|
924
|
-
customPath: nonEmptyStringSchema.optional()
|
|
982
|
+
customPath: nonEmptyStringSchema.optional().describe("The path to a custom license file committed to the repository.")
|
|
925
983
|
}).refine((value) => value.type !== void 0 || value.customPath !== void 0, {
|
|
926
984
|
message: "GitHub license must set type or customPath"
|
|
927
985
|
});
|
|
928
986
|
var githubOutputSchema = zod.z.strictObject({
|
|
929
|
-
repository: nonEmptyStringSchema,
|
|
930
|
-
host: nonEmptyStringSchema.optional(),
|
|
931
|
-
branch: nonEmptyStringSchema.optional(),
|
|
932
|
-
mode: zod.z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional(),
|
|
933
|
-
reviewers: reviewersSchema.optional(),
|
|
987
|
+
repository: nonEmptyStringSchema.describe("The GitHub repository that receives generated files."),
|
|
988
|
+
host: nonEmptyStringSchema.optional().describe("The GitHub host for enterprise installations."),
|
|
989
|
+
branch: nonEmptyStringSchema.optional().describe("The target branch for generated changes."),
|
|
990
|
+
mode: zod.z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional().describe("How generated changes are delivered to the repository."),
|
|
991
|
+
reviewers: reviewersSchema.optional().describe("Reviewers requested for generated pull requests."),
|
|
934
992
|
/** Reference to GitHub credentials. */
|
|
935
|
-
credentialsRef: nonEmptyStringSchema.optional(),
|
|
993
|
+
credentialsRef: nonEmptyStringSchema.optional().describe("A reference to GitHub credentials."),
|
|
936
994
|
/** Raw GitHub credentials. These values can be sensitive and must be handled as secrets. */
|
|
937
|
-
credentials: registryCredentialsSchema.optional(),
|
|
938
|
-
privateRepository: zod.z.boolean().optional(),
|
|
995
|
+
credentials: registryCredentialsSchema.optional().describe("Resolved GitHub credentials."),
|
|
996
|
+
privateRepository: zod.z.boolean().optional().describe("Whether the destination repository is private."),
|
|
939
997
|
/** GitHub license block scoped to repository delivery. */
|
|
940
|
-
license: githubLicenseSchema.optional(),
|
|
998
|
+
license: githubLicenseSchema.optional().describe("License configuration for the destination repository."),
|
|
941
999
|
/** GitHub replay control. If omitted, the external publisher applies its default behavior. */
|
|
942
|
-
replay: replayControlSchema.optional(),
|
|
1000
|
+
replay: replayControlSchema.optional().describe("Replay behavior for the external GitHub publisher."),
|
|
943
1001
|
/** Run GitHub publishing verification. Defaults to false to match current Fiddle job behavior. */
|
|
944
|
-
verify: zod.z.boolean().default(false),
|
|
1002
|
+
verify: zod.z.boolean().default(false).describe("Whether the GitHub publisher verifies the generated result."),
|
|
945
1003
|
/** Skip creating/updating a GitHub PR when no files changed. Defaults to false. */
|
|
946
|
-
skipIfNoDiff: zod.z.boolean().default(false),
|
|
1004
|
+
skipIfNoDiff: zod.z.boolean().default(false).describe("Whether GitHub publication is skipped when no generated files changed."),
|
|
947
1005
|
/** Automatically merge the GitHub publishing PR. Defaults to false. */
|
|
948
|
-
autoMerge: zod.z.boolean().default(false)
|
|
1006
|
+
autoMerge: zod.z.boolean().default(false).describe("Whether the GitHub publisher automatically merges its pull request.")
|
|
949
1007
|
});
|
|
950
1008
|
var credentialResolutionShape = {
|
|
951
1009
|
/** Where output credential references are resolved. */
|
|
952
|
-
credentialResolution: credentialResolutionSchema.default("refs-only")
|
|
1010
|
+
credentialResolution: credentialResolutionSchema.default("refs-only").describe("Where output credential references are resolved.")
|
|
953
1011
|
};
|
|
954
1012
|
var filesOutputSchema = zod.z.strictObject({
|
|
955
|
-
delivery: zod.z.literal("files"),
|
|
956
|
-
path: nonEmptyStringSchema.optional(),
|
|
957
|
-
publish: publishConfigSchema.optional(),
|
|
1013
|
+
delivery: zod.z.literal("files").describe("Writes the generated SDK to a directory."),
|
|
1014
|
+
path: nonEmptyStringSchema.optional().describe("The destination directory for generated files."),
|
|
1015
|
+
publish: publishConfigSchema.optional().describe("Optional package registry publication."),
|
|
958
1016
|
...credentialResolutionShape
|
|
959
1017
|
});
|
|
960
1018
|
var zipOutputSchema = zod.z.strictObject({
|
|
961
|
-
delivery: zod.z.literal("zip"),
|
|
962
|
-
fileName: nonEmptyStringSchema.optional(),
|
|
963
|
-
publish: publishConfigSchema.optional(),
|
|
1019
|
+
delivery: zod.z.literal("zip").describe("Packages the generated SDK as a ZIP archive."),
|
|
1020
|
+
fileName: nonEmptyStringSchema.optional().describe("The generated ZIP archive file name."),
|
|
1021
|
+
publish: publishConfigSchema.optional().describe("Optional package registry publication."),
|
|
964
1022
|
...credentialResolutionShape
|
|
965
1023
|
});
|
|
966
1024
|
var githubDeliverySchema = zod.z.strictObject({
|
|
967
|
-
delivery: zod.z.literal("github"),
|
|
968
|
-
github: githubOutputSchema,
|
|
969
|
-
publish: publishConfigSchema.optional(),
|
|
1025
|
+
delivery: zod.z.literal("github").describe("Delivers the generated SDK to GitHub."),
|
|
1026
|
+
github: githubOutputSchema.describe("GitHub repository delivery settings."),
|
|
1027
|
+
publish: publishConfigSchema.optional().describe("Optional package registry publication."),
|
|
970
1028
|
...credentialResolutionShape
|
|
971
1029
|
});
|
|
972
1030
|
var outputConfigSchema = zod.z.discriminatedUnion(
|
|
@@ -977,29 +1035,33 @@ var outputConfigSchema = zod.z.discriminatedUnion(
|
|
|
977
1035
|
}
|
|
978
1036
|
);
|
|
979
1037
|
var replayConfigSchema = zod.z.strictObject({
|
|
980
|
-
enabled: zod.z.boolean()
|
|
1038
|
+
enabled: zod.z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
|
|
981
1039
|
});
|
|
982
1040
|
var apiImportSettingsSchema = zod.z.strictObject({
|
|
983
|
-
respectNullableSchemas: zod.z.boolean().optional(),
|
|
984
|
-
titleAsSchemaName: zod.z.boolean().optional(),
|
|
985
|
-
coerceEnumsToLiterals: zod.z.boolean().optional(),
|
|
986
|
-
idiomaticRequestNames: zod.z.boolean().optional(),
|
|
987
|
-
wrapReferencesToNullableInOptional: zod.z.boolean().optional(),
|
|
988
|
-
coerceOptionalSchemasToNullable: zod.z.boolean().optional(),
|
|
989
|
-
pathParameterOrder: zod.z.enum(["url-order", "spec-order"]).optional(),
|
|
990
|
-
onlyIncludeReferencedSchemas: zod.z.boolean().optional(),
|
|
991
|
-
objectQueryParameters: zod.z.boolean().optional(),
|
|
992
|
-
typeDatesAsStrings: zod.z.boolean().optional(),
|
|
993
|
-
groupMultiApiEnvironments: zod.z.boolean().optional()
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1041
|
+
respectNullableSchemas: zod.z.boolean().optional().describe("Whether nullable schemas remain nullable in generated types."),
|
|
1042
|
+
titleAsSchemaName: zod.z.boolean().optional().describe("Whether a schema title can determine the generated type name."),
|
|
1043
|
+
coerceEnumsToLiterals: zod.z.boolean().optional().describe("Whether single-value enums are imported as literal values."),
|
|
1044
|
+
idiomaticRequestNames: zod.z.boolean().optional().describe("Whether request types use concise, idiomatic generated names."),
|
|
1045
|
+
wrapReferencesToNullableInOptional: zod.z.boolean().optional().describe("Whether nullable schema references are also treated as optional."),
|
|
1046
|
+
coerceOptionalSchemasToNullable: zod.z.boolean().optional().describe("Whether optional properties are represented as nullable required properties."),
|
|
1047
|
+
pathParameterOrder: zod.z.enum(["url-order", "spec-order"]).optional().describe("Whether path parameters follow their URL order or specification order."),
|
|
1048
|
+
onlyIncludeReferencedSchemas: zod.z.boolean().optional().describe("Whether unreferenced schemas are omitted from the generated SDK."),
|
|
1049
|
+
objectQueryParameters: zod.z.boolean().optional().describe("Whether object-valued query parameters are preserved as objects."),
|
|
1050
|
+
typeDatesAsStrings: zod.z.boolean().optional().describe("Whether date and date-time schemas are generated as strings."),
|
|
1051
|
+
groupMultiApiEnvironments: zod.z.boolean().optional().describe(
|
|
1052
|
+
"Whether environments from multiple API sources are merged into shared named groups."
|
|
1053
|
+
),
|
|
1054
|
+
ignoreTags: zod.z.boolean().optional().describe("Whether API tags are ignored when organizing generated resources."),
|
|
1055
|
+
disambiguateRequestNames: zod.z.boolean().optional().describe("Whether colliding request type names are automatically disambiguated."),
|
|
1056
|
+
respectReadonlySchemas: zod.z.boolean().optional().describe(
|
|
1057
|
+
"Whether read-only properties are modeled separately for request and response types."
|
|
1058
|
+
),
|
|
1059
|
+
discriminatedUnionV2: zod.z.boolean().optional().describe("Whether oneOf and anyOf schemas use the newer discriminator inference rules."),
|
|
1060
|
+
undiscriminatedUnionsWithLiterals: zod.z.boolean().optional().describe("Whether literal-bearing unions remain undiscriminated during import."),
|
|
1061
|
+
inlineAllOfSchemas: zod.z.boolean().optional().describe("Whether schemas composed with allOf are inlined when possible."),
|
|
1062
|
+
resolveSchemaCollisions: zod.z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
|
|
1063
|
+
asyncApiMessageNaming: zod.z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
|
|
1064
|
+
defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one.")
|
|
1003
1065
|
});
|
|
1004
1066
|
var sourceSpecTypeSchema = zod.z.enum([
|
|
1005
1067
|
"openapi",
|
|
@@ -1011,18 +1073,20 @@ var sourceSpecTypeSchema = zod.z.enum([
|
|
|
1011
1073
|
|
|
1012
1074
|
// src/sdk-config-ir/v1/source.ts
|
|
1013
1075
|
var sourceSpecConfigSchema = zod.z.strictObject({
|
|
1014
|
-
id: nonEmptyStringSchema.optional(),
|
|
1015
|
-
name: nonEmptyStringSchema.optional(),
|
|
1016
|
-
namespace: nonEmptyStringSchema.optional(),
|
|
1017
|
-
specUrl: nonEmptyStringSchema
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1076
|
+
id: nonEmptyStringSchema.optional().describe("A unique identifier for this API source."),
|
|
1077
|
+
name: nonEmptyStringSchema.optional().describe("A human-readable name for this API source."),
|
|
1078
|
+
namespace: nonEmptyStringSchema.optional().describe("A namespace used to isolate this source in a multi-source SDK."),
|
|
1079
|
+
specUrl: nonEmptyStringSchema.describe(
|
|
1080
|
+
"The materialized URL from which the generator retrieves the API source."
|
|
1081
|
+
),
|
|
1082
|
+
specType: sourceSpecTypeSchema.describe("The API description format of this source."),
|
|
1083
|
+
apiImportSettings: apiImportSettingsSchema.optional().describe("Import behavior that overrides the source-level defaults for this spec."),
|
|
1084
|
+
overlays: zod.z.array(nonEmptyStringSchema).optional().describe("Materialized overlays applied to this source in order."),
|
|
1085
|
+
overrides: zod.z.array(nonEmptyStringSchema).optional().describe("Materialized source overrides applied in order.")
|
|
1022
1086
|
});
|
|
1023
1087
|
var sourceConfigSchema = zod.z.strictObject({
|
|
1024
|
-
specs: zod.z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec"),
|
|
1025
|
-
apiImportSettings: apiImportSettingsSchema.optional()
|
|
1088
|
+
specs: zod.z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec").describe("Materialized API sources in authoritative processing order."),
|
|
1089
|
+
apiImportSettings: apiImportSettingsSchema.optional().describe("Default import behavior shared by every source spec.")
|
|
1026
1090
|
}).superRefine(({ specs }, context) => {
|
|
1027
1091
|
const seenIds = /* @__PURE__ */ new Set();
|
|
1028
1092
|
specs.forEach(({ id }, index) => {
|
|
@@ -1054,25 +1118,27 @@ var targetLanguageSchema = zod.z.enum([
|
|
|
1054
1118
|
"terraform"
|
|
1055
1119
|
]);
|
|
1056
1120
|
var targetConfigSchema = zod.z.strictObject({
|
|
1057
|
-
language: targetLanguageSchema
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1121
|
+
language: targetLanguageSchema.describe(
|
|
1122
|
+
"The language or platform generated by this single-target request."
|
|
1123
|
+
),
|
|
1124
|
+
generatorVersion: exactSemverSchema.optional().describe("The exact generator version requested for this target."),
|
|
1125
|
+
sourceOrigin: zod.z.enum(["postman", "fern"]).describe("The configuration system from which this IR was normalized."),
|
|
1126
|
+
sdkName: nonEmptyStringSchema.describe("The name used for the generated SDK."),
|
|
1061
1127
|
/**
|
|
1062
1128
|
* Stable Fern/Fiddle API identity for external publishing.
|
|
1063
1129
|
* Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
|
|
1064
1130
|
* target.sdkName because SDK display names and Fern API names are not equivalent.
|
|
1065
1131
|
*/
|
|
1066
|
-
apiName: nonEmptyStringSchema.optional(),
|
|
1067
|
-
organization: nonEmptyStringSchema.optional(),
|
|
1132
|
+
apiName: nonEmptyStringSchema.optional().describe("The stable API identity used for external publishing."),
|
|
1133
|
+
organization: nonEmptyStringSchema.optional().describe("Source organization metadata retained for generation."),
|
|
1068
1134
|
/**
|
|
1069
1135
|
* Stable Fern/Fiddle organization identity for external publishing.
|
|
1070
1136
|
* Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
|
|
1071
1137
|
* target.organization because source organization metadata is optional and may not match Fern.
|
|
1072
1138
|
*/
|
|
1073
|
-
organizationName: nonEmptyStringSchema.optional(),
|
|
1074
|
-
sdkVersion: nonEmptyStringSchema.default("1.0.0"),
|
|
1075
|
-
apiVersion: nonEmptyStringSchema.optional()
|
|
1139
|
+
organizationName: nonEmptyStringSchema.optional().describe("The stable organization identity used for external publishing."),
|
|
1140
|
+
sdkVersion: nonEmptyStringSchema.default("1.0.0").describe("The version of the generated SDK."),
|
|
1141
|
+
apiVersion: nonEmptyStringSchema.optional().describe("The version of the API represented by the SDK.")
|
|
1076
1142
|
});
|
|
1077
1143
|
|
|
1078
1144
|
// src/sdk-config-ir/v1/sdk-config-ir-v1.ts
|
|
@@ -1134,17 +1200,21 @@ function validatePublishingIdentity(packageConfig, registry, context) {
|
|
|
1134
1200
|
}
|
|
1135
1201
|
}
|
|
1136
1202
|
var sdkConfigIrV1Schema = zod.z.strictObject({
|
|
1137
|
-
schemaVersion: zod.z.literal(SDK_CONFIG_IR_V1_SCHEMA_VERSION),
|
|
1138
|
-
source: sourceConfigSchema,
|
|
1139
|
-
target: targetConfigSchema
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1203
|
+
schemaVersion: zod.z.literal(SDK_CONFIG_IR_V1_SCHEMA_VERSION).describe("The version of the normalized SDK Config IR schema."),
|
|
1204
|
+
source: sourceConfigSchema.describe("Materialized API descriptions consumed by generation."),
|
|
1205
|
+
target: targetConfigSchema.describe(
|
|
1206
|
+
"Identity and provenance for this single generation target."
|
|
1207
|
+
),
|
|
1208
|
+
api: apiConfigSchema.describe("API behavior exposed by the generated SDK."),
|
|
1209
|
+
client: clientConfigSchema.describe("Behavior of the generated API client."),
|
|
1210
|
+
package: packageConfigSchema.describe("Package identity and metadata for the generated SDK."),
|
|
1211
|
+
output: outputConfigSchema.describe("Artifact delivery and optional package publication."),
|
|
1212
|
+
replay: replayConfigSchema.optional().describe("Generation replay behavior."),
|
|
1213
|
+
docs: docsConfigSchema.describe("Generated documentation settings."),
|
|
1214
|
+
generation: generationConfigSchema.describe(
|
|
1215
|
+
"Shared and language-specific generation behavior."
|
|
1216
|
+
),
|
|
1217
|
+
compatibility: compatibilityConfigSchema.optional().describe("Temporary provenance and diagnostics retained during legacy migration.")
|
|
1148
1218
|
}).superRefine(({ compatibility, generation, output, package: packageConfig, target }, context) => {
|
|
1149
1219
|
const configuredLanguages = Object.keys(generation.language ?? {});
|
|
1150
1220
|
const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;
|