diff --git a/src/open-api/types.ts b/src/open-api/types.ts index 4248b437..fe568140 100644 --- a/src/open-api/types.ts +++ b/src/open-api/types.ts @@ -155,7 +155,7 @@ export interface HttpInputParameters { headers?: Record; body?: unknown; connectionTimeOut?: number; - readTimeOut?: string; + readTimeOut?: number; } export interface HttpTaskDef extends CommonTaskDef { diff --git a/src/sdk/builders/tasks/__tests__/factory.test.ts b/src/sdk/builders/tasks/__tests__/factory.test.ts index fffbb6b4..90120761 100644 --- a/src/sdk/builders/tasks/__tests__/factory.test.ts +++ b/src/sdk/builders/tasks/__tests__/factory.test.ts @@ -184,6 +184,16 @@ describe("httpTask", () => { optional: true, }); }); + + it("Should accept numeric connection and read timeouts", () => { + const httpTaskObj = httpTask("testHttp", { + uri: "https://example.com", + method: "GET", + connectionTimeOut: 3000, + readTimeOut: 5000, + }); + expect(httpTaskObj.inputParameters.http_request.readTimeOut).toBe(5000); + }); }); describe("inlineTask", () => {