@fern-api/python-dynamic-snippets 4.54.0 → 4.54.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.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, AbstractAstNode, AbstractDynamicSnippetsGenerator } from '@fern-api/browser-compatible-base-generator';
1
+ import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, AbstractAstNode, AbstractDynamicSnippetsGenerator, Options } from '@fern-api/browser-compatible-base-generator';
2
2
  import { FernIr } from '@fern-api/dynamic-ir-sdk';
3
3
  import { python } from '@fern-api/python-ast';
4
4
  import { BasePythonCustomConfigSchema } from '@fern-api/python-browser-compatible-base';
@@ -152,24 +152,23 @@ declare class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<
152
152
  ir: FernIr.dynamic.DynamicIntermediateRepresentation;
153
153
  config: FernGeneratorExec.GeneratorConfig;
154
154
  });
155
- generate(request: FernIr.dynamic.EndpointSnippetRequest): Promise<FernIr.dynamic.EndpointSnippetResponse>;
156
- generateSync(request: FernIr.dynamic.EndpointSnippetRequest): FernIr.dynamic.EndpointSnippetResponse;
157
- generateSnippetAst(request: FernIr.dynamic.EndpointSnippetRequest): Promise<AbstractAstNode>;
155
+ generate(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): Promise<FernIr.dynamic.EndpointSnippetResponse>;
156
+ generateSync(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): FernIr.dynamic.EndpointSnippetResponse;
157
+ generateSnippetAst(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): Promise<AbstractAstNode>;
158
158
  /**
159
159
  * Generates just the method call AST without the client instantiation.
160
160
  * This is useful for wire tests where the client is created separately
161
161
  * with test-specific configuration.
162
+ *
163
+ * @param request - The snippet request
164
+ * @param options - Optional options, including endpointId to resolve a specific endpoint
165
+ * when multiple endpoints share the same HTTP method and path
162
166
  */
163
- generateMethodCallSnippetAst(request: FernIr.dynamic.EndpointSnippetRequest): python.AstNode;
164
- /**
165
- * Generates just the method call AST without the client instantiation, using the endpoint ID directly.
166
- * This is useful for wire tests where the client is created separately with test-specific configuration,
167
- * and when there are multiple endpoints with the same HTTP method and path pattern across different namespaces.
168
- */
169
- generateMethodCallSnippetAstById({ endpointId, request }: {
170
- endpointId: FernIr.dynamic.EndpointId;
167
+ generateMethodCallSnippetAst({ request, options }: {
171
168
  request: FernIr.dynamic.EndpointSnippetRequest;
169
+ options?: Options;
172
170
  }): python.AstNode;
171
+ private resolveEndpointsForMethodCall;
173
172
  protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator;
174
173
  }
175
174
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, AbstractAstNode, AbstractDynamicSnippetsGenerator } from '@fern-api/browser-compatible-base-generator';
1
+ import { AbstractDynamicSnippetsGeneratorContext, FernGeneratorExec, AbstractAstNode, AbstractDynamicSnippetsGenerator, Options } from '@fern-api/browser-compatible-base-generator';
2
2
  import { FernIr } from '@fern-api/dynamic-ir-sdk';
3
3
  import { python } from '@fern-api/python-ast';
4
4
  import { BasePythonCustomConfigSchema } from '@fern-api/python-browser-compatible-base';
@@ -152,24 +152,23 @@ declare class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<
152
152
  ir: FernIr.dynamic.DynamicIntermediateRepresentation;
153
153
  config: FernGeneratorExec.GeneratorConfig;
154
154
  });
155
- generate(request: FernIr.dynamic.EndpointSnippetRequest): Promise<FernIr.dynamic.EndpointSnippetResponse>;
156
- generateSync(request: FernIr.dynamic.EndpointSnippetRequest): FernIr.dynamic.EndpointSnippetResponse;
157
- generateSnippetAst(request: FernIr.dynamic.EndpointSnippetRequest): Promise<AbstractAstNode>;
155
+ generate(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): Promise<FernIr.dynamic.EndpointSnippetResponse>;
156
+ generateSync(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): FernIr.dynamic.EndpointSnippetResponse;
157
+ generateSnippetAst(request: FernIr.dynamic.EndpointSnippetRequest, options?: Options): Promise<AbstractAstNode>;
158
158
  /**
159
159
  * Generates just the method call AST without the client instantiation.
160
160
  * This is useful for wire tests where the client is created separately
161
161
  * with test-specific configuration.
162
+ *
163
+ * @param request - The snippet request
164
+ * @param options - Optional options, including endpointId to resolve a specific endpoint
165
+ * when multiple endpoints share the same HTTP method and path
162
166
  */
163
- generateMethodCallSnippetAst(request: FernIr.dynamic.EndpointSnippetRequest): python.AstNode;
164
- /**
165
- * Generates just the method call AST without the client instantiation, using the endpoint ID directly.
166
- * This is useful for wire tests where the client is created separately with test-specific configuration,
167
- * and when there are multiple endpoints with the same HTTP method and path pattern across different namespaces.
168
- */
169
- generateMethodCallSnippetAstById({ endpointId, request }: {
170
- endpointId: FernIr.dynamic.EndpointId;
167
+ generateMethodCallSnippetAst({ request, options }: {
171
168
  request: FernIr.dynamic.EndpointSnippetRequest;
169
+ options?: Options;
172
170
  }): python.AstNode;
171
+ private resolveEndpointsForMethodCall;
173
172
  protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator;
174
173
  }
175
174