7vsdk-pessoas 1.0.24 → 1.0.25
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.
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { EmpresaRequest, EmpresaResponse, EnderecoRequest, PessoaTelefoneRequest } from "7vdomain";
|
|
2
2
|
import { CrudClientBase } from "../base";
|
|
3
3
|
export declare class EmpresaSdk extends CrudClientBase<EmpresaRequest, EmpresaResponse> {
|
|
4
|
+
private pessoaUrl;
|
|
4
5
|
private pessoaSdk;
|
|
5
6
|
private enderecoSdk;
|
|
6
7
|
private pessoaCnpj;
|
|
7
8
|
constructor(Url: string, tokenJwt: string);
|
|
9
|
+
setPessoaUrl(urlPessoa: string): void;
|
|
8
10
|
criarEmpresaRoot(cnpj: string, ie: string, regimeTributario: number, razaoSocial: string, lucroReal: boolean, industria: boolean): Promise<void>;
|
|
9
11
|
incluirEmpresaRootCompleto(cnpj: string, razaoSocial: string, endereco: EnderecoRequest[], telefones: PessoaTelefoneRequest[]): Promise<void>;
|
|
10
12
|
incluirClientePj(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string): Promise<void>;
|
|
@@ -7,9 +7,13 @@ const EnderecoCidadeClient_1 = require("../enderecos/EnderecoCidadeClient");
|
|
|
7
7
|
class EmpresaSdk extends base_1.CrudClientBase {
|
|
8
8
|
constructor(Url, tokenJwt) {
|
|
9
9
|
super(Url, "portal-contador/empresa", tokenJwt);
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
12
|
-
this.
|
|
10
|
+
this.pessoaUrl = "";
|
|
11
|
+
this.pessoaCnpj = new pessoas_1.PessoaCnpjClient(this.pessoaUrl, tokenJwt);
|
|
12
|
+
this.enderecoSdk = new EnderecoCidadeClient_1.EnderecoCidadeClient(this.pessoaUrl, tokenJwt);
|
|
13
|
+
this.pessoaSdk = new pessoas_1.PessoaClient(this.pessoaUrl, tokenJwt);
|
|
14
|
+
}
|
|
15
|
+
setPessoaUrl(urlPessoa) {
|
|
16
|
+
this.pessoaUrl = urlPessoa;
|
|
13
17
|
}
|
|
14
18
|
async criarEmpresaRoot(cnpj, ie, regimeTributario, razaoSocial, lucroReal, industria) {
|
|
15
19
|
if (regimeTributario < 1 || regimeTributario > 3)
|
package/package.json
CHANGED
|
@@ -5,12 +5,23 @@ import { EnderecoCidadeClient } from "../enderecos/EnderecoCidadeClient";
|
|
|
5
5
|
|
|
6
6
|
export class EmpresaSdk extends CrudClientBase<EmpresaRequest, EmpresaResponse>
|
|
7
7
|
{
|
|
8
|
-
private
|
|
9
|
-
private enderecoSdk: EnderecoCidadeClient = new EnderecoCidadeClient(this.baseUrl, this.tokenJwt!);
|
|
10
|
-
private pessoaCnpj: PessoaCnpjClient = new PessoaCnpjClient(this.baseUrl, this.tokenJwt!);
|
|
8
|
+
private pessoaUrl: string = "";
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
private pessoaSdk: PessoaClient;
|
|
11
|
+
private enderecoSdk: EnderecoCidadeClient
|
|
12
|
+
private pessoaCnpj: PessoaCnpjClient
|
|
13
|
+
|
|
14
|
+
constructor(Url: string, tokenJwt: string)
|
|
15
|
+
{
|
|
13
16
|
super(Url, "portal-contador/empresa", tokenJwt);
|
|
17
|
+
this.pessoaCnpj = new PessoaCnpjClient(this.pessoaUrl, tokenJwt);
|
|
18
|
+
this.enderecoSdk = new EnderecoCidadeClient(this.pessoaUrl, tokenJwt);
|
|
19
|
+
this.pessoaSdk = new PessoaClient(this.pessoaUrl, tokenJwt);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
setPessoaUrl(urlPessoa: string)
|
|
23
|
+
{
|
|
24
|
+
this.pessoaUrl = urlPessoa;
|
|
14
25
|
}
|
|
15
26
|
|
|
16
27
|
async criarEmpresaRoot(cnpj: string, ie: string, regimeTributario: number, razaoSocial: string, lucroReal: boolean, industria: boolean): Promise<void>
|
|
@@ -31,18 +42,18 @@ export class EmpresaSdk extends CrudClientBase<EmpresaRequest, EmpresaResponse>
|
|
|
31
42
|
|
|
32
43
|
}
|
|
33
44
|
|
|
34
|
-
|
|
35
|
-
|
|
45
|
+
async incluirClientePjCompleto(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string, endereco: EnderecoRequest[], telefones: PessoaTelefoneRequest[]): Promise<void>
|
|
46
|
+
{
|
|
36
47
|
|
|
37
|
-
|
|
48
|
+
}
|
|
38
49
|
|
|
39
|
-
|
|
40
|
-
|
|
50
|
+
async incluirClientePf(cnpjPai: string, cpfFilho: string, nomeCompletoFilho: string): Promise<void>
|
|
51
|
+
{
|
|
41
52
|
|
|
42
|
-
|
|
53
|
+
}
|
|
43
54
|
|
|
44
|
-
|
|
45
|
-
|
|
55
|
+
async incluirClientePfCompleto(cnpjPai: string, cpfFilho: string, nomeCompletoFilho: string, endereco: EnderecoRequest[], telefones: PessoaTelefoneRequest[]): Promise<void>
|
|
56
|
+
{
|
|
46
57
|
|
|
47
|
-
|
|
58
|
+
}
|
|
48
59
|
}
|