mintly-lib 2.19.0-preview → 2.20.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 (35) hide show
  1. package/build/clients/index.d.ts +1 -0
  2. package/build/clients/index.d.ts.map +1 -1
  3. package/build/clients/index.js +3 -1
  4. package/build/clients/index.js.map +1 -1
  5. package/build/clients/menu-item-client.d.ts +30 -0
  6. package/build/clients/menu-item-client.d.ts.map +1 -0
  7. package/build/clients/menu-item-client.js +56 -0
  8. package/build/clients/menu-item-client.js.map +1 -0
  9. package/build/core/client/master-client.d.ts +2 -1
  10. package/build/core/client/master-client.d.ts.map +1 -1
  11. package/build/core/client/master-client.js +1 -0
  12. package/build/core/client/master-client.js.map +1 -1
  13. package/build/core/data/financial/financial-movement-response.d.ts +7 -0
  14. package/build/core/data/financial/financial-movement-response.d.ts.map +1 -1
  15. package/build/core/data/index.d.ts +1 -0
  16. package/build/core/data/index.d.ts.map +1 -1
  17. package/build/core/data/index.js +1 -0
  18. package/build/core/data/index.js.map +1 -1
  19. package/build/core/data/menu/index.d.ts +4 -0
  20. package/build/core/data/menu/index.d.ts.map +1 -0
  21. package/build/core/data/menu/index.js +11 -0
  22. package/build/core/data/menu/index.js.map +1 -0
  23. package/build/core/data/menu/menu-item-entity.d.ts +5 -0
  24. package/build/core/data/menu/menu-item-entity.d.ts.map +1 -0
  25. package/build/core/data/menu/menu-item-entity.js +3 -0
  26. package/build/core/data/menu/menu-item-entity.js.map +1 -0
  27. package/build/core/data/menu/menu-item-response.d.ts +21 -0
  28. package/build/core/data/menu/menu-item-response.d.ts.map +1 -0
  29. package/build/core/data/menu/menu-item-response.js +3 -0
  30. package/build/core/data/menu/menu-item-response.js.map +1 -0
  31. package/build/core/data/menu/menu-item-schema.d.ts +126 -0
  32. package/build/core/data/menu/menu-item-schema.d.ts.map +1 -0
  33. package/build/core/data/menu/menu-item-schema.js +45 -0
  34. package/build/core/data/menu/menu-item-schema.js.map +1 -0
  35. package/package.json +1 -1
@@ -4,6 +4,7 @@ export { RestaurantClient } from './restaurant-client';
4
4
  export { FinancialAccountClient } from './financial-account-client';
5
5
  export { FinancialCategoryClient } from './financial-category-client';
6
6
  export { FinancialMovementClient } from './financial-movement-client';
7
+ export { MenuItemClient } from './menu-item-client';
7
8
  export { ReportClient } from './report-client';
8
9
  export { DashboardClient } from './dashboard-client';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DashboardClient = exports.ReportClient = exports.FinancialMovementClient = exports.FinancialCategoryClient = exports.FinancialAccountClient = exports.RestaurantClient = exports.PersonClient = exports.AuthClient = void 0;
3
+ exports.DashboardClient = exports.ReportClient = exports.MenuItemClient = exports.FinancialMovementClient = exports.FinancialCategoryClient = exports.FinancialAccountClient = exports.RestaurantClient = exports.PersonClient = exports.AuthClient = void 0;
4
4
  var auth_client_1 = require("./auth-client");
5
5
  Object.defineProperty(exports, "AuthClient", { enumerable: true, get: function () { return auth_client_1.AuthClient; } });
6
6
  var person_client_1 = require("./person-client");
@@ -13,6 +13,8 @@ var financial_category_client_1 = require("./financial-category-client");
13
13
  Object.defineProperty(exports, "FinancialCategoryClient", { enumerable: true, get: function () { return financial_category_client_1.FinancialCategoryClient; } });
14
14
  var financial_movement_client_1 = require("./financial-movement-client");
15
15
  Object.defineProperty(exports, "FinancialMovementClient", { enumerable: true, get: function () { return financial_movement_client_1.FinancialMovementClient; } });
16
+ var menu_item_client_1 = require("./menu-item-client");
17
+ Object.defineProperty(exports, "MenuItemClient", { enumerable: true, get: function () { return menu_item_client_1.MenuItemClient; } });
16
18
  var report_client_1 = require("./report-client");
17
19
  Object.defineProperty(exports, "ReportClient", { enumerable: true, get: function () { return report_client_1.ReportClient; } });
18
20
  var dashboard_client_1 = require("./dashboard-client");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAAjC,yGAAA,UAAU,OAAA;AACnB,iDAA8C;AAArC,6GAAA,YAAY,OAAA;AACrB,yDAAsD;AAA7C,qHAAA,gBAAgB,OAAA;AACzB,uEAAmE;AAA1D,kIAAA,sBAAsB,OAAA;AAC/B,yEAAqE;AAA5D,oIAAA,uBAAuB,OAAA;AAChC,yEAAqE;AAA5D,oIAAA,uBAAuB,OAAA;AAChC,iDAA8C;AAArC,6GAAA,YAAY,OAAA;AACrB,uDAAoD;AAA3C,mHAAA,eAAe,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAAjC,yGAAA,UAAU,OAAA;AACnB,iDAA8C;AAArC,6GAAA,YAAY,OAAA;AACrB,yDAAsD;AAA7C,qHAAA,gBAAgB,OAAA;AACzB,uEAAmE;AAA1D,kIAAA,sBAAsB,OAAA;AAC/B,yEAAqE;AAA5D,oIAAA,uBAAuB,OAAA;AAChC,yEAAqE;AAA5D,oIAAA,uBAAuB,OAAA;AAChC,uDAAmD;AAA1C,kHAAA,cAAc,OAAA;AACvB,iDAA8C;AAArC,6GAAA,YAAY,OAAA;AACrB,uDAAoD;AAA3C,mHAAA,eAAe,OAAA"}
@@ -0,0 +1,30 @@
1
+ import { ResponseDto } from '../core';
2
+ import type { Findable, Listable } from '../core/client/base-client';
3
+ import type { FindAllRequestDto } from '../core/data/request/pagination';
4
+ import type { Headers } from '../core/data/request/headers';
5
+ import type { MenuItem } from '../core/data/menu/menu-item-entity';
6
+ import type { MenuItemActionResult, MenuItemInsertRequest, MenuItemPriceAlert, MenuItemUpdateRequest } from '../core/data/menu/menu-item-response';
7
+ /**
8
+ * Cardápio (pratos com preço). A rota /menu-items NÃO expõe GET /:id nem DELETE (só inativação).
9
+ * COMPÕE o HttpBaseClient e re-expõe o subconjunto válido + as ações próprias de preço.
10
+ */
11
+ export declare class MenuItemClient implements Findable<MenuItem>, Listable<MenuItem> {
12
+ private readonly http;
13
+ /** Cadastra um prato. O servidor define status, datas e restaurante. */
14
+ insert(body: MenuItemInsertRequest, headers: Headers): Promise<ResponseDto<MenuItem>>;
15
+ find(filter: Partial<MenuItem>, headers: Headers): Promise<ResponseDto<MenuItem>>;
16
+ findAll(filter: FindAllRequestDto<MenuItem>, headers: Headers): Promise<ResponseDto<MenuItem[]>>;
17
+ /** Edita nome/categoria. Para mudar o preço use `updatePrice`. */
18
+ update(id: string, body: MenuItemUpdateRequest, headers: Headers): Promise<ResponseDto<MenuItem>>;
19
+ /** Muda o preço: atualiza o valor e conta como revisão (silencia o aviso). */
20
+ updatePrice(id: string, price: number, headers: Headers): Promise<ResponseDto<MenuItem>>;
21
+ /** "Não quero mudar": mantém o valor e conta como revisão (silencia o aviso). Não recebe corpo. */
22
+ keepPrice(id: string, headers: Headers): Promise<ResponseDto<MenuItem>>;
23
+ /** Pratos ativos com o preço sem revisão há PRICE_REVIEW_ALERT_DAYS dias ou mais. Read-only. */
24
+ priceAlerts(headers: Headers): Promise<ResponseDto<MenuItemPriceAlert[]>>;
25
+ /** Inativa o prato (some dos novos usos; nada é apagado). Não recebe corpo. */
26
+ inactivateUpdate(id: string, headers: Headers): Promise<ResponseDto<MenuItemActionResult>>;
27
+ /** Reativa o prato. Não recebe corpo. */
28
+ reactivateUpdate(id: string, headers: Headers): Promise<ResponseDto<MenuItemActionResult>>;
29
+ }
30
+ //# sourceMappingURL=menu-item-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-item-client.d.ts","sourceRoot":"","sources":["../../src/clients/menu-item-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAe,MAAM,SAAS,CAAA;AAElD,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,sCAAsC,CAAA;AAE7C;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,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;CAIlG"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MenuItemClient = void 0;
4
+ const core_1 = require("../core");
5
+ const http_base_client_1 = require("../core/client/http-base-client");
6
+ /**
7
+ * Cardápio (pratos com preço). A rota /menu-items NÃO expõe GET /:id nem DELETE (só inativação).
8
+ * COMPÕE o HttpBaseClient e re-expõe o subconjunto válido + as ações próprias de preço.
9
+ */
10
+ class MenuItemClient {
11
+ constructor() {
12
+ this.http = new http_base_client_1.HttpBaseClient('menu-items');
13
+ }
14
+ /** Cadastra um prato. O servidor define status, datas e restaurante. */
15
+ async insert(body, headers) {
16
+ const response = await this.http.connection.post('/', body, (0, core_1.withHeaders)(headers));
17
+ return response.data;
18
+ }
19
+ find(filter, headers) {
20
+ return this.http.find(filter, headers);
21
+ }
22
+ findAll(filter, headers) {
23
+ return this.http.findAll(filter, headers);
24
+ }
25
+ /** Edita nome/categoria. Para mudar o preço use `updatePrice`. */
26
+ update(id, body, headers) {
27
+ return this.http.update(id, body, headers);
28
+ }
29
+ /** Muda o preço: atualiza o valor e conta como revisão (silencia o aviso). */
30
+ async updatePrice(id, price, headers) {
31
+ const response = await this.http.connection.patch(`/${id}/price`, { price }, (0, core_1.withHeaders)(headers));
32
+ return response.data;
33
+ }
34
+ /** "Não quero mudar": mantém o valor e conta como revisão (silencia o aviso). Não recebe corpo. */
35
+ async keepPrice(id, headers) {
36
+ const response = await this.http.connection.post(`/${id}/price-review`, undefined, (0, core_1.withHeaders)(headers));
37
+ return response.data;
38
+ }
39
+ /** Pratos ativos com o preço sem revisão há PRICE_REVIEW_ALERT_DAYS dias ou mais. Read-only. */
40
+ async priceAlerts(headers) {
41
+ const response = await this.http.connection.get('/price-alerts', (0, core_1.withHeaders)(headers));
42
+ return response.data;
43
+ }
44
+ /** Inativa o prato (some dos novos usos; nada é apagado). Não recebe corpo. */
45
+ async inactivateUpdate(id, headers) {
46
+ const response = await this.http.connection.patch(`/${id}/inactivate`, undefined, (0, core_1.withHeaders)(headers));
47
+ return response.data;
48
+ }
49
+ /** Reativa o prato. Não recebe corpo. */
50
+ async reactivateUpdate(id, headers) {
51
+ const response = await this.http.connection.patch(`/${id}/reactivate`, undefined, (0, core_1.withHeaders)(headers));
52
+ return response.data;
53
+ }
54
+ }
55
+ exports.MenuItemClient = MenuItemClient;
56
+ //# sourceMappingURL=menu-item-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-item-client.js","sourceRoot":"","sources":["../../src/clients/menu-item-client.ts"],"names":[],"mappings":";;;AAAA,kCAAkD;AAClD,sEAAgE;AAYhE;;;GAGG;AACH,MAAa,cAAc;IAA3B;QACmB,SAAI,GAAG,IAAI,iCAAc,CAAW,YAAY,CAAC,CAAA;IAkDpE,CAAC;IAhDC,wEAAwE;IACxE,KAAK,CAAC,MAAM,CAAE,IAA2B,EAAE,OAAgB;QACzD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAwB,GAAG,EAAE,IAAI,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QACxG,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;IAED,IAAI,CAAE,MAAyB,EAAE,OAAgB;QAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,CAAC;IAED,OAAO,CAAE,MAAmC,EAAE,OAAgB;QAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC3C,CAAC;IAED,kEAAkE;IAClE,MAAM,CAAE,EAAU,EAAE,IAA2B,EAAE,OAAgB;QAC/D,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,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IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAoC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,IAAA,kBAAW,EAAC,OAAO,CAAC,CAAC,CAAA;QAC1I,OAAO,QAAQ,CAAC,IAAI,CAAA;IACtB,CAAC;CACF;AAnDD,wCAmDC"}
@@ -1,4 +1,4 @@
1
- import { AuthClient, PersonClient, RestaurantClient, FinancialAccountClient, FinancialCategoryClient, FinancialMovementClient, ReportClient, DashboardClient } from '../../clients';
1
+ import { AuthClient, PersonClient, RestaurantClient, FinancialAccountClient, FinancialCategoryClient, FinancialMovementClient, MenuItemClient, ReportClient, DashboardClient } from '../../clients';
2
2
  export declare class MasterClient {
3
3
  authClient: AuthClient;
4
4
  personClient: PersonClient;
@@ -6,6 +6,7 @@ export declare class MasterClient {
6
6
  financialAccountClient: FinancialAccountClient;
7
7
  financialCategoryClient: FinancialCategoryClient;
8
8
  financialMovementClient: FinancialMovementClient;
9
+ menuItemClient: MenuItemClient;
9
10
  reportClient: ReportClient;
10
11
  dashboardClient: DashboardClient;
11
12
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"master-client.d.ts","sourceRoot":"","sources":["../../../src/core/client/master-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACZ,eAAe,EAChB,MAAM,eAAe,CAAA;AAEtB,qBAAa,YAAY;IACvB,UAAU,EAAE,UAAU,CAAA;IACtB,YAAY,EAAE,YAAY,CAAA;IAC1B,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,sBAAsB,EAAE,sBAAsB,CAAA;IAC9C,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,YAAY,EAAE,YAAY,CAAA;IAC1B,eAAe,EAAE,eAAe,CAAA;;CAYjC"}
1
+ {"version":3,"file":"master-client.d.ts","sourceRoot":"","sources":["../../../src/core/client/master-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,cAAc,EACd,YAAY,EACZ,eAAe,EAChB,MAAM,eAAe,CAAA;AAEtB,qBAAa,YAAY;IACvB,UAAU,EAAE,UAAU,CAAA;IACtB,YAAY,EAAE,YAAY,CAAA;IAC1B,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,sBAAsB,EAAE,sBAAsB,CAAA;IAC9C,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,cAAc,EAAE,cAAc,CAAA;IAC9B,YAAY,EAAE,YAAY,CAAA;IAC1B,eAAe,EAAE,eAAe,CAAA;;CAajC"}
@@ -10,6 +10,7 @@ class MasterClient {
10
10
  this.financialAccountClient = new clients_1.FinancialAccountClient();
11
11
  this.financialCategoryClient = new clients_1.FinancialCategoryClient();
12
12
  this.financialMovementClient = new clients_1.FinancialMovementClient();
13
+ this.menuItemClient = new clients_1.MenuItemClient();
13
14
  this.reportClient = new clients_1.ReportClient();
14
15
  this.dashboardClient = new clients_1.DashboardClient();
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"master-client.js","sourceRoot":"","sources":["../../../src/core/client/master-client.ts"],"names":[],"mappings":";;;AAAA,2CASsB;AAEtB,MAAa,YAAY;IAUvB;QACE,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAU,EAAE,CAAA;QAClC,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAY,EAAE,CAAA;QACtC,IAAI,CAAC,gBAAgB,GAAG,IAAI,0BAAgB,EAAE,CAAA;QAC9C,IAAI,CAAC,sBAAsB,GAAG,IAAI,gCAAsB,EAAE,CAAA;QAC1D,IAAI,CAAC,uBAAuB,GAAG,IAAI,iCAAuB,EAAE,CAAA;QAC5D,IAAI,CAAC,uBAAuB,GAAG,IAAI,iCAAuB,EAAE,CAAA;QAC5D,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAY,EAAE,CAAA;QACtC,IAAI,CAAC,eAAe,GAAG,IAAI,yBAAe,EAAE,CAAA;IAC9C,CAAC;CACF;AApBD,oCAoBC"}
1
+ {"version":3,"file":"master-client.js","sourceRoot":"","sources":["../../../src/core/client/master-client.ts"],"names":[],"mappings":";;;AAAA,2CAUsB;AAEtB,MAAa,YAAY;IAWvB;QACE,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAU,EAAE,CAAA;QAClC,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAY,EAAE,CAAA;QACtC,IAAI,CAAC,gBAAgB,GAAG,IAAI,0BAAgB,EAAE,CAAA;QAC9C,IAAI,CAAC,sBAAsB,GAAG,IAAI,gCAAsB,EAAE,CAAA;QAC1D,IAAI,CAAC,uBAAuB,GAAG,IAAI,iCAAuB,EAAE,CAAA;QAC5D,IAAI,CAAC,uBAAuB,GAAG,IAAI,iCAAuB,EAAE,CAAA;QAC5D,IAAI,CAAC,cAAc,GAAG,IAAI,wBAAc,EAAE,CAAA;QAC1C,IAAI,CAAC,YAAY,GAAG,IAAI,sBAAY,EAAE,CAAA;QACtC,IAAI,CAAC,eAAe,GAAG,IAAI,yBAAe,EAAE,CAAA;IAC9C,CAAC;CACF;AAtBD,oCAsBC"}
@@ -28,6 +28,11 @@ export interface RegisterMovementRequest {
28
28
  /** Subcategoria da categoria escolhida; tem que estar ativa. */
29
29
  subcategoryId?: string;
30
30
  channel?: MovementChannel;
31
+ /**
32
+ * Vencimento (`AAAA-MM-DD`): o dia em que o dinheiro entra/sai. Ausente = à vista (nasce
33
+ * liquidado). Em conta de plataforma o servidor calcula (`date` + prazo) se não vier.
34
+ */
35
+ dueDate?: string | Date;
31
36
  }
32
37
  /**
33
38
  * Corpo de PATCH /financial-movements/:id/status. `settledAt` só vale quando o
@@ -54,6 +59,8 @@ export interface UpdateMovementRequest {
54
59
  subcategoryId?: string | null;
55
60
  /** `null` limpa (volta ao canal efetivo). */
56
61
  channel?: MovementChannel | null;
62
+ /** `null` limpa o vencimento (vira à vista); a API valida o documento resultante. */
63
+ dueDate?: string | Date | null;
57
64
  }
58
65
  /** Filtros de GET /financial-movements. */
59
66
  export interface MovementListQuery {
@@ -1 +1 @@
1
- {"version":3,"file":"financial-movement-response.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,eAAe,EAChB,MAAM,6BAA6B,CAAA;AAEpC,2DAA2D;AAC3D,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,gBAAgB,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,iBAAiB,CAAA;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,aAAa,CAAA;IAC5B,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,YAAY,CAAC,EAAE,yBAAyB,CAAA;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,eAAe,CAAA;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,cAAc,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,uEAAuE;AACvE,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,yBAAyB,CAAA;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;CACjC;AAED,2CAA2C;AAC3C,MAAM,WAAW,iBAAiB;IAChC,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,oFAAoF;AACpF,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,MAAM,CAAA;CAChB"}
1
+ {"version":3,"file":"financial-movement-response.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,eAAe,EAChB,MAAM,6BAA6B,CAAA;AAEpC,2DAA2D;AAC3D,MAAM,WAAW,y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AAA;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAA;IAChC,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;CAC/B;AAED,2CAA2C;AAC3C,MAAM,WAAW,iBAAiB;IAChC,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,oFAAoF;AACpF,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,MAAM,CAAA;CAChB"}
@@ -4,6 +4,7 @@ export * from './person';
4
4
  export * from './user';
5
5
  export * from './restaurant';
6
6
  export * from './financial';
7
+ export * from './menu';
7
8
  export * from './auth';
8
9
  export * from './request';
9
10
  export * from './reports';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/data/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/data/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA;AACrB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA;AACxB,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,QAAQ,CAAA;AACtB,cAAc,QAAQ,CAAA;AACtB,cAAc,WAAW,CAAA;AACzB,cAAc,WAAW,CAAA"}
@@ -20,6 +20,7 @@ __exportStar(require("./person"), exports);
20
20
  __exportStar(require("./user"), exports);
21
21
  __exportStar(require("./restaurant"), exports);
22
22
  __exportStar(require("./financial"), exports);
23
+ __exportStar(require("./menu"), exports);
23
24
  __exportStar(require("./auth"), exports);
24
25
  __exportStar(require("./request"), exports);
25
26
  __exportStar(require("./reports"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/data/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,2CAAwB;AACxB,2CAAwB;AACxB,yCAAsB;AACtB,+CAA4B;AAC5B,8CAA2B;AAC3B,yCAAsB;AACtB,4CAAyB;AACzB,4CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/data/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,2CAAwB;AACxB,2CAAwB;AACxB,yCAAsB;AACtB,+CAA4B;AAC5B,8CAA2B;AAC3B,yCAAsB;AACtB,yCAAsB;AACtB,4CAAyB;AACzB,4CAAyB"}
@@ -0,0 +1,4 @@
1
+ export { MenuItem } from './menu-item-entity';
2
+ export { menuItemSchema, menuItemInsertSchema, menuItemUpdateSchema, menuItemPriceSchema, PRICE_REVIEW_ALERT_DAYS, PRICE_REVIEW_INTERVAL_MONTHS, } from './menu-item-schema';
3
+ export type { MenuItemActionResult, MenuItemInsertRequest, MenuItemUpdateRequest, MenuItemPriceRequest, MenuItemPriceAlert, } from './menu-item-response';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/data/menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,sBAAsB,CAAA"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRICE_REVIEW_INTERVAL_MONTHS = exports.PRICE_REVIEW_ALERT_DAYS = exports.menuItemPriceSchema = exports.menuItemUpdateSchema = exports.menuItemInsertSchema = exports.menuItemSchema = void 0;
4
+ var menu_item_schema_1 = require("./menu-item-schema");
5
+ Object.defineProperty(exports, "menuItemSchema", { enumerable: true, get: function () { return menu_item_schema_1.menuItemSchema; } });
6
+ Object.defineProperty(exports, "menuItemInsertSchema", { enumerable: true, get: function () { return menu_item_schema_1.menuItemInsertSchema; } });
7
+ Object.defineProperty(exports, "menuItemUpdateSchema", { enumerable: true, get: function () { return menu_item_schema_1.menuItemUpdateSchema; } });
8
+ Object.defineProperty(exports, "menuItemPriceSchema", { enumerable: true, get: function () { return menu_item_schema_1.menuItemPriceSchema; } });
9
+ Object.defineProperty(exports, "PRICE_REVIEW_ALERT_DAYS", { enumerable: true, get: function () { return menu_item_schema_1.PRICE_REVIEW_ALERT_DAYS; } });
10
+ Object.defineProperty(exports, "PRICE_REVIEW_INTERVAL_MONTHS", { enumerable: true, get: function () { return menu_item_schema_1.PRICE_REVIEW_INTERVAL_MONTHS; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/data/menu/index.ts"],"names":[],"mappings":";;;AACA,uDAO2B;AANzB,kHAAA,cAAc,OAAA;AACd,wHAAA,oBAAoB,OAAA;AACpB,wHAAA,oBAAoB,OAAA;AACpB,uHAAA,mBAAmB,OAAA;AACnB,2HAAA,uBAAuB,OAAA;AACvB,gIAAA,4BAA4B,OAAA"}
@@ -0,0 +1,5 @@
1
+ import type { Infer } from '@ascendance-hub/sapphire-core';
2
+ import { Entity } from '../api/entity';
3
+ import { menuItemSchema } from './menu-item-schema';
4
+ export type MenuItem = Infer<typeof menuItemSchema> & Entity;
5
+ //# sourceMappingURL=menu-item-entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-item-entity.d.ts","sourceRoot":"","sources":["../../../../src/core/data/menu/menu-item-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,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAEnD,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,GAAG,MAAM,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=menu-item-entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-item-entity.js","sourceRoot":"","sources":["../../../../src/core/data/menu/menu-item-entity.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import type { Infer } from '@ascendance-hub/sapphire-core';
2
+ import type { MenuItem } from './menu-item-entity';
3
+ import type { menuItemInsertSchema, menuItemUpdateSchema } from './menu-item-schema';
4
+ /** Resposta das rotas de ação (inactivate/reactivate) — apenas a mensagem ao usuário. */
5
+ export interface MenuItemActionResult {
6
+ message: string;
7
+ }
8
+ /** Corpo de POST /menu-items. */
9
+ export type MenuItemInsertRequest = Infer<typeof menuItemInsertSchema>;
10
+ /** Corpo de PATCH /menu-items/:id (nome/categoria; o preço tem rota própria). */
11
+ export type MenuItemUpdateRequest = Infer<typeof menuItemUpdateSchema>;
12
+ /** Corpo de PATCH /menu-items/:id/price. */
13
+ export interface MenuItemPriceRequest {
14
+ price: number;
15
+ }
16
+ /** Prato com preço sem revisão há tempo demais (GET /menu-items/price-alerts). */
17
+ export type MenuItemPriceAlert = MenuItem & {
18
+ /** Dias desde a última revisão do preço. */
19
+ daysSinceReview: number;
20
+ };
21
+ //# sourceMappingURL=menu-item-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-item-response.d.ts","sourceRoot":"","sources":["../../../../src/core/data/menu/menu-item-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAEpF,yFAAyF;AACzF,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,iCAAiC;AACjC,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEtE,iFAAiF;AACjF,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEtE,4CAA4C;AAC5C,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAA;CACd;AAED,kFAAkF;AAClF,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG;IAC1C,4CAA4C;IAC5C,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=menu-item-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-item-response.js","sourceRoot":"","sources":["../../../../src/core/data/menu/menu-item-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,126 @@
1
+ import { RecordStatus } from '../common/status';
2
+ /**
3
+ * Prato do cardápio. O preço é revisado a cada ~6 meses: o sistema avisa aos 5,5 meses
4
+ * (`PRICE_REVIEW_ALERT_DAYS`) sem revisão. "Revisão" é editar o valor OU dizer que não quer
5
+ * mudar — as duas coisas atualizam `priceReviewedAt` e silenciam o aviso.
6
+ */
7
+ /** Dias sem revisão de preço a partir dos quais o prato entra nos avisos (~5,5 meses). */
8
+ export declare const PRICE_REVIEW_ALERT_DAYS = 167;
9
+ /** Intervalo recomendado entre revisões de preço, em meses (informativo, para textos da tela). */
10
+ export declare const PRICE_REVIEW_INTERVAL_MONTHS = 6;
11
+ export declare const menuItemSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
12
+ restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
13
+ name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
14
+ /** Grupo livre do cardápio (Frango, Bebidas…). */
15
+ category: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
16
+ price: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
17
+ status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
18
+ /** Última vez que o VALOR mudou (ou o cadastro, se nunca mudou). */
19
+ priceUpdatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
20
+ /** Última revisão do preço: mudou o valor ou escolheu manter. Base do aviso. */
21
+ priceReviewedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
22
+ audit: import("@ascendance-hub/sapphire-core").ObjectField<{
23
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
24
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
25
+ createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
26
+ updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
27
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
28
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
29
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
30
+ createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
31
+ updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
32
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
33
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
34
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
35
+ createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
36
+ updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
37
+ }>>;
38
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
39
+ restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
40
+ name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
41
+ /** Grupo livre do cardápio (Frango, Bebidas…). */
42
+ category: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
43
+ price: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
44
+ status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
45
+ /** Última vez que o VALOR mudou (ou o cadastro, se nunca mudou). */
46
+ priceUpdatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
47
+ /** Última revisão do preço: mudou o valor ou escolheu manter. Base do aviso. */
48
+ priceReviewedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
49
+ audit: import("@ascendance-hub/sapphire-core").ObjectField<{
50
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
51
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
52
+ createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
53
+ updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
54
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
55
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
56
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
57
+ createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
58
+ updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
59
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
60
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
61
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
62
+ createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
63
+ updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
64
+ }>>;
65
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
66
+ restaurantId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
67
+ name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
68
+ /** Grupo livre do cardápio (Frango, Bebidas…). */
69
+ category: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
70
+ price: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
71
+ status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
72
+ /** Última vez que o VALOR mudou (ou o cadastro, se nunca mudou). */
73
+ priceUpdatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
74
+ /** Última revisão do preço: mudou o valor ou escolheu manter. Base do aviso. */
75
+ priceReviewedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
76
+ audit: import("@ascendance-hub/sapphire-core").ObjectField<{
77
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
78
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
79
+ createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
80
+ updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
81
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
82
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
83
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
84
+ createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
85
+ updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
86
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
87
+ createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
88
+ updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
89
+ createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
90
+ updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
91
+ }>>;
92
+ }>>;
93
+ /** Corpo de POST /menu-items. O servidor preenche datas, status e restaurante. */
94
+ export declare const menuItemInsertSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
95
+ name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
96
+ price: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
97
+ category: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
98
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
99
+ name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
100
+ price: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
101
+ category: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
102
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
103
+ name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
104
+ price: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
105
+ category: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
106
+ }>>;
107
+ /** Corpo de PATCH /menu-items/:id — só dados de cadastro; preço tem rota própria. */
108
+ export declare const menuItemUpdateSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
109
+ name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
110
+ category: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
111
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
112
+ name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
113
+ category: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
114
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
115
+ name: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
116
+ category: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
117
+ }>>;
118
+ /** Corpo de PATCH /menu-items/:id/price. */
119
+ export declare const menuItemPriceSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
120
+ price: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
121
+ }, import("@ascendance-hub/sapphire-core").ObjectOutput<{
122
+ price: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
123
+ }>, import("@ascendance-hub/sapphire-core").ObjectInput<{
124
+ price: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
125
+ }>>;
126
+ //# sourceMappingURL=menu-item-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-item-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/menu/menu-item-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAK/C;;;;GAIG;AAEH,0FAA0F;AAC1F,eAAO,MAAM,uBAAuB,MAAM,CAAA;AAE1C,kGAAkG;AAClG,eAAO,MAAM,4BAA4B,IAAI,CAAA;AAE7C,eAAO,MAAM,cAAc;;;IAGzB,kDAAkD;;;;IAIlD,oEAAoE;;IAEpE,gFAAgF;;;;;;;;;;;;;;;;;;;;;IANhF,kDAAkD;;;;IAIlD,oEAAoE;;IAEpE,gFAAgF;;;;;;;;;;;;;;;;;;;;;IANhF,kDAAkD;;;;IAIlD,oEAAoE;;IAEpE,gFAAgF;;;;;;;;;;;;;;;;;;GAGhF,CAAA;AAEF,kFAAkF;AAClF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;GAI/B,CAAA;AAEF,qFAAqF;AACrF,eAAO,MAAM,oBAAoB;;;;;;;;;GAGrB,CAAA;AAEZ,4CAA4C;AAC5C,eAAO,MAAM,mBAAmB;;;;;;GAE9B,CAAA"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.menuItemPriceSchema = exports.menuItemUpdateSchema = exports.menuItemInsertSchema = exports.menuItemSchema = exports.PRICE_REVIEW_INTERVAL_MONTHS = exports.PRICE_REVIEW_ALERT_DAYS = void 0;
4
+ const sapphire_core_1 = require("@ascendance-hub/sapphire-core");
5
+ const status_1 = require("../common/status");
6
+ const audit_1 = require("../common/audit");
7
+ const s = new sapphire_core_1.Sapphire();
8
+ /**
9
+ * Prato do cardápio. O preço é revisado a cada ~6 meses: o sistema avisa aos 5,5 meses
10
+ * (`PRICE_REVIEW_ALERT_DAYS`) sem revisão. "Revisão" é editar o valor OU dizer que não quer
11
+ * mudar — as duas coisas atualizam `priceReviewedAt` e silenciam o aviso.
12
+ */
13
+ /** Dias sem revisão de preço a partir dos quais o prato entra nos avisos (~5,5 meses). */
14
+ exports.PRICE_REVIEW_ALERT_DAYS = 167;
15
+ /** Intervalo recomendado entre revisões de preço, em meses (informativo, para textos da tela). */
16
+ exports.PRICE_REVIEW_INTERVAL_MONTHS = 6;
17
+ exports.menuItemSchema = s.object({
18
+ restaurantId: s.string(),
19
+ name: s.string().max(80),
20
+ /** Grupo livre do cardápio (Frango, Bebidas…). */
21
+ category: s.string().max(40).optional(),
22
+ price: s.number().min(0),
23
+ status: s.type().enum(status_1.RecordStatus),
24
+ /** Última vez que o VALOR mudou (ou o cadastro, se nunca mudou). */
25
+ priceUpdatedAt: s.date().coerce(),
26
+ /** Última revisão do preço: mudou o valor ou escolheu manter. Base do aviso. */
27
+ priceReviewedAt: s.date().coerce(),
28
+ audit: audit_1.auditSchema,
29
+ });
30
+ /** Corpo de POST /menu-items. O servidor preenche datas, status e restaurante. */
31
+ exports.menuItemInsertSchema = s.object({
32
+ name: s.string().max(80),
33
+ price: s.number().min(0),
34
+ category: s.string().max(40).optional(),
35
+ });
36
+ /** Corpo de PATCH /menu-items/:id — só dados de cadastro; preço tem rota própria. */
37
+ exports.menuItemUpdateSchema = s.object({
38
+ name: s.string().max(80),
39
+ category: s.string().max(40),
40
+ }).partial();
41
+ /** Corpo de PATCH /menu-items/:id/price. */
42
+ exports.menuItemPriceSchema = s.object({
43
+ price: s.number().min(0),
44
+ });
45
+ //# sourceMappingURL=menu-item-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu-item-schema.js","sourceRoot":"","sources":["../../../../src/core/data/menu/menu-item-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,6CAA+C;AAC/C,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB;;;;GAIG;AAEH,0FAA0F;AAC7E,QAAA,uBAAuB,GAAG,GAAG,CAAA;AAE1C,kGAAkG;AACrF,QAAA,4BAA4B,GAAG,CAAC,CAAA;AAEhC,QAAA,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACxB,kDAAkD;IAClD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;IACnC,oEAAoE;IACpE,cAAc,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;IACjC,gFAAgF;IAChF,eAAe,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;IAClC,KAAK,EAAE,mBAAW;CACnB,CAAC,CAAA;AAEF,kFAAkF;AACrE,QAAA,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAA;AAEF,qFAAqF;AACxE,QAAA,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;CAC7B,CAAC,CAAC,OAAO,EAAE,CAAA;AAEZ,4CAA4C;AAC/B,QAAA,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACzB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mintly-lib",
3
- "version": "2.19.0-preview",
3
+ "version": "2.20.0-preview",
4
4
  "description": "Mintly Library",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",