-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ Adiciona novas interfaces e refatora APIs, incluindo a implem…
…entação de SectorApi e ajustes na estrutura de URLs
- Loading branch information
Wellington Braga
committed
Jan 26, 2025
1 parent
8c1ee2f
commit cae25e2
Showing
26 changed files
with
228 additions
and
162 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { NextRequest } from "next/server"; | ||
|
||
export async function GET(req: NextRequest) { | ||
return SearchController.searchTickets(req); | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const baseUrl = process.env.APIS_BASE_URL ?? ""; | ||
|
||
export const issueUrl = `${baseUrl}issues/`; | ||
export const ticketUrl = `${baseUrl}tickets/`; | ||
export const accountUrl = `${baseUrl}account/`; | ||
export const userUrl = `${baseUrl}users/`; | ||
export const sectorUrl = `${baseUrl}sector/`; | ||
export const roleUrl = `${baseUrl}role/`; | ||
export const sessionUrl = `${baseUrl}sessions/`; | ||
export const searchUrl = `${baseUrl}search/`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* eslint-disable no-unused-vars */ | ||
import { HttpClientProps, IHttpResponse } from "@/types"; | ||
|
||
export interface IHttpClientResponse<T> { | ||
result?: { | ||
data?: T; | ||
error?: { | ||
message?: string; | ||
title?: string; | ||
}; | ||
}; | ||
statusCode: number; | ||
headers?: Record<string, string | number | boolean>; | ||
} | ||
|
||
export interface IHttpClient { | ||
get<T>(props: Omit<HttpClientProps, "type">): IHttpResponse<T, unknown>; | ||
|
||
post<T>(props: Omit<HttpClientProps, "type">): IHttpResponse<T, unknown>; | ||
|
||
put<T>(props: Omit<HttpClientProps, "type">): IHttpResponse<T, unknown>; | ||
|
||
delete<T>(props: Omit<HttpClientProps, "type">): IHttpResponse<T, unknown>; | ||
|
||
// patch<T>(props: Omit<HttpClientProps, "type">): IHttpResponse<T, unknown>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./HttpClient"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.