mintly-lib 2.3.0-preview → 2.5.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 (25) hide show
  1. package/build/clients/financial-account-client.d.ts +7 -0
  2. package/build/clients/financial-account-client.d.ts.map +1 -1
  3. package/build/clients/financial-account-client.js +11 -0
  4. package/build/clients/financial-account-client.js.map +1 -1
  5. package/build/core/data/financial/financial-account-response.d.ts +9 -0
  6. package/build/core/data/financial/financial-account-response.d.ts.map +1 -0
  7. package/build/core/data/financial/financial-account-response.js +3 -0
  8. package/build/core/data/financial/financial-account-response.js.map +1 -0
  9. package/build/core/data/financial/financial-category-schema.d.ts +103 -0
  10. package/build/core/data/financial/financial-category-schema.d.ts.map +1 -1
  11. package/build/core/data/financial/financial-category-schema.js +22 -1
  12. package/build/core/data/financial/financial-category-schema.js.map +1 -1
  13. package/build/core/data/financial/financial-movement-entity.d.ts +5 -0
  14. package/build/core/data/financial/financial-movement-entity.d.ts.map +1 -0
  15. package/build/core/data/financial/financial-movement-entity.js +3 -0
  16. package/build/core/data/financial/financial-movement-entity.js.map +1 -0
  17. package/build/core/data/financial/financial-movement-schema.d.ts +1020 -0
  18. package/build/core/data/financial/financial-movement-schema.d.ts.map +1 -0
  19. package/build/core/data/financial/financial-movement-schema.js +123 -0
  20. package/build/core/data/financial/financial-movement-schema.js.map +1 -0
  21. package/build/core/data/financial/index.d.ts +4 -1
  22. package/build/core/data/financial/index.d.ts.map +1 -1
  23. package/build/core/data/financial/index.js +9 -1
  24. package/build/core/data/financial/index.js.map +1 -1
  25. package/package.json +1 -1
@@ -1,6 +1,13 @@
1
+ import { ResponseDto } from '../core';
1
2
  import { HttpBaseClient } from '../core/client/http-base-client';
3
+ import type { Headers } from '../core/data/request/headers';
2
4
  import type { FinancialAccount } from '../core/data/financial/financial-account-entity';
5
+ import type { FinancialAccountActionResult, InactivateFinancialAccountRequest } from '../core/data/financial/financial-account-response';
3
6
  export declare class FinancialAccountClient extends HttpBaseClient<FinancialAccount> {
4
7
  constructor();
8
+ /** Define a conta como padrão do restaurante (SetDefaultAccountUseCase). Não recebe corpo. */
9
+ defaultUpdate(id: string, headers: Headers): Promise<ResponseDto<FinancialAccountActionResult>>;
10
+ /** Inativa a conta (InactivateAccountUseCase). replacementDefaultId é obrigatório se a conta for a padrão. */
11
+ inactivateUpdate(id: string, body: InactivateFinancialAccountRequest, headers: Headers): Promise<ResponseDto<FinancialAccountActionResult>>;
5
12
  }
6
13
  //# sourceMappingURL=financial-account-client.d.ts.map
@@ -1 +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"}
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;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"}
@@ -1,11 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FinancialAccountClient = void 0;
4
+ const core_1 = require("../core");
4
5
  const http_base_client_1 = require("../core/client/http-base-client");
5
6
  class FinancialAccountClient extends http_base_client_1.HttpBaseClient {
6
7
  constructor() {
7
8
  super('financial-accounts');
8
9
  }
10
+ /** Define a conta como padrão do restaurante (SetDefaultAccountUseCase). Não recebe corpo. */
11
+ async defaultUpdate(id, headers) {
12
+ const response = await this.connection.patch(`/${id}/default`, undefined, (0, core_1.withHeaders)(headers));
13
+ return response.data;
14
+ }
15
+ /** Inativa a conta (InactivateAccountUseCase). replacementDefaultId é obrigatório se a conta for a padrão. */
16
+ async inactivateUpdate(id, body, headers) {
17
+ const response = await this.connection.patch(`/${id}/inactivate`, body, (0, core_1.withHeaders)(headers));
18
+ return response.data;
19
+ }
9
20
  }
10
21
  exports.FinancialAccountClient = FinancialAccountClient;
11
22
  //# sourceMappingURL=financial-account-client.js.map
@@ -1 +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"}
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"}
@@ -0,0 +1,9 @@
1
+ /** Resposta das rotas de ação (default/inactivate) — apenas a mensagem ao usuário. */
2
+ export interface FinancialAccountActionResult {
3
+ message: string;
4
+ }
5
+ /** Corpo de PATCH /financial-accounts/:id/inactivate. Obrigatório só quando a conta-alvo é a padrão. */
6
+ export interface InactivateFinancialAccountRequest {
7
+ replacementDefaultId?: string;
8
+ }
9
+ //# sourceMappingURL=financial-account-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"financial-account-response.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-response.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,wGAAwG;AACxG,MAAM,WAAW,iCAAiC;IAChD,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=financial-account-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"financial-account-response.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-response.ts"],"names":[],"mappings":""}
@@ -19,6 +19,34 @@ export declare const financialCategorySchema: import("@ascendance-hub/sapphire-c
19
19
  operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
20
20
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
21
21
  isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
22
+ usage: import("@ascendance-hub/sapphire-core").NumberField<number, number | undefined>;
23
+ lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
24
+ history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
25
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
26
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
27
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
28
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
29
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
30
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
31
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
32
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
33
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
34
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
35
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
36
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
37
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
38
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
39
+ }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
40
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
41
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
42
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
43
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
44
+ }>[], import("@ascendance-hub/sapphire-core").ObjectInput<{
45
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
46
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
47
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
48
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
49
+ }>[] | undefined>;
22
50
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
23
51
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
24
52
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -43,6 +71,34 @@ export declare const financialCategorySchema: import("@ascendance-hub/sapphire-c
43
71
  operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
44
72
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
45
73
  isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
74
+ usage: import("@ascendance-hub/sapphire-core").NumberField<number, number | undefined>;
75
+ lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
76
+ history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
77
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
78
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
79
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
80
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
81
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
82
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
83
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
84
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
85
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
86
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
87
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
88
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
89
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
90
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
91
+ }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
92
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
93
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
94
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
95
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
96
+ }>[], import("@ascendance-hub/sapphire-core").ObjectInput<{
97
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
98
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
99
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
100
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
101
+ }>[] | undefined>;
46
102
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
47
103
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
48
104
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -67,6 +123,34 @@ export declare const financialCategorySchema: import("@ascendance-hub/sapphire-c
67
123
  operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
68
124
  status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
69
125
  isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
126
+ usage: import("@ascendance-hub/sapphire-core").NumberField<number, number | undefined>;
127
+ lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
128
+ history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
129
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
130
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
131
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
132
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
133
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
134
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
135
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
136
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
137
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
138
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
139
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
140
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
141
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
142
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
143
+ }>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
144
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
145
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
146
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
147
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
148
+ }>[], import("@ascendance-hub/sapphire-core").ObjectInput<{
149
+ at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
150
+ by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
151
+ action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
152
+ detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
153
+ }>[] | undefined>;
70
154
  audit: import("@ascendance-hub/sapphire-core").ObjectField<{
71
155
  createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
72
156
  updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
@@ -84,4 +168,23 @@ export declare const financialCategorySchema: import("@ascendance-hub/sapphire-c
84
168
  updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
85
169
  }>>;
86
170
  }>>;
171
+ export declare const financialCategoryUpdateSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
172
+ name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
173
+ type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType | undefined, CategoryType | undefined>;
174
+ behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior | undefined, CategoryBehavior | undefined>;
175
+ operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature | undefined, OperationalNature | undefined>;
176
+ status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus | undefined, RecordStatus | undefined>;
177
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
178
+ name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
179
+ type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType | undefined, CategoryType | undefined>;
180
+ behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior | undefined, CategoryBehavior | undefined>;
181
+ operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature | undefined, OperationalNature | undefined>;
182
+ status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus | undefined, RecordStatus | undefined>;
183
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
184
+ name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
185
+ type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType | undefined, CategoryType | undefined>;
186
+ behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior | undefined, CategoryBehavior | undefined>;
187
+ operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature | undefined, OperationalNature | undefined>;
188
+ status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus | undefined, RecordStatus | undefined>;
189
+ }>>;
87
190
  //# sourceMappingURL=financial-category-schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"financial-category-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-category-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAK/C,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED,oBAAY,iBAAiB;IAC3B,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;CAClC;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GASlC,CAAA"}
1
+ {"version":3,"file":"financial-category-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-category-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAK/C,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED,oBAAY,iBAAiB;IAC3B,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;CAClC;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqBlC,CAAA;AAMF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;GAM9B,CAAA"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.financialCategorySchema = exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = void 0;
3
+ exports.financialCategoryUpdateSchema = exports.financialCategorySchema = exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = void 0;
4
4
  const sapphire_core_1 = require("@ascendance-hub/sapphire-core");
5
5
  const status_1 = require("../common/status");
6
6
  const audit_1 = require("../common/audit");
@@ -28,6 +28,27 @@ exports.financialCategorySchema = s.object({
28
28
  operationalNature: s.type().enum(OperationalNature),
29
29
  status: s.type().enum(status_1.RecordStatus),
30
30
  isSystem: s.boolean(),
31
+ // Denormalizado p/ SuggestCategoriesQuery (heurística recência+frequência).
32
+ // Mantido pelo RegisterMovementUseCase (MIN-49/50), não editável via CRUD.
33
+ usage: s.number().int().default(0),
34
+ lastUsedAt: s.date().coerce().optional(),
35
+ history: s.array(s.object({
36
+ at: s.date().coerce(),
37
+ by: s.string(),
38
+ action: s.string(),
39
+ detail: s.string().optional(),
40
+ })).default([]),
31
41
  audit: audit_1.auditSchema,
32
42
  });
43
+ // Campos editáveis via PATCH — mesmo padrão do financialAccountUpdateSchema:
44
+ // objeto achatado + .partial(). restaurantId, isSystem, usage, lastUsedAt,
45
+ // history e audit ficam de fora de propósito (protegidos/computados pelo
46
+ // sistema; como o objeto é estrito, enviá-los num PATCH é rejeitado).
47
+ exports.financialCategoryUpdateSchema = s.object({
48
+ name: s.string(),
49
+ type: s.type().enum(CategoryType),
50
+ behavior: s.type().enum(CategoryBehavior),
51
+ operationalNature: s.type().enum(OperationalNature),
52
+ status: s.type().enum(status_1.RecordStatus),
53
+ }).partial();
33
54
  //# sourceMappingURL=financial-category-schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"financial-category-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-category-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,6CAA+C;AAC/C,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;AACrB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;AACnC,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAEY,QAAA,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;IACzC,iBAAiB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,KAAK,EAAE,mBAAW;CACnB,CAAC,CAAA"}
1
+ {"version":3,"file":"financial-category-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-category-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,6CAA+C;AAC/C,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;AACrB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;AACnC,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAEY,QAAA,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;IACzC,iBAAiB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,4EAA4E;IAC5E,2EAA2E;IAC3E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAClC,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;QACrB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC,CACH,CAAC,OAAO,CAAC,EAAE,CAAC;IACb,KAAK,EAAE,mBAAW;CACnB,CAAC,CAAA;AAEF,6EAA6E;AAC7E,2EAA2E;AAC3E,yEAAyE;AACzE,sEAAsE;AACzD,QAAA,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;IACzC,iBAAiB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;CACpC,CAAC,CAAC,OAAO,EAAE,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { Infer } from '@ascendance-hub/sapphire-core';
2
+ import { Entity } from '../api/entity';
3
+ import { financialMovementSchema } from './financial-movement-schema';
4
+ export type FinancialMovement = Infer<typeof financialMovementSchema> & Entity;
5
+ //# sourceMappingURL=financial-movement-entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"financial-movement-entity.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-entity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAErE,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,uBAAuB,CAAC,GAAG,MAAM,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=financial-movement-entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"financial-movement-entity.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-entity.ts"],"names":[],"mappings":""}