-
Notifications
You must be signed in to change notification settings - Fork 10
Use Cases of Get and Delete a template #406
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
base: develop
Are you sure you want to change the base?
Use Cases of Get and Delete a template #406
Conversation
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.
Pull request overview
This PR restructures template-related functionality into a dedicated /templates module and adds new use cases for getting and deleting templates. The changes move template operations from the datasets and collections modules to a more appropriate domain-specific location.
Key Changes:
- Created new Templates module with dedicated use cases: CreateTemplate, GetTemplate, GetDatasetTemplates, and DeleteTemplate
- Migrated template functionality from datasets and collections modules to the new templates module
- Added comprehensive unit, integration, and functional tests for the new template operations
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/templates/domain/useCases/GetTemplate.ts | New use case for retrieving a single template by ID |
| src/templates/domain/useCases/DeleteTemplate.ts | New use case for deleting a template by ID |
| src/templates/domain/useCases/CreateTemplate.ts | Migrated and updated CreateTemplate use case from collections module |
| src/templates/domain/useCases/GetDatasetTemplates.ts | Migrated use case for getting templates by collection |
| src/templates/domain/repositories/ITemplatesRepository.ts | New repository interface defining template operations |
| src/templates/domain/models/Template.ts | Updated template model definitions (renamed from DatasetTemplate) |
| src/templates/infra/repositories/TemplatesRepository.ts | New repository implementation for template operations |
| src/templates/infra/repositories/transformers/templateTransformers.ts | Transformer logic migrated from datasets module |
| src/templates/infra/repositories/transformers/TemplatePayload.ts | Updated payload interface for templates |
| src/templates/index.ts | Module exports for templates domain |
| src/index.ts | Added templates module to main exports |
| test/unit/templates/*.test.ts | New unit tests for template use cases |
| test/integration/templates/TemplateRepository.test.ts | Comprehensive integration tests for template repository |
| test/functional/templates/createDatasetTemplate.test.ts | Updated functional test with new import paths |
| src/datasets/domain/useCases/GetDatasetTemplates.ts | Removed - migrated to templates module |
| src/datasets/infra/repositories/transformers/datasetTemplateTransformers.ts | Removed - migrated to templates module |
| src/collections/domain/useCases/CreateDatasetTemplate.ts | Removed - migrated to templates module |
| src/collections/infra/repositories/CollectionsRepository.ts | Removed createDatasetTemplate method |
| docs/useCases.md | Updated documentation with new Templates section and reorganized template use cases |
| CHANGELOG.md | Updated with new template use cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| - New Use Case: [Get Collections For Linking Use Case](./docs/useCases.md#get-collections-for-linking). | ||
| - New Use Case: [Create a Dataset Template](./docs/useCases.md#create-a-dataset-template) under Collections. | ||
|
|
||
| - New Use Case: [Create a Template](./docs/useCases.md#create-a-template) under Templates. | ||
|
|
||
| - New Use Case: [Get a Template](./docs/useCases.md#get-a-template) under Templates. | ||
|
|
||
| - New Use Case: [Delete a Template](./docs/useCases.md#delete-a-template) under Templates. |
Copilot
AI
Jan 8, 2026
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.
Documentation formatting: There's inconsistent spacing in the CHANGELOG. Line 12 has an empty line before the entry, line 14 has an empty line before the entry, but there's no empty line before lines 15, 17, and 19. Consider adding consistent empty lines between all new use case entries for better readability.
What this PR does / why we need it:
Which issue(s) this PR closes:
Related Dataverse PRs:
Special notes for your reviewer:
Templateinstead ofDataset Template, besidesgetDatasetTemplatesuse caseSuggestions on how to test this:
Is there a release notes or changelog update needed for this change?:
YES
Additional documentation: