Skip to content

Commit

Permalink
just coerce stuff to any
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi committed Jul 11, 2024
1 parent 0f79bd7 commit 6e5408b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { serialization as V49 } from "@fern-api/ir-sdk";
export { serialization as V50 } from "@fern-api/ir-sdk";
export * as V23 from "@fern-fern/ir-v23-sdk/serialization";
export * as V24 from "@fern-fern/ir-v24-sdk/serialization";
export * as V25 from "@fern-fern/ir-v25-sdk/serialization";
Expand All @@ -25,3 +25,4 @@ export * as V45 from "@fern-fern/ir-v45-sdk/serialization";
export * as V46 from "@fern-fern/ir-v46-sdk/serialization";
export * as V47 from "@fern-fern/ir-v47-sdk/serialization";
export * as V48 from "@fern-fern/ir-v48-sdk/serialization";
export * as V49 from "@fern-fern/ir-v49-sdk/serialization";
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { GeneratorName } from "@fern-api/configuration";
import { mapValues } from "lodash-es";
import { IrSerialization } from "../../ir-serialization";
Expand Down Expand Up @@ -94,7 +95,7 @@ export const V50_TO_V49_MIGRATION: IrMigration<
})
};
}
);
) as any;
return {
...v50,
auth: convertAuth(v50.auth),
Expand Down Expand Up @@ -124,7 +125,7 @@ function convertWebsocketChannel(
),
pathParameters: websocketChannel.pathParameters.map((pathParameter) => convertPathParameter(pathParameter)),
messages: websocketChannel.messages.map((message) => convertWebsocketMessage(message))
};
} as any;
}

function convertWebsocketMessage(
Expand Down Expand Up @@ -167,7 +168,7 @@ function convertWebhook(webhook: IrVersions.V50.webhooks.Webhook): IrVersions.V4
...webhook,
headers: webhook.headers.map((header) => convertHttpHeader(header)),
payload: convertWebhookPayload(webhook.payload)
};
} as any;
}

function convertWebhookPayload(
Expand Down Expand Up @@ -451,14 +452,14 @@ function convertEndpoint(endpoint: IrVersions.V50.http.HttpEndpoint): IrVersions
response: endpoint.response != null ? convertHttpResponse(endpoint.response) : undefined,
headers: endpoint.headers.map((header) => convertHttpHeader(header)),
queryParameters: endpoint.queryParameters.map((queryParameter) => convertQueryParameter(queryParameter))
};
} as any;
}

function convertHttpResponse(response: IrVersions.V50.http.HttpResponse): IrVersions.V49.http.HttpResponse {
return {
...response,
body: response.body != null ? convertResponseBody(response.body) : undefined
};
} as any;
}

function convertResponseBody(responseBody: IrVersions.V50.http.HttpResponseBody): IrVersions.V49.http.HttpResponseBody {
Expand Down Expand Up @@ -702,5 +703,5 @@ function convertErrorDeclaration(
return {
...error,
type: error.type != null ? convertTypeReference(error.type) : undefined
};
} as any;
}

0 comments on commit 6e5408b

Please sign in to comment.