-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca64f7c
commit 53e9d7f
Showing
12 changed files
with
92 additions
and
102 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
"aliquota", | ||
"Amazônia", | ||
"autoload", | ||
"boletos", | ||
"borderô", | ||
"Borderos", | ||
"borderôs", | ||
|
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
16 changes: 11 additions & 5 deletions
16
src/entities/contasReceber/__tests__/cancel-bank-slips-response.ts
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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
export default null | ||
|
||
export const cancelBankSlipRequest = { | ||
type2FA: 1, | ||
code2FA: '111111', | ||
idOrigem: 16853468718, | ||
idDuplicata: 16853468712, | ||
reason: 'motivo' | ||
autenticacao: { | ||
tipo: 1 as const, | ||
codigo: "111111" | ||
}, | ||
origem: { | ||
id: 5436875653 | ||
}, | ||
conta: { | ||
id: 6423836115 | ||
}, | ||
motivo: "Cancelado por força maior" | ||
} |
24 changes: 12 additions & 12 deletions
24
src/entities/contasReceber/__tests__/get-bank-slips-response.ts
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
export default { | ||
numberSale: '149', | ||
numberNF: '000001', | ||
amountAccounts: 1, | ||
amountValuesAccounts: 111.2, | ||
haveAccountWithIntegration: true, | ||
accounts: [ | ||
venda: { | ||
numero: "123" | ||
}, | ||
notaFiscal: { | ||
numero: "000001" | ||
}, | ||
valorTotal: 111.2, | ||
contas: [ | ||
{ | ||
id: 1328793273, | ||
idExternal: 'BWbXB', | ||
dueDate: '2023-09-12', | ||
value: 111.2, | ||
situation: 'aberto' as const, | ||
iconSituation: 'aberto', | ||
descriptionSituation: 'Em aberto' | ||
numeroExterno: "BWbXB", | ||
vencimento: "2023-09-12", | ||
valor: 111.2, | ||
situacao: 1 as const | ||
} | ||
] | ||
} |
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
50 changes: 14 additions & 36 deletions
50
src/entities/contasReceber/interfaces/cancel-bank-slips.interface.ts
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 |
---|---|---|
@@ -1,37 +1,15 @@ | ||
interface ContasReceberBankSlipsCancelUnicoDTO { | ||
type2FA: number | ||
code2FA: string | ||
/** | ||
* caso for cancelar uma conta sem idOrigem enviar o valor `0` | ||
*/ | ||
idOrigem: number | ||
idDuplicata: number | ||
reason: string | ||
import { ITipoAutenticacao } from "../types/tipo-autenticacao.type" | ||
|
||
export interface ICancelBankSlipsBody { | ||
autenticacao?: { | ||
tipo: ITipoAutenticacao | ||
codigo: string | ||
}, | ||
origem?: { | ||
id: number | ||
}, | ||
conta?: { | ||
id: number | ||
}, | ||
motivo: string | ||
} | ||
|
||
interface ContasReceberBankSlipsCancelTodosDTO { | ||
type2FA: number | ||
code2FA: string | ||
idOrigem: number | ||
reason: string | ||
} | ||
|
||
interface ContasReceberBankSlipsCancelUnicoSem2FADTO { | ||
/** | ||
* caso for cancelar uma conta sem idOrigem enviar o valor `0` | ||
*/ | ||
idOrigem: number | ||
idDuplicata: number | ||
reason: string | ||
} | ||
|
||
interface ContasReceberBankSlipsCancelTodosSem2FADTO { | ||
idOrigem: number | ||
reason: string | ||
} | ||
|
||
export type ICancelBankSlipsBody = | ||
| ContasReceberBankSlipsCancelUnicoDTO | ||
| ContasReceberBankSlipsCancelTodosDTO | ||
| ContasReceberBankSlipsCancelUnicoSem2FADTO | ||
| ContasReceberBankSlipsCancelTodosSem2FADTO |
28 changes: 14 additions & 14 deletions
28
src/entities/contasReceber/interfaces/get-bank-slips.interface.ts
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
import { ISituacaoString } from '../types/situacao.type' | ||
import { ISituacao } from '../types/situacao.type' | ||
|
||
export interface IGetBankSlipsParams { | ||
idOrigem: number | ||
situations?: ISituacaoString[] | ||
situacoes?: ISituacao[] | ||
} | ||
|
||
export interface IGetBankSlipsResponse { | ||
numberSale: string | ||
numberNF: string | ||
amountAccounts: number | ||
amountValuesAccounts: number | ||
haveAccountWithIntegration: boolean | ||
accounts: { | ||
venda: { | ||
numero: string | ||
}, | ||
notaFiscal: { | ||
numero: string | ||
}, | ||
valorTotal: number | ||
contas: { | ||
id: number | ||
idExternal: string | ||
dueDate: string | ||
value: number | ||
situation: ISituacaoString | ||
iconSituation: string | ||
descriptionSituation: string | ||
numeroExterno: string | ||
vencimento: string | ||
valor: number | ||
situacao: ISituacao | ||
}[] | ||
} |
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 @@ | ||
/** | ||
* - `1`: Código de autenticação por dois fatores | ||
* - `4`: Senha de 6 dígitos do app Bling Conta | ||
*/ | ||
export type ITipoAutenticacao = 1 | 4 |
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