implementado drive pilão de dados
This commit is contained in:
parent
a1e543cfb8
commit
daae40f4b2
54 changed files with 1476 additions and 19 deletions
|
|
@ -1,4 +1,6 @@
|
|||
import { respostaComuns, type tipoResposta } from "p-respostas"
|
||||
import type { z } from "zod"
|
||||
import type { zAmbiente } from "../ts/ambiente"
|
||||
import { urlAutenticacao } from "./_urlAutenticacao"
|
||||
type tipoPostCodigoContaSite = { site: string }
|
||||
|
||||
|
|
@ -7,7 +9,7 @@ export const codigoContaSite = async ({
|
|||
post,
|
||||
buscar,
|
||||
}: {
|
||||
ambiente: "desenvolvimento" | "producao"
|
||||
ambiente: z.infer<typeof zAmbiente>
|
||||
post: tipoPostCodigoContaSite
|
||||
/** função que conecta com a API */
|
||||
buscar: (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
export const urlAutenticacao = (ambiente: "desenvolvimento" | "producao") =>
|
||||
import type { z } from "zod"
|
||||
import type { zAmbiente } from "../ts/ambiente"
|
||||
|
||||
export const urlAutenticacao = (ambiente: z.infer<typeof zAmbiente>) =>
|
||||
`${
|
||||
ambiente == "producao"
|
||||
? "https://carro-de-boi.idz.one"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import { respostaComuns, type tipoResposta } from "p-respostas"
|
||||
import type { z } from "zod"
|
||||
import type { zAmbiente } from "../ts/ambiente"
|
||||
import { urlAutenticacao } from "./_urlAutenticacao"
|
||||
|
||||
export type tipoUsuarioExterno = {
|
||||
|
|
@ -15,7 +17,7 @@ export const usuarios_quipo_governo = async ({
|
|||
ambiente,
|
||||
buscar,
|
||||
}: {
|
||||
ambiente: "desenvolvimento" | "producao"
|
||||
ambiente: z.infer<typeof zAmbiente>
|
||||
token_produto: string
|
||||
buscar: (
|
||||
url: string,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import type { tipoResposta } from "p-respostas"
|
||||
import { urlAutenticacao } from "./_urlAutenticacao"
|
||||
type tipoPostValidarTokem = { token: string }
|
||||
import type { z } from "zod"
|
||||
import type { zAmbiente } from "../ts/ambiente"
|
||||
|
||||
/** faz a validação do token */
|
||||
export const validarToken = async ({
|
||||
|
|
@ -8,7 +10,7 @@ export const validarToken = async ({
|
|||
post,
|
||||
buscar,
|
||||
}: {
|
||||
ambiente: "desenvolvimento" | "producao"
|
||||
ambiente: z.infer<typeof zAmbiente>
|
||||
post: tipoPostValidarTokem
|
||||
/** função que conecta com a API */
|
||||
buscar: (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue