@fern-api/generator-migrations 0.0.1 → 0.0.3
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/dist/index.d.mts +1327 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +842 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +5 -35
- package/README.md +0 -352
- package/lib/generators/typescript/migrations/1.0.0.d.ts +0 -152
- package/lib/generators/typescript/migrations/1.0.0.d.ts.map +0 -1
- package/lib/generators/typescript/migrations/1.0.0.js +0 -166
- package/lib/generators/typescript/migrations/1.0.0.js.map +0 -1
- package/lib/generators/typescript/migrations/2.0.0.d.ts +0 -153
- package/lib/generators/typescript/migrations/2.0.0.d.ts.map +0 -1
- package/lib/generators/typescript/migrations/2.0.0.js +0 -163
- package/lib/generators/typescript/migrations/2.0.0.js.map +0 -1
- package/lib/generators/typescript/migrations/3.0.0.d.ts +0 -242
- package/lib/generators/typescript/migrations/3.0.0.d.ts.map +0 -1
- package/lib/generators/typescript/migrations/3.0.0.js +0 -250
- package/lib/generators/typescript/migrations/3.0.0.js.map +0 -1
- package/lib/generators/typescript/migrations/index.d.ts +0 -18
- package/lib/generators/typescript/migrations/index.d.ts.map +0 -1
- package/lib/generators/typescript/migrations/index.js +0 -22
- package/lib/generators/typescript/migrations/index.js.map +0 -1
- package/lib/index.d.ts +0 -18
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -24
- package/lib/index.js.map +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,1327 @@
|
|
|
1
|
+
//#region ../commons/core-utils/lib/objects/values.d.ts
|
|
2
|
+
type Values<T> = T[keyof T];
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/ai/types/AiServicesSchema.d.ts
|
|
5
|
+
interface AiServicesSchema {
|
|
6
|
+
provider: ModelProvider;
|
|
7
|
+
model: ModelName;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/ai/types/ModelProvider.d.ts
|
|
11
|
+
/**
|
|
12
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
13
|
+
*/
|
|
14
|
+
type ModelProvider = "openai" | "anthropic" | "bedrock";
|
|
15
|
+
declare const ModelProvider: {
|
|
16
|
+
readonly Openai: "openai";
|
|
17
|
+
readonly Anthropic: "anthropic";
|
|
18
|
+
readonly Bedrock: "bedrock";
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/ai/types/ModelName.d.ts
|
|
22
|
+
/**
|
|
23
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
24
|
+
*/
|
|
25
|
+
type ModelName = string;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/GeneratorsConfigurationSchema.d.ts
|
|
28
|
+
interface GeneratorsConfigurationSchema {
|
|
29
|
+
"auth-schemes"?: Record<string, AuthSchemeDeclarationSchema>;
|
|
30
|
+
api?: ApiConfigurationSchema;
|
|
31
|
+
whitelabel?: WhitelabelConfigurationSchema;
|
|
32
|
+
metadata?: OutputMetadataSchema;
|
|
33
|
+
readme?: ReadmeSchema;
|
|
34
|
+
"default-group"?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Aliases that map to multiple groups. When running `fern generate <alias>`,
|
|
37
|
+
* all groups in the alias will be run. For example:
|
|
38
|
+
* ```yaml
|
|
39
|
+
* aliases:
|
|
40
|
+
* all: ["php-sdk", "ts-sdk", "go-sdk"]
|
|
41
|
+
* ```
|
|
42
|
+
* Then `fern generate all` will run all three groups.
|
|
43
|
+
*/
|
|
44
|
+
aliases?: Record<string, string[]>;
|
|
45
|
+
groups?: Record<string, GeneratorGroupSchema>;
|
|
46
|
+
reviewers?: ReviewersSchema;
|
|
47
|
+
ai?: AiServicesSchema;
|
|
48
|
+
/**
|
|
49
|
+
* If true, automatically release SDKs when changes are detected.
|
|
50
|
+
* Can be overridden at the individual generator level.
|
|
51
|
+
*/
|
|
52
|
+
autorelease?: boolean;
|
|
53
|
+
/** Deprecated, use the `api` key instead */
|
|
54
|
+
openapi?: GeneratorsOpenApiSchema;
|
|
55
|
+
/** Deprecated, use the `api` key instead */
|
|
56
|
+
"openapi-overrides"?: string;
|
|
57
|
+
/** Deprecated, use the `api` key instead */
|
|
58
|
+
"spec-origin"?: string;
|
|
59
|
+
/** Deprecated, use the `api` key instead */
|
|
60
|
+
"async-api"?: string;
|
|
61
|
+
/** Deprecated, use the `api` key instead */
|
|
62
|
+
"api-settings"?: ApiDefinitionSettingsSchema;
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ApiConfigurationSchema.d.ts
|
|
66
|
+
type ApiConfigurationSchema = ApiConfigurationSchemaInternal | NamespacedApiConfigurationSchema | ApiConfigurationV2Schema;
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/NamespacedApiConfigurationSchema.d.ts
|
|
69
|
+
interface NamespacedApiConfigurationSchema {
|
|
70
|
+
namespaces: Record<string, ApiConfigurationSchemaInternal>;
|
|
71
|
+
}
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/WhitelabelConfigurationSchema.d.ts
|
|
74
|
+
interface WhitelabelConfigurationSchema {
|
|
75
|
+
github?: WhitelabelGithubConfigurationSchema;
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/WhitelabelGithubConfigurationSchema.d.ts
|
|
79
|
+
/**
|
|
80
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
81
|
+
*/
|
|
82
|
+
interface WhitelabelGithubConfigurationSchema {
|
|
83
|
+
username: string;
|
|
84
|
+
email: string;
|
|
85
|
+
token: string;
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/OutputMetadataSchema.d.ts
|
|
89
|
+
interface OutputMetadataSchema {
|
|
90
|
+
description?: string;
|
|
91
|
+
authors?: OutputMetadataAuthor[];
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/OutputMetadataAuthor.d.ts
|
|
95
|
+
/**
|
|
96
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
97
|
+
*/
|
|
98
|
+
interface OutputMetadataAuthor {
|
|
99
|
+
name: string;
|
|
100
|
+
email: string;
|
|
101
|
+
}
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ReadmeSchema.d.ts
|
|
104
|
+
interface ReadmeSchema {
|
|
105
|
+
bannerLink?: string;
|
|
106
|
+
introduction?: string;
|
|
107
|
+
apiReferenceLink?: string;
|
|
108
|
+
apiName?: string;
|
|
109
|
+
disabledSections?: string[];
|
|
110
|
+
/** If set, use this endpoint's snippet as the default whenever possible */
|
|
111
|
+
defaultEndpoint?: ReadmeEndpointSchema;
|
|
112
|
+
/** Specifies a list of endpoints associated with the feature */
|
|
113
|
+
features?: Record<string, ReadmeEndpointSchema[]>;
|
|
114
|
+
/** Supply custom sections as markdown to be included in the readme */
|
|
115
|
+
customSections?: ReadmeCustomSectionSchema[];
|
|
116
|
+
/** Controls whether usage examples show only required parameters (minimal) or all parameters (comprehensive). Defaults to comprehensive. */
|
|
117
|
+
exampleStyle?: ExampleStyle;
|
|
118
|
+
}
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ExampleStyle.d.ts
|
|
121
|
+
/**
|
|
122
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
123
|
+
*/
|
|
124
|
+
type ExampleStyle = "minimal" | "comprehensive";
|
|
125
|
+
declare const ExampleStyle: {
|
|
126
|
+
readonly Minimal: "minimal";
|
|
127
|
+
readonly Comprehensive: "comprehensive";
|
|
128
|
+
};
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ReadmeCustomSectionSchema.d.ts
|
|
131
|
+
interface ReadmeCustomSectionSchema {
|
|
132
|
+
title: string;
|
|
133
|
+
language: Language;
|
|
134
|
+
content: string;
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ReadmeEndpointSchema.d.ts
|
|
138
|
+
type ReadmeEndpointSchema =
|
|
139
|
+
/**
|
|
140
|
+
* Endpoint name in 'POST /users' format */
|
|
141
|
+
string | ReadmeEndpointObjectSchema;
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ReadmeEndpointObjectSchema.d.ts
|
|
144
|
+
/**
|
|
145
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
146
|
+
*/
|
|
147
|
+
interface ReadmeEndpointObjectSchema {
|
|
148
|
+
method: string;
|
|
149
|
+
path: string;
|
|
150
|
+
stream?: boolean;
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/GeneratorsOpenApiSchema.d.ts
|
|
154
|
+
type GeneratorsOpenApiSchema = GeneratorsOpenApiObjectSchema | string;
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/GeneratorsOpenApiObjectSchema.d.ts
|
|
157
|
+
interface GeneratorsOpenApiObjectSchema {
|
|
158
|
+
path: string;
|
|
159
|
+
origin?: string;
|
|
160
|
+
overrides?: string;
|
|
161
|
+
"disable-examples"?: boolean;
|
|
162
|
+
settings: OpenApiSettingsSchema;
|
|
163
|
+
}
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ApiDefinitionPathSchema.d.ts
|
|
166
|
+
/**
|
|
167
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
168
|
+
*/
|
|
169
|
+
/**
|
|
170
|
+
* Path to the OpenAPI, AsyncAPI or Fern Definition
|
|
171
|
+
*/
|
|
172
|
+
type ApiDefinitionPathSchema = string;
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ApiDefinitionSettingsSchema.d.ts
|
|
175
|
+
/**
|
|
176
|
+
* Deprecated, use the `api.specs` key instead
|
|
177
|
+
*/
|
|
178
|
+
interface ApiDefinitionSettingsSchema {
|
|
179
|
+
/**
|
|
180
|
+
* Whether to use the titles of the schemas within an OpenAPI definition as the names of the types within Fern. Defaults to false.
|
|
181
|
+
* Deprecated, use the `api.specs.[].settings.title-as-schema-name` key instead.
|
|
182
|
+
*/
|
|
183
|
+
"use-title"?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* What version of union generation to use, this will grow over time. Defaults to v0.
|
|
186
|
+
* Deprecated, use the `api.specs.[].settings.prefer-undiscriminated-unions-with-literals` key instead.
|
|
187
|
+
*/
|
|
188
|
+
unions?: UnionSettingsSchema;
|
|
189
|
+
/** What version of message naming to use for AsyncAPI messages, this will grow over time. Defaults to v1. */
|
|
190
|
+
"message-naming"?: MessageNamingSettingsSchema;
|
|
191
|
+
/** Preserves nullable schemas in API definition settings. Defaults to true, where nullable schemas are treated as optional. */
|
|
192
|
+
"respect-nullable-schemas"?: boolean;
|
|
193
|
+
/** Whether to only include schemas referenced by endpoints in the generated SDK (i.e. a form of tree-shaking). Defaults to false. */
|
|
194
|
+
"only-include-referenced-schemas"?: boolean;
|
|
195
|
+
/** Whether to include path parameters within the generated in-lined request. Defaults to true. */
|
|
196
|
+
"inline-path-parameters"?: boolean;
|
|
197
|
+
/** Whether to use idiomatic request names for endpoints (e.g. ListUsersRequest instead of UsersListRequest). Defaults to true. */
|
|
198
|
+
"idiomatic-request-names"?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* If true, the converter will wrap references to nullable schemas in optional.
|
|
201
|
+
* If false, the converter will wrap references to nullable schemas in nullable.
|
|
202
|
+
* Defaults to true.
|
|
203
|
+
*/
|
|
204
|
+
"wrap-references-to-nullable-in-optional"?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* If true, the converter will coerce nullable schemas to optional.
|
|
207
|
+
* If false, the converter will keep nullable schemas as nullable.
|
|
208
|
+
* Defaults to true.
|
|
209
|
+
*/
|
|
210
|
+
"coerce-optional-schemas-to-nullable"?: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* If true, group servers by host into unified environments regardless of protocol.
|
|
213
|
+
* This allows APIs with multiple protocols (REST, WebSocket, etc.) to share environment configuration.
|
|
214
|
+
* When enabled, environment URL IDs are generated with collision resolution:
|
|
215
|
+
* - Use server name alone if no collision
|
|
216
|
+
* - Add path segment if collision (e.g., "prod: https://api.com/foo" -> "foo")
|
|
217
|
+
* - Add protocol if still collision (e.g., "prod: wss://api.com/foo" -> "foo_wss", only for non-HTTPS protocols)
|
|
218
|
+
*/
|
|
219
|
+
"group-environments-by-host"?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* If `always`, remove discriminant properties from schemas when generating types, unless the schema is also used outside of a discriminated union.
|
|
222
|
+
* If `never`, keep discriminant properties in schemas when generating types.
|
|
223
|
+
* Defaults to `always`.
|
|
224
|
+
*/
|
|
225
|
+
"remove-discriminants-from-schemas"?: RemoveDiscriminantsFromSchemas;
|
|
226
|
+
/**
|
|
227
|
+
* Controls the order of path parameters in generated method signatures.
|
|
228
|
+
* - `url-order`: Use the order path parameters appear in the URL path (e.g., /users/{userId}/posts/{postId})
|
|
229
|
+
* - `spec-order`: Use the order path parameters are defined in the spec
|
|
230
|
+
* Defaults to `url-order`.
|
|
231
|
+
*/
|
|
232
|
+
"path-parameter-order"?: PathParameterOrder;
|
|
233
|
+
}
|
|
234
|
+
//#endregion
|
|
235
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/RemoveDiscriminantsFromSchemas.d.ts
|
|
236
|
+
/**
|
|
237
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
238
|
+
*/
|
|
239
|
+
/**
|
|
240
|
+
* Whether to remove discriminant properties from schemas when generating types, unless the schema is also used outside of a discriminated union.
|
|
241
|
+
*/
|
|
242
|
+
type RemoveDiscriminantsFromSchemas = "always" | "never";
|
|
243
|
+
declare const RemoveDiscriminantsFromSchemas: {
|
|
244
|
+
readonly Always: "always";
|
|
245
|
+
readonly Never: "never";
|
|
246
|
+
};
|
|
247
|
+
//#endregion
|
|
248
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/PathParameterOrder.d.ts
|
|
249
|
+
/**
|
|
250
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
251
|
+
*/
|
|
252
|
+
/**
|
|
253
|
+
* Controls the order of path parameters in generated method signatures.
|
|
254
|
+
*/
|
|
255
|
+
type PathParameterOrder = "url-order" | "spec-order";
|
|
256
|
+
declare const PathParameterOrder: {
|
|
257
|
+
readonly UrlOrder: "url-order";
|
|
258
|
+
readonly SpecOrder: "spec-order";
|
|
259
|
+
};
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/UnionSettingsSchema.d.ts
|
|
262
|
+
/**
|
|
263
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
264
|
+
*/
|
|
265
|
+
type UnionSettingsSchema = "v1";
|
|
266
|
+
declare const UnionSettingsSchema: {
|
|
267
|
+
readonly V1: "v1";
|
|
268
|
+
};
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/MessageNamingSettingsSchema.d.ts
|
|
271
|
+
/**
|
|
272
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
273
|
+
*/
|
|
274
|
+
type MessageNamingSettingsSchema = "v1" | "v2";
|
|
275
|
+
declare const MessageNamingSettingsSchema: {
|
|
276
|
+
readonly V1: "v1";
|
|
277
|
+
readonly V2: "v2";
|
|
278
|
+
};
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ApiDefinitionWithOverridesSchema.d.ts
|
|
281
|
+
interface ApiDefinitionWithOverridesSchema {
|
|
282
|
+
path: ApiDefinitionPathSchema;
|
|
283
|
+
/** The URL of the API definition origin, from which the file should be polled. */
|
|
284
|
+
origin?: string;
|
|
285
|
+
/** Path to the OpenAPI or AsyncAPI overrides */
|
|
286
|
+
overrides?: string;
|
|
287
|
+
/** Audiences that you would like to filter to */
|
|
288
|
+
audiences?: string[];
|
|
289
|
+
settings?: ApiDefinitionSettingsSchema;
|
|
290
|
+
}
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ProtobufDefinitionSchema.d.ts
|
|
293
|
+
/**
|
|
294
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
295
|
+
*/
|
|
296
|
+
interface ProtobufDefinitionSchema {
|
|
297
|
+
/** The path to the target `.proto` file that defines the API (e.g. `proto/user/v1/user.proto`). */
|
|
298
|
+
target?: string;
|
|
299
|
+
/** The path to the `.proto` directory root (e.g. `proto`). */
|
|
300
|
+
root: string;
|
|
301
|
+
/** Path to the overrides configuration */
|
|
302
|
+
overrides?: string;
|
|
303
|
+
/** Whether to compile the `.proto` files locally. By default, we generate remotely. */
|
|
304
|
+
"local-generation"?: boolean;
|
|
305
|
+
/** Whether to convert to OpenAPI before generating */
|
|
306
|
+
"from-openapi"?: boolean;
|
|
307
|
+
/** Dependencies to use for generation. */
|
|
308
|
+
dependencies?: string[];
|
|
309
|
+
}
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ProtobufApiDefinitionSchema.d.ts
|
|
312
|
+
interface ProtobufApiDefinitionSchema {
|
|
313
|
+
proto: ProtobufDefinitionSchema;
|
|
314
|
+
}
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ApiDefinitionList.d.ts
|
|
317
|
+
type ApiDefinitionList = ApiDefinitionSchema[];
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ApiDefinitionSchema.d.ts
|
|
320
|
+
type ApiDefinitionSchema = ApiDefinitionPathSchema | ApiDefinitionWithOverridesSchema | ProtobufApiDefinitionSchema;
|
|
321
|
+
//#endregion
|
|
322
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ApiConfigurationSchemaInternal.d.ts
|
|
323
|
+
type ApiConfigurationSchemaInternal = ApiDefinitionPathSchema | ApiDefinitionWithOverridesSchema | ApiDefinitionList | ProtobufApiDefinitionSchema;
|
|
324
|
+
//#endregion
|
|
325
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ApiConfigurationV2Schema.d.ts
|
|
326
|
+
interface ApiConfigurationV2Schema extends WithHeadersSchema, WithEnvironmentsSchema {
|
|
327
|
+
auth?: ApiAuthSchema;
|
|
328
|
+
"auth-schemes"?: Record<string, AuthSchemeDeclarationSchema>;
|
|
329
|
+
specs: ApiConfigurationV2SpecsSchema;
|
|
330
|
+
settings?: ApiConfigurationV2SettingsSchema;
|
|
331
|
+
}
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ApiConfigurationV2SettingsSchema.d.ts
|
|
334
|
+
/**
|
|
335
|
+
* Global default API import settings that apply to all specs in this API configuration.
|
|
336
|
+
* Individual spec settings in specs[].settings will override these defaults.
|
|
337
|
+
* Generator settings in groups.generators[].api.settings will override both.
|
|
338
|
+
* Settings hierarchy (highest to lowest priority): generator > spec > api.
|
|
339
|
+
*/
|
|
340
|
+
interface ApiConfigurationV2SettingsSchema extends OpenApiSettingsSchema, AsyncApiSettingsSchema {}
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ApiConfigurationV2SpecsSchema.d.ts
|
|
343
|
+
type ApiConfigurationV2SpecsSchema = SpecSchema[] | ConjureSchema;
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/BaseApiSettingsSchema.d.ts
|
|
346
|
+
interface BaseApiSettingsSchema {
|
|
347
|
+
/** Preserves nullable schemas in API definition settings. Defaults to true, where nullable schemas are treated as optional. */
|
|
348
|
+
"respect-nullable-schemas"?: boolean;
|
|
349
|
+
/** Whether to use the titles of the schemas within an OpenAPI definition as the names of the types within Fern. Defaults to false. */
|
|
350
|
+
"title-as-schema-name"?: boolean;
|
|
351
|
+
"optional-additional-properties"?: boolean;
|
|
352
|
+
/** Whether to coerce single value enums to literals. Defaults to true. */
|
|
353
|
+
"coerce-enums-to-literals"?: boolean;
|
|
354
|
+
"idiomatic-request-names"?: boolean;
|
|
355
|
+
/**
|
|
356
|
+
* If true, the converter will convert nullable schemas to optional nullable.
|
|
357
|
+
* If false, the converter will convert nullable schemas to required nullable.
|
|
358
|
+
* Defaults to true.
|
|
359
|
+
*/
|
|
360
|
+
"wrap-references-to-nullable-in-optional"?: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* If true, the converter will coerce nullable schemas to optional.
|
|
363
|
+
* If false, the converter will keep nullable schemas as nullable.
|
|
364
|
+
* Defaults to true.
|
|
365
|
+
*/
|
|
366
|
+
"coerce-optional-schemas-to-nullable"?: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* If true, group servers by host into unified environments regardless of protocol.
|
|
369
|
+
* This allows APIs with multiple protocols (REST, WebSocket, etc.) to share environment configuration.
|
|
370
|
+
* When enabled, environment URL IDs are generated with collision resolution:
|
|
371
|
+
* - Use server name alone if no collision
|
|
372
|
+
* - Add path segment if collision (e.g., "prod: https://api.com/foo" -> "foo")
|
|
373
|
+
* - Add protocol if still collision (e.g., "prod: wss://api.com/foo" -> "foo_wss", only for non-HTTPS protocols)
|
|
374
|
+
*/
|
|
375
|
+
"group-environments-by-host"?: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* If `always`, remove discriminant properties from schemas when generating types, unless the schema is also used outside of a discriminated union.
|
|
378
|
+
* If `never`, keep discriminant properties in schemas when generating types.
|
|
379
|
+
* Defaults to `always`.
|
|
380
|
+
*/
|
|
381
|
+
"remove-discriminants-from-schemas"?: RemoveDiscriminantsFromSchemas;
|
|
382
|
+
/**
|
|
383
|
+
* Controls the order of path parameters in generated method signatures.
|
|
384
|
+
* - `url-order`: Use the order path parameters appear in the URL path (e.g., /users/{userId}/posts/{postId})
|
|
385
|
+
* - `spec-order`: Use the order path parameters are defined in the spec
|
|
386
|
+
* Defaults to `url-order`.
|
|
387
|
+
*/
|
|
388
|
+
"path-parameter-order"?: PathParameterOrder;
|
|
389
|
+
}
|
|
390
|
+
//#endregion
|
|
391
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/OpenApiSettingsSchema.d.ts
|
|
392
|
+
interface OpenApiSettingsSchema extends BaseApiSettingsSchema {
|
|
393
|
+
/** Whether to only include schemas referenced by endpoints in the generated SDK (i.e. a form of tree-shaking). Defaults to false. */
|
|
394
|
+
"only-include-referenced-schemas"?: boolean;
|
|
395
|
+
/** Whether to include path parameters within the generated in-lined request. Defaults to true. */
|
|
396
|
+
"inline-path-parameters"?: boolean;
|
|
397
|
+
/** Whether to prefer undiscriminated unions with literals. Defaults to false. */
|
|
398
|
+
"prefer-undiscriminated-unions-with-literals"?: boolean;
|
|
399
|
+
/** Enables parsing deep object query parameters */
|
|
400
|
+
"object-query-parameters"?: boolean;
|
|
401
|
+
/** Enables exploring readonly schemas in OpenAPI specifications */
|
|
402
|
+
"respect-readonly-schemas"?: boolean;
|
|
403
|
+
/** Enables respecting forward compatible enums in OpenAPI specifications. Defaults to false. */
|
|
404
|
+
"respect-forward-compatible-enums"?: boolean;
|
|
405
|
+
/** Enables using the `bytes` type for binary responsesin OpenAPI specifications. Defaults to a file stream. */
|
|
406
|
+
"use-bytes-for-binary-response"?: boolean;
|
|
407
|
+
/** The default encoding of form parameters. Defaults to JSON. */
|
|
408
|
+
"default-form-parameter-encoding"?: FormParameterEncoding;
|
|
409
|
+
/** Filter to apply to the OpenAPI specification. */
|
|
410
|
+
filter?: OpenApiFilterSchema;
|
|
411
|
+
/** Fine-tune your example generation */
|
|
412
|
+
"example-generation"?: OpenApiExampleGenerationSchema;
|
|
413
|
+
/** Configure what `additionalProperties` should default to when not explicitly defined on a schema. Defaults to `false`. */
|
|
414
|
+
"additional-properties-defaults-to"?: boolean;
|
|
415
|
+
/**
|
|
416
|
+
* If true, convert strings with format date to strings.
|
|
417
|
+
* If false, convert strings with format date to dates.
|
|
418
|
+
* Defaults to true.
|
|
419
|
+
*/
|
|
420
|
+
"type-dates-as-strings"?: boolean;
|
|
421
|
+
/**
|
|
422
|
+
* If true, preserve oneOf structures with a single schema.
|
|
423
|
+
* If false, unwrap oneOf structures with a single schema.
|
|
424
|
+
* Defaults to false.
|
|
425
|
+
*/
|
|
426
|
+
"preserve-single-schema-oneof"?: boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Whether to inline allOf schemas. If false, allOf schemas will be
|
|
429
|
+
* extended in the code generation.
|
|
430
|
+
*/
|
|
431
|
+
"inline-all-of-schemas"?: boolean;
|
|
432
|
+
/**
|
|
433
|
+
* Whether to resolve aliases and inline them if possible.
|
|
434
|
+
* If provided, all aliases will be resolved except for the ones in the except array.
|
|
435
|
+
* Defaults to false, meaning that no aliases will be resolved.
|
|
436
|
+
*/
|
|
437
|
+
"resolve-aliases"?: ResolveAliases;
|
|
438
|
+
/**
|
|
439
|
+
* If true, automatically group multiple APIs with matching environments into unified environments with multiple base URLs.
|
|
440
|
+
* This is useful for organizations with multiple APIs deployed to the same set of environments.
|
|
441
|
+
*/
|
|
442
|
+
"group-multi-api-environments"?: boolean;
|
|
443
|
+
/**
|
|
444
|
+
* The default format to use for integer types when no format is specified in the OpenAPI schema.
|
|
445
|
+
* Defaults to int32.
|
|
446
|
+
*/
|
|
447
|
+
"default-integer-format"?: DefaultIntegerFormat;
|
|
448
|
+
}
|
|
449
|
+
//#endregion
|
|
450
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ResolveAliases.d.ts
|
|
451
|
+
type ResolveAliases = boolean | ResolveAliasesSchema;
|
|
452
|
+
//#endregion
|
|
453
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ResolveAliasesSchema.d.ts
|
|
454
|
+
/**
|
|
455
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
456
|
+
*/
|
|
457
|
+
interface ResolveAliasesSchema {
|
|
458
|
+
/** Names of alias types to exclude from resolving. */
|
|
459
|
+
except?: string[];
|
|
460
|
+
}
|
|
461
|
+
//#endregion
|
|
462
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/FormParameterEncoding.d.ts
|
|
463
|
+
/**
|
|
464
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
465
|
+
*/
|
|
466
|
+
type FormParameterEncoding = "form" | "json";
|
|
467
|
+
declare const FormParameterEncoding: {
|
|
468
|
+
readonly Form: "form";
|
|
469
|
+
readonly Json: "json";
|
|
470
|
+
};
|
|
471
|
+
//#endregion
|
|
472
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/DefaultIntegerFormat.d.ts
|
|
473
|
+
/**
|
|
474
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
475
|
+
*/
|
|
476
|
+
type DefaultIntegerFormat = "int32" | "int64" | "uint32" | "uint64";
|
|
477
|
+
declare const DefaultIntegerFormat: {
|
|
478
|
+
readonly Int32: "int32";
|
|
479
|
+
readonly Int64: "int64";
|
|
480
|
+
readonly Uint32: "uint32";
|
|
481
|
+
readonly Uint64: "uint64";
|
|
482
|
+
};
|
|
483
|
+
//#endregion
|
|
484
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/OpenApiExampleGenerationSchema.d.ts
|
|
485
|
+
interface OpenApiExampleGenerationSchema {
|
|
486
|
+
request?: RequestOrResponseExampleGenerationSchema;
|
|
487
|
+
response?: RequestOrResponseExampleGenerationSchema;
|
|
488
|
+
}
|
|
489
|
+
//#endregion
|
|
490
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/RequestOrResponseExampleGenerationSchema.d.ts
|
|
491
|
+
/**
|
|
492
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
493
|
+
*/
|
|
494
|
+
interface RequestOrResponseExampleGenerationSchema {
|
|
495
|
+
/** Controls the maximum depth for which optional properties will have examples generated. A depth of 0 means no optional properties will have examples. */
|
|
496
|
+
"max-depth"?: number;
|
|
497
|
+
}
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/OpenApiFilterSchema.d.ts
|
|
500
|
+
/**
|
|
501
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
502
|
+
*/
|
|
503
|
+
interface OpenApiFilterSchema {
|
|
504
|
+
/** Endpoints to include in the generated SDK (e.g. "POST /users"). */
|
|
505
|
+
endpoints?: string[];
|
|
506
|
+
}
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/OpenApiSpecSchema.d.ts
|
|
509
|
+
interface OpenApiSpecSchema {
|
|
510
|
+
openapi: string;
|
|
511
|
+
origin?: string;
|
|
512
|
+
overrides?: string;
|
|
513
|
+
namespace?: string;
|
|
514
|
+
settings?: OpenApiSettingsSchema;
|
|
515
|
+
}
|
|
516
|
+
//#endregion
|
|
517
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/OpenRpcSpecSchema.d.ts
|
|
518
|
+
/**
|
|
519
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
520
|
+
*/
|
|
521
|
+
interface OpenRpcSpecSchema {
|
|
522
|
+
openrpc: string;
|
|
523
|
+
overrides?: string;
|
|
524
|
+
namespace?: string;
|
|
525
|
+
}
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/AsyncApiSettingsSchema.d.ts
|
|
528
|
+
interface AsyncApiSettingsSchema extends BaseApiSettingsSchema {
|
|
529
|
+
/** What version of message naming to use for AsyncAPI messages, this will grow over time. Defaults to v1. */
|
|
530
|
+
"message-naming"?: MessageNamingSettingsSchema;
|
|
531
|
+
}
|
|
532
|
+
//#endregion
|
|
533
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/AsyncApiSpecSchema.d.ts
|
|
534
|
+
interface AsyncApiSpecSchema {
|
|
535
|
+
asyncapi: string;
|
|
536
|
+
origin?: string;
|
|
537
|
+
overrides?: string;
|
|
538
|
+
namespace?: string;
|
|
539
|
+
settings?: AsyncApiSettingsSchema;
|
|
540
|
+
}
|
|
541
|
+
//#endregion
|
|
542
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ConjureSchema.d.ts
|
|
543
|
+
/**
|
|
544
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
545
|
+
*/
|
|
546
|
+
interface ConjureSchema {
|
|
547
|
+
conjure: string;
|
|
548
|
+
}
|
|
549
|
+
//#endregion
|
|
550
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/SpecSchema.d.ts
|
|
551
|
+
type SpecSchema = OpenApiSpecSchema | AsyncApiSpecSchema | ProtobufSpecSchema | OpenRpcSpecSchema;
|
|
552
|
+
//#endregion
|
|
553
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/ProtobufSpecSchema.d.ts
|
|
554
|
+
interface ProtobufSpecSchema {
|
|
555
|
+
proto: ProtobufDefinitionSchema;
|
|
556
|
+
}
|
|
557
|
+
//#endregion
|
|
558
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/generators/types/Language.d.ts
|
|
559
|
+
/**
|
|
560
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
561
|
+
*/
|
|
562
|
+
type Language = "java" | "python" | "go" | "ruby" | "csharp" | "typescript" | "php" | "rust" | "swift";
|
|
563
|
+
declare const Language: {
|
|
564
|
+
readonly Java: "java";
|
|
565
|
+
readonly Python: "python";
|
|
566
|
+
readonly Go: "go";
|
|
567
|
+
readonly Ruby: "ruby";
|
|
568
|
+
readonly Csharp: "csharp";
|
|
569
|
+
readonly Typescript: "typescript";
|
|
570
|
+
readonly Php: "php";
|
|
571
|
+
readonly Rust: "rust";
|
|
572
|
+
readonly Swift: "swift";
|
|
573
|
+
};
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GeneratorGroupSchema.d.ts
|
|
576
|
+
interface GeneratorGroupSchema {
|
|
577
|
+
audiences?: string[];
|
|
578
|
+
generators: GeneratorInvocationSchema[];
|
|
579
|
+
metadata?: OutputMetadataSchema;
|
|
580
|
+
reviewers?: ReviewersSchema;
|
|
581
|
+
}
|
|
582
|
+
//#endregion
|
|
583
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GeneratorInvocationSchema.d.ts
|
|
584
|
+
interface GeneratorInvocationSchema {
|
|
585
|
+
name: string;
|
|
586
|
+
version: string;
|
|
587
|
+
output?: GeneratorOutputSchema;
|
|
588
|
+
github?: GithubConfigurationSchema;
|
|
589
|
+
config?: unknown;
|
|
590
|
+
metadata?: GeneratorPublishMetadataSchema;
|
|
591
|
+
/** Overrides the keywords that require safe name variants. */
|
|
592
|
+
keywords?: string[];
|
|
593
|
+
/** Configures snippets for a particular generator. */
|
|
594
|
+
snippets?: GeneratorSnippetsSchema;
|
|
595
|
+
/** Overrides the version of the IR used by the generator. */
|
|
596
|
+
"ir-version"?: string;
|
|
597
|
+
/** Feature flag used to enable better IR naming. */
|
|
598
|
+
"smart-casing"?: boolean;
|
|
599
|
+
/** Override API import settings (this is applied across all specs) */
|
|
600
|
+
api?: GeneratorApiSettingsSchema;
|
|
601
|
+
/** Temporary way to unblock example serialization. */
|
|
602
|
+
"disable-examples"?: boolean;
|
|
603
|
+
/** Deprecated, use `metadata` on the output block instead. */
|
|
604
|
+
"publish-metadata"?: GeneratorPublishMetadataSchema;
|
|
605
|
+
/**
|
|
606
|
+
* If true, automatically release this SDK when changes are detected.
|
|
607
|
+
* Overrides the top-level autorelease setting if specified.
|
|
608
|
+
*/
|
|
609
|
+
autorelease?: boolean;
|
|
610
|
+
}
|
|
611
|
+
//#endregion
|
|
612
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GeneratorApiSettingsSchema.d.ts
|
|
613
|
+
/**
|
|
614
|
+
* Override API configuration settings for a specific generator.
|
|
615
|
+
* When specs is provided, it completely replaces the top-level api.specs configuration for this generator.
|
|
616
|
+
*/
|
|
617
|
+
interface GeneratorApiSettingsSchema {
|
|
618
|
+
auth?: ApiAuthSchema;
|
|
619
|
+
"auth-schemes"?: Record<string, AuthSchemeDeclarationSchema>;
|
|
620
|
+
settings?: ApiConfigurationV2SettingsSchema;
|
|
621
|
+
/**
|
|
622
|
+
* Override the specs configuration for this generator.
|
|
623
|
+
* When provided, this completely replaces the top-level api.specs configuration.
|
|
624
|
+
*/
|
|
625
|
+
specs?: ApiConfigurationV2SpecsSchema;
|
|
626
|
+
}
|
|
627
|
+
//#endregion
|
|
628
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GeneratorOutputSchema.d.ts
|
|
629
|
+
type GeneratorOutputSchema = GeneratorOutputSchema.Npm | GeneratorOutputSchema.Maven | GeneratorOutputSchema.Pypi | GeneratorOutputSchema.Postman | GeneratorOutputSchema.LocalFileSystem | GeneratorOutputSchema.Nuget | GeneratorOutputSchema.Rubygems | GeneratorOutputSchema.Crates;
|
|
630
|
+
declare namespace GeneratorOutputSchema {
|
|
631
|
+
interface Npm extends NpmOutputLocationSchema {
|
|
632
|
+
location: "npm";
|
|
633
|
+
}
|
|
634
|
+
interface Maven extends MavenOutputLocationSchema {
|
|
635
|
+
location: "maven";
|
|
636
|
+
}
|
|
637
|
+
interface Pypi extends PypiOutputLocationSchema {
|
|
638
|
+
location: "pypi";
|
|
639
|
+
}
|
|
640
|
+
interface Postman extends PostmanOutputLocationSchema {
|
|
641
|
+
location: "postman";
|
|
642
|
+
}
|
|
643
|
+
interface LocalFileSystem extends LocalFileSystemOutputLocationSchema {
|
|
644
|
+
location: "local-file-system";
|
|
645
|
+
}
|
|
646
|
+
interface Nuget extends NugetOutputLocationSchema {
|
|
647
|
+
location: "nuget";
|
|
648
|
+
}
|
|
649
|
+
interface Rubygems extends RubyGemsOutputLocationSchema {
|
|
650
|
+
location: "rubygems";
|
|
651
|
+
}
|
|
652
|
+
interface Crates extends CratesOutputLocationSchema {
|
|
653
|
+
location: "crates";
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
//#endregion
|
|
657
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GithubConfigurationSchema.d.ts
|
|
658
|
+
type GithubConfigurationSchema = GithubSelfhostedSchema | GithubCommitAndReleaseSchema | GithubPullRequestSchema | GithubPushSchema;
|
|
659
|
+
//#endregion
|
|
660
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GithubSelfhostedSchema.d.ts
|
|
661
|
+
interface GithubSelfhostedSchema {
|
|
662
|
+
uri: string;
|
|
663
|
+
token: string;
|
|
664
|
+
mode?: GithubSelfhostedMode;
|
|
665
|
+
branch?: string;
|
|
666
|
+
license?: GithubLicenseSchema;
|
|
667
|
+
}
|
|
668
|
+
//#endregion
|
|
669
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GithubSelfhostedMode.d.ts
|
|
670
|
+
/**
|
|
671
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
672
|
+
*/
|
|
673
|
+
type GithubSelfhostedMode = "pull-request" | "push";
|
|
674
|
+
declare const GithubSelfhostedMode: {
|
|
675
|
+
readonly PullRequest: "pull-request";
|
|
676
|
+
readonly Push: "push";
|
|
677
|
+
};
|
|
678
|
+
//#endregion
|
|
679
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GeneratorSnippetsSchema.d.ts
|
|
680
|
+
/**
|
|
681
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
682
|
+
*/
|
|
683
|
+
interface GeneratorSnippetsSchema {
|
|
684
|
+
/** The path to the generated snippets file. */
|
|
685
|
+
path: string;
|
|
686
|
+
}
|
|
687
|
+
//#endregion
|
|
688
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GeneratorPublishMetadataSchema.d.ts
|
|
689
|
+
interface GeneratorPublishMetadataSchema {
|
|
690
|
+
"package-description"?: string;
|
|
691
|
+
email?: string;
|
|
692
|
+
"reference-url"?: string;
|
|
693
|
+
author?: string;
|
|
694
|
+
license?: GithubLicenseSchema;
|
|
695
|
+
}
|
|
696
|
+
//#endregion
|
|
697
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GithubCommitAndReleaseSchema.d.ts
|
|
698
|
+
interface GithubCommitAndReleaseSchema {
|
|
699
|
+
repository: string;
|
|
700
|
+
license?: GithubLicenseSchema;
|
|
701
|
+
mode?: GithubCommitAndReleaseMode;
|
|
702
|
+
}
|
|
703
|
+
//#endregion
|
|
704
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GithubCommitAndReleaseMode.d.ts
|
|
705
|
+
/**
|
|
706
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
707
|
+
*/
|
|
708
|
+
type GithubCommitAndReleaseMode = "commit" | "release";
|
|
709
|
+
declare const GithubCommitAndReleaseMode: {
|
|
710
|
+
readonly Commit: "commit";
|
|
711
|
+
readonly Release: "release";
|
|
712
|
+
};
|
|
713
|
+
//#endregion
|
|
714
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GithubPullRequestSchema.d.ts
|
|
715
|
+
interface GithubPullRequestSchema {
|
|
716
|
+
repository: string;
|
|
717
|
+
branch?: string;
|
|
718
|
+
license?: GithubLicenseSchema;
|
|
719
|
+
mode: "pull-request";
|
|
720
|
+
reviewers?: ReviewersSchema;
|
|
721
|
+
}
|
|
722
|
+
//#endregion
|
|
723
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/GithubPushSchema.d.ts
|
|
724
|
+
interface GithubPushSchema {
|
|
725
|
+
repository: string;
|
|
726
|
+
license?: GithubLicenseSchema;
|
|
727
|
+
mode: "push";
|
|
728
|
+
branch?: string;
|
|
729
|
+
}
|
|
730
|
+
//#endregion
|
|
731
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/NpmOutputLocationSchema.d.ts
|
|
732
|
+
/**
|
|
733
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
734
|
+
*/
|
|
735
|
+
interface NpmOutputLocationSchema {
|
|
736
|
+
url?: string;
|
|
737
|
+
"package-name": string;
|
|
738
|
+
token?: string;
|
|
739
|
+
}
|
|
740
|
+
//#endregion
|
|
741
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/MavenOutputLocationSchema.d.ts
|
|
742
|
+
interface MavenOutputLocationSchema {
|
|
743
|
+
url?: string;
|
|
744
|
+
coordinate: string;
|
|
745
|
+
username?: string;
|
|
746
|
+
password?: string;
|
|
747
|
+
signature?: MavenOutputSignatureSchema;
|
|
748
|
+
}
|
|
749
|
+
//#endregion
|
|
750
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/MavenOutputSignatureSchema.d.ts
|
|
751
|
+
/**
|
|
752
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
753
|
+
*/
|
|
754
|
+
interface MavenOutputSignatureSchema {
|
|
755
|
+
keyId: string;
|
|
756
|
+
password: string;
|
|
757
|
+
secretKey: string;
|
|
758
|
+
}
|
|
759
|
+
//#endregion
|
|
760
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/PypiOutputLocationSchema.d.ts
|
|
761
|
+
interface PypiOutputLocationSchema {
|
|
762
|
+
url?: string;
|
|
763
|
+
"package-name": string;
|
|
764
|
+
token?: string;
|
|
765
|
+
username?: string;
|
|
766
|
+
password?: string;
|
|
767
|
+
metadata?: PypiOutputMetadataSchema;
|
|
768
|
+
}
|
|
769
|
+
//#endregion
|
|
770
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/PypiOutputMetadataSchema.d.ts
|
|
771
|
+
interface PypiOutputMetadataSchema extends OutputMetadataSchema {
|
|
772
|
+
keywords?: string[];
|
|
773
|
+
"documentation-link"?: string;
|
|
774
|
+
"homepage-link"?: string;
|
|
775
|
+
}
|
|
776
|
+
//#endregion
|
|
777
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/PostmanOutputLocationSchema.d.ts
|
|
778
|
+
/**
|
|
779
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
780
|
+
*/
|
|
781
|
+
interface PostmanOutputLocationSchema {
|
|
782
|
+
"api-key": string;
|
|
783
|
+
"workspace-id": string;
|
|
784
|
+
"collection-id"?: string;
|
|
785
|
+
}
|
|
786
|
+
//#endregion
|
|
787
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/LocalFileSystemOutputLocationSchema.d.ts
|
|
788
|
+
/**
|
|
789
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
790
|
+
*/
|
|
791
|
+
interface LocalFileSystemOutputLocationSchema {
|
|
792
|
+
path: string;
|
|
793
|
+
}
|
|
794
|
+
//#endregion
|
|
795
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/NugetOutputLocationSchema.d.ts
|
|
796
|
+
/**
|
|
797
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
798
|
+
*/
|
|
799
|
+
interface NugetOutputLocationSchema {
|
|
800
|
+
url?: string;
|
|
801
|
+
"package-name": string;
|
|
802
|
+
"api-key"?: string;
|
|
803
|
+
}
|
|
804
|
+
//#endregion
|
|
805
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/RubyGemsOutputLocationSchema.d.ts
|
|
806
|
+
/**
|
|
807
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
808
|
+
*/
|
|
809
|
+
/**
|
|
810
|
+
* It is worth noting that RubyGems API keys need to have the "Push rubygem" permission.
|
|
811
|
+
* Ideally it is also permissioned with index and yank rubygem permissions.
|
|
812
|
+
* Additionally if the creator of the API key has MFA enabled, they must be sure to update their MFA
|
|
813
|
+
* settings to not require MFA for API key usage ("UI and gem signin").
|
|
814
|
+
*/
|
|
815
|
+
interface RubyGemsOutputLocationSchema {
|
|
816
|
+
url?: string;
|
|
817
|
+
"package-name": string;
|
|
818
|
+
"api-key"?: string;
|
|
819
|
+
}
|
|
820
|
+
//#endregion
|
|
821
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/group/types/CratesOutputLocationSchema.d.ts
|
|
822
|
+
/**
|
|
823
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
824
|
+
*/
|
|
825
|
+
/**
|
|
826
|
+
* Configuration for publishing Rust crates to crates.io or a custom registry.
|
|
827
|
+
* API tokens can be created at https://crates.io/settings/tokens with appropriate permissions.
|
|
828
|
+
*/
|
|
829
|
+
interface CratesOutputLocationSchema {
|
|
830
|
+
url?: string;
|
|
831
|
+
"package-name": string;
|
|
832
|
+
token?: string;
|
|
833
|
+
}
|
|
834
|
+
//#endregion
|
|
835
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/license/types/GithubLicenseSchema.d.ts
|
|
836
|
+
type GithubLicenseSchema = GithubLicenseType | GithubLicenseCustomSchema;
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/license/types/GithubLicenseType.d.ts
|
|
839
|
+
/**
|
|
840
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
841
|
+
*/
|
|
842
|
+
type GithubLicenseType = "MIT" | "Apache-2.0";
|
|
843
|
+
declare const GithubLicenseType: {
|
|
844
|
+
readonly Mit: "MIT";
|
|
845
|
+
readonly Apache: "Apache-2.0";
|
|
846
|
+
};
|
|
847
|
+
//#endregion
|
|
848
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/license/types/GithubLicenseCustomSchema.d.ts
|
|
849
|
+
/**
|
|
850
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
851
|
+
*/
|
|
852
|
+
interface GithubLicenseCustomSchema {
|
|
853
|
+
custom: string;
|
|
854
|
+
}
|
|
855
|
+
//#endregion
|
|
856
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/reviewers/types/ReviewersSchema.d.ts
|
|
857
|
+
interface ReviewersSchema {
|
|
858
|
+
teams?: ReviewerSchema[];
|
|
859
|
+
users?: ReviewerSchema[];
|
|
860
|
+
}
|
|
861
|
+
//#endregion
|
|
862
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/reviewers/types/ReviewerSchema.d.ts
|
|
863
|
+
/**
|
|
864
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
865
|
+
*/
|
|
866
|
+
interface ReviewerSchema {
|
|
867
|
+
name: string;
|
|
868
|
+
}
|
|
869
|
+
//#endregion
|
|
870
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/AuthScope.d.ts
|
|
871
|
+
/**
|
|
872
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
873
|
+
*/
|
|
874
|
+
type AuthScope = string;
|
|
875
|
+
//#endregion
|
|
876
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/ApiAuthSchema.d.ts
|
|
877
|
+
type ApiAuthSchema = string | AuthSchemeReferenceSchema | AnyAuthSchemesSchema | EndpointSecuritySchema;
|
|
878
|
+
//#endregion
|
|
879
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/AuthSchemeReferenceSchema.d.ts
|
|
880
|
+
interface AuthSchemeReferenceSchema extends WithDocsSchema {
|
|
881
|
+
scheme: string;
|
|
882
|
+
}
|
|
883
|
+
//#endregion
|
|
884
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/AnyAuthSchemesSchema.d.ts
|
|
885
|
+
interface AnyAuthSchemesSchema extends WithDocsSchema {
|
|
886
|
+
any: AnyAuthItem[];
|
|
887
|
+
}
|
|
888
|
+
//#endregion
|
|
889
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/EndpointSecuritySchema.d.ts
|
|
890
|
+
interface EndpointSecuritySchema extends WithDocsSchema {
|
|
891
|
+
/** Indicates that authentication requirements are defined per-endpoint via the `security` field. */
|
|
892
|
+
"endpoint-security": EndpointSecuritySchemaDetails;
|
|
893
|
+
}
|
|
894
|
+
//#endregion
|
|
895
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/EndpointSecuritySchemaDetails.d.ts
|
|
896
|
+
/**
|
|
897
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
898
|
+
*/
|
|
899
|
+
interface EndpointSecuritySchemaDetails {}
|
|
900
|
+
//#endregion
|
|
901
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/AnyAuthItem.d.ts
|
|
902
|
+
type AnyAuthItem = string | AuthSchemeReferenceSchema;
|
|
903
|
+
//#endregion
|
|
904
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/AuthSchemeDeclarationSchema.d.ts
|
|
905
|
+
type AuthSchemeDeclarationSchema = OAuthSchemeSchema | HeaderAuthSchemeSchema | BasicAuthSchemeSchema | BearerAuthSchemeSchema;
|
|
906
|
+
//#endregion
|
|
907
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/WithEnvironmentVariable.d.ts
|
|
908
|
+
/**
|
|
909
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
910
|
+
*/
|
|
911
|
+
interface WithEnvironmentVariable {
|
|
912
|
+
env?: string;
|
|
913
|
+
}
|
|
914
|
+
//#endregion
|
|
915
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/AuthVariable.d.ts
|
|
916
|
+
interface AuthVariable extends WithEnvironmentVariable, WithName {}
|
|
917
|
+
//#endregion
|
|
918
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/HeaderAuthSchemeSchema.d.ts
|
|
919
|
+
interface HeaderAuthSchemeSchema extends WithEnvironmentVariable, WithName, WithDocsSchema {
|
|
920
|
+
header: string;
|
|
921
|
+
/** Defaults to string */
|
|
922
|
+
type?: string;
|
|
923
|
+
prefix?: string;
|
|
924
|
+
}
|
|
925
|
+
//#endregion
|
|
926
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/BasicAuthSchemeSchema.d.ts
|
|
927
|
+
interface BasicAuthSchemeSchema extends WithDocsSchema {
|
|
928
|
+
scheme: "basic";
|
|
929
|
+
username?: AuthVariable;
|
|
930
|
+
password?: AuthVariable;
|
|
931
|
+
}
|
|
932
|
+
//#endregion
|
|
933
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/BearerAuthSchemeSchema.d.ts
|
|
934
|
+
type BearerAuthSchemeSchema = TokenBearerAuthSchema | InferredBearerAuthSchema;
|
|
935
|
+
//#endregion
|
|
936
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/TokenBearerAuthSchema.d.ts
|
|
937
|
+
interface TokenBearerAuthSchema extends WithDocsSchema {
|
|
938
|
+
scheme: "bearer";
|
|
939
|
+
token?: AuthVariable;
|
|
940
|
+
}
|
|
941
|
+
//#endregion
|
|
942
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/InferredBearerAuthSchema.d.ts
|
|
943
|
+
interface InferredBearerAuthSchema extends WithDocsSchema {
|
|
944
|
+
scheme: "bearer";
|
|
945
|
+
"get-token": InferredGetTokenEndpointSchema;
|
|
946
|
+
}
|
|
947
|
+
//#endregion
|
|
948
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/InferredGetTokenEndpointSchema.d.ts
|
|
949
|
+
type InferredGetTokenEndpointSchema = string | InferredGetTokenEndpointSchemaObject;
|
|
950
|
+
//#endregion
|
|
951
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/InferredGetTokenEndpointSchemaObject.d.ts
|
|
952
|
+
interface InferredGetTokenEndpointSchemaObject {
|
|
953
|
+
/** The endpoint to get the access token, such as 'auth.get_token' */
|
|
954
|
+
endpoint: string;
|
|
955
|
+
/** The property name for the expiry time in the response. */
|
|
956
|
+
"expiry-response-property"?: string;
|
|
957
|
+
/** The headers that will be set on HTTP requests when the inferred auth scheme is applied to an endpoint. */
|
|
958
|
+
"authenticated-request-headers"?: InferredAuthenticatedRequestHeader[];
|
|
959
|
+
}
|
|
960
|
+
//#endregion
|
|
961
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/InferredAuthenticatedRequestHeader.d.ts
|
|
962
|
+
/**
|
|
963
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
964
|
+
*/
|
|
965
|
+
/**
|
|
966
|
+
* A header that will be set on HTTP requests when the inferred auth scheme is applied to an endpoint. These are not headers for the authorization endpoint.
|
|
967
|
+
*/
|
|
968
|
+
interface InferredAuthenticatedRequestHeader {
|
|
969
|
+
/** The property to retrieve the header value from the get token or refresh endpoint response. */
|
|
970
|
+
"response-property": string;
|
|
971
|
+
/** The header name to put the token in for any authenticated HTTP request. */
|
|
972
|
+
"header-name": string;
|
|
973
|
+
/** Commonly used for setting the `Authorization` scheme, but could be used for other things. */
|
|
974
|
+
"value-prefix"?: string;
|
|
975
|
+
}
|
|
976
|
+
//#endregion
|
|
977
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/OAuthSchemeSchema.d.ts
|
|
978
|
+
interface OAuthSchemeSchema extends WithDocsSchema {
|
|
979
|
+
scheme: "oauth";
|
|
980
|
+
type: "client-credentials";
|
|
981
|
+
scopes?: AuthScope[];
|
|
982
|
+
"client-id-env"?: string;
|
|
983
|
+
"client-secret-env"?: string;
|
|
984
|
+
/** Sets the token header value prefix. Defaults to 'Bearer' */
|
|
985
|
+
"token-prefix"?: string;
|
|
986
|
+
/** Sets the token header key name. Defaults to 'Authorization' */
|
|
987
|
+
"token-header"?: string;
|
|
988
|
+
"get-token": OAuthGetTokenEndpointSchema;
|
|
989
|
+
"refresh-token"?: OAuthRefreshTokenEndpointSchema;
|
|
990
|
+
}
|
|
991
|
+
//#endregion
|
|
992
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/OAuthGetTokenEndpointSchema.d.ts
|
|
993
|
+
interface OAuthGetTokenEndpointSchema {
|
|
994
|
+
/** The endpoint to get the access token, such as 'auth.get_token */
|
|
995
|
+
endpoint: string;
|
|
996
|
+
"request-properties"?: OAuthAccessTokenRequestPropertiesSchema;
|
|
997
|
+
"response-properties"?: OAuthAccessTokenResponsePropertiesSchema;
|
|
998
|
+
}
|
|
999
|
+
//#endregion
|
|
1000
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/OAuthAccessTokenRequestPropertiesSchema.d.ts
|
|
1001
|
+
/**
|
|
1002
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1003
|
+
*/
|
|
1004
|
+
interface OAuthAccessTokenRequestPropertiesSchema {
|
|
1005
|
+
/** The property name for the client ID. */
|
|
1006
|
+
"client-id"?: string;
|
|
1007
|
+
/** The property name for the client secret. */
|
|
1008
|
+
"client-secret"?: string;
|
|
1009
|
+
/** The property name for the scopes. */
|
|
1010
|
+
scopes?: string;
|
|
1011
|
+
}
|
|
1012
|
+
//#endregion
|
|
1013
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/OAuthAccessTokenResponsePropertiesSchema.d.ts
|
|
1014
|
+
/**
|
|
1015
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1016
|
+
*/
|
|
1017
|
+
interface OAuthAccessTokenResponsePropertiesSchema {
|
|
1018
|
+
/** The property name for the access token. */
|
|
1019
|
+
"access-token"?: string;
|
|
1020
|
+
/** The property name for the expires in property. */
|
|
1021
|
+
"expires-in"?: string;
|
|
1022
|
+
/** The property name for the refresh token */
|
|
1023
|
+
"refresh-token"?: string;
|
|
1024
|
+
}
|
|
1025
|
+
//#endregion
|
|
1026
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/OAuthRefreshTokenEndpointSchema.d.ts
|
|
1027
|
+
interface OAuthRefreshTokenEndpointSchema {
|
|
1028
|
+
/** The endpoint to refresh the access token, such as 'auth.refresh_token */
|
|
1029
|
+
endpoint: string;
|
|
1030
|
+
"request-properties"?: OAuthRefreshTokenRequestPropertiesSchema;
|
|
1031
|
+
"response-properties"?: OAuthRefreshTokenResponsePropertiesSchema;
|
|
1032
|
+
}
|
|
1033
|
+
//#endregion
|
|
1034
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/OAuthRefreshTokenRequestPropertiesSchema.d.ts
|
|
1035
|
+
/**
|
|
1036
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1037
|
+
*/
|
|
1038
|
+
interface OAuthRefreshTokenRequestPropertiesSchema {
|
|
1039
|
+
/** The property name for the refresh token. */
|
|
1040
|
+
"refresh-token": string;
|
|
1041
|
+
}
|
|
1042
|
+
//#endregion
|
|
1043
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/auth/types/OAuthRefreshTokenResponsePropertiesSchema.d.ts
|
|
1044
|
+
/**
|
|
1045
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1046
|
+
*/
|
|
1047
|
+
interface OAuthRefreshTokenResponsePropertiesSchema {
|
|
1048
|
+
/** The property name for the access token. */
|
|
1049
|
+
"access-token"?: string;
|
|
1050
|
+
/** The property name for the expires in property. */
|
|
1051
|
+
"expires-in"?: string;
|
|
1052
|
+
/** The property name for the refresh token. */
|
|
1053
|
+
"refresh-token"?: string;
|
|
1054
|
+
}
|
|
1055
|
+
//#endregion
|
|
1056
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/availability/types/AvailabilityUnionSchema.d.ts
|
|
1057
|
+
type AvailabilityUnionSchema = AvailabilityStatusSchema | AvailabilitySchema;
|
|
1058
|
+
//#endregion
|
|
1059
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/availability/types/AvailabilitySchema.d.ts
|
|
1060
|
+
interface AvailabilitySchema {
|
|
1061
|
+
status: AvailabilityStatusSchema;
|
|
1062
|
+
message?: string;
|
|
1063
|
+
}
|
|
1064
|
+
//#endregion
|
|
1065
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/availability/types/AvailabilityStatusSchema.d.ts
|
|
1066
|
+
/**
|
|
1067
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1068
|
+
*/
|
|
1069
|
+
type AvailabilityStatusSchema = "in-development" | "pre-release" | "deprecated" | "generally-available";
|
|
1070
|
+
declare const AvailabilityStatusSchema: {
|
|
1071
|
+
readonly InDevelopment: "in-development";
|
|
1072
|
+
readonly PreRelease: "pre-release";
|
|
1073
|
+
readonly Deprecated: "deprecated";
|
|
1074
|
+
readonly GenerallyAvailable: "generally-available";
|
|
1075
|
+
};
|
|
1076
|
+
//#endregion
|
|
1077
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/commons/types/WithDocsSchema.d.ts
|
|
1078
|
+
/**
|
|
1079
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1080
|
+
*/
|
|
1081
|
+
interface WithDocsSchema {
|
|
1082
|
+
docs?: string;
|
|
1083
|
+
}
|
|
1084
|
+
//#endregion
|
|
1085
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/commons/types/WithName.d.ts
|
|
1086
|
+
/**
|
|
1087
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1088
|
+
*/
|
|
1089
|
+
interface WithName {
|
|
1090
|
+
name?: string;
|
|
1091
|
+
}
|
|
1092
|
+
//#endregion
|
|
1093
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/commons/types/WithAvailability.d.ts
|
|
1094
|
+
interface WithAvailability {
|
|
1095
|
+
availability?: AvailabilityUnionSchema;
|
|
1096
|
+
}
|
|
1097
|
+
//#endregion
|
|
1098
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/commons/types/WithAudiences.d.ts
|
|
1099
|
+
/**
|
|
1100
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1101
|
+
*/
|
|
1102
|
+
interface WithAudiences {
|
|
1103
|
+
audiences?: string[];
|
|
1104
|
+
}
|
|
1105
|
+
//#endregion
|
|
1106
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/encoding/types/EncodingSchema.d.ts
|
|
1107
|
+
interface EncodingSchema {
|
|
1108
|
+
proto?: ProtobufTypeSchema;
|
|
1109
|
+
}
|
|
1110
|
+
//#endregion
|
|
1111
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/encoding/types/ProtobufTypeSchema.d.ts
|
|
1112
|
+
/**
|
|
1113
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1114
|
+
*/
|
|
1115
|
+
interface ProtobufTypeSchema {
|
|
1116
|
+
/** The name of the Protobuf type (e.g. google.protobuf.Struct). */
|
|
1117
|
+
type: string;
|
|
1118
|
+
}
|
|
1119
|
+
//#endregion
|
|
1120
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/environments/types/WithEnvironmentsSchema.d.ts
|
|
1121
|
+
interface WithEnvironmentsSchema {
|
|
1122
|
+
"default-url"?: string;
|
|
1123
|
+
"default-environment"?: string;
|
|
1124
|
+
environments?: Record<string, EnvironmentSchema>;
|
|
1125
|
+
}
|
|
1126
|
+
//#endregion
|
|
1127
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/environments/types/EnvironmentSchema.d.ts
|
|
1128
|
+
type EnvironmentSchema = string | SingleBaseUrlEnvironmentSchema | MultipleBaseUrlsEnvironmentSchema;
|
|
1129
|
+
//#endregion
|
|
1130
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/environments/types/SingleBaseUrlEnvironmentSchema.d.ts
|
|
1131
|
+
interface SingleBaseUrlEnvironmentSchema extends WithAudiences, WithDocsSchema {
|
|
1132
|
+
url: string;
|
|
1133
|
+
}
|
|
1134
|
+
//#endregion
|
|
1135
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/environments/types/MultipleBaseUrlsEnvironmentSchema.d.ts
|
|
1136
|
+
interface MultipleBaseUrlsEnvironmentSchema extends WithAudiences, WithDocsSchema {
|
|
1137
|
+
urls: Record<string, string>;
|
|
1138
|
+
}
|
|
1139
|
+
//#endregion
|
|
1140
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/file/types/WithHeadersSchema.d.ts
|
|
1141
|
+
interface WithHeadersSchema {
|
|
1142
|
+
/** Global Headers for the entire API */
|
|
1143
|
+
headers?: Record<string, HttpHeaderSchema>;
|
|
1144
|
+
}
|
|
1145
|
+
//#endregion
|
|
1146
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/service/types/TypeReferenceDeclarationWithEnvOverride.d.ts
|
|
1147
|
+
type TypeReferenceDeclarationWithEnvOverride = string | TypeReferenceDeclarationWithEnvOverrideSchema;
|
|
1148
|
+
//#endregion
|
|
1149
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/service/types/TypeReferenceDeclarationWithEnvOverrideSchema.d.ts
|
|
1150
|
+
interface TypeReferenceDeclarationWithEnvOverrideSchema extends TypeReferenceDeclarationWithName {
|
|
1151
|
+
env?: string;
|
|
1152
|
+
}
|
|
1153
|
+
//#endregion
|
|
1154
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/service/types/HttpHeaderSchema.d.ts
|
|
1155
|
+
type HttpHeaderSchema = TypeReferenceDeclarationWithEnvOverride;
|
|
1156
|
+
//#endregion
|
|
1157
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/types/types/BaseTypeReferenceSchema.d.ts
|
|
1158
|
+
interface BaseTypeReferenceSchema extends WithDocsSchema, WithAvailability {
|
|
1159
|
+
default?: unknown;
|
|
1160
|
+
encoding?: EncodingSchema;
|
|
1161
|
+
validation?: ValidationSchema;
|
|
1162
|
+
}
|
|
1163
|
+
//#endregion
|
|
1164
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/types/types/TypeReferenceDeclarationWithName.d.ts
|
|
1165
|
+
interface TypeReferenceDeclarationWithName extends BaseTypeReferenceSchema, WithName, WithAudiences {
|
|
1166
|
+
type: string;
|
|
1167
|
+
}
|
|
1168
|
+
//#endregion
|
|
1169
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/validation/types/ValidationSchema.d.ts
|
|
1170
|
+
type ValidationSchema = StringValidationSchema | NumberValidationSchema;
|
|
1171
|
+
//#endregion
|
|
1172
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/validation/types/StringValidationSchema.d.ts
|
|
1173
|
+
/**
|
|
1174
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1175
|
+
*/
|
|
1176
|
+
interface StringValidationSchema {
|
|
1177
|
+
minLength?: number;
|
|
1178
|
+
maxLength?: number;
|
|
1179
|
+
pattern?: string;
|
|
1180
|
+
format?: string;
|
|
1181
|
+
}
|
|
1182
|
+
//#endregion
|
|
1183
|
+
//#region ../cli/configuration/lib/generators-yml/schemas/api/resources/fernDefinition/resources/validation/types/NumberValidationSchema.d.ts
|
|
1184
|
+
/**
|
|
1185
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
1186
|
+
*/
|
|
1187
|
+
interface NumberValidationSchema {
|
|
1188
|
+
min?: number;
|
|
1189
|
+
max?: number;
|
|
1190
|
+
exclusiveMin?: boolean;
|
|
1191
|
+
exclusiveMax?: boolean;
|
|
1192
|
+
multipleOf?: number;
|
|
1193
|
+
}
|
|
1194
|
+
//#endregion
|
|
1195
|
+
//#region ../cli/logger/lib/LogLevel.d.ts
|
|
1196
|
+
declare const LogLevel: {
|
|
1197
|
+
readonly Trace: "trace";
|
|
1198
|
+
readonly Debug: "debug";
|
|
1199
|
+
readonly Info: "info";
|
|
1200
|
+
readonly Warn: "warn";
|
|
1201
|
+
readonly Error: "error";
|
|
1202
|
+
};
|
|
1203
|
+
type LogLevel = Values<typeof LogLevel>;
|
|
1204
|
+
//#endregion
|
|
1205
|
+
//#region ../cli/logger/lib/Logger.d.ts
|
|
1206
|
+
interface Logger {
|
|
1207
|
+
disable: () => void;
|
|
1208
|
+
enable: () => void;
|
|
1209
|
+
trace: (...args: string[]) => void;
|
|
1210
|
+
debug: (...args: string[]) => void;
|
|
1211
|
+
info: (...args: string[]) => void;
|
|
1212
|
+
warn: (...args: string[]) => void;
|
|
1213
|
+
error: (...args: string[]) => void;
|
|
1214
|
+
log: (level: LogLevel, ...args: string[]) => void;
|
|
1215
|
+
}
|
|
1216
|
+
//#endregion
|
|
1217
|
+
//#region ../migrations-base/lib/types.d.ts
|
|
1218
|
+
/**
|
|
1219
|
+
* Represents the raw YAML document structure for generators.yml.
|
|
1220
|
+
* This is used for migrations that need to manipulate the entire document.
|
|
1221
|
+
*/
|
|
1222
|
+
interface GeneratorsYmlDocument {
|
|
1223
|
+
/**
|
|
1224
|
+
* The raw generators configuration schema.
|
|
1225
|
+
* This matches the structure of generators.yml files.
|
|
1226
|
+
*/
|
|
1227
|
+
configuration: GeneratorsConfigurationSchema;
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* Context provided to migrations for logging and other utilities.
|
|
1231
|
+
*/
|
|
1232
|
+
interface MigrationContext {
|
|
1233
|
+
/**
|
|
1234
|
+
* Logger that migrations can use to provide feedback.
|
|
1235
|
+
*/
|
|
1236
|
+
logger: Logger;
|
|
1237
|
+
}
|
|
1238
|
+
/**
|
|
1239
|
+
* A migration that transforms generator configuration from one version to another.
|
|
1240
|
+
* Migrations are run sequentially when upgrading between versions.
|
|
1241
|
+
*/
|
|
1242
|
+
interface Migration {
|
|
1243
|
+
/**
|
|
1244
|
+
* The version this migration upgrades TO (not from).
|
|
1245
|
+
* This should be a valid semver string (e.g., "2.0.0", "1.5.0").
|
|
1246
|
+
*/
|
|
1247
|
+
version: string;
|
|
1248
|
+
/**
|
|
1249
|
+
* Migrates a single generator configuration.
|
|
1250
|
+
* This is called for each generator in generators.yml during an upgrade.
|
|
1251
|
+
*
|
|
1252
|
+
* @param params - Parameters object
|
|
1253
|
+
* @param params.config - The generator configuration to migrate
|
|
1254
|
+
* @param params.context - Context for the migration (includes logger and other utilities)
|
|
1255
|
+
* @returns A new generator configuration with migrations applied
|
|
1256
|
+
*
|
|
1257
|
+
* @example
|
|
1258
|
+
* ```typescript
|
|
1259
|
+
* migrateGeneratorConfig: ({ config, context }) => {
|
|
1260
|
+
* context.logger.debug("Setting old defaults for backwards compatibility");
|
|
1261
|
+
* return {
|
|
1262
|
+
* ...config,
|
|
1263
|
+
* config: {
|
|
1264
|
+
* ...(typeof config.config === 'object' ? config.config : {}),
|
|
1265
|
+
* newField: "default-value"
|
|
1266
|
+
* }
|
|
1267
|
+
* };
|
|
1268
|
+
* }
|
|
1269
|
+
* ```
|
|
1270
|
+
*/
|
|
1271
|
+
migrateGeneratorConfig: (params: {
|
|
1272
|
+
config: GeneratorInvocationSchema;
|
|
1273
|
+
context: MigrationContext;
|
|
1274
|
+
}) => GeneratorInvocationSchema;
|
|
1275
|
+
/**
|
|
1276
|
+
* Migrates the entire generators.yml document.
|
|
1277
|
+
* This is useful for migrations that need to modify top-level configuration
|
|
1278
|
+
* or perform transformations across multiple generators.
|
|
1279
|
+
*
|
|
1280
|
+
* @param params - Parameters object
|
|
1281
|
+
* @param params.document - The full generators.yml document
|
|
1282
|
+
* @param params.context - Context for the migration (includes logger and other utilities)
|
|
1283
|
+
* @returns A new document with migrations applied
|
|
1284
|
+
*
|
|
1285
|
+
* @example
|
|
1286
|
+
* ```typescript
|
|
1287
|
+
* migrateGeneratorsYml: ({ document, context }) => {
|
|
1288
|
+
* context.logger.debug("Updating top-level configuration");
|
|
1289
|
+
* return {
|
|
1290
|
+
* configuration: {
|
|
1291
|
+
* ...document.configuration,
|
|
1292
|
+
* newTopLevelField: "value"
|
|
1293
|
+
* }
|
|
1294
|
+
* };
|
|
1295
|
+
* }
|
|
1296
|
+
* ```
|
|
1297
|
+
*/
|
|
1298
|
+
migrateGeneratorsYml: (params: {
|
|
1299
|
+
document: GeneratorsYmlDocument;
|
|
1300
|
+
context: MigrationContext;
|
|
1301
|
+
}) => GeneratorsYmlDocument;
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* A module that exports migrations for a specific generator.
|
|
1305
|
+
* This is the interface that migration packages must implement.
|
|
1306
|
+
*/
|
|
1307
|
+
interface MigrationModule {
|
|
1308
|
+
/**
|
|
1309
|
+
* Array of migrations for this generator, ordered by version.
|
|
1310
|
+
* Migrations will be filtered and sorted by the CLI before execution.
|
|
1311
|
+
*/
|
|
1312
|
+
migrations: Migration[];
|
|
1313
|
+
}
|
|
1314
|
+
//#endregion
|
|
1315
|
+
//#region src/index.d.ts
|
|
1316
|
+
/**
|
|
1317
|
+
* All generator migrations indexed by full generator name.
|
|
1318
|
+
*
|
|
1319
|
+
* When adding migrations for a new generator:
|
|
1320
|
+
* 1. Add migrations under src/generators/{language}/migrations/
|
|
1321
|
+
* 2. Import the migration module
|
|
1322
|
+
* 3. Add entries for all generator name variants
|
|
1323
|
+
*/
|
|
1324
|
+
declare const migrations: Record<string, MigrationModule>;
|
|
1325
|
+
//#endregion
|
|
1326
|
+
export { migrations };
|
|
1327
|
+
//# sourceMappingURL=index.d.mts.map
|