Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixing return type for response headers #36

Merged
merged 6 commits into from
Oct 29, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ export interface ReposListForAuthenticatedUserProps

export interface ReposListForAuthenticatedUserResponseContainer {
content: ReposListForAuthenticatedUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function reposListForAuthenticatedUser(
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ export interface AddPetProps extends Omit<FetcherOptions<unknown, AddPetRequestB

export interface AddPetResponseContainer {
content: AddPetOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function addPet(props: AddPetProps): Promise<AddPetResponseContainer> {
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ export interface CreateUserProps

export interface CreateUserResponseContainer {
content: CreateUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function createUser(props: CreateUserProps): Promise<CreateUserResponseContainer> {
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ export interface CreateUsersWithListInputProps

export interface CreateUsersWithListInputResponseContainer {
content: CreateUsersWithListInputOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function createUsersWithListInput(
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ export interface DeleteOrderProps

export interface DeleteOrderResponseContainer {
content: DeleteOrderOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function deleteOrder(props: DeleteOrderProps): Promise<DeleteOrderResponseContainer> {
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ export interface DeletePetProps

export interface DeletePetResponseContainer {
content: DeletePetOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function deletePet(props: DeletePetProps): Promise<DeletePetResponseContainer> {
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ export interface DeleteUserProps

export interface DeleteUserResponseContainer {
content: DeleteUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function deleteUser(props: DeleteUserProps): Promise<DeleteUserResponseContainer> {
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ export interface FindPetsByStatusProps

export interface FindPetsByStatusResponseContainer {
content: FindPetsByStatusOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function findPetsByStatus(
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ export interface FindPetsByTagsProps

export interface FindPetsByTagsResponseContainer {
content: FindPetsByTagsOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function findPetsByTags(
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ export interface GetInventoryProps extends Omit<FetcherOptions<unknown, unknown>

export interface GetInventoryResponseContainer {
content: GetInventoryOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function getInventory(props: GetInventoryProps): Promise<GetInventoryResponseContainer> {
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ export interface GetOrderByIdProps

export interface GetOrderByIdResponseContainer {
content: GetOrderByIdOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function getOrderById(props: GetOrderByIdProps): Promise<GetOrderByIdResponseContainer> {
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ export interface GetPetByIdProps

export interface GetPetByIdResponseContainer {
content: GetPetByIdOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function getPetById(props: GetPetByIdProps): Promise<GetPetByIdResponseContainer> {
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export interface GetUserByNameProps

export interface GetUserByNameResponseContainer {
content: GetUserByNameOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function getUserByName(props: GetUserByNameProps): Promise<GetUserByNameResponseContainer> {
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ export interface LoginUserProps

export interface LoginUserResponseContainer {
content: LoginUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function loginUser(props: LoginUserProps): Promise<LoginUserResponseContainer> {
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ export interface LogoutUserProps extends Omit<FetcherOptions<unknown, unknown>,

export interface LogoutUserResponseContainer {
content: LogoutUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function logoutUser(props: LogoutUserProps): Promise<LogoutUserResponseContainer> {
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ export interface PlaceOrderProps

export interface PlaceOrderResponseContainer {
content: PlaceOrderOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function placeOrder(props: PlaceOrderProps): Promise<PlaceOrderResponseContainer> {
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ export interface UpdatePetProps extends Omit<FetcherOptions<unknown, UpdatePetRe

export interface UpdatePetResponseContainer {
content: UpdatePetOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function updatePet(props: UpdatePetProps): Promise<UpdatePetResponseContainer> {
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ export interface UpdatePetWithFormProps

export interface UpdatePetWithFormResponseContainer {
content: UpdatePetWithFormOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function updatePetWithForm(
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ export interface UpdateUserProps

export interface UpdateUserResponseContainer {
content: UpdateUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function updateUser(props: UpdateUserProps): Promise<UpdateUserResponseContainer> {
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ export interface UploadFileProps

export interface UploadFileResponseContainer {
content: UploadFileOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function uploadFile(props: UploadFileProps): Promise<UploadFileResponseContainer> {
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ export interface AddPetProps extends Omit<FetcherOptions<unknown, AddPetRequestB

export interface AddPetResponseContainer {
content: AddPetOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function addPet(props: AddPetProps): Promise<AddPetResponseContainer> {
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export interface CreateUserProps

export interface CreateUserResponseContainer {
content: CreateUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function createUser(props: CreateUserProps): Promise<CreateUserResponseContainer> {
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export interface CreateUsersWithArrayInputProps

export interface CreateUsersWithArrayInputResponseContainer {
content: CreateUsersWithArrayInputOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function createUsersWithArrayInput(
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export interface CreateUsersWithListInputProps

export interface CreateUsersWithListInputResponseContainer {
content: CreateUsersWithListInputOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function createUsersWithListInput(
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ export interface DeleteOrderProps

export interface DeleteOrderResponseContainer {
content: DeleteOrderOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function deleteOrder(props: DeleteOrderProps): Promise<DeleteOrderResponseContainer> {
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ export interface DeletePetProps

export interface DeletePetResponseContainer {
content: DeletePetOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function deletePet(props: DeletePetProps): Promise<DeletePetResponseContainer> {
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export interface DeleteUserProps

export interface DeleteUserResponseContainer {
content: DeleteUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function deleteUser(props: DeleteUserProps): Promise<DeleteUserResponseContainer> {
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ export interface FindPetsByStatusProps

export interface FindPetsByStatusResponseContainer {
content: FindPetsByStatusOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function findPetsByStatus(
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ export interface FindPetsByTagsProps

export interface FindPetsByTagsResponseContainer {
content: FindPetsByTagsOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function findPetsByTags(
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ export interface GetInventoryProps extends Omit<FetcherOptions<unknown, unknown>

export interface GetInventoryResponseContainer {
content: GetInventoryOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function getInventory(props: GetInventoryProps): Promise<GetInventoryResponseContainer> {
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ export interface GetOrderByIdProps

export interface GetOrderByIdResponseContainer {
content: GetOrderByIdOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function getOrderById(props: GetOrderByIdProps): Promise<GetOrderByIdResponseContainer> {
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ export interface GetPetByIdProps

export interface GetPetByIdResponseContainer {
content: GetPetByIdOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function getPetById(props: GetPetByIdProps): Promise<GetPetByIdResponseContainer> {
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ export interface GetUserByNameProps

export interface GetUserByNameResponseContainer {
content: GetUserByNameOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function getUserByName(props: GetUserByNameProps): Promise<GetUserByNameResponseContainer> {
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ export interface LoginUserProps

export interface LoginUserResponseContainer {
content: LoginUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function loginUser(props: LoginUserProps): Promise<LoginUserResponseContainer> {
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ export interface LogoutUserProps extends Omit<FetcherOptions<unknown, unknown>,

export interface LogoutUserResponseContainer {
content: LogoutUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function logoutUser(props: LogoutUserProps): Promise<LogoutUserResponseContainer> {
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export interface PlaceOrderProps

export interface PlaceOrderResponseContainer {
content: PlaceOrderOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function placeOrder(props: PlaceOrderProps): Promise<PlaceOrderResponseContainer> {
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ export interface UpdatePetProps extends Omit<FetcherOptions<unknown, UpdatePetRe

export interface UpdatePetResponseContainer {
content: UpdatePetOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function updatePet(props: UpdatePetProps): Promise<UpdatePetResponseContainer> {
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ export interface UpdatePetWithFormProps

export interface UpdatePetWithFormResponseContainer {
content: UpdatePetWithFormOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function updatePetWithForm(
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ export interface UpdateUserProps

export interface UpdateUserResponseContainer {
content: UpdateUserOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function updateUser(props: UpdateUserProps): Promise<UpdateUserResponseContainer> {
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ export interface UploadFileProps

export interface UploadFileResponseContainer {
content: UploadFileOkResponse;
headers: Record<string, any>;
headers: HeadersInit;
}

export function uploadFile(props: UploadFileProps): Promise<UploadFileResponseContainer> {
2 changes: 1 addition & 1 deletion packages/plugin-react-query/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@harnessio/oats-plugin-react-query",
"version": "4.0.3",
"version": "4.1.0",
"license": "MIT",
"type": "module",
"repository": {
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ Omit<FetcherOptions<

export interface {{typeName}}ResponseContainer {
content: {{okResponseName}}
headers: Record<string, any>
headers: HeadersInit
}

export function {{fetcherName}}(props: {{fetcherPropsName}}): Promise<{{typeName}}ResponseContainer> {