7vsdk-pessoas 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,16 +2,16 @@ import { EnderecoRequest, PessoaResponse, PessoaTelefoneRequest } from "7vdomain
|
|
|
2
2
|
import { PessoaRequest } from "7vdomain";
|
|
3
3
|
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
4
4
|
|
|
5
|
-
interface
|
|
5
|
+
interface IPessoaClient
|
|
6
6
|
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
postarPessoa(nome: string, sexo: string): Promise<PessoaResponse>;
|
|
8
|
+
pegarPessoa(id: number): Promise<PessoaResponse>;
|
|
9
|
+
deletarPessoa(id: number): Promise<void>;
|
|
10
|
+
pegarPessoaPaginada(pagina: number, tamanho: number): Promise<PessoaResponse[]>;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export class PessoaClient extends CrudClientBase<PessoaRequest, PessoaResponse>
|
|
14
|
-
implements
|
|
14
|
+
implements IPessoaClient
|
|
15
15
|
{
|
|
16
16
|
constructor(urlServer: string, tokenJwt: string);
|
|
17
17
|
constructor(server: { Url: string }, tokenJwt: string);
|
|
@@ -26,30 +26,18 @@ implements IincluirClientes
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
async postarPessoa(nome: string, sexo: string): Promise<PessoaResponse> {
|
|
29
|
-
|
|
30
|
-
const req: PessoaRequest = { Nome: nome, Sexo: sexo };
|
|
31
|
-
const res = await this.postAsync(req);
|
|
32
|
-
return res;
|
|
29
|
+
return this.postAsync({ Nome: nome, Sexo: sexo } as PessoaRequest);
|
|
33
30
|
}
|
|
34
31
|
|
|
35
|
-
async incluirClientePj(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string)
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
async incluirClientePjCompleto(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string, enderecos: EnderecoRequest[], telefones: PessoaTelefoneRequest[])
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async incluirClientePf(cnpjPai: string, cpfFilho: string, nome: string)
|
|
46
|
-
{
|
|
47
32
|
|
|
33
|
+
async pegarPessoa(id: number): Promise<PessoaResponse> {
|
|
34
|
+
return await this.getAsync(id);
|
|
48
35
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
async deletarPessoa(id: number): Promise<void> {
|
|
37
|
+
return await this.deleteAsync(id);
|
|
38
|
+
}
|
|
39
|
+
async pegarPessoaPaginada(pagina: number, tamanho: number): Promise<PessoaResponse[]> {
|
|
40
|
+
return await this.getPagedAsync(pagina, tamanho);
|
|
53
41
|
}
|
|
54
42
|
|
|
55
43
|
}
|
package/tsconfig.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["./src/index.ts","./src/test.ts","./src/clients/index.ts","./src/clients/base/crudclientbase.ts","./src/clients/base/index.ts","./src/clients/enderecos/enderecobairroclient.ts","./src/clients/enderecos/enderecocidadeclient.ts","./src/clients/enderecos/enderecosdk.ts","./src/clients/enderecos/ufclient.ts","./src/clients/enderecos/index.ts","./src/clients/pessoas/pessoaclient.ts","./src/clients/pessoas/pessoacnpjclient.ts","./src/clients/pessoas/pessoacpfclient.ts","./src/clients/pessoas/pessoaemailclient.ts","./src/clients/pessoas/pessoaenderecoclient.ts","./src/clients/pessoas/pessoanascimentoclient.ts","./src/clients/pessoas/pessoanecessidadeespecial.ts","./src/clients/pessoas/pessoaprocedimentoclient.ts","./src/clients/pessoas/pessoarelacaoclient.ts","./src/clients/pessoas/pessoarelacaogrupoclient.ts","./src/clients/pessoas/pessoarelacaotipoclient.ts","./src/clients/pessoas/pessoatelefoneclient.ts","./src/clients/pessoas/pessoatipoclient.ts","./src/clients/pessoas/index.ts"],"version":"5.9.3"}
|