Release 0.2.19: Update Fern TS SDK (#3807)

This commit is contained in:
Stanislav Novosad
2025-10-24 12:28:29 -06:00
committed by GitHub
parent 5872e3cde0
commit 43048b1c12
10 changed files with 2489 additions and 2577 deletions

View File

@@ -41,10 +41,7 @@ export class Scripts {
): Promise<core.WithRawResponse<unknown>> {
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
this._options?.headers,
mergeOnlyDefinedHeaders({
"x-api-key": requestOptions?.apiKey ?? this._options?.apiKey,
...(await this._getCustomAuthorizationHeaders()),
}),
mergeOnlyDefinedHeaders({ "x-api-key": requestOptions?.apiKey ?? this._options?.apiKey }),
requestOptions?.headers,
);
const _response = await core.fetcher({
@@ -94,9 +91,4 @@ export class Scripts {
});
}
}
protected async _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>> {
const xApiKeyValue = await core.Supplier.get(this._options.xApiKey);
return { "x-api-key": xApiKeyValue };
}
}