mintly-lib 2.10.0-preview → 2.11.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.
- package/build/clients/restaurant-client.d.ts +14 -3
- package/build/clients/restaurant-client.d.ts.map +1 -1
- package/build/clients/restaurant-client.js +18 -2
- package/build/clients/restaurant-client.js.map +1 -1
- package/build/core/data/financial/financial-category-schema.d.ts +408 -7
- package/build/core/data/financial/financial-category-schema.d.ts.map +1 -1
- package/build/core/data/financial/financial-category-schema.js +34 -3
- package/build/core/data/financial/financial-category-schema.js.map +1 -1
- package/build/core/data/financial/index.d.ts +2 -2
- package/build/core/data/financial/index.d.ts.map +1 -1
- package/build/core/data/financial/index.js +2 -1
- package/build/core/data/financial/index.js.map +1 -1
- package/build/core/data/restaurant/index.d.ts +2 -1
- package/build/core/data/restaurant/index.d.ts.map +1 -1
- package/build/core/data/restaurant/index.js +18 -1
- package/build/core/data/restaurant/index.js.map +1 -1
- package/build/core/data/restaurant/restaurant-schema.d.ts +22 -0
- package/build/core/data/restaurant/restaurant-schema.d.ts.map +1 -1
- package/build/core/data/restaurant/restaurant-schema.js +18 -1
- package/build/core/data/restaurant/restaurant-schema.js.map +1 -1
- package/build/core/data/restaurant/restaurant-tax.d.ts +64 -0
- package/build/core/data/restaurant/restaurant-tax.d.ts.map +1 -0
- package/build/core/data/restaurant/restaurant-tax.js +3 -0
- package/build/core/data/restaurant/restaurant-tax.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResponseDto } from '../core';
|
|
2
|
+
import type { Headers } from '../core/data/request/headers';
|
|
2
3
|
import type { Restaurant } from '../core/data/restaurant/restaurant-entity';
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import type { RestaurantProfileQuery, RestaurantProfileResponse, RestaurantUpdateRequest } from '../core/data/restaurant/restaurant-tax';
|
|
5
|
+
/**
|
|
6
|
+
* Restaurante do usuário autenticado (fatia 3). COMPÕE o HttpBaseClient (A10):
|
|
7
|
+
* antes estendia o CRUD genérico de /restaurants, mas essas rotas nunca
|
|
8
|
+
* existiram — todo método dava 404. O restaurante vem do token, por isso `/me`.
|
|
9
|
+
*/
|
|
10
|
+
export declare class RestaurantClient {
|
|
11
|
+
private readonly http;
|
|
12
|
+
/** Restaurante + perfil tributário do mês (padrão: mês corrente). */
|
|
13
|
+
me(query: RestaurantProfileQuery, headers: Headers): Promise<ResponseDto<RestaurantProfileResponse>>;
|
|
14
|
+
/** Atualiza nome e/ou regime tributário. */
|
|
15
|
+
updateMe(body: RestaurantUpdateRequest, headers: Headers): Promise<ResponseDto<Restaurant>>;
|
|
5
16
|
}
|
|
6
17
|
//# sourceMappingURL=restaurant-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restaurant-client.d.ts","sourceRoot":"","sources":["../../src/clients/restaurant-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"restaurant-client.d.ts","sourceRoot":"","sources":["../../src/clients/restaurant-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,SAAS,CAAA;AAElD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2CAA2C,CAAA;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAA;AAExI;;;;GAIG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgD;IAErE,qEAAqE;IAC/D,EAAE,CAAE,KAAK,EAAE,sBAAsB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC;IAK3G,4CAA4C;IACtC,QAAQ,CAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;CAInG"}
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RestaurantClient = void 0;
|
|
4
|
+
const core_1 = require("../core");
|
|
4
5
|
const http_base_client_1 = require("../core/client/http-base-client");
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Restaurante do usuário autenticado (fatia 3). COMPÕE o HttpBaseClient (A10):
|
|
8
|
+
* antes estendia o CRUD genérico de /restaurants, mas essas rotas nunca
|
|
9
|
+
* existiram — todo método dava 404. O restaurante vem do token, por isso `/me`.
|
|
10
|
+
*/
|
|
11
|
+
class RestaurantClient {
|
|
6
12
|
constructor() {
|
|
7
|
-
|
|
13
|
+
this.http = new http_base_client_1.HttpBaseClient('restaurants');
|
|
14
|
+
}
|
|
15
|
+
/** Restaurante + perfil tributário do mês (padrão: mês corrente). */
|
|
16
|
+
async me(query, headers) {
|
|
17
|
+
const response = await this.http.connection.get('/me', (0, core_1.withHeaders)(headers, { params: query }));
|
|
18
|
+
return response.data;
|
|
19
|
+
}
|
|
20
|
+
/** Atualiza nome e/ou regime tributário. */
|
|
21
|
+
async updateMe(body, headers) {
|
|
22
|
+
const response = await this.http.connection.patch('/me', body, (0, core_1.withHeaders)(headers));
|
|
23
|
+
return response.data;
|
|
8
24
|
}
|
|
9
25
|
}
|
|
10
26
|
exports.RestaurantClient = RestaurantClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restaurant-client.js","sourceRoot":"","sources":["../../src/clients/restaurant-client.ts"],"names":[],"mappings":";;;AAAA,sEAAgE;
|
|
1
|
+
{"version":3,"file":"restaurant-client.js","sourceRoot":"","sources":["../../src/clients/restaurant-client.ts"],"names":[],"mappings":";;;AAAA,kCAAkD;AAClD,sEAAgE;AAKhE;;;;GAIG;AACH,MAAa,gBAAgB;IAA7B;QACmB,SAAI,GAAG,IAAI,iCAAc,CAAa,aAAa,CAAC,CAAA;IAavE,CAAC;IAXC,qEAAqE;IACrE,KAAK,CAAC,EAAE,CAAE,KAA6B,EAAE,OAAgB;QACvD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAyC,KAAK,EAAE,IAAA,kBAAW,EAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;QACvI,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,4CAA4C;IAC5C,KAAK,CAAC,QAAQ,CAAE,IAA6B,EAAE,OAAgB;QAC7D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAA0B,KAAK,EAAE,IAAI,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAC7G,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AAdD,4CAcC"}
|
|
@@ -5,16 +5,31 @@ export declare enum CategoryType {
|
|
|
5
5
|
}
|
|
6
6
|
export declare enum CategoryBehavior {
|
|
7
7
|
Fixed = "fixed",
|
|
8
|
-
Variable = "variable"
|
|
8
|
+
Variable = "variable",
|
|
9
|
+
/** Parte fixa, parte variável (ex.: utilidades). No ponto de equilíbrio: N8, fatia 4. */
|
|
10
|
+
Mixed = "mixed"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Classificação contábil da DESPESA no DRE (M2). Só existe em categoria de
|
|
14
|
+
* despesa — por isso a união discriminada por `type` abaixo.
|
|
15
|
+
* - cmv: ingredientes e insumos (margem bruta)
|
|
16
|
+
* - labor: pró-labore e salários (prime cost)
|
|
17
|
+
* - tax: imposto — sai da despesa operacional; o DRE deduz pela alíquota (M5)
|
|
18
|
+
* - opex: demais despesas operacionais
|
|
19
|
+
*/
|
|
20
|
+
export declare enum DreGroup {
|
|
21
|
+
Cmv = "cmv",
|
|
22
|
+
Labor = "labor",
|
|
23
|
+
Tax = "tax",
|
|
24
|
+
Opex = "opex"
|
|
9
25
|
}
|
|
10
26
|
export declare enum OperationalNature {
|
|
11
27
|
Operational = "operational",
|
|
12
28
|
NonOperational = "nonOperational"
|
|
13
29
|
}
|
|
14
|
-
export declare const financialCategorySchema: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
30
|
+
export declare const financialCategorySchema: import("@ascendance-hub/sapphire-core").UnionField<(import("@ascendance-hub/sapphire-core").ObjectField<Omit<{
|
|
15
31
|
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
16
32
|
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
17
|
-
type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType, CategoryType>;
|
|
18
33
|
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
19
34
|
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
20
35
|
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
@@ -63,10 +78,11 @@ export declare const financialCategorySchema: import("@ascendance-hub/sapphire-c
|
|
|
63
78
|
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
64
79
|
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
65
80
|
}>>;
|
|
66
|
-
},
|
|
81
|
+
}, "type"> & {
|
|
82
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Revenue, CategoryType.Revenue, CategoryType.Revenue>;
|
|
83
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<Omit<{
|
|
67
84
|
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
68
85
|
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
69
|
-
type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType, CategoryType>;
|
|
70
86
|
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
71
87
|
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
72
88
|
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
@@ -115,10 +131,386 @@ export declare const financialCategorySchema: import("@ascendance-hub/sapphire-c
|
|
|
115
131
|
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
116
132
|
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
117
133
|
}>>;
|
|
118
|
-
}
|
|
134
|
+
}, "type"> & {
|
|
135
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Revenue, CategoryType.Revenue, CategoryType.Revenue>;
|
|
136
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<Omit<{
|
|
137
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
138
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
139
|
+
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
140
|
+
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
141
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
142
|
+
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
|
|
143
|
+
usage: import("@ascendance-hub/sapphire-core").NumberField<number, number | undefined>;
|
|
144
|
+
lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
145
|
+
history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
146
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
147
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
148
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
149
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
150
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
151
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
152
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
153
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
154
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
155
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
156
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
157
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
158
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
159
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
160
|
+
}>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
161
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
162
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
163
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
164
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
165
|
+
}>[], import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
166
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
167
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
168
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
169
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
170
|
+
}>[] | undefined>;
|
|
171
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
172
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
173
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
174
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
175
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
176
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
177
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
178
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
179
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
180
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
181
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
182
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
183
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
184
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
185
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
186
|
+
}>>;
|
|
187
|
+
}, "type"> & {
|
|
188
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Revenue, CategoryType.Revenue, CategoryType.Revenue>;
|
|
189
|
+
}>> | import("@ascendance-hub/sapphire-core").ObjectField<Omit<{
|
|
190
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
191
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
192
|
+
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
193
|
+
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
194
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
195
|
+
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
|
|
196
|
+
usage: import("@ascendance-hub/sapphire-core").NumberField<number, number | undefined>;
|
|
197
|
+
lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
198
|
+
history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
199
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
200
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
201
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
202
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
203
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
204
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
205
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
206
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
207
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
208
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
209
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
210
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
211
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
212
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
213
|
+
}>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
214
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
215
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
216
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
217
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
218
|
+
}>[], import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
219
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
220
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
221
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
222
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
223
|
+
}>[] | undefined>;
|
|
224
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
225
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
226
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
227
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
228
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
229
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
230
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
231
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
232
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
233
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
234
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
235
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
236
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
237
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
238
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
239
|
+
}>>;
|
|
240
|
+
}, "type" | "dreGroup"> & {
|
|
241
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Expense, CategoryType.Expense, CategoryType.Expense>;
|
|
242
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup, DreGroup>;
|
|
243
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<Omit<{
|
|
244
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
245
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
246
|
+
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
247
|
+
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
248
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
249
|
+
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
|
|
250
|
+
usage: import("@ascendance-hub/sapphire-core").NumberField<number, number | undefined>;
|
|
251
|
+
lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
252
|
+
history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
253
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
254
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
255
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
256
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
257
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
258
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
259
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
260
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
261
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
262
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
263
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
264
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
265
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
266
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
267
|
+
}>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
268
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
269
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
270
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
271
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
272
|
+
}>[], import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
273
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
274
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
275
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
276
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
277
|
+
}>[] | undefined>;
|
|
278
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
279
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
280
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
281
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
282
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
283
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
284
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
285
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
286
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
287
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
288
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
289
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
290
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
291
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
292
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
293
|
+
}>>;
|
|
294
|
+
}, "type" | "dreGroup"> & {
|
|
295
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Expense, CategoryType.Expense, CategoryType.Expense>;
|
|
296
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup, DreGroup>;
|
|
297
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<Omit<{
|
|
298
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
299
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
300
|
+
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
301
|
+
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
302
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
303
|
+
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
|
|
304
|
+
usage: import("@ascendance-hub/sapphire-core").NumberField<number, number | undefined>;
|
|
305
|
+
lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
306
|
+
history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
307
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
308
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
309
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
310
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
311
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
312
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
313
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
314
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
315
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
316
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
317
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
318
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
319
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
320
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
321
|
+
}>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
322
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
323
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
324
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
325
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
326
|
+
}>[], import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
327
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
328
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
329
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
330
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
331
|
+
}>[] | undefined>;
|
|
332
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
333
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
334
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
335
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
336
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
337
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
338
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
339
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
340
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
341
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
342
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
343
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
344
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
345
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
346
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
347
|
+
}>>;
|
|
348
|
+
}, "type" | "dreGroup"> & {
|
|
349
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Expense, CategoryType.Expense, CategoryType.Expense>;
|
|
350
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup, DreGroup>;
|
|
351
|
+
}>>)[], import("@ascendance-hub/sapphire-core").ObjectOutput<Omit<{
|
|
352
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
353
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
354
|
+
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
355
|
+
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
356
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
357
|
+
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
|
|
358
|
+
usage: import("@ascendance-hub/sapphire-core").NumberField<number, number | undefined>;
|
|
359
|
+
lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
360
|
+
history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
361
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
362
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
363
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
364
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
365
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
366
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
367
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
368
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
369
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
370
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
371
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
372
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
373
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
374
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
375
|
+
}>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
376
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
377
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
378
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
379
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
380
|
+
}>[], import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
381
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
382
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
383
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
384
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
385
|
+
}>[] | undefined>;
|
|
386
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
387
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
388
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
389
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
390
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
391
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
392
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
393
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
394
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
395
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
396
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
397
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
398
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
399
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
400
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
401
|
+
}>>;
|
|
402
|
+
}, "type"> & {
|
|
403
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Revenue, CategoryType.Revenue, CategoryType.Revenue>;
|
|
404
|
+
}> | import("@ascendance-hub/sapphire-core").ObjectOutput<Omit<{
|
|
405
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
406
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
407
|
+
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
408
|
+
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
409
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
410
|
+
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
|
|
411
|
+
usage: import("@ascendance-hub/sapphire-core").NumberField<number, number | undefined>;
|
|
412
|
+
lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
413
|
+
history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
414
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
415
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
416
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
417
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
418
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
419
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
420
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
421
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
422
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
423
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
424
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
425
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
426
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
427
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
428
|
+
}>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
429
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
430
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
431
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
432
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
433
|
+
}>[], import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
434
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
435
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
436
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
437
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
438
|
+
}>[] | undefined>;
|
|
439
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
440
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
441
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
442
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
443
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
444
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
445
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
446
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
447
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
448
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
449
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
450
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
451
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
452
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
453
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
454
|
+
}>>;
|
|
455
|
+
}, "type" | "dreGroup"> & {
|
|
456
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Expense, CategoryType.Expense, CategoryType.Expense>;
|
|
457
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup, DreGroup>;
|
|
458
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<Omit<{
|
|
459
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
460
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
461
|
+
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
462
|
+
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
463
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
464
|
+
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean, boolean>;
|
|
465
|
+
usage: import("@ascendance-hub/sapphire-core").NumberField<number, number | undefined>;
|
|
466
|
+
lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
467
|
+
history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
468
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
469
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
470
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
471
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
472
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
473
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
474
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
475
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
476
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
477
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
478
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
479
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
480
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
481
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
482
|
+
}>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
483
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
484
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
485
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
486
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
487
|
+
}>[], import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
488
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
489
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
490
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
491
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
492
|
+
}>[] | undefined>;
|
|
493
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
494
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
495
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
496
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
497
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
498
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
499
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
500
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
501
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
502
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
503
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
504
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
505
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
506
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
507
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
508
|
+
}>>;
|
|
509
|
+
}, "type"> & {
|
|
510
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Revenue, CategoryType.Revenue, CategoryType.Revenue>;
|
|
511
|
+
}> | import("@ascendance-hub/sapphire-core").ObjectInput<Omit<{
|
|
119
512
|
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
120
513
|
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
121
|
-
type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType, CategoryType>;
|
|
122
514
|
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
123
515
|
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
124
516
|
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
@@ -167,6 +559,9 @@ export declare const financialCategorySchema: import("@ascendance-hub/sapphire-c
|
|
|
167
559
|
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
168
560
|
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
169
561
|
}>>;
|
|
562
|
+
}, "type" | "dreGroup"> & {
|
|
563
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Expense, CategoryType.Expense, CategoryType.Expense>;
|
|
564
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup, DreGroup>;
|
|
170
565
|
}>>;
|
|
171
566
|
export declare const financialCategoryUpdateSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
172
567
|
name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
@@ -174,18 +569,21 @@ export declare const financialCategoryUpdateSchema: import("@ascendance-hub/sapp
|
|
|
174
569
|
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior | undefined, CategoryBehavior | undefined>;
|
|
175
570
|
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature | undefined, OperationalNature | undefined>;
|
|
176
571
|
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus | undefined, RecordStatus | undefined>;
|
|
572
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup | undefined, DreGroup | undefined>;
|
|
177
573
|
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
178
574
|
name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
179
575
|
type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType | undefined, CategoryType | undefined>;
|
|
180
576
|
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior | undefined, CategoryBehavior | undefined>;
|
|
181
577
|
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature | undefined, OperationalNature | undefined>;
|
|
182
578
|
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus | undefined, RecordStatus | undefined>;
|
|
579
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup | undefined, DreGroup | undefined>;
|
|
183
580
|
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
184
581
|
name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
185
582
|
type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType | undefined, CategoryType | undefined>;
|
|
186
583
|
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior | undefined, CategoryBehavior | undefined>;
|
|
187
584
|
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature | undefined, OperationalNature | undefined>;
|
|
188
585
|
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus | undefined, RecordStatus | undefined>;
|
|
586
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup | undefined, DreGroup | undefined>;
|
|
189
587
|
}>>;
|
|
190
588
|
export declare const financialCategoryInsertSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
191
589
|
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
@@ -193,6 +591,7 @@ export declare const financialCategoryInsertSchema: import("@ascendance-hub/sapp
|
|
|
193
591
|
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
194
592
|
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
195
593
|
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
594
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup | undefined, DreGroup | undefined>;
|
|
196
595
|
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
197
596
|
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
|
|
198
597
|
usage: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
@@ -245,6 +644,7 @@ export declare const financialCategoryInsertSchema: import("@ascendance-hub/sapp
|
|
|
245
644
|
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
246
645
|
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
247
646
|
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
647
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup | undefined, DreGroup | undefined>;
|
|
248
648
|
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
249
649
|
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
|
|
250
650
|
usage: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
@@ -297,6 +697,7 @@ export declare const financialCategoryInsertSchema: import("@ascendance-hub/sapp
|
|
|
297
697
|
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
298
698
|
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
299
699
|
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
700
|
+
dreGroup: import("@ascendance-hub/sapphire-core").EnumField<DreGroup, DreGroup | undefined, DreGroup | undefined>;
|
|
300
701
|
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
301
702
|
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
|
|
302
703
|
usage: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
@@ -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;
|
|
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;IACrB,yFAAyF;IACzF,KAAK,UAAU;CAChB;AAED;;;;;;;GAOG;AACH,oBAAY,QAAQ;IAClB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,oBAAY,iBAAiB;IAC3B,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;CAClC;AAoCD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAiE,CAAA;AAMrG,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;GAQ9B,CAAA;AAQZ,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqBxC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.financialCategoryInsertSchema = exports.financialCategoryUpdateSchema = exports.financialCategorySchema = exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = void 0;
|
|
3
|
+
exports.financialCategoryInsertSchema = exports.financialCategoryUpdateSchema = exports.financialCategorySchema = exports.OperationalNature = exports.DreGroup = 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");
|
|
@@ -14,16 +14,32 @@ var CategoryBehavior;
|
|
|
14
14
|
(function (CategoryBehavior) {
|
|
15
15
|
CategoryBehavior["Fixed"] = "fixed";
|
|
16
16
|
CategoryBehavior["Variable"] = "variable";
|
|
17
|
+
/** Parte fixa, parte variável (ex.: utilidades). No ponto de equilíbrio: N8, fatia 4. */
|
|
18
|
+
CategoryBehavior["Mixed"] = "mixed";
|
|
17
19
|
})(CategoryBehavior || (exports.CategoryBehavior = CategoryBehavior = {}));
|
|
20
|
+
/**
|
|
21
|
+
* Classificação contábil da DESPESA no DRE (M2). Só existe em categoria de
|
|
22
|
+
* despesa — por isso a união discriminada por `type` abaixo.
|
|
23
|
+
* - cmv: ingredientes e insumos (margem bruta)
|
|
24
|
+
* - labor: pró-labore e salários (prime cost)
|
|
25
|
+
* - tax: imposto — sai da despesa operacional; o DRE deduz pela alíquota (M5)
|
|
26
|
+
* - opex: demais despesas operacionais
|
|
27
|
+
*/
|
|
28
|
+
var DreGroup;
|
|
29
|
+
(function (DreGroup) {
|
|
30
|
+
DreGroup["Cmv"] = "cmv";
|
|
31
|
+
DreGroup["Labor"] = "labor";
|
|
32
|
+
DreGroup["Tax"] = "tax";
|
|
33
|
+
DreGroup["Opex"] = "opex";
|
|
34
|
+
})(DreGroup || (exports.DreGroup = DreGroup = {}));
|
|
18
35
|
var OperationalNature;
|
|
19
36
|
(function (OperationalNature) {
|
|
20
37
|
OperationalNature["Operational"] = "operational";
|
|
21
38
|
OperationalNature["NonOperational"] = "nonOperational";
|
|
22
39
|
})(OperationalNature || (exports.OperationalNature = OperationalNature = {}));
|
|
23
|
-
|
|
40
|
+
const baseCategorySchema = s.object({
|
|
24
41
|
restaurantId: s.string(),
|
|
25
42
|
name: s.string(),
|
|
26
|
-
type: s.type().enum(CategoryType),
|
|
27
43
|
behavior: s.type().enum(CategoryBehavior),
|
|
28
44
|
operationalNature: s.type().enum(OperationalNature),
|
|
29
45
|
status: s.type().enum(status_1.RecordStatus),
|
|
@@ -40,6 +56,17 @@ exports.financialCategorySchema = s.object({
|
|
|
40
56
|
})).default([]),
|
|
41
57
|
audit: audit_1.auditSchema,
|
|
42
58
|
});
|
|
59
|
+
// União discriminada por `type` (mesmo recurso do financialAccountSchema): só
|
|
60
|
+
// despesa tem dreGroup, e nela ele é obrigatório. O Sapphire não tem `refine`,
|
|
61
|
+
// então é assim que a coerência tipo × grupo fica no contrato.
|
|
62
|
+
const revenueCategorySchema = baseCategorySchema.extend({
|
|
63
|
+
type: s.type().literal(CategoryType.Revenue),
|
|
64
|
+
});
|
|
65
|
+
const expenseCategorySchema = baseCategorySchema.extend({
|
|
66
|
+
type: s.type().literal(CategoryType.Expense),
|
|
67
|
+
dreGroup: s.type().enum(DreGroup),
|
|
68
|
+
});
|
|
69
|
+
exports.financialCategorySchema = s.type().union([revenueCategorySchema, expenseCategorySchema]);
|
|
43
70
|
// Campos editáveis via PATCH — mesmo padrão do financialAccountUpdateSchema:
|
|
44
71
|
// objeto achatado + .partial(). restaurantId, isSystem, usage, lastUsedAt,
|
|
45
72
|
// history e audit ficam de fora de propósito (protegidos/computados pelo
|
|
@@ -50,6 +77,8 @@ exports.financialCategoryUpdateSchema = s.object({
|
|
|
50
77
|
behavior: s.type().enum(CategoryBehavior),
|
|
51
78
|
operationalNature: s.type().enum(OperationalNature),
|
|
52
79
|
status: s.type().enum(status_1.RecordStatus),
|
|
80
|
+
// a coerência com o tipo GRAVADO é validada na API (category-rules)
|
|
81
|
+
dreGroup: s.type().enum(DreGroup),
|
|
53
82
|
}).partial();
|
|
54
83
|
// Schema de INSERT (POST /financial-categories). Diferente do schema completo
|
|
55
84
|
// (entity), os campos que o servidor computa/força ficam OPCIONAIS — assim o
|
|
@@ -63,6 +92,8 @@ exports.financialCategoryInsertSchema = s.object({
|
|
|
63
92
|
behavior: s.type().enum(CategoryBehavior),
|
|
64
93
|
operationalNature: s.type().enum(OperationalNature),
|
|
65
94
|
status: s.type().enum(status_1.RecordStatus),
|
|
95
|
+
// opcional: a API completa com 'opex' em despesa e recusa em receita
|
|
96
|
+
dreGroup: s.type().enum(DreGroup).optional(),
|
|
66
97
|
restaurantId: s.string().optional(),
|
|
67
98
|
isSystem: s.boolean().optional(),
|
|
68
99
|
usage: s.number().int().optional(),
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"financial-category-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-category-schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,9 +3,9 @@ export { financialAccountSchema, financialAccountInsertSchema, FinancialAccountT
|
|
|
3
3
|
export { financialAccountUpdateSchema } from './financial-account-schema';
|
|
4
4
|
export type { FinancialAccountActionResult, InactivateFinancialAccountRequest } from './financial-account-response';
|
|
5
5
|
export { FinancialCategory } from './financial-category-entity';
|
|
6
|
-
export { financialCategorySchema, financialCategoryInsertSchema, financialCategoryUpdateSchema, CategoryType, CategoryBehavior, OperationalNature, } from './financial-category-schema';
|
|
6
|
+
export { financialCategorySchema, financialCategoryInsertSchema, financialCategoryUpdateSchema, CategoryType, CategoryBehavior, OperationalNature, DreGroup, } from './financial-category-schema';
|
|
7
7
|
export type { FinancialCategoryActionResult } from './financial-category-response';
|
|
8
8
|
export { FinancialMovement } from './financial-movement-entity';
|
|
9
9
|
export { financialMovementSchema, registerMovementSchema, updateMovementSchema, changeMovementStatusSchema, recomputeBalancesSchema, MovementDirection, MovementStatus, MovementStatusSource, PaymentMethod, MovementOrigin, CounterpartyKind, } from './financial-movement-schema';
|
|
10
|
-
export type { RegisterMovementRequest, UpdateMovementRequest, MovementListQuery, MovementCounterpartyInput, FinancialMovementActionResult, } from './financial-movement-response';
|
|
10
|
+
export type { RegisterMovementRequest, UpdateMovementRequest, MovementListQuery, MovementCounterpartyInput, FinancialMovementActionResult, ChangeMovementStatusRequest, } from './financial-movement-response';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACvH,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;AACzE,YAAY,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAA;AAEnH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACvH,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;AACzE,YAAY,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAA;AAEnH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,GACT,MAAM,6BAA6B,CAAA;AACpC,YAAY,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAA;AAElF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,gBAAgB,GACjB,MAAM,6BAA6B,CAAA;AACpC,YAAY,EACV,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,EAC7B,2BAA2B,GAC5B,MAAM,+BAA+B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CounterpartyKind = exports.MovementOrigin = exports.PaymentMethod = exports.MovementStatusSource = exports.MovementStatus = exports.MovementDirection = exports.recomputeBalancesSchema = exports.changeMovementStatusSchema = exports.updateMovementSchema = exports.registerMovementSchema = exports.financialMovementSchema = exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = exports.financialCategoryUpdateSchema = exports.financialCategoryInsertSchema = exports.financialCategorySchema = exports.financialAccountUpdateSchema = exports.FinancialAccountType = exports.financialAccountInsertSchema = exports.financialAccountSchema = void 0;
|
|
3
|
+
exports.CounterpartyKind = exports.MovementOrigin = exports.PaymentMethod = exports.MovementStatusSource = exports.MovementStatus = exports.MovementDirection = exports.recomputeBalancesSchema = exports.changeMovementStatusSchema = exports.updateMovementSchema = exports.registerMovementSchema = exports.financialMovementSchema = exports.DreGroup = exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = exports.financialCategoryUpdateSchema = exports.financialCategoryInsertSchema = exports.financialCategorySchema = exports.financialAccountUpdateSchema = exports.FinancialAccountType = exports.financialAccountInsertSchema = exports.financialAccountSchema = void 0;
|
|
4
4
|
var financial_account_schema_1 = require("./financial-account-schema");
|
|
5
5
|
Object.defineProperty(exports, "financialAccountSchema", { enumerable: true, get: function () { return financial_account_schema_1.financialAccountSchema; } });
|
|
6
6
|
Object.defineProperty(exports, "financialAccountInsertSchema", { enumerable: true, get: function () { return financial_account_schema_1.financialAccountInsertSchema; } });
|
|
@@ -14,6 +14,7 @@ Object.defineProperty(exports, "financialCategoryUpdateSchema", { enumerable: tr
|
|
|
14
14
|
Object.defineProperty(exports, "CategoryType", { enumerable: true, get: function () { return financial_category_schema_1.CategoryType; } });
|
|
15
15
|
Object.defineProperty(exports, "CategoryBehavior", { enumerable: true, get: function () { return financial_category_schema_1.CategoryBehavior; } });
|
|
16
16
|
Object.defineProperty(exports, "OperationalNature", { enumerable: true, get: function () { return financial_category_schema_1.OperationalNature; } });
|
|
17
|
+
Object.defineProperty(exports, "DreGroup", { enumerable: true, get: function () { return financial_category_schema_1.DreGroup; } });
|
|
17
18
|
var financial_movement_schema_1 = require("./financial-movement-schema");
|
|
18
19
|
Object.defineProperty(exports, "financialMovementSchema", { enumerable: true, get: function () { return financial_movement_schema_1.financialMovementSchema; } });
|
|
19
20
|
Object.defineProperty(exports, "registerMovementSchema", { enumerable: true, get: function () { return financial_movement_schema_1.registerMovementSchema; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":";;;AACA,uEAAuH;AAA9G,kIAAA,sBAAsB,OAAA;AAAE,wIAAA,4BAA4B,OAAA;AAAE,gIAAA,oBAAoB,OAAA;AACnF,uEAAyE;AAAhE,wIAAA,4BAA4B,OAAA;AAIrC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":";;;AACA,uEAAuH;AAA9G,kIAAA,sBAAsB,OAAA;AAAE,wIAAA,4BAA4B,OAAA;AAAE,gIAAA,oBAAoB,OAAA;AACnF,uEAAyE;AAAhE,wIAAA,4BAA4B,OAAA;AAIrC,yEAQoC;AAPlC,oIAAA,uBAAuB,OAAA;AACvB,0IAAA,6BAA6B,OAAA;AAC7B,0IAAA,6BAA6B,OAAA;AAC7B,yHAAA,YAAY,OAAA;AACZ,6HAAA,gBAAgB,OAAA;AAChB,8HAAA,iBAAiB,OAAA;AACjB,qHAAA,QAAQ,OAAA;AAKV,yEAYoC;AAXlC,oIAAA,uBAAuB,OAAA;AACvB,mIAAA,sBAAsB,OAAA;AACtB,iIAAA,oBAAoB,OAAA;AACpB,uIAAA,0BAA0B,OAAA;AAC1B,oIAAA,uBAAuB,OAAA;AACvB,8HAAA,iBAAiB,OAAA;AACjB,2HAAA,cAAc,OAAA;AACd,iIAAA,oBAAoB,OAAA;AACpB,0HAAA,aAAa,OAAA;AACb,2HAAA,cAAc,OAAA;AACd,6HAAA,gBAAgB,OAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { Restaurant } from './restaurant-entity';
|
|
2
|
-
export { restaurantSchema } from './restaurant-schema';
|
|
2
|
+
export { restaurantSchema, restaurantUpdateSchema, TaxRegime } from './restaurant-schema';
|
|
3
|
+
export * from './restaurant-tax';
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/data/restaurant/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/data/restaurant/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACzF,cAAc,kBAAkB,CAAA"}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.restaurantSchema = void 0;
|
|
17
|
+
exports.TaxRegime = exports.restaurantUpdateSchema = exports.restaurantSchema = void 0;
|
|
4
18
|
var restaurant_schema_1 = require("./restaurant-schema");
|
|
5
19
|
Object.defineProperty(exports, "restaurantSchema", { enumerable: true, get: function () { return restaurant_schema_1.restaurantSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "restaurantUpdateSchema", { enumerable: true, get: function () { return restaurant_schema_1.restaurantUpdateSchema; } });
|
|
21
|
+
Object.defineProperty(exports, "TaxRegime", { enumerable: true, get: function () { return restaurant_schema_1.TaxRegime; } });
|
|
22
|
+
__exportStar(require("./restaurant-tax"), exports);
|
|
6
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/data/restaurant/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/data/restaurant/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,yDAAyF;AAAhF,qHAAA,gBAAgB,OAAA;AAAE,2HAAA,sBAAsB,OAAA;AAAE,8GAAA,SAAS,OAAA;AAC5D,mDAAgC"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Regime tributário (M5 / MIN-23). Decide o caminho do cálculo: MEI paga DAS
|
|
3
|
+
* fixo; Simples Nacional Anexo I paga alíquota efetiva sobre a receita.
|
|
4
|
+
* Ausente = "não configurado" (o imposto sai 0 com aviso).
|
|
5
|
+
*/
|
|
6
|
+
export declare enum TaxRegime {
|
|
7
|
+
Mei = "mei",
|
|
8
|
+
SimplesNacionalAnexoI = "simplesNacionalAnexoI"
|
|
9
|
+
}
|
|
1
10
|
export declare const restaurantSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
2
11
|
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
12
|
+
taxRegime: import("@ascendance-hub/sapphire-core").EnumField<TaxRegime, TaxRegime | undefined, TaxRegime | undefined>;
|
|
3
13
|
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
4
14
|
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
5
15
|
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
@@ -18,6 +28,7 @@ export declare const restaurantSchema: import("@ascendance-hub/sapphire-core").O
|
|
|
18
28
|
}>>;
|
|
19
29
|
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
20
30
|
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
31
|
+
taxRegime: import("@ascendance-hub/sapphire-core").EnumField<TaxRegime, TaxRegime | undefined, TaxRegime | undefined>;
|
|
21
32
|
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
22
33
|
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
23
34
|
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
@@ -36,6 +47,7 @@ export declare const restaurantSchema: import("@ascendance-hub/sapphire-core").O
|
|
|
36
47
|
}>>;
|
|
37
48
|
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
38
49
|
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
50
|
+
taxRegime: import("@ascendance-hub/sapphire-core").EnumField<TaxRegime, TaxRegime | undefined, TaxRegime | undefined>;
|
|
39
51
|
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
40
52
|
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
41
53
|
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
@@ -53,4 +65,14 @@ export declare const restaurantSchema: import("@ascendance-hub/sapphire-core").O
|
|
|
53
65
|
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
54
66
|
}>>;
|
|
55
67
|
}>>;
|
|
68
|
+
export declare const restaurantUpdateSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
69
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
70
|
+
taxRegime: import("@ascendance-hub/sapphire-core").EnumField<TaxRegime, TaxRegime | undefined, TaxRegime | undefined>;
|
|
71
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
72
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
73
|
+
taxRegime: import("@ascendance-hub/sapphire-core").EnumField<TaxRegime, TaxRegime | undefined, TaxRegime | undefined>;
|
|
74
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
75
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
76
|
+
taxRegime: import("@ascendance-hub/sapphire-core").EnumField<TaxRegime, TaxRegime | undefined, TaxRegime | undefined>;
|
|
77
|
+
}>>;
|
|
56
78
|
//# sourceMappingURL=restaurant-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restaurant-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/restaurant/restaurant-schema.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"restaurant-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/restaurant/restaurant-schema.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,oBAAY,SAAS;IACnB,GAAG,QAAQ;IACX,qBAAqB,0BAA0B;CAChD;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAI3B,CAAA;AAIF,eAAO,MAAM,sBAAsB;;;;;;;;;GAGvB,CAAA"}
|
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.restaurantSchema = void 0;
|
|
3
|
+
exports.restaurantUpdateSchema = exports.restaurantSchema = exports.TaxRegime = void 0;
|
|
4
4
|
const sapphire_core_1 = require("@ascendance-hub/sapphire-core");
|
|
5
5
|
const audit_1 = require("../common/audit");
|
|
6
6
|
const s = new sapphire_core_1.Sapphire();
|
|
7
|
+
/**
|
|
8
|
+
* Regime tributário (M5 / MIN-23). Decide o caminho do cálculo: MEI paga DAS
|
|
9
|
+
* fixo; Simples Nacional Anexo I paga alíquota efetiva sobre a receita.
|
|
10
|
+
* Ausente = "não configurado" (o imposto sai 0 com aviso).
|
|
11
|
+
*/
|
|
12
|
+
var TaxRegime;
|
|
13
|
+
(function (TaxRegime) {
|
|
14
|
+
TaxRegime["Mei"] = "mei";
|
|
15
|
+
TaxRegime["SimplesNacionalAnexoI"] = "simplesNacionalAnexoI";
|
|
16
|
+
})(TaxRegime || (exports.TaxRegime = TaxRegime = {}));
|
|
7
17
|
exports.restaurantSchema = s.object({
|
|
8
18
|
name: s.string(),
|
|
19
|
+
taxRegime: s.type().enum(TaxRegime).optional(),
|
|
9
20
|
audit: audit_1.auditSchema,
|
|
10
21
|
});
|
|
22
|
+
// Corpo do PATCH /restaurants/me. Objeto estrito: audit e qualquer outro campo
|
|
23
|
+
// são rejeitados (mass assignment).
|
|
24
|
+
exports.restaurantUpdateSchema = s.object({
|
|
25
|
+
name: s.string(),
|
|
26
|
+
taxRegime: s.type().enum(TaxRegime),
|
|
27
|
+
}).partial();
|
|
11
28
|
//# sourceMappingURL=restaurant-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restaurant-schema.js","sourceRoot":"","sources":["../../../../src/core/data/restaurant/restaurant-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"restaurant-schema.js","sourceRoot":"","sources":["../../../../src/core/data/restaurant/restaurant-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB;;;;GAIG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,4DAA+C,CAAA;AACjD,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAEY,QAAA,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE;IAC9C,KAAK,EAAE,mBAAW;CACnB,CAAC,CAAA;AAEF,+EAA+E;AAC/E,oCAAoC;AACvB,QAAA,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;CACpC,CAAC,CAAC,OAAO,EAAE,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { TaxRegime } from './restaurant-schema';
|
|
2
|
+
import type { Restaurant } from './restaurant-entity';
|
|
3
|
+
/** Faixa do Anexo I do Simples Nacional (MIN-23). `upTo` inclusivo. */
|
|
4
|
+
export interface TaxBracket {
|
|
5
|
+
index: number;
|
|
6
|
+
upTo: number;
|
|
7
|
+
nominalRate: number;
|
|
8
|
+
deduction: number;
|
|
9
|
+
}
|
|
10
|
+
/** Alertas determinísticos da MIN-23 (sem notificação persistida). */
|
|
11
|
+
export type TaxInsight = {
|
|
12
|
+
kind: 'bracketChanged';
|
|
13
|
+
severity: 'warning';
|
|
14
|
+
fromBracket: number;
|
|
15
|
+
toBracket: number;
|
|
16
|
+
fromRate: number;
|
|
17
|
+
toRate: number;
|
|
18
|
+
rbt12: number;
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'meiCapNear';
|
|
21
|
+
severity: 'warning';
|
|
22
|
+
usedPct: number;
|
|
23
|
+
yearToDateRevenue: number;
|
|
24
|
+
annualLimit: number;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'simplesLimitExceeded';
|
|
27
|
+
severity: 'warning';
|
|
28
|
+
rbt12: number;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'taxRegimeNotConfigured';
|
|
31
|
+
severity: 'info';
|
|
32
|
+
};
|
|
33
|
+
/** Perfil tributário do restaurante num mês. Taxas são frações (0.06728 = 6,728%). */
|
|
34
|
+
export interface RestaurantTaxProfile {
|
|
35
|
+
regime: TaxRegime | null;
|
|
36
|
+
referenceMonth: string;
|
|
37
|
+
rbt12: number;
|
|
38
|
+
monthsOfHistory: number;
|
|
39
|
+
rbt12Proportional: boolean;
|
|
40
|
+
effectiveRate: number | null;
|
|
41
|
+
bracket: TaxBracket | null;
|
|
42
|
+
previousBracketIndex: number | null;
|
|
43
|
+
meiMonthlyDas: number | null;
|
|
44
|
+
meiCap: {
|
|
45
|
+
annualLimit: number;
|
|
46
|
+
yearToDateRevenue: number;
|
|
47
|
+
usedPct: number;
|
|
48
|
+
} | null;
|
|
49
|
+
insights: TaxInsight[];
|
|
50
|
+
}
|
|
51
|
+
/** Query de GET /restaurants/me — `month` em `AAAA-MM`, padrão o mês corrente. */
|
|
52
|
+
export interface RestaurantProfileQuery {
|
|
53
|
+
month?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface RestaurantProfileResponse {
|
|
56
|
+
restaurant: Restaurant;
|
|
57
|
+
tax: RestaurantTaxProfile;
|
|
58
|
+
}
|
|
59
|
+
/** Corpo de PATCH /restaurants/me. */
|
|
60
|
+
export interface RestaurantUpdateRequest {
|
|
61
|
+
name?: string;
|
|
62
|
+
taxRegime?: TaxRegime;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=restaurant-tax.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restaurant-tax.d.ts","sourceRoot":"","sources":["../../../../src/core/data/restaurant/restaurant-tax.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAErD,uEAAuE;AACvE,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,sEAAsE;AACtE,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACxI;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAC5G;IAAE,IAAI,EAAE,sBAAsB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACpE;IAAE,IAAI,EAAE,wBAAwB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAA;AAExD,sFAAsF;AACtF,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAA;IACxB,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,MAAM,CAAA;IACvB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,UAAU,GAAG,IAAI,CAAA;IAC1B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,MAAM,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAClF,QAAQ,EAAE,UAAU,EAAE,CAAA;CACvB;AAED,kFAAkF;AAClF,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,oBAAoB,CAAA;CAC1B;AAED,sCAAsC;AACtC,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restaurant-tax.js","sourceRoot":"","sources":["../../../../src/core/data/restaurant/restaurant-tax.ts"],"names":[],"mappings":""}
|