@fern-api/java-dynamic-snippets 3.23.3 → 3.24.1
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.cjs +45 -0
- package/dist/index.cjs.map +1 -0
- package/{cjs/DynamicSnippetsGeneratorContext-BhCKaadj.d.cts → dist/index.d.cts} +77 -2
- package/{esm/DynamicSnippetsGeneratorContext-BhCKaadj.d.ts → dist/index.d.ts} +77 -2
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/package.json +11 -12
- package/cjs/Config.cjs +0 -12
- package/cjs/Config.cjs.map +0 -1
- package/cjs/Config.d.cts +0 -6
- package/cjs/DynamicSnippetsGenerator.cjs +0 -50
- package/cjs/DynamicSnippetsGenerator.cjs.map +0 -1
- package/cjs/DynamicSnippetsGenerator.d.cts +0 -20
- package/cjs/EndpointSnippetGenerator.cjs +0 -33
- package/cjs/EndpointSnippetGenerator.cjs.map +0 -1
- package/cjs/EndpointSnippetGenerator.d.cts +0 -63
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +0 -50
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +0 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +0 -4
- package/cjs/context/DynamicTypeLiteralMapper.cjs +0 -39
- package/cjs/context/DynamicTypeLiteralMapper.cjs.map +0 -1
- package/cjs/context/DynamicTypeLiteralMapper.d.cts +0 -4
- package/cjs/context/DynamicTypeMapper.cjs +0 -33
- package/cjs/context/DynamicTypeMapper.cjs.map +0 -1
- package/cjs/context/DynamicTypeMapper.d.cts +0 -4
- package/cjs/context/FilePropertyMapper.cjs +0 -33
- package/cjs/context/FilePropertyMapper.cjs.map +0 -1
- package/cjs/context/FilePropertyMapper.d.cts +0 -4
- package/cjs/index.cjs +0 -50
- package/cjs/index.cjs.map +0 -1
- package/cjs/index.d.cts +0 -7
- package/esm/Config.d.ts +0 -6
- package/esm/Config.js +0 -2
- package/esm/Config.js.map +0 -1
- package/esm/DynamicSnippetsGenerator.d.ts +0 -20
- package/esm/DynamicSnippetsGenerator.js +0 -2
- package/esm/DynamicSnippetsGenerator.js.map +0 -1
- package/esm/EndpointSnippetGenerator.d.ts +0 -63
- package/esm/EndpointSnippetGenerator.js +0 -2
- package/esm/EndpointSnippetGenerator.js.map +0 -1
- package/esm/chunk-2U3YQWRZ.js +0 -12
- package/esm/chunk-2U3YQWRZ.js.map +0 -1
- package/esm/chunk-C7RK7JUC.js +0 -2
- package/esm/chunk-C7RK7JUC.js.map +0 -1
- package/esm/chunk-FDN2HGWE.js +0 -15
- package/esm/chunk-FDN2HGWE.js.map +0 -1
- package/esm/chunk-FNREWPPJ.js +0 -2
- package/esm/chunk-FNREWPPJ.js.map +0 -1
- package/esm/chunk-JBCRNEMV.js +0 -2
- package/esm/chunk-JBCRNEMV.js.map +0 -1
- package/esm/chunk-N3AIOPEV.js +0 -2
- package/esm/chunk-N3AIOPEV.js.map +0 -1
- package/esm/chunk-OHA6X7RF.js +0 -2
- package/esm/chunk-OHA6X7RF.js.map +0 -1
- package/esm/chunk-PUKCM72D.js +0 -23
- package/esm/chunk-PUKCM72D.js.map +0 -1
- package/esm/chunk-WBDN7N7M.js +0 -8
- package/esm/chunk-WBDN7N7M.js.map +0 -1
- package/esm/chunk-YVHD2ESF.js +0 -2
- package/esm/chunk-YVHD2ESF.js.map +0 -1
- package/esm/context/DynamicSnippetsGeneratorContext.d.ts +0 -4
- package/esm/context/DynamicSnippetsGeneratorContext.js +0 -2
- package/esm/context/DynamicSnippetsGeneratorContext.js.map +0 -1
- package/esm/context/DynamicTypeLiteralMapper.d.ts +0 -4
- package/esm/context/DynamicTypeLiteralMapper.js +0 -2
- package/esm/context/DynamicTypeLiteralMapper.js.map +0 -1
- package/esm/context/DynamicTypeMapper.d.ts +0 -4
- package/esm/context/DynamicTypeMapper.js +0 -2
- package/esm/context/DynamicTypeMapper.js.map +0 -1
- package/esm/context/FilePropertyMapper.d.ts +0 -4
- package/esm/context/FilePropertyMapper.js +0 -2
- package/esm/context/FilePropertyMapper.js.map +0 -1
- package/esm/index.d.ts +0 -7
- package/esm/index.js +0 -2
- package/esm/index.js.map +0 -1
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, Options, TypeInstance } from '@fern-api/browser-compatible-base-generator';
|
|
1
|
+
import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, Options, TypeInstance, AbstractFormatter, AbstractDynamicSnippetsGenerator, AbstractAstNode } from '@fern-api/browser-compatible-base-generator';
|
|
2
2
|
import { FernIr } from '@fern-api/dynamic-ir-sdk';
|
|
3
3
|
import { java, BaseJavaCustomConfigSchema } from '@fern-api/java-ast';
|
|
4
4
|
|
|
5
|
+
interface Config {
|
|
6
|
+
fullStyleClassName?: string;
|
|
7
|
+
fullStylePackageName?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
5
10
|
declare namespace DynamicTypeLiteralMapper {
|
|
6
11
|
interface Args {
|
|
7
12
|
typeReference: FernIr.dynamic.TypeReference;
|
|
@@ -161,4 +166,74 @@ declare class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGen
|
|
|
161
166
|
private isReservedName;
|
|
162
167
|
}
|
|
163
168
|
|
|
164
|
-
|
|
169
|
+
declare class EndpointSnippetGenerator {
|
|
170
|
+
private context;
|
|
171
|
+
private formatter;
|
|
172
|
+
constructor({ context, formatter }: {
|
|
173
|
+
context: DynamicSnippetsGeneratorContext;
|
|
174
|
+
formatter?: AbstractFormatter;
|
|
175
|
+
});
|
|
176
|
+
generateSnippet({ endpoint, request, options }: {
|
|
177
|
+
endpoint: FernIr.dynamic.Endpoint;
|
|
178
|
+
request: FernIr.dynamic.EndpointSnippetRequest;
|
|
179
|
+
options: Options;
|
|
180
|
+
}): Promise<string>;
|
|
181
|
+
generateSnippetSync({ endpoint, request, options }: {
|
|
182
|
+
endpoint: FernIr.dynamic.Endpoint;
|
|
183
|
+
request: FernIr.dynamic.EndpointSnippetRequest;
|
|
184
|
+
options: Options;
|
|
185
|
+
}): string;
|
|
186
|
+
generateSnippetAst({ endpoint, request, options }: {
|
|
187
|
+
endpoint: FernIr.dynamic.Endpoint;
|
|
188
|
+
request: FernIr.dynamic.EndpointSnippetRequest;
|
|
189
|
+
options?: Options;
|
|
190
|
+
}): Promise<java.AstNode>;
|
|
191
|
+
private buildCodeBlock;
|
|
192
|
+
private constructClient;
|
|
193
|
+
private buildFullCodeBlock;
|
|
194
|
+
private getRootClientBuilderArgs;
|
|
195
|
+
private getRootClientBaseUrlArg;
|
|
196
|
+
private getRootClientAuthArgs;
|
|
197
|
+
private addError;
|
|
198
|
+
private addWarning;
|
|
199
|
+
private getRootClientBasicAuthArgs;
|
|
200
|
+
private getRootClientBearerAuthArgs;
|
|
201
|
+
private getRootClientHeaderAuthArgs;
|
|
202
|
+
private getRootClientOAuthArgs;
|
|
203
|
+
private getRootClientHeaderArgs;
|
|
204
|
+
private getRootClientHeaderArg;
|
|
205
|
+
private callMethod;
|
|
206
|
+
private getMethodArgs;
|
|
207
|
+
private getMethodArgsForBodyRequest;
|
|
208
|
+
private usesOptionalNullable;
|
|
209
|
+
private getBodyRequestArg;
|
|
210
|
+
private getBytesBodyRequestArg;
|
|
211
|
+
private getMethodArgsForInlinedRequest;
|
|
212
|
+
private getFilePropertyInfo;
|
|
213
|
+
private getInlinedRequestArg;
|
|
214
|
+
private getRequestOptionsArg;
|
|
215
|
+
private getInlinedRequestBodyBuilderParameters;
|
|
216
|
+
private getFileUploadRequestBodyBuilderParameters;
|
|
217
|
+
private getReferencedRequestBodyPropertyBuilderParameter;
|
|
218
|
+
private getReferencedRequestBodyPropertyTypeLiteral;
|
|
219
|
+
private getInlinedRequestBodyPropertyBuilderParameters;
|
|
220
|
+
private getPathParameters;
|
|
221
|
+
private getMethod;
|
|
222
|
+
private getStyle;
|
|
223
|
+
private getConfig;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<DynamicSnippetsGeneratorContext, EndpointSnippetGenerator> {
|
|
227
|
+
private formatter;
|
|
228
|
+
constructor({ ir, config, options }: {
|
|
229
|
+
ir: FernIr.dynamic.DynamicIntermediateRepresentation;
|
|
230
|
+
config: FernGeneratorExec.GeneratorConfig;
|
|
231
|
+
options?: Options;
|
|
232
|
+
});
|
|
233
|
+
generate(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): Promise<FernIr.dynamic.EndpointSnippetResponse>;
|
|
234
|
+
generateSync(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): FernIr.dynamic.EndpointSnippetResponse;
|
|
235
|
+
generateSnippetAst(request: FernIr.dynamic.EndpointSnippetRequest): Promise<AbstractAstNode>;
|
|
236
|
+
protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export { type Config, DynamicSnippetsGenerator };
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, Options, TypeInstance } from '@fern-api/browser-compatible-base-generator';
|
|
1
|
+
import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, Options, TypeInstance, AbstractFormatter, AbstractDynamicSnippetsGenerator, AbstractAstNode } from '@fern-api/browser-compatible-base-generator';
|
|
2
2
|
import { FernIr } from '@fern-api/dynamic-ir-sdk';
|
|
3
3
|
import { java, BaseJavaCustomConfigSchema } from '@fern-api/java-ast';
|
|
4
4
|
|
|
5
|
+
interface Config {
|
|
6
|
+
fullStyleClassName?: string;
|
|
7
|
+
fullStylePackageName?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
5
10
|
declare namespace DynamicTypeLiteralMapper {
|
|
6
11
|
interface Args {
|
|
7
12
|
typeReference: FernIr.dynamic.TypeReference;
|
|
@@ -161,4 +166,74 @@ declare class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGen
|
|
|
161
166
|
private isReservedName;
|
|
162
167
|
}
|
|
163
168
|
|
|
164
|
-
|
|
169
|
+
declare class EndpointSnippetGenerator {
|
|
170
|
+
private context;
|
|
171
|
+
private formatter;
|
|
172
|
+
constructor({ context, formatter }: {
|
|
173
|
+
context: DynamicSnippetsGeneratorContext;
|
|
174
|
+
formatter?: AbstractFormatter;
|
|
175
|
+
});
|
|
176
|
+
generateSnippet({ endpoint, request, options }: {
|
|
177
|
+
endpoint: FernIr.dynamic.Endpoint;
|
|
178
|
+
request: FernIr.dynamic.EndpointSnippetRequest;
|
|
179
|
+
options: Options;
|
|
180
|
+
}): Promise<string>;
|
|
181
|
+
generateSnippetSync({ endpoint, request, options }: {
|
|
182
|
+
endpoint: FernIr.dynamic.Endpoint;
|
|
183
|
+
request: FernIr.dynamic.EndpointSnippetRequest;
|
|
184
|
+
options: Options;
|
|
185
|
+
}): string;
|
|
186
|
+
generateSnippetAst({ endpoint, request, options }: {
|
|
187
|
+
endpoint: FernIr.dynamic.Endpoint;
|
|
188
|
+
request: FernIr.dynamic.EndpointSnippetRequest;
|
|
189
|
+
options?: Options;
|
|
190
|
+
}): Promise<java.AstNode>;
|
|
191
|
+
private buildCodeBlock;
|
|
192
|
+
private constructClient;
|
|
193
|
+
private buildFullCodeBlock;
|
|
194
|
+
private getRootClientBuilderArgs;
|
|
195
|
+
private getRootClientBaseUrlArg;
|
|
196
|
+
private getRootClientAuthArgs;
|
|
197
|
+
private addError;
|
|
198
|
+
private addWarning;
|
|
199
|
+
private getRootClientBasicAuthArgs;
|
|
200
|
+
private getRootClientBearerAuthArgs;
|
|
201
|
+
private getRootClientHeaderAuthArgs;
|
|
202
|
+
private getRootClientOAuthArgs;
|
|
203
|
+
private getRootClientHeaderArgs;
|
|
204
|
+
private getRootClientHeaderArg;
|
|
205
|
+
private callMethod;
|
|
206
|
+
private getMethodArgs;
|
|
207
|
+
private getMethodArgsForBodyRequest;
|
|
208
|
+
private usesOptionalNullable;
|
|
209
|
+
private getBodyRequestArg;
|
|
210
|
+
private getBytesBodyRequestArg;
|
|
211
|
+
private getMethodArgsForInlinedRequest;
|
|
212
|
+
private getFilePropertyInfo;
|
|
213
|
+
private getInlinedRequestArg;
|
|
214
|
+
private getRequestOptionsArg;
|
|
215
|
+
private getInlinedRequestBodyBuilderParameters;
|
|
216
|
+
private getFileUploadRequestBodyBuilderParameters;
|
|
217
|
+
private getReferencedRequestBodyPropertyBuilderParameter;
|
|
218
|
+
private getReferencedRequestBodyPropertyTypeLiteral;
|
|
219
|
+
private getInlinedRequestBodyPropertyBuilderParameters;
|
|
220
|
+
private getPathParameters;
|
|
221
|
+
private getMethod;
|
|
222
|
+
private getStyle;
|
|
223
|
+
private getConfig;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<DynamicSnippetsGeneratorContext, EndpointSnippetGenerator> {
|
|
227
|
+
private formatter;
|
|
228
|
+
constructor({ ir, config, options }: {
|
|
229
|
+
ir: FernIr.dynamic.DynamicIntermediateRepresentation;
|
|
230
|
+
config: FernGeneratorExec.GeneratorConfig;
|
|
231
|
+
options?: Options;
|
|
232
|
+
});
|
|
233
|
+
generate(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): Promise<FernIr.dynamic.EndpointSnippetResponse>;
|
|
234
|
+
generateSync(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): FernIr.dynamic.EndpointSnippetResponse;
|
|
235
|
+
generateSnippetAst(request: FernIr.dynamic.EndpointSnippetRequest): Promise<AbstractAstNode>;
|
|
236
|
+
protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export { type Config, DynamicSnippetsGenerator };
|