7vsdk-pessoas 1.0.0 → 1.0.2
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 +3 -8
- package/src/clients/{Base → base}/CrudClientBase.ts +7 -7
- package/src/clients/base/index.ts +1 -0
- package/src/clients/enderecos/EnderecoBairroClient.ts +21 -0
- package/src/clients/enderecos/EnderecoCidadeClient.ts +22 -0
- package/src/clients/enderecos/EnderecoClient.ts +21 -0
- package/src/clients/enderecos/EnderecoTipoClient.ts +20 -0
- package/src/clients/enderecos/UfClient.ts +8 -0
- package/src/clients/enderecos/index.ts +5 -0
- package/src/clients/index.ts +4 -0
- package/src/clients/{Pessoas → pessoas}/PessoaClient.ts +6 -3
- package/src/clients/{Pessoas → pessoas}/PessoaCnpjClient.ts +2 -3
- package/src/clients/{Pessoas → pessoas}/PessoaCpfClient.ts +2 -2
- package/src/clients/{Pessoas → pessoas}/PessoaEmailClient.ts +2 -2
- package/src/clients/{Pessoas → pessoas}/PessoaEnderecoClient.ts +2 -2
- package/src/clients/{Pessoas → pessoas}/PessoaNascimentoClient.ts +2 -2
- package/src/clients/{Pessoas → pessoas}/PessoaNecessidadeEspecial.ts +2 -2
- package/src/clients/{Pessoas → pessoas}/PessoaProcedimentoClient.ts +2 -2
- package/src/clients/{Pessoas → pessoas}/PessoaRelacaoClient.ts +2 -2
- package/src/clients/{Pessoas → pessoas}/PessoaRelacaoGrupoClient.ts +2 -2
- package/src/clients/{Pessoas → pessoas}/PessoaRelacaoTipoClient.ts +2 -2
- package/src/clients/pessoas/PessoaTelefoneClient.ts +11 -0
- package/src/clients/pessoas/PessoaTipoClient.ts +10 -0
- package/src/clients/pessoas/index.ts +12 -0
- package/src/clients/portalContador/empresaClient.ts +34 -0
- package/src/index.ts +1 -0
- package/src/test.ts +34 -11
- package/src/clients/Base/CrudClientBase.d.ts +0 -14
- package/src/clients/Base/CrudClientBase.d.ts.map +0 -1
- package/src/clients/Base/CrudClientBase.js +0 -57
- package/src/clients/Base/CrudClientBase.js.map +0 -1
- package/src/clients/Enderecos/EnderecoBairroClient.d.ts +0 -8
- package/src/clients/Enderecos/EnderecoBairroClient.d.ts.map +0 -1
- package/src/clients/Enderecos/EnderecoBairroClient.js +0 -7
- package/src/clients/Enderecos/EnderecoBairroClient.js.map +0 -1
- package/src/clients/Enderecos/EnderecoBairroClient.ts +0 -8
- package/src/clients/Enderecos/EnderecoCidadeClient.d.ts +0 -8
- package/src/clients/Enderecos/EnderecoCidadeClient.d.ts.map +0 -1
- package/src/clients/Enderecos/EnderecoCidadeClient.js +0 -7
- package/src/clients/Enderecos/EnderecoCidadeClient.js.map +0 -1
- package/src/clients/Enderecos/EnderecoCidadeClient.ts +0 -8
- package/src/clients/Enderecos/EnderecoClient.d.ts +0 -8
- package/src/clients/Enderecos/EnderecoClient.d.ts.map +0 -1
- package/src/clients/Enderecos/EnderecoClient.js +0 -7
- package/src/clients/Enderecos/EnderecoClient.js.map +0 -1
- package/src/clients/Enderecos/EnderecoClient.ts +0 -8
- package/src/clients/Enderecos/EnderecoTipoClient.d.ts +0 -8
- package/src/clients/Enderecos/EnderecoTipoClient.d.ts.map +0 -1
- package/src/clients/Enderecos/EnderecoTipoClient.js +0 -7
- package/src/clients/Enderecos/EnderecoTipoClient.js.map +0 -1
- package/src/clients/Enderecos/EnderecoTipoClient.ts +0 -8
- package/src/clients/Enderecos/UfClient.d.ts +0 -8
- package/src/clients/Enderecos/UfClient.d.ts.map +0 -1
- package/src/clients/Enderecos/UfClient.js +0 -7
- package/src/clients/Enderecos/UfClient.js.map +0 -1
- package/src/clients/Enderecos/UfClient.ts +0 -8
- package/src/clients/Pessoas/PessoaClient.d.ts +0 -10
- package/src/clients/Pessoas/PessoaClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaClient.js +0 -12
- package/src/clients/Pessoas/PessoaClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaCnpjClient.d.ts +0 -9
- package/src/clients/Pessoas/PessoaCnpjClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaCnpjClient.js +0 -7
- package/src/clients/Pessoas/PessoaCnpjClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaCpfClient.d.ts +0 -8
- package/src/clients/Pessoas/PessoaCpfClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaCpfClient.js +0 -7
- package/src/clients/Pessoas/PessoaCpfClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaEmailClient.d.ts +0 -8
- package/src/clients/Pessoas/PessoaEmailClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaEmailClient.js +0 -7
- package/src/clients/Pessoas/PessoaEmailClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaEnderecoClient.d.ts +0 -8
- package/src/clients/Pessoas/PessoaEnderecoClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaEnderecoClient.js +0 -7
- package/src/clients/Pessoas/PessoaEnderecoClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaNascimentoClient.d.ts +0 -8
- package/src/clients/Pessoas/PessoaNascimentoClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaNascimentoClient.js +0 -7
- package/src/clients/Pessoas/PessoaNascimentoClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaNecessidadeEspecial.d.ts +0 -8
- package/src/clients/Pessoas/PessoaNecessidadeEspecial.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaNecessidadeEspecial.js +0 -7
- package/src/clients/Pessoas/PessoaNecessidadeEspecial.js.map +0 -1
- package/src/clients/Pessoas/PessoaProcedimentoClient.d.ts +0 -8
- package/src/clients/Pessoas/PessoaProcedimentoClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaProcedimentoClient.js +0 -7
- package/src/clients/Pessoas/PessoaProcedimentoClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaRelacaoClient.d.ts +0 -8
- package/src/clients/Pessoas/PessoaRelacaoClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaRelacaoClient.js +0 -7
- package/src/clients/Pessoas/PessoaRelacaoClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaRelacaoGrupoClient.d.ts +0 -8
- package/src/clients/Pessoas/PessoaRelacaoGrupoClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaRelacaoGrupoClient.js +0 -7
- package/src/clients/Pessoas/PessoaRelacaoGrupoClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaRelacaoTipoClient.d.ts +0 -8
- package/src/clients/Pessoas/PessoaRelacaoTipoClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaRelacaoTipoClient.js +0 -7
- package/src/clients/Pessoas/PessoaRelacaoTipoClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaTipoClient.d.ts +0 -9
- package/src/clients/Pessoas/PessoaTipoClient.d.ts.map +0 -1
- package/src/clients/Pessoas/PessoaTipoClient.js +0 -10
- package/src/clients/Pessoas/PessoaTipoClient.js.map +0 -1
- package/src/clients/Pessoas/PessoaTipoClient.ts +0 -11
- package/src/clients/Pessoas/index.d.ts +0 -2
- package/src/clients/Pessoas/index.d.ts.map +0 -1
- package/src/clients/Pessoas/index.js +0 -2
- package/src/clients/Pessoas/index.js.map +0 -1
- package/src/clients/Pessoas/index.ts +0 -1
- package/src/test.d.ts +0 -2
- package/src/test.d.ts.map +0 -1
- package/src/test.js +0 -22
- package/src/test.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "7vsdk-pessoas",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"main": "index.js",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"scripts": {
|
|
7
6
|
"build": "tsc",
|
|
8
7
|
"start": "node dist/test.js",
|
|
@@ -14,15 +13,11 @@
|
|
|
14
13
|
"description": "",
|
|
15
14
|
"devDependencies": {
|
|
16
15
|
"@types/node": "^24.10.1",
|
|
17
|
-
"7vDomainCore": "file:7vDomainCore-0.0.2.ts.tgz",
|
|
18
16
|
"ts-node": "^10.9.2",
|
|
19
17
|
"typescript": "^5.9.3"
|
|
20
18
|
},
|
|
21
19
|
"dependencies": {
|
|
22
|
-
"7vdomain": "^0.
|
|
23
|
-
"
|
|
24
|
-
"7vDomainCore": "file:7vDomainCore-0.0.2.ts.tgz",
|
|
25
|
-
"auth": "file:auth-1.0.0.tgz",
|
|
26
|
-
"domain-core": "file:domain-core-0.0.1.tgz"
|
|
20
|
+
"7vdomain": "^1.0.20",
|
|
21
|
+
"7vsdk-usuarios": "^1.0.10"
|
|
27
22
|
}
|
|
28
23
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ResultDto } from "7vdomain";
|
|
2
2
|
|
|
3
|
-
export abstract class CrudClientBase<
|
|
3
|
+
export abstract class CrudClientBase<TRequest, TResponse> {
|
|
4
4
|
protected baseUrl: string;
|
|
5
5
|
protected endpointBase: string;
|
|
6
6
|
protected tokenJwt?: string;
|
|
@@ -25,12 +25,12 @@ export abstract class CrudClientBase<TResponse, TRequest> {
|
|
|
25
25
|
return envelope.data;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
async getAsync(id: number): Promise<TResponse> {
|
|
28
|
+
protected async getAsync(id: number): Promise<TResponse> {
|
|
29
29
|
const res = await fetch(`${this.baseUrl}${this.endpointBase}/${id}`, { headers: this.headers });
|
|
30
30
|
return this.handleResponse<TResponse>(res);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
async getPagedAsync(pageNumber: number = 1, pageSize: number = 25): Promise<TResponse[]> {
|
|
33
|
+
protected async getPagedAsync(pageNumber: number = 1, pageSize: number = 25): Promise<TResponse[]> {
|
|
34
34
|
const res = await fetch(
|
|
35
35
|
`${this.baseUrl}${this.endpointBase}?pageNumber=${pageNumber}&pageSize=${pageSize}`,
|
|
36
36
|
{ headers: this.headers }
|
|
@@ -38,7 +38,7 @@ export abstract class CrudClientBase<TResponse, TRequest> {
|
|
|
38
38
|
return this.handleResponse<TResponse[]>(res);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
async postAsync(request: TRequest): Promise<TResponse> {
|
|
41
|
+
protected async postAsync(request: TRequest): Promise<TResponse> {
|
|
42
42
|
const res = await fetch(`${this.baseUrl}${this.endpointBase}`, {
|
|
43
43
|
method: "POST",
|
|
44
44
|
headers: this.headers,
|
|
@@ -47,7 +47,7 @@ export abstract class CrudClientBase<TResponse, TRequest> {
|
|
|
47
47
|
return this.handleResponse<TResponse>(res);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
async updateAsync(id: number, newObject: TRequest): Promise<TResponse> {
|
|
50
|
+
protected async updateAsync(id: number, newObject: TRequest): Promise<TResponse> {
|
|
51
51
|
const res = await fetch(`${this.baseUrl}${this.endpointBase}/${id}`, {
|
|
52
52
|
method: "PUT",
|
|
53
53
|
headers: this.headers,
|
|
@@ -56,7 +56,7 @@ export abstract class CrudClientBase<TResponse, TRequest> {
|
|
|
56
56
|
return this.handleResponse<TResponse>(res);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
async deleteAsync(id: number): Promise<void> {
|
|
59
|
+
protected async deleteAsync(id: number): Promise<void> {
|
|
60
60
|
const res = await fetch(`${this.baseUrl}${this.endpointBase}/${id}`, {
|
|
61
61
|
method: "DELETE",
|
|
62
62
|
headers: this.headers,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CrudClientBase"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EnderecoBairroRequest, EnderecoBairroResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
|
+
|
|
4
|
+
interface IEnderecoBairroClient
|
|
5
|
+
{
|
|
6
|
+
postarBairro(nome: string, cidadeId: number): Promise<EnderecoBairroResponse>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class EnderecoBairroClient extends CrudClientBase<EnderecoBairroRequest, EnderecoBairroResponse>
|
|
10
|
+
implements IEnderecoBairroClient
|
|
11
|
+
{
|
|
12
|
+
constructor(server: { Url: string }, tokenJwt: string) {
|
|
13
|
+
super(server.Url, "api/endereco/bairro", tokenJwt);
|
|
14
|
+
}
|
|
15
|
+
public async postarBairro(nome: string, cidadeId: number): Promise<EnderecoBairroResponse> {
|
|
16
|
+
const _req: EnderecoBairroRequest = { Nome: nome, CidadeId: cidadeId };
|
|
17
|
+
const response = await this.postAsync(_req);
|
|
18
|
+
return response;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { EnderecoCidadeRequest, EnderecoCidadeResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
|
+
|
|
4
|
+
interface IEnderecoCidadeClient
|
|
5
|
+
{
|
|
6
|
+
postarEndereco(nome: string, codigoIbge: number, ufId: number): Promise<EnderecoCidadeResponse>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class EnderecoCidadeClient
|
|
10
|
+
extends CrudClientBase<EnderecoCidadeRequest, EnderecoCidadeResponse>
|
|
11
|
+
implements IEnderecoCidadeClient
|
|
12
|
+
{
|
|
13
|
+
constructor(server: { Url: string }, tokenJwt: string) {
|
|
14
|
+
super(server.Url, "api/endereco/cidade", tokenJwt);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public async postarEndereco(nome: string, codigoIbge: number, ufId: number): Promise<EnderecoCidadeResponse> {
|
|
18
|
+
const _req: EnderecoCidadeRequest = { Nome: nome, CodigoIbge: codigoIbge, UfId: ufId };
|
|
19
|
+
const response = await this.postAsync(_req);
|
|
20
|
+
return response;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { EnderecoRequest, EnderecoResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
|
+
|
|
4
|
+
interface IEnderecoClient
|
|
5
|
+
{
|
|
6
|
+
postarEndereco(nomeRuaLog: string, bairroId: number): Promise<EnderecoResponse>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class EnderecoClient extends CrudClientBase<EnderecoRequest,EnderecoResponse>
|
|
10
|
+
implements IEnderecoClient
|
|
11
|
+
{
|
|
12
|
+
constructor(Url: string , tokenJwt: string) {
|
|
13
|
+
super(Url, "api/endereco/bairro", tokenJwt);
|
|
14
|
+
}
|
|
15
|
+
async postarEndereco(nomeRuaLog: string, bairroId: number): Promise<EnderecoResponse> {
|
|
16
|
+
const _req: EnderecoRequest = {NomeRuaLogradouro: nomeRuaLog, BairroId: bairroId}
|
|
17
|
+
const _res = await this.postAsync(_req);
|
|
18
|
+
return _res;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EnderecoTipoRequest, EnderecoTipoResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
|
+
|
|
4
|
+
interface IEnderecoTipoClient
|
|
5
|
+
{
|
|
6
|
+
postarEnderecoTipo(nome: string): Promise<EnderecoTipoResponse>;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class EnderecoTipoClient extends CrudClientBase<EnderecoTipoRequest, EnderecoTipoResponse>
|
|
10
|
+
implements IEnderecoTipoClient
|
|
11
|
+
{
|
|
12
|
+
constructor(server: { Url: string }, tokenJwt: string) {
|
|
13
|
+
super(server.Url, "api/endereco/bairro", tokenJwt);
|
|
14
|
+
}
|
|
15
|
+
async postarEnderecoTipo(nome: string): Promise<EnderecoTipoResponse> {
|
|
16
|
+
const _req: EnderecoTipoRequest = {Nome: nome}
|
|
17
|
+
const res = await this.postAsync(_req);
|
|
18
|
+
return res;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UfRequest, UfResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "7vsdk-usuarios";
|
|
3
|
+
|
|
4
|
+
export class UfClient extends CrudClientBase<UfRequest, UfResponse> {
|
|
5
|
+
constructor(server: { Url: string }, tokenJwt: string) {
|
|
6
|
+
super(server.Url, "api/endereco/bairro", tokenJwt);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { PessoaResponse } from "7vdomain";
|
|
2
|
+
import { PessoaRequest } from "7vdomain";
|
|
3
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
4
4
|
|
|
5
5
|
export class PessoaClient extends CrudClientBase<PessoaResponse, PessoaRequest> {
|
|
6
6
|
constructor(urlServer: string, tokenJwt: string);
|
|
@@ -13,4 +13,7 @@ export class PessoaClient extends CrudClientBase<PessoaResponse, PessoaRequest>
|
|
|
13
13
|
super(urlOrServer.Url, '/api/pessoa', tokenJwt);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
16
19
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { PessoaCnpjRequest } from "
|
|
2
|
-
import
|
|
3
|
-
import { CrudClientBase } from "../Base/CrudClientBase.js";
|
|
1
|
+
import type { PessoaCnpjRequest, PessoaCnpjResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
4
3
|
|
|
5
4
|
export class PessoaCnpjClient extends CrudClientBase<PessoaCnpjResponse, PessoaCnpjRequest> {
|
|
6
5
|
constructor(server: { Url: string }, tokenJwt: string) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PessoaCpfRequest, PessoaCpfResponse } from "
|
|
2
|
-
import { CrudClientBase } from "../
|
|
1
|
+
import type { PessoaCpfRequest, PessoaCpfResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
3
|
|
|
4
4
|
export class PessoaCpfClient extends CrudClientBase<PessoaCpfResponse, PessoaCpfRequest> {
|
|
5
5
|
constructor(server: { Url: string }, tokenJwt: string) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PessoaEmailRequest, PessoaEmailResponse } from "
|
|
2
|
-
import { CrudClientBase } from "../
|
|
1
|
+
import type { PessoaEmailRequest, PessoaEmailResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
3
|
|
|
4
4
|
export class PessoaEmailClient extends CrudClientBase<PessoaEmailResponse, PessoaEmailRequest> {
|
|
5
5
|
constructor(server: { Url: string }, tokenJwt: string) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PessoaEnderecoRequest, PessoaEnderecoResponse } from "
|
|
2
|
-
import { CrudClientBase } from "../
|
|
1
|
+
import type { PessoaEnderecoRequest, PessoaEnderecoResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
3
|
|
|
4
4
|
export class PessoaEnderecoClient extends CrudClientBase<PessoaEnderecoResponse, PessoaEnderecoRequest> {
|
|
5
5
|
constructor(server: { Url: string }, tokenJwt: string) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PessoaNascimentoRequest, PessoaNascimentoResponse } from "
|
|
2
|
-
import { CrudClientBase } from "../
|
|
1
|
+
import type { PessoaNascimentoRequest, PessoaNascimentoResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export class PessoaNascimentoClient extends CrudClientBase<PessoaNascimentoResponse, PessoaNascimentoRequest> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PessoaNecessidadeEspecialRequest, PessoaNecessidadeEspecialResponse } from "
|
|
2
|
-
import { CrudClientBase } from "../
|
|
1
|
+
import type { PessoaNecessidadeEspecialRequest, PessoaNecessidadeEspecialResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
export class PessoaNecessidadeEspecialClient extends CrudClientBase<PessoaNecessidadeEspecialResponse, PessoaNecessidadeEspecialRequest> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PessoaProcedimentoRequest, PessoaProcedimentoResponse } from "
|
|
2
|
-
import { CrudClientBase } from "../
|
|
1
|
+
import type { PessoaProcedimentoRequest, PessoaProcedimentoResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
3
|
|
|
4
4
|
export class PessoaProcedimentoClient extends CrudClientBase<PessoaProcedimentoResponse, PessoaProcedimentoRequest> {
|
|
5
5
|
constructor(server: { Url: string }, tokenJwt: string) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PessoaRelacaoRequest, PessoaRelacaoResponse } from "
|
|
2
|
-
import { CrudClientBase } from "../
|
|
1
|
+
import type { PessoaRelacaoRequest, PessoaRelacaoResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
3
|
|
|
4
4
|
export class PessoaRelacaoClient extends CrudClientBase<PessoaRelacaoResponse, PessoaRelacaoRequest> {
|
|
5
5
|
constructor(server: { Url: string }, tokenJwt: string) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PessoaRelacaoGrupoRequest, PessoaRelacaoGrupoResponse } from "
|
|
2
|
-
import { CrudClientBase } from "../
|
|
1
|
+
import type { PessoaRelacaoGrupoRequest, PessoaRelacaoGrupoResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
3
|
|
|
4
4
|
export class PessoaRelacaoGrupoClient extends CrudClientBase<PessoaRelacaoGrupoResponse, PessoaRelacaoGrupoRequest> {
|
|
5
5
|
constructor(server: { Url: string }, tokenJwt: string) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PessoaRelacaoRequest, PessoaRelacaoResponse } from "
|
|
2
|
-
import { CrudClientBase } from "../
|
|
1
|
+
import type { PessoaRelacaoRequest, PessoaRelacaoResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
3
|
|
|
4
4
|
export class PessoaRelacaoTipoClient extends CrudClientBase<PessoaRelacaoResponse, PessoaRelacaoRequest> {
|
|
5
5
|
constructor(server: { Url: string }, tokenJwt: string) {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PessoaTelefoneRequest, PessoaTelefoneResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "7vsdk-usuarios";
|
|
3
|
+
|
|
4
|
+
export class PesosaTelefoneClient extends CrudClientBase<PessoaTelefoneRequest, PessoaTelefoneResponse>
|
|
5
|
+
{
|
|
6
|
+
constructor(url: string, tok: string)
|
|
7
|
+
{
|
|
8
|
+
super(url, "api/pessoa/telefone", tok);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PessoaTipoRequest, PessoaTipoResponse } from "7vdomain";
|
|
2
|
+
import { CrudClientBase } from "../base/CrudClientBase.js";
|
|
3
|
+
|
|
4
|
+
export class PessoaTipoClient extends CrudClientBase<PessoaTipoRequest, PessoaTipoResponse> {
|
|
5
|
+
constructor(server: { Url: string }, tokenJwt: string) {
|
|
6
|
+
super(server.Url, "api/pessoa/tipo", tokenJwt);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./PessoaClient";
|
|
2
|
+
export * from "./PessoaCnpjClient";
|
|
3
|
+
export * from "./PessoaCpfClient";
|
|
4
|
+
export * from "./PessoaEmailClient";
|
|
5
|
+
export * from "./PessoaEnderecoClient";
|
|
6
|
+
export * from "./PessoaNascimentoClient";
|
|
7
|
+
export * from "./PessoaNecessidadeEspecial";
|
|
8
|
+
export * from "./PessoaProcedimentoClient";
|
|
9
|
+
export * from "./PessoaRelacaoClient";
|
|
10
|
+
export * from "./PessoaRelacaoGrupoClient";
|
|
11
|
+
export * from "./PessoaRelacaoTipoClient";
|
|
12
|
+
export * from "./PessoaTipoClient";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EmpresaRequest, EmpresaResponse, EnderecoRequest, PessoaTelefoneRequest } from "7vdomain"
|
|
2
|
+
import { CrudClientBase } from "7vsdk-usuarios";
|
|
3
|
+
import { EnderecoClient } from "../enderecos";
|
|
4
|
+
|
|
5
|
+
export class EmpresaClient extends CrudClientBase<EmpresaRequest, EmpresaResponse>
|
|
6
|
+
{
|
|
7
|
+
private empresa: EmpresaRequest;
|
|
8
|
+
private _url: string;
|
|
9
|
+
private _tok: string;
|
|
10
|
+
|
|
11
|
+
constructor(url: string, token: string) {
|
|
12
|
+
super(url, "portal-contador/empresas", token);
|
|
13
|
+
this._url = url;
|
|
14
|
+
this._tok = token;
|
|
15
|
+
this.empresa = {} as EmpresaRequest;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public async incluirEmpresaRoot(cnpj: string, razaoSocial: string)
|
|
19
|
+
{
|
|
20
|
+
this.empresa.Cnpj = cnpj;
|
|
21
|
+
this.empresa.RazaoSocial = razaoSocial;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public async incluirEmpresaRootCompleto(cnpj: string, razaoSocial: string, enderecos: EnderecoRequest[], telefones: PessoaTelefoneRequest[])
|
|
25
|
+
{
|
|
26
|
+
this.empresa.Cnpj = cnpj;
|
|
27
|
+
this.empresa.RazaoSocial = razaoSocial;
|
|
28
|
+
const _endereco: EnderecoClient = new EnderecoClient(this._url, this._tok);
|
|
29
|
+
for(const endereco of enderecos)
|
|
30
|
+
{
|
|
31
|
+
await _endereco.postarEndereco(endereco.NomeRuaLogradouro, endereco.BairroId);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./clients"
|
package/src/test.ts
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import { PessoaRequest, UsuarioRequest } from "7vdomain";
|
|
2
|
+
import { EnderecoRequest } from "7vdomain";
|
|
3
|
+
import { PessoaTelefoneRequest } from "7vdomain";
|
|
4
|
+
import { PessoaClient } from "./clients/pessoas/PessoaClient.js";
|
|
5
|
+
import { AuthClient } from "7vsdk-usuarios";
|
|
6
|
+
|
|
7
|
+
async function incluirEmpresaRoot(cnpj: string, razaoSocial: string)
|
|
8
|
+
{
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async function incluirEmpresaRootCompleto(cnpj: string, razaoSocial: string, enderecos: EnderecoRequest[], telefone: PessoaTelefoneRequest[])
|
|
13
|
+
{
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async function incluirClientePj(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string)
|
|
18
|
+
{
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async function incluirClientePjCompleto(cnpjPai: string, cnpjFilho: string, razaoSocialFilho: string)
|
|
23
|
+
{
|
|
24
|
+
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function incluirClientePf(cnpjPai: string, cpfFilho: string, nome: string)
|
|
28
|
+
{
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
async function incluirClientePfCompleto(cnpjPai: string, cpfFilho: string, nome: string, enderecos: EnderecoRequest[], telefones: PessoaTelefoneRequest[]){
|
|
33
|
+
|
|
34
|
+
}
|
|
4
35
|
|
|
5
36
|
async function main() {
|
|
6
37
|
const auth = new AuthClient("http://localhost:7192");
|
|
@@ -23,14 +54,6 @@ async function main() {
|
|
|
23
54
|
Sexo: "H"
|
|
24
55
|
};
|
|
25
56
|
|
|
26
|
-
|
|
27
|
-
const pessoaVolta = await pessoac.postAsync(pess);
|
|
28
|
-
console.log(pessoaVolta);
|
|
29
|
-
try {
|
|
30
|
-
await pessoac.deleteAsync(1402);
|
|
31
|
-
} catch (err) {
|
|
32
|
-
console.error('Falha ao deletar pessoa:', err);
|
|
33
|
-
}
|
|
34
57
|
|
|
35
58
|
return { auth, usuario, token };
|
|
36
59
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare abstract class CrudClientBase<TResponse, TRequest> {
|
|
2
|
-
protected baseUrl: string;
|
|
3
|
-
protected endpointBase: string;
|
|
4
|
-
protected tokenJwt?: string;
|
|
5
|
-
constructor(baseUrl: string, endpoint: string, tokenJwt: string);
|
|
6
|
-
private get headers();
|
|
7
|
-
private handleResponse;
|
|
8
|
-
getAsync(id: number): Promise<TResponse>;
|
|
9
|
-
getPagedAsync(pageNumber?: number, pageSize?: number): Promise<TResponse[]>;
|
|
10
|
-
postAsync(request: TRequest): Promise<TResponse>;
|
|
11
|
-
updateAsync(id: number, newObject: TRequest): Promise<TResponse>;
|
|
12
|
-
deleteAsync(id: number): Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=CrudClientBase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CrudClientBase.d.ts","sourceRoot":"","sources":["CrudClientBase.ts"],"names":[],"mappings":"AAEA,8BAAsB,cAAc,CAAC,SAAS,EAAE,QAAQ;IACpD,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC;IAC/B,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAEhB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAO/D,OAAO,KAAK,OAAO,GAIlB;YAEa,cAAc;IAOtB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAKxC,aAAa,CAAC,UAAU,GAAE,MAAU,EAAE,QAAQ,GAAE,MAAW,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAQlF,SAAS,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;IAShD,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;IAShE,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAO/C"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export class CrudClientBase {
|
|
2
|
-
baseUrl;
|
|
3
|
-
endpointBase;
|
|
4
|
-
tokenJwt;
|
|
5
|
-
constructor(baseUrl, endpoint, tokenJwt) {
|
|
6
|
-
this.baseUrl = baseUrl.endsWith('/') ? baseUrl.slice(0, -1) : baseUrl;
|
|
7
|
-
this.endpointBase = endpoint.startsWith('/') ? endpoint : '/' + endpoint;
|
|
8
|
-
this.tokenJwt = tokenJwt;
|
|
9
|
-
}
|
|
10
|
-
get headers() {
|
|
11
|
-
const h = { "Content-Type": "application/json" };
|
|
12
|
-
if (this.tokenJwt)
|
|
13
|
-
h["Authorization"] = `Bearer ${this.tokenJwt}`;
|
|
14
|
-
return h;
|
|
15
|
-
}
|
|
16
|
-
async handleResponse(res) {
|
|
17
|
-
if (!res.ok)
|
|
18
|
-
throw new Error(`HTTP ${res.status}: ${res.statusText}`);
|
|
19
|
-
const envelope = await res.json();
|
|
20
|
-
if (!envelope?.data)
|
|
21
|
-
throw new Error("Resposta inválida do servidor.");
|
|
22
|
-
return envelope.data;
|
|
23
|
-
}
|
|
24
|
-
async getAsync(id) {
|
|
25
|
-
const res = await fetch(`${this.baseUrl}${this.endpointBase}/${id}`, { headers: this.headers });
|
|
26
|
-
return this.handleResponse(res);
|
|
27
|
-
}
|
|
28
|
-
async getPagedAsync(pageNumber = 1, pageSize = 25) {
|
|
29
|
-
const res = await fetch(`${this.baseUrl}${this.endpointBase}?pageNumber=${pageNumber}&pageSize=${pageSize}`, { headers: this.headers });
|
|
30
|
-
return this.handleResponse(res);
|
|
31
|
-
}
|
|
32
|
-
async postAsync(request) {
|
|
33
|
-
const res = await fetch(`${this.baseUrl}${this.endpointBase}`, {
|
|
34
|
-
method: "POST",
|
|
35
|
-
headers: this.headers,
|
|
36
|
-
body: JSON.stringify(request),
|
|
37
|
-
});
|
|
38
|
-
return this.handleResponse(res);
|
|
39
|
-
}
|
|
40
|
-
async updateAsync(id, newObject) {
|
|
41
|
-
const res = await fetch(`${this.baseUrl}${this.endpointBase}/${id}`, {
|
|
42
|
-
method: "PUT",
|
|
43
|
-
headers: this.headers,
|
|
44
|
-
body: JSON.stringify(newObject),
|
|
45
|
-
});
|
|
46
|
-
return this.handleResponse(res);
|
|
47
|
-
}
|
|
48
|
-
async deleteAsync(id) {
|
|
49
|
-
const res = await fetch(`${this.baseUrl}${this.endpointBase}/${id}`, {
|
|
50
|
-
method: "DELETE",
|
|
51
|
-
headers: this.headers,
|
|
52
|
-
});
|
|
53
|
-
if (!res.ok)
|
|
54
|
-
throw new Error(`HTTP ${res.status}: ${res.statusText}`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=CrudClientBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CrudClientBase.js","sourceRoot":"","sources":["CrudClientBase.ts"],"names":[],"mappings":"AAEA,MAAM,OAAgB,cAAc;IACtB,OAAO,CAAS;IAChB,YAAY,CAAS;IACrB,QAAQ,CAAU;IAE5B,YAAY,OAAe,EAAE,QAAgB,EAAE,QAAgB;QAC3D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACtE,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC;QACzE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAGD,IAAY,OAAO;QACf,MAAM,CAAC,GAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC;QAC9D,IAAI,IAAI,CAAC,QAAQ;YAAE,CAAC,CAAC,eAAe,CAAC,GAAG,UAAU,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClE,OAAO,CAAC,CAAC;IACb,CAAC;IAEO,KAAK,CAAC,cAAc,CAAI,GAAa;QACzC,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,QAAQ,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;QACtE,MAAM,QAAQ,GAAiB,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAChD,IAAI,CAAC,QAAQ,EAAE,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACvE,OAAO,QAAQ,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU;QACrB,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,IAAI,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;QAChG,OAAO,IAAI,CAAC,cAAc,CAAY,GAAG,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,aAAqB,CAAC,EAAE,WAAmB,EAAE;QAC7D,MAAM,GAAG,GAAG,MAAM,KAAK,CACnB,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,eAAe,UAAU,aAAa,QAAQ,EAAE,EACnF,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAC5B,CAAC;QACF,OAAO,IAAI,CAAC,cAAc,CAAc,GAAG,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAiB;QAC7B,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,EAAE,EAAE;YAC3D,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;SAChC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,cAAc,CAAY,GAAG,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,EAAU,EAAE,SAAmB;QAC7C,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,IAAI,EAAE,EAAE,EAAE;YACjE,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;SAClC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,cAAc,CAAY,GAAG,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,EAAU;QACxB,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,IAAI,EAAE,EAAE,EAAE;YACjE,MAAM,EAAE,QAAQ;YAChB,OAAO,EAAE,IAAI,CAAC,OAAO;SACxB,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,QAAQ,GAAG,CAAC,MAAM,KAAK,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IAC1E,CAAC;CACJ"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { EnderecoBairroRequest, EnderecoBairroResponse } from "domain-core";
|
|
2
|
-
import { CrudClientBase } from "../Base/CrudClientBase.js";
|
|
3
|
-
export declare class EnderecoBairroClient extends CrudClientBase<EnderecoBairroRequest, EnderecoBairroResponse> {
|
|
4
|
-
constructor(server: {
|
|
5
|
-
Url: string;
|
|
6
|
-
}, tokenJwt: string);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=EnderecoBairroClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnderecoBairroClient.d.ts","sourceRoot":"","sources":["EnderecoBairroClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,qBAAqB,EAAE,sBAAsB,CAAC;gBACzF,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,MAAM;CAGtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnderecoBairroClient.js","sourceRoot":"","sources":["EnderecoBairroClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,OAAO,oBAAqB,SAAQ,cAA6D;IACrG,YAAY,MAAuB,EAAE,QAAgB;QACnD,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;CACF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { EnderecoBairroRequest, EnderecoBairroResponse } from "domain-core";
|
|
2
|
-
import { CrudClientBase } from "../Base/CrudClientBase.js";
|
|
3
|
-
|
|
4
|
-
export class EnderecoBairroClient extends CrudClientBase<EnderecoBairroRequest, EnderecoBairroResponse> {
|
|
5
|
-
constructor(server: { Url: string }, tokenJwt: string) {
|
|
6
|
-
super(server.Url, "api/endereco/bairro", tokenJwt);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { EnderecoCidadeRequest, EnderecoCidadeResponse } from "domain-core";
|
|
2
|
-
import { CrudClientBase } from "../Base/CrudClientBase.js";
|
|
3
|
-
export declare class EnderecoCidadeClient extends CrudClientBase<EnderecoCidadeRequest, EnderecoCidadeResponse> {
|
|
4
|
-
constructor(server: {
|
|
5
|
-
Url: string;
|
|
6
|
-
}, tokenJwt: string);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=EnderecoCidadeClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnderecoCidadeClient.d.ts","sourceRoot":"","sources":["EnderecoCidadeClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,qBAAqB,EAAE,sBAAsB,CAAC;gBACzF,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,MAAM;CAGtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnderecoCidadeClient.js","sourceRoot":"","sources":["EnderecoCidadeClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,OAAO,oBAAqB,SAAQ,cAA6D;IACrG,YAAY,MAAuB,EAAE,QAAgB;QACnD,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;CACF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { EnderecoCidadeRequest, EnderecoCidadeResponse } from "domain-core";
|
|
2
|
-
import { CrudClientBase } from "../Base/CrudClientBase.js";
|
|
3
|
-
|
|
4
|
-
export class EnderecoCidadeClient extends CrudClientBase<EnderecoCidadeRequest, EnderecoCidadeResponse> {
|
|
5
|
-
constructor(server: { Url: string }, tokenJwt: string) {
|
|
6
|
-
super(server.Url, "api/endereco/bairro", tokenJwt);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { EnderecoRequest, EnderecoResponse } from "domain-core";
|
|
2
|
-
import { CrudClientBase } from "../Base/CrudClientBase.js";
|
|
3
|
-
export declare class EnderecoClient extends CrudClientBase<EnderecoRequest, EnderecoResponse> {
|
|
4
|
-
constructor(server: {
|
|
5
|
-
Url: string;
|
|
6
|
-
}, tokenJwt: string);
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=EnderecoClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnderecoClient.d.ts","sourceRoot":"","sources":["EnderecoClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,cAAe,SAAQ,cAAc,CAAC,eAAe,EAAC,gBAAgB,CAAC;gBACtE,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,MAAM;CAGtD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnderecoClient.js","sourceRoot":"","sources":["EnderecoClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,OAAO,cAAe,SAAQ,cAAgD;IAClF,YAAY,MAAuB,EAAE,QAAgB;QACnD,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,qBAAqB,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;CACF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { EnderecoRequest, EnderecoResponse } from "domain-core";
|
|
2
|
-
import { CrudClientBase } from "../Base/CrudClientBase.js";
|
|
3
|
-
|
|
4
|
-
export class EnderecoClient extends CrudClientBase<EnderecoRequest,EnderecoResponse> {
|
|
5
|
-
constructor(server: { Url: string }, tokenJwt: string) {
|
|
6
|
-
super(server.Url, "api/endereco/bairro", tokenJwt);
|
|
7
|
-
}
|
|
8
|
-
}
|