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.
- package/dist/clients/index.d.ts +1 -0
- package/dist/clients/index.js +1 -0
- package/dist/clients/pessoas/PessoaClient.d.ts +10 -11
- package/dist/clients/pessoas/PessoaClient.js +7 -10
- package/dist/clients/portalContador/EmpresaSdk.d.ts +5 -0
- package/dist/clients/portalContador/EmpresaSdk.js +10 -0
- package/dist/clients/portalContador/ImpostoEstadualSdk.d.ts +3 -2
- package/dist/clients/portalContador/ImpostoEstadualSdk.js +3 -0
- package/dist/clients/portalContador/ImpostoFederalSdk.d.ts +8 -5
- package/dist/clients/portalContador/ImpostoFederalSdk.js +9 -6
- package/dist/clients/portalContador/index.d.ts +2 -0
- package/dist/clients/portalContador/index.js +2 -0
- package/package.json +2 -3
- package/src/clients/index.ts +2 -1
- package/src/clients/portalContador/index.ts +3 -0
- package/tsconfig.tsbuildinfo +1 -0
package/dist/clients/index.d.ts
CHANGED
package/dist/clients/index.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PessoaResponse } from "7vdomain";
|
|
2
2
|
import { PessoaRequest } from "7vdomain";
|
|
3
3
|
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
4
|
-
interface
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
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
|
|
17
|
+
async pegarPessoa(id) {
|
|
18
|
+
return await this.getAsync(id);
|
|
22
19
|
}
|
|
23
|
-
async
|
|
20
|
+
async deletarPessoa(id) {
|
|
21
|
+
return await this.deleteAsync(id);
|
|
24
22
|
}
|
|
25
|
-
async
|
|
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,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
|
|
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
|
|
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
|
-
|
|
4
|
-
|
|
4
|
+
criarImpostoFederal(request: ImpostoFederalRequest): Promise<ImpostoFederalResponse>;
|
|
5
|
+
pegarImpostoFederal(id: number): Promise<ImpostoFederalResponse>;
|
|
6
|
+
deletarImpostoFederal(id: number): Promise<void>;
|
|
5
7
|
}
|
|
6
|
-
export declare class
|
|
8
|
+
export declare class ImpostoFederalSdk extends CrudClientBase<ImpostoFederalRequest, ImpostoFederalResponse> implements IImpostoFederalSdk {
|
|
7
9
|
constructor(Url: string, tokenJwt: string);
|
|
8
|
-
|
|
9
|
-
|
|
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.
|
|
3
|
+
exports.ImpostoFederalSdk = void 0;
|
|
4
4
|
const base_1 = require("clients/base");
|
|
5
|
-
class
|
|
5
|
+
class ImpostoFederalSdk extends base_1.CrudClientBase {
|
|
6
6
|
constructor(Url, tokenJwt) {
|
|
7
|
-
super(Url, "portal-contador/imposto/
|
|
7
|
+
super(Url, "portal-contador/imposto/federal", tokenJwt);
|
|
8
8
|
}
|
|
9
|
-
async
|
|
9
|
+
async criarImpostoFederal(request) {
|
|
10
10
|
return await this.postAsync(request);
|
|
11
11
|
}
|
|
12
|
-
async
|
|
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.
|
|
19
|
+
exports.ImpostoFederalSdk = 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.
|
|
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
|
}
|
package/src/clients/index.ts
CHANGED
|
@@ -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"}
|