Skip to content
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

chore(mm): change merchant monitoring to use v1 #2634

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class BusinessReportControllerInternal {
merchantName,
businessCorrelationId,
reportType,
workflowVersion,
}: CreateBusinessReportDto,
@CurrentProject() currentProjectId: TProjectId,
) {
Expand Down Expand Up @@ -123,6 +124,7 @@ export class BusinessReportControllerInternal {
reportType,
withQualityControl,
callbackUrl: `${env.APP_API_URL}/api/v1/internal/business-reports/hook?businessId=${business.id}&businessReportId=${businessReport.id}`,
workflowVersion: workflowVersion || '1',
metadata: {
customerId: customer.id,
customerName: customer.displayName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,12 @@ export class CreateBusinessReportDto {
})
@IsIn(Object.values(BusinessReportType))
reportType!: ObjectValues<typeof BusinessReportType>;

@ApiProperty({
required: false,
type: String,
})
@MinLength(1)
@IsString()
workflowVersion!: string;
Comment on lines +49 to +55
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify the optionality of workflowVersion.

The workflowVersion property is described as optional in the PR summary but is marked as required (!:) in the code. Consider aligning the code with the intended design by making it optional if that's the requirement.

-  workflowVersion!: string;
+  workflowVersion?: string;
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@ApiProperty({
required: false,
type: String,
})
@MinLength(1)
@IsString()
workflowVersion!: string;
@ApiProperty({
required: false,
type: String,
})
@MinLength(1)
@IsString()
workflowVersion?: string;

}
Loading