mintly-lib 2.7.0-preview → 2.7.1-preview

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.
Files changed (42) hide show
  1. package/build/clients/auth-client.d.ts.map +1 -1
  2. package/build/clients/auth-client.js +2 -10
  3. package/build/clients/auth-client.js.map +1 -1
  4. package/build/clients/financial-account-client.d.ts +14 -3
  5. package/build/clients/financial-account-client.d.ts.map +1 -1
  6. package/build/clients/financial-account-client.js +22 -4
  7. package/build/clients/financial-account-client.js.map +1 -1
  8. package/build/clients/financial-category-client.d.ts +13 -3
  9. package/build/clients/financial-category-client.d.ts.map +1 -1
  10. package/build/clients/financial-category-client.js +22 -5
  11. package/build/clients/financial-category-client.js.map +1 -1
  12. package/build/clients/financial-movement-client.d.ts +6 -6
  13. package/build/clients/financial-movement-client.d.ts.map +1 -1
  14. package/build/clients/financial-movement-client.js +11 -10
  15. package/build/clients/financial-movement-client.js.map +1 -1
  16. package/build/core/client/api-error.d.ts +11 -0
  17. package/build/core/client/api-error.d.ts.map +1 -0
  18. package/build/core/client/api-error.js +18 -0
  19. package/build/core/client/api-error.js.map +1 -0
  20. package/build/core/client/base-client.d.ts +19 -1
  21. package/build/core/client/base-client.d.ts.map +1 -1
  22. package/build/core/client/create-connection.d.ts +13 -0
  23. package/build/core/client/create-connection.d.ts.map +1 -0
  24. package/build/core/client/create-connection.js +39 -0
  25. package/build/core/client/create-connection.js.map +1 -0
  26. package/build/core/client/http-base-client.d.ts +9 -1
  27. package/build/core/client/http-base-client.d.ts.map +1 -1
  28. package/build/core/client/http-base-client.js +10 -10
  29. package/build/core/client/http-base-client.js.map +1 -1
  30. package/build/core/data/financial/financial-account-schema.d.ts +0 -290
  31. package/build/core/data/financial/financial-account-schema.d.ts.map +1 -1
  32. package/build/core/data/financial/financial-account-schema.js +9 -18
  33. package/build/core/data/financial/financial-account-schema.js.map +1 -1
  34. package/build/core/data/financial/financial-movement-schema.js +3 -3
  35. package/build/core/data/financial/financial-movement-schema.js.map +1 -1
  36. package/build/core/data/request/headers.d.ts +4 -4
  37. package/build/core/data/request/headers.d.ts.map +1 -1
  38. package/build/core/index.d.ts +4 -0
  39. package/build/core/index.d.ts.map +1 -1
  40. package/build/core/index.js +7 -1
  41. package/build/core/index.js.map +1 -1
  42. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"auth-client.d.ts","sourceRoot":"","sources":["../../src/clients/auth-client.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAE3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACtH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AAEpF;;;;GAIG;AACH,qBAAa,UAAU;IACrB,SAAS,CAAC,UAAU,EAAE,aAAa,CAAA;;IAW7B,MAAM,CAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAKlF,KAAK,CAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAK/E,OAAO,CAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;IAOrF,MAAM,CAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAIp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AO,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpE,mGAAmG;IAC7F,cAAc,CAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;IAKnG,8DAA8D;IACxD,aAAa,CAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC;CAIhH"}
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.AuthClient = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
4
  const request_config_1 = require("../core/client/request-config");
5
+ const create_connection_1 = require("../core/client/create-connection");
9
6
  /**
10
7
  * Cliente de autenticação (RPC, não CRUD): cadastro, login, refresh e logout.
11
8
  * Respostas seguem o mesmo envelope ResponseDto do restante da API. Todo método
@@ -13,12 +10,7 @@ const request_config_1 = require("../core/client/request-config");
13
10
  */
14
11
  class AuthClient {
15
12
  constructor() {
16
- this.connection = axios_1.default.create({
17
- baseURL: process.env.BACK_END_URL + '/auth',
18
- headers: {
19
- 'Content-Type': 'application/json',
20
- },
21
- });
13
+ this.connection = (0, create_connection_1.createHttpConnection)('auth');
22
14
  }
23
15
  async signup(body, headers) {
24
16
  const response = await this.connection.post('/signup', body, (0, request_config_1.withHeaders)(headers));
@@ -1 +1 @@
1
- {"version":3,"file":"auth-client.js","sourceRoot":"","sources":["../../src/clients/auth-client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA4C;AAG5C,kEAA2D;AAM3D;;;;GAIG;AACH,MAAa,UAAU;IAGrB;QACE,IAAI,CAAC,UAAU,GAAG,eAAK,CAAC,MAAM,CAAC;YAC7B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,OAAO;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3H,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,qEAAqE;IACrE,2CAA2C;IAC3C,KAAK,CAAC,MAAM,CAAE,YAAoB,EAAE,OAAgB;QAClD,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,YAAY,EAAE,EAAE,IAAA,4BAAW,EAAC,OAAO,CAAC,CAAC,CAAA;IAC/E,CAAC;IAED,mGAAmG;IACnG,KAAK,CAAC,cAAc,CAAE,KAAa,EAAE,OAAgB;QACnD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAqC,kBAAkB,EAAE,EAAE,KAAK,EAAE,EAAE,IAAA,4BAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QACpI,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,8DAA8D;IAC9D,KAAK,CAAC,aAAa,CAAE,IAA0B,EAAE,OAAgB;QAC/D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAqC,iBAAiB,EAAE,IAAI,EAAE,IAAA,4BAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAC9H,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AAvCD,gCAuCC"}
@@ -1,10 +1,21 @@
1
1
  import { ResponseDto } from '../core';
2
- import { HttpBaseClient } from '../core/client/http-base-client';
2
+ import type { Insertable, Findable, Listable, Updatable } from '../core/client/base-client';
3
+ import type { FindAllRequestDto } from '../core/data/request/pagination';
3
4
  import type { Headers } from '../core/data/request/headers';
4
5
  import type { FinancialAccount } from '../core/data/financial/financial-account-entity';
5
6
  import type { FinancialAccountActionResult, InactivateFinancialAccountRequest } from '../core/data/financial/financial-account-response';
6
- export declare class FinancialAccountClient extends HttpBaseClient<FinancialAccount> {
7
- constructor();
7
+ /**
8
+ * A rota /financial-accounts NÃO expõe GET /:id nem DELETE — só POST, GET (lista/
9
+ * find), PATCH e as ações próprias (default/inactivate). Por isso COMPÕE o
10
+ * HttpBaseClient e re-expõe apenas Insertable/Findable/Listable/Updatable, em vez
11
+ * de estender (que traria findById/delete inexistentes → 404).
12
+ */
13
+ export declare class FinancialAccountClient implements Insertable<FinancialAccount>, Findable<FinancialAccount>, Listable<FinancialAccount>, Updatable<FinancialAccount> {
14
+ private readonly http;
15
+ insert(body: FinancialAccount, headers: Headers): Promise<ResponseDto<FinancialAccount>>;
16
+ find(filter: Partial<FinancialAccount>, headers: Headers): Promise<ResponseDto<FinancialAccount>>;
17
+ findAll(filter: FindAllRequestDto<FinancialAccount>, headers: Headers): Promise<ResponseDto<FinancialAccount[]>>;
18
+ update(id: string, body: Partial<FinancialAccount>, headers: Headers): Promise<ResponseDto<FinancialAccount>>;
8
19
  /** Define a conta como padrão do restaurante (SetDefaultAccountUseCase). Não recebe corpo. */
9
20
  defaultUpdate(id: string, headers: Headers): Promise<ResponseDto<FinancialAccountActionResult>>;
10
21
  /** Inativa a conta (InactivateAccountUseCase). replacementDefaultId é obrigatório se a conta for a padrão. */
@@ -1 +1 @@
1
- {"version":3,"file":"financial-account-client.d.ts","sourceRoot":"","sources":["../../src/clients/financial-account-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAA;AACvF,OAAO,KAAK,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,MAAM,mDAAmD,CAAA;AAExI,qBAAa,sBAAuB,SAAQ,cAAc,CAAC,gBAAgB,CAAC;;IAK1E,8FAA8F;IACxF,aAAa,CAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;IA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AAC;IAIjH,MAAM,CAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAI9G,8FAA8F;IACxF,aAAa,CAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;IAKtG,8GAA8G;IACxG,gBAAgB,CAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAiC,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;CAInJ"}
@@ -3,18 +3,36 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FinancialAccountClient = void 0;
4
4
  const core_1 = require("../core");
5
5
  const http_base_client_1 = require("../core/client/http-base-client");
6
- class FinancialAccountClient extends http_base_client_1.HttpBaseClient {
6
+ /**
7
+ * A rota /financial-accounts NÃO expõe GET /:id nem DELETE — só POST, GET (lista/
8
+ * find), PATCH e as ações próprias (default/inactivate). Por isso COMPÕE o
9
+ * HttpBaseClient e re-expõe apenas Insertable/Findable/Listable/Updatable, em vez
10
+ * de estender (que traria findById/delete inexistentes → 404).
11
+ */
12
+ class FinancialAccountClient {
7
13
  constructor() {
8
- super('financial-accounts');
14
+ this.http = new http_base_client_1.HttpBaseClient('financial-accounts');
15
+ }
16
+ insert(body, headers) {
17
+ return this.http.insert(body, headers);
18
+ }
19
+ find(filter, headers) {
20
+ return this.http.find(filter, headers);
21
+ }
22
+ findAll(filter, headers) {
23
+ return this.http.findAll(filter, headers);
24
+ }
25
+ update(id, body, headers) {
26
+ return this.http.update(id, body, headers);
9
27
  }
10
28
  /** Define a conta como padrão do restaurante (SetDefaultAccountUseCase). Não recebe corpo. */
11
29
  async defaultUpdate(id, headers) {
12
- const response = await this.connection.patch(`/${id}/default`, undefined, (0, core_1.withHeaders)(headers));
30
+ const response = await this.http.connection.patch(`/${id}/default`, undefined, (0, core_1.withHeaders)(headers));
13
31
  return response.data;
14
32
  }
15
33
  /** Inativa a conta (InactivateAccountUseCase). replacementDefaultId é obrigatório se a conta for a padrão. */
16
34
  async inactivateUpdate(id, body, headers) {
17
- const response = await this.connection.patch(`/${id}/inactivate`, body, (0, core_1.withHeaders)(headers));
35
+ const response = await this.http.connection.patch(`/${id}/inactivate`, body, (0, core_1.withHeaders)(headers));
18
36
  return response.data;
19
37
  }
20
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"financial-account-client.js","sourceRoot":"","sources":["../../src/clients/financial-account-client.ts"],"names":[],"mappings":";;;AAAA,kCAAkD;AAClD,sEAAgE;AAKhE,MAAa,sBAAuB,SAAQ,iCAAgC;IAC1E;QACE,KAAK,CAAC,oBAAoB,CAAC,CAAA;IAC7B,CAAC;IAED,8FAA8F;IAC9F,KAAK,CAAC,aAAa,CAAE,EAAU,EAAE,OAAgB;QAC/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAA4C,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAC1I,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,8GAA8G;IAC9G,KAAK,CAAC,gBAAgB,CAAE,EAAU,EAAE,IAAuC,EAAE,OAAgB;QAC3F,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAA4C,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QACxI,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AAhBD,wDAgBC"}
1
+ {"version":3,"file":"financial-account-client.js","sourceRoot":"","sources":["../../src/clients/financial-account-client.ts"],"names":[],"mappings":";;;AAAA,kCAAkD;AAClD,sEAAgE;AAO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D,wDA+BC"}
@@ -1,11 +1,21 @@
1
1
  import { ResponseDto } from '../core';
2
- import { HttpBaseClient } from '../core/client/http-base-client';
2
+ import type { Insertable, Findable, Listable, Updatable } from '../core/client/base-client';
3
+ import type { FindAllRequestDto } from '../core/data/request/pagination';
3
4
  import type { Headers } from '../core/data/request/headers';
4
5
  import type { FinancialCategory } from '../core/data/financial/financial-category-entity';
5
6
  import type { FinancialCategoryActionResult } from '../core/data/financial/financial-category-response';
6
7
  import { MovementDirection } from '../core/data/financial/financial-movement-schema';
7
- export declare class FinancialCategoryClient extends HttpBaseClient<FinancialCategory> {
8
- constructor();
8
+ /**
9
+ * A rota /financial-categories NÃO expõe GET /:id nem DELETE. COMPÕE o
10
+ * HttpBaseClient e re-expõe só Insertable/Findable/Listable/Updatable + as ações
11
+ * próprias (inactivate/reactivate/suggestions).
12
+ */
13
+ export declare class FinancialCategoryClient implements Insertable<FinancialCategory>, Findable<FinancialCategory>, Listable<FinancialCategory>, Updatable<FinancialCategory> {
14
+ private readonly http;
15
+ insert(body: FinancialCategory, headers: Headers): Promise<ResponseDto<FinancialCategory>>;
16
+ find(filter: Partial<FinancialCategory>, headers: Headers): Promise<ResponseDto<FinancialCategory>>;
17
+ findAll(filter: FindAllRequestDto<FinancialCategory>, headers: Headers): Promise<ResponseDto<FinancialCategory[]>>;
18
+ update(id: string, body: Partial<FinancialCategory>, headers: Headers): Promise<ResponseDto<FinancialCategory>>;
9
19
  /** Inativa a categoria (InactivateCategoryUseCase). Não recebe corpo. */
10
20
  inactivateUpdate(id: string, headers: Headers): Promise<ResponseDto<FinancialCategoryActionResult>>;
11
21
  /** Reativa a categoria (InactivateCategoryUseCase.reactivate). Não recebe corpo. */
@@ -1 +1 @@
1
- {"version":3,"file":"financial-category-client.d.ts","sourceRoot":"","sources":["../../src/clients/financial-category-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,cAAc,EAAE,MA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_1 = require("../core");
5
5
  const http_base_client_1 = require("../core/client/http-base-client");
6
- class FinancialCategoryClient extends http_base_client_1.HttpBaseClient {
6
+ /**
7
+ * A rota /financial-categories NÃO expõe GET /:id nem DELETE. COMPÕE o
8
+ * HttpBaseClient e re-expõe só Insertable/Findable/Listable/Updatable + as ações
9
+ * próprias (inactivate/reactivate/suggestions).
10
+ */
11
+ class FinancialCategoryClient {
7
12
  constructor() {
8
- super('financial-categories');
13
+ this.http = new http_base_client_1.HttpBaseClient('financial-categories');
14
+ }
15
+ insert(body, headers) {
16
+ return this.http.insert(body, headers);
17
+ }
18
+ find(filter, headers) {
19
+ return this.http.find(filter, headers);
20
+ }
21
+ findAll(filter, headers) {
22
+ return this.http.findAll(filter, headers);
23
+ }
24
+ update(id, body, headers) {
25
+ return this.http.update(id, body, headers);
9
26
  }
10
27
  /** Inativa a categoria (InactivateCategoryUseCase). Não recebe corpo. */
11
28
  async inactivateUpdate(id, headers) {
12
- const response = await this.connection.patch(`/${id}/inactivate`, undefined, (0, core_1.withHeaders)(headers));
29
+ const response = await this.http.connection.patch(`/${id}/inactivate`, undefined, (0, core_1.withHeaders)(headers));
13
30
  return response.data;
14
31
  }
15
32
  /** Reativa a categoria (InactivateCategoryUseCase.reactivate). Não recebe corpo. */
16
33
  async reactivateUpdate(id, headers) {
17
- const response = await this.connection.patch(`/${id}/reactivate`, undefined, (0, core_1.withHeaders)(headers));
34
+ const response = await this.http.connection.patch(`/${id}/reactivate`, undefined, (0, core_1.withHeaders)(headers));
18
35
  return response.data;
19
36
  }
20
37
  /** Sugestão de categorias por direção do movimento (SuggestCategoriesQuery). Read-only. */
21
38
  async suggestions(direction, headers) {
22
- const response = await this.connection.get('/suggestions', (0, core_1.withHeaders)(headers, { params: { direction } }));
39
+ const response = await this.http.connection.get('/suggestions', (0, core_1.withHeaders)(headers, { params: { direction } }));
23
40
  return response.data;
24
41
  }
25
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"financial-category-client.js","sourceRoot":"","sources":["../../src/clients/financial-category-client.ts"],"names":[],"mappings":";;;AAAA,kCAAkD;AAClD,sEAAgE;AAMhE,MAAa,uBAAwB,SAAQ,iCAAiC;IAC5E;QACE,KAAK,CAAC,sBAAsB,CAAC,CAAA;IAC/B,CAAC;IAED,yEAAyE;IACzE,KAAK,CAAC,gBAAgB,CAAE,EAAU,EAAE,OAAgB;QAClD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAA6C,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAC9I,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,oFAAoF;IACpF,KAAK,CAAC,gBAAgB,CAAE,EAAU,EAAE,OAAgB;QAClD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAA6C,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAC9I,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,2FAA2F;IAC3F,KAAK,CAAC,WAAW,CAAE,SAA4B,EAAE,OAAgB;QAC/D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAmC,cAAc,EAAE,IAAA,kBAAW,EAAC,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,CAAA;QAC7I,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AAtBD,0DAsBC"}
1
+ {"version":3,"file":"financial-category-client.js","sourceRoot":"","sources":["../../src/clients/financial-category-client.ts"],"names":[],"mappings":";;;AAAA,kCAAkD;AAClD,sEAAgE;AAQhE;;;;GAIG;AACH,MAAa,uBAAuB;IAApC;QAEmB,SAAI,GAAG,IAAI,iCAAc,CAAoB,sBAAsB,CAAC,CAAA;IAmCvF,CAA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,CAAmC,cAAc,EAAE,IAAA,kBAAW,EAAC,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,CAAA;QAClJ,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AArCD,0DAqCC"}
@@ -1,17 +1,17 @@
1
1
  import { ResponseDto } from '../core';
2
- import { HttpBaseClient } from '../core/client/http-base-client';
3
2
  import type { Headers } from '../core/data/request/headers';
4
3
  import type { MovementStatus } from '../core/data/financial/financial-movement-schema';
5
4
  import type { FinancialMovement } from '../core/data/financial/financial-movement-entity';
6
5
  import type { RegisterMovementRequest, UpdateMovementRequest, MovementListQuery, FinancialMovementActionResult } from '../core/data/financial/financial-movement-response';
7
6
  /**
8
7
  * Client de movimentações (MIN-49/50). Diferente dos outros CRUDs, o registro e
9
- * a edição têm corpos dedicados (accountId/categoryId, não os snapshots), e há
10
- * ações próprias (status, recompute). Por isso os métodos abaixo não reaproveitam
11
- * `insert`/`update`/`findAll` do base — usam `register`/`updateMovement`/`list`.
8
+ * a edição têm corpos DEDICADOS (accountId/categoryId, não os snapshots) e há
9
+ * ações próprias (status, recompute). Não há CRUD genérico útil aqui — por isso
10
+ * COMPÕE o HttpBaseClient só pela conexão e expõe apenas os métodos próprios
11
+ * (antes estendia e herdava insert/update/findById/delete com body/rota errados).
12
12
  */
13
- export declare class FinancialMovementClient extends HttpBaseClient<FinancialMovement> {
14
- constructor();
13
+ export declare class FinancialMovementClient {
14
+ private readonly http;
15
15
  /** Registra entrada/saída + ajusta saldo (transacional). Resolve 409 de duplicidade com confirmDuplicate. */
16
16
  register(body: RegisterMovementRequest, headers: Headers): Promise<ResponseDto<FinancialMovement>>;
17
17
  /** Lista movimentações (busca textual + filtros direction/status/período + paginação). */
@@ -1 +1 @@
1
- {"version":3,"file":"financial-movement-client.d.ts","sourceRoot":"","sources":["../../src/clients/financial-movement-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MA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EAAe,MAAM,SAAS,CAAA;AAElD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAA;AACtF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAA;AACzF,OAAO,KAAK,EACV,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,6BAA6B,EAC9B,MAAM,oDAAoD,CAAA;AAE3D;;;;;;GAMG;AACH,qBAAa,uBAAuB;IAClC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA+D;IAEpF,6GAA6G;IACvG,QAAQ,CAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAKzG,0FAA0F;IACpF,IAAI,CAAE,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAKlG,mGAAmG;IAC7F,cAAc,CAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAKzH,oEAAoE;IAC9D,YAAY,CAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAKlH,kEAAkE;IAC5D,iBAAiB,CAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,6BAA6B,CAAC,CAAC;CAInH"}
@@ -5,37 +5,38 @@ const core_1 = require("../core");
5
5
  const http_base_client_1 = require("../core/client/http-base-client");
6
6
  /**
7
7
  * Client de movimentações (MIN-49/50). Diferente dos outros CRUDs, o registro e
8
- * a edição têm corpos dedicados (accountId/categoryId, não os snapshots), e há
9
- * ações próprias (status, recompute). Por isso os métodos abaixo não reaproveitam
10
- * `insert`/`update`/`findAll` do base — usam `register`/`updateMovement`/`list`.
8
+ * a edição têm corpos DEDICADOS (accountId/categoryId, não os snapshots) e há
9
+ * ações próprias (status, recompute). Não há CRUD genérico útil aqui — por isso
10
+ * COMPÕE o HttpBaseClient só pela conexão e expõe apenas os métodos próprios
11
+ * (antes estendia e herdava insert/update/findById/delete com body/rota errados).
11
12
  */
12
- class FinancialMovementClient extends http_base_client_1.HttpBaseClient {
13
+ class FinancialMovementClient {
13
14
  constructor() {
14
- super('financial-movements');
15
+ this.http = new http_base_client_1.HttpBaseClient('financial-movements');
15
16
  }
16
17
  /** Registra entrada/saída + ajusta saldo (transacional). Resolve 409 de duplicidade com confirmDuplicate. */
17
18
  async register(body, headers) {
18
- const response = await this.connection.post('/', body, (0, core_1.withHeaders)(headers));
19
+ const response = await this.http.connection.post('/', body, (0, core_1.withHeaders)(headers));
19
20
  return response.data;
20
21
  }
21
22
  /** Lista movimentações (busca textual + filtros direction/status/período + paginação). */
22
23
  async list(query, headers) {
23
- const response = await this.connection.get('/', (0, core_1.withHeaders)(headers, { params: query }));
24
+ const response = await this.http.connection.get('/', (0, core_1.withHeaders)(headers, { params: query }));
24
25
  return response.data;
25
26
  }
26
27
  /** Edita a movimentação (reverte efeito antigo + aplica novo no saldo). `direction` é imutável. */
27
28
  async updateMovement(id, body, headers) {
28
- const response = await this.connection.patch(`/${id}`, body, (0, core_1.withHeaders)(headers));
29
+ const response = await this.http.connection.patch(`/${id}`, body, (0, core_1.withHeaders)(headers));
29
30
  return response.data;
30
31
  }
31
32
  /** Muda o status (pending/settled/cancelled) corrigindo o saldo. */
32
33
  async changeStatus(id, status, headers) {
33
- const response = await this.connection.patch(`/${id}/status`, { status }, (0, core_1.withHeaders)(headers));
34
+ const response = await this.http.connection.patch(`/${id}/status`, { status }, (0, core_1.withHeaders)(headers));
34
35
  return response.data;
35
36
  }
36
37
  /** Reconcilia o saldo de uma conta a partir das movimentações. */
37
38
  async recomputeBalances(accountId, headers) {
38
- const response = await this.connection.post('/recompute-balances', { accountId }, (0, core_1.withHeaders)(headers));
39
+ const response = await this.http.connection.post('/recompute-balances', { accountId }, (0, core_1.withHeaders)(headers));
39
40
  return response.data;
40
41
  }
41
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"financial-movement-client.js","sourceRoot":"","sources":["../../src/clients/financial-movement-client.ts"],"names":[],"mappings":";;;AAAA,kCAAkD;AAClD,sEAAgE;AAWhE;;;;;GAKG;AACH,MAAa,uBAAwB,SAAQ,iCAAiC;IAC5E;QACE,KAAK,CAAC,qBAAqB,CAAC,CAAA;IAC9B,CAAC;IAED,6GAA6G;IAC7G,KAAK,CAAC,QAAQ,CAAE,IAA6B,EAAE,OAAgB;QAC7D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAiC,GAAG,EAAE,IAAI,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAC5G,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,0FAA0F;IAC1F,KAAK,CAAC,IAAI,CAAE,KAAwB,EAAE,OAAgB;QACpD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAmC,GAAG,EAAE,IAAA,kBAAW,EAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;QAC1H,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,mGAAmG;IACnG,KAAK,CAAC,cAAc,CAAE,EAAU,EAAE,IAA2B,EAAE,OAAgB;QAC7E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAAiC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAClH,OAAO,QAAQ,CAA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,GAAG,CAAmC,GAAG,EAAE,IAAA,kBAAW,EAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;QAC/H,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,mGAAmG;IACnG,KAAK,CAAC,cAAc,CAAE,EAAU,EAAE,IAA2B,EAAE,OAAgB;QAC7E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAiC,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QACvH,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,oEAAoE;IACpE,KAAK,CAAC,YAAY,CAAE,EAAU,EAAE,MAAsB,EAAE,OAAgB;QACtE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAiC,IAAI,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QACpI,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,kEAAkE;IAClE,KAAK,CAAC,iBAAiB,CAAE,SAAiB,EAAE,OAAgB;QAC1D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAA6C,qBAAqB,EAAE,EAAE,SAAS,EAAE,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QACxJ,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AAhCD,0DAgCC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Erro normalizado da API: expõe `code` (glossário: APP-000x/AUTH-000x/
3
+ * VALIDATION_ERROR) e `status` HTTP, em vez do `AxiosError` cru (que vaza
4
+ * config/request/stack do axios). Ver create-connection (M25).
5
+ */
6
+ export declare class ApiError extends Error {
7
+ readonly code: string;
8
+ readonly status: number;
9
+ constructor(code: string, message: string, status: number);
10
+ }
11
+ //# sourceMappingURL=api-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-error.d.ts","sourceRoot":"","sources":["../../../src/core/client/api-error.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,KAAK;IAE/B,QAAQ,CAAC,IAAI,EAAE,MAAM;IAErB,QAAQ,CAAC,MAAM,EAAE,MAAM;gBAFd,IAAI,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACN,MAAM,EAAE,MAAM;CAK1B"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiError = void 0;
4
+ /**
5
+ * Erro normalizado da API: expõe `code` (glossário: APP-000x/AUTH-000x/
6
+ * VALIDATION_ERROR) e `status` HTTP, em vez do `AxiosError` cru (que vaza
7
+ * config/request/stack do axios). Ver create-connection (M25).
8
+ */
9
+ class ApiError extends Error {
10
+ constructor(code, message, status) {
11
+ super(message);
12
+ this.code = code;
13
+ this.status = status;
14
+ this.name = 'ApiError';
15
+ }
16
+ }
17
+ exports.ApiError = ApiError;
18
+ //# sourceMappingURL=api-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-error.js","sourceRoot":"","sources":["../../../src/core/client/api-error.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,MAAa,QAAS,SAAQ,KAAK;IACjC,YACW,IAAY,EACrB,OAAe,EACN,MAAc;QAEvB,KAAK,CAAC,OAAO,CAAC,CAAA;QAJL,SAAI,GAAJ,IAAI,CAAQ;QAEZ,WAAM,GAAN,MAAM,CAAQ;QAGvB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAA;IACxB,CAAC;CACF;AATD,4BASC"}
@@ -1,12 +1,30 @@
1
1
  import { FindAllRequestDto } from '../data/request/pagination';
2
2
  import { ResponseDto } from '../data/request/response';
3
3
  import { Headers } from '../data/request/headers';
4
- export interface BaseClient<T> {
4
+ /**
5
+ * Interfaces de capacidade (segregação): cada client declara SÓ as operações que
6
+ * a rota da API realmente expõe. Antes um único BaseClient com todo o CRUD era
7
+ * herdado por todos, expondo findById/delete inexistentes (404 em runtime).
8
+ */
9
+ export interface Insertable<T> {
5
10
  insert(body: T, headers: Headers): Promise<ResponseDto<T>>;
11
+ }
12
+ export interface Gettable<T> {
6
13
  findById(id: string, headers: Headers): Promise<ResponseDto<T>>;
14
+ }
15
+ export interface Findable<T> {
7
16
  find(filter: Partial<T>, headers: Headers): Promise<ResponseDto<T>>;
17
+ }
18
+ export interface Listable<T> {
8
19
  findAll(filter: FindAllRequestDto<T>, headers: Headers): Promise<ResponseDto<T[]>>;
20
+ }
21
+ export interface Updatable<T> {
9
22
  update(id: string, body: Partial<T>, headers: Headers): Promise<ResponseDto<T>>;
23
+ }
24
+ export interface Deletable {
10
25
  delete(id: string, headers: Headers): Promise<void>;
11
26
  }
27
+ /** CRUD completo — só para recursos cuja rota expõe tudo (ex.: /people). */
28
+ export interface BaseClient<T> extends Insertable<T>, Gettable<T>, Findable<T>, Listable<T>, Updatable<T>, Deletable {
29
+ }
12
30
  //# sourceMappingURL=base-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-client.d.ts","sourceRoot":"","sources":["../../../src/core/client/base-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;IAC1D,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO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AC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE;AACpG,MAAM,WAAW,QAAQ,CAAC,CAAC;IAAI,OAAO,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;CAAE;AACnH,MAAM,WAAW,SAAS,CAAC,CAAC;IAAI,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE;AACjH,MAAM,WAAW,SAAS;IAAG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE;AAElF,4EAA4E;AAC5E,MAAM,WAAW,UAAU,CAAC,CAAC,CAC3B,SAAQ,UAAU,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS;CAAG"}
@@ -0,0 +1,13 @@
1
+ import { AxiosInstance } from 'axios';
2
+ /**
3
+ * Fábrica única das conexões axios dos clients (fonte compartilhada — antes o
4
+ * bootstrap era duplicado no HttpBaseClient e no AuthClient). Aplica:
5
+ * - M23: valida BACK_END_URL (senão a baseURL viraria "undefined/...");
6
+ * - M22: timeout (evita request pendurada indefinidamente);
7
+ * - M25: interceptor de resposta que troca o AxiosError cru pelo erro da API
8
+ * ({ code, message }) quando disponível.
9
+ *
10
+ * @param path segmento após a base (ex.: 'auth', 'financial-accounts').
11
+ */
12
+ export declare function createHttpConnection(path: string): AxiosInstance;
13
+ //# sourceMappingURL=create-connection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-connection.d.ts","sourceRoot":"","sources":["../../../src/core/client/create-connection.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAK5C;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAE,IAAI,EAAE,MAAM,GAAG,aAAa,CAwBjE"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createHttpConnection = createHttpConnection;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ const api_error_1 = require("./api-error");
9
+ const DEFAULT_TIMEOUT_MS = 15000;
10
+ /**
11
+ * Fábrica única das conexões axios dos clients (fonte compartilhada — antes o
12
+ * bootstrap era duplicado no HttpBaseClient e no AuthClient). Aplica:
13
+ * - M23: valida BACK_END_URL (senão a baseURL viraria "undefined/...");
14
+ * - M22: timeout (evita request pendurada indefinidamente);
15
+ * - M25: interceptor de resposta que troca o AxiosError cru pelo erro da API
16
+ * ({ code, message }) quando disponível.
17
+ *
18
+ * @param path segmento após a base (ex.: 'auth', 'financial-accounts').
19
+ */
20
+ function createHttpConnection(path) {
21
+ const backendUrl = process.env.BACK_END_URL;
22
+ if (!backendUrl) {
23
+ throw new Error('BACK_END_URL não configurada: defina a URL base da API antes de instanciar os clients.');
24
+ }
25
+ const connection = axios_1.default.create({
26
+ baseURL: `${backendUrl}/${path}`,
27
+ timeout: Number(process.env.HTTP_TIMEOUT_MS ?? DEFAULT_TIMEOUT_MS),
28
+ headers: { 'Content-Type': 'application/json' },
29
+ });
30
+ connection.interceptors.response.use((response) => response, (error) => {
31
+ const data = error?.response?.data;
32
+ if (data && typeof data === 'object' && 'code' in data) {
33
+ return Promise.reject(new api_error_1.ApiError(String(data.code), String(data.message ?? ''), error.response.status));
34
+ }
35
+ return Promise.reject(error);
36
+ });
37
+ return connection;
38
+ }
39
+ //# sourceMappingURL=create-connection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-connection.js","sourceRoot":"","sources":["../../../src/core/client/create-connection.ts"],"names":[],"mappings":";;;;;AAeA,oDAwBC;AAvCD,kDAA4C;AAC5C,2CAAsC;AAEtC,MAAM,kBAAkB,GAAG,KAAM,CAAA;AAEjC;;;;;;;;;GASG;AACH,SAAgB,oBAAoB,CAAE,IAAY;IAChD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAA;IAC3C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,wFAAwF,CAAC,CAAA;IAC3G,CAAC;IAED,MAAM,UAAU,GAAG,eAAK,CAAC,MAAM,CAAC;QAC9B,OAAO,EAAE,GAAG,UAAU,IAAI,IAAI,EAAE;QAChC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,kBAAkB,CAAC;QAClE,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;KAChD,CAAC,CAAA;IAEF,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAClC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EACtB,CAAC,KAAK,EAAE,EAAE;QACR,MAAM,IAAI,GAAG,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAA;QAClC,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACvD,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,oBAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAA;QAC3G,CAAC;QACD,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IAC9B,CAAC,CACF,CAAA;IAED,OAAO,UAAU,CAAA;AACnB,CAAC"}
@@ -3,9 +3,17 @@ import { BaseClient } from './base-client';
3
3
  import { PaginationDto } from '../data/request/pagination';
4
4
  import { ResponseDto } from '../data/request/response';
5
5
  import { Headers } from '../data/request/headers';
6
+ /**
7
+ * Caixa de ferramentas HTTP com todas as operações CRUD. Uso:
8
+ * - recurso com CRUD COMPLETO (ex.: /people) → ESTENDE (herda tudo, é o contrato);
9
+ * - recurso com CRUD PARCIAL (account/category/movement) → COMPÕE (`new
10
+ * HttpBaseClient(...)`) e re-expõe só o subconjunto válido — senão herdaria
11
+ * findById/delete inexistentes (404 em runtime).
12
+ * `connection` é público p/ os endpoints próprios dos clients compostos.
13
+ */
6
14
  export declare class HttpBaseClient<T> implements BaseClient<T> {
7
15
  readonly baseUrl: string;
8
- protected connection: AxiosInstance;
16
+ readonly connection: AxiosInstance;
9
17
  constructor(baseUrl: string);
10
18
  insert(body: T, headers: Headers): Promise<ResponseDto<T>>;
11
19
  findById(id: string, headers: Headers): Promise<ResponseDto<T>>;
@@ -1 +1 @@
1
- {"version":3,"file":"http-base-client.d.ts","sourceRoot":"","sources":["../../../src/core/client/http-base-client.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,qBAAa,cAAc,CAAC,CAAC,CAAE,YAAW,UAAU,CAAC,CAAC,CAAC;IAGxC,QAAQ,CAAC,OAAO,EAAE,MAAM;IAFrC,SAAS,CAAC,UAAU,EAAE,aAAa,CAAA;gBAEb,OAAO,EAAE,MAAM;IAS/B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Aa,CAAA;gBAEZ,OAAO,EAAE,MAAM;IAI/B,MAAM,CAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAK3D,QAAQ,CAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAKhE,IAAI,CAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAKpE,OAAO,CAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IAKzF,MAAM,CAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAKhF,MAAM,CAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3D"}
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.HttpBaseClient = void 0;
7
- const axios_1 = __importDefault(require("axios"));
4
+ const create_connection_1 = require("./create-connection");
8
5
  const request_config_1 = require("./request-config");
6
+ /**
7
+ * Caixa de ferramentas HTTP com todas as operações CRUD. Uso:
8
+ * - recurso com CRUD COMPLETO (ex.: /people) → ESTENDE (herda tudo, é o contrato);
9
+ * - recurso com CRUD PARCIAL (account/category/movement) → COMPÕE (`new
10
+ * HttpBaseClient(...)`) e re-expõe só o subconjunto válido — senão herdaria
11
+ * findById/delete inexistentes (404 em runtime).
12
+ * `connection` é público p/ os endpoints próprios dos clients compostos.
13
+ */
9
14
  class HttpBaseClient {
10
15
  constructor(baseUrl) {
11
16
  this.baseUrl = baseUrl;
12
- this.connection = axios_1.default.create({
13
- baseURL: process.env.BACK_END_URL + '/' + baseUrl,
14
- headers: {
15
- 'Content-Type': 'application/json',
16
- },
17
- });
17
+ this.connection = (0, create_connection_1.createHttpConnection)(baseUrl);
18
18
  }
19
19
  async insert(body, headers) {
20
20
  const response = await this.connection.post('/', body, (0, request_config_1.withHeaders)(headers));
@@ -1 +1 @@
1
- {"version":3,"file":"http-base-client.js","sourceRoot":"","sources":["../../../src/core/client/http-base-client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA4C;AAE5C,qDAA8C;AAK9C,MAAa,cAAc;IAGzB,YAAsB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;QACnC,IAAI,CAAC,UAAU,GAAG,eAAK,CAAC,MAAM,CAAC;YAC7B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,GAAG,GAAG,GAAG,OAAO;YACjD,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAE,IAAO,EAAE,OAAgB;QACrC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAiB,GAAG,EAAE,IAAI,EAAE,IAAA,4BAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAC5F,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,QAAQ,CAAE,EAAU,EAAE,OAAgB;QAC1C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAiB,IAAI,EAAE,EAAE,EAAE,IAAA,4BAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAC1F,OAAO,QAAQ,CAAC,IAAI,CAAA;IACt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AAE,EAAU,EAAE,IAAgB,EAAE,OAAgB;QAC1D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,KAAK,CAAiB,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,IAAA,4BAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAClG,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,MAAM,CAAE,EAAU,EAAE,OAAgB;QACxC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,EAAE,IAAA,4BAAW,EAAC,OAAO,CAAC,CAAC,CAAA;IAC9D,CAAC;CACF;AAnCD,wCAmCC"}
@@ -697,35 +697,6 @@ export declare const financialAccountInsertSchema: import("@ascendance-hub/sapph
697
697
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
698
698
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
699
699
  restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
700
- isDefault: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
701
- availableBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
702
- predictedBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
703
- history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
704
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
705
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
706
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
707
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
708
- }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
709
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
710
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
711
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
712
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
713
- }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
714
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
715
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
716
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
717
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
718
- }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
719
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
720
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
721
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
722
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
723
- }>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
724
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
725
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
726
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
727
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
728
- }>[] | undefined>;
729
700
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
730
701
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
731
702
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -750,35 +721,6 @@ export declare const financialAccountInsertSchema: import("@ascendance-hub/sapph
750
721
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
751
722
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
752
723
  restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
753
- isDefault: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
754
- availableBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
755
- predictedBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
756
- history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
757
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
758
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
759
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
760
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
761
- }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
762
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
763
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
764
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
765
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
766
- }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
767
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
768
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
769
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
770
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
771
- }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
772
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
773
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
774
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
775
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
776
- }>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
777
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
778
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
779
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
780
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
781
- }>[] | undefined>;
782
724
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
783
725
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
784
726
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -803,35 +745,6 @@ export declare const financialAccountInsertSchema: import("@ascendance-hub/sapph
803
745
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
804
746
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
805
747
  restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
806
- isDefault: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
807
- availableBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
808
- predictedBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
809
- history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
810
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
811
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
812
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
813
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
814
- }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
815
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
816
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
817
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
818
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
819
- }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
820
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
821
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
822
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
823
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
824
- }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
825
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
826
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
827
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
828
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
829
- }>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
830
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
831
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
832
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
833
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
834
- }>[] | undefined>;
835
748
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
836
749
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
837
750
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -856,35 +769,6 @@ export declare const financialAccountInsertSchema: import("@ascendance-hub/sapph
856
769
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
857
770
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
858
771
  restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
859
- isDefault: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
860
- availableBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
861
- predictedBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
862
- history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
863
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
864
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
865
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
866
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
867
- }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
868
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
869
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
870
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
871
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
872
- }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
873
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
874
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
875
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
876
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
877
- }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
878
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
879
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
880
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
881
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
882
- }>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
883
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
884
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
885
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
886
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
887
- }>[] | undefined>;
888
772
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
889
773
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
890
774
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -907,35 +791,6 @@ export declare const financialAccountInsertSchema: import("@ascendance-hub/sapph
907
791
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
908
792
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
909
793
  restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
910
- isDefault: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
911
- availableBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
912
- predictedBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
913
- history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
914
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
915
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
916
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
917
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
918
- }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
919
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
920
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
921
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
922
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
923
- }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
924
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
925
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
926
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
927
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
928
- }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
929
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
930
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
931
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
932
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
933
- }>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
934
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
935
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
936
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
937
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
938
- }>[] | undefined>;
939
794
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
940
795
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
941
796
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -958,35 +813,6 @@ export declare const financialAccountInsertSchema: import("@ascendance-hub/sapph
958
813
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
959
814
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
960
815
  restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
961
- isDefault: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
962
- availableBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
963
- predictedBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
964
- history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
965
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
966
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
967
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
968
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
969
- }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
970
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
971
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
972
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
973
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
974
- }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
975
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
976
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
977
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
978
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
979
- }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
980
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
981
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
982
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
983
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
984
- }>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
985
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
986
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
987
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
988
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
989
- }>[] | undefined>;
990
816
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
991
817
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
992
818
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -1009,35 +835,6 @@ export declare const financialAccountInsertSchema: import("@ascendance-hub/sapph
1009
835
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1010
836
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
1011
837
  restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1012
- isDefault: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
1013
- availableBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
1014
- predictedBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
1015
- history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
1016
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1017
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1018
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1019
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1020
- }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
1021
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1022
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1023
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1024
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1025
- }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
1026
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1027
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1028
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1029
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1030
- }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
1031
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1032
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1033
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1034
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1035
- }>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
1036
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1037
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1038
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1039
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1040
- }>[] | undefined>;
1041
838
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
1042
839
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1043
840
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -1062,35 +859,6 @@ export declare const financialAccountInsertSchema: import("@ascendance-hub/sapph
1062
859
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1063
860
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
1064
861
  restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1065
- isDefault: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
1066
- availableBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
1067
- predictedBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
1068
- history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
1069
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1070
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1071
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1072
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1073
- }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
1074
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1075
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1076
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1077
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1078
- }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
1079
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1080
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1081
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1082
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1083
- }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
1084
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1085
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1086
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1087
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1088
- }>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
1089
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1090
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1091
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1092
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1093
- }>[] | undefined>;
1094
862
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
1095
863
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1096
864
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -1113,35 +881,6 @@ export declare const financialAccountInsertSchema: import("@ascendance-hub/sapph
1113
881
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1114
882
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
1115
883
  restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1116
- isDefault: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
1117
- availableBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
1118
- predictedBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
1119
- history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
1120
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1121
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1122
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1123
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1124
- }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
1125
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1126
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1127
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1128
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1129
- }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
1130
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1131
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1132
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1133
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1134
- }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
1135
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1136
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1137
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1138
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1139
- }>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
1140
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1141
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1142
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1143
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1144
- }>[] | undefined>;
1145
884
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
1146
885
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1147
886
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -1166,35 +905,6 @@ export declare const financialAccountInsertSchema: import("@ascendance-hub/sapph
1166
905
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1167
906
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
1168
907
  restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1169
- isDefault: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
1170
- availableBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
1171
- predictedBalance: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
1172
- history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
1173
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1174
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1175
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1176
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1177
- }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
1178
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1179
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1180
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1181
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1182
- }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
1183
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1184
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1185
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1186
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1187
- }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
1188
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1189
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1190
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1191
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1192
- }>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
1193
- at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1194
- by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1195
- action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
1196
- detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
1197
- }>[] | undefined>;
1198
908
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
1199
909
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
1200
910
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -1 +1 @@
1
- {"version":3,"file":"financial-account-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAK/C,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,aAAa,kBAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGjC,CAAA;AAaF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;GAM7B,CAAA;AA+BZ,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGvC,CAAA"}
@@ -32,7 +32,7 @@ exports.baseAccountSchema = s.object({
32
32
  // O .extend() sobrescreve a base adicionando essas regras estritas
33
33
  const platformAccountSchema = exports.baseAccountSchema.extend({
34
34
  type: s.type().literal(FinancialAccountType.Platform), // Força a ser 'platform'
35
- feePercent: s.number().int().min(0), // Obrigatório
35
+ feePercent: s.number().min(0).max(100), // Obrigatório — taxa fracionária (ex.: 12.5%), 0..100
36
36
  settlementDays: s.number().int().min(0), // Obrigatório
37
37
  });
38
38
  // 3. AS OUTRAS CONTAS (Proíbem as taxas)
@@ -66,35 +66,26 @@ exports.financialAccountUpdateSchema = s.object({
66
66
  name: s.string(),
67
67
  status: s.type().enum(status_1.RecordStatus),
68
68
  type: s.type().enum(FinancialAccountType),
69
- feePercent: s.number().int().min(0),
69
+ feePercent: s.number().min(0).max(100),
70
70
  settlementDays: s.number().int().min(0),
71
71
  }).partial();
72
72
  // 6. SCHEMA DE INSERT (POST /financial-accounts)
73
73
  // Como o de criação, é uma UNIÃO discriminada por `type` (platform exige
74
- // fee/prazo; os outros proíbem). A diferença pro schema completo: os campos que
75
- // o servidor computa/força ficam OPCIONAIS — audit é preenchido no servidor,
76
- // restaurantId vem do RequestContext, isDefault é sempre false no insert (a
77
- // promoção a padrão é via SetDefault), e os saldos default pra 0. Assim o client
78
- // não precisa mandar esses campos (resolve o VALIDATION_ERROR do audit), mantendo
79
- // compat com quem ainda os envia.
74
+ // fee/prazo; os outros proíbem). Os campos que o servidor COMPUTA/FORÇA ficam
75
+ // FORA do schema (objeto estrito → enviá-los é rejeitado): isDefault (sempre
76
+ // false no insert; padrão é via SetDefault), availableBalance/predictedBalance
77
+ // (sempre 0; saldo só vem de movimentação) e history — assim o client não pode
78
+ // injetá-los (A3). audit e restaurantId seguem opcionais: são preenchidos pelo
79
+ // servidor (audit resolve o VALIDATION_ERROR; restaurantId vem do RequestContext).
80
80
  const baseAccountInsertSchema = s.object({
81
81
  name: s.string(),
82
82
  status: s.type().enum(status_1.RecordStatus),
83
83
  restaurantId: s.string().optional(),
84
- isDefault: s.boolean().optional(),
85
- availableBalance: s.number().optional(),
86
- predictedBalance: s.number().optional(),
87
- history: s.array(s.object({
88
- at: s.date().coerce(),
89
- by: s.string(),
90
- action: s.string(),
91
- detail: s.string().optional(),
92
- })).optional(),
93
84
  audit: audit_1.auditSchema.optional(),
94
85
  });
95
86
  const platformAccountInsertSchema = baseAccountInsertSchema.extend({
96
87
  type: s.type().literal(FinancialAccountType.Platform),
97
- feePercent: s.number().int().min(0),
88
+ feePercent: s.number().min(0).max(100),
98
89
  settlementDays: s.number().int().min(0),
99
90
  });
100
91
  const standardAccountInsertSchema = baseAccountInsertSchema.extend({
@@ -1 +1 @@
1
- {"version":3,"file":"financial-account-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,6CAA+C;A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AAM,2BAA2B,GAAG,uBAAuB,CAAC,MAAM,CAAC;IACjE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC;QAClB,oBAAoB,CAAC,IAAI;QACzB,oBAAoB,CAAC,IAAI;QACzB,oBAAoB,CAAC,aAAa;KACnC,CAAC;CACH,CAAC,CAAA;AAEW,QAAA,4BAA4B,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;IACzD,2BAA2B;IAC3B,2BAA2B;CAC5B,CAAC,CAAA"}
1
+ {"version":3,"file":"financial-account-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,6CAA+C;AAC/C,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,uDAA+B,CAAA;IAC/B,6CAAqB,CAAA;AACvB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAEY,QAAA,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;IACnC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACvC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;QACrB,EAAE,EAAE,CAA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F,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,MAAM,CAAC;IACjE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC;QAClB,oBAAoB,CAAC,IAAI;QACzB,oBAAoB,CAAC,IAAI;QACzB,oBAAoB,CAAC,aAAa;KACnC,CAAC;CACH,CAAC,CAAA;AAEW,QAAA,4BAA4B,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;IACzD,2BAA2B;IAC3B,2BAA2B;CAC5B,CAAC,CAAA"}
@@ -76,9 +76,9 @@ const baseMovementSchema = s.object({
76
76
  netValue: s.number().min(0),
77
77
  // Snapshot da conta `platform` no momento do registro (mudança futura na
78
78
  // conta não altera o histórico). Ausentes em contas sem prazo/taxa.
79
- feePercentApplied: s.number().int().min(0).optional(),
79
+ feePercentApplied: s.number().min(0).max(100).optional(),
80
80
  settlementDaysApplied: s.number().int().min(0).optional(),
81
- predictedReceiptDate: s.date().optional(),
81
+ predictedReceiptDate: s.date().coerce().optional(), // coerce: consistente com `date`
82
82
  account: accountRefSchema,
83
83
  paymentMethod: s.type().enum(PaymentMethod),
84
84
  counterparty: s.object({
@@ -90,7 +90,7 @@ const baseMovementSchema = s.object({
90
90
  description: s.string().max(500).optional(),
91
91
  origin: s.type().enum(MovementOrigin),
92
92
  history: s.array(s.object({
93
- at: s.date(), // Date real (preenchido pelo sistema), não string ISO
93
+ at: s.date().coerce(), // coerce: consistente com `date` — aceita Date (servidor) ou ISO
94
94
  by: s.string(),
95
95
  action: s.string(),
96
96
  detail: s.string().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"financial-movement-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,2CAA6C;AAC7C,yEAAiE;AACjE,2EAA0D;AAE1D,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB;;;;;;;;;GASG;AAEH,IAAY,iBAGX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,OAAO,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAA;AAEF;;;GAGG;AACU,QAAA,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;IAC1B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,yBAAyB;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;CACjC,CAAC,CAAC,OAAO,EAAE,CAAA;AAEZ,sDAAsD;AACzC,QAAA,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;CACtC,CAAC,CAAA;AAEF,6DAA6D;AAChD,QAAA,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA"}
1
+ {"version":3,"file":"financial-movement-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,2CAA6C;AAC7C,yEAAiE;AACjE,2EAA0D;AAE1D,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB;;;;;;;;;GASG;AAEH,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c,CAAC,CAAC,QAAQ,EAAE;IAChD,uEAAuE;IACvE,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAA;AAEF;;;GAGG;AACU,QAAA,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;IAC1B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,yBAAyB;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;CACjC,CAAC,CAAC,OAAO,EAAE,CAAA;AAEZ,sDAAsD;AACzC,QAAA,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;CACtC,CAAC,CAAA;AAEF,6DAA6D;AAChD,QAAA,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA"}
@@ -2,14 +2,14 @@
2
2
  * Headers de contexto enviados em toda requisição à API.
3
3
  *
4
4
  * - `env` é **obrigatório**: seleciona o banco do tenant (multi-tenant por env).
5
- * - `authorization` (Bearer token) e `restaurantId` aparecem nas rotas
6
- * protegidas — opcionais porque rotas públicas (ex.: login) não os têm.
7
- * - O index signature mantém o type aberto para headers adicionais.
5
+ * - `authorization` (Bearer token) aparece nas rotas protegidas — opcional
6
+ * porque rotas públicas (ex.: login) não o têm.
7
+ * - `restaurantId` NÃO é modelado: a API o deriva do JWT e ignora o header (era
8
+ * campo morto). O index signature ainda aceita headers adicionais se preciso.
8
9
  */
9
10
  export type Headers = {
10
11
  env: string;
11
12
  authorization?: string;
12
- restaurantId?: string;
13
13
  [key: string]: string | undefined;
14
14
  };
15
15
  //# sourceMappingURL=headers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../../src/core/data/request/headers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAClC,CAAA"}
1
+ {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../../src/core/data/request/headers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAClC,CAAA"}
@@ -1,4 +1,8 @@
1
1
  export * from './data';
2
2
  export { MasterClient } from './client/master-client';
3
3
  export { withHeaders } from './client/request-config';
4
+ export { ApiError } from './client/api-error';
5
+ export { HttpBaseClient } from './client/http-base-client';
6
+ export { createHttpConnection } from './client/create-connection';
7
+ export type { BaseClient, Insertable, Gettable, Findable, Listable, Updatable, Deletable, } from './client/base-client';
4
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACjE,YAAY,EACV,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,GAC3E,MAAM,sBAAsB,CAAA"}
@@ -14,10 +14,16 @@ 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
- exports.withHeaders = exports.MasterClient = void 0;
17
+ exports.createHttpConnection = exports.HttpBaseClient = exports.ApiError = exports.withHeaders = exports.MasterClient = void 0;
18
18
  __exportStar(require("./data"), exports);
19
19
  var master_client_1 = require("./client/master-client");
20
20
  Object.defineProperty(exports, "MasterClient", { enumerable: true, get: function () { return master_client_1.MasterClient; } });
21
21
  var request_config_1 = require("./client/request-config");
22
22
  Object.defineProperty(exports, "withHeaders", { enumerable: true, get: function () { return request_config_1.withHeaders; } });
23
+ var api_error_1 = require("./client/api-error");
24
+ Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return api_error_1.ApiError; } });
25
+ var http_base_client_1 = require("./client/http-base-client");
26
+ Object.defineProperty(exports, "HttpBaseClient", { enumerable: true, get: function () { return http_base_client_1.HttpBaseClient; } });
27
+ var create_connection_1 = require("./client/create-connection");
28
+ Object.defineProperty(exports, "createHttpConnection", { enumerable: true, get: function () { return create_connection_1.createHttpConnection; } });
23
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,wDAAqD;AAA5C,6GAAA,YAAY,OAAA;AACrB,0DAAqD;AAA5C,6GAAA,WAAW,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,wDAAqD;AAA5C,6GAAA,YAAY,OAAA;AACrB,0DAAqD;AAA5C,6GAAA,WAAW,OAAA;AACpB,gDAA6C;AAApC,qGAAA,QAAQ,OAAA;AACjB,8DAA0D;AAAjD,kHAAA,cAAc,OAAA;AACvB,gEAAiE;AAAxD,yHAAA,oBAAoB,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mintly-lib",
3
- "version": "2.7.0-preview",
3
+ "version": "2.7.1-preview",
4
4
  "description": "Mintly Library",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",