feat: update links field (#5212)
Closes #5113 --------- Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
This commit is contained in:
@ -29,5 +29,5 @@ export const linksCompositeType: CompositeType = {
|
||||
export type LinksMetadata = {
|
||||
primaryLinkLabel: string;
|
||||
primaryLinkUrl: string;
|
||||
secondaryLinks: JSON | null;
|
||||
secondaryLinks: object | null;
|
||||
};
|
||||
|
||||
@ -2,10 +2,10 @@ import {
|
||||
IsArray,
|
||||
IsBoolean,
|
||||
IsDate,
|
||||
IsJSON,
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsNumberString,
|
||||
IsObject,
|
||||
IsString,
|
||||
Matches,
|
||||
ValidateIf,
|
||||
@ -28,9 +28,9 @@ export class FieldMetadataDefaultValueString {
|
||||
}
|
||||
|
||||
export class FieldMetadataDefaultValueRawJson {
|
||||
@ValidateIf((object, value) => value !== null)
|
||||
@IsJSON()
|
||||
value: JSON | null;
|
||||
@ValidateIf((_object, value) => value !== null)
|
||||
@IsObject()
|
||||
value: object | null;
|
||||
}
|
||||
|
||||
export class FieldMetadataDefaultValueNumber {
|
||||
@ -149,6 +149,6 @@ export class FieldMetadataDefaultValueLinks {
|
||||
primaryLinkUrl: string | null;
|
||||
|
||||
@ValidateIf((_object, value) => value !== null)
|
||||
@IsJSON()
|
||||
secondaryLinks: JSON | null;
|
||||
@IsObject()
|
||||
secondaryLinks: object | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user