@postman/sdk-config 0.7.0 → 0.9.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 +882 -747
- 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 +882 -747
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +644 -544
- 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 +644 -544
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +644 -544
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +581 -1047
- package/dist/sdk-config/v1/index.d.ts +581 -1047
- package/dist/sdk-config/v1/index.js +644 -544
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +627 -541
- 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 +627 -541
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +627 -541
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +59 -17
- package/dist/sdk-config-ir/v1/index.d.ts +59 -17
- package/dist/sdk-config-ir/v1/index.js +627 -541
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-BdDv_kwT.d.cts → typescript-Chge0X4f.d.cts} +1 -2
- package/dist/{typescript-BdDv_kwT.d.ts → typescript-Chge0X4f.d.ts} +1 -2
- package/package.json +1 -1
- package/src/sdk-config/v1/README.md +15 -14
- package/src/sdk-config-ir/v1/README.md +29 -15
package/dist/index.cjs
CHANGED
|
@@ -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,45 +224,45 @@ 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
|
|
|
256
268
|
// src/sdk-config/v1/api.ts
|
|
@@ -259,16 +271,16 @@ var sdkConfigV1AuthConfigSchema = authConfigSchema;
|
|
|
259
271
|
var sdkConfigV1ApiConfigSchema = apiConfigSchema;
|
|
260
272
|
var sdkConfigV1WebhookSignatureSchema = webhookSignatureSchema;
|
|
261
273
|
var retryOverrideShape = {
|
|
262
|
-
enabled: zod.z.boolean().optional(),
|
|
263
|
-
maxAttempts: zod.z.number().int().min(1).optional(),
|
|
264
|
-
retryDelayMs: zod.z.number().nonnegative().optional(),
|
|
265
|
-
maxDelayMs: zod.z.number().nonnegative().optional(),
|
|
266
|
-
jitterMs: zod.z.number().nonnegative().optional(),
|
|
267
|
-
backoffFactor: zod.z.number().positive().optional(),
|
|
268
|
-
statusCodes: zod.z.array(zod.z.number().int().min(100).max(599)).optional(),
|
|
269
|
-
methods: zod.z.array(nonEmptyStringSchema).optional(),
|
|
270
|
-
statusCodeProfile: zod.z.enum(["legacy", "recommended"]).optional(),
|
|
271
|
-
maxRetryAfterDelayMs: zod.z.number().nonnegative().optional()
|
|
274
|
+
enabled: zod.z.boolean().optional().describe("Whether the generated client retries failed requests."),
|
|
275
|
+
maxAttempts: zod.z.number().int().min(1).optional().describe("The maximum total request attempts, including the initial attempt."),
|
|
276
|
+
retryDelayMs: zod.z.number().nonnegative().optional().describe("The initial delay between retry attempts, in milliseconds."),
|
|
277
|
+
maxDelayMs: zod.z.number().nonnegative().optional().describe("The maximum backoff delay between attempts, in milliseconds."),
|
|
278
|
+
jitterMs: zod.z.number().nonnegative().optional().describe("The maximum random jitter added to retry delays, in milliseconds."),
|
|
279
|
+
backoffFactor: zod.z.number().positive().optional().describe("The multiplier applied to the delay after each failed attempt."),
|
|
280
|
+
statusCodes: zod.z.array(zod.z.number().int().min(100).max(599)).optional().describe("HTTP status codes that are eligible for retries."),
|
|
281
|
+
methods: zod.z.array(nonEmptyStringSchema).optional().describe("HTTP methods that are eligible for retries."),
|
|
282
|
+
statusCodeProfile: zod.z.enum(["legacy", "recommended"]).optional().describe("The built-in retryable status-code policy."),
|
|
283
|
+
maxRetryAfterDelayMs: zod.z.number().nonnegative().optional().describe("The longest Retry-After delay the client will honor, in milliseconds.")
|
|
272
284
|
};
|
|
273
285
|
function validateRetryDelays({
|
|
274
286
|
maxDelayMs,
|
|
@@ -285,27 +297,29 @@ function validateRetryDelays({
|
|
|
285
297
|
var clientRetryOverrideSchema = zod.z.strictObject(retryOverrideShape).superRefine(validateRetryDelays);
|
|
286
298
|
var retryConfigSchema = zod.z.strictObject({
|
|
287
299
|
...retryOverrideShape,
|
|
288
|
-
enabled: zod.z.boolean().default(true),
|
|
289
|
-
maxAttempts: zod.z.number().int().min(1).default(3),
|
|
290
|
-
retryDelayMs: zod.z.number().nonnegative().default(150),
|
|
291
|
-
maxDelayMs: zod.z.number().nonnegative().default(5e3),
|
|
292
|
-
jitterMs: zod.z.number().nonnegative().default(50),
|
|
293
|
-
backoffFactor: zod.z.number().positive().default(2),
|
|
294
|
-
methods: zod.z.array(nonEmptyStringSchema).default(["GET", "
|
|
295
|
-
maxRetryAfterDelayMs: zod.z.number().nonnegative().default(6e4)
|
|
300
|
+
enabled: zod.z.boolean().default(true).describe("Whether the generated client retries failed requests."),
|
|
301
|
+
maxAttempts: zod.z.number().int().min(1).default(3).describe("The maximum total request attempts, including the initial attempt."),
|
|
302
|
+
retryDelayMs: zod.z.number().nonnegative().default(150).describe("The initial delay between retry attempts, in milliseconds."),
|
|
303
|
+
maxDelayMs: zod.z.number().nonnegative().default(5e3).describe("The maximum backoff delay between attempts, in milliseconds."),
|
|
304
|
+
jitterMs: zod.z.number().nonnegative().default(50).describe("The maximum random jitter added to retry delays, in milliseconds."),
|
|
305
|
+
backoffFactor: zod.z.number().positive().default(2).describe("The multiplier applied to the delay after each failed attempt."),
|
|
306
|
+
methods: zod.z.array(nonEmptyStringSchema).default(["GET", "PUT", "DELETE", "HEAD", "OPTIONS"]).describe("HTTP methods that are eligible for retries."),
|
|
307
|
+
maxRetryAfterDelayMs: zod.z.number().nonnegative().default(6e4).describe("The longest Retry-After delay the client will honor, in milliseconds.")
|
|
296
308
|
}).superRefine(validateRetryDelays);
|
|
297
309
|
var constructorParameterSchema = zod.z.strictObject({
|
|
298
|
-
name: nonEmptyStringSchema,
|
|
299
|
-
example: zod.z.string().optional(),
|
|
300
|
-
description: zod.z.string().optional()
|
|
301
|
-
|
|
310
|
+
name: nonEmptyStringSchema.describe("The parameter name in the generated client constructor."),
|
|
311
|
+
example: zod.z.string().optional().describe("An example value shown in generated documentation."),
|
|
312
|
+
description: zod.z.string().optional().describe(
|
|
313
|
+
"A description of the constructor parameter included in generated SDK documentation."
|
|
314
|
+
),
|
|
315
|
+
required: zod.z.boolean().optional().describe("Whether callers must provide the parameter.")
|
|
302
316
|
});
|
|
303
317
|
var parameterStyleSchema = zod.z.enum(["wrapped", "inline", "language-default"]);
|
|
304
318
|
var tokenRefreshConfigSchema = zod.z.strictObject({
|
|
305
|
-
enabled: zod.z.boolean(),
|
|
306
|
-
endpoint: nonEmptyStringSchema.optional(),
|
|
307
|
-
accessTokenField: nonEmptyStringSchema.optional(),
|
|
308
|
-
refreshTokenField: nonEmptyStringSchema.optional()
|
|
319
|
+
enabled: zod.z.boolean().describe("Whether the client can exchange refresh tokens."),
|
|
320
|
+
endpoint: nonEmptyStringSchema.optional().describe("The API endpoint used to refresh tokens."),
|
|
321
|
+
accessTokenField: nonEmptyStringSchema.optional().describe("The response field containing the refreshed access token."),
|
|
322
|
+
refreshTokenField: nonEmptyStringSchema.optional().describe("The response field containing the refreshed refresh token.")
|
|
309
323
|
}).superRefine(({ enabled, endpoint }, context) => {
|
|
310
324
|
if (enabled && endpoint === void 0) {
|
|
311
325
|
context.addIssue({
|
|
@@ -315,27 +329,48 @@ var tokenRefreshConfigSchema = zod.z.strictObject({
|
|
|
315
329
|
});
|
|
316
330
|
}
|
|
317
331
|
});
|
|
332
|
+
var idempotencyKeyGenerationSchema = zod.z.strictObject({
|
|
333
|
+
enabled: zod.z.boolean().describe("Whether the client generates an idempotency key when the caller supplies none."),
|
|
334
|
+
headerName: nonEmptyStringSchema.optional().describe("The header that carries the generated key. Generators default to Idempotency-Key."),
|
|
335
|
+
methods: zod.z.array(nonEmptyStringSchema).optional().describe("HTTP methods that receive a generated key. Generators default to POST and PUT.")
|
|
336
|
+
});
|
|
337
|
+
var userAgentConfigSchema = zod.z.strictObject({
|
|
338
|
+
template: nonEmptyStringSchema.optional().describe(
|
|
339
|
+
"The User-Agent product token, resolved at generation time. Supports the {packageName}, {version}, {language}, {generatorVersion}, {organization}, and {apiName} placeholders."
|
|
340
|
+
),
|
|
341
|
+
includePlatformInfo: zod.z.boolean().optional().describe(
|
|
342
|
+
"Whether the User-Agent carries operating system, architecture, and runtime details, as `{product} ({os}; {arch}) {runtime}/{runtimeVersion}`."
|
|
343
|
+
),
|
|
344
|
+
allowAppInfo: zod.z.boolean().optional().describe(
|
|
345
|
+
"Whether callers can pass application info that is appended to the User-Agent as a `{name}/{version} ({comment})` product token."
|
|
346
|
+
)
|
|
347
|
+
});
|
|
318
348
|
var clientOverrideShape = {
|
|
319
|
-
retry: clientRetryOverrideSchema.optional(),
|
|
320
|
-
responseHeaders: zod.z.boolean().optional(),
|
|
321
|
-
responseValidation: zod.z.boolean().optional(),
|
|
322
|
-
multiTenant: zod.z.boolean().optional(),
|
|
323
|
-
additionalConstructorParameters: zod.z.array(constructorParameterSchema).optional(),
|
|
324
|
-
timeoutMs: zod.z.union([zod.z.number().nonnegative(), zod.z.literal("infinity")]).optional(),
|
|
325
|
-
requestParameterStyle: parameterStyleSchema.optional(),
|
|
326
|
-
pathParameterStyle: parameterStyleSchema.optional(),
|
|
327
|
-
filePropertyStyle: parameterStyleSchema.optional(),
|
|
328
|
-
useDefaultRequestParameterValues: zod.z.boolean().optional(),
|
|
329
|
-
respectOptionalRequestBody: zod.z.boolean().optional(),
|
|
330
|
-
tokenRefresh: tokenRefreshConfigSchema.optional()
|
|
349
|
+
retry: clientRetryOverrideSchema.optional().describe("Retry behavior for generated API requests."),
|
|
350
|
+
responseHeaders: zod.z.boolean().optional().describe("Whether generated operations expose HTTP response headers."),
|
|
351
|
+
responseValidation: zod.z.boolean().optional().describe("Whether the client validates API responses against the schema."),
|
|
352
|
+
multiTenant: zod.z.boolean().optional().describe("Whether the client exposes configuration for tenant-specific API access."),
|
|
353
|
+
additionalConstructorParameters: zod.z.array(constructorParameterSchema).optional().describe("Additional parameters added to the generated client constructor."),
|
|
354
|
+
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.'),
|
|
355
|
+
requestParameterStyle: parameterStyleSchema.optional().describe("Whether generated operation parameters are wrapped or passed inline."),
|
|
356
|
+
pathParameterStyle: parameterStyleSchema.optional().describe("Whether generated path parameters are wrapped or passed inline."),
|
|
357
|
+
filePropertyStyle: parameterStyleSchema.optional().describe("Whether generated file properties are wrapped or passed inline."),
|
|
358
|
+
useDefaultRequestParameterValues: zod.z.boolean().optional().describe("Whether schema defaults are applied to omitted request parameters."),
|
|
359
|
+
respectOptionalRequestBody: zod.z.boolean().optional().describe("Whether an optional request body remains optional in generated methods."),
|
|
360
|
+
tokenRefresh: tokenRefreshConfigSchema.optional().describe("Refresh-token behavior for the generated client."),
|
|
361
|
+
idempotencyKeyGeneration: idempotencyKeyGenerationSchema.optional().describe("Automatic idempotency keys on eligible requests."),
|
|
362
|
+
userAgent: userAgentConfigSchema.optional().describe("The User-Agent header the generated client sends."),
|
|
363
|
+
offsetSemantics: zod.z.enum(["item-index", "page-index"]).optional().describe(
|
|
364
|
+
"How an offset-paginated endpoint advances: by the number of items returned, or by one page."
|
|
365
|
+
)
|
|
331
366
|
};
|
|
332
367
|
var clientConfigOverrideSchema = zod.z.strictObject(clientOverrideShape);
|
|
333
368
|
var clientConfigSchema = zod.z.strictObject({
|
|
334
369
|
...clientOverrideShape,
|
|
335
|
-
retry: retryConfigSchema.prefault({}),
|
|
336
|
-
responseHeaders: zod.z.boolean().default(false),
|
|
337
|
-
multiTenant: zod.z.boolean().default(false),
|
|
338
|
-
additionalConstructorParameters: zod.z.array(constructorParameterSchema).default([])
|
|
370
|
+
retry: retryConfigSchema.prefault({}).describe("Retry behavior for generated API requests."),
|
|
371
|
+
responseHeaders: zod.z.boolean().default(false).describe("Whether generated operations expose HTTP response headers."),
|
|
372
|
+
multiTenant: zod.z.boolean().default(false).describe("Whether the client exposes configuration for tenant-specific API access."),
|
|
373
|
+
additionalConstructorParameters: zod.z.array(constructorParameterSchema).default([]).describe("Additional parameters added to the generated client constructor.")
|
|
339
374
|
});
|
|
340
375
|
|
|
341
376
|
// src/sdk-config/v1/client.ts
|
|
@@ -350,75 +385,75 @@ var composerPackageNameSchema = nonEmptyStringSchema.regex(
|
|
|
350
385
|
'Composer package name must be a lowercase "vendor/package" name'
|
|
351
386
|
);
|
|
352
387
|
var authorSchema = zod.z.strictObject({
|
|
353
|
-
name: nonEmptyStringSchema,
|
|
354
|
-
email: zod.z.email().optional(),
|
|
355
|
-
url: nonEmptyStringSchema.optional()
|
|
388
|
+
name: nonEmptyStringSchema.describe("The package author name."),
|
|
389
|
+
email: zod.z.email().optional().describe("The package author email address."),
|
|
390
|
+
url: nonEmptyStringSchema.optional().describe("The package author website.")
|
|
356
391
|
});
|
|
357
392
|
var developerSchema = zod.z.strictObject({
|
|
358
|
-
name: nonEmptyStringSchema,
|
|
359
|
-
email: zod.z.email().optional(),
|
|
360
|
-
organization: nonEmptyStringSchema.optional(),
|
|
361
|
-
organizationUrl: nonEmptyStringSchema.optional()
|
|
393
|
+
name: nonEmptyStringSchema.describe("The package developer name."),
|
|
394
|
+
email: zod.z.email().optional().describe("The package developer email address."),
|
|
395
|
+
organization: nonEmptyStringSchema.optional().describe("The developer organization name."),
|
|
396
|
+
organizationUrl: nonEmptyStringSchema.optional().describe("The developer organization website.")
|
|
362
397
|
});
|
|
363
398
|
var licenseSchema = zod.z.strictObject({
|
|
364
|
-
type: nonEmptyStringSchema,
|
|
365
|
-
name: nonEmptyStringSchema.optional(),
|
|
366
|
-
url: nonEmptyStringSchema.optional(),
|
|
367
|
-
path: nonEmptyStringSchema.optional()
|
|
399
|
+
type: nonEmptyStringSchema.describe("The license identifier or license type."),
|
|
400
|
+
name: nonEmptyStringSchema.optional().describe("The human-readable license name."),
|
|
401
|
+
url: nonEmptyStringSchema.optional().describe("The URL containing the license text."),
|
|
402
|
+
path: nonEmptyStringSchema.optional().describe("The path to a custom license file.")
|
|
368
403
|
});
|
|
369
404
|
var dependencySourceSchema = zod.z.discriminatedUnion("type", [
|
|
370
405
|
zod.z.strictObject({
|
|
371
|
-
type: zod.z.literal("registry"),
|
|
372
|
-
registry: nonEmptyStringSchema.optional()
|
|
406
|
+
type: zod.z.literal("registry").describe("Resolves the dependency from a package registry."),
|
|
407
|
+
registry: nonEmptyStringSchema.optional().describe("The registry used to resolve the dependency.")
|
|
373
408
|
}),
|
|
374
409
|
zod.z.strictObject({
|
|
375
|
-
type: zod.z.literal("git"),
|
|
376
|
-
url: nonEmptyStringSchema,
|
|
377
|
-
ref: nonEmptyStringSchema.optional(),
|
|
378
|
-
subdirectory: nonEmptyStringSchema.optional()
|
|
410
|
+
type: zod.z.literal("git").describe("Resolves the dependency from a Git repository."),
|
|
411
|
+
url: nonEmptyStringSchema.describe("The Git repository URL."),
|
|
412
|
+
ref: nonEmptyStringSchema.optional().describe("The Git branch, tag, or commit to use."),
|
|
413
|
+
subdirectory: nonEmptyStringSchema.optional().describe("The package subdirectory within the Git repository.")
|
|
379
414
|
}),
|
|
380
415
|
zod.z.strictObject({
|
|
381
|
-
type: zod.z.literal("path"),
|
|
382
|
-
path: nonEmptyStringSchema
|
|
416
|
+
type: zod.z.literal("path").describe("Resolves the dependency from a local path."),
|
|
417
|
+
path: nonEmptyStringSchema.describe("The local path containing the dependency.")
|
|
383
418
|
})
|
|
384
419
|
]);
|
|
385
420
|
var dependencySchema = zod.z.strictObject({
|
|
386
|
-
name: nonEmptyStringSchema,
|
|
387
|
-
version: nonEmptyStringSchema.optional(),
|
|
388
|
-
source: dependencySourceSchema.optional(),
|
|
389
|
-
packageName: nonEmptyStringSchema.optional(),
|
|
390
|
-
features: zod.z.array(nonEmptyStringSchema).optional(),
|
|
391
|
-
extras: zod.z.array(nonEmptyStringSchema).optional(),
|
|
392
|
-
optional: zod.z.boolean().optional(),
|
|
393
|
-
defaultFeatures: zod.z.boolean().optional(),
|
|
394
|
-
environmentMarker: nonEmptyStringSchema.optional()
|
|
421
|
+
name: nonEmptyStringSchema.describe("The dependency name used by the package manager."),
|
|
422
|
+
version: nonEmptyStringSchema.optional().describe("The dependency version requirement."),
|
|
423
|
+
source: dependencySourceSchema.optional().describe("A non-default source for the dependency."),
|
|
424
|
+
packageName: nonEmptyStringSchema.optional().describe("The source package name when it differs from the dependency alias."),
|
|
425
|
+
features: zod.z.array(nonEmptyStringSchema).optional().describe("Cargo features enabled for this dependency."),
|
|
426
|
+
extras: zod.z.array(nonEmptyStringSchema).optional().describe("Python extras enabled for this dependency."),
|
|
427
|
+
optional: zod.z.boolean().optional().describe("Whether the dependency is optional."),
|
|
428
|
+
defaultFeatures: zod.z.boolean().optional().describe("Whether the dependency enables its default Cargo features."),
|
|
429
|
+
environmentMarker: nonEmptyStringSchema.optional().describe("A Python environment marker that conditions this dependency.")
|
|
395
430
|
}).refine(({ source, version }) => source !== void 0 || version !== void 0, {
|
|
396
431
|
message: "dependency must define a version or a source"
|
|
397
432
|
});
|
|
398
433
|
var projectUrlSchema = zod.z.strictObject({
|
|
399
|
-
label: nonEmptyStringSchema,
|
|
400
|
-
url: nonEmptyStringSchema
|
|
434
|
+
label: nonEmptyStringSchema.describe("The label displayed for the project link."),
|
|
435
|
+
url: nonEmptyStringSchema.describe("The project link URL.")
|
|
401
436
|
});
|
|
402
437
|
var packageConfigSchema = zod.z.strictObject({
|
|
403
|
-
packageName: nonEmptyStringSchema.optional(),
|
|
404
|
-
moduleName: nonEmptyStringSchema.optional(),
|
|
405
|
-
modulePath: goModulePathSchema.optional(),
|
|
406
|
-
namespace: nonEmptyStringSchema.optional(),
|
|
407
|
-
groupId: nonEmptyStringSchema.optional(),
|
|
408
|
-
artifactId: nonEmptyStringSchema.optional(),
|
|
409
|
-
description: zod.z.string().optional(),
|
|
410
|
-
repository: nonEmptyStringSchema.optional(),
|
|
411
|
-
homepage: nonEmptyStringSchema.optional(),
|
|
412
|
-
documentationUrl: nonEmptyStringSchema.optional(),
|
|
413
|
-
authors: zod.z.array(authorSchema).optional(),
|
|
414
|
-
developers: zod.z.array(developerSchema).optional(),
|
|
415
|
-
license: licenseSchema.optional(),
|
|
416
|
-
keywords: zod.z.array(nonEmptyStringSchema).optional(),
|
|
417
|
-
classifiers: zod.z.array(nonEmptyStringSchema).optional(),
|
|
418
|
-
projectUrls: zod.z.array(projectUrlSchema).optional(),
|
|
419
|
-
extraDependencies: zod.z.array(dependencySchema).optional(),
|
|
420
|
-
extraDevDependencies: zod.z.array(dependencySchema).optional(),
|
|
421
|
-
extraPeerDependencies: zod.z.array(dependencySchema).optional()
|
|
438
|
+
packageName: nonEmptyStringSchema.optional().describe("The package name used by the target language registry."),
|
|
439
|
+
moduleName: nonEmptyStringSchema.optional().describe("The generated module or import name when it differs from the package name."),
|
|
440
|
+
modulePath: goModulePathSchema.optional().describe("The Go module path used for imports and publishing."),
|
|
441
|
+
namespace: nonEmptyStringSchema.optional().describe("The namespace or package prefix for generated code."),
|
|
442
|
+
groupId: nonEmptyStringSchema.optional().describe("The Maven group identifier."),
|
|
443
|
+
artifactId: nonEmptyStringSchema.optional().describe("The Maven artifact identifier."),
|
|
444
|
+
description: zod.z.string().optional().describe("The package description used in generated metadata."),
|
|
445
|
+
repository: nonEmptyStringSchema.optional().describe("The source repository for the generated SDK."),
|
|
446
|
+
homepage: nonEmptyStringSchema.optional().describe("The package homepage URL."),
|
|
447
|
+
documentationUrl: nonEmptyStringSchema.optional().describe("The package documentation URL."),
|
|
448
|
+
authors: zod.z.array(authorSchema).optional().describe("Authors credited in package metadata."),
|
|
449
|
+
developers: zod.z.array(developerSchema).optional().describe("Developers credited in package metadata."),
|
|
450
|
+
license: licenseSchema.optional().describe("License metadata for the generated package."),
|
|
451
|
+
keywords: zod.z.array(nonEmptyStringSchema).optional().describe("Search keywords for package metadata."),
|
|
452
|
+
classifiers: zod.z.array(nonEmptyStringSchema).optional().describe("Package classifiers used by registries such as PyPI."),
|
|
453
|
+
projectUrls: zod.z.array(projectUrlSchema).optional().describe("Labeled project links for package metadata."),
|
|
454
|
+
extraDependencies: zod.z.array(dependencySchema).optional().describe("Additional runtime dependencies added to the generated package."),
|
|
455
|
+
extraDevDependencies: zod.z.array(dependencySchema).optional().describe("Additional development dependencies added to the generated package."),
|
|
456
|
+
extraPeerDependencies: zod.z.array(dependencySchema).optional().describe("Additional peer dependencies added to the generated package.")
|
|
422
457
|
});
|
|
423
458
|
var httpMethodSchema = zod.z.enum([
|
|
424
459
|
"GET",
|
|
@@ -432,34 +467,34 @@ var httpMethodSchema = zod.z.enum([
|
|
|
432
467
|
"CONNECT"
|
|
433
468
|
]);
|
|
434
469
|
var readmeEndpointSchema = zod.z.strictObject({
|
|
435
|
-
method: httpMethodSchema,
|
|
436
|
-
path: nonEmptyStringSchema,
|
|
437
|
-
stream: zod.z.boolean().optional()
|
|
470
|
+
method: httpMethodSchema.describe("The HTTP method of the documented endpoint."),
|
|
471
|
+
path: nonEmptyStringSchema.describe("The endpoint path used in generated examples."),
|
|
472
|
+
stream: zod.z.boolean().optional().describe("Whether the example uses the streaming response API.")
|
|
438
473
|
});
|
|
439
474
|
var readmeCustomSectionSchema = zod.z.strictObject({
|
|
440
|
-
title: nonEmptyStringSchema,
|
|
441
|
-
content: zod.z.string()
|
|
475
|
+
title: nonEmptyStringSchema.describe("The heading displayed for this README section."),
|
|
476
|
+
content: zod.z.string().describe("The Markdown content of this README section.")
|
|
442
477
|
});
|
|
443
478
|
var readmeConfigSchema = zod.z.strictObject({
|
|
444
|
-
apiName: nonEmptyStringSchema.optional(),
|
|
445
|
-
introduction: zod.z.string().optional(),
|
|
446
|
-
apiReferenceLink: nonEmptyStringSchema.optional(),
|
|
447
|
-
bannerLink: nonEmptyStringSchema.optional(),
|
|
448
|
-
disabledSections: zod.z.array(nonEmptyStringSchema).optional(),
|
|
449
|
-
customSections: zod.z.array(readmeCustomSectionSchema).optional(),
|
|
450
|
-
defaultEndpoint: readmeEndpointSchema.optional(),
|
|
451
|
-
features: zod.z.record(zod.z.string(), zod.z.array(readmeEndpointSchema)).optional()
|
|
479
|
+
apiName: nonEmptyStringSchema.optional().describe("The API name displayed in the README."),
|
|
480
|
+
introduction: zod.z.string().optional().describe("Custom introductory Markdown for the README."),
|
|
481
|
+
apiReferenceLink: nonEmptyStringSchema.optional().describe("The URL linked as the API reference."),
|
|
482
|
+
bannerLink: nonEmptyStringSchema.optional().describe("The destination URL for the README banner."),
|
|
483
|
+
disabledSections: zod.z.array(nonEmptyStringSchema).optional().describe("Generated README sections to omit."),
|
|
484
|
+
customSections: zod.z.array(readmeCustomSectionSchema).optional().describe("Additional sections inserted into the README."),
|
|
485
|
+
defaultEndpoint: readmeEndpointSchema.optional().describe("The endpoint used for the primary README example."),
|
|
486
|
+
features: zod.z.record(zod.z.string(), zod.z.array(readmeEndpointSchema)).optional().describe("Named feature groups and the endpoints demonstrated by each group.")
|
|
452
487
|
});
|
|
453
488
|
var snippetsConfigSchema = zod.z.strictObject({
|
|
454
|
-
enabled: zod.z.boolean(),
|
|
455
|
-
format: zod.z.enum(["md", "json"]).optional(),
|
|
456
|
-
outputPath: nonEmptyStringSchema.optional()
|
|
489
|
+
enabled: zod.z.boolean().describe("Whether standalone usage snippets are generated."),
|
|
490
|
+
format: zod.z.enum(["md", "json"]).optional().describe("The output format for generated snippets."),
|
|
491
|
+
outputPath: nonEmptyStringSchema.optional().describe("The output path for generated snippet files.")
|
|
457
492
|
});
|
|
458
493
|
var docsConfigSchema = zod.z.strictObject({
|
|
459
|
-
readme: readmeConfigSchema.optional(),
|
|
460
|
-
snippets: snippetsConfigSchema.optional(),
|
|
461
|
-
referenceBaseUrl: nonEmptyStringSchema.optional(),
|
|
462
|
-
includeApiReference: zod.z.boolean().optional()
|
|
494
|
+
readme: readmeConfigSchema.optional().describe("README content and example configuration."),
|
|
495
|
+
snippets: snippetsConfigSchema.optional().describe("Standalone usage snippet generation."),
|
|
496
|
+
referenceBaseUrl: nonEmptyStringSchema.optional().describe("The base URL used for links to generated API reference files."),
|
|
497
|
+
includeApiReference: zod.z.boolean().optional().describe("Whether API reference documentation is included in the SDK output.")
|
|
463
498
|
});
|
|
464
499
|
|
|
465
500
|
// src/sdk-config/v1/docs.ts
|
|
@@ -1258,16 +1293,10 @@ function finishOutputMapping(mapping, outputMode, sourcePath, state, index) {
|
|
|
1258
1293
|
for (const path of collectLeafPaths(outputMode, sourcePath)) {
|
|
1259
1294
|
if (path[path.length - 1] === "_visit") consume(state, path);
|
|
1260
1295
|
}
|
|
1261
|
-
const legacyGenerateFullProject = isObject(outputMode) ? outputMode.generateFullProject : void 0;
|
|
1262
|
-
const generationShape = typeof legacyGenerateFullProject === "boolean" ? { generation: { ...mapping.generation, generateFullProject: legacyGenerateFullProject } } : {};
|
|
1263
|
-
if (typeof legacyGenerateFullProject === "boolean") {
|
|
1264
|
-
consume(state, [...sourcePath, "generateFullProject"]);
|
|
1265
|
-
}
|
|
1266
1296
|
const unsupported = collectUnsupported(outputMode, sourcePath, state);
|
|
1267
1297
|
const hasCredentials = unsupported.some((diagnostic) => isCredentialPath(diagnostic.path));
|
|
1268
1298
|
return {
|
|
1269
1299
|
...mapping,
|
|
1270
|
-
...generationShape,
|
|
1271
1300
|
unsupportedFields: [
|
|
1272
1301
|
...state.credentialDiagnostics ?? [],
|
|
1273
1302
|
...hasCredentials ? [
|
|
@@ -1338,6 +1367,9 @@ function outputDiagnostic(path, index) {
|
|
|
1338
1367
|
homepageLink: {
|
|
1339
1368
|
sdkConfigPath: ["targets", index, "package", "homepage"],
|
|
1340
1369
|
suggestedAction: "Set target.package.homepage manually to a valid URL."
|
|
1370
|
+
},
|
|
1371
|
+
generateFullProject: {
|
|
1372
|
+
suggestedAction: "Preserve this packaging setting on the generation request; it is not customer-authored SDK configuration."
|
|
1341
1373
|
}
|
|
1342
1374
|
};
|
|
1343
1375
|
const fieldGuidance = field ? guidance[field] : void 0;
|
|
@@ -1471,59 +1503,48 @@ function deepEqual(left, right) {
|
|
|
1471
1503
|
return false;
|
|
1472
1504
|
}
|
|
1473
1505
|
var namingConfigSchema = zod.z.strictObject({
|
|
1474
|
-
clientName: nonEmptyStringSchema.optional(),
|
|
1475
|
-
exportedClientName: nonEmptyStringSchema.optional(),
|
|
1476
|
-
environmentTypeName: nonEmptyStringSchema.optional(),
|
|
1477
|
-
apiErrorName: nonEmptyStringSchema.optional(),
|
|
1478
|
-
baseErrorName: nonEmptyStringSchema.optional(),
|
|
1479
|
-
pagerName: nonEmptyStringSchema.optional(),
|
|
1506
|
+
clientName: nonEmptyStringSchema.optional().describe("The generated client class name."),
|
|
1507
|
+
exportedClientName: nonEmptyStringSchema.optional().describe("The client name exported from the generated package."),
|
|
1508
|
+
environmentTypeName: nonEmptyStringSchema.optional().describe("The generated type name for API environments."),
|
|
1509
|
+
apiErrorName: nonEmptyStringSchema.optional().describe("The generated API error class name."),
|
|
1510
|
+
baseErrorName: nonEmptyStringSchema.optional().describe("The generated base error class name."),
|
|
1511
|
+
pagerName: nonEmptyStringSchema.optional().describe("The generated pagination helper name."),
|
|
1480
1512
|
/** Apply Fern's initialism-aware casing rules when deriving generated identifiers. */
|
|
1481
|
-
smartCasing: zod.z.boolean().optional(),
|
|
1513
|
+
smartCasing: zod.z.boolean().optional().describe("Whether generated identifiers use initialism-aware casing."),
|
|
1482
1514
|
/** Preserve a word boundary after digits when Fern smart casing is enabled. */
|
|
1483
|
-
smartCasingDigitWordBoundary: zod.z.boolean().optional()
|
|
1515
|
+
smartCasingDigitWordBoundary: zod.z.boolean().optional().describe("Whether smart casing preserves a word boundary after digits.")
|
|
1484
1516
|
});
|
|
1485
1517
|
|
|
1486
1518
|
// src/sdk-config/v1/generation.ts
|
|
1487
1519
|
var customerGenerationAssetSchema = zod.z.discriminatedUnion("type", [
|
|
1488
|
-
zod.z.strictObject({
|
|
1489
|
-
|
|
1520
|
+
zod.z.strictObject({
|
|
1521
|
+
type: zod.z.literal("path").describe("Loads the generation asset from a relative path."),
|
|
1522
|
+
location: relativePathSchema.describe("The relative path to the generation asset.")
|
|
1523
|
+
}),
|
|
1524
|
+
zod.z.strictObject({
|
|
1525
|
+
type: zod.z.literal("url").describe("Loads the generation asset from a URL."),
|
|
1526
|
+
location: nonEmptyStringSchema.describe("The URL of the generation asset.")
|
|
1527
|
+
})
|
|
1490
1528
|
]);
|
|
1491
|
-
var hookDependencySchema = zod.z.strictObject({
|
|
1492
|
-
name: nonEmptyStringSchema,
|
|
1493
|
-
version: nonEmptyStringSchema,
|
|
1494
|
-
groupId: nonEmptyStringSchema.optional()
|
|
1495
|
-
});
|
|
1496
|
-
var hooksConfigSchema = zod.z.strictObject({
|
|
1497
|
-
enabled: zod.z.boolean(),
|
|
1498
|
-
source: customerGenerationAssetSchema.optional(),
|
|
1499
|
-
dependencies: zod.z.array(hookDependencySchema).optional()
|
|
1500
|
-
});
|
|
1501
1529
|
var customCodeConfigSchema = zod.z.strictObject({
|
|
1502
|
-
enabled: zod.z.boolean(),
|
|
1503
|
-
source: customerGenerationAssetSchema.optional(),
|
|
1504
|
-
conflictStrategy: zod.z.enum(["mark", "ours", "theirs"]).optional(),
|
|
1505
|
-
trackChanges: zod.z.boolean().optional(),
|
|
1506
|
-
protectedFiles: zod.z.array(nonEmptyStringSchema).optional()
|
|
1530
|
+
enabled: zod.z.boolean().describe("Whether customer-authored code is merged into generated output."),
|
|
1531
|
+
source: customerGenerationAssetSchema.optional().describe("The source containing customer-authored code."),
|
|
1532
|
+
conflictStrategy: zod.z.enum(["mark", "ours", "theirs"]).optional().describe("How merge conflicts between generated and custom code are handled."),
|
|
1533
|
+
trackChanges: zod.z.boolean().optional().describe("Whether custom-code changes are tracked between builds."),
|
|
1534
|
+
protectedFiles: zod.z.array(nonEmptyStringSchema).optional().describe("Generated file paths that custom-code merging must not overwrite.")
|
|
1507
1535
|
});
|
|
1508
|
-
var
|
|
1509
|
-
|
|
1510
|
-
|
|
1536
|
+
var analyticsHeaderSchema = zod.z.strictObject({
|
|
1537
|
+
name: nonEmptyStringSchema.describe("The exported telemetry header name."),
|
|
1538
|
+
value: zod.z.string().describe("The literal telemetry header value.")
|
|
1511
1539
|
});
|
|
1512
|
-
var analyticsHeaderSchema = zod.z.union([
|
|
1513
|
-
zod.z.strictObject({ name: nonEmptyStringSchema, value: zod.z.string() }),
|
|
1514
|
-
zod.z.strictObject({
|
|
1515
|
-
name: nonEmptyStringSchema,
|
|
1516
|
-
valueRef: nonEmptyStringSchema
|
|
1517
|
-
})
|
|
1518
|
-
]);
|
|
1519
1540
|
var analyticsConfigSchema = zod.z.strictObject({
|
|
1520
|
-
enabled: zod.z.boolean(),
|
|
1521
|
-
endpoint: nonEmptyStringSchema.optional(),
|
|
1522
|
-
exporter: zod.z.enum(["otlp-http", "console"]).optional(),
|
|
1523
|
-
headers: zod.z.array(analyticsHeaderSchema).optional(),
|
|
1524
|
-
batchSize: zod.z.number().int().positive().optional(),
|
|
1525
|
-
scheduledDelayMs: zod.z.number().nonnegative().optional(),
|
|
1526
|
-
exportTimeoutMs: zod.z.number().nonnegative().optional()
|
|
1541
|
+
enabled: zod.z.boolean().describe("Whether generated clients export usage telemetry."),
|
|
1542
|
+
endpoint: nonEmptyStringSchema.optional().describe("The telemetry export endpoint."),
|
|
1543
|
+
exporter: zod.z.enum(["otlp-http", "console"]).optional().describe("The telemetry exporter implementation."),
|
|
1544
|
+
headers: zod.z.array(analyticsHeaderSchema).optional().describe("Headers sent by the telemetry exporter."),
|
|
1545
|
+
batchSize: zod.z.number().int().positive().optional().describe("The maximum spans in each export batch."),
|
|
1546
|
+
scheduledDelayMs: zod.z.number().nonnegative().optional().describe("The delay between scheduled exports, in milliseconds."),
|
|
1547
|
+
exportTimeoutMs: zod.z.number().nonnegative().optional().describe("The maximum time allowed for an export, in milliseconds.")
|
|
1527
1548
|
}).superRefine(({ enabled, endpoint }, context) => {
|
|
1528
1549
|
if (enabled && endpoint === void 0) {
|
|
1529
1550
|
context.addIssue({
|
|
@@ -1534,73 +1555,63 @@ var analyticsConfigSchema = zod.z.strictObject({
|
|
|
1534
1555
|
}
|
|
1535
1556
|
});
|
|
1536
1557
|
var wireTestsSchema = zod.z.strictObject({
|
|
1537
|
-
enabled: zod.z.boolean(),
|
|
1538
|
-
exclusions: zod.z.array(nonEmptyStringSchema).optional(),
|
|
1539
|
-
fallbackToGeneratedErrorExamples: zod.z.boolean().optional(),
|
|
1540
|
-
fixtureSource: zod.z.enum(["synthetic", "recorded", "auto"]).optional()
|
|
1558
|
+
enabled: zod.z.boolean().describe("Whether wire-level request and response tests are generated."),
|
|
1559
|
+
exclusions: zod.z.array(nonEmptyStringSchema).optional().describe("Operations excluded from wire tests."),
|
|
1560
|
+
fallbackToGeneratedErrorExamples: zod.z.boolean().optional().describe("Whether missing error fixtures are synthesized from generated examples."),
|
|
1561
|
+
fixtureSource: zod.z.enum(["synthetic", "recorded", "auto"]).optional().describe("Where wire-test fixtures are obtained.")
|
|
1541
1562
|
});
|
|
1542
1563
|
var unitTestsSchema = zod.z.strictObject({
|
|
1543
|
-
enabled: zod.z.boolean(),
|
|
1544
|
-
|
|
1545
|
-
exclusions: zod.z.array(nonEmptyStringSchema).optional()
|
|
1564
|
+
enabled: zod.z.boolean().describe("Whether SDK unit tests are generated."),
|
|
1565
|
+
exclusions: zod.z.array(nonEmptyStringSchema).optional().describe("Operations excluded from unit tests.")
|
|
1546
1566
|
});
|
|
1547
1567
|
var streamsSchema = zod.z.strictObject({
|
|
1548
|
-
enabled: zod.z.boolean(),
|
|
1549
|
-
responseType: zod.z.enum(["wrapper", "native", "web"]).optional(),
|
|
1550
|
-
fileResponseType: zod.z.enum(["stream", "binary-response"]).optional(),
|
|
1551
|
-
defaultChunkSizeBytes: zod.z.number().int().positive().optional()
|
|
1568
|
+
enabled: zod.z.boolean().describe("Whether generated clients expose streaming response APIs."),
|
|
1569
|
+
responseType: zod.z.enum(["wrapper", "native", "web"]).optional().describe("The streaming response abstraction exposed by generated clients."),
|
|
1570
|
+
fileResponseType: zod.z.enum(["stream", "binary-response"]).optional().describe("The response type used for file downloads."),
|
|
1571
|
+
defaultChunkSizeBytes: zod.z.number().int().positive().optional().describe("The default number of bytes yielded by streaming iterators.")
|
|
1552
1572
|
});
|
|
1553
1573
|
var layoutConfigSchema = zod.z.strictObject({
|
|
1554
|
-
outputDirectory: zod.z.enum(["project-root", "source-root"]).optional(),
|
|
1555
|
-
packagePath: nonEmptyStringSchema.optional()
|
|
1574
|
+
outputDirectory: zod.z.enum(["project-root", "source-root"]).optional().describe("Whether generated source is rooted at the project or its source directory."),
|
|
1575
|
+
packagePath: nonEmptyStringSchema.optional().describe("The package-relative path for generated source files.")
|
|
1556
1576
|
});
|
|
1557
1577
|
var serializationConfigSchema = zod.z.strictObject({
|
|
1558
|
-
enumRepresentation: zod.z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional(),
|
|
1559
|
-
additionalProperties: zod.z.enum(["allow", "forbid", "ignore", "language-default"]).optional(),
|
|
1560
|
-
inlineTypes: zod.z.boolean().optional(),
|
|
1561
|
-
omitUndefined: zod.z.boolean().optional()
|
|
1578
|
+
enumRepresentation: zod.z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional().describe("How schema enums are represented in generated code."),
|
|
1579
|
+
additionalProperties: zod.z.enum(["allow", "forbid", "ignore", "language-default"]).optional().describe("How undeclared object properties are handled."),
|
|
1580
|
+
inlineTypes: zod.z.boolean().optional().describe("Whether inline schemas remain nested under their parent types."),
|
|
1581
|
+
omitUndefined: zod.z.boolean().optional().describe("Whether undefined properties are omitted during serialization.")
|
|
1562
1582
|
});
|
|
1563
1583
|
var generationConfigOverrideShape = {
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
unitTests: unitTestsSchema.optional(),
|
|
1584
|
-
webSockets: zod.z.boolean().optional(),
|
|
1585
|
-
streams: streamsSchema.optional(),
|
|
1586
|
-
naming: namingConfigSchema.optional(),
|
|
1587
|
-
layout: layoutConfigSchema.optional(),
|
|
1588
|
-
serialization: serializationConfigSchema.optional()
|
|
1584
|
+
includeOptionalSnippetParameters: zod.z.boolean().optional().describe("Whether usage snippets include optional request parameters."),
|
|
1585
|
+
buildAllModels: zod.z.boolean().optional().describe("Whether models not referenced by operations are also generated."),
|
|
1586
|
+
inferServiceNames: zod.z.boolean().optional().describe("Whether service names are inferred from API structure."),
|
|
1587
|
+
includeDeprecatedOperations: zod.z.boolean().optional().describe("Whether deprecated API operations are generated."),
|
|
1588
|
+
multipleResponses: zod.z.boolean().optional().describe("Whether operations model multiple successful response types."),
|
|
1589
|
+
devContainer: zod.z.boolean().optional().describe("Whether development-container configuration is generated."),
|
|
1590
|
+
allowMockClient: zod.z.boolean().optional().describe("Whether a mock API client is included in the generated SDK."),
|
|
1591
|
+
ignoreFiles: zod.z.array(nonEmptyStringSchema).optional().describe("Generated paths excluded from the final output."),
|
|
1592
|
+
reservedKeywords: zod.z.array(nonEmptyStringSchema).optional().describe("Additional identifiers treated as reserved words."),
|
|
1593
|
+
customCode: customCodeConfigSchema.optional().describe("Customer-authored code merge configuration."),
|
|
1594
|
+
customQueryPaths: zod.z.array(relativePathSchema).optional().describe("Relative paths to custom query definitions."),
|
|
1595
|
+
analytics: analyticsConfigSchema.optional().describe("Generated client telemetry configuration."),
|
|
1596
|
+
wireTests: wireTestsSchema.optional().describe("Wire-level request and response test generation."),
|
|
1597
|
+
unitTests: unitTestsSchema.optional().describe("SDK unit-test generation."),
|
|
1598
|
+
webSockets: zod.z.boolean().optional().describe("Whether WebSocket clients are generated for supported channels."),
|
|
1599
|
+
streams: streamsSchema.optional().describe("Streaming response generation behavior."),
|
|
1600
|
+
naming: namingConfigSchema.optional().describe("Names and casing used by generated code."),
|
|
1601
|
+
layout: layoutConfigSchema.optional().describe("Generated project and source layout."),
|
|
1602
|
+
serialization: serializationConfigSchema.optional().describe("Generated model serialization behavior.")
|
|
1589
1603
|
};
|
|
1590
1604
|
var sdkConfigV1GenerationConfigOverrideSchema = zod.z.strictObject(
|
|
1591
1605
|
generationConfigOverrideShape
|
|
1592
1606
|
);
|
|
1593
1607
|
var sdkConfigV1GenerationConfigSchema = zod.z.strictObject({
|
|
1594
1608
|
...generationConfigOverrideShape,
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
generateFullProject: zod.z.boolean().default(false),
|
|
1602
|
-
devContainer: zod.z.boolean().default(false),
|
|
1603
|
-
allowMockClient: zod.z.boolean().default(false)
|
|
1609
|
+
buildAllModels: zod.z.boolean().default(false).describe("Whether models not referenced by operations are also generated."),
|
|
1610
|
+
inferServiceNames: zod.z.boolean().default(false).describe("Whether service names are inferred from API structure."),
|
|
1611
|
+
includeDeprecatedOperations: zod.z.boolean().default(true).describe("Whether deprecated API operations are generated."),
|
|
1612
|
+
multipleResponses: zod.z.boolean().default(false).describe("Whether operations model multiple successful response types."),
|
|
1613
|
+
devContainer: zod.z.boolean().default(false).describe("Whether development-container configuration is generated."),
|
|
1614
|
+
allowMockClient: zod.z.boolean().default(false).describe("Whether a mock API client is included in the generated SDK.")
|
|
1604
1615
|
});
|
|
1605
1616
|
var commonGenerationKeys = new Set(Object.keys(generationConfigOverrideShape));
|
|
1606
1617
|
function splitSdkConfigV1TargetGeneration(generation) {
|
|
@@ -1622,78 +1633,97 @@ var sdkConfigV1PublishRegistrySchema = zod.z.enum([
|
|
|
1622
1633
|
"composer"
|
|
1623
1634
|
]);
|
|
1624
1635
|
var mavenSignatureSchema = zod.z.strictObject({
|
|
1625
|
-
keyId: nonEmptyStringSchema
|
|
1626
|
-
|
|
1627
|
-
|
|
1636
|
+
keyId: nonEmptyStringSchema.describe(
|
|
1637
|
+
"The signing key identifier, or an environment expression that resolves to it."
|
|
1638
|
+
),
|
|
1639
|
+
password: nonEmptyStringSchema.describe(
|
|
1640
|
+
"The signing key password, or an environment expression that resolves to it."
|
|
1641
|
+
),
|
|
1642
|
+
secretKey: nonEmptyStringSchema.describe(
|
|
1643
|
+
"The armored secret key, or an environment expression that resolves to it."
|
|
1644
|
+
)
|
|
1628
1645
|
});
|
|
1629
1646
|
var commonPublishShape = {
|
|
1630
|
-
url: nonEmptyStringSchema.optional(),
|
|
1631
|
-
releaseBranch: nonEmptyStringSchema.optional(),
|
|
1632
|
-
tolerateRepublish: zod.z.boolean().optional()
|
|
1647
|
+
url: nonEmptyStringSchema.optional().describe("A custom package registry URL."),
|
|
1648
|
+
releaseBranch: nonEmptyStringSchema.optional().describe("The branch used by generated package release workflows."),
|
|
1649
|
+
tolerateRepublish: zod.z.boolean().optional().describe("Whether an already-published package version is treated as non-fatal.")
|
|
1633
1650
|
};
|
|
1634
1651
|
var sdkConfigV1PublishConfigSchema = zod.z.discriminatedUnion("registry", [
|
|
1635
1652
|
zod.z.strictObject({
|
|
1636
|
-
registry: zod.z.literal("npm"),
|
|
1637
|
-
token: nonEmptyStringSchema.optional(),
|
|
1653
|
+
registry: zod.z.literal("npm").describe("Publishes the package to an npm-compatible registry."),
|
|
1654
|
+
token: nonEmptyStringSchema.optional().describe("The npm registry token, or an environment expression that resolves to it."),
|
|
1655
|
+
...commonPublishShape
|
|
1656
|
+
}),
|
|
1657
|
+
zod.z.strictObject({
|
|
1658
|
+
registry: zod.z.literal("pypi").describe("Publishes the package to a PyPI-compatible registry."),
|
|
1659
|
+
username: nonEmptyStringSchema.optional().describe("The PyPI username, or an environment expression that resolves to it."),
|
|
1660
|
+
password: nonEmptyStringSchema.optional().describe("The PyPI password or token, or an environment expression that resolves to it."),
|
|
1661
|
+
...commonPublishShape
|
|
1662
|
+
}),
|
|
1663
|
+
zod.z.strictObject({
|
|
1664
|
+
registry: zod.z.literal("maven").describe("Publishes the package to a Maven-compatible repository."),
|
|
1665
|
+
username: nonEmptyStringSchema.optional().describe("The Maven username, or an environment expression that resolves to it."),
|
|
1666
|
+
password: nonEmptyStringSchema.optional().describe("The Maven password, or an environment expression that resolves to it."),
|
|
1667
|
+
signature: mavenSignatureSchema.optional().describe("Credentials used to sign Maven artifacts."),
|
|
1668
|
+
...commonPublishShape
|
|
1669
|
+
}),
|
|
1670
|
+
zod.z.strictObject({
|
|
1671
|
+
registry: zod.z.literal("nuget").describe("Publishes the package to a NuGet-compatible registry."),
|
|
1638
1672
|
...commonPublishShape
|
|
1639
1673
|
}),
|
|
1640
1674
|
zod.z.strictObject({
|
|
1641
|
-
registry: zod.z.literal("
|
|
1642
|
-
username: nonEmptyStringSchema.optional(),
|
|
1643
|
-
password: nonEmptyStringSchema.optional(),
|
|
1675
|
+
registry: zod.z.literal("rubygems").describe("Publishes the package to a RubyGems-compatible registry."),
|
|
1644
1676
|
...commonPublishShape
|
|
1645
1677
|
}),
|
|
1646
1678
|
zod.z.strictObject({
|
|
1647
|
-
registry: zod.z.literal("
|
|
1648
|
-
|
|
1649
|
-
password: nonEmptyStringSchema.optional(),
|
|
1650
|
-
signature: mavenSignatureSchema.optional(),
|
|
1679
|
+
registry: zod.z.literal("crates").describe("Publishes the crate to a Cargo-compatible registry."),
|
|
1680
|
+
token: nonEmptyStringSchema.optional().describe("The Cargo registry token, or an environment expression that resolves to it."),
|
|
1651
1681
|
...commonPublishShape
|
|
1652
1682
|
}),
|
|
1653
|
-
zod.z.strictObject({ registry: zod.z.literal("nuget"), ...commonPublishShape }),
|
|
1654
|
-
zod.z.strictObject({ registry: zod.z.literal("rubygems"), ...commonPublishShape }),
|
|
1655
1683
|
zod.z.strictObject({
|
|
1656
|
-
registry: zod.z.literal("
|
|
1657
|
-
token: nonEmptyStringSchema.optional(),
|
|
1684
|
+
registry: zod.z.literal("go").describe("Publishes the SDK as a Go module."),
|
|
1658
1685
|
...commonPublishShape
|
|
1659
1686
|
}),
|
|
1660
|
-
zod.z.strictObject({
|
|
1661
|
-
|
|
1687
|
+
zod.z.strictObject({
|
|
1688
|
+
registry: zod.z.literal("composer").describe("Publishes the package to a Composer-compatible registry."),
|
|
1689
|
+
...commonPublishShape
|
|
1690
|
+
})
|
|
1662
1691
|
]);
|
|
1663
1692
|
var reviewersSchema = zod.z.strictObject({
|
|
1664
|
-
teams: zod.z.array(nonEmptyStringSchema).optional(),
|
|
1665
|
-
users: zod.z.array(nonEmptyStringSchema).optional()
|
|
1693
|
+
teams: zod.z.array(nonEmptyStringSchema).optional().describe("GitHub teams requested as reviewers."),
|
|
1694
|
+
users: zod.z.array(nonEmptyStringSchema).optional().describe("GitHub users requested as reviewers.")
|
|
1666
1695
|
});
|
|
1667
1696
|
var githubCredentialsSchema = zod.z.strictObject({
|
|
1668
|
-
username: nonEmptyStringSchema.optional(),
|
|
1669
|
-
password: nonEmptyStringSchema.optional(),
|
|
1670
|
-
token: nonEmptyStringSchema.optional(),
|
|
1671
|
-
apiKey: nonEmptyStringSchema.optional()
|
|
1697
|
+
username: nonEmptyStringSchema.optional().describe("The username used to authenticate with the GitHub host."),
|
|
1698
|
+
password: nonEmptyStringSchema.optional().describe("The password used to authenticate with the GitHub host."),
|
|
1699
|
+
token: nonEmptyStringSchema.optional().describe("A token used to authenticate with the GitHub host."),
|
|
1700
|
+
apiKey: nonEmptyStringSchema.optional().describe("An API key used to authenticate with the GitHub host.")
|
|
1672
1701
|
});
|
|
1673
1702
|
var githubOutputSchema = zod.z.strictObject({
|
|
1674
|
-
repository: nonEmptyStringSchema
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1703
|
+
repository: nonEmptyStringSchema.describe(
|
|
1704
|
+
"The GitHub repository that receives generated files."
|
|
1705
|
+
),
|
|
1706
|
+
host: nonEmptyStringSchema.optional().describe("The GitHub host for enterprise installations."),
|
|
1707
|
+
branch: nonEmptyStringSchema.optional().describe("The target branch for generated changes."),
|
|
1708
|
+
mode: zod.z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional().describe("How generated changes are delivered to the repository."),
|
|
1709
|
+
reviewers: reviewersSchema.optional().describe("Reviewers requested for generated pull requests."),
|
|
1710
|
+
credentials: githubCredentialsSchema.optional().describe("Credentials used to authenticate GitHub delivery."),
|
|
1711
|
+
privateRepository: zod.z.boolean().optional().describe("Whether the destination repository is private.")
|
|
1682
1712
|
});
|
|
1683
1713
|
var filesOutputSchema = zod.z.strictObject({
|
|
1684
|
-
delivery: zod.z.literal("files"),
|
|
1685
|
-
path: nonEmptyStringSchema.optional(),
|
|
1686
|
-
publish: sdkConfigV1PublishConfigSchema.optional()
|
|
1714
|
+
delivery: zod.z.literal("files").describe("Writes the generated SDK to a directory."),
|
|
1715
|
+
path: nonEmptyStringSchema.optional().describe("The destination directory for generated files."),
|
|
1716
|
+
publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
|
|
1687
1717
|
});
|
|
1688
1718
|
var zipOutputSchema = zod.z.strictObject({
|
|
1689
|
-
delivery: zod.z.literal("zip"),
|
|
1690
|
-
fileName: nonEmptyStringSchema.optional(),
|
|
1691
|
-
publish: sdkConfigV1PublishConfigSchema.optional()
|
|
1719
|
+
delivery: zod.z.literal("zip").describe("Packages the generated SDK as a ZIP archive."),
|
|
1720
|
+
fileName: nonEmptyStringSchema.optional().describe("The generated ZIP archive file name."),
|
|
1721
|
+
publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
|
|
1692
1722
|
});
|
|
1693
1723
|
var githubDeliverySchema = zod.z.strictObject({
|
|
1694
|
-
delivery: zod.z.literal("github"),
|
|
1695
|
-
github: githubOutputSchema,
|
|
1696
|
-
publish: sdkConfigV1PublishConfigSchema.optional()
|
|
1724
|
+
delivery: zod.z.literal("github").describe("Delivers the generated SDK to GitHub."),
|
|
1725
|
+
github: githubOutputSchema.describe("GitHub repository delivery settings."),
|
|
1726
|
+
publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
|
|
1697
1727
|
});
|
|
1698
1728
|
var sdkConfigV1OutputConfigSchema = zod.z.discriminatedUnion(
|
|
1699
1729
|
"delivery",
|
|
@@ -1705,29 +1735,33 @@ var sdkConfigV1OutputConfigSchema = zod.z.discriminatedUnion(
|
|
|
1705
1735
|
var sdkConfigV1DependencySchema = dependencySchema;
|
|
1706
1736
|
var sdkConfigV1PackageConfigSchema = packageConfigSchema;
|
|
1707
1737
|
var sdkConfigV1ReplayConfigSchema = zod.z.strictObject({
|
|
1708
|
-
enabled: zod.z.boolean()
|
|
1738
|
+
enabled: zod.z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
|
|
1709
1739
|
});
|
|
1710
1740
|
var apiImportSettingsSchema = zod.z.strictObject({
|
|
1711
|
-
respectNullableSchemas: zod.z.boolean().optional(),
|
|
1712
|
-
titleAsSchemaName: zod.z.boolean().optional(),
|
|
1713
|
-
coerceEnumsToLiterals: zod.z.boolean().optional(),
|
|
1714
|
-
idiomaticRequestNames: zod.z.boolean().optional(),
|
|
1715
|
-
wrapReferencesToNullableInOptional: zod.z.boolean().optional(),
|
|
1716
|
-
coerceOptionalSchemasToNullable: zod.z.boolean().optional(),
|
|
1717
|
-
pathParameterOrder: zod.z.enum(["url-order", "spec-order"]).optional(),
|
|
1718
|
-
onlyIncludeReferencedSchemas: zod.z.boolean().optional(),
|
|
1719
|
-
objectQueryParameters: zod.z.boolean().optional(),
|
|
1720
|
-
typeDatesAsStrings: zod.z.boolean().optional(),
|
|
1721
|
-
groupMultiApiEnvironments: zod.z.boolean().optional()
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1741
|
+
respectNullableSchemas: zod.z.boolean().optional().describe("Whether nullable schemas remain nullable in generated types."),
|
|
1742
|
+
titleAsSchemaName: zod.z.boolean().optional().describe("Whether a schema title can determine the generated type name."),
|
|
1743
|
+
coerceEnumsToLiterals: zod.z.boolean().optional().describe("Whether single-value enums are imported as literal values."),
|
|
1744
|
+
idiomaticRequestNames: zod.z.boolean().optional().describe("Whether request types use concise, idiomatic generated names."),
|
|
1745
|
+
wrapReferencesToNullableInOptional: zod.z.boolean().optional().describe("Whether nullable schema references are also treated as optional."),
|
|
1746
|
+
coerceOptionalSchemasToNullable: zod.z.boolean().optional().describe("Whether optional properties are represented as nullable required properties."),
|
|
1747
|
+
pathParameterOrder: zod.z.enum(["url-order", "spec-order"]).optional().describe("Whether path parameters follow their URL order or specification order."),
|
|
1748
|
+
onlyIncludeReferencedSchemas: zod.z.boolean().optional().describe("Whether unreferenced schemas are omitted from the generated SDK."),
|
|
1749
|
+
objectQueryParameters: zod.z.boolean().optional().describe("Whether object-valued query parameters are preserved as objects."),
|
|
1750
|
+
typeDatesAsStrings: zod.z.boolean().optional().describe("Whether date and date-time schemas are generated as strings."),
|
|
1751
|
+
groupMultiApiEnvironments: zod.z.boolean().optional().describe(
|
|
1752
|
+
"Whether environments from multiple API sources are merged into shared named groups."
|
|
1753
|
+
),
|
|
1754
|
+
ignoreTags: zod.z.boolean().optional().describe("Whether API tags are ignored when organizing generated resources."),
|
|
1755
|
+
disambiguateRequestNames: zod.z.boolean().optional().describe("Whether colliding request type names are automatically disambiguated."),
|
|
1756
|
+
respectReadonlySchemas: zod.z.boolean().optional().describe(
|
|
1757
|
+
"Whether read-only properties are modeled separately for request and response types."
|
|
1758
|
+
),
|
|
1759
|
+
discriminatedUnionV2: zod.z.boolean().optional().describe("Whether oneOf and anyOf schemas use the newer discriminator inference rules."),
|
|
1760
|
+
undiscriminatedUnionsWithLiterals: zod.z.boolean().optional().describe("Whether literal-bearing unions remain undiscriminated during import."),
|
|
1761
|
+
inlineAllOfSchemas: zod.z.boolean().optional().describe("Whether schemas composed with allOf are inlined when possible."),
|
|
1762
|
+
resolveSchemaCollisions: zod.z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
|
|
1763
|
+
asyncApiMessageNaming: zod.z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
|
|
1764
|
+
defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one.")
|
|
1731
1765
|
});
|
|
1732
1766
|
var sourceSpecTypeSchema = zod.z.enum([
|
|
1733
1767
|
"openapi",
|
|
@@ -1739,27 +1773,30 @@ var sourceSpecTypeSchema = zod.z.enum([
|
|
|
1739
1773
|
|
|
1740
1774
|
// src/sdk-config/v1/source.ts
|
|
1741
1775
|
var sourceSpecShape = {
|
|
1742
|
-
id: nonEmptyStringSchema,
|
|
1743
|
-
type: sourceSpecTypeSchema,
|
|
1744
|
-
name: nonEmptyStringSchema.optional(),
|
|
1745
|
-
namespace: nonEmptyStringSchema.optional(),
|
|
1746
|
-
apiImportSettings: apiImportSettingsSchema.optional(),
|
|
1747
|
-
overlays: zod.z.array(relativePathSchema).optional(),
|
|
1748
|
-
overrides: zod.z.array(relativePathSchema).optional()
|
|
1776
|
+
id: nonEmptyStringSchema.describe("A unique identifier for this API source."),
|
|
1777
|
+
type: sourceSpecTypeSchema.describe("The API description format of this source."),
|
|
1778
|
+
name: nonEmptyStringSchema.optional().describe("A human-readable name for this API source."),
|
|
1779
|
+
namespace: nonEmptyStringSchema.optional().describe("A namespace used to isolate this source in a multi-source SDK."),
|
|
1780
|
+
apiImportSettings: apiImportSettingsSchema.optional().describe("Import behavior that overrides the source-level defaults for this spec."),
|
|
1781
|
+
overlays: zod.z.array(relativePathSchema).optional().describe("Relative paths to overlays applied to this source in order."),
|
|
1782
|
+
overrides: zod.z.array(relativePathSchema).optional().describe("Relative paths to source override files applied in order.")
|
|
1749
1783
|
};
|
|
1750
1784
|
var sdkConfigV1SourceSpecSchema = zod.z.union(
|
|
1751
1785
|
[
|
|
1752
|
-
zod.z.strictObject({ ...sourceSpecShape, path: relativePathSchema }),
|
|
1753
1786
|
zod.z.strictObject({
|
|
1754
1787
|
...sourceSpecShape,
|
|
1755
|
-
|
|
1788
|
+
path: relativePathSchema.describe("The relative path to the API source file.")
|
|
1789
|
+
}),
|
|
1790
|
+
zod.z.strictObject({
|
|
1791
|
+
...sourceSpecShape,
|
|
1792
|
+
url: zod.z.url({ protocol: /^https?$/ }).describe("The HTTP or HTTPS URL of the API source file.")
|
|
1756
1793
|
})
|
|
1757
1794
|
],
|
|
1758
1795
|
{ error: "source spec must contain exactly one locator: path or HTTP(S) url" }
|
|
1759
1796
|
);
|
|
1760
1797
|
var sdkConfigV1SourceConfigSchema = zod.z.strictObject({
|
|
1761
|
-
specs: zod.z.array(sdkConfigV1SourceSpecSchema).min(1, "source.specs must contain at least one source spec"),
|
|
1762
|
-
apiImportSettings: apiImportSettingsSchema.optional()
|
|
1798
|
+
specs: zod.z.array(sdkConfigV1SourceSpecSchema).min(1, "source.specs must contain at least one source spec").describe("API source files in authoritative processing order."),
|
|
1799
|
+
apiImportSettings: apiImportSettingsSchema.optional().describe("Default import behavior shared by every source spec.")
|
|
1763
1800
|
}).superRefine(({ specs }, context) => {
|
|
1764
1801
|
const seenIds = /* @__PURE__ */ new Set();
|
|
1765
1802
|
specs.forEach(({ id }, index) => {
|
|
@@ -1774,79 +1811,80 @@ var sdkConfigV1SourceConfigSchema = zod.z.strictObject({
|
|
|
1774
1811
|
});
|
|
1775
1812
|
});
|
|
1776
1813
|
var cliGenerationConfigSchema = zod.z.strictObject({
|
|
1777
|
-
paginationParameters: zod.z.array(nonEmptyStringSchema).optional(),
|
|
1778
|
-
skills: zod.z.boolean().optional()
|
|
1814
|
+
paginationParameters: zod.z.array(nonEmptyStringSchema).optional().describe("Request parameter names treated as pagination controls by the CLI."),
|
|
1815
|
+
skills: zod.z.boolean().optional().describe("Whether the generated CLI includes skills that teach AI agents to invoke commands.")
|
|
1779
1816
|
});
|
|
1780
1817
|
var csharpGenerationConfigSchema = zod.z.strictObject({
|
|
1781
|
-
useOptionalWrapper: zod.z.boolean().optional(),
|
|
1782
|
-
simplifyObjectDictionaries: zod.z.boolean().optional(),
|
|
1783
|
-
explicitNamespaces: zod.z.boolean().optional(),
|
|
1784
|
-
rootNamespaceForCoreClasses: zod.z.boolean().optional(),
|
|
1785
|
-
includeExceptionHandler: zod.z.boolean().optional(),
|
|
1786
|
-
experimentalExplicitNullableOptional: zod.z.boolean().optional()
|
|
1818
|
+
useOptionalWrapper: zod.z.boolean().optional().describe("Whether optional values use an explicit Optional wrapper."),
|
|
1819
|
+
simplifyObjectDictionaries: zod.z.boolean().optional().describe("Whether object schemas with arbitrary values use simplified dictionary types."),
|
|
1820
|
+
explicitNamespaces: zod.z.boolean().optional().describe("Whether generated resource groups use explicit nested namespaces."),
|
|
1821
|
+
rootNamespaceForCoreClasses: zod.z.boolean().optional().describe("Whether shared client classes are emitted in the root namespace."),
|
|
1822
|
+
includeExceptionHandler: zod.z.boolean().optional().describe("Whether generated client operations use a configurable exception handler."),
|
|
1823
|
+
experimentalExplicitNullableOptional: zod.z.boolean().optional().describe(
|
|
1824
|
+
"Whether optional nullable properties distinguish omitted values from explicit nulls."
|
|
1825
|
+
)
|
|
1787
1826
|
});
|
|
1788
1827
|
var goGenerationConfigSchema = zod.z.strictObject({
|
|
1789
|
-
legacyComplexModels: zod.z.boolean().optional(),
|
|
1828
|
+
legacyComplexModels: zod.z.boolean().optional().describe("Whether complex models use the legacy Go representation."),
|
|
1790
1829
|
/** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
|
|
1791
|
-
smartCasing: zod.z.boolean().optional(),
|
|
1830
|
+
smartCasing: zod.z.boolean().optional().describe("Whether generated Go names capitalize common initialisms."),
|
|
1792
1831
|
/** Overrides the fern root-client constructor independently from the client type name. */
|
|
1793
|
-
clientConstructorName: nonEmptyStringSchema.optional(),
|
|
1794
|
-
unionVersion: zod.z.enum(["v0", "v1"]).optional(),
|
|
1795
|
-
includeLegacyClientOptions: zod.z.boolean().optional()
|
|
1832
|
+
clientConstructorName: nonEmptyStringSchema.optional().describe("The generated root-client constructor name."),
|
|
1833
|
+
unionVersion: zod.z.enum(["v0", "v1"]).optional().describe("The representation used for generated Go unions."),
|
|
1834
|
+
includeLegacyClientOptions: zod.z.boolean().optional().describe("Whether the client retains legacy constructor option helpers.")
|
|
1796
1835
|
});
|
|
1797
1836
|
var jvmGenerationConfigSchema = zod.z.strictObject({
|
|
1798
|
-
packageLayout: zod.z.enum(["flat", "nested"]).optional(),
|
|
1799
|
-
useLocalDateForDates: zod.z.boolean().optional(),
|
|
1800
|
-
collapseOptionalNullable: zod.z.boolean().optional(),
|
|
1801
|
-
gradleDistributionUrl: zod.z.string().min(1).optional(),
|
|
1802
|
-
gradlePluginManagement: zod.z.string().optional(),
|
|
1803
|
-
gradleCentralDependencyManagement: zod.z.boolean().optional(),
|
|
1837
|
+
packageLayout: zod.z.enum(["flat", "nested"]).optional().describe("Whether generated JVM packages use a flat or nested resource layout."),
|
|
1838
|
+
useLocalDateForDates: zod.z.boolean().optional().describe("Whether date-only values use LocalDate instead of OffsetDateTime."),
|
|
1839
|
+
collapseOptionalNullable: zod.z.boolean().optional().describe("Whether optional nullable values collapse into a single nullable representation."),
|
|
1840
|
+
gradleDistributionUrl: zod.z.string().min(1).optional().describe("The Gradle distribution URL written to the generated wrapper."),
|
|
1841
|
+
gradlePluginManagement: zod.z.string().optional().describe("Plugin management configuration added to the generated Gradle settings."),
|
|
1842
|
+
gradleCentralDependencyManagement: zod.z.boolean().optional().describe("Whether dependency versions are managed centrally in the Gradle project."),
|
|
1804
1843
|
/** Selects co-located async methods or a separate async client surface. */
|
|
1805
|
-
asyncStyle: zod.z.enum(["dedicated-client", "twin-methods"]).optional()
|
|
1844
|
+
asyncStyle: zod.z.enum(["dedicated-client", "twin-methods"]).optional().describe("Whether asynchronous operations use a separate client or co-located methods.")
|
|
1806
1845
|
});
|
|
1807
1846
|
|
|
1808
1847
|
// src/sdk-config-domain/v1/language/java.ts
|
|
1809
1848
|
var javaGenerationConfigSchema = jvmGenerationConfigSchema.extend({
|
|
1810
|
-
includeKotlinSnippets: zod.z.boolean().optional()
|
|
1849
|
+
includeKotlinSnippets: zod.z.boolean().optional().describe("Whether Java SDK documentation includes Kotlin usage snippets.")
|
|
1811
1850
|
});
|
|
1812
1851
|
|
|
1813
1852
|
// src/sdk-config-domain/v1/language/kotlin.ts
|
|
1814
1853
|
var kotlinGenerationConfigSchema = jvmGenerationConfigSchema;
|
|
1815
1854
|
var compilerOptionsSchema = zod.z.strictObject({
|
|
1816
|
-
target: nonEmptyStringSchema.optional(),
|
|
1817
|
-
module: nonEmptyStringSchema.optional(),
|
|
1818
|
-
lib: zod.z.array(nonEmptyStringSchema).optional()
|
|
1855
|
+
target: nonEmptyStringSchema.optional().describe("The JavaScript language target passed to TypeScript."),
|
|
1856
|
+
module: nonEmptyStringSchema.optional().describe("The module format passed to TypeScript."),
|
|
1857
|
+
lib: zod.z.array(nonEmptyStringSchema).optional().describe("The runtime library definitions passed to TypeScript.")
|
|
1819
1858
|
});
|
|
1820
1859
|
var packageScriptSchema = zod.z.strictObject({
|
|
1821
|
-
name: nonEmptyStringSchema,
|
|
1822
|
-
command: nonEmptyStringSchema
|
|
1860
|
+
name: nonEmptyStringSchema.describe("The package script name."),
|
|
1861
|
+
command: nonEmptyStringSchema.describe("The command executed by the package script.")
|
|
1823
1862
|
});
|
|
1824
1863
|
var httpClientSchema = zod.z.strictObject({
|
|
1825
|
-
name: zod.z.enum(["axios", "fetch"])
|
|
1864
|
+
name: zod.z.enum(["axios", "fetch"]).describe("The HTTP client used by generated TypeScript code.")
|
|
1826
1865
|
});
|
|
1827
1866
|
var typescriptGenerationConfigSchema = zod.z.strictObject({
|
|
1828
|
-
typescriptVersion: nonEmptyStringSchema.optional(),
|
|
1829
|
-
zodVersion: nonEmptyStringSchema.optional(),
|
|
1830
|
-
compilerOptions: compilerOptionsSchema.optional(),
|
|
1831
|
-
httpClient: httpClientSchema.optional(),
|
|
1832
|
-
packageManager: zod.z.enum(["pnpm", "yarn"]).optional(),
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
exportClassDefault: zod.z.boolean().optional(),
|
|
1867
|
+
typescriptVersion: nonEmptyStringSchema.optional().describe("The TypeScript version used by the generated project."),
|
|
1868
|
+
zodVersion: nonEmptyStringSchema.optional().describe("The Zod version used by generated runtime schemas."),
|
|
1869
|
+
compilerOptions: compilerOptionsSchema.optional().describe("TypeScript compiler options for the generated project."),
|
|
1870
|
+
httpClient: httpClientSchema.optional().describe("The HTTP client used by generated TypeScript code."),
|
|
1871
|
+
packageManager: zod.z.enum(["pnpm", "yarn"]).optional().describe("The package manager used by the generated project."),
|
|
1872
|
+
packageManagerVersion: nonEmptyStringSchema.optional().describe("The package manager version used by the generated project."),
|
|
1873
|
+
testFramework: zod.z.enum(["jest", "vitest"]).optional().describe("The test framework used by generated tests."),
|
|
1874
|
+
namingStrategy: zod.z.enum(["base", "originalPropertyNames"]).optional().describe("How schema property names are converted into TypeScript identifiers."),
|
|
1875
|
+
bundle: zod.z.boolean().optional().describe("Whether the generated package includes bundled output."),
|
|
1876
|
+
exportClassDefault: zod.z.boolean().optional().describe("Whether the client class is also exported as the default export."),
|
|
1839
1877
|
/** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
|
|
1840
|
-
namespaceExportName: nonEmptyStringSchema.optional(),
|
|
1841
|
-
consolidateTypeFiles: zod.z.boolean().optional(),
|
|
1842
|
-
allowCustomFetcher: zod.z.boolean().optional(),
|
|
1843
|
-
useBrandedStringAliases: zod.z.boolean().optional(),
|
|
1844
|
-
useLegacyExports: zod.z.boolean().optional(),
|
|
1845
|
-
useBigInt: zod.z.boolean().optional(),
|
|
1846
|
-
serdeLayer: zod.z.boolean().optional(),
|
|
1878
|
+
namespaceExportName: nonEmptyStringSchema.optional().describe("The top-level namespace export name."),
|
|
1879
|
+
consolidateTypeFiles: zod.z.boolean().optional().describe("Whether generated types are consolidated into fewer source files."),
|
|
1880
|
+
allowCustomFetcher: zod.z.boolean().optional().describe("Whether callers can supply a custom fetch implementation."),
|
|
1881
|
+
useBrandedStringAliases: zod.z.boolean().optional().describe("Whether string aliases are emitted as distinct branded types."),
|
|
1882
|
+
useLegacyExports: zod.z.boolean().optional().describe("Whether the package emits the legacy export layout."),
|
|
1883
|
+
useBigInt: zod.z.boolean().optional().describe("Whether 64-bit integer values are represented with bigint."),
|
|
1884
|
+
serdeLayer: zod.z.boolean().optional().describe("Whether generated models use Fern serialization and deserialization helpers."),
|
|
1847
1885
|
/** Ship only the ESM build (drops CJS) to avoid the Node dual-package hazard. */
|
|
1848
|
-
esmOnly: zod.z.boolean().optional(),
|
|
1849
|
-
scripts: zod.z.array(packageScriptSchema).optional()
|
|
1886
|
+
esmOnly: zod.z.boolean().optional().describe("Whether the package emits only ECMAScript modules."),
|
|
1887
|
+
scripts: zod.z.array(packageScriptSchema).optional().describe("Additional scripts added to the generated package manifest.")
|
|
1850
1888
|
});
|
|
1851
1889
|
|
|
1852
1890
|
// src/sdk-config-domain/v1/language/mcp.ts
|
|
@@ -1861,172 +1899,183 @@ var mcpAvailabilityStatuses = [
|
|
|
1861
1899
|
"LEGACY"
|
|
1862
1900
|
];
|
|
1863
1901
|
var mcpToolFilterSchema = zod.z.strictObject({
|
|
1864
|
-
include: zod.z.array(nonEmptyStringSchema).optional(),
|
|
1865
|
-
exclude: zod.z.array(nonEmptyStringSchema).optional()
|
|
1902
|
+
include: zod.z.array(nonEmptyStringSchema).optional().describe("Operations explicitly included as MCP tools."),
|
|
1903
|
+
exclude: zod.z.array(nonEmptyStringSchema).optional().describe("Operations explicitly excluded from MCP tools.")
|
|
1866
1904
|
});
|
|
1867
1905
|
var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
|
|
1868
1906
|
(name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
|
|
1869
1907
|
'toolset names must match [a-z0-9-]+ and cannot be "default"'
|
|
1870
1908
|
);
|
|
1871
1909
|
var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
|
|
1872
|
-
serverName: nonEmptyStringSchema.optional(),
|
|
1873
|
-
serverDescription: nonEmptyStringSchema.optional(),
|
|
1874
|
-
excludeAvailability: zod.z.array(zod.z.enum(mcpAvailabilityStatuses)).optional(),
|
|
1875
|
-
tools: mcpToolFilterSchema.optional(),
|
|
1876
|
-
toolsets: zod.z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional()
|
|
1910
|
+
serverName: nonEmptyStringSchema.optional().describe("The name advertised by the generated MCP server."),
|
|
1911
|
+
serverDescription: nonEmptyStringSchema.optional().describe("The description advertised by the generated MCP server."),
|
|
1912
|
+
excludeAvailability: zod.z.array(zod.z.enum(mcpAvailabilityStatuses)).optional().describe("Operation availability statuses excluded from MCP tool generation."),
|
|
1913
|
+
tools: mcpToolFilterSchema.optional().describe("Global operation filters for generated MCP tools."),
|
|
1914
|
+
toolsets: zod.z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional().describe("Named MCP toolsets and the operation filters for each toolset.")
|
|
1877
1915
|
});
|
|
1878
1916
|
var phpGenerationConfigSchema = zod.z.strictObject({
|
|
1879
|
-
propertyAccess: zod.z.enum(["public", "private"]).optional(),
|
|
1880
|
-
generateClientInterfaces: zod.z.boolean().optional()
|
|
1917
|
+
propertyAccess: zod.z.enum(["public", "private"]).optional().describe("The visibility of generated PHP model properties."),
|
|
1918
|
+
generateClientInterfaces: zod.z.boolean().optional().describe("Whether interfaces are generated for PHP client classes.")
|
|
1881
1919
|
});
|
|
1882
1920
|
var pythonClientSchema = zod.z.strictObject({
|
|
1883
|
-
fileName: nonEmptyStringSchema.optional(),
|
|
1884
|
-
exportedFileName: nonEmptyStringSchema.optional()
|
|
1921
|
+
fileName: nonEmptyStringSchema.optional().describe("The source file name for the Python client."),
|
|
1922
|
+
exportedFileName: nonEmptyStringSchema.optional().describe("The file name used when exporting the Python client.")
|
|
1885
1923
|
});
|
|
1886
1924
|
var pydanticConfigSchema = zod.z.strictObject({
|
|
1887
|
-
versionCompatibility: zod.z.enum(["v1", "v2", "both", "v1-on-v2"]).optional(),
|
|
1888
|
-
frozen: zod.z.boolean().optional(),
|
|
1889
|
-
requireOptionalFields: zod.z.boolean().optional(),
|
|
1890
|
-
unionNaming: zod.z.enum(["v0", "v1"]).optional(),
|
|
1891
|
-
useFieldAliases: zod.z.boolean().optional()
|
|
1925
|
+
versionCompatibility: zod.z.enum(["v1", "v2", "both", "v1-on-v2"]).optional().describe("The Pydantic major versions supported by generated models."),
|
|
1926
|
+
frozen: zod.z.boolean().optional().describe("Whether generated Pydantic models are immutable."),
|
|
1927
|
+
requireOptionalFields: zod.z.boolean().optional().describe("Whether Optional fields remain required unless they declare a default."),
|
|
1928
|
+
unionNaming: zod.z.enum(["v0", "v1"]).optional().describe("The naming strategy for generated union types."),
|
|
1929
|
+
useFieldAliases: zod.z.boolean().optional().describe("Whether Pydantic field aliases preserve wire names.")
|
|
1892
1930
|
});
|
|
1893
1931
|
var additionalInitExportSchema = zod.z.strictObject({
|
|
1894
|
-
from: nonEmptyStringSchema,
|
|
1895
|
-
imports: zod.z.array(nonEmptyStringSchema).min(1)
|
|
1932
|
+
from: nonEmptyStringSchema.describe("The module from which names are re-exported."),
|
|
1933
|
+
imports: zod.z.array(nonEmptyStringSchema).min(1).describe("Names re-exported from the module.")
|
|
1896
1934
|
});
|
|
1897
1935
|
var pythonGenerationConfigSchema = zod.z.strictObject({
|
|
1898
|
-
pythonVersion: nonEmptyStringSchema.optional(),
|
|
1899
|
-
pydanticVersion: nonEmptyStringSchema.optional(),
|
|
1900
|
-
pydantic: pydanticConfigSchema.optional(),
|
|
1901
|
-
client: pythonClientSchema.optional(),
|
|
1936
|
+
pythonVersion: nonEmptyStringSchema.optional().describe("The Python version targeted by the generated project."),
|
|
1937
|
+
pydanticVersion: nonEmptyStringSchema.optional().describe("The Pydantic dependency version requirement."),
|
|
1938
|
+
pydantic: pydanticConfigSchema.optional().describe("Pydantic model-generation behavior."),
|
|
1939
|
+
client: pythonClientSchema.optional().describe("Python client file naming."),
|
|
1902
1940
|
/** Default followed by generated sync and async HTTP clients when the caller does not override it. */
|
|
1903
|
-
followRedirectsByDefault: zod.z.boolean().optional(),
|
|
1941
|
+
followRedirectsByDefault: zod.z.boolean().optional().describe("Whether generated HTTP clients follow redirects by default."),
|
|
1904
1942
|
/** Chunk size passed to Python byte-stream iterators. */
|
|
1905
|
-
defaultBytesStreamChunkSize: zod.z.number().int().positive().optional(),
|
|
1943
|
+
defaultBytesStreamChunkSize: zod.z.number().int().positive().optional().describe("The default byte-stream iterator chunk size."),
|
|
1906
1944
|
/** Python interpreter recursion limit installed by the generated package at import time. */
|
|
1907
|
-
recursionLimit: zod.z.number().int().gt(1e3).optional(),
|
|
1945
|
+
recursionLimit: zod.z.number().int().gt(1e3).optional().describe("The Python recursion limit installed when the generated package is imported."),
|
|
1908
1946
|
/** Published Python extras, keyed by extra name with package dependency names as values. */
|
|
1909
|
-
extras: zod.z.record(nonEmptyStringSchema, zod.z.array(nonEmptyStringSchema)).optional(),
|
|
1910
|
-
alwaysInitializeOptionals: zod.z.boolean().optional(),
|
|
1911
|
-
useTypedDictRequests: zod.z.boolean().optional(),
|
|
1912
|
-
additionalInitExports: zod.z.array(additionalInitExportSchema).optional()
|
|
1947
|
+
extras: zod.z.record(nonEmptyStringSchema, zod.z.array(nonEmptyStringSchema)).optional().describe("Published Python extras and their dependency names."),
|
|
1948
|
+
alwaysInitializeOptionals: zod.z.boolean().optional().describe("Whether optional model fields are initialized even when omitted."),
|
|
1949
|
+
useTypedDictRequests: zod.z.boolean().optional().describe("Whether request bodies are generated as TypedDict types."),
|
|
1950
|
+
additionalInitExports: zod.z.array(additionalInitExportSchema).optional().describe("Additional names re-exported from the package initializer.")
|
|
1913
1951
|
});
|
|
1914
1952
|
var rubyGenerationConfigSchema = zod.z.strictObject({
|
|
1915
|
-
requirePaths: zod.z.array(nonEmptyStringSchema).optional()
|
|
1953
|
+
requirePaths: zod.z.array(nonEmptyStringSchema).optional().describe("Ruby load paths included in the generated gem specification.")
|
|
1916
1954
|
});
|
|
1917
1955
|
var rustGenerationConfigSchema = zod.z.strictObject({
|
|
1918
1956
|
/**
|
|
1919
1957
|
* Rust type for datetime primitives. `offset` maps to `DateTime<FixedOffset>` and preserves the
|
|
1920
1958
|
* timezone the payload carried; `utc` maps to `DateTime<Utc>` and normalizes to UTC.
|
|
1921
1959
|
*/
|
|
1922
|
-
dateTimeType: zod.z.enum(["offset", "utc"]).optional(),
|
|
1960
|
+
dateTimeType: zod.z.enum(["offset", "utc"]).optional().describe("Whether datetime values preserve their offset or normalize to UTC."),
|
|
1923
1961
|
/** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
|
|
1924
|
-
capitalizeInitialisms: zod.z.boolean().optional(),
|
|
1962
|
+
capitalizeInitialisms: zod.z.boolean().optional().describe("Whether generated Rust names capitalize common initialisms."),
|
|
1925
1963
|
/** Cargo features, mapping a feature name to the dependencies or features it enables. */
|
|
1926
|
-
features: zod.z.record(zod.z.string(), zod.z.array(nonEmptyStringSchema)).optional(),
|
|
1964
|
+
features: zod.z.record(zod.z.string(), zod.z.array(nonEmptyStringSchema)).optional().describe("Cargo features and the dependencies or features each enables."),
|
|
1927
1965
|
/** Overrides which features make up Cargo's `default` feature set. */
|
|
1928
|
-
defaultFeatures: zod.z.array(nonEmptyStringSchema).optional()
|
|
1966
|
+
defaultFeatures: zod.z.array(nonEmptyStringSchema).optional().describe("Cargo features included in the crate default feature set.")
|
|
1929
1967
|
});
|
|
1930
1968
|
var swiftGenerationConfigSchema = zod.z.strictObject({
|
|
1931
|
-
moduleName: nonEmptyStringSchema.optional(),
|
|
1932
|
-
nullableAsOptional: zod.z.boolean().optional()
|
|
1969
|
+
moduleName: nonEmptyStringSchema.optional().describe("The Swift module name for the generated package."),
|
|
1970
|
+
nullableAsOptional: zod.z.boolean().optional().describe("Whether nullable values are represented as Swift optionals.")
|
|
1933
1971
|
});
|
|
1934
1972
|
var planModifierSourceSchema = zod.z.discriminatedUnion("enabled", [
|
|
1935
|
-
zod.z.strictObject({
|
|
1936
|
-
|
|
1973
|
+
zod.z.strictObject({
|
|
1974
|
+
enabled: zod.z.literal(true).describe("Enables custom Terraform plan modifiers."),
|
|
1975
|
+
sourceDir: nonEmptyStringSchema.describe(
|
|
1976
|
+
"The directory containing custom plan modifier source files."
|
|
1977
|
+
)
|
|
1978
|
+
}),
|
|
1979
|
+
zod.z.strictObject({
|
|
1980
|
+
enabled: zod.z.literal(false).describe("Disables custom Terraform plan modifiers.")
|
|
1981
|
+
})
|
|
1937
1982
|
]);
|
|
1938
1983
|
var planModifiersSchema = zod.z.strictObject({
|
|
1939
|
-
resources: planModifierSourceSchema,
|
|
1940
|
-
attributes: planModifierSourceSchema
|
|
1984
|
+
resources: planModifierSourceSchema.describe("Custom plan modifiers for generated resources."),
|
|
1985
|
+
attributes: planModifierSourceSchema.describe("Custom plan modifiers for generated attributes.")
|
|
1941
1986
|
});
|
|
1942
1987
|
var providerSchemaSchema = zod.z.strictObject({
|
|
1943
|
-
addressKey: nonEmptyStringSchema
|
|
1944
|
-
|
|
1988
|
+
addressKey: nonEmptyStringSchema.describe(
|
|
1989
|
+
"The provider attribute used to configure the API address."
|
|
1990
|
+
),
|
|
1991
|
+
authTokenKey: nonEmptyStringSchema.describe(
|
|
1992
|
+
"The provider attribute used to configure the authentication token."
|
|
1993
|
+
)
|
|
1945
1994
|
});
|
|
1946
1995
|
var terraformGenerationConfigSchema = zod.z.strictObject({
|
|
1947
|
-
providerName: nonEmptyStringSchema.optional(),
|
|
1948
|
-
providerVersion: nonEmptyStringSchema.optional(),
|
|
1949
|
-
providerModulePath: goModulePathSchema.optional(),
|
|
1950
|
-
mockAcceptance: zod.z.boolean().optional(),
|
|
1951
|
-
hideComputedDiff: zod.z.boolean().optional(),
|
|
1952
|
-
providerSchema: providerSchemaSchema.optional(),
|
|
1953
|
-
planModifiers: planModifiersSchema.optional()
|
|
1996
|
+
providerName: nonEmptyStringSchema.optional().describe("The Terraform provider name."),
|
|
1997
|
+
providerVersion: nonEmptyStringSchema.optional().describe("The generated Terraform provider version."),
|
|
1998
|
+
providerModulePath: goModulePathSchema.optional().describe("The Go module path for the generated provider."),
|
|
1999
|
+
mockAcceptance: zod.z.boolean().optional().describe("Whether acceptance tests use a mock API server."),
|
|
2000
|
+
hideComputedDiff: zod.z.boolean().optional().describe("Whether computed-only changes are hidden from Terraform plans."),
|
|
2001
|
+
providerSchema: providerSchemaSchema.optional().describe("Names of provider-level configuration attributes."),
|
|
2002
|
+
planModifiers: planModifiersSchema.optional().describe("Custom plan modifier source configuration.")
|
|
1954
2003
|
});
|
|
1955
2004
|
|
|
1956
2005
|
// src/sdk-config/v1/target.ts
|
|
1957
2006
|
var targetOverrideShape = {
|
|
1958
|
-
generatorVersion: exactSemverSchema.optional(),
|
|
1959
|
-
sdkName: nonEmptyStringSchema.optional(),
|
|
1960
|
-
sdkVersion: nonEmptyStringSchema.optional(),
|
|
1961
|
-
client: sdkConfigV1ClientConfigOverrideSchema.optional(),
|
|
1962
|
-
docs: sdkConfigV1DocsConfigSchema.optional(),
|
|
1963
|
-
package: sdkConfigV1PackageConfigSchema.optional(),
|
|
1964
|
-
output: sdkConfigV1OutputConfigSchema.optional()
|
|
2007
|
+
generatorVersion: exactSemverSchema.optional().describe("The exact generator version used for this target."),
|
|
2008
|
+
sdkName: nonEmptyStringSchema.optional().describe("An SDK name that overrides the root value for this target."),
|
|
2009
|
+
sdkVersion: nonEmptyStringSchema.optional().describe("An SDK version that overrides the root value for this target."),
|
|
2010
|
+
client: sdkConfigV1ClientConfigOverrideSchema.optional().describe("Client settings that override root client configuration for this target."),
|
|
2011
|
+
docs: sdkConfigV1DocsConfigSchema.optional().describe("Documentation settings that override root documentation for this target."),
|
|
2012
|
+
package: sdkConfigV1PackageConfigSchema.optional().describe("Package metadata that overrides root package configuration for this target."),
|
|
2013
|
+
output: sdkConfigV1OutputConfigSchema.optional().describe("Output configuration that replaces the root output for this target.")
|
|
1965
2014
|
};
|
|
1966
2015
|
var sdkConfigV1TargetSchema = zod.z.discriminatedUnion("language", [
|
|
1967
2016
|
zod.z.strictObject({
|
|
1968
|
-
language: zod.z.literal("typescript"),
|
|
1969
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(typescriptGenerationConfigSchema.shape).optional(),
|
|
2017
|
+
language: zod.z.literal("typescript").describe("Generates a TypeScript SDK."),
|
|
2018
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(typescriptGenerationConfigSchema.shape).optional().describe("Common and TypeScript-specific generation settings for this target."),
|
|
1970
2019
|
...targetOverrideShape
|
|
1971
2020
|
}),
|
|
1972
2021
|
zod.z.strictObject({
|
|
1973
|
-
language: zod.z.literal("python"),
|
|
1974
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(pythonGenerationConfigSchema.shape).optional(),
|
|
2022
|
+
language: zod.z.literal("python").describe("Generates a Python SDK."),
|
|
2023
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(pythonGenerationConfigSchema.shape).optional().describe("Common and Python-specific generation settings for this target."),
|
|
1975
2024
|
...targetOverrideShape
|
|
1976
2025
|
}),
|
|
1977
2026
|
zod.z.strictObject({
|
|
1978
|
-
language: zod.z.literal("java"),
|
|
1979
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(javaGenerationConfigSchema.shape).optional(),
|
|
2027
|
+
language: zod.z.literal("java").describe("Generates a Java SDK."),
|
|
2028
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(javaGenerationConfigSchema.shape).optional().describe("Common and Java-specific generation settings for this target."),
|
|
1980
2029
|
...targetOverrideShape
|
|
1981
2030
|
}),
|
|
1982
2031
|
zod.z.strictObject({
|
|
1983
|
-
language: zod.z.literal("kotlin"),
|
|
1984
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(kotlinGenerationConfigSchema.shape).optional(),
|
|
2032
|
+
language: zod.z.literal("kotlin").describe("Generates a Kotlin SDK."),
|
|
2033
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(kotlinGenerationConfigSchema.shape).optional().describe("Common and Kotlin-specific generation settings for this target."),
|
|
1985
2034
|
...targetOverrideShape
|
|
1986
2035
|
}),
|
|
1987
2036
|
zod.z.strictObject({
|
|
1988
|
-
language: zod.z.literal("go"),
|
|
1989
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(goGenerationConfigSchema.shape).optional(),
|
|
2037
|
+
language: zod.z.literal("go").describe("Generates a Go SDK."),
|
|
2038
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(goGenerationConfigSchema.shape).optional().describe("Common and Go-specific generation settings for this target."),
|
|
1990
2039
|
...targetOverrideShape
|
|
1991
2040
|
}),
|
|
1992
2041
|
zod.z.strictObject({
|
|
1993
|
-
language: zod.z.literal("csharp"),
|
|
1994
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(csharpGenerationConfigSchema.shape).optional(),
|
|
2042
|
+
language: zod.z.literal("csharp").describe("Generates a C# SDK."),
|
|
2043
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(csharpGenerationConfigSchema.shape).optional().describe("Common and C#-specific generation settings for this target."),
|
|
1995
2044
|
...targetOverrideShape
|
|
1996
2045
|
}),
|
|
1997
2046
|
zod.z.strictObject({
|
|
1998
|
-
language: zod.z.literal("php"),
|
|
1999
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(phpGenerationConfigSchema.shape).optional(),
|
|
2047
|
+
language: zod.z.literal("php").describe("Generates a PHP SDK."),
|
|
2048
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(phpGenerationConfigSchema.shape).optional().describe("Common and PHP-specific generation settings for this target."),
|
|
2000
2049
|
...targetOverrideShape
|
|
2001
2050
|
}),
|
|
2002
2051
|
zod.z.strictObject({
|
|
2003
|
-
language: zod.z.literal("ruby"),
|
|
2004
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rubyGenerationConfigSchema.shape).optional(),
|
|
2052
|
+
language: zod.z.literal("ruby").describe("Generates a Ruby SDK."),
|
|
2053
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rubyGenerationConfigSchema.shape).optional().describe("Common and Ruby-specific generation settings for this target."),
|
|
2005
2054
|
...targetOverrideShape
|
|
2006
2055
|
}),
|
|
2007
2056
|
zod.z.strictObject({
|
|
2008
|
-
language: zod.z.literal("rust"),
|
|
2009
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rustGenerationConfigSchema.shape).optional(),
|
|
2057
|
+
language: zod.z.literal("rust").describe("Generates a Rust SDK."),
|
|
2058
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rustGenerationConfigSchema.shape).optional().describe("Common and Rust-specific generation settings for this target."),
|
|
2010
2059
|
...targetOverrideShape
|
|
2011
2060
|
}),
|
|
2012
2061
|
zod.z.strictObject({
|
|
2013
|
-
language: zod.z.literal("swift"),
|
|
2014
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(swiftGenerationConfigSchema.shape).optional(),
|
|
2062
|
+
language: zod.z.literal("swift").describe("Generates a Swift SDK."),
|
|
2063
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(swiftGenerationConfigSchema.shape).optional().describe("Common and Swift-specific generation settings for this target."),
|
|
2015
2064
|
...targetOverrideShape
|
|
2016
2065
|
}),
|
|
2017
2066
|
zod.z.strictObject({
|
|
2018
|
-
language: zod.z.literal("cli"),
|
|
2019
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(cliGenerationConfigSchema.shape).optional(),
|
|
2067
|
+
language: zod.z.literal("cli").describe("Generates a command-line interface."),
|
|
2068
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(cliGenerationConfigSchema.shape).optional().describe("Common and CLI-specific generation settings for this target."),
|
|
2020
2069
|
...targetOverrideShape
|
|
2021
2070
|
}),
|
|
2022
2071
|
zod.z.strictObject({
|
|
2023
|
-
language: zod.z.literal("mcp"),
|
|
2024
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(mcpGenerationConfigSchema.shape).optional(),
|
|
2072
|
+
language: zod.z.literal("mcp").describe("Generates an MCP server."),
|
|
2073
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(mcpGenerationConfigSchema.shape).optional().describe("Common and MCP-specific generation settings for this target."),
|
|
2025
2074
|
...targetOverrideShape
|
|
2026
2075
|
}),
|
|
2027
2076
|
zod.z.strictObject({
|
|
2028
|
-
language: zod.z.literal("terraform"),
|
|
2029
|
-
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(terraformGenerationConfigSchema.shape).optional(),
|
|
2077
|
+
language: zod.z.literal("terraform").describe("Generates a Terraform provider."),
|
|
2078
|
+
generation: sdkConfigV1GenerationConfigOverrideSchema.extend(terraformGenerationConfigSchema.shape).optional().describe("Common and Terraform-specific generation settings for this target."),
|
|
2030
2079
|
...targetOverrideShape
|
|
2031
2080
|
})
|
|
2032
2081
|
]);
|
|
@@ -2119,19 +2168,21 @@ function validateTargetPublishing(target, targetIndex, globalPackage, globalOutp
|
|
|
2119
2168
|
);
|
|
2120
2169
|
}
|
|
2121
2170
|
var sdkConfigV1Schema = zod.z.strictObject({
|
|
2122
|
-
schemaVersion: zod.z.literal(SDK_CONFIG_V1_SCHEMA_VERSION),
|
|
2123
|
-
sdkName: nonEmptyStringSchema,
|
|
2124
|
-
sdkVersion: nonEmptyStringSchema.default("1.0.0"),
|
|
2125
|
-
apiVersion: nonEmptyStringSchema.optional(),
|
|
2126
|
-
source: sdkConfigV1SourceConfigSchema
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2171
|
+
schemaVersion: zod.z.literal(SDK_CONFIG_V1_SCHEMA_VERSION).describe("The version of the customer-facing SDK Config schema."),
|
|
2172
|
+
sdkName: nonEmptyStringSchema.describe("The default name used for generated SDKs."),
|
|
2173
|
+
sdkVersion: nonEmptyStringSchema.default("1.0.0").describe("The default version assigned to generated SDKs."),
|
|
2174
|
+
apiVersion: nonEmptyStringSchema.optional().describe("The version of the API represented by the generated SDKs."),
|
|
2175
|
+
source: sdkConfigV1SourceConfigSchema.describe(
|
|
2176
|
+
"The API descriptions used to generate the SDKs."
|
|
2177
|
+
),
|
|
2178
|
+
api: sdkConfigV1ApiConfigSchema.prefault({}).describe("Shared API behavior for every target."),
|
|
2179
|
+
client: sdkConfigV1ClientConfigSchema.prefault({}).describe("Shared generated-client behavior for every target."),
|
|
2180
|
+
package: sdkConfigV1PackageConfigSchema.prefault({}).describe("Package metadata inherited by every target."),
|
|
2181
|
+
output: sdkConfigV1OutputConfigSchema.optional().describe("The default output delivery and publication configuration."),
|
|
2182
|
+
replay: sdkConfigV1ReplayConfigSchema.optional().describe("Generation replay behavior shared by every target."),
|
|
2183
|
+
docs: sdkConfigV1DocsConfigSchema.prefault({}).describe("Documentation settings inherited by every target."),
|
|
2184
|
+
generation: sdkConfigV1GenerationConfigSchema.prefault({}).describe("Generation settings inherited by every target."),
|
|
2185
|
+
targets: zod.z.array(sdkConfigV1TargetSchema).min(1).describe("Language targets to generate; each language may appear once.")
|
|
2135
2186
|
}).superRefine(({ output, package: globalPackage, targets }, context) => {
|
|
2136
2187
|
const configuredLanguages = /* @__PURE__ */ new Set();
|
|
2137
2188
|
targets.forEach((target, targetIndex) => {
|
|
@@ -2393,6 +2444,14 @@ function mapInvocation(generator, language, activeLanguages, index) {
|
|
|
2393
2444
|
...prefix,
|
|
2394
2445
|
"config"
|
|
2395
2446
|
]);
|
|
2447
|
+
const apiWideIdempotency = idempotencyKeyGenerationFrom(
|
|
2448
|
+
generator.idempotencyKeyGenerationConfig,
|
|
2449
|
+
[...prefix, "idempotencyKeyGenerationConfig"],
|
|
2450
|
+
state
|
|
2451
|
+
);
|
|
2452
|
+
if (apiWideIdempotency && client.idempotencyKeyGeneration === void 0) {
|
|
2453
|
+
client.idempotencyKeyGeneration = apiWideIdempotency;
|
|
2454
|
+
}
|
|
2396
2455
|
const rawGenerator = isObject(generator.raw) ? generator.raw : void 0;
|
|
2397
2456
|
const smartCasing = typeof rawGenerator?.["smart-casing"] === "boolean" ? rawGenerator["smart-casing"] : generator.smartCasing === false ? false : void 0;
|
|
2398
2457
|
const smartCasingDigitWordBoundary = typeof rawGenerator?.["smart-casing-digit-word-boundary"] === "boolean" ? rawGenerator["smart-casing-digit-word-boundary"] : generator.smartCasingDigitWordBoundary === true ? true : void 0;
|
|
@@ -2411,9 +2470,6 @@ function mapInvocation(generator, language, activeLanguages, index) {
|
|
|
2411
2470
|
if (generator.keywords?.length) {
|
|
2412
2471
|
generation.reservedKeywords = [...generator.keywords];
|
|
2413
2472
|
}
|
|
2414
|
-
if (generator.generateFullProject !== void 0) {
|
|
2415
|
-
generation.generateFullProject = generator.generateFullProject;
|
|
2416
|
-
}
|
|
2417
2473
|
const settings = isObject(generator.settings) ? generator.settings : void 0;
|
|
2418
2474
|
if (settings) {
|
|
2419
2475
|
const inlinePathParameters = takeBoolean(settings, ["inlinePathParameters"], state, [
|
|
@@ -2429,21 +2485,25 @@ function mapInvocation(generator, language, activeLanguages, index) {
|
|
|
2429
2485
|
...collectUnsupported(config, [...prefix, "config"], state),
|
|
2430
2486
|
...settings ? collectUnsupported(settings, [...prefix, "settings"], state) : [],
|
|
2431
2487
|
...isObject(generator.readme) ? collectUnsupported(generator.readme, [...prefix, "readme"], state) : [],
|
|
2432
|
-
...unsupportedResolvedFields(generator, index)
|
|
2488
|
+
...unsupportedResolvedFields(generator, index, apiWideIdempotency !== void 0)
|
|
2433
2489
|
];
|
|
2434
2490
|
return { client, docs, generation, package: packageConfig, targetGeneration, unsupportedFields };
|
|
2435
2491
|
}
|
|
2436
|
-
function unsupportedResolvedFields(generator, index) {
|
|
2492
|
+
function unsupportedResolvedFields(generator, index, idempotencyMapped) {
|
|
2437
2493
|
const values = [
|
|
2438
2494
|
["automation", isDefaultAutomation(generator.automation) ? void 0 : generator.automation],
|
|
2439
2495
|
["containerImage", generator.containerImage],
|
|
2440
2496
|
["irVersionOverride", generator.irVersionOverride],
|
|
2441
|
-
[
|
|
2497
|
+
[
|
|
2498
|
+
"idempotencyKeyGenerationConfig",
|
|
2499
|
+
idempotencyMapped ? void 0 : generator.idempotencyKeyGenerationConfig
|
|
2500
|
+
],
|
|
2442
2501
|
["absolutePathToLocalSnippets", generator.absolutePathToLocalSnippets],
|
|
2443
2502
|
[
|
|
2444
2503
|
"disableExamples",
|
|
2445
2504
|
generator.disableExamples === false ? void 0 : generator.disableExamples
|
|
2446
2505
|
],
|
|
2506
|
+
["generateFullProject", generator.generateFullProject],
|
|
2447
2507
|
["apiOverride", generator.apiOverride]
|
|
2448
2508
|
];
|
|
2449
2509
|
return values.flatMap(([field, value]) => {
|
|
@@ -2470,7 +2530,13 @@ function resolvedFieldGuidance(field) {
|
|
|
2470
2530
|
}
|
|
2471
2531
|
if (field === "idempotencyKeyGenerationConfig") {
|
|
2472
2532
|
return {
|
|
2473
|
-
|
|
2533
|
+
sdkConfigPath: ["client", "idempotencyKeyGeneration"],
|
|
2534
|
+
suggestedAction: "Use true, false, or an object with header-name and methods, or set client.idempotencyKeyGeneration manually."
|
|
2535
|
+
};
|
|
2536
|
+
}
|
|
2537
|
+
if (field === "generateFullProject") {
|
|
2538
|
+
return {
|
|
2539
|
+
suggestedAction: "Preserve this packaging setting on the generation request; it is not customer-authored SDK configuration."
|
|
2474
2540
|
};
|
|
2475
2541
|
}
|
|
2476
2542
|
return {
|
|
@@ -2480,6 +2546,20 @@ function resolvedFieldGuidance(field) {
|
|
|
2480
2546
|
function isDefaultAutomation(value) {
|
|
2481
2547
|
return isObject(value) && value.generate === true && value.upgrade === true && value.preview === true && value.verify === true;
|
|
2482
2548
|
}
|
|
2549
|
+
var HTTP_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"];
|
|
2550
|
+
function idempotencyKeyGenerationFrom(value, path, state) {
|
|
2551
|
+
if (typeof value === "boolean") {
|
|
2552
|
+
consume(state, path);
|
|
2553
|
+
return { enabled: value };
|
|
2554
|
+
}
|
|
2555
|
+
if (!isObject(value)) return void 0;
|
|
2556
|
+
const probe = { consumedPaths: /* @__PURE__ */ new Set() };
|
|
2557
|
+
const headerName = takeString(value, ["headerName"], probe, path);
|
|
2558
|
+
const methods = takeEnumArray(value, ["methods"], HTTP_METHODS, probe, path);
|
|
2559
|
+
if (probe.consumedPaths.size !== Object.keys(value).length) return void 0;
|
|
2560
|
+
consume(state, path);
|
|
2561
|
+
return { enabled: true, ...optional("headerName", headerName), ...optional("methods", methods) };
|
|
2562
|
+
}
|
|
2483
2563
|
function mapCommonConfig(language, config, state, client, generation, packageConfig, basePath) {
|
|
2484
2564
|
const inlinePath = takeBoolean(config, ["inlinePathParameters"], state, basePath);
|
|
2485
2565
|
const inlineFile = takeBoolean(config, ["inlineFileProperties"], state, basePath);
|
|
@@ -2504,6 +2584,23 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
|
|
|
2504
2584
|
if (useDefaults !== void 0) client.useDefaultRequestParameterValues = useDefaults;
|
|
2505
2585
|
const respectOptionalBody = takeBoolean(config, ["respectOptionalRequestBody"], state, basePath);
|
|
2506
2586
|
if (respectOptionalBody !== void 0) client.respectOptionalRequestBody = respectOptionalBody;
|
|
2587
|
+
const idempotency = locate(config, ["autoGenerateIdempotencyKey"], basePath);
|
|
2588
|
+
const idempotencyKeyGeneration = idempotency && idempotencyKeyGenerationFrom(idempotency.value, idempotency.path, state);
|
|
2589
|
+
if (idempotencyKeyGeneration) client.idempotencyKeyGeneration = idempotencyKeyGeneration;
|
|
2590
|
+
const userAgent = compact({
|
|
2591
|
+
template: takeString(config, ["userAgent"], state, basePath),
|
|
2592
|
+
includePlatformInfo: takeBoolean(config, ["includePlatformHeaders"], state, basePath),
|
|
2593
|
+
allowAppInfo: takeBoolean(config, ["allowUserAgentAppInfo"], state, basePath)
|
|
2594
|
+
});
|
|
2595
|
+
if (Object.keys(userAgent).length) client.userAgent = userAgent;
|
|
2596
|
+
const offsetSemantics = takeEnum(
|
|
2597
|
+
config,
|
|
2598
|
+
["offsetSemantics"],
|
|
2599
|
+
["item-index", "page-index"],
|
|
2600
|
+
state,
|
|
2601
|
+
basePath
|
|
2602
|
+
);
|
|
2603
|
+
if (offsetSemantics !== void 0) client.offsetSemantics = offsetSemantics;
|
|
2507
2604
|
const maxRetries = takeNumber(config, ["maxRetries"], state, basePath);
|
|
2508
2605
|
const statusCodeProfile = takeEnum(
|
|
2509
2606
|
config,
|
|
@@ -2521,7 +2618,10 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
|
|
|
2521
2618
|
const pythonClient = language === "python" ? takeObject(config, ["client"], state, basePath) : void 0;
|
|
2522
2619
|
const typescriptNaming = language === "typescript" || language === "mcp" ? takeObject(config, ["naming"], state, basePath) : void 0;
|
|
2523
2620
|
const directClientName = takeString(config, ["clientName", "clientClassName"], state, basePath);
|
|
2524
|
-
const nestedClientName = pythonClient ? takeString(pythonClient.value, ["className"], state, pythonClient.path) : typescriptNaming ? takeString(typescriptNaming.value, ["client"], state, typescriptNaming.path) :
|
|
2621
|
+
const nestedClientName = pythonClient ? takeString(pythonClient.value, ["className"], state, pythonClient.path) : typescriptNaming ? takeString(typescriptNaming.value, ["client"], state, typescriptNaming.path) : language === "ruby" ? (
|
|
2622
|
+
// Fern's Ruby generator renames the root client class (`Auth0::Management`) with it.
|
|
2623
|
+
takeString(config, ["clientModuleName"], state, basePath)
|
|
2624
|
+
) : void 0;
|
|
2525
2625
|
const directExportedClientName = takeString(
|
|
2526
2626
|
config,
|
|
2527
2627
|
["exportedClientName", "exportedClientClassName"],
|
|
@@ -2563,8 +2663,6 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
|
|
|
2563
2663
|
const streams = mapTypescriptStreams(config, state, basePath);
|
|
2564
2664
|
if (streams) generation.streams = streams;
|
|
2565
2665
|
}
|
|
2566
|
-
const generateFullProject = takeBoolean(config, ["generateFullProject"], state, basePath);
|
|
2567
|
-
if (generateFullProject !== void 0) generation.generateFullProject = generateFullProject;
|
|
2568
2666
|
const inlineTypes = takeBoolean(config, ["enableInlineTypes"], state, basePath);
|
|
2569
2667
|
const omitUndefined = takeBoolean(config, ["omitUndefined"], state, basePath);
|
|
2570
2668
|
const forwardEnums = takeBoolean(config, ["enableForwardCompatibleEnums"], state, basePath);
|
|
@@ -2794,6 +2892,8 @@ function mapComposerRequirements(manifest, state, packageConfig) {
|
|
|
2794
2892
|
function mapRuby(config, state, packageConfig, basePath) {
|
|
2795
2893
|
const moduleName = takeString(config, ["moduleName"], state, basePath);
|
|
2796
2894
|
if (moduleName !== void 0) packageConfig.moduleName = moduleName;
|
|
2895
|
+
const packageName = takeString(config, ["package-name"], state, basePath);
|
|
2896
|
+
if (packageName !== void 0) packageConfig.packageName = packageName;
|
|
2797
2897
|
return compact({ requirePaths: takeStringArray(config, ["requirePaths"], state, basePath) });
|
|
2798
2898
|
}
|
|
2799
2899
|
function mapRust(config, state, packageConfig, basePath) {
|
|
@@ -3100,71 +3200,90 @@ function takeToolsets(value, aliases, state, basePath) {
|
|
|
3100
3200
|
return Object.fromEntries(entries.filter((entry) => entry !== void 0));
|
|
3101
3201
|
}
|
|
3102
3202
|
var unsupportedFieldSchema = zod.z.strictObject({
|
|
3103
|
-
source: zod.z.enum(["fern", "postman", "sdk-config-ir"]),
|
|
3104
|
-
path: zod.z.array(zod.z.union([nonEmptyStringSchema, zod.z.number().int().nonnegative()])).min(1),
|
|
3105
|
-
code: nonEmptyStringSchema.optional(),
|
|
3106
|
-
reason: nonEmptyStringSchema
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3203
|
+
source: zod.z.enum(["fern", "postman", "sdk-config-ir"]).describe("The configuration surface containing the unsupported field."),
|
|
3204
|
+
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."),
|
|
3205
|
+
code: nonEmptyStringSchema.optional().describe("A stable diagnostic code for the unsupported field."),
|
|
3206
|
+
reason: nonEmptyStringSchema.describe(
|
|
3207
|
+
"Why the field could not be represented in normalized configuration."
|
|
3208
|
+
),
|
|
3209
|
+
severity: zod.z.enum(["error", "warning", "info"]).describe("The diagnostic severity."),
|
|
3210
|
+
risk: zod.z.enum(["high", "medium", "low"]).describe("The migration risk of omitting this field."),
|
|
3211
|
+
owner: nonEmptyStringSchema.describe("The component or team responsible for resolving the gap."),
|
|
3212
|
+
suggestedAction: nonEmptyStringSchema.describe(
|
|
3213
|
+
"Recommended action for preserving the intended behavior."
|
|
3214
|
+
)
|
|
3111
3215
|
});
|
|
3112
3216
|
var postmanLegacyInputSchema = zod.z.strictObject({
|
|
3113
|
-
kind: zod.z.literal("postman-build-parameters"),
|
|
3114
|
-
value: jsonObjectSchema
|
|
3217
|
+
kind: zod.z.literal("postman-build-parameters").describe("Identifies legacy Postman build parameters."),
|
|
3218
|
+
value: jsonObjectSchema.describe("A debugging copy of the original Postman build parameters.")
|
|
3115
3219
|
});
|
|
3116
3220
|
var fernLegacyInputSchema = zod.z.strictObject({
|
|
3117
|
-
kind: zod.z.literal("fern-generator-invocation"),
|
|
3118
|
-
value: jsonObjectSchema
|
|
3221
|
+
kind: zod.z.literal("fern-generator-invocation").describe("Identifies a legacy Fern generator invocation."),
|
|
3222
|
+
value: jsonObjectSchema.describe("A debugging copy of the original Fern generator invocation.")
|
|
3119
3223
|
});
|
|
3120
3224
|
var legacyInputSchema = zod.z.discriminatedUnion("kind", [
|
|
3121
3225
|
postmanLegacyInputSchema,
|
|
3122
3226
|
fernLegacyInputSchema
|
|
3123
3227
|
]);
|
|
3124
3228
|
var compatibilityConfigSchema = zod.z.strictObject({
|
|
3125
|
-
outputProfile: zod.z.enum(["converged", "postman-legacy", "fern-legacy"]),
|
|
3126
|
-
legacyInput: legacyInputSchema.optional(),
|
|
3127
|
-
unsupportedFields: zod.z.array(unsupportedFieldSchema).optional()
|
|
3229
|
+
outputProfile: zod.z.enum(["converged", "postman-legacy", "fern-legacy"]).describe("The output-default profile retained while legacy producers converge."),
|
|
3230
|
+
legacyInput: legacyInputSchema.optional().describe("Original producer input retained only for migration debugging."),
|
|
3231
|
+
unsupportedFields: zod.z.array(unsupportedFieldSchema).optional().describe("Legacy fields that could not be represented in normalized configuration.")
|
|
3128
3232
|
});
|
|
3129
3233
|
var generationAssetSchema = zod.z.discriminatedUnion("type", [
|
|
3130
|
-
zod.z.strictObject({
|
|
3131
|
-
|
|
3132
|
-
|
|
3234
|
+
zod.z.strictObject({
|
|
3235
|
+
type: zod.z.literal("path").describe("Loads the generation asset from a relative path."),
|
|
3236
|
+
location: relativePathSchema.describe("The relative path to the generation asset.")
|
|
3237
|
+
}),
|
|
3238
|
+
zod.z.strictObject({
|
|
3239
|
+
type: zod.z.literal("url").describe("Loads the generation asset from a URL."),
|
|
3240
|
+
location: nonEmptyStringSchema.describe("The URL of the generation asset.")
|
|
3241
|
+
}),
|
|
3242
|
+
zod.z.strictObject({
|
|
3243
|
+
type: zod.z.literal("artifact").describe("Loads the generation asset from stored build output."),
|
|
3244
|
+
location: nonEmptyStringSchema.describe("The artifact identifier or location.")
|
|
3245
|
+
})
|
|
3133
3246
|
]);
|
|
3134
|
-
var
|
|
3135
|
-
name: nonEmptyStringSchema,
|
|
3136
|
-
version: nonEmptyStringSchema,
|
|
3137
|
-
groupId: nonEmptyStringSchema.optional()
|
|
3247
|
+
var hookDependencySchema = zod.z.strictObject({
|
|
3248
|
+
name: nonEmptyStringSchema.describe("The hook dependency name."),
|
|
3249
|
+
version: nonEmptyStringSchema.describe("The hook dependency version requirement."),
|
|
3250
|
+
groupId: nonEmptyStringSchema.optional().describe("The Maven group identifier for the dependency.")
|
|
3138
3251
|
});
|
|
3139
|
-
var
|
|
3140
|
-
enabled: zod.z.boolean(),
|
|
3141
|
-
source: generationAssetSchema.optional(),
|
|
3142
|
-
dependencies: zod.z.array(
|
|
3252
|
+
var hooksConfigSchema = zod.z.strictObject({
|
|
3253
|
+
enabled: zod.z.boolean().describe("Whether custom request and response hooks are generated."),
|
|
3254
|
+
source: generationAssetSchema.optional().describe("The source containing custom hook implementations."),
|
|
3255
|
+
dependencies: zod.z.array(hookDependencySchema).optional().describe("Dependencies required by custom hooks.")
|
|
3143
3256
|
});
|
|
3144
3257
|
var customCodeConfigSchema2 = zod.z.strictObject({
|
|
3145
|
-
enabled: zod.z.boolean(),
|
|
3146
|
-
source: generationAssetSchema.optional(),
|
|
3147
|
-
conflictStrategy: zod.z.enum(["mark", "ours", "theirs"]).optional(),
|
|
3148
|
-
trackChanges: zod.z.boolean().optional(),
|
|
3149
|
-
previousBuildId: zod.z.number().int().positive().optional(),
|
|
3150
|
-
protectedFiles: zod.z.array(nonEmptyStringSchema).optional()
|
|
3258
|
+
enabled: zod.z.boolean().describe("Whether customer-authored code is merged into generated output."),
|
|
3259
|
+
source: generationAssetSchema.optional().describe("The source containing customer-authored code."),
|
|
3260
|
+
conflictStrategy: zod.z.enum(["mark", "ours", "theirs"]).optional().describe("How merge conflicts between generated and custom code are handled."),
|
|
3261
|
+
trackChanges: zod.z.boolean().optional().describe("Whether custom-code changes are tracked between builds."),
|
|
3262
|
+
previousBuildId: zod.z.number().int().positive().optional().describe("The previous build used as the merge baseline."),
|
|
3263
|
+
protectedFiles: zod.z.array(nonEmptyStringSchema).optional().describe("Generated file paths that custom-code merging must not overwrite.")
|
|
3151
3264
|
});
|
|
3152
|
-
var
|
|
3153
|
-
path: relativePathSchema,
|
|
3154
|
-
outputName: nonEmptyStringSchema.optional()
|
|
3265
|
+
var workflowConfigSchema = zod.z.strictObject({
|
|
3266
|
+
path: relativePathSchema.describe("The relative path to the workflow definition."),
|
|
3267
|
+
outputName: nonEmptyStringSchema.optional().describe("The file name used for the generated workflow.")
|
|
3155
3268
|
});
|
|
3156
3269
|
var analyticsHeaderSchema2 = zod.z.union([
|
|
3157
|
-
zod.z.strictObject({
|
|
3158
|
-
|
|
3270
|
+
zod.z.strictObject({
|
|
3271
|
+
name: nonEmptyStringSchema.describe("The exported telemetry header name."),
|
|
3272
|
+
value: zod.z.string().describe("The literal telemetry header value.")
|
|
3273
|
+
}),
|
|
3274
|
+
zod.z.strictObject({
|
|
3275
|
+
name: nonEmptyStringSchema.describe("The exported telemetry header name."),
|
|
3276
|
+
valueRef: nonEmptyStringSchema.describe("A reference to the telemetry header value.")
|
|
3277
|
+
})
|
|
3159
3278
|
]);
|
|
3160
3279
|
var analyticsConfigSchema2 = zod.z.strictObject({
|
|
3161
|
-
enabled: zod.z.boolean(),
|
|
3162
|
-
endpoint: nonEmptyStringSchema.optional(),
|
|
3163
|
-
exporter: zod.z.enum(["otlp-http", "console"]).optional(),
|
|
3164
|
-
headers: zod.z.array(analyticsHeaderSchema2).optional(),
|
|
3165
|
-
batchSize: zod.z.number().int().positive().optional(),
|
|
3166
|
-
scheduledDelayMs: zod.z.number().nonnegative().optional(),
|
|
3167
|
-
exportTimeoutMs: zod.z.number().nonnegative().optional()
|
|
3280
|
+
enabled: zod.z.boolean().describe("Whether generated clients export usage telemetry."),
|
|
3281
|
+
endpoint: nonEmptyStringSchema.optional().describe("The telemetry export endpoint."),
|
|
3282
|
+
exporter: zod.z.enum(["otlp-http", "console"]).optional().describe("The telemetry exporter implementation."),
|
|
3283
|
+
headers: zod.z.array(analyticsHeaderSchema2).optional().describe("Headers sent by the telemetry exporter."),
|
|
3284
|
+
batchSize: zod.z.number().int().positive().optional().describe("The maximum spans in each export batch."),
|
|
3285
|
+
scheduledDelayMs: zod.z.number().nonnegative().optional().describe("The delay between scheduled exports, in milliseconds."),
|
|
3286
|
+
exportTimeoutMs: zod.z.number().nonnegative().optional().describe("The maximum time allowed for an export, in milliseconds.")
|
|
3168
3287
|
}).superRefine(({ enabled, endpoint }, context) => {
|
|
3169
3288
|
if (enabled && endpoint === void 0) {
|
|
3170
3289
|
context.addIssue({
|
|
@@ -3175,91 +3294,93 @@ var analyticsConfigSchema2 = zod.z.strictObject({
|
|
|
3175
3294
|
}
|
|
3176
3295
|
});
|
|
3177
3296
|
var wireTestsSchema2 = zod.z.strictObject({
|
|
3178
|
-
enabled: zod.z.boolean(),
|
|
3179
|
-
exclusions: zod.z.array(nonEmptyStringSchema).optional(),
|
|
3180
|
-
fallbackToGeneratedErrorExamples: zod.z.boolean().optional(),
|
|
3181
|
-
fixtureSource: zod.z.enum(["synthetic", "recorded", "auto"]).optional()
|
|
3297
|
+
enabled: zod.z.boolean().describe("Whether wire-level request and response tests are generated."),
|
|
3298
|
+
exclusions: zod.z.array(nonEmptyStringSchema).optional().describe("Operations excluded from wire tests."),
|
|
3299
|
+
fallbackToGeneratedErrorExamples: zod.z.boolean().optional().describe("Whether missing error fixtures are synthesized from generated examples."),
|
|
3300
|
+
fixtureSource: zod.z.enum(["synthetic", "recorded", "auto"]).optional().describe("Where wire-test fixtures are obtained.")
|
|
3182
3301
|
});
|
|
3183
3302
|
var unitTestsSchema2 = zod.z.strictObject({
|
|
3184
|
-
enabled: zod.z.boolean(),
|
|
3185
|
-
mode: zod.z.enum(["core-runtime", "schema-driven", "both"]).optional(),
|
|
3186
|
-
exclusions: zod.z.array(nonEmptyStringSchema).optional()
|
|
3303
|
+
enabled: zod.z.boolean().describe("Whether SDK unit tests are generated."),
|
|
3304
|
+
mode: zod.z.enum(["core-runtime", "schema-driven", "both"]).optional().describe("The unit-test generation strategy."),
|
|
3305
|
+
exclusions: zod.z.array(nonEmptyStringSchema).optional().describe("Operations excluded from unit tests.")
|
|
3187
3306
|
});
|
|
3188
3307
|
var fernDefinitionMetadataSchema = zod.z.strictObject({
|
|
3189
|
-
definitionS3DownloadUrl: nonEmptyStringSchema
|
|
3190
|
-
|
|
3191
|
-
|
|
3308
|
+
definitionS3DownloadUrl: nonEmptyStringSchema.describe(
|
|
3309
|
+
"The download URL for the materialized Fern definition archive."
|
|
3310
|
+
),
|
|
3311
|
+
outputPath: nonEmptyStringSchema.optional().describe("The destination path for Fern definition support files."),
|
|
3312
|
+
cliVersion: nonEmptyStringSchema.optional().describe("The Fern CLI version associated with the definition.")
|
|
3192
3313
|
});
|
|
3193
3314
|
var streamsSchema2 = zod.z.strictObject({
|
|
3194
|
-
enabled: zod.z.boolean(),
|
|
3195
|
-
responseType: zod.z.enum(["wrapper", "native", "web"]).optional(),
|
|
3196
|
-
fileResponseType: zod.z.enum(["stream", "binary-response"]).optional(),
|
|
3197
|
-
defaultChunkSizeBytes: zod.z.number().int().positive().optional()
|
|
3315
|
+
enabled: zod.z.boolean().describe("Whether generated clients expose streaming response APIs."),
|
|
3316
|
+
responseType: zod.z.enum(["wrapper", "native", "web"]).optional().describe("The streaming response abstraction exposed by generated clients."),
|
|
3317
|
+
fileResponseType: zod.z.enum(["stream", "binary-response"]).optional().describe("The response type used for file downloads."),
|
|
3318
|
+
defaultChunkSizeBytes: zod.z.number().int().positive().optional().describe("The default number of bytes yielded by streaming iterators.")
|
|
3198
3319
|
});
|
|
3199
3320
|
var layoutConfigSchema2 = zod.z.strictObject({
|
|
3200
|
-
outputDirectory: zod.z.enum(["project-root", "source-root"]).optional(),
|
|
3201
|
-
packagePath: nonEmptyStringSchema.optional()
|
|
3321
|
+
outputDirectory: zod.z.enum(["project-root", "source-root"]).optional().describe("Whether generated source is rooted at the project or its source directory."),
|
|
3322
|
+
packagePath: nonEmptyStringSchema.optional().describe("The package-relative path for generated source files.")
|
|
3202
3323
|
});
|
|
3203
3324
|
var serializationConfigSchema2 = zod.z.strictObject({
|
|
3204
|
-
enumRepresentation: zod.z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional(),
|
|
3205
|
-
additionalProperties: zod.z.enum(["allow", "forbid", "ignore", "language-default"]).optional(),
|
|
3206
|
-
inlineTypes: zod.z.boolean().optional(),
|
|
3207
|
-
omitUndefined: zod.z.boolean().optional()
|
|
3325
|
+
enumRepresentation: zod.z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional().describe("How schema enums are represented in generated code."),
|
|
3326
|
+
additionalProperties: zod.z.enum(["allow", "forbid", "ignore", "language-default"]).optional().describe("How undeclared object properties are handled."),
|
|
3327
|
+
inlineTypes: zod.z.boolean().optional().describe("Whether inline schemas remain nested under their parent types."),
|
|
3328
|
+
omitUndefined: zod.z.boolean().optional().describe("Whether undefined properties are omitted during serialization.")
|
|
3208
3329
|
});
|
|
3209
3330
|
var languageGenerationConfigSchema = zod.z.strictObject({
|
|
3210
|
-
typescript: typescriptGenerationConfigSchema.optional(),
|
|
3211
|
-
python: pythonGenerationConfigSchema.optional(),
|
|
3212
|
-
java: javaGenerationConfigSchema.optional(),
|
|
3213
|
-
kotlin: kotlinGenerationConfigSchema.optional(),
|
|
3214
|
-
go: goGenerationConfigSchema.optional(),
|
|
3215
|
-
csharp: csharpGenerationConfigSchema.optional(),
|
|
3216
|
-
php: phpGenerationConfigSchema.optional(),
|
|
3217
|
-
ruby: rubyGenerationConfigSchema.optional(),
|
|
3218
|
-
rust: rustGenerationConfigSchema.optional(),
|
|
3219
|
-
cli: cliGenerationConfigSchema.optional(),
|
|
3220
|
-
mcp: mcpGenerationConfigSchema.optional(),
|
|
3221
|
-
swift: swiftGenerationConfigSchema.optional(),
|
|
3222
|
-
terraform: terraformGenerationConfigSchema.optional()
|
|
3331
|
+
typescript: typescriptGenerationConfigSchema.optional().describe("TypeScript-specific generation settings."),
|
|
3332
|
+
python: pythonGenerationConfigSchema.optional().describe("Python-specific generation settings."),
|
|
3333
|
+
java: javaGenerationConfigSchema.optional().describe("Java-specific generation settings."),
|
|
3334
|
+
kotlin: kotlinGenerationConfigSchema.optional().describe("Kotlin-specific generation settings."),
|
|
3335
|
+
go: goGenerationConfigSchema.optional().describe("Go-specific generation settings."),
|
|
3336
|
+
csharp: csharpGenerationConfigSchema.optional().describe("C#-specific generation settings."),
|
|
3337
|
+
php: phpGenerationConfigSchema.optional().describe("PHP-specific generation settings."),
|
|
3338
|
+
ruby: rubyGenerationConfigSchema.optional().describe("Ruby-specific generation settings."),
|
|
3339
|
+
rust: rustGenerationConfigSchema.optional().describe("Rust-specific generation settings."),
|
|
3340
|
+
cli: cliGenerationConfigSchema.optional().describe("CLI-specific generation settings."),
|
|
3341
|
+
mcp: mcpGenerationConfigSchema.optional().describe("MCP-specific generation settings."),
|
|
3342
|
+
swift: swiftGenerationConfigSchema.optional().describe("Swift-specific generation settings."),
|
|
3343
|
+
terraform: terraformGenerationConfigSchema.optional().describe("Terraform-specific generation settings.")
|
|
3223
3344
|
});
|
|
3224
3345
|
var generationConfigSchema = zod.z.strictObject({
|
|
3225
|
-
includeWatermark: zod.z.boolean().default(false),
|
|
3346
|
+
includeWatermark: zod.z.boolean().default(false).describe("Whether generated files include a generator watermark."),
|
|
3226
3347
|
/** Emits an AI service into the generated SDK. Python, Java and TypeScript honour it. */
|
|
3227
|
-
ai: zod.z.boolean().default(false),
|
|
3228
|
-
includeOptionalSnippetParameters: zod.z.boolean().optional(),
|
|
3229
|
-
buildAllModels: zod.z.boolean().default(false),
|
|
3230
|
-
inferServiceNames: zod.z.boolean().default(false),
|
|
3231
|
-
includeDeprecatedOperations: zod.z.boolean().default(true),
|
|
3232
|
-
multipleResponses: zod.z.boolean().default(false),
|
|
3348
|
+
ai: zod.z.boolean().default(false).describe("Whether the SDK includes generated AI service helpers."),
|
|
3349
|
+
includeOptionalSnippetParameters: zod.z.boolean().optional().describe("Whether usage snippets include optional request parameters."),
|
|
3350
|
+
buildAllModels: zod.z.boolean().default(false).describe("Whether models not referenced by operations are also generated."),
|
|
3351
|
+
inferServiceNames: zod.z.boolean().default(false).describe("Whether service names are inferred from API structure."),
|
|
3352
|
+
includeDeprecatedOperations: zod.z.boolean().default(true).describe("Whether deprecated API operations are generated."),
|
|
3353
|
+
multipleResponses: zod.z.boolean().default(false).describe("Whether operations model multiple successful response types."),
|
|
3233
3354
|
/** Generate the entire SDK project, including package manifests and publishable artifacts. */
|
|
3234
|
-
generateFullProject: zod.z.boolean().default(false),
|
|
3235
|
-
devContainer: zod.z.boolean().default(false),
|
|
3236
|
-
allowMockClient: zod.z.boolean().default(false),
|
|
3237
|
-
ignoreFiles: zod.z.array(nonEmptyStringSchema).optional(),
|
|
3355
|
+
generateFullProject: zod.z.boolean().default(false).describe("Whether generation emits a complete publishable project."),
|
|
3356
|
+
devContainer: zod.z.boolean().default(false).describe("Whether development-container configuration is generated."),
|
|
3357
|
+
allowMockClient: zod.z.boolean().default(false).describe("Whether a mock API client is included in the generated SDK."),
|
|
3358
|
+
ignoreFiles: zod.z.array(nonEmptyStringSchema).optional().describe("Generated paths excluded from the final output."),
|
|
3238
3359
|
/**
|
|
3239
3360
|
* Raw .fernignore file contents supplied to external publishers that need Fern ignore semantics.
|
|
3240
3361
|
* This is separate from generation.ignoreFiles because raw contents preserve comments, ordering,
|
|
3241
3362
|
* blank lines, and negation rules.
|
|
3242
3363
|
*/
|
|
3243
|
-
fernignoreContents: zod.z.string().optional(),
|
|
3364
|
+
fernignoreContents: zod.z.string().optional().describe("The raw .fernignore contents retained for external publishers."),
|
|
3244
3365
|
/**
|
|
3245
3366
|
* Optional Fern definition metadata for publisher paths that need to write definition or
|
|
3246
3367
|
* mock-server support files. This is not required for core GitHub artifact publishing.
|
|
3247
3368
|
*/
|
|
3248
|
-
fernDefinitionMetadata: fernDefinitionMetadataSchema.optional(),
|
|
3249
|
-
reservedKeywords: zod.z.array(nonEmptyStringSchema).optional(),
|
|
3250
|
-
hooks:
|
|
3251
|
-
customCode: customCodeConfigSchema2.optional(),
|
|
3252
|
-
workflows: zod.z.array(
|
|
3253
|
-
customQueryPaths: zod.z.array(relativePathSchema).optional(),
|
|
3254
|
-
analytics: analyticsConfigSchema2.optional(),
|
|
3255
|
-
wireTests: wireTestsSchema2.optional(),
|
|
3256
|
-
unitTests: unitTestsSchema2.optional(),
|
|
3257
|
-
webSockets: zod.z.boolean().optional(),
|
|
3258
|
-
streams: streamsSchema2.optional(),
|
|
3259
|
-
naming: namingConfigSchema.optional(),
|
|
3260
|
-
layout: layoutConfigSchema2.optional(),
|
|
3261
|
-
serialization: serializationConfigSchema2.optional(),
|
|
3262
|
-
language: languageGenerationConfigSchema.optional()
|
|
3369
|
+
fernDefinitionMetadata: fernDefinitionMetadataSchema.optional().describe("Materialized Fern definition metadata used by external publishers."),
|
|
3370
|
+
reservedKeywords: zod.z.array(nonEmptyStringSchema).optional().describe("Additional identifiers treated as reserved words."),
|
|
3371
|
+
hooks: hooksConfigSchema.optional().describe("Custom SDK request and response hook configuration."),
|
|
3372
|
+
customCode: customCodeConfigSchema2.optional().describe("Customer-authored code merge configuration."),
|
|
3373
|
+
workflows: zod.z.array(workflowConfigSchema).optional().describe("Workflow definitions included in generated output."),
|
|
3374
|
+
customQueryPaths: zod.z.array(relativePathSchema).optional().describe("Relative paths to custom query definitions."),
|
|
3375
|
+
analytics: analyticsConfigSchema2.optional().describe("Generated client telemetry configuration."),
|
|
3376
|
+
wireTests: wireTestsSchema2.optional().describe("Wire-level request and response test generation."),
|
|
3377
|
+
unitTests: unitTestsSchema2.optional().describe("SDK unit-test generation."),
|
|
3378
|
+
webSockets: zod.z.boolean().optional().describe("Whether WebSocket clients are generated for supported channels."),
|
|
3379
|
+
streams: streamsSchema2.optional().describe("Streaming response generation behavior."),
|
|
3380
|
+
naming: namingConfigSchema.optional().describe("Names and casing used by generated code."),
|
|
3381
|
+
layout: layoutConfigSchema2.optional().describe("Generated project and source layout."),
|
|
3382
|
+
serialization: serializationConfigSchema2.optional().describe("Generated model serialization behavior."),
|
|
3383
|
+
language: languageGenerationConfigSchema.optional().describe("Settings specific to the selected target language.")
|
|
3263
3384
|
});
|
|
3264
3385
|
var publishRegistrySchema = zod.z.enum([
|
|
3265
3386
|
"npm",
|
|
@@ -3277,154 +3398,160 @@ var credentialResolutionSchema = zod.z.enum([
|
|
|
3277
3398
|
"resolved-by-fiddle"
|
|
3278
3399
|
]);
|
|
3279
3400
|
var registryCredentialsSchema = zod.z.strictObject({
|
|
3280
|
-
username: nonEmptyStringSchema.optional(),
|
|
3281
|
-
password: nonEmptyStringSchema.optional(),
|
|
3282
|
-
token: nonEmptyStringSchema.optional(),
|
|
3283
|
-
apiKey: nonEmptyStringSchema.optional()
|
|
3401
|
+
username: nonEmptyStringSchema.optional().describe("The resolved credential username."),
|
|
3402
|
+
password: nonEmptyStringSchema.optional().describe("The resolved credential password."),
|
|
3403
|
+
token: nonEmptyStringSchema.optional().describe("The resolved credential token."),
|
|
3404
|
+
apiKey: nonEmptyStringSchema.optional().describe("The resolved credential API key.")
|
|
3284
3405
|
});
|
|
3285
3406
|
var commonPublishShape2 = {
|
|
3286
|
-
url: nonEmptyStringSchema.optional(),
|
|
3407
|
+
url: nonEmptyStringSchema.optional().describe("A custom package registry URL."),
|
|
3287
3408
|
/** Reference to registry publishing credentials. */
|
|
3288
|
-
credentialsRef: nonEmptyStringSchema.optional(),
|
|
3409
|
+
credentialsRef: nonEmptyStringSchema.optional().describe("A reference to registry publishing credentials."),
|
|
3289
3410
|
/** Raw registry credentials. These values can be sensitive and must be handled as secrets. */
|
|
3290
|
-
credentials: registryCredentialsSchema.optional(),
|
|
3411
|
+
credentials: registryCredentialsSchema.optional().describe("Resolved registry publishing credentials."),
|
|
3291
3412
|
/**
|
|
3292
3413
|
* Registry-specific package version override. If omitted, the external publisher/orchestrator may
|
|
3293
3414
|
* fall back to target.sdkVersion.
|
|
3294
3415
|
*/
|
|
3295
|
-
version: nonEmptyStringSchema.optional(),
|
|
3296
|
-
releaseBranch: nonEmptyStringSchema.optional(),
|
|
3297
|
-
tolerateRepublish: zod.z.boolean().optional(),
|
|
3416
|
+
version: nonEmptyStringSchema.optional().describe("A registry-specific package version override."),
|
|
3417
|
+
releaseBranch: nonEmptyStringSchema.optional().describe("The branch used by generated package release workflows."),
|
|
3418
|
+
tolerateRepublish: zod.z.boolean().optional().describe("Whether publishing succeeds when this package version already exists."),
|
|
3298
3419
|
/** Generate registry publishing workflow files when publishing through GitHub delivery. */
|
|
3299
|
-
shouldGeneratePublishWorkflow: zod.z.boolean().optional()
|
|
3420
|
+
shouldGeneratePublishWorkflow: zod.z.boolean().optional().describe("Whether GitHub delivery includes a registry publishing workflow.")
|
|
3300
3421
|
};
|
|
3301
3422
|
var trustedPublishingShape = {
|
|
3302
3423
|
/** Use registry trusted publishing / OIDC instead of a static token secret. */
|
|
3303
|
-
trustedPublishing: zod.z.boolean().optional()
|
|
3424
|
+
trustedPublishing: zod.z.boolean().optional().describe("Whether registry publication uses trusted publishing or OIDC.")
|
|
3304
3425
|
};
|
|
3305
3426
|
var mavenCoordinateSchema = nonEmptyStringSchema.regex(
|
|
3306
3427
|
/^[A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+$/,
|
|
3307
3428
|
"Maven coordinate must be in groupId:artifactId form"
|
|
3308
3429
|
);
|
|
3309
3430
|
var mavenSignatureEnvironmentSchema = zod.z.strictObject({
|
|
3310
|
-
keyIdEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3311
|
-
passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3312
|
-
secretKeyEnvironmentVariable: nonEmptyStringSchema.optional()
|
|
3431
|
+
keyIdEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the signing key ID."),
|
|
3432
|
+
passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the signing key password."),
|
|
3433
|
+
secretKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the armored secret key.")
|
|
3313
3434
|
});
|
|
3314
3435
|
var mavenSignatureSchema2 = zod.z.strictObject({
|
|
3315
|
-
keyId: nonEmptyStringSchema,
|
|
3316
|
-
password: nonEmptyStringSchema,
|
|
3317
|
-
secretKey: nonEmptyStringSchema
|
|
3436
|
+
keyId: nonEmptyStringSchema.describe("The resolved signing key identifier."),
|
|
3437
|
+
password: nonEmptyStringSchema.describe("The resolved signing key password."),
|
|
3438
|
+
secretKey: nonEmptyStringSchema.describe("The resolved armored secret key.")
|
|
3318
3439
|
});
|
|
3319
3440
|
var publishConfigSchema = zod.z.discriminatedUnion("registry", [
|
|
3320
3441
|
zod.z.strictObject({
|
|
3321
|
-
registry: zod.z.literal("npm"),
|
|
3442
|
+
registry: zod.z.literal("npm").describe("Publishes the package to an npm-compatible registry."),
|
|
3322
3443
|
/** Environment variable name containing the npm registry token. */
|
|
3323
|
-
tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3444
|
+
tokenEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the npm registry token."),
|
|
3324
3445
|
/** Write npm package metadata as private when the publisher creates/updates package.json. */
|
|
3325
|
-
isPackagePrivate: zod.z.boolean().optional(),
|
|
3446
|
+
isPackagePrivate: zod.z.boolean().optional().describe("Whether generated npm package metadata marks the package as private."),
|
|
3326
3447
|
/** Also publish the TypeScript package to JSR from the npm publishing path. */
|
|
3327
|
-
publishToJsr: zod.z.boolean().optional(),
|
|
3448
|
+
publishToJsr: zod.z.boolean().optional().describe("Whether the npm publishing flow also publishes the package to JSR."),
|
|
3328
3449
|
...trustedPublishingShape,
|
|
3329
3450
|
...commonPublishShape2
|
|
3330
3451
|
}),
|
|
3331
3452
|
zod.z.strictObject({
|
|
3332
|
-
registry: zod.z.literal("pypi"),
|
|
3333
|
-
usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3334
|
-
passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3453
|
+
registry: zod.z.literal("pypi").describe("Publishes the package to a PyPI-compatible registry."),
|
|
3454
|
+
usernameEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the PyPI username."),
|
|
3455
|
+
passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the PyPI password or token."),
|
|
3335
3456
|
...trustedPublishingShape,
|
|
3336
3457
|
...commonPublishShape2
|
|
3337
3458
|
}),
|
|
3338
3459
|
zod.z.strictObject({
|
|
3339
|
-
registry: zod.z.literal("nuget"),
|
|
3340
|
-
apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3460
|
+
registry: zod.z.literal("nuget").describe("Publishes the package to a NuGet-compatible registry."),
|
|
3461
|
+
apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the NuGet API key."),
|
|
3341
3462
|
...trustedPublishingShape,
|
|
3342
3463
|
...commonPublishShape2
|
|
3343
3464
|
}),
|
|
3344
3465
|
zod.z.strictObject({
|
|
3345
|
-
registry: zod.z.literal("rubygems"),
|
|
3346
|
-
apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3466
|
+
registry: zod.z.literal("rubygems").describe("Publishes the package to a RubyGems-compatible registry."),
|
|
3467
|
+
apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the RubyGems API key."),
|
|
3468
|
+
...commonPublishShape2
|
|
3469
|
+
}),
|
|
3470
|
+
zod.z.strictObject({
|
|
3471
|
+
registry: zod.z.literal("crates").describe("Publishes the crate to a Cargo-compatible registry."),
|
|
3472
|
+
tokenEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Cargo registry token."),
|
|
3473
|
+
...commonPublishShape2
|
|
3474
|
+
}),
|
|
3475
|
+
zod.z.strictObject({
|
|
3476
|
+
registry: zod.z.literal("go").describe("Publishes the SDK as a Go module."),
|
|
3347
3477
|
...commonPublishShape2
|
|
3348
3478
|
}),
|
|
3349
3479
|
zod.z.strictObject({
|
|
3350
|
-
registry: zod.z.literal("
|
|
3351
|
-
tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3480
|
+
registry: zod.z.literal("composer").describe("Publishes the package to a Composer-compatible registry."),
|
|
3352
3481
|
...commonPublishShape2
|
|
3353
3482
|
}),
|
|
3354
|
-
zod.z.strictObject({ registry: zod.z.literal("go"), ...commonPublishShape2 }),
|
|
3355
|
-
zod.z.strictObject({ registry: zod.z.literal("composer"), ...commonPublishShape2 }),
|
|
3356
3483
|
zod.z.strictObject({
|
|
3357
|
-
registry: zod.z.literal("maven"),
|
|
3484
|
+
registry: zod.z.literal("maven").describe("Publishes the package to a Maven-compatible repository."),
|
|
3358
3485
|
/** Maven coordinate in groupId:artifactId form when consumers need the combined value. */
|
|
3359
|
-
coordinate: mavenCoordinateSchema.optional(),
|
|
3360
|
-
usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3361
|
-
passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3362
|
-
mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional(),
|
|
3363
|
-
signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional(),
|
|
3486
|
+
coordinate: mavenCoordinateSchema.optional().describe("The Maven coordinate in groupId:artifactId form."),
|
|
3487
|
+
usernameEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven username."),
|
|
3488
|
+
passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven password."),
|
|
3489
|
+
mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven repository URL."),
|
|
3490
|
+
signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional().describe("Environment variables containing Maven signing material."),
|
|
3364
3491
|
/** Reference to Maven signing credentials. */
|
|
3365
|
-
signingCredentialsRef: nonEmptyStringSchema.optional(),
|
|
3492
|
+
signingCredentialsRef: nonEmptyStringSchema.optional().describe("A reference to Maven signing credentials."),
|
|
3366
3493
|
/** Raw Maven signing material. These values can be sensitive and must be handled as secrets. */
|
|
3367
|
-
signature: mavenSignatureSchema2.optional(),
|
|
3494
|
+
signature: mavenSignatureSchema2.optional().describe("Resolved Maven signing material."),
|
|
3368
3495
|
...commonPublishShape2
|
|
3369
3496
|
})
|
|
3370
3497
|
]);
|
|
3371
3498
|
var reviewersSchema2 = zod.z.strictObject({
|
|
3372
|
-
teams: zod.z.array(nonEmptyStringSchema).optional(),
|
|
3373
|
-
users: zod.z.array(nonEmptyStringSchema).optional()
|
|
3499
|
+
teams: zod.z.array(nonEmptyStringSchema).optional().describe("GitHub teams requested as reviewers."),
|
|
3500
|
+
users: zod.z.array(nonEmptyStringSchema).optional().describe("GitHub users requested as reviewers.")
|
|
3374
3501
|
});
|
|
3375
3502
|
var replayControlSchema = zod.z.strictObject({
|
|
3376
|
-
enabled: zod.z.boolean()
|
|
3503
|
+
enabled: zod.z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
|
|
3377
3504
|
});
|
|
3378
3505
|
var githubLicenseSchema = zod.z.strictObject({
|
|
3379
3506
|
/** SPDX identifier or license key for the repository license (for example, "MIT"). */
|
|
3380
|
-
type: nonEmptyStringSchema.optional(),
|
|
3507
|
+
type: nonEmptyStringSchema.optional().describe("The SPDX identifier or license key for the repository license."),
|
|
3381
3508
|
/** Path to a custom license file to be committed into the GitHub repository. */
|
|
3382
|
-
customPath: nonEmptyStringSchema.optional()
|
|
3509
|
+
customPath: nonEmptyStringSchema.optional().describe("The path to a custom license file committed to the repository.")
|
|
3383
3510
|
}).refine((value) => value.type !== void 0 || value.customPath !== void 0, {
|
|
3384
3511
|
message: "GitHub license must set type or customPath"
|
|
3385
3512
|
});
|
|
3386
3513
|
var githubOutputSchema2 = zod.z.strictObject({
|
|
3387
|
-
repository: nonEmptyStringSchema,
|
|
3388
|
-
host: nonEmptyStringSchema.optional(),
|
|
3389
|
-
branch: nonEmptyStringSchema.optional(),
|
|
3390
|
-
mode: zod.z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional(),
|
|
3391
|
-
reviewers: reviewersSchema2.optional(),
|
|
3514
|
+
repository: nonEmptyStringSchema.describe("The GitHub repository that receives generated files."),
|
|
3515
|
+
host: nonEmptyStringSchema.optional().describe("The GitHub host for enterprise installations."),
|
|
3516
|
+
branch: nonEmptyStringSchema.optional().describe("The target branch for generated changes."),
|
|
3517
|
+
mode: zod.z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional().describe("How generated changes are delivered to the repository."),
|
|
3518
|
+
reviewers: reviewersSchema2.optional().describe("Reviewers requested for generated pull requests."),
|
|
3392
3519
|
/** Reference to GitHub credentials. */
|
|
3393
|
-
credentialsRef: nonEmptyStringSchema.optional(),
|
|
3520
|
+
credentialsRef: nonEmptyStringSchema.optional().describe("A reference to GitHub credentials."),
|
|
3394
3521
|
/** Raw GitHub credentials. These values can be sensitive and must be handled as secrets. */
|
|
3395
|
-
credentials: registryCredentialsSchema.optional(),
|
|
3396
|
-
privateRepository: zod.z.boolean().optional(),
|
|
3522
|
+
credentials: registryCredentialsSchema.optional().describe("Resolved GitHub credentials."),
|
|
3523
|
+
privateRepository: zod.z.boolean().optional().describe("Whether the destination repository is private."),
|
|
3397
3524
|
/** GitHub license block scoped to repository delivery. */
|
|
3398
|
-
license: githubLicenseSchema.optional(),
|
|
3525
|
+
license: githubLicenseSchema.optional().describe("License configuration for the destination repository."),
|
|
3399
3526
|
/** GitHub replay control. If omitted, the external publisher applies its default behavior. */
|
|
3400
|
-
replay: replayControlSchema.optional(),
|
|
3527
|
+
replay: replayControlSchema.optional().describe("Replay behavior for the external GitHub publisher."),
|
|
3401
3528
|
/** Run GitHub publishing verification. Defaults to false to match current Fiddle job behavior. */
|
|
3402
|
-
verify: zod.z.boolean().default(false),
|
|
3529
|
+
verify: zod.z.boolean().default(false).describe("Whether the GitHub publisher verifies the generated result."),
|
|
3403
3530
|
/** Skip creating/updating a GitHub PR when no files changed. Defaults to false. */
|
|
3404
|
-
skipIfNoDiff: zod.z.boolean().default(false),
|
|
3531
|
+
skipIfNoDiff: zod.z.boolean().default(false).describe("Whether GitHub publication is skipped when no generated files changed."),
|
|
3405
3532
|
/** Automatically merge the GitHub publishing PR. Defaults to false. */
|
|
3406
|
-
autoMerge: zod.z.boolean().default(false)
|
|
3533
|
+
autoMerge: zod.z.boolean().default(false).describe("Whether the GitHub publisher automatically merges its pull request.")
|
|
3407
3534
|
});
|
|
3408
3535
|
var credentialResolutionShape = {
|
|
3409
3536
|
/** Where output credential references are resolved. */
|
|
3410
|
-
credentialResolution: credentialResolutionSchema.default("refs-only")
|
|
3537
|
+
credentialResolution: credentialResolutionSchema.default("refs-only").describe("Where output credential references are resolved.")
|
|
3411
3538
|
};
|
|
3412
3539
|
var filesOutputSchema2 = zod.z.strictObject({
|
|
3413
|
-
delivery: zod.z.literal("files"),
|
|
3414
|
-
path: nonEmptyStringSchema.optional(),
|
|
3415
|
-
publish: publishConfigSchema.optional(),
|
|
3540
|
+
delivery: zod.z.literal("files").describe("Writes the generated SDK to a directory."),
|
|
3541
|
+
path: nonEmptyStringSchema.optional().describe("The destination directory for generated files."),
|
|
3542
|
+
publish: publishConfigSchema.optional().describe("Optional package registry publication."),
|
|
3416
3543
|
...credentialResolutionShape
|
|
3417
3544
|
});
|
|
3418
3545
|
var zipOutputSchema2 = zod.z.strictObject({
|
|
3419
|
-
delivery: zod.z.literal("zip"),
|
|
3420
|
-
fileName: nonEmptyStringSchema.optional(),
|
|
3421
|
-
publish: publishConfigSchema.optional(),
|
|
3546
|
+
delivery: zod.z.literal("zip").describe("Packages the generated SDK as a ZIP archive."),
|
|
3547
|
+
fileName: nonEmptyStringSchema.optional().describe("The generated ZIP archive file name."),
|
|
3548
|
+
publish: publishConfigSchema.optional().describe("Optional package registry publication."),
|
|
3422
3549
|
...credentialResolutionShape
|
|
3423
3550
|
});
|
|
3424
3551
|
var githubDeliverySchema2 = zod.z.strictObject({
|
|
3425
|
-
delivery: zod.z.literal("github"),
|
|
3426
|
-
github: githubOutputSchema2,
|
|
3427
|
-
publish: publishConfigSchema.optional(),
|
|
3552
|
+
delivery: zod.z.literal("github").describe("Delivers the generated SDK to GitHub."),
|
|
3553
|
+
github: githubOutputSchema2.describe("GitHub repository delivery settings."),
|
|
3554
|
+
publish: publishConfigSchema.optional().describe("Optional package registry publication."),
|
|
3428
3555
|
...credentialResolutionShape
|
|
3429
3556
|
});
|
|
3430
3557
|
var outputConfigSchema = zod.z.discriminatedUnion(
|
|
@@ -3435,21 +3562,23 @@ var outputConfigSchema = zod.z.discriminatedUnion(
|
|
|
3435
3562
|
}
|
|
3436
3563
|
);
|
|
3437
3564
|
var replayConfigSchema = zod.z.strictObject({
|
|
3438
|
-
enabled: zod.z.boolean()
|
|
3565
|
+
enabled: zod.z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
|
|
3439
3566
|
});
|
|
3440
3567
|
var sourceSpecConfigSchema = zod.z.strictObject({
|
|
3441
|
-
id: nonEmptyStringSchema.optional(),
|
|
3442
|
-
name: nonEmptyStringSchema.optional(),
|
|
3443
|
-
namespace: nonEmptyStringSchema.optional(),
|
|
3444
|
-
specUrl: nonEmptyStringSchema
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3568
|
+
id: nonEmptyStringSchema.optional().describe("A unique identifier for this API source."),
|
|
3569
|
+
name: nonEmptyStringSchema.optional().describe("A human-readable name for this API source."),
|
|
3570
|
+
namespace: nonEmptyStringSchema.optional().describe("A namespace used to isolate this source in a multi-source SDK."),
|
|
3571
|
+
specUrl: nonEmptyStringSchema.describe(
|
|
3572
|
+
"The materialized URL from which the generator retrieves the API source."
|
|
3573
|
+
),
|
|
3574
|
+
specType: sourceSpecTypeSchema.describe("The API description format of this source."),
|
|
3575
|
+
apiImportSettings: apiImportSettingsSchema.optional().describe("Import behavior that overrides the source-level defaults for this spec."),
|
|
3576
|
+
overlays: zod.z.array(nonEmptyStringSchema).optional().describe("Materialized overlays applied to this source in order."),
|
|
3577
|
+
overrides: zod.z.array(nonEmptyStringSchema).optional().describe("Materialized source overrides applied in order.")
|
|
3449
3578
|
});
|
|
3450
3579
|
var sourceConfigSchema = zod.z.strictObject({
|
|
3451
|
-
specs: zod.z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec"),
|
|
3452
|
-
apiImportSettings: apiImportSettingsSchema.optional()
|
|
3580
|
+
specs: zod.z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec").describe("Materialized API sources in authoritative processing order."),
|
|
3581
|
+
apiImportSettings: apiImportSettingsSchema.optional().describe("Default import behavior shared by every source spec.")
|
|
3453
3582
|
}).superRefine(({ specs }, context) => {
|
|
3454
3583
|
const seenIds = /* @__PURE__ */ new Set();
|
|
3455
3584
|
specs.forEach(({ id }, index) => {
|
|
@@ -3481,25 +3610,27 @@ var targetLanguageSchema = zod.z.enum([
|
|
|
3481
3610
|
"terraform"
|
|
3482
3611
|
]);
|
|
3483
3612
|
var targetConfigSchema = zod.z.strictObject({
|
|
3484
|
-
language: targetLanguageSchema
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3613
|
+
language: targetLanguageSchema.describe(
|
|
3614
|
+
"The language or platform generated by this single-target request."
|
|
3615
|
+
),
|
|
3616
|
+
generatorVersion: exactSemverSchema.optional().describe("The exact generator version requested for this target."),
|
|
3617
|
+
sourceOrigin: zod.z.enum(["postman", "fern"]).describe("The configuration system from which this IR was normalized."),
|
|
3618
|
+
sdkName: nonEmptyStringSchema.describe("The name used for the generated SDK."),
|
|
3488
3619
|
/**
|
|
3489
3620
|
* Stable Fern/Fiddle API identity for external publishing.
|
|
3490
3621
|
* Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
|
|
3491
3622
|
* target.sdkName because SDK display names and Fern API names are not equivalent.
|
|
3492
3623
|
*/
|
|
3493
|
-
apiName: nonEmptyStringSchema.optional(),
|
|
3494
|
-
organization: nonEmptyStringSchema.optional(),
|
|
3624
|
+
apiName: nonEmptyStringSchema.optional().describe("The stable API identity used for external publishing."),
|
|
3625
|
+
organization: nonEmptyStringSchema.optional().describe("Source organization metadata retained for generation."),
|
|
3495
3626
|
/**
|
|
3496
3627
|
* Stable Fern/Fiddle organization identity for external publishing.
|
|
3497
3628
|
* Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
|
|
3498
3629
|
* target.organization because source organization metadata is optional and may not match Fern.
|
|
3499
3630
|
*/
|
|
3500
|
-
organizationName: nonEmptyStringSchema.optional(),
|
|
3501
|
-
sdkVersion: nonEmptyStringSchema.default("1.0.0"),
|
|
3502
|
-
apiVersion: nonEmptyStringSchema.optional()
|
|
3631
|
+
organizationName: nonEmptyStringSchema.optional().describe("The stable organization identity used for external publishing."),
|
|
3632
|
+
sdkVersion: nonEmptyStringSchema.default("1.0.0").describe("The version of the generated SDK."),
|
|
3633
|
+
apiVersion: nonEmptyStringSchema.optional().describe("The version of the API represented by the SDK.")
|
|
3503
3634
|
});
|
|
3504
3635
|
|
|
3505
3636
|
// src/sdk-config-ir/v1/sdk-config-ir-v1.ts
|
|
@@ -3561,17 +3692,21 @@ function validatePublishingIdentity2(packageConfig, registry, context) {
|
|
|
3561
3692
|
}
|
|
3562
3693
|
}
|
|
3563
3694
|
var sdkConfigIrV1Schema = zod.z.strictObject({
|
|
3564
|
-
schemaVersion: zod.z.literal(SDK_CONFIG_IR_V1_SCHEMA_VERSION),
|
|
3565
|
-
source: sourceConfigSchema,
|
|
3566
|
-
target: targetConfigSchema
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3695
|
+
schemaVersion: zod.z.literal(SDK_CONFIG_IR_V1_SCHEMA_VERSION).describe("The version of the normalized SDK Config IR schema."),
|
|
3696
|
+
source: sourceConfigSchema.describe("Materialized API descriptions consumed by generation."),
|
|
3697
|
+
target: targetConfigSchema.describe(
|
|
3698
|
+
"Identity and provenance for this single generation target."
|
|
3699
|
+
),
|
|
3700
|
+
api: apiConfigSchema.describe("API behavior exposed by the generated SDK."),
|
|
3701
|
+
client: clientConfigSchema.describe("Behavior of the generated API client."),
|
|
3702
|
+
package: packageConfigSchema.describe("Package identity and metadata for the generated SDK."),
|
|
3703
|
+
output: outputConfigSchema.describe("Artifact delivery and optional package publication."),
|
|
3704
|
+
replay: replayConfigSchema.optional().describe("Generation replay behavior."),
|
|
3705
|
+
docs: docsConfigSchema.describe("Generated documentation settings."),
|
|
3706
|
+
generation: generationConfigSchema.describe(
|
|
3707
|
+
"Shared and language-specific generation behavior."
|
|
3708
|
+
),
|
|
3709
|
+
compatibility: compatibilityConfigSchema.optional().describe("Temporary provenance and diagnostics retained during legacy migration.")
|
|
3575
3710
|
}).superRefine(({ compatibility, generation, output, package: packageConfig, target }, context) => {
|
|
3576
3711
|
const configuredLanguages = Object.keys(generation.language ?? {});
|
|
3577
3712
|
const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;
|