@pedro.araujo/ml-architecture-shared 0.1.136 → 0.1.138

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 (147) hide show
  1. package/dist/auction-item/auction-item-order-type.enum.d.ts +7 -5
  2. package/dist/auction-item/auction-item-order-type.enum.d.ts.map +1 -1
  3. package/dist/auction-item/auction-item-order-type.enum.js +15 -5
  4. package/dist/auction-item-participation/auction-participation-status.enum.d.ts +5 -3
  5. package/dist/auction-item-participation/auction-participation-status.enum.d.ts.map +1 -1
  6. package/dist/auction-item-participation/auction-participation-status.enum.js +11 -3
  7. package/dist/auction-item-participation/auction-participation-type.enum.d.ts +4 -2
  8. package/dist/auction-item-participation/auction-participation-type.enum.d.ts.map +1 -1
  9. package/dist/auction-item-participation/auction-participation-type.enum.js +9 -2
  10. package/dist/auction-item-status/auction-item-status.enum.d.ts +8 -6
  11. package/dist/auction-item-status/auction-item-status.enum.d.ts.map +1 -1
  12. package/dist/auction-item-status/auction-item-status.enum.js +17 -6
  13. package/dist/auction-item-user/auction-item-user-role.enum.d.ts +2 -0
  14. package/dist/auction-item-user/auction-item-user-role.enum.d.ts.map +1 -1
  15. package/dist/auction-item-user/auction-item-user-role.enum.js +8 -0
  16. package/dist/auction-item-user/auction-item-user-status.enum.d.ts +2 -0
  17. package/dist/auction-item-user/auction-item-user-status.enum.d.ts.map +1 -1
  18. package/dist/auction-item-user/auction-item-user-status.enum.js +8 -0
  19. package/dist/auction-source/create-system-auction-sources-request.dto.d.ts +9 -0
  20. package/dist/auction-source/create-system-auction-sources-request.dto.d.ts.map +1 -0
  21. package/dist/auction-source/create-system-auction-sources-request.schema.d.ts +4 -0
  22. package/dist/auction-source/create-system-auction-sources-request.schema.d.ts.map +1 -0
  23. package/dist/auction-source/create-system-auction-sources-request.schema.js +9 -0
  24. package/dist/auction-source-type/auction-source-type.enum.d.ts +4 -2
  25. package/dist/auction-source-type/auction-source-type.enum.d.ts.map +1 -1
  26. package/dist/auction-source-type/auction-source-type.enum.js +9 -2
  27. package/dist/counterparty-type/counterparty-type.d.ts +4 -2
  28. package/dist/counterparty-type/counterparty-type.d.ts.map +1 -1
  29. package/dist/counterparty-type/counterparty-type.js +9 -2
  30. package/dist/entity-type/entity-type.enum.d.ts +12 -0
  31. package/dist/entity-type/entity-type.enum.d.ts.map +1 -0
  32. package/dist/entity-type/entity-type.enum.js +12 -0
  33. package/dist/external-auction-item/external-auction-item-order-type.enum.d.ts +7 -5
  34. package/dist/external-auction-item/external-auction-item-order-type.enum.d.ts.map +1 -1
  35. package/dist/external-auction-item/external-auction-item-order-type.enum.js +15 -5
  36. package/dist/external-auction-item-status/external-auction-item-status.enum.d.ts +5 -3
  37. package/dist/external-auction-item-status/external-auction-item-status.enum.d.ts.map +1 -1
  38. package/dist/external-auction-item-status/external-auction-item-status.enum.js +11 -3
  39. package/dist/financial-movement-kind/financial-movement-kind.enum.d.ts +2 -0
  40. package/dist/financial-movement-kind/financial-movement-kind.enum.d.ts.map +1 -1
  41. package/dist/financial-movement-kind/financial-movement-kind.enum.js +7 -0
  42. package/dist/financial-report/financial-report-filters.schema.d.ts +4 -0
  43. package/dist/financial-report/financial-report-filters.schema.d.ts.map +1 -0
  44. package/dist/financial-report/financial-report-filters.schema.js +12 -0
  45. package/dist/financial-report/financial-report-filters.type.d.ts +8 -0
  46. package/dist/financial-report/financial-report-filters.type.d.ts.map +1 -0
  47. package/dist/financial-report/financial-report-filters.type.js +1 -0
  48. package/dist/group/group-order-type.enum.d.ts +8 -6
  49. package/dist/group/group-order-type.enum.d.ts.map +1 -1
  50. package/dist/group/group-order-type.enum.js +17 -6
  51. package/dist/group/group-user-role.enum.d.ts +2 -0
  52. package/dist/group/group-user-role.enum.d.ts.map +1 -1
  53. package/dist/group/group-user-role.enum.js +8 -0
  54. package/dist/index.d.ts +23 -0
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +23 -0
  57. package/dist/item-financial-event/item-financial-event-type.enum.d.ts +2 -0
  58. package/dist/item-financial-event/item-financial-event-type.enum.d.ts.map +1 -1
  59. package/dist/item-financial-event/item-financial-event-type.enum.js +10 -0
  60. package/dist/item-financial-event/payment-type.enum.d.ts +2 -0
  61. package/dist/item-financial-event/payment-type.enum.d.ts.map +1 -1
  62. package/dist/item-financial-event/payment-type.enum.js +7 -0
  63. package/dist/item-financial-movement/movement-direction.enum.d.ts +4 -2
  64. package/dist/item-financial-movement/movement-direction.enum.d.ts.map +1 -1
  65. package/dist/item-financial-movement/movement-direction.enum.js +9 -2
  66. package/dist/notification/list-notifications-request.dto.d.ts +7 -0
  67. package/dist/notification/list-notifications-request.dto.d.ts.map +1 -0
  68. package/dist/notification/list-notifications-request.dto.js +1 -0
  69. package/dist/notification/list-notifications-request.schema.d.ts +4 -0
  70. package/dist/notification/list-notifications-request.schema.d.ts.map +1 -0
  71. package/dist/notification/list-notifications-request.schema.js +14 -0
  72. package/dist/notification/list-notifications-request.schemas.d.ts +18 -0
  73. package/dist/notification/list-notifications-request.schemas.d.ts.map +1 -0
  74. package/dist/notification/list-notifications-request.schemas.js +18 -0
  75. package/dist/notification/notification-action-request.dto.d.ts +5 -0
  76. package/dist/notification/notification-action-request.dto.d.ts.map +1 -0
  77. package/dist/notification/notification-action-request.dto.js +1 -0
  78. package/dist/notification/notification-action-request.schema.d.ts +4 -0
  79. package/dist/notification/notification-action-request.schema.d.ts.map +1 -0
  80. package/dist/notification/notification-action-request.schema.js +5 -0
  81. package/dist/notification/notification-action.type.d.ts +6 -0
  82. package/dist/notification/notification-action.type.d.ts.map +1 -0
  83. package/dist/notification/notification-action.type.js +6 -0
  84. package/dist/notification/notification-payload-map.d.ts +53 -0
  85. package/dist/notification/notification-payload-map.d.ts.map +1 -0
  86. package/dist/notification/notification-payload-map.js +1 -0
  87. package/dist/notification/notification-response.dto.d.ts +10 -0
  88. package/dist/notification/notification-response.dto.d.ts.map +1 -0
  89. package/dist/notification/notification-response.dto.js +1 -0
  90. package/dist/notification-channel-type/notification-channel-type.enum.d.ts +6 -4
  91. package/dist/notification-channel-type/notification-channel-type.enum.d.ts.map +1 -1
  92. package/dist/notification-channel-type/notification-channel-type.enum.js +13 -4
  93. package/dist/notification-event-type/notification-event-type.enum.d.ts +11 -9
  94. package/dist/notification-event-type/notification-event-type.enum.d.ts.map +1 -1
  95. package/dist/notification-event-type/notification-event-type.enum.js +23 -9
  96. package/dist/report/create-report-request.dto.d.ts +7 -0
  97. package/dist/report/create-report-request.dto.d.ts.map +1 -0
  98. package/dist/report/create-report-request.dto.js +1 -0
  99. package/dist/report/get-reports-request.dto.d.ts +6 -0
  100. package/dist/report/get-reports-request.dto.d.ts.map +1 -0
  101. package/dist/report/get-reports-request.dto.js +1 -0
  102. package/dist/report/get-reports-request.schema.d.ts +4 -0
  103. package/dist/report/get-reports-request.schema.d.ts.map +1 -0
  104. package/dist/report/get-reports-request.schema.js +6 -0
  105. package/dist/report/report-response.dto.d.ts +13 -0
  106. package/dist/report/report-response.dto.d.ts.map +1 -0
  107. package/dist/report/report-response.dto.js +1 -0
  108. package/dist/report-status/report-status.enum.d.ts +8 -0
  109. package/dist/report-status/report-status.enum.d.ts.map +1 -0
  110. package/dist/report-status/report-status.enum.js +16 -0
  111. package/dist/report-type/report-type.enum.d.ts +5 -0
  112. package/dist/report-type/report-type.enum.d.ts.map +1 -0
  113. package/dist/report-type/report-type.enum.js +10 -0
  114. package/dist/report-type/report-type.schema.d.ts +4 -0
  115. package/dist/report-type/report-type.schema.d.ts.map +1 -0
  116. package/dist/report-type/report-type.schema.js +3 -0
  117. package/dist/subscription/billing-cycle.type.d.ts +4 -2
  118. package/dist/subscription/billing-cycle.type.d.ts.map +1 -1
  119. package/dist/subscription/billing-cycle.type.js +9 -2
  120. package/dist/user/update-profile-picture-request.dto.d.ts +4 -0
  121. package/dist/user/update-profile-picture-request.dto.d.ts.map +1 -0
  122. package/dist/user/update-profile-picture-request.dto.js +1 -0
  123. package/dist/user/update-profile-picture-request.schema.d.ts +4 -0
  124. package/dist/user/update-profile-picture-request.schema.d.ts.map +1 -0
  125. package/dist/user/update-profile-picture-request.schema.js +5 -0
  126. package/dist/user/update-username-request.dto.d.ts +4 -0
  127. package/dist/user/update-username-request.dto.d.ts.map +1 -0
  128. package/dist/user/update-username-request.dto.js +9 -0
  129. package/dist/user/update-username-request.schema.d.ts +4 -0
  130. package/dist/user/update-username-request.schema.d.ts.map +1 -0
  131. package/dist/user/update-username-request.schema.js +1 -0
  132. package/dist/user/user-status.enum.d.ts +2 -0
  133. package/dist/user/user-status.enum.d.ts.map +1 -1
  134. package/dist/user/user-status.enum.js +8 -0
  135. package/dist/user-notification-channel/create-user-notification-channel-request.schema.js +1 -1
  136. package/dist/user-notification-channel/update-user-notification-channel-request.schema.js +1 -1
  137. package/dist/user-notification-preference/create-user-notification-preference.schema.js +2 -2
  138. package/package.json +1 -1
  139. package/dist/auction-item-status/auction-item-status-response.dto.d.ts +0 -9
  140. package/dist/auction-item-status/auction-item-status-response.dto.d.ts.map +0 -1
  141. package/dist/auction-item-status/auction-item-status-response.dto.js +0 -9
  142. package/dist/external-auction-item/create-auction-item.dto.d.ts +0 -19
  143. package/dist/external-auction-item/create-auction-item.dto.d.ts.map +0 -1
  144. package/dist/external-auction-item/create-auction-item.schema.d.ts +0 -4
  145. package/dist/external-auction-item/create-auction-item.schema.d.ts.map +0 -1
  146. package/dist/external-auction-item/create-auction-item.schema.js +0 -41
  147. /package/dist/{external-auction-item/create-auction-item.dto.js → auction-source/create-system-auction-sources-request.dto.js} +0 -0
@@ -0,0 +1,6 @@
1
+ import { z } from "zod";
2
+ import { PaginationRequestSchema } from "../pagination/pagination-request.schema.js";
3
+ import { ReportType } from "../report-type/report-type.enum.js";
4
+ export const GetReportsRequestSchema = PaginationRequestSchema.extend({
5
+ type: z.enum(ReportType),
6
+ });
@@ -0,0 +1,13 @@
1
+ import { ReportStatus } from "../report-status/report-status.enum.js";
2
+ import { ReportType } from "../report-type/report-type.enum.js";
3
+ export interface ReportResponseDTO {
4
+ publicId: string;
5
+ type: ReportType;
6
+ status: ReportStatus;
7
+ filters: Record<string, unknown>;
8
+ filePath: string | null;
9
+ fileName: string | null;
10
+ errorMessage: string | null;
11
+ createdAt: string;
12
+ }
13
+ //# sourceMappingURL=report-response.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-response.dto.d.ts","sourceRoot":"","sources":["../../src/report/report-response.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ export declare enum ReportStatus {
2
+ PENDING = "pending",
3
+ PROCESSING = "processing",
4
+ COMPLETED = "completed",
5
+ FAILED = "failed"
6
+ }
7
+ export declare function getReportStatusLabel(status: ReportStatus): string;
8
+ //# sourceMappingURL=report-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-status.enum.d.ts","sourceRoot":"","sources":["../../src/report-status/report-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AASD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAEjE"}
@@ -0,0 +1,16 @@
1
+ export var ReportStatus;
2
+ (function (ReportStatus) {
3
+ ReportStatus["PENDING"] = "pending";
4
+ ReportStatus["PROCESSING"] = "processing";
5
+ ReportStatus["COMPLETED"] = "completed";
6
+ ReportStatus["FAILED"] = "failed";
7
+ })(ReportStatus || (ReportStatus = {}));
8
+ const ReportStatusLabels = {
9
+ [ReportStatus.PENDING]: "Pendente",
10
+ [ReportStatus.PROCESSING]: "Processando",
11
+ [ReportStatus.COMPLETED]: "Concluído",
12
+ [ReportStatus.FAILED]: "Falhou",
13
+ };
14
+ export function getReportStatusLabel(status) {
15
+ return ReportStatusLabels[status];
16
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum ReportType {
2
+ FINANCIAL = "financial"
3
+ }
4
+ export declare function getReportTypeLabel(type: ReportType): string;
5
+ //# sourceMappingURL=report-type.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-type.enum.d.ts","sourceRoot":"","sources":["../../src/report-type/report-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,SAAS,cAAc;CACxB;AAMD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAE3D"}
@@ -0,0 +1,10 @@
1
+ export var ReportType;
2
+ (function (ReportType) {
3
+ ReportType["FINANCIAL"] = "financial";
4
+ })(ReportType || (ReportType = {}));
5
+ const ReportTypeLabels = {
6
+ [ReportType.FINANCIAL]: "Relatório Financeiro",
7
+ };
8
+ export function getReportTypeLabel(type) {
9
+ return ReportTypeLabels[type];
10
+ }
@@ -0,0 +1,4 @@
1
+ import z from "zod";
2
+ import { ReportType } from "./report-type.enum.js";
3
+ export declare const ReportTypeSchema: z.ZodEnum<typeof ReportType>;
4
+ //# sourceMappingURL=report-type.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-type.schema.d.ts","sourceRoot":"","sources":["../../src/report-type/report-type.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,eAAO,MAAM,gBAAgB,8BAAqB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import z from "zod";
2
+ import { ReportType } from "./report-type.enum.js";
3
+ export const ReportTypeSchema = z.enum(ReportType);
@@ -1,5 +1,7 @@
1
1
  export declare enum BillingCycle {
2
- MONTHLY = "MONTHLY",
3
- YEARLY = "YEARLY"
2
+ MONTHLY = "monthly",
3
+ YEARLY = "yearly"
4
4
  }
5
+ export declare const BillingCycleLabels: Record<BillingCycle, string>;
6
+ export declare function getBillingCycleLabel(cycle: BillingCycle): string;
5
7
  //# sourceMappingURL=billing-cycle.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"billing-cycle.type.d.ts","sourceRoot":"","sources":["../../src/subscription/billing-cycle.type.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB"}
1
+ {"version":3,"file":"billing-cycle.type.d.ts","sourceRoot":"","sources":["../../src/subscription/billing-cycle.type.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,MAAM,WAAW;CAClB;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAG3D,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,YAAY,GAClB,MAAM,CAER"}
@@ -1,5 +1,12 @@
1
1
  export var BillingCycle;
2
2
  (function (BillingCycle) {
3
- BillingCycle["MONTHLY"] = "MONTHLY";
4
- BillingCycle["YEARLY"] = "YEARLY";
3
+ BillingCycle["MONTHLY"] = "monthly";
4
+ BillingCycle["YEARLY"] = "yearly";
5
5
  })(BillingCycle || (BillingCycle = {}));
6
+ export const BillingCycleLabels = {
7
+ [BillingCycle.MONTHLY]: "Mensal",
8
+ [BillingCycle.YEARLY]: "Anual",
9
+ };
10
+ export function getBillingCycleLabel(cycle) {
11
+ return BillingCycleLabels[cycle];
12
+ }
@@ -0,0 +1,4 @@
1
+ export interface UpdateProfilePictureRequestDTO {
2
+ profilePictureUrl: string;
3
+ }
4
+ //# sourceMappingURL=update-profile-picture-request.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-profile-picture-request.dto.d.ts","sourceRoot":"","sources":["../../src/user/update-profile-picture-request.dto.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,8BAA8B;IAC7C,iBAAiB,EAAE,MAAM,CAAC;CAC3B"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import z from "zod";
2
+ import { UpdateProfilePictureRequestDTO } from "./update-profile-picture-request.dto.js";
3
+ export declare const updateProfilePictureRequestSchema: z.ZodType<UpdateProfilePictureRequestDTO>;
4
+ //# sourceMappingURL=update-profile-picture-request.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-profile-picture-request.schema.d.ts","sourceRoot":"","sources":["../../src/user/update-profile-picture-request.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAEzF,eAAO,MAAM,iCAAiC,EAAE,CAAC,CAAC,OAAO,CAAC,8BAA8B,CAIpF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import z from "zod";
2
+ export const updateProfilePictureRequestSchema = z.object({
3
+ profilePictureUrl: z
4
+ .url("URL da foto de perfil inválida"),
5
+ });
@@ -0,0 +1,4 @@
1
+ import { z } from "zod";
2
+ import { UpdateUsernameRequestDTO } from "./update-username-request.schema.js";
3
+ export declare const updateUsernameRequestSchema: z.ZodType<UpdateUsernameRequestDTO>;
4
+ //# sourceMappingURL=update-username-request.dto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-username-request.dto.d.ts","sourceRoot":"","sources":["../../src/user/update-username-request.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAE/E,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAWxE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ export const updateUsernameRequestSchema = z.object({
3
+ username: z
4
+ .string()
5
+ .trim()
6
+ .min(2, "Nome de usuário deve possuir no mínimo 2 caracteres")
7
+ .max(30, "Nome de usuário deve possuir no máximo 30 caracteres")
8
+ .regex(/^\p{L}/u, "Nome de usuário deve começar com uma letra"),
9
+ });
@@ -0,0 +1,4 @@
1
+ export interface UpdateUsernameRequestDTO {
2
+ username: string;
3
+ }
4
+ //# sourceMappingURL=update-username-request.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-username-request.schema.d.ts","sourceRoot":"","sources":["../../src/user/update-username-request.schema.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -3,4 +3,6 @@ export declare enum UserStatus {
3
3
  PENDING = "pending",
4
4
  DELETED = "deleted"
5
5
  }
6
+ export declare const UserStatusLabels: Record<UserStatus, string>;
7
+ export declare function getUserStatusLabel(status: UserStatus): string;
6
8
  //# sourceMappingURL=user-status.enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"user-status.enum.d.ts","sourceRoot":"","sources":["../../src/user/user-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB"}
1
+ {"version":3,"file":"user-status.enum.d.ts","sourceRoot":"","sources":["../../src/user/user-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAIvD,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,UAAU,GACjB,MAAM,CAER"}
@@ -4,3 +4,11 @@ export var UserStatus;
4
4
  UserStatus["PENDING"] = "pending";
5
5
  UserStatus["DELETED"] = "deleted";
6
6
  })(UserStatus || (UserStatus = {}));
7
+ export const UserStatusLabels = {
8
+ [UserStatus.ACTIVE]: 'Ativo',
9
+ [UserStatus.PENDING]: 'Pendente',
10
+ [UserStatus.DELETED]: 'Deletado',
11
+ };
12
+ export function getUserStatusLabel(status) {
13
+ return UserStatusLabels[status];
14
+ }
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { NotificationChannelType } from "../notification-channel-type/notification-channel-type.enum.js";
3
3
  export const CreateUserNotificationChannelSchema = z.object({
4
- channelType: z.nativeEnum(NotificationChannelType),
4
+ channelType: z.enum(NotificationChannelType),
5
5
  value: z.string(),
6
6
  enabled: z.coerce.boolean(),
7
7
  });
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { NotificationChannelType } from "../notification-channel-type/notification-channel-type.enum.js";
3
3
  export const UpdateUserNotificationChannelSchema = z.object({
4
- channelType: z.nativeEnum(NotificationChannelType),
4
+ channelType: z.enum(NotificationChannelType),
5
5
  value: z.string().optional(),
6
6
  enabled: z.coerce.boolean().optional(),
7
7
  });
@@ -2,8 +2,8 @@ import { z } from "zod";
2
2
  import { NotificationChannelType } from "../notification-channel-type/notification-channel-type.enum.js";
3
3
  import { NotificationEventType } from "../notification-event-type/notification-event-type.enum.js";
4
4
  export const CreateUserNotificationPreferenceSchema = z.object({
5
- notificationEventType: z.nativeEnum(NotificationEventType),
6
- notificationChannelType: z.nativeEnum(NotificationChannelType),
5
+ notificationEventType: z.enum(NotificationEventType),
6
+ notificationChannelType: z.enum(NotificationChannelType),
7
7
  notifyBeforeMinutes: z.coerce.number().int().min(0).nullable(),
8
8
  enabled: z.coerce.boolean(),
9
9
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pedro.araujo/ml-architecture-shared",
3
- "version": "0.1.136",
3
+ "version": "0.1.138",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,9 +0,0 @@
1
- export declare enum AuctionItemStatus {
2
- REGISTERED = "REGISTERED",
3
- DELETED = "DELETED",
4
- CANCELED = "CANCELED",
5
- AUCTIONED = "AUCTIONED",
6
- SOLD = "SOLD",
7
- ARCHIVED = "ARCHIVED"
8
- }
9
- //# sourceMappingURL=auction-item-status-response.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auction-item-status-response.dto.d.ts","sourceRoot":"","sources":["../../src/auction-item-status/auction-item-status-response.dto.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,UAAU,eAAe;IACzB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB"}
@@ -1,9 +0,0 @@
1
- export var AuctionItemStatus;
2
- (function (AuctionItemStatus) {
3
- AuctionItemStatus["REGISTERED"] = "REGISTERED";
4
- AuctionItemStatus["DELETED"] = "DELETED";
5
- AuctionItemStatus["CANCELED"] = "CANCELED";
6
- AuctionItemStatus["AUCTIONED"] = "AUCTIONED";
7
- AuctionItemStatus["SOLD"] = "SOLD";
8
- AuctionItemStatus["ARCHIVED"] = "ARCHIVED";
9
- })(AuctionItemStatus || (AuctionItemStatus = {}));
@@ -1,19 +0,0 @@
1
- import { CreateAuctionSessionRequestDTO } from "../auction-session/create-auction-session-request.dto.js";
2
- export interface CreateExternalAuctionItemDTO {
3
- title: string;
4
- auctionLink: string;
5
- itemTypePublicId: string;
6
- auctionTypePublicId: string;
7
- auctionSourcePublicId: string;
8
- externalId: string;
9
- authorityPublicId?: string | null;
10
- sessions: CreateAuctionSessionRequestDTO[];
11
- jurisdiction?: string | null;
12
- auctioneerAppraisalValue?: number | null;
13
- marketAppraisalValue?: number | null;
14
- minimumBidAmount?: number | null;
15
- highestBidAmount?: number | null;
16
- notes?: string | null;
17
- photoUrl?: string | null;
18
- }
19
- //# sourceMappingURL=create-auction-item.dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-auction-item.dto.d.ts","sourceRoot":"","sources":["../../src/external-auction-item/create-auction-item.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAC;AAE1G,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IAEpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IAEnB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC,QAAQ,EAAE,8BAA8B,EAAE,CAAC;IAE3C,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B"}
@@ -1,4 +0,0 @@
1
- import { z } from "zod";
2
- import { CreateExternalAuctionItemDTO } from "./create-auction-item.dto.js";
3
- export declare const CreateExternalAuctionItemSchema: z.ZodType<CreateExternalAuctionItemDTO>;
4
- //# sourceMappingURL=create-auction-item.schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-auction-item.schema.d.ts","sourceRoot":"","sources":["../../src/external-auction-item/create-auction-item.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAE5E,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAAO,CAAC,4BAA4B,CA+ChF,CAAC"}
@@ -1,41 +0,0 @@
1
- import { z } from "zod";
2
- import { CreateAuctionSessionRequestSchema } from "../auction-session/create-auction-session-request.schema.js";
3
- import { NullableMoneySchema } from "../utils/nullable-money-schema.js";
4
- import { publicIdSchema } from "../public-id/public-id.schema.js";
5
- export const CreateExternalAuctionItemSchema = z.object({
6
- title: z.string().min(2).max(255),
7
- auctionLink: z.url().max(2048),
8
- itemTypePublicId: publicIdSchema(),
9
- auctionTypePublicId: publicIdSchema(),
10
- auctionSourcePublicId: publicIdSchema(),
11
- externalId: z.string().max(255),
12
- authorityPublicId: publicIdSchema().nullable().optional(),
13
- sessions: z
14
- .array(CreateAuctionSessionRequestSchema)
15
- .min(1, "Pelo menos uma sessão deve ser informada")
16
- .max(4, "O máximo permitido é de 4 sessões")
17
- .superRefine((sessions, ctx) => {
18
- const sequences = sessions.map((s) => s.sequence);
19
- const unique = new Set(sequences);
20
- if (unique.size !== sequences.length) {
21
- ctx.addIssue({
22
- code: z.ZodIssueCode.custom,
23
- message: "As sessões do leilão não podem possuir sequências repetidas",
24
- });
25
- }
26
- const hasAtLeastOneScheduledAt = sessions.some((session) => !!session.scheduledAt);
27
- if (!hasAtLeastOneScheduledAt) {
28
- ctx.addIssue({
29
- code: z.ZodIssueCode.custom,
30
- message: "Pelo menos uma sessão deve possuir data de agendamento",
31
- });
32
- }
33
- }),
34
- jurisdiction: z.string().max(100).nullable().optional(),
35
- auctioneerAppraisalValue: NullableMoneySchema.optional(),
36
- marketAppraisalValue: NullableMoneySchema.optional(),
37
- minimumBidAmount: NullableMoneySchema.optional(),
38
- highestBidAmount: NullableMoneySchema.optional(),
39
- notes: z.string().max(2000).nullable().optional(),
40
- photoUrl: z.url().max(2048).nullable().optional(),
41
- });