@fern-api/csharp-dynamic-snippets 2.11.2 → 2.11.4

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.
Files changed (73) hide show
  1. package/dist/index.cjs +122 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/{cjs/DynamicSnippetsGeneratorContext-pehoeH_w.d.cts → dist/index.d.cts} +76 -3
  4. package/{esm/DynamicSnippetsGeneratorContext-pehoeH_w.d.ts → dist/index.d.ts} +76 -3
  5. package/dist/index.js +122 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +11 -12
  8. package/cjs/Config.cjs +0 -2
  9. package/cjs/Config.cjs.map +0 -1
  10. package/cjs/Config.d.cts +0 -5
  11. package/cjs/DynamicSnippetsGenerator.cjs +0 -46
  12. package/cjs/DynamicSnippetsGenerator.cjs.map +0 -1
  13. package/cjs/DynamicSnippetsGenerator.d.cts +0 -23
  14. package/cjs/EndpointSnippetGenerator.cjs +0 -45
  15. package/cjs/EndpointSnippetGenerator.cjs.map +0 -1
  16. package/cjs/EndpointSnippetGenerator.d.cts +0 -65
  17. package/cjs/context/DynamicLiteralMapper.cjs +0 -2
  18. package/cjs/context/DynamicLiteralMapper.cjs.map +0 -1
  19. package/cjs/context/DynamicLiteralMapper.d.cts +0 -7
  20. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +0 -33
  21. package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +0 -1
  22. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +0 -7
  23. package/cjs/context/DynamicTypeMapper.cjs +0 -2
  24. package/cjs/context/DynamicTypeMapper.cjs.map +0 -1
  25. package/cjs/context/DynamicTypeMapper.d.cts +0 -7
  26. package/cjs/context/FilePropertyMapper.cjs +0 -28
  27. package/cjs/context/FilePropertyMapper.cjs.map +0 -1
  28. package/cjs/context/FilePropertyMapper.d.cts +0 -7
  29. package/cjs/index.cjs +0 -46
  30. package/cjs/index.cjs.map +0 -1
  31. package/cjs/index.d.cts +0 -10
  32. package/esm/Config.d.ts +0 -5
  33. package/esm/Config.js +0 -2
  34. package/esm/Config.js.map +0 -1
  35. package/esm/DynamicSnippetsGenerator.d.ts +0 -23
  36. package/esm/DynamicSnippetsGenerator.js +0 -2
  37. package/esm/DynamicSnippetsGenerator.js.map +0 -1
  38. package/esm/EndpointSnippetGenerator.d.ts +0 -65
  39. package/esm/EndpointSnippetGenerator.js +0 -2
  40. package/esm/EndpointSnippetGenerator.js.map +0 -1
  41. package/esm/chunk-3XDW3MPR.js +0 -2
  42. package/esm/chunk-3XDW3MPR.js.map +0 -1
  43. package/esm/chunk-CEB5TOCF.js +0 -33
  44. package/esm/chunk-CEB5TOCF.js.map +0 -1
  45. package/esm/chunk-DBQMCX7L.js +0 -2
  46. package/esm/chunk-DBQMCX7L.js.map +0 -1
  47. package/esm/chunk-EC2FLIE6.js +0 -15
  48. package/esm/chunk-EC2FLIE6.js.map +0 -1
  49. package/esm/chunk-EUEE2577.js +0 -2
  50. package/esm/chunk-EUEE2577.js.map +0 -1
  51. package/esm/chunk-GEII674B.js +0 -2
  52. package/esm/chunk-GEII674B.js.map +0 -1
  53. package/esm/chunk-KFPJC632.js +0 -2
  54. package/esm/chunk-KFPJC632.js.map +0 -1
  55. package/esm/chunk-KHCIVF5J.js +0 -1
  56. package/esm/chunk-KHCIVF5J.js.map +0 -1
  57. package/esm/chunk-KIW23CQ5.js +0 -2
  58. package/esm/chunk-KIW23CQ5.js.map +0 -1
  59. package/esm/context/DynamicLiteralMapper.d.ts +0 -7
  60. package/esm/context/DynamicLiteralMapper.js +0 -2
  61. package/esm/context/DynamicLiteralMapper.js.map +0 -1
  62. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +0 -7
  63. package/esm/context/DynamicSnippetsGeneratorContext.js +0 -2
  64. package/esm/context/DynamicSnippetsGeneratorContext.js.map +0 -1
  65. package/esm/context/DynamicTypeMapper.d.ts +0 -7
  66. package/esm/context/DynamicTypeMapper.js +0 -2
  67. package/esm/context/DynamicTypeMapper.js.map +0 -1
  68. package/esm/context/FilePropertyMapper.d.ts +0 -7
  69. package/esm/context/FilePropertyMapper.js +0 -2
  70. package/esm/context/FilePropertyMapper.js.map +0 -1
  71. package/esm/index.d.ts +0 -10
  72. package/esm/index.js +0 -2
  73. package/esm/index.js.map +0 -1
@@ -1,10 +1,14 @@
1
+ import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, Options, AbstractDynamicSnippetsGenerator, AbstractAstNode } from '@fern-api/browser-compatible-base-generator';
2
+ import { FernIr } from '@fern-api/dynamic-ir-sdk';
1
3
  import * as _fern_api_csharp_codegen_lib_ast from '@fern-api/csharp-codegen/lib/ast';
2
4
  import * as _fern_api_csharp_codegen_lib_ast_types_Type from '@fern-api/csharp-codegen/lib/ast/types/Type';
3
5
  import * as _fern_api_csharp_codegen_lib_context_model_navigator from '@fern-api/csharp-codegen/lib/context/model-navigator';
4
6
  import * as _fern_api_csharp_codegen from '@fern-api/csharp-codegen';
5
7
  import { WithGeneration, ast, Generation } from '@fern-api/csharp-codegen';
6
- import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, Options } from '@fern-api/browser-compatible-base-generator';
7
- import { FernIr } from '@fern-api/dynamic-ir-sdk';
8
+
9
+ interface Config {
10
+ fullStyleClassName?: string;
11
+ }
8
12
 
9
13
  declare namespace DynamicLiteralMapper {
10
14
  interface Args {
@@ -443,4 +447,73 @@ declare class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGen
443
447
  precalculate(requests: Partial<FernIr.dynamic.EndpointSnippetRequest>[]): void;
444
448
  }
445
449
 
446
- export { DynamicSnippetsGeneratorContext as D, type FilePropertyInfo as F, DynamicLiteralMapper as a, DynamicTypeMapper as b, FilePropertyMapper as c };
450
+ declare class EndpointSnippetGenerator extends WithGeneration {
451
+ private context;
452
+ constructor({ context }: {
453
+ context: DynamicSnippetsGeneratorContext;
454
+ });
455
+ generateSnippet({ endpoint, request, options }: {
456
+ endpoint: FernIr.dynamic.Endpoint;
457
+ request: FernIr.dynamic.EndpointSnippetRequest;
458
+ options: Options;
459
+ }): Promise<string>;
460
+ generateSnippetSync({ endpoint, request, options }: {
461
+ endpoint: FernIr.dynamic.Endpoint;
462
+ request: FernIr.dynamic.EndpointSnippetRequest;
463
+ options: Options;
464
+ }): string;
465
+ generateSnippetAst({ endpoint, request, options }: {
466
+ endpoint: FernIr.dynamic.Endpoint;
467
+ request: FernIr.dynamic.EndpointSnippetRequest;
468
+ options?: Options;
469
+ }): Promise<ast.AstNode>;
470
+ private buildCodeBlock;
471
+ private buildFullCodeBlock;
472
+ private constructClient;
473
+ private callMethod;
474
+ private getConstructorArgs;
475
+ private getConstructorBaseUrlArgs;
476
+ private getBaseUrlArg;
477
+ private getConstructorAuthArgs;
478
+ private addError;
479
+ private addWarning;
480
+ private getConstructorBasicAuthArg;
481
+ private getConstructorBearerAuthArgs;
482
+ private getConstructorHeaderAuthArgs;
483
+ private getConstructorOAuthArgs;
484
+ private getConstructorHeaderArgs;
485
+ private getConstructorHeaderArg;
486
+ private getMethodArgs;
487
+ private getMethodArgsForInlinedRequest;
488
+ private getFilePropertyInfo;
489
+ private getInlinedRequestArg;
490
+ private getInlinedRequestBodyConstructorFields;
491
+ private getInlinedRequestBodyPropertyConstructorFields;
492
+ private getFileUploadRequestBodyConstructorFields;
493
+ private getReferencedRequestBodyPropertyConstructorField;
494
+ private getReferencedRequestBodyPropertyLiteral;
495
+ private getMethodArgsForBodyRequest;
496
+ private getBodyRequestArg;
497
+ private getBytesBodyRequestArg;
498
+ private getRootClientConstructorInvocation;
499
+ private getPathParameters;
500
+ private getMethod;
501
+ private getBaseUrlOptionName;
502
+ private getStyle;
503
+ private getConfig;
504
+ }
505
+
506
+ declare class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<DynamicSnippetsGeneratorContext, EndpointSnippetGenerator> {
507
+ constructor({ ir, config, options }: {
508
+ ir: FernIr.dynamic.DynamicIntermediateRepresentation;
509
+ config: FernGeneratorExec.GeneratorConfig;
510
+ options?: Options;
511
+ });
512
+ precalculate(requests: FernIr.dynamic.EndpointSnippetRequest[]): void;
513
+ generate(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): Promise<FernIr.dynamic.EndpointSnippetResponse>;
514
+ generateSync(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): FernIr.dynamic.EndpointSnippetResponse;
515
+ generateSnippetAst(request: FernIr.dynamic.EndpointSnippetRequest): Promise<AbstractAstNode>;
516
+ protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator;
517
+ }
518
+
519
+ export { type Config, DynamicSnippetsGenerator };
@@ -1,10 +1,14 @@
1
+ import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, Options, AbstractDynamicSnippetsGenerator, AbstractAstNode } from '@fern-api/browser-compatible-base-generator';
2
+ import { FernIr } from '@fern-api/dynamic-ir-sdk';
1
3
  import * as _fern_api_csharp_codegen_lib_ast from '@fern-api/csharp-codegen/lib/ast';
2
4
  import * as _fern_api_csharp_codegen_lib_ast_types_Type from '@fern-api/csharp-codegen/lib/ast/types/Type';
3
5
  import * as _fern_api_csharp_codegen_lib_context_model_navigator from '@fern-api/csharp-codegen/lib/context/model-navigator';
4
6
  import * as _fern_api_csharp_codegen from '@fern-api/csharp-codegen';
5
7
  import { WithGeneration, ast, Generation } from '@fern-api/csharp-codegen';
6
- import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, Options } from '@fern-api/browser-compatible-base-generator';
7
- import { FernIr } from '@fern-api/dynamic-ir-sdk';
8
+
9
+ interface Config {
10
+ fullStyleClassName?: string;
11
+ }
8
12
 
9
13
  declare namespace DynamicLiteralMapper {
10
14
  interface Args {
@@ -443,4 +447,73 @@ declare class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGen
443
447
  precalculate(requests: Partial<FernIr.dynamic.EndpointSnippetRequest>[]): void;
444
448
  }
445
449
 
446
- export { DynamicSnippetsGeneratorContext as D, type FilePropertyInfo as F, DynamicLiteralMapper as a, DynamicTypeMapper as b, FilePropertyMapper as c };
450
+ declare class EndpointSnippetGenerator extends WithGeneration {
451
+ private context;
452
+ constructor({ context }: {
453
+ context: DynamicSnippetsGeneratorContext;
454
+ });
455
+ generateSnippet({ endpoint, request, options }: {
456
+ endpoint: FernIr.dynamic.Endpoint;
457
+ request: FernIr.dynamic.EndpointSnippetRequest;
458
+ options: Options;
459
+ }): Promise<string>;
460
+ generateSnippetSync({ endpoint, request, options }: {
461
+ endpoint: FernIr.dynamic.Endpoint;
462
+ request: FernIr.dynamic.EndpointSnippetRequest;
463
+ options: Options;
464
+ }): string;
465
+ generateSnippetAst({ endpoint, request, options }: {
466
+ endpoint: FernIr.dynamic.Endpoint;
467
+ request: FernIr.dynamic.EndpointSnippetRequest;
468
+ options?: Options;
469
+ }): Promise<ast.AstNode>;
470
+ private buildCodeBlock;
471
+ private buildFullCodeBlock;
472
+ private constructClient;
473
+ private callMethod;
474
+ private getConstructorArgs;
475
+ private getConstructorBaseUrlArgs;
476
+ private getBaseUrlArg;
477
+ private getConstructorAuthArgs;
478
+ private addError;
479
+ private addWarning;
480
+ private getConstructorBasicAuthArg;
481
+ private getConstructorBearerAuthArgs;
482
+ private getConstructorHeaderAuthArgs;
483
+ private getConstructorOAuthArgs;
484
+ private getConstructorHeaderArgs;
485
+ private getConstructorHeaderArg;
486
+ private getMethodArgs;
487
+ private getMethodArgsForInlinedRequest;
488
+ private getFilePropertyInfo;
489
+ private getInlinedRequestArg;
490
+ private getInlinedRequestBodyConstructorFields;
491
+ private getInlinedRequestBodyPropertyConstructorFields;
492
+ private getFileUploadRequestBodyConstructorFields;
493
+ private getReferencedRequestBodyPropertyConstructorField;
494
+ private getReferencedRequestBodyPropertyLiteral;
495
+ private getMethodArgsForBodyRequest;
496
+ private getBodyRequestArg;
497
+ private getBytesBodyRequestArg;
498
+ private getRootClientConstructorInvocation;
499
+ private getPathParameters;
500
+ private getMethod;
501
+ private getBaseUrlOptionName;
502
+ private getStyle;
503
+ private getConfig;
504
+ }
505
+
506
+ declare class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<DynamicSnippetsGeneratorContext, EndpointSnippetGenerator> {
507
+ constructor({ ir, config, options }: {
508
+ ir: FernIr.dynamic.DynamicIntermediateRepresentation;
509
+ config: FernGeneratorExec.GeneratorConfig;
510
+ options?: Options;
511
+ });
512
+ precalculate(requests: FernIr.dynamic.EndpointSnippetRequest[]): void;
513
+ generate(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): Promise<FernIr.dynamic.EndpointSnippetResponse>;
514
+ generateSync(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): FernIr.dynamic.EndpointSnippetResponse;
515
+ generateSnippetAst(request: FernIr.dynamic.EndpointSnippetRequest): Promise<AbstractAstNode>;
516
+ protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator;
517
+ }
518
+
519
+ export { type Config, DynamicSnippetsGenerator };