7vsdk-pessoas 1.0.13 → 1.0.14

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,3 +1,4 @@
1
1
  export * from "./base";
2
2
  export * from "./enderecos";
3
3
  export * from "./pessoas";
4
+ export * from "./portalContador";
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./base"), exports);
18
18
  __exportStar(require("./enderecos"), exports);
19
19
  __exportStar(require("./pessoas"), exports);
20
+ __exportStar(require("./portalContador"), exports);
@@ -1,21 +1,20 @@
1
- import { EnderecoRequest, PessoaResponse, PessoaTelefoneRequest } from "7vdomain";
1
+ import { PessoaResponse } from "7vdomain";
2
2
  import { PessoaRequest } from "7vdomain";
3
3
  import { CrudClientBase } from "../base/CrudClientBase.js";
4
- interface IincluirClientes {
5
- incluirClientePj(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string): any;
6
- incluirClientePjCompleto(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string, enderecos: EnderecoRequest[], telefones: PessoaTelefoneRequest[]): any;
7
- incluirClientePf(cnpjPai: string, cpfFilho: string, nome: string): any;
8
- incluirClientePfCompleto(cnpjPai: string, cpfFilho: string, nome: string, enderecos: EnderecoRequest[], telefones: PessoaTelefoneRequest[]): any;
4
+ interface IPessoaClient {
5
+ postarPessoa(nome: string, sexo: string): Promise<PessoaResponse>;
6
+ pegarPessoa(id: number): Promise<PessoaResponse>;
7
+ deletarPessoa(id: number): Promise<void>;
8
+ pegarPessoaPaginada(pagina: number, tamanho: number): Promise<PessoaResponse[]>;
9
9
  }
10
- export declare class PessoaClient extends CrudClientBase<PessoaRequest, PessoaResponse> implements IincluirClientes {
10
+ export declare class PessoaClient extends CrudClientBase<PessoaRequest, PessoaResponse> implements IPessoaClient {
11
11
  constructor(urlServer: string, tokenJwt: string);
12
12
  constructor(server: {
13
13
  Url: string;
14
14
  }, tokenJwt: string);
15
15
  postarPessoa(nome: string, sexo: string): Promise<PessoaResponse>;
16
- incluirClientePj(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string): Promise<void>;
17
- incluirClientePjCompleto(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string, enderecos: EnderecoRequest[], telefones: PessoaTelefoneRequest[]): Promise<void>;
18
- incluirClientePf(cnpjPai: string, cpfFilho: string, nome: string): Promise<void>;
19
- incluirClientePfCompleto(cnpjPai: string, cpfFilho: string, nome: string, enderecos: EnderecoRequest[], telefones: PessoaTelefoneRequest[]): Promise<void>;
16
+ pegarPessoa(id: number): Promise<PessoaResponse>;
17
+ deletarPessoa(id: number): Promise<void>;
18
+ pegarPessoaPaginada(pagina: number, tamanho: number): Promise<PessoaResponse[]>;
20
19
  }
21
20
  export {};
@@ -12,19 +12,16 @@ class PessoaClient extends CrudClientBase_js_1.CrudClientBase {
12
12
  }
13
13
  }
14
14
  async postarPessoa(nome, sexo) {
15
- if (sexo !== "H" && sexo !== "M")
16
- throw new Error("Sexo inválido");
17
- const req = { Nome: nome, Sexo: sexo };
18
- const res = await this.postAsync(req);
19
- return res;
15
+ return this.postAsync({ Nome: nome, Sexo: sexo });
20
16
  }
21
- async incluirClientePj(cnpjPai, cnpjFilho, razaoSocialFilho) {
17
+ async pegarPessoa(id) {
18
+ return await this.getAsync(id);
22
19
  }
23
- async incluirClientePjCompleto(cnpjPai, cnpjFilho, razaoSocialFilho, enderecos, telefones) {
20
+ async deletarPessoa(id) {
21
+ return await this.deleteAsync(id);
24
22
  }
25
- async incluirClientePf(cnpjPai, cpfFilho, nome) {
26
- }
27
- async incluirClientePfCompleto(cnpjPai, cpfFilho, nome, enderecos, telefones) {
23
+ async pegarPessoaPaginada(pagina, tamanho) {
24
+ return await this.getPagedAsync(pagina, tamanho);
28
25
  }
29
26
  }
30
27
  exports.PessoaClient = PessoaClient;
@@ -0,0 +1,5 @@
1
+ import { EmpresaRequest, EmpresaResponse } from "7vdomain";
2
+ import { CrudClientBase } from "clients/base";
3
+ export declare class EmpresaSdk extends CrudClientBase<EmpresaRequest, EmpresaResponse> {
4
+ constructor(Url: string, tokenJwt: string);
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmpresaSdk = void 0;
4
+ const base_1 = require("clients/base");
5
+ class EmpresaSdk extends base_1.CrudClientBase {
6
+ constructor(Url, tokenJwt) {
7
+ super(Url, "api/portalcontador/empresa", tokenJwt);
8
+ }
9
+ }
10
+ exports.EmpresaSdk = EmpresaSdk;
@@ -1,10 +1,11 @@
1
1
  import { ImpostoEstadualRequest, ImpostoEstadualResponse } from "7vdomain";
2
2
  import { CrudClientBase } from "clients/base";
3
- interface IImpostoEstadualSdk {
3
+ interface IImpostoFederalSdk {
4
4
  criarImpostoEstadual(request: ImpostoEstadualRequest): Promise<ImpostoEstadualResponse>;
5
5
  pegarImpostoEstadual(id: number): Promise<ImpostoEstadualResponse>;
6
6
  }
7
- export declare class ImpostoEstadualSdk extends CrudClientBase<ImpostoEstadualRequest, ImpostoEstadualResponse> implements IImpostoEstadualSdk {
7
+ export declare class ImpostoEstadualSdk extends CrudClientBase<ImpostoEstadualRequest, ImpostoEstadualResponse> implements IImpostoFederalSdk {
8
+ constructor(Url: string, tokenJwt: string);
8
9
  criarImpostoEstadual(request: ImpostoEstadualRequest): Promise<ImpostoEstadualResponse>;
9
10
  pegarImpostoEstadual(id: number): Promise<ImpostoEstadualResponse>;
10
11
  }
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ImpostoEstadualSdk = void 0;
4
4
  const base_1 = require("clients/base");
5
5
  class ImpostoEstadualSdk extends base_1.CrudClientBase {
6
+ constructor(Url, tokenJwt) {
7
+ super(Url, "portal-contador/imposto/estadual", tokenJwt);
8
+ }
6
9
  async criarImpostoEstadual(request) {
7
10
  return await this.postAsync(request);
8
11
  }
@@ -1,11 +1,14 @@
1
+ import { ImpostoFederalRequest, ImpostoFederalResponse } from "7vdomain";
1
2
  import { CrudClientBase } from "clients/base";
2
3
  interface IImpostoFederalSdk {
3
- criarImpostoEstadual(request: ImpostoFederalRequest): Promise<ImpostoFederalResponse>;
4
- pegarImpostoEstadual(id: number): Promise<ImpostoFederalResponse>;
4
+ criarImpostoFederal(request: ImpostoFederalRequest): Promise<ImpostoFederalResponse>;
5
+ pegarImpostoFederal(id: number): Promise<ImpostoFederalResponse>;
6
+ deletarImpostoFederal(id: number): Promise<void>;
5
7
  }
6
- export declare class ImpostoEstadualSdk extends CrudClientBase<ImpostoFederalRequest, ImpostoEstadualResponse> implements IImpostoFederalSdk {
8
+ export declare class ImpostoFederalSdk extends CrudClientBase<ImpostoFederalRequest, ImpostoFederalResponse> implements IImpostoFederalSdk {
7
9
  constructor(Url: string, tokenJwt: string);
8
- criarImpostoEstadual(request: ImpostoFederalRequest): Promise<ImpostoFederalResponse>;
9
- pegarImpostoEstadual(id: number): Promise<ImpostoFederalResponse>;
10
+ criarImpostoFederal(request: ImpostoFederalRequest): Promise<ImpostoFederalResponse>;
11
+ pegarImpostoFederal(id: number): Promise<ImpostoFederalResponse>;
12
+ deletarImpostoFederal(id: number): Promise<void>;
10
13
  }
11
14
  export {};
@@ -1,16 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ImpostoEstadualSdk = void 0;
3
+ exports.ImpostoFederalSdk = void 0;
4
4
  const base_1 = require("clients/base");
5
- class ImpostoEstadualSdk extends base_1.CrudClientBase {
5
+ class ImpostoFederalSdk extends base_1.CrudClientBase {
6
6
  constructor(Url, tokenJwt) {
7
- super(Url, "portal-contador/imposto/estadual", tokenJwt);
7
+ super(Url, "portal-contador/imposto/federal", tokenJwt);
8
8
  }
9
- async criarImpostoEstadual(request) {
9
+ async criarImpostoFederal(request) {
10
10
  return await this.postAsync(request);
11
11
  }
12
- async pegarImpostoEstadual(id) {
12
+ async pegarImpostoFederal(id) {
13
13
  return await this.getAsync(id);
14
14
  }
15
+ async deletarImpostoFederal(id) {
16
+ return await this.deleteAsync(id);
17
+ }
15
18
  }
16
- exports.ImpostoEstadualSdk = ImpostoEstadualSdk;
19
+ exports.ImpostoFederalSdk = ImpostoFederalSdk;
@@ -1 +1,3 @@
1
+ export * from "./EmpresaSdk";
2
+ export * from "./ImpostoEstadualSdk";
1
3
  export * from "./ImpostoFederalSdk";
@@ -14,4 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./EmpresaSdk"), exports);
18
+ __exportStar(require("./ImpostoEstadualSdk"), exports);
17
19
  __exportStar(require("./ImpostoFederalSdk"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "7vsdk-pessoas",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "SDK de clientes para a API de Pessoas da 7Virtual.",
5
5
  "compilerOptions": {
6
6
  "target": "es6",
@@ -14,7 +14,6 @@
14
14
  "src/**/*"
15
15
  ],
16
16
  "dependencies": {
17
- "7vdomain": "^1.1.14",
18
- "7vsdk-usuarios": "^1.0.10"
17
+ "7vdomain": "^1.1.14"
19
18
  }
20
19
  }
@@ -1,3 +1,4 @@
1
1
  export * from "./base";
2
2
  export * from "./enderecos";
3
- export * from "./pessoas";
3
+ export * from "./pessoas";
4
+ export * from "./portalContador"
@@ -0,0 +1,3 @@
1
+ export * from "./EmpresaSdk";
2
+ export * from "./ImpostoEstadualSdk";
3
+ export * from "./ImpostoFederalSdk";
@@ -0,0 +1 @@
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"}