7vsdk-pessoas 1.0.22 → 1.0.24
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/dist/clients/enderecos/UfClient.d.ts +1 -1
- package/dist/clients/enderecos/UfClient.js +2 -2
- package/dist/clients/pessoas/PessoaCnpjClient.d.ts +3 -4
- package/dist/clients/pessoas/PessoaCnpjClient.js +13 -2
- package/dist/clients/portalContador/EmpresaSdk.d.ts +11 -13
- package/dist/clients/portalContador/EmpresaSdk.js +17 -8
- package/package.json +1 -1
- package/src/clients/enderecos/UfClient.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UfRequest, UfResponse } from "7vdomain";
|
|
2
|
-
import { CrudClientBase } from "
|
|
2
|
+
import { CrudClientBase } from "../base";
|
|
3
3
|
export declare class UfClient extends CrudClientBase<UfRequest, UfResponse> {
|
|
4
4
|
constructor(Url: string, tokenJwt: string);
|
|
5
5
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UfClient = void 0;
|
|
4
|
-
const
|
|
5
|
-
class UfClient extends
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
class UfClient extends base_1.CrudClientBase {
|
|
6
6
|
constructor(Url, tokenJwt) {
|
|
7
7
|
super(Url, "api/endereco/uf", tokenJwt);
|
|
8
8
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { PessoaCnpjRequest, PessoaCnpjResponse } from "7vdomain";
|
|
2
2
|
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
|
-
export declare class PessoaCnpjClient extends CrudClientBase<
|
|
4
|
-
constructor(
|
|
5
|
-
|
|
6
|
-
}, tokenJwt: string);
|
|
3
|
+
export declare class PessoaCnpjClient extends CrudClientBase<PessoaCnpjRequest, PessoaCnpjResponse> {
|
|
4
|
+
constructor(Url: string, tokenJwt: string);
|
|
5
|
+
postarPessoaCnpj(pessoaId: number, numero: string, ie: string, regimeTributario: number, lucroReal: boolean, industria: boolean): Promise<PessoaCnpjResponse>;
|
|
7
6
|
}
|
|
@@ -3,8 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PessoaCnpjClient = void 0;
|
|
4
4
|
const CrudClientBase_js_1 = require("../base/CrudClientBase.js");
|
|
5
5
|
class PessoaCnpjClient extends CrudClientBase_js_1.CrudClientBase {
|
|
6
|
-
constructor(
|
|
7
|
-
super(
|
|
6
|
+
constructor(Url, tokenJwt) {
|
|
7
|
+
super(Url, "api/pessoa/cnpj", tokenJwt);
|
|
8
|
+
}
|
|
9
|
+
async postarPessoaCnpj(pessoaId, numero, ie, regimeTributario, lucroReal, industria) {
|
|
10
|
+
const request = {
|
|
11
|
+
Ie: ie,
|
|
12
|
+
Numero: numero,
|
|
13
|
+
PessoaId: pessoaId,
|
|
14
|
+
RegimeTributario: regimeTributario,
|
|
15
|
+
LucroReal: lucroReal,
|
|
16
|
+
Industria: industria
|
|
17
|
+
};
|
|
18
|
+
return await this.postAsync(request);
|
|
8
19
|
}
|
|
9
20
|
}
|
|
10
21
|
exports.PessoaCnpjClient = PessoaCnpjClient;
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { EmpresaRequest, EmpresaResponse } from "7vdomain";
|
|
1
|
+
import { EmpresaRequest, EmpresaResponse, EnderecoRequest, PessoaTelefoneRequest } from "7vdomain";
|
|
2
2
|
import { CrudClientBase } from "../base";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
pegarEmpresaPaginacao(page: number, size: number): Promise<EmpresaResponse[]>;
|
|
8
|
-
}
|
|
9
|
-
export declare class EmpresaSdk extends CrudClientBase<EmpresaRequest, EmpresaResponse> implements IEmpresaSdk {
|
|
3
|
+
export declare class EmpresaSdk extends CrudClientBase<EmpresaRequest, EmpresaResponse> {
|
|
4
|
+
private pessoaSdk;
|
|
5
|
+
private enderecoSdk;
|
|
6
|
+
private pessoaCnpj;
|
|
10
7
|
constructor(Url: string, tokenJwt: string);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
criarEmpresaRoot(cnpj: string, ie: string, regimeTributario: number, razaoSocial: string, lucroReal: boolean, industria: boolean): Promise<void>;
|
|
9
|
+
incluirEmpresaRootCompleto(cnpj: string, razaoSocial: string, endereco: EnderecoRequest[], telefones: PessoaTelefoneRequest[]): Promise<void>;
|
|
10
|
+
incluirClientePj(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string): Promise<void>;
|
|
11
|
+
incluirClientePjCompleto(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string, endereco: EnderecoRequest[], telefones: PessoaTelefoneRequest[]): Promise<void>;
|
|
12
|
+
incluirClientePf(cnpjPai: string, cpfFilho: string, nomeCompletoFilho: string): Promise<void>;
|
|
13
|
+
incluirClientePfCompleto(cnpjPai: string, cpfFilho: string, nomeCompletoFilho: string, endereco: EnderecoRequest[], telefones: PessoaTelefoneRequest[]): Promise<void>;
|
|
15
14
|
}
|
|
16
|
-
export {};
|
|
@@ -2,21 +2,30 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EmpresaSdk = void 0;
|
|
4
4
|
const base_1 = require("../base");
|
|
5
|
+
const pessoas_1 = require("../pessoas");
|
|
6
|
+
const EnderecoCidadeClient_1 = require("../enderecos/EnderecoCidadeClient");
|
|
5
7
|
class EmpresaSdk extends base_1.CrudClientBase {
|
|
6
8
|
constructor(Url, tokenJwt) {
|
|
7
9
|
super(Url, "portal-contador/empresa", tokenJwt);
|
|
10
|
+
this.pessoaSdk = new pessoas_1.PessoaClient(this.baseUrl, this.tokenJwt);
|
|
11
|
+
this.enderecoSdk = new EnderecoCidadeClient_1.EnderecoCidadeClient(this.baseUrl, this.tokenJwt);
|
|
12
|
+
this.pessoaCnpj = new pessoas_1.PessoaCnpjClient(this.baseUrl, this.tokenJwt);
|
|
8
13
|
}
|
|
9
|
-
async
|
|
10
|
-
|
|
14
|
+
async criarEmpresaRoot(cnpj, ie, regimeTributario, razaoSocial, lucroReal, industria) {
|
|
15
|
+
if (regimeTributario < 1 || regimeTributario > 3)
|
|
16
|
+
throw new Error("Regime tributário inválido. Use 1 para Simples Nacional, 2 para Lucro Presumido ou 3 para Lucro Real.");
|
|
17
|
+
const pessoaMandou = await this.pessoaSdk.postarPessoa(razaoSocial, "I");
|
|
18
|
+
await this.pessoaCnpj.postarPessoaCnpj(pessoaMandou.PessoaId, cnpj, ie, regimeTributario, lucroReal, industria);
|
|
11
19
|
}
|
|
12
|
-
async
|
|
13
|
-
return await this.getAsync(id);
|
|
20
|
+
async incluirEmpresaRootCompleto(cnpj, razaoSocial, endereco, telefones) {
|
|
14
21
|
}
|
|
15
|
-
async
|
|
16
|
-
return await this.deleteAsync(id);
|
|
22
|
+
async incluirClientePj(cnpjPai, cnpjFilho, razaoSocialFilho) {
|
|
17
23
|
}
|
|
18
|
-
async
|
|
19
|
-
|
|
24
|
+
async incluirClientePjCompleto(cnpjPai, cnpjFilho, razaoSocialFilho, endereco, telefones) {
|
|
25
|
+
}
|
|
26
|
+
async incluirClientePf(cnpjPai, cpfFilho, nomeCompletoFilho) {
|
|
27
|
+
}
|
|
28
|
+
async incluirClientePfCompleto(cnpjPai, cpfFilho, nomeCompletoFilho, endereco, telefones) {
|
|
20
29
|
}
|
|
21
30
|
}
|
|
22
31
|
exports.EmpresaSdk = EmpresaSdk;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["../src/index.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","../src/clients/portalcontador/empresasdk.ts","../src/clients/portalcontador/impostoestadualsdk.ts","../src/clients/portalcontador/impostofederalsdk.ts","../src/clients/portalcontador/index.ts"],"version":"5.9.3"}
|