Skip to content

Commit

Permalink
(release): v0.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-bot committed May 17, 2024
1 parent 5840ca4 commit 3c8e36e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 18 deletions.
5 changes: 4 additions & 1 deletion .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@

src/Client.ts
src/core/form-data-utils/FormDataWrapper.ts
README.md
src/core/form-data-utils/index.ts
src/core/index.ts
README.md
package.json
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"form-data": "4.0.0",
"node-fetch": "2.7.0",
"qs": "6.11.2",
"formdata-node": "^6.0.3",
"form-data-encoder": "^4.0.2",
"js-base64": "3.7.2"
},
"devDependencies": {
Expand Down
17 changes: 0 additions & 17 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ import * as stream from "stream";
import urlJoin from "url-join";
import * as errors from "./errors/index";
import * as serializers from "./serialization/index";
import { Pdf } from "./api/resources/pdf/client/Client";

export declare namespace FileForgeClient {
interface Options {
environment?: core.Supplier<environments.FileForgeEnvironment | string>;
username: core.Supplier<string>;
password: core.Supplier<string>;
apiKey: core.Supplier<string>;
}

Expand Down Expand Up @@ -55,7 +52,6 @@ export class FileForgeClient {
),
method: "POST",
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-API-Key": await core.Supplier.get(this._options.apiKey),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "fileforge",
Expand Down Expand Up @@ -126,17 +122,4 @@ export class FileForgeClient {
});
}
}

protected _pdf: Pdf | undefined;

public get pdf(): Pdf {
return (this._pdf ??= new Pdf(this._options));
}

protected async _getAuthorizationHeader(): Promise<string | undefined> {
return core.BasicAuth.toAuthorizationHeader({
username: await core.Supplier.get(this._options.username),
password: await core.Supplier.get(this._options.password),
});
}
}
1 change: 1 addition & 0 deletions src/core/form-data-utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./FormDataWrapper";
2 changes: 2 additions & 0 deletions src/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export * from "./fetcher";
export * from "./runtime";
export * from "./auth";
export * from "./form-data-utils";
export * as serialization from "./schemas";

10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,11 @@ find-up@^4.0.0, find-up@^4.1.0:
locate-path "^5.0.0"
path-exists "^4.0.0"

form-data-encoder@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-4.0.2.tgz#dd286fd5f9049e8ded1d44ce427f5e29185c7c12"
integrity sha512-KQVhvhK8ZkWzxKxOr56CPulAhH3dobtuQ4+hNQ+HekH/Wp5gSOafqRAeTphQUJAIk0GBvHZgJ2ZGRWd5kphMuw==

[email protected], form-data@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
Expand All @@ -1251,6 +1256,11 @@ [email protected], form-data@^4.0.0:
combined-stream "^1.0.8"
mime-types "^2.1.12"

formdata-node@^6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/formdata-node/-/formdata-node-6.0.3.tgz#48f8e2206ae2befded82af621ef015f08168dc6d"
integrity sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg==

fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
Expand Down

0 comments on commit 3c8e36e

Please sign in to comment.