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