@fern-api/go-dynamic-snippets 1.65.1 → 1.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -244,6 +244,11 @@ declare class EndpointSnippetGenerator {
|
|
|
244
244
|
private callMethod;
|
|
245
245
|
private getConstructorArgs;
|
|
246
246
|
private getWiremockTestConstructorArgs;
|
|
247
|
+
/**
|
|
248
|
+
* Path parameters bound to an SDK variable are configured on the client via
|
|
249
|
+
* option.With<Variable>(...) rather than passed to the endpoint method.
|
|
250
|
+
*/
|
|
251
|
+
private getConstructorSdkVariableArgs;
|
|
247
252
|
private getConstructorAuthArgs;
|
|
248
253
|
private addError;
|
|
249
254
|
private addWarning;
|
|
@@ -303,4 +308,24 @@ declare class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<
|
|
|
303
308
|
protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator;
|
|
304
309
|
}
|
|
305
310
|
|
|
306
|
-
|
|
311
|
+
/**
|
|
312
|
+
* RequestOptions field names that a client-level variable must not shadow. Kept in
|
|
313
|
+
* sync with the reserved names in the Go v1 generator (sdk.go).
|
|
314
|
+
*/
|
|
315
|
+
declare const RESERVED_OPTION_NAMES: ReadonlySet<string>;
|
|
316
|
+
interface SdkVariableNames {
|
|
317
|
+
/** Exported identifier used for the RequestOptions field, option struct and With<Name> helper. */
|
|
318
|
+
fieldName: string;
|
|
319
|
+
/** Unexported identifier used for parameters and local variables. */
|
|
320
|
+
localName: string;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Returns the Go identifiers an SDK variable (bound to path parameters via
|
|
324
|
+
* x-fern-sdk-variable) is exposed under, de-collided against reserved option names.
|
|
325
|
+
*/
|
|
326
|
+
declare function getSdkVariableNames({ pascal, camel }: {
|
|
327
|
+
pascal: string;
|
|
328
|
+
camel: string;
|
|
329
|
+
}): SdkVariableNames;
|
|
330
|
+
|
|
331
|
+
export { DynamicSnippetsGenerator, RESERVED_OPTION_NAMES, type SdkVariableNames, getSdkVariableNames };
|
package/dist/index.d.ts
CHANGED
|
@@ -244,6 +244,11 @@ declare class EndpointSnippetGenerator {
|
|
|
244
244
|
private callMethod;
|
|
245
245
|
private getConstructorArgs;
|
|
246
246
|
private getWiremockTestConstructorArgs;
|
|
247
|
+
/**
|
|
248
|
+
* Path parameters bound to an SDK variable are configured on the client via
|
|
249
|
+
* option.With<Variable>(...) rather than passed to the endpoint method.
|
|
250
|
+
*/
|
|
251
|
+
private getConstructorSdkVariableArgs;
|
|
247
252
|
private getConstructorAuthArgs;
|
|
248
253
|
private addError;
|
|
249
254
|
private addWarning;
|
|
@@ -303,4 +308,24 @@ declare class DynamicSnippetsGenerator extends AbstractDynamicSnippetsGenerator<
|
|
|
303
308
|
protected createSnippetGenerator(context: DynamicSnippetsGeneratorContext): EndpointSnippetGenerator;
|
|
304
309
|
}
|
|
305
310
|
|
|
306
|
-
|
|
311
|
+
/**
|
|
312
|
+
* RequestOptions field names that a client-level variable must not shadow. Kept in
|
|
313
|
+
* sync with the reserved names in the Go v1 generator (sdk.go).
|
|
314
|
+
*/
|
|
315
|
+
declare const RESERVED_OPTION_NAMES: ReadonlySet<string>;
|
|
316
|
+
interface SdkVariableNames {
|
|
317
|
+
/** Exported identifier used for the RequestOptions field, option struct and With<Name> helper. */
|
|
318
|
+
fieldName: string;
|
|
319
|
+
/** Unexported identifier used for parameters and local variables. */
|
|
320
|
+
localName: string;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Returns the Go identifiers an SDK variable (bound to path parameters via
|
|
324
|
+
* x-fern-sdk-variable) is exposed under, de-collided against reserved option names.
|
|
325
|
+
*/
|
|
326
|
+
declare function getSdkVariableNames({ pascal, camel }: {
|
|
327
|
+
pascal: string;
|
|
328
|
+
camel: string;
|
|
329
|
+
}): SdkVariableNames;
|
|
330
|
+
|
|
331
|
+
export { DynamicSnippetsGenerator, RESERVED_OPTION_NAMES, type SdkVariableNames, getSdkVariableNames };
|