mintly-lib 1.2.0 → 2.2.2-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 (41) hide show
  1. package/build/clients/auth-client.d.ts +13 -6
  2. package/build/clients/auth-client.d.ts.map +1 -1
  3. package/build/clients/auth-client.js +23 -9
  4. package/build/clients/auth-client.js.map +1 -1
  5. package/build/core/client/base-client.d.ts +7 -6
  6. package/build/core/client/base-client.d.ts.map +1 -1
  7. package/build/core/client/http-base-client.d.ts +7 -6
  8. package/build/core/client/http-base-client.d.ts.map +1 -1
  9. package/build/core/client/http-base-client.js +13 -12
  10. package/build/core/client/http-base-client.js.map +1 -1
  11. package/build/core/client/request-config.d.ts +9 -0
  12. package/build/core/client/request-config.d.ts.map +1 -0
  13. package/build/core/client/request-config.js +12 -0
  14. package/build/core/client/request-config.js.map +1 -0
  15. package/build/core/data/auth/auth-response.d.ts +4 -0
  16. package/build/core/data/auth/auth-response.d.ts.map +1 -1
  17. package/build/core/data/auth/index.d.ts +2 -1
  18. package/build/core/data/auth/index.d.ts.map +1 -1
  19. package/build/core/data/auth/reset-password-request.d.ts +10 -0
  20. package/build/core/data/auth/reset-password-request.d.ts.map +1 -0
  21. package/build/core/data/auth/reset-password-request.js +3 -0
  22. package/build/core/data/auth/reset-password-request.js.map +1 -0
  23. package/build/core/data/auth/signup-schema.d.ts +54 -54
  24. package/build/core/data/common/audit.d.ts +6 -6
  25. package/build/core/data/common/audit.js +2 -2
  26. package/build/core/data/common/audit.js.map +1 -1
  27. package/build/core/data/financial/financial-account-schema.d.ts +643 -28
  28. package/build/core/data/financial/financial-account-schema.d.ts.map +1 -1
  29. package/build/core/data/financial/financial-account-schema.js +52 -5
  30. package/build/core/data/financial/financial-account-schema.js.map +1 -1
  31. package/build/core/data/financial/financial-category-schema.d.ts +18 -18
  32. package/build/core/data/person/person-schema.d.ts +18 -18
  33. package/build/core/data/request/headers.d.ts +11 -1
  34. package/build/core/data/request/headers.d.ts.map +1 -1
  35. package/build/core/data/restaurant/restaurant-schema.d.ts +18 -18
  36. package/build/core/data/user/user-schema.d.ts +18 -18
  37. package/build/core/index.d.ts +1 -0
  38. package/build/core/index.d.ts.map +1 -1
  39. package/build/core/index.js +3 -1
  40. package/build/core/index.js.map +1 -1
  41. package/package.json +4 -1
@@ -1,18 +1,25 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  import type { ResponseDto } from '../core/data/request/response';
3
+ import type { Headers } from '../core/data/request/headers';
3
4
  import type { SignupRequest } from '../core/data/auth/signup-schema';
4
5
  import type { LoginRequest } from '../core/data/auth/login-schema';
5
- import type { SignupResult, LoginResult, RefreshResult } from '../core/data/auth/auth-response';
6
+ import type { SignupResult, LoginResult, RefreshResult, RecoveryMessageResult } from '../core/data/auth/auth-response';
7
+ import type { ResetPasswordRequest } from '../core/data/auth/reset-password-request';
6
8
  /**
7
9
  * Cliente de autenticação (RPC, não CRUD): cadastro, login, refresh e logout.
8
- * Respostas seguem o mesmo envelope ResponseDto do restante da API.
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).
9
12
  */
10
13
  export declare class AuthClient {
11
14
  protected connection: AxiosInstance;
12
15
  constructor();
13
- signup(body: SignupRequest): Promise<ResponseDto<SignupResult>>;
14
- login(body: LoginRequest): Promise<ResponseDto<LoginResult>>;
15
- refresh(refreshToken: string): Promise<ResponseDto<RefreshResult>>;
16
- logout(refreshToken: string): Promise<void>;
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>>;
17
24
  }
18
25
  //# sourceMappingURL=auth-client.d.ts.map
@@ -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,aAAa,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE/F;;;GAGG;AACH,qBAAa,UAAU;IACrB,SAAS,CAAC,UAAU,EAAE,aAAa,CAAA;;IAW7B,MAAM,CAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;IAKhE,KAAK,CAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAK7D,OAAO,CAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;IAKnE,MAAM,CAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnD"}
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"}
@@ -5,9 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AuthClient = void 0;
7
7
  const axios_1 = __importDefault(require("axios"));
8
+ const request_config_1 = require("../core/client/request-config");
8
9
  /**
9
10
  * Cliente de autenticação (RPC, não CRUD): cadastro, login, refresh e logout.
10
- * Respostas seguem o mesmo envelope ResponseDto do restante da API.
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).
11
13
  */
12
14
  class AuthClient {
13
15
  constructor() {
@@ -18,20 +20,32 @@ class AuthClient {
18
20
  },
19
21
  });
20
22
  }
21
- async signup(body) {
22
- const response = await this.connection.post('/signup', body);
23
+ async signup(body, headers) {
24
+ const response = await this.connection.post('/signup', body, (0, request_config_1.withHeaders)(headers));
23
25
  return response.data;
24
26
  }
25
- async login(body) {
26
- const response = await this.connection.post('/login', body);
27
+ async login(body, headers) {
28
+ const response = await this.connection.post('/login', body, (0, request_config_1.withHeaders)(headers));
27
29
  return response.data;
28
30
  }
29
- async refresh(refreshToken) {
30
- const response = await this.connection.post('/refresh', { refreshToken });
31
+ async refresh(refreshToken, headers) {
32
+ const response = await this.connection.post('/refresh', { refreshToken }, (0, request_config_1.withHeaders)(headers));
31
33
  return response.data;
32
34
  }
33
- async logout(refreshToken) {
34
- await this.connection.post('/logout', { refreshToken });
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;
35
49
  }
36
50
  }
37
51
  exports.AuthClient = AuthClient;
@@ -1 +1 @@
1
- {"version":3,"file":"auth-client.js","sourceRoot":"","sources":["../../src/clients/auth-client.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA4C;AAM5C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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;AA5CD,gCA4CC"}
@@ -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,E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IACnE,OAAO,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAClF,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;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,UAAU,CAAC,CAAC,CAAC;IAGxC,QAAQ,CAAC,OAAO,EAAE,MAAM;IAFrC,SAAS,CAAC,UAAU,EAAE,aAAa,CAAA;gBAEb,OAAO,EAAE,MAAM;IAS/B,MAAM,CAAE,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAKzC,QAAQ,CAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAK9C,IAAI,CAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAKlD,OAAO,CAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,aAAa,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IAKvE,MAAM,CAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAK9D,MAAM,CAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGzC"}
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,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;YAC7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AAK,EAAE,EAAE,CAAC,CAAC,CAAA;QAC3I,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,OAAO,CAAE,MAAkC,EAAE,OAAgB;QACjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAmB,GAAG,EAAE,IAAA,4BAAW,EAAC,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,kBAAkB,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"}
@@ -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"}
@@ -14,4 +14,8 @@ export interface LoginResult extends AuthTokens {
14
14
  user: AuthUser;
15
15
  }
16
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
+ }
17
21
  //# sourceMappingURL=auth-response.d.ts.map
@@ -1 +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"}
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"}
@@ -3,5 +3,6 @@ export { signupRequestSchema } from './signup-schema';
3
3
  export type { SignupRequest } from './signup-schema';
4
4
  export { loginRequestSchema } from './login-schema';
5
5
  export type { LoginRequest } from './login-schema';
6
- export type { AuthTokens, AuthUser, SignupResult, LoginResult, RefreshResult, } from './auth-response';
6
+ export type { ResetPasswordRequest } from './reset-password-request';
7
+ export type { AuthTokens, AuthUser, SignupResult, LoginResult, RefreshResult, RecoveryMessageResult, } from './auth-response';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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,EACV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,iBAAiB,CAAA"}
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
+ /**
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset-password-request.js","sourceRoot":"","sources":["../../../../src/core/data/auth/reset-password-request.ts"],"names":[],"mappings":""}
@@ -10,18 +10,18 @@ export declare const signupRequestSchema: import("@ascendance-hub/sapphire-core"
10
10
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
11
11
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
12
12
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
13
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
14
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
13
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
14
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
15
15
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
16
16
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
17
17
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
18
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
19
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
18
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
19
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
20
20
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
21
21
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
22
22
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
23
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
24
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
23
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
24
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
25
25
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
26
26
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
27
27
  }>>;
@@ -29,18 +29,18 @@ export declare const signupRequestSchema: import("@ascendance-hub/sapphire-core"
29
29
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
30
30
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
31
31
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
32
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
33
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
32
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
33
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
34
34
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
35
35
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
36
36
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
37
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
38
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
37
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
38
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
39
39
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
40
40
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
41
41
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
42
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
43
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
42
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
43
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
44
44
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
45
45
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
46
46
  }>>;
@@ -48,18 +48,18 @@ export declare const signupRequestSchema: import("@ascendance-hub/sapphire-core"
48
48
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
49
49
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
50
50
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
51
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
52
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
51
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
52
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
53
53
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
54
54
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
55
55
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
56
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
57
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
56
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
57
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
58
58
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
59
59
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
60
60
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
61
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
62
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
61
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
62
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
63
63
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
64
64
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
65
65
  }>>;
@@ -73,18 +73,18 @@ export declare const signupRequestSchema: import("@ascendance-hub/sapphire-core"
73
73
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
74
74
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
75
75
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
76
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
77
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
76
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
77
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
78
78
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
79
79
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
80
80
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
81
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
82
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
81
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
82
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
83
83
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
84
84
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
85
85
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
86
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
87
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
86
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
87
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
88
88
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
89
89
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
90
90
  }>>;
@@ -92,18 +92,18 @@ export declare const signupRequestSchema: import("@ascendance-hub/sapphire-core"
92
92
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
93
93
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
94
94
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
95
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
96
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
95
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
96
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
97
97
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
98
98
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
99
99
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
100
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
101
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
100
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
101
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
102
102
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
103
103
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
104
104
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
105
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
106
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
105
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
106
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
107
107
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
108
108
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
109
109
  }>>;
@@ -111,18 +111,18 @@ export declare const signupRequestSchema: import("@ascendance-hub/sapphire-core"
111
111
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
112
112
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
113
113
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
114
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
115
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
114
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
115
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
116
116
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
117
117
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
118
118
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
119
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
120
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
119
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
120
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
121
121
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
122
122
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
123
123
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
124
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
125
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
124
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
125
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
126
126
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
127
127
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
128
128
  }>>;
@@ -136,18 +136,18 @@ export declare const signupRequestSchema: import("@ascendance-hub/sapphire-core"
136
136
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
137
137
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
138
138
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
139
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
140
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
139
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
140
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
141
141
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
142
142
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
143
143
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
144
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
145
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
144
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
145
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
146
146
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
147
147
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
148
148
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
149
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
150
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
149
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
150
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
151
151
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
152
152
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
153
153
  }>>;
@@ -155,18 +155,18 @@ export declare const signupRequestSchema: import("@ascendance-hub/sapphire-core"
155
155
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
156
156
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
157
157
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
158
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
159
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
158
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
159
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
160
160
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
161
161
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
162
162
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
163
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
164
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
163
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
164
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
165
165
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
166
166
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
167
167
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
168
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
169
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
168
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
169
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
170
170
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
171
171
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
172
172
  }>>;
@@ -174,18 +174,18 @@ export declare const signupRequestSchema: import("@ascendance-hub/sapphire-core"
174
174
  name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
175
175
  phone: import("@ascendance-hub/sapphire-core").StringField<string, string>;
176
176
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
177
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
178
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
177
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
178
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
179
179
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
180
180
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
181
181
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
182
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
183
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
182
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
183
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
184
184
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
185
185
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
186
186
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
187
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
188
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
187
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
188
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
189
189
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
190
190
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
191
191
  }>>;
@@ -5,18 +5,18 @@ import type { Infer } from '@ascendance-hub/sapphire-core';
5
5
  * é criado antes de existir um "autor" para referenciar.
6
6
  */
7
7
  export declare const auditSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
8
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
9
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
8
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
9
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
10
10
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
11
11
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
12
12
  }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
13
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
14
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
13
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
14
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
15
15
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
16
16
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
17
17
  }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
18
- createdAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
19
- updatedAt: import("@ascendance-hub/sapphire-core").StringField<string, string>;
18
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
19
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
20
20
  createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
21
21
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
22
22
  }>>;
@@ -9,8 +9,8 @@ const s = new sapphire_core_1.Sapphire();
9
9
  * é criado antes de existir um "autor" para referenciar.
10
10
  */
11
11
  exports.auditSchema = s.object({
12
- createdAt: s.string(),
13
- updatedAt: s.string(),
12
+ createdAt: s.date(),
13
+ updatedAt: s.date(),
14
14
  createdBy: s.string().optional(),
15
15
  updatedBy: s.string().optional(),
16
16
  });