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
Show file tree
Hide file tree
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
Expand Up @@ -61,7 +61,7 @@ export interface ReposListForAuthenticatedUserProps

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

export function reposListForAuthenticatedUser(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface CreateUsersWithListInputProps

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

export function createUsersWithListInput(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface FindPetsByStatusProps

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

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

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

export function findPetsByTags(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface UpdatePetWithFormProps

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

export function updatePetWithForm(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface CreateUsersWithArrayInputProps

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

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

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

export function createUsersWithListInput(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface FindPetsByStatusProps

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

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

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

export function findPetsByTags(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface UpdatePetWithFormProps

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

export function updatePetWithForm(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Loading