FEAT: update CustomerSidebarSection and related DTOs to use object type for title; update protospack-v2 version; update from id to customerId

This commit is contained in:
viniciusgadea
2026-03-25 15:40:57 -03:00
parent 01afa69fcb
commit bf4f3cfd8c
5 changed files with 201 additions and 42 deletions
+2 -2
View File
@@ -70,7 +70,7 @@ export class CustomersService implements OnModuleInit {
async getLinks(customerId: string): Promise<CustomerLinksConfig | null> {
try {
const result = await lastValueFrom(
this.customerService.CustomerGetLinks({ id: customerId }),
this.customerService.CustomerGetLinks({ customerId }),
);
return (result.links as CustomerLinksConfig) || null;
} catch (err) {
@@ -88,7 +88,7 @@ export class CustomersService implements OnModuleInit {
try {
return await firstValueFrom(
this.customerService.CustomerSetLinks({
id: customerId,
customerId,
links: links as CustomerSetLinksRequest['links'],
}),
);
+6 -6
View File
@@ -14,8 +14,8 @@ export class CustomerLinkItem {
export class CustomerSidebarLinkItem {
@ApiProperty()
type: 'link';
@ApiProperty()
title: string;
@ApiProperty({ type: Object })
title: Record<string, string>;
@ApiProperty()
link: string;
@ApiPropertyOptional()
@@ -25,8 +25,8 @@ export class CustomerSidebarLinkItem {
export class CustomerSidebarMenuItem {
@ApiProperty()
type: 'menu';
@ApiProperty()
title: string;
@ApiProperty({ type: Object })
title: Record<string, string>;
@ApiPropertyOptional()
icon?: string;
@ApiProperty({ type: [CustomerSidebarLinkItem] })
@@ -34,8 +34,8 @@ export class CustomerSidebarMenuItem {
}
export class CustomerSidebarSection {
@ApiProperty()
title: string;
@ApiProperty({ type: Object })
title: Record<string, string>;
@ApiProperty({
type: 'array',
items: {