Skip to content

Commit

Permalink
Changes method response types
Browse files Browse the repository at this point in the history
  • Loading branch information
pierredge committed May 27, 2024
1 parent 558cfb0 commit 2118941
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 4 deletions.
Binary file modified output.pdf
Binary file not shown.
Binary file modified outputSnippet.pdf
Binary file not shown.
Binary file modified output_helper.pdf
Binary file not shown.
Binary file modified output_merged.pdf
Binary file not shown.
6 changes: 3 additions & 3 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as stream from "stream";
import urlJoin from "url-join";
import * as errors from "./errors/index";
import * as serializers from "./serialization/index";

import { ResponseObject } from "./helper";
export declare namespace FileForgeClient {
interface Options {
environment?: core.Supplier<environments.FileForgeEnvironment | string>;
Expand Down Expand Up @@ -40,7 +40,7 @@ export class FileForgeClient {
files: File[] | fs.ReadStream[],
request: FileForge.GenerateRequest,
requestOptions?: FileForgeClient.RequestOptions
): Promise<stream.Readable | any>{
): Promise<ResponseObject | any>{
const _request = core.newFormData();
const options = await serializers.GenerateRequestOptions.jsonOrThrow(request.options, {
unrecognizedObjectKeys: "passthrough",
Expand Down Expand Up @@ -109,7 +109,7 @@ export class FileForgeClient {
files: File[] | fs.ReadStream[],
request: FileForge.MergeRequest,
requestOptions?: FileForgeClient.RequestOptions
): Promise<stream.Readable | any> {
): Promise<ResponseObject | any> {
const _request = core.newFormData();
const options = await serializers.GenerateRequestOptions.jsonOrThrow(request.options, {
unrecognizedObjectKeys: "passthrough",
Expand Down
2 changes: 1 addition & 1 deletion tests/custom.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe("test", () => {
{
options: {},
}
);
) as ResponseStream;

// Write the PDF stream to a file
const writeStream = fs.createWriteStream('output_merged.pdf');
Expand Down

0 comments on commit 2118941

Please sign in to comment.