mintly-lib 1.1.0 → 2.0.0-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 (141) hide show
  1. package/build/clients/auth-client.d.ts +25 -0
  2. package/build/clients/auth-client.d.ts.map +1 -0
  3. package/build/clients/auth-client.js +52 -0
  4. package/build/clients/auth-client.js.map +1 -0
  5. package/build/clients/financial-account-client.d.ts +6 -0
  6. package/build/clients/financial-account-client.d.ts.map +1 -0
  7. package/build/clients/financial-account-client.js +11 -0
  8. package/build/clients/financial-account-client.js.map +1 -0
  9. package/build/clients/financial-category-client.d.ts +6 -0
  10. package/build/clients/financial-category-client.d.ts.map +1 -0
  11. package/build/clients/financial-category-client.js +11 -0
  12. package/build/clients/financial-category-client.js.map +1 -0
  13. package/build/clients/index.d.ts +4 -0
  14. package/build/clients/index.d.ts.map +1 -1
  15. package/build/clients/index.js +9 -1
  16. package/build/clients/index.js.map +1 -1
  17. package/build/clients/person-client.d.ts +2 -5
  18. package/build/clients/person-client.d.ts.map +1 -1
  19. package/build/clients/person-client.js +1 -1
  20. package/build/clients/person-client.js.map +1 -1
  21. package/build/clients/restaurant-client.d.ts +6 -0
  22. package/build/clients/restaurant-client.d.ts.map +1 -0
  23. package/build/clients/restaurant-client.js +11 -0
  24. package/build/clients/restaurant-client.js.map +1 -0
  25. package/build/core/client/base-client.d.ts +7 -6
  26. package/build/core/client/base-client.d.ts.map +1 -1
  27. package/build/core/client/http-base-client.d.ts +7 -6
  28. package/build/core/client/http-base-client.d.ts.map +1 -1
  29. package/build/core/client/http-base-client.js +13 -12
  30. package/build/core/client/http-base-client.js.map +1 -1
  31. package/build/core/client/master-client.d.ts +5 -1
  32. package/build/core/client/master-client.d.ts.map +1 -1
  33. package/build/core/client/master-client.js +4 -0
  34. package/build/core/client/master-client.js.map +1 -1
  35. package/build/core/client/request-config.d.ts +9 -0
  36. package/build/core/client/request-config.d.ts.map +1 -0
  37. package/build/core/client/request-config.js +12 -0
  38. package/build/core/client/request-config.js.map +1 -0
  39. package/build/core/data/auth/auth-response.d.ts +21 -0
  40. package/build/core/data/auth/auth-response.d.ts.map +1 -0
  41. package/build/core/data/auth/auth-response.js +3 -0
  42. package/build/core/data/auth/auth-response.js.map +1 -0
  43. package/build/core/data/auth/index.d.ts +8 -0
  44. package/build/core/data/auth/index.d.ts.map +1 -0
  45. package/build/core/data/auth/index.js +10 -0
  46. package/build/core/data/auth/index.js.map +1 -0
  47. package/build/core/data/auth/login-schema.d.ts +17 -0
  48. package/build/core/data/auth/login-schema.d.ts.map +1 -0
  49. package/build/core/data/auth/login-schema.js +14 -0
  50. package/build/core/data/auth/login-schema.js.map +1 -0
  51. package/build/core/data/auth/password-policy.d.ts +7 -0
  52. package/build/core/data/auth/password-policy.d.ts.map +1 -0
  53. package/build/core/data/auth/password-policy.js +14 -0
  54. package/build/core/data/auth/password-policy.js.map +1 -0
  55. package/build/core/data/auth/reset-password-request.d.ts +10 -0
  56. package/build/core/data/auth/reset-password-request.d.ts.map +1 -0
  57. package/build/core/data/auth/reset-password-request.js +3 -0
  58. package/build/core/data/auth/reset-password-request.js.map +1 -0
  59. package/build/core/data/auth/signup-schema.d.ts +199 -0
  60. package/build/core/data/auth/signup-schema.d.ts.map +1 -0
  61. package/build/core/data/auth/signup-schema.js +21 -0
  62. package/build/core/data/auth/signup-schema.js.map +1 -0
  63. package/build/core/data/common/audit.d.ts +24 -0
  64. package/build/core/data/common/audit.d.ts.map +1 -0
  65. package/build/core/data/common/audit.js +17 -0
  66. package/build/core/data/common/audit.js.map +1 -0
  67. package/build/core/data/common/index.d.ts +4 -0
  68. package/build/core/data/common/index.d.ts.map +1 -0
  69. package/build/core/data/common/index.js +8 -0
  70. package/build/core/data/common/index.js.map +1 -0
  71. package/build/core/data/common/status.d.ts +5 -0
  72. package/build/core/data/common/status.d.ts.map +1 -0
  73. package/build/core/data/common/status.js +9 -0
  74. package/build/core/data/common/status.js.map +1 -0
  75. package/build/core/data/financial/financial-account-entity.d.ts +5 -0
  76. package/build/core/data/financial/financial-account-entity.d.ts.map +1 -0
  77. package/build/core/data/financial/financial-account-entity.js +3 -0
  78. package/build/core/data/financial/financial-account-entity.js.map +1 -0
  79. package/build/core/data/financial/financial-account-schema.d.ts +81 -0
  80. package/build/core/data/financial/financial-account-schema.d.ts.map +1 -0
  81. package/build/core/data/financial/financial-account-schema.js +25 -0
  82. package/build/core/data/financial/financial-account-schema.js.map +1 -0
  83. package/build/core/data/financial/financial-category-entity.d.ts +5 -0
  84. package/build/core/data/financial/financial-category-entity.d.ts.map +1 -0
  85. package/build/core/data/financial/financial-category-entity.js +3 -0
  86. package/build/core/data/financial/financial-category-entity.js.map +1 -0
  87. package/build/core/data/financial/financial-category-schema.d.ts +87 -0
  88. package/build/core/data/financial/financial-category-schema.d.ts.map +1 -0
  89. package/build/core/data/financial/financial-category-schema.js +33 -0
  90. package/build/core/data/financial/financial-category-schema.js.map +1 -0
  91. package/build/core/data/financial/index.d.ts +5 -0
  92. package/build/core/data/financial/index.d.ts.map +1 -0
  93. package/build/core/data/financial/index.js +12 -0
  94. package/build/core/data/financial/index.js.map +1 -0
  95. package/build/core/data/index.d.ts +5 -0
  96. package/build/core/data/index.d.ts.map +1 -1
  97. package/build/core/data/index.js +5 -0
  98. package/build/core/data/index.js.map +1 -1
  99. package/build/core/data/person/index.d.ts +2 -0
  100. package/build/core/data/person/index.d.ts.map +1 -1
  101. package/build/core/data/person/index.js +3 -1
  102. package/build/core/data/person/index.js.map +1 -1
  103. package/build/core/data/person/person-ref-schema.d.ts +18 -0
  104. package/build/core/data/person/person-ref-schema.d.ts.map +1 -0
  105. package/build/core/data/person/person-ref-schema.js +15 -0
  106. package/build/core/data/person/person-ref-schema.js.map +1 -0
  107. package/build/core/data/person/person-schema.d.ts +51 -3
  108. package/build/core/data/person/person-schema.d.ts.map +1 -1
  109. package/build/core/data/person/person-schema.js +3 -1
  110. package/build/core/data/person/person-schema.js.map +1 -1
  111. package/build/core/data/request/headers.d.ts +11 -1
  112. package/build/core/data/request/headers.d.ts.map +1 -1
  113. package/build/core/data/restaurant/index.d.ts +3 -0
  114. package/build/core/data/restaurant/index.d.ts.map +1 -0
  115. package/build/core/data/restaurant/index.js +6 -0
  116. package/build/core/data/restaurant/index.js.map +1 -0
  117. package/build/core/data/restaurant/restaurant-entity.d.ts +5 -0
  118. package/build/core/data/restaurant/restaurant-entity.d.ts.map +1 -0
  119. package/build/core/data/restaurant/restaurant-entity.js +3 -0
  120. package/build/core/data/restaurant/restaurant-entity.js.map +1 -0
  121. package/build/core/data/restaurant/restaurant-schema.d.ts +56 -0
  122. package/build/core/data/restaurant/restaurant-schema.d.ts.map +1 -0
  123. package/build/core/data/restaurant/restaurant-schema.js +11 -0
  124. package/build/core/data/restaurant/restaurant-schema.js.map +1 -0
  125. package/build/core/data/user/index.d.ts +3 -0
  126. package/build/core/data/user/index.d.ts.map +1 -0
  127. package/build/core/data/user/index.js +8 -0
  128. package/build/core/data/user/index.js.map +1 -0
  129. package/build/core/data/user/user-entity.d.ts +5 -0
  130. package/build/core/data/user/user-entity.d.ts.map +1 -0
  131. package/build/core/data/user/user-entity.js +3 -0
  132. package/build/core/data/user/user-entity.js.map +1 -0
  133. package/build/core/data/user/user-schema.d.ts +118 -0
  134. package/build/core/data/user/user-schema.d.ts.map +1 -0
  135. package/build/core/data/user/user-schema.js +35 -0
  136. package/build/core/data/user/user-schema.js.map +1 -0
  137. package/build/core/index.d.ts +1 -0
  138. package/build/core/index.d.ts.map +1 -1
  139. package/build/core/index.js +3 -1
  140. package/build/core/index.js.map +1 -1
  141. package/package.json +1 -1
@@ -0,0 +1,25 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import type { ResponseDto } from '../core/data/request/response';
3
+ import type { Headers } from '../core/data/request/headers';
4
+ import type { SignupRequest } from '../core/data/auth/signup-schema';
5
+ import type { LoginRequest } from '../core/data/auth/login-schema';
6
+ import type { SignupResult, LoginResult, RefreshResult, RecoveryMessageResult } from '../core/data/auth/auth-response';
7
+ import type { ResetPasswordRequest } from '../core/data/auth/reset-password-request';
8
+ /**
9
+ * Cliente de autenticação (RPC, não CRUD): cadastro, login, refresh e logout.
10
+ * Respostas seguem o mesmo envelope ResponseDto do restante da API. Todo método
11
+ * recebe os headers de contexto (env obrigatório; authorization no logout).
12
+ */
13
+ export declare class AuthClient {
14
+ protected connection: AxiosInstance;
15
+ constructor();
16
+ signup(body: SignupRequest, headers: Headers): Promise<ResponseDto<SignupResult>>;
17
+ login(body: LoginRequest, headers: Headers): Promise<ResponseDto<LoginResult>>;
18
+ refresh(refreshToken: string, headers: Headers): Promise<ResponseDto<RefreshResult>>;
19
+ logout(refreshToken: string, headers: Headers): Promise<void>;
20
+ /** Dispara o e-mail de recuperação. Resposta é sempre genérica (não revela se o e-mail existe). */
21
+ forgotPassword(email: string, headers: Headers): Promise<ResponseDto<RecoveryMessageResult>>;
22
+ /** Redefine a senha a partir do token recebido por e-mail. */
23
+ resetPassword(body: ResetPasswordRequest, headers: Headers): Promise<ResponseDto<RecoveryMessageResult>>;
24
+ }
25
+ //# sourceMappingURL=auth-client.d.ts.map
@@ -0,0 +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;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"}
@@ -0,0 +1,52 @@
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.AuthClient = void 0;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ const request_config_1 = require("../core/client/request-config");
9
+ /**
10
+ * Cliente de autenticação (RPC, não CRUD): cadastro, login, refresh e logout.
11
+ * Respostas seguem o mesmo envelope ResponseDto do restante da API. Todo método
12
+ * recebe os headers de contexto (env obrigatório; authorization no logout).
13
+ */
14
+ class AuthClient {
15
+ 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
+ });
22
+ }
23
+ async signup(body, headers) {
24
+ const response = await this.connection.post('/signup', body, (0, request_config_1.withHeaders)(headers));
25
+ return response.data;
26
+ }
27
+ async login(body, headers) {
28
+ const response = await this.connection.post('/login', body, (0, request_config_1.withHeaders)(headers));
29
+ return response.data;
30
+ }
31
+ async refresh(refreshToken, headers) {
32
+ const response = await this.connection.post('/refresh', { refreshToken }, (0, request_config_1.withHeaders)(headers));
33
+ return response.data;
34
+ }
35
+ // Logout exige Bearer válido (headers.authorization): é de onde saem
36
+ // userId/restaurantId da auditoria (RN19).
37
+ async logout(refreshToken, headers) {
38
+ await this.connection.post('/logout', { refreshToken }, (0, request_config_1.withHeaders)(headers));
39
+ }
40
+ /** Dispara o e-mail de recuperação. Resposta é sempre genérica (não revela se o e-mail existe). */
41
+ async forgotPassword(email, headers) {
42
+ const response = await this.connection.post('/forgot-password', { email }, (0, request_config_1.withHeaders)(headers));
43
+ return response.data;
44
+ }
45
+ /** Redefine a senha a partir do token recebido por e-mail. */
46
+ async resetPassword(body, headers) {
47
+ const response = await this.connection.post('/reset-password', body, (0, request_config_1.withHeaders)(headers));
48
+ return response.data;
49
+ }
50
+ }
51
+ exports.AuthClient = AuthClient;
52
+ //# sourceMappingURL=auth-client.js.map
@@ -0,0 +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;YAC3C,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAE,IAAmB,EAAE,OAAgB;QACjD,MAAM,QAAQ,GAAG,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,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;AA5CD,gCA4CC"}
@@ -0,0 +1,6 @@
1
+ import { HttpBaseClient } from '../core/client/http-base-client';
2
+ import type { FinancialAccount } from '../core/data/financial/financial-account-entity';
3
+ export declare class FinancialAccountClient extends HttpBaseClient<FinancialAccount> {
4
+ constructor();
5
+ }
6
+ //# sourceMappingURL=financial-account-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"financial-account-client.d.ts","sourceRoot":"","sources":["../../src/clients/financial-account-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAA;AAEvF,qBAAa,sBAAuB,SAAQ,cAAc,CAAC,gBAAgB,CAAC;;CAI3E"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FinancialAccountClient = void 0;
4
+ const http_base_client_1 = require("../core/client/http-base-client");
5
+ class FinancialAccountClient extends http_base_client_1.HttpBaseClient {
6
+ constructor() {
7
+ super('financial-accounts');
8
+ }
9
+ }
10
+ exports.FinancialAccountClient = FinancialAccountClient;
11
+ //# sourceMappingURL=financial-account-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"financial-account-client.js","sourceRoot":"","sources":["../../src/clients/financial-account-client.ts"],"names":[],"mappings":";;;AAAA,sEAAgE;AAGhE,MAAa,sBAAuB,SAAQ,iCAAgC;IAC1E;QACE,KAAK,CAAC,oBAAoB,CAAC,CAAA;IAC7B,CAAC;CACF;AAJD,wDAIC"}
@@ -0,0 +1,6 @@
1
+ import { HttpBaseClient } from '../core/client/http-base-client';
2
+ import type { FinancialCategory } from '../core/data/financial/financial-category-entity';
3
+ export declare class FinancialCategoryClient extends HttpBaseClient<FinancialCategory> {
4
+ constructor();
5
+ }
6
+ //# sourceMappingURL=financial-category-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"financial-category-client.d.ts","sourceRoot":"","sources":["../../src/clients/financial-category-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAA;AAEzF,qBAAa,uBAAwB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;;CAI7E"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FinancialCategoryClient = void 0;
4
+ const http_base_client_1 = require("../core/client/http-base-client");
5
+ class FinancialCategoryClient extends http_base_client_1.HttpBaseClient {
6
+ constructor() {
7
+ super('financial-categories');
8
+ }
9
+ }
10
+ exports.FinancialCategoryClient = FinancialCategoryClient;
11
+ //# sourceMappingURL=financial-category-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"financial-category-client.js","sourceRoot":"","sources":["../../src/clients/financial-category-client.ts"],"names":[],"mappings":";;;AAAA,sEAAgE;AAGhE,MAAa,uBAAwB,SAAQ,iCAAiC;IAC5E;QACE,KAAK,CAAC,sBAAsB,CAAC,CAAA;IAC/B,CAAC;CACF;AAJD,0DAIC"}
@@ -1,2 +1,6 @@
1
+ export { AuthClient } from './auth-client';
1
2
  export { PersonClient } from './person-client';
3
+ export { RestaurantClient } from './restaurant-client';
4
+ export { FinancialAccountClient } from './financial-account-client';
5
+ export { FinancialCategoryClient } from './financial-category-client';
2
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA"}
@@ -1,6 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PersonClient = void 0;
3
+ exports.FinancialCategoryClient = exports.FinancialAccountClient = exports.RestaurantClient = exports.PersonClient = exports.AuthClient = void 0;
4
+ var auth_client_1 = require("./auth-client");
5
+ Object.defineProperty(exports, "AuthClient", { enumerable: true, get: function () { return auth_client_1.AuthClient; } });
4
6
  var person_client_1 = require("./person-client");
5
7
  Object.defineProperty(exports, "PersonClient", { enumerable: true, get: function () { return person_client_1.PersonClient; } });
8
+ var restaurant_client_1 = require("./restaurant-client");
9
+ Object.defineProperty(exports, "RestaurantClient", { enumerable: true, get: function () { return restaurant_client_1.RestaurantClient; } });
10
+ var financial_account_client_1 = require("./financial-account-client");
11
+ Object.defineProperty(exports, "FinancialAccountClient", { enumerable: true, get: function () { return financial_account_client_1.FinancialAccountClient; } });
12
+ var financial_category_client_1 = require("./financial-category-client");
13
+ Object.defineProperty(exports, "FinancialCategoryClient", { enumerable: true, get: function () { return financial_category_client_1.FinancialCategoryClient; } });
6
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":";;;AAAA,iDAA8C;AAArC,6GAAA,YAAY,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAAjC,yGAAA,UAAU,OAAA;AACnB,iDAA8C;AAArC,6GAAA,YAAY,OAAA;AACrB,yDAAsD;AAA7C,qHAAA,gBAAgB,OAAA;AACzB,uEAAmE;AAA1D,kIAAA,sBAAsB,OAAA;AAC/B,yEAAqE;AAA5D,oIAAA,uBAAuB,OAAA"}
@@ -1,9 +1,6 @@
1
1
  import { HttpBaseClient } from '../core/client/http-base-client';
2
- export declare class PersonClient extends HttpBaseClient<{
3
- id: string;
4
- name: string;
5
- age: number;
6
- }> {
2
+ import type { Person } from '../core/data/person/person-entity';
3
+ export declare class PersonClient extends HttpBaseClient<Person> {
7
4
  constructor();
8
5
  }
9
6
  //# sourceMappingURL=person-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"person-client.d.ts","sourceRoot":"","sources":["../../src/clients/person-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAEhE,qBAAa,YAAa,SAAQ,cAAc,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;;CAI1F"}
1
+ {"version":3,"file":"person-client.d.ts","sourceRoot":"","sources":["../../src/clients/person-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAE/D,qBAAa,YAAa,SAAQ,cAAc,CAAC,MAAM,CAAC;;CAIvD"}
@@ -4,7 +4,7 @@ exports.PersonClient = void 0;
4
4
  const http_base_client_1 = require("../core/client/http-base-client");
5
5
  class PersonClient extends http_base_client_1.HttpBaseClient {
6
6
  constructor() {
7
- super('person');
7
+ super('people');
8
8
  }
9
9
  }
10
10
  exports.PersonClient = PersonClient;
@@ -1 +1 @@
1
- {"version":3,"file":"person-client.js","sourceRoot":"","sources":["../../src/clients/person-client.ts"],"names":[],"mappings":";;;AAAA,sEAAgE;AAEhE,MAAa,YAAa,SAAQ,iCAAyD;IACzF;QACE,KAAK,CAAC,QAAQ,CAAC,CAAA;IACjB,CAAC;CACF;AAJD,oCAIC"}
1
+ {"version":3,"file":"person-client.js","sourceRoot":"","sources":["../../src/clients/person-client.ts"],"names":[],"mappings":";;;AAAA,sEAAgE;AAGhE,MAAa,YAAa,SAAQ,iCAAsB;IACtD;QACE,KAAK,CAAC,QAAQ,CAAC,CAAA;IACjB,CAAC;CACF;AAJD,oCAIC"}
@@ -0,0 +1,6 @@
1
+ import { HttpBaseClient } from '../core/client/http-base-client';
2
+ import type { Restaurant } from '../core/data/restaurant/restaurant-entity';
3
+ export declare class RestaurantClient extends HttpBaseClient<Restaurant> {
4
+ constructor();
5
+ }
6
+ //# sourceMappingURL=restaurant-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restaurant-client.d.ts","sourceRoot":"","sources":["../../src/clients/restaurant-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAA;AAE3E,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,UAAU,CAAC;;CAI/D"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RestaurantClient = void 0;
4
+ const http_base_client_1 = require("../core/client/http-base-client");
5
+ class RestaurantClient extends http_base_client_1.HttpBaseClient {
6
+ constructor() {
7
+ super('restaurants');
8
+ }
9
+ }
10
+ exports.RestaurantClient = RestaurantClient;
11
+ //# sourceMappingURL=restaurant-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restaurant-client.js","sourceRoot":"","sources":["../../src/clients/restaurant-client.ts"],"names":[],"mappings":";;;AAAA,sEAAgE;AAGhE,MAAa,gBAAiB,SAAQ,iCAA0B;IAC9D;QACE,KAAK,CAAC,aAAa,CAAC,CAAA;IACtB,CAAC;CACF;AAJD,4CAIC"}
@@ -1,11 +1,12 @@
1
1
  import { FindAllRequestDto } from '../data/request/pagination';
2
2
  import { ResponseDto } from '../data/request/response';
3
+ import { Headers } from '../data/request/headers';
3
4
  export interface BaseClient<T> {
4
- insert(body: T): Promise<ResponseDto<T>>;
5
- findById(id: string): Promise<ResponseDto<T>>;
6
- find(filter: Partial<T>): Promise<ResponseDto<T>>;
7
- findAll(filter: FindAllRequestDto<T>): Promise<ResponseDto<T[]>>;
8
- update(id: string, body: Partial<T>): Promise<ResponseDto<T>>;
9
- delete(id: string): Promise<void>;
5
+ insert(body: T, headers: Headers): Promise<ResponseDto<T>>;
6
+ findById(id: string, headers: Headers): Promise<ResponseDto<T>>;
7
+ find(filter: Partial<T>, headers: Headers): Promise<ResponseDto<T>>;
8
+ findAll(filter: FindAllRequestDto<T>, headers: Headers): Promise<ResponseDto<T[]>>;
9
+ update(id: string, body: Partial<T>, headers: Headers): Promise<ResponseDto<T>>;
10
+ delete(id: string, headers: Headers): Promise<void>;
10
11
  }
11
12
  //# 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;AAEtD,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,MAAM,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7C,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAA;IACjD,OAAO,CAAC,MAAM,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,CAAA;IAC/E,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpD"}
@@ -2,15 +2,16 @@ import { AxiosInstance } from 'axios';
2
2
  import { BaseClient } from './base-client';
3
3
  import { PaginationDto } from '../data/request/pagination';
4
4
  import { ResponseDto } from '../data/request/response';
5
+ import { Headers } from '../data/request/headers';
5
6
  export declare class HttpBaseClient<T> implements BaseClient<T> {
6
7
  readonly baseUrl: string;
7
8
  protected connection: AxiosInstance;
8
9
  constructor(baseUrl: string);
9
- insert(body: T): Promise<ResponseDto<T>>;
10
- findById(id: string): Promise<ResponseDto<T>>;
11
- find(filter: Partial<T>): Promise<ResponseDto<T>>;
12
- findAll(filter: Partial<T> & PaginationDto): Promise<ResponseDto<T[]>>;
13
- update(id: string, body: Partial<T>): Promise<ResponseDto<T>>;
14
- delete(id: string): Promise<void>;
10
+ insert(body: T, headers: Headers): Promise<ResponseDto<T>>;
11
+ findById(id: string, headers: Headers): Promise<ResponseDto<T>>;
12
+ find(filter: Partial<T>, headers: Headers): Promise<ResponseDto<T>>;
13
+ findAll(filter: Partial<T> & PaginationDto, headers: Headers): Promise<ResponseDto<T[]>>;
14
+ update(id: string, body: Partial<T>, headers: Headers): Promise<ResponseDto<T>>;
15
+ delete(id: string, headers: Headers): Promise<void>;
15
16
  }
16
17
  //# sourceMappingURL=http-base-client.d.ts.map
@@ -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;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,qBAAa,cAAc,CAAC,CAAC,CAAE,YAAW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AAE,MAAM;IAS/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"}
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.HttpBaseClient = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
+ const request_config_1 = require("./request-config");
8
9
  class HttpBaseClient {
9
10
  constructor(baseUrl) {
10
11
  this.baseUrl = baseUrl;
@@ -15,28 +16,28 @@ class HttpBaseClient {
15
16
  },
16
17
  });
17
18
  }
18
- async insert(body) {
19
- const response = await this.connection.post('/', body);
19
+ async insert(body, headers) {
20
+ const response = await this.connection.post('/', body, (0, request_config_1.withHeaders)(headers));
20
21
  return response.data;
21
22
  }
22
- async findById(id) {
23
- const response = await this.connection.get(`/${id}`);
23
+ async findById(id, headers) {
24
+ const response = await this.connection.get(`/${id}`, (0, request_config_1.withHeaders)(headers));
24
25
  return response.data;
25
26
  }
26
- async find(filter) {
27
- const response = await this.connection.get('/', { params: { ...filter, isMultipleResponse: false } });
27
+ async find(filter, headers) {
28
+ const response = await this.connection.get('/', (0, request_config_1.withHeaders)(headers, { params: { ...filter, isMultipleResponse: false } }));
28
29
  return response.data;
29
30
  }
30
- async findAll(filter) {
31
- const response = await this.connection.get('/', { params: { ...filter, isMultipleResponse: true } });
31
+ async findAll(filter, headers) {
32
+ const response = await this.connection.get('/', (0, request_config_1.withHeaders)(headers, { params: { ...filter, isMultipleResponse: true } }));
32
33
  return response.data;
33
34
  }
34
- async update(id, body) {
35
- const response = await this.connection.put(`/${id}`, body);
35
+ async update(id, body, headers) {
36
+ const response = await this.connection.patch(`/${id}`, body, (0, request_config_1.withHeaders)(headers));
36
37
  return response.data;
37
38
  }
38
- async delete(id) {
39
- await this.connection.delete(`/${id}`);
39
+ async delete(id, headers) {
40
+ await this.connection.delete(`/${id}`, (0, request_config_1.withHeaders)(headers));
40
41
  }
41
42
  }
42
43
  exports.HttpBaseClient = HttpBaseClient;
@@ -1 +1 @@
1
- {"version":3,"file":"http-base-client.js","sourceRoot":"","sources":["../../../src/core/client/http-base-client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA4C;AAK5C,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;QACnB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAiB,GAAG,EAAE,IAAI,CAAC,CAAA;QACtE,OA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BAAkB,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAA;QAC5I,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,MAAM,CAAE,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;AAxCD,wCAwCC"}
@@ -1,6 +1,10 @@
1
- import { PersonClient } from '../../clients';
1
+ import { AuthClient, PersonClient, RestaurantClient, FinancialAccountClient, FinancialCategoryClient } from '../../clients';
2
2
  export declare class MasterClient {
3
+ authClient: AuthClient;
3
4
  personClient: PersonClient;
5
+ restaurantClient: RestaurantClient;
6
+ financialAccountClient: FinancialAccountClient;
7
+ financialCategoryClient: FinancialCategoryClient;
4
8
  constructor();
5
9
  }
6
10
  //# sourceMappingURL=master-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"master-client.d.ts","sourceRoot":"","sources":["../../../src/core/client/master-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,qBAAa,YAAY;IACvB,YAAY,EAAE,YAAY,CAAA;;CAI3B"}
1
+ {"version":3,"file":"master-client.d.ts","sourceRoot":"","sources":["../../../src/core/client/master-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,eAAe,CAAA;AAEtB,qBAAa,YAAY;IACvB,UAAU,EAAE,UAAU,CAAA;IACtB,YAAY,EAAE,YAAY,CAAA;IAC1B,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,sBAAsB,EAAE,sBAAsB,CAAA;IAC9C,uBAAuB,EAAE,uBAAuB,CAAA;;CASjD"}
@@ -4,7 +4,11 @@ exports.MasterClient = void 0;
4
4
  const clients_1 = require("../../clients");
5
5
  class MasterClient {
6
6
  constructor() {
7
+ this.authClient = new clients_1.AuthClient();
7
8
  this.personClient = new clients_1.PersonClient();
9
+ this.restaurantClient = new clients_1.RestaurantClient();
10
+ this.financialAccountClient = new clients_1.FinancialAccountClient();
11
+ this.financialCategoryClient = new clients_1.FinancialCategoryClient();
8
12
  }
9
13
  }
10
14
  exports.MasterClient = MasterClient;
@@ -1 +1 @@
1
- {"version":3,"file":"master-client.js","sourceRoot":"","sources":["../../../src/core/client/master-client.ts"],"names":[],"mappings":";;;AAAA,2CAA4C;AAE5C,MAAa,YAAY;IAEvB;QACE,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAY,EAAE,CAAA;IACxC,CAAC;CACF;AALD,oCAKC"}
1
+ {"version":3,"file":"master-client.js","sourceRoot":"","sources":["../../../src/core/client/master-client.ts"],"names":[],"mappings":";;;AAAA,2CAMsB;AAEtB,MAAa,YAAY;IAOvB;QACE,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAU,EAAE,CAAA;QAClC,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAY,EAAE,CAAA;QACtC,IAAI,CAAC,gBAAgB,GAAG,IAAI,0BAAgB,EAAE,CAAA;QAC9C,IAAI,CAAC,sBAAsB,GAAG,IAAI,gCAAsB,EAAE,CAAA;QAC1D,IAAI,CAAC,uBAAuB,GAAG,IAAI,iCAAuB,EAAE,CAAA;IAC9D,CAAC;CACF;AAdD,oCAcC"}
@@ -0,0 +1,9 @@
1
+ import type { AxiosRequestConfig } from 'axios';
2
+ import type { Headers } from '../data/request/headers';
3
+ /**
4
+ * Base compartilhada dos clients: propaga os headers de contexto (env,
5
+ * authorization, restaurantId, ...) para o config do axios, preservando
6
+ * qualquer config extra (ex.: `params` de paginação/filtro).
7
+ */
8
+ export declare function withHeaders(headers: Headers, config?: AxiosRequestConfig): AxiosRequestConfig;
9
+ //# sourceMappingURL=request-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-config.d.ts","sourceRoot":"","sources":["../../../src/core/client/request-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEtD;;;;GAIG;AACH,wBAAgB,WAAW,CAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAE,kBAAuB,GAAG,kBAAkB,CAElG"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.withHeaders = withHeaders;
4
+ /**
5
+ * Base compartilhada dos clients: propaga os headers de contexto (env,
6
+ * authorization, restaurantId, ...) para o config do axios, preservando
7
+ * qualquer config extra (ex.: `params` de paginação/filtro).
8
+ */
9
+ function withHeaders(headers, config = {}) {
10
+ return { ...config, headers: { ...config.headers, ...headers } };
11
+ }
12
+ //# sourceMappingURL=request-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-config.js","sourceRoot":"","sources":["../../../src/core/client/request-config.ts"],"names":[],"mappings":";;AAQA,kCAEC;AAPD;;;;GAIG;AACH,SAAgB,WAAW,CAAE,OAAgB,EAAE,SAA6B,EAAE;IAC5E,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,CAAA;AAClE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { User } from '../user/user-entity';
2
+ import type { Restaurant } from '../restaurant/restaurant-entity';
3
+ export interface AuthTokens {
4
+ accessToken: string;
5
+ refreshToken: string | null;
6
+ }
7
+ /** Visão pública do usuário — nunca expõe passwordHash. */
8
+ export type AuthUser = Omit<User, 'passwordHash'>;
9
+ export interface SignupResult extends AuthTokens {
10
+ user: AuthUser;
11
+ restaurant: Restaurant;
12
+ }
13
+ export interface LoginResult extends AuthTokens {
14
+ user: AuthUser;
15
+ }
16
+ export type RefreshResult = AuthTokens;
17
+ /** Resposta das rotas de recuperação de senha — apenas a mensagem ao usuário. */
18
+ export interface RecoveryMessageResult {
19
+ message: string;
20
+ }
21
+ //# sourceMappingURL=auth-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-response.d.ts","sourceRoot":"","sources":["../../../../src/core/data/auth/auth-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAEjE,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED,2DAA2D;AAC3D,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,CAAA;AAEjD,MAAM,WAAW,YAAa,SAAQ,UAAU;IAC9C,IAAI,EAAE,QAAQ,CAAA;IACd,UAAU,EAAE,UAAU,CAAA;CACvB;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,IAAI,EAAE,QAAQ,CAAA;CACf;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAA;AAEtC,iFAAiF;AACjF,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAA;CAChB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=auth-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-response.js","sourceRoot":"","sources":["../../../../src/core/data/auth/auth-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ export { passwordSchema } from './password-policy';
2
+ export { signupRequestSchema } from './signup-schema';
3
+ export type { SignupRequest } from './signup-schema';
4
+ export { loginRequestSchema } from './login-schema';
5
+ export type { LoginRequest } from './login-schema';
6
+ export type { ResetPasswordRequest } from './reset-password-request';
7
+ export type { AuthTokens, AuthUser, SignupResult, LoginResult, RefreshResult, RecoveryMessageResult, } from './auth-response';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/data/auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnD,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACpE,YAAY,EACV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,aAAa,EACb,qBAAqB,GACtB,MAAM,iBAAiB,CAAA"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loginRequestSchema = exports.signupRequestSchema = exports.passwordSchema = void 0;
4
+ var password_policy_1 = require("./password-policy");
5
+ Object.defineProperty(exports, "passwordSchema", { enumerable: true, get: function () { return password_policy_1.passwordSchema; } });
6
+ var signup_schema_1 = require("./signup-schema");
7
+ Object.defineProperty(exports, "signupRequestSchema", { enumerable: true, get: function () { return signup_schema_1.signupRequestSchema; } });
8
+ var login_schema_1 = require("./login-schema");
9
+ Object.defineProperty(exports, "loginRequestSchema", { enumerable: true, get: function () { return login_schema_1.loginRequestSchema; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/data/auth/index.ts"],"names":[],"mappings":";;;AAAA,qDAAkD;AAAzC,iHAAA,cAAc,OAAA;AACvB,iDAAqD;AAA5C,oHAAA,mBAAmB,OAAA;AAE5B,+CAAmD;AAA1C,kHAAA,kBAAkB,OAAA"}
@@ -0,0 +1,17 @@
1
+ import type { Infer } from '@ascendance-hub/sapphire-core';
2
+ /**
3
+ * Payload do login. Não aplica a política de senha (isso é só no cadastro
4
+ * e na redefinição) — aqui valida apenas o formato do e-mail.
5
+ */
6
+ export declare const loginRequestSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
7
+ email: import("@ascendance-hub/sapphire-core").StringField<string, string>;
8
+ password: import("@ascendance-hub/sapphire-core").StringField<string, string>;
9
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
10
+ email: import("@ascendance-hub/sapphire-core").StringField<string, string>;
11
+ password: import("@ascendance-hub/sapphire-core").StringField<string, string>;
12
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
13
+ email: import("@ascendance-hub/sapphire-core").StringField<string, string>;
14
+ password: import("@ascendance-hub/sapphire-core").StringField<string, string>;
15
+ }>>;
16
+ export type LoginRequest = Infer<typeof loginRequestSchema>;
17
+ //# sourceMappingURL=login-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/auth/login-schema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AAI1D;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;GAG7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.loginRequestSchema = void 0;
4
+ const sapphire_core_1 = require("@ascendance-hub/sapphire-core");
5
+ const s = new sapphire_core_1.Sapphire();
6
+ /**
7
+ * Payload do login. Não aplica a política de senha (isso é só no cadastro
8
+ * e na redefinição) — aqui valida apenas o formato do e-mail.
9
+ */
10
+ exports.loginRequestSchema = s.object({
11
+ email: s.string().email({ message: 'Informe um e-mail válido.' }),
12
+ password: s.string(),
13
+ });
14
+ //# sourceMappingURL=login-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login-schema.js","sourceRoot":"","sources":["../../../../src/core/data/auth/login-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AAGxD,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB;;;GAGG;AACU,QAAA,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;IACjE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Política de senha compartilhada: mínimo 8 caracteres, ao menos
3
+ * 1 maiúscula, 1 minúscula e 1 número. Reutilizada no cadastro e na
4
+ * redefinição de senha (MIN-59) para manter a regra num único lugar.
5
+ */
6
+ export declare const passwordSchema: import("@ascendance-hub/sapphire-core").StringField<string, string>;
7
+ //# sourceMappingURL=password-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password-policy.d.ts","sourceRoot":"","sources":["../../../../src/core/data/auth/password-policy.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,cAAc,qEAKxB,CAAA"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.passwordSchema = void 0;
4
+ const sapphire_core_1 = require("@ascendance-hub/sapphire-core");
5
+ const s = new sapphire_core_1.Sapphire();
6
+ /**
7
+ * Política de senha compartilhada: mínimo 8 caracteres, ao menos
8
+ * 1 maiúscula, 1 minúscula e 1 número. Reutilizada no cadastro e na
9
+ * redefinição de senha (MIN-59) para manter a regra num único lugar.
10
+ */
11
+ exports.passwordSchema = s.string()
12
+ .min(8, { message: 'A senha deve ter pelo menos 8 caracteres.' })
13
+ .regex(/(?=.*[A-Z])(?=.*[a-z])(?=.*\d)/, { message: 'A senha deve conter ao menos uma letra maiúscula, uma minúscula e um número.' });
14
+ //# sourceMappingURL=password-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password-policy.js","sourceRoot":"","sources":["../../../../src/core/data/auth/password-policy.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AAExD,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB;;;;GAIG;AACU,QAAA,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE;KACrC,GAAG,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,2CAA2C,EAAE,CAAC;KAChE,KAAK,CACJ,gCAAgC,EAChC,EAAE,OAAO,EAAE,8EAA8E,EAAE,CAC5F,CAAA"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Corpo de POST /auth/reset-password. A validação da política de senha vive na
3
+ * API (resetPasswordSchema); aqui o tipo apenas descreve o contrato do request.
4
+ */
5
+ export interface ResetPasswordRequest {
6
+ token: string;
7
+ newPassword: string;
8
+ confirmNewPassword: string;
9
+ }
10
+ //# sourceMappingURL=reset-password-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset-password-request.d.ts","sourceRoot":"","sources":["../../../../src/core/data/auth/reset-password-request.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,kBAAkB,EAAE,MAAM,CAAA;CAC3B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=reset-password-request.js.map