From 766e4716eb689a591aa56ad1047f8fca0838f77b Mon Sep 17 00:00:00 2001 From: "Luiz H. R. Silva" Date: Tue, 4 Jun 2024 10:46:39 -0300 Subject: [PATCH] build --- dist-import/autenticacao.d.ts | 15 ++------------- dist-require/autenticacao.d.ts | 15 ++------------- package.json | 2 +- src/autenticacao.ts | 18 ++---------------- 4 files changed, 7 insertions(+), 43 deletions(-) diff --git a/dist-import/autenticacao.d.ts b/dist-import/autenticacao.d.ts index f55da2a..4d0c6d4 100644 --- a/dist-import/autenticacao.d.ts +++ b/dist-import/autenticacao.d.ts @@ -1,3 +1,4 @@ +import type { tipoResposta } from "~comuns"; type tipoPostValidarTokem = { token: string; }; @@ -6,19 +7,7 @@ export declare const pAutenticacao: { urlValidarToken: ({ ambiente, post, buscar, }: { ambiente: "desenvolvimento" | "producao"; post: tipoPostValidarTokem; - buscar: (url: string, post: tipoPostValidarTokem) => Promise<{ - cod: 200; - valor: any; - eCerto: true; - eErro: false; - mensagem: undefined; - } | { - cod: 400; - valor: any; - eCerto: false; - eErro: true; - mensagem: string; - }>; + buscar: (url: string, post: tipoPostValidarTokem) => Promise>; }) => Promise<"valido" | "erro">; }; export {}; diff --git a/dist-require/autenticacao.d.ts b/dist-require/autenticacao.d.ts index f55da2a..4d0c6d4 100644 --- a/dist-require/autenticacao.d.ts +++ b/dist-require/autenticacao.d.ts @@ -1,3 +1,4 @@ +import type { tipoResposta } from "~comuns"; type tipoPostValidarTokem = { token: string; }; @@ -6,19 +7,7 @@ export declare const pAutenticacao: { urlValidarToken: ({ ambiente, post, buscar, }: { ambiente: "desenvolvimento" | "producao"; post: tipoPostValidarTokem; - buscar: (url: string, post: tipoPostValidarTokem) => Promise<{ - cod: 200; - valor: any; - eCerto: true; - eErro: false; - mensagem: undefined; - } | { - cod: 400; - valor: any; - eCerto: false; - eErro: true; - mensagem: string; - }>; + buscar: (url: string, post: tipoPostValidarTokem) => Promise>; }) => Promise<"valido" | "erro">; }; export {}; diff --git a/package.json b/package.json index 0e783ec..af52fb6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "~drives", - "version": "0.10.0", + "version": "0.11.0", "description": "", "main": "src/index.ts", "exports": { diff --git a/src/autenticacao.ts b/src/autenticacao.ts index b4765ce..71de45a 100644 --- a/src/autenticacao.ts +++ b/src/autenticacao.ts @@ -1,3 +1,4 @@ +import type { tipoResposta } from "~comuns" type tipoPostValidarTokem = { token: string } /** retorna uma url e os parametros que devem ser enviádos */ const urlValidarToken = async ({ @@ -10,22 +11,7 @@ const urlValidarToken = async ({ buscar: ( url: string, post: tipoPostValidarTokem, - ) => Promise< - | { - cod: 200 - valor: any - eCerto: true - eErro: false - mensagem: undefined - } - | { - cod: 400 - valor: any - eCerto: false - eErro: true - mensagem: string - } - > + ) => Promise> }): Promise<"valido" | "erro"> => { const url = `${ ambiente == "producao"