Skip to content

Commit

Permalink
Release 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jul 12, 2024
1 parent d712123 commit 17d0c05
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Instantiate and use the client with the following:
```typescript
import { CrossmintClient, Crossmint } from "crossmint";

const client = new CrossmintClient({ apiKey: "YOUR_API_KEY", authorization: "YOUR_AUTHORIZATION" });
const client = new CrossmintClient({ apiKey: "YOUR_API_KEY" });
await client.headless.createOrder({
payment: {
method: Crossmint.PaymentZeroMethod.ArbitrumSepolia,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crossmint",
"version": "0.0.2",
"version": "0.0.3",
"private": false,
"repository": "https://github.com/fern-demo/crossmint-typescript-sdk",
"main": "./index.js",
Expand Down
3 changes: 0 additions & 3 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export declare namespace CrossmintClient {
interface Options {
environment?: core.Supplier<environments.CrossmintEnvironment | string>;
apiKey: core.Supplier<string>;
authorization: core.Supplier<string>;
fetcher?: core.FetchFunction;
}

Expand All @@ -21,8 +20,6 @@ export declare namespace CrossmintClient {
maxRetries?: number;
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Authorization header */
authorization?: string;
}
}

Expand Down
12 changes: 4 additions & 8 deletions src/api/resources/headless/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export declare namespace Headless {
interface Options {
environment?: core.Supplier<environments.CrossmintEnvironment | string>;
apiKey: core.Supplier<string>;
authorization: core.Supplier<string>;
fetcher?: core.FetchFunction;
}

Expand All @@ -24,8 +23,6 @@ export declare namespace Headless {
maxRetries?: number;
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Authorization header */
authorization?: string;
}
}

Expand Down Expand Up @@ -67,7 +64,7 @@ export class Headless {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.0.2",
"X-Fern-SDK-Version": "0.0.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -179,7 +176,7 @@ export class Headless {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.0.2",
"X-Fern-SDK-Version": "0.0.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -295,7 +292,7 @@ export class Headless {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "crossmint",
"X-Fern-SDK-Version": "0.0.2",
"X-Fern-SDK-Version": "0.0.3",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -382,8 +379,7 @@ export class Headless {
}

protected async _getCustomAuthorizationHeaders() {
const authorizationValue = await core.Supplier.get(this._options.authorization);
const apiKeyValue = await core.Supplier.get(this._options.apiKey);
return { Authorization: authorizationValue, "X-API-KEY": apiKeyValue };
return { "X-API-KEY": apiKeyValue };
}
}

0 comments on commit 17d0c05

Please sign in to comment.