-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat(signature-collection-api): Expose canSign/info #16061
feat(signature-collection-api): Expose canSign/info #16061
Conversation
WalkthroughThe changes introduce new GraphQL input and model classes related to signature collection, enhancing the API's functionality. New methods for checking signing eligibility based on a national ID have been added to the resolver classes, along with a corresponding service method to retrieve signing information. These updates include necessary decorators for validation, access control, and auditing, ensuring that the new features integrate seamlessly into the existing architecture. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 3
Outside diff range and nitpick comments (1)
libs/api/domains/signature-collection/src/lib/dto/canSign.input.ts (1)
7-8
: Consider adding validation for National ID formatThe
signeeNationalId
field is currently validated as a string, but since National IDs have a specific format, consider adding additional validation to ensure it matches the expected pattern.Apply this diff to add pattern matching validation:
@Field() @IsString() +@Matches(/^\d{10}$/) signeeNationalId!: string
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (5)
- libs/api/domains/signature-collection/src/lib/dto/canSign.input.ts (1 hunks)
- libs/api/domains/signature-collection/src/lib/models/canSignInfo.model.ts (1 hunks)
- libs/api/domains/signature-collection/src/lib/signatureCollection.resolver.ts (2 hunks)
- libs/api/domains/signature-collection/src/lib/signatureCollectionAdmin.resolver.ts (2 hunks)
- libs/api/domains/signature-collection/src/lib/signatureCollectionAdmin.service.ts (3 hunks)
Additional context used
Path-based instructions (5)
libs/api/domains/signature-collection/src/lib/dto/canSign.input.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/api/domains/signature-collection/src/lib/models/canSignInfo.model.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/api/domains/signature-collection/src/lib/signatureCollectionAdmin.service.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/api/domains/signature-collection/src/lib/signatureCollection.resolver.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/api/domains/signature-collection/src/lib/signatureCollectionAdmin.resolver.ts (1)
Pattern
libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
Additional comments not posted (1)
libs/api/domains/signature-collection/src/lib/models/canSignInfo.model.ts (1)
1-9
: Code changes look goodThe
CanSignInfo
model is correctly defined with thereasons
field, and theReasonKey
enum is properly registered with GraphQL.
libs/api/domains/signature-collection/src/lib/signatureCollectionAdmin.service.ts
Show resolved
Hide resolved
libs/api/domains/signature-collection/src/lib/signatureCollection.resolver.ts
Show resolved
Hide resolved
libs/api/domains/signature-collection/src/lib/signatureCollectionAdmin.resolver.ts
Outdated
Show resolved
Hide resolved
Datadog ReportBranch report: ✅ 0 Failed, 4 Passed, 0 Skipped, 3.06s Total Time |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16061 +/- ##
==========================================
- Coverage 36.66% 36.66% -0.01%
==========================================
Files 6746 6746
Lines 138686 138670 -16
Branches 39397 39389 -8
==========================================
- Hits 50852 50840 -12
+ Misses 87834 87830 -4
Flags with carried forward coverage won't be shown. Click here to find out more. see 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
libs/api/domains/signature-collection/src/lib/models/canSignInfo.model.ts
Show resolved
Hide resolved
This PR currently has a merge conflict. Please resolve this and then re-add the |
This PR currently has a merge conflict. Please resolve this and then re-add the |
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation