-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implementação de reuso e padrões MVP #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… funcional, nível de senioridade, status de integração, tipo de unidade e tipo de vínculo
- Moved TipoUnidade type definitions to enums for better consistency and maintainability. - Updated imports in departments.types.ts, departments.utils.ts, department.dto.ts, and job-titles.types.ts to use the new enum. - Refactored utility functions to return enum values instead of string literals for TipoUnidade. - Removed redundant TipoUnidade definitions from job-titles.types.ts and tipo-unidade.const.ts. - Adjusted the enum values to use hyphens instead of underscores for COORDENACAO_GERAL and SECRETARIA_GERAL. - Ensured type safety and consistency across the application by utilizing the new enum in all relevant files.
…ções de validação
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export enum FamiliaFuncional { | ||
| GESTAO = "gestao", | ||
| ADMINISTRATIVO = "administrativo", | ||
| JURIDICO = "juridico", | ||
| CONTROLE_INTERNO = "controle_interno", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preserve existing FamiliaFuncional literals
The new enum assigns CONTROLE_INTERNO the literal "controle_interno". Prior versions exposed this value as "controle-interno" and existing datasets and validation helpers still emit the hyphenated form. Changing the serialized value to use an underscore will cause isFamiliaFuncional/assertFamiliaFuncional to reject all previously valid data and break any consumer persisting the old string, yet the package version only bumps a patch. Unless a migration is performed across all downstream services, this literal needs to stay "controle-interno" to remain backward compatible.
Useful? React with 👍 / 👎.
| export enum NivelSenioridade { | ||
| DIRETOR = "diretor", | ||
| COORDENADOR_GERAL = "coordenador_geral", | ||
| COORDENADOR = "coordenador", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep NivelSenioridade values backward compatible
The enum now exposes COORDENADOR_GERAL with the serialized value "coordenador_geral", replacing the previously published literal "coordenador-geral". Any stored job records, JSON schemas, or code using the hyphenated string will now fail validation and coercion, but the change ships under a beta patch version. To avoid breaking consumers, the enum should keep the hyphenated literal and only adjust the property name if needed.
Useful? React with 👍 / 👎.
- Adicionar .turbo/ ao .gitignore - Atualizar workflows CI para self-hosted runners (Node 22, PNPM 10) - Atualizar .changeset/config.json Relacionado: feat/reuso-padroes-mvp
📋 Descrição
Implementação da estratégia de reuso e padrões definida para o super workspace ANPD.
🎯 Objetivos
@anpdgovbr/shared-*)📦 Mudanças Principais
Dependências
@anpdgovbr/shared-*packagesworkspace:*protocolConfiguração
tsconfig.base.jsoneslint.config.mjscentralizado.prettierrc.jsonMetadados
🧪 Status dos Testes
📚 Documentação Relacionada
🔗 PRs Relacionados
Parte da iniciativa de consolidação do super workspace ANPD.
Repos afetados:
✅ Checklist