Skip to content

Commit ddbed52

Browse files
committed
fix: some properties on AssetVariant need to be optional
1 parent bfe1d9e commit ddbed52

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/api/types/AssetVariant.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
*/
66
export interface AssetVariant {
77
/** URL of where the asset variant is hosted */
8-
hostedUrl: string;
8+
hostedUrl?: string;
99
/** Original file name of the variant */
10-
originalFileName: string;
10+
originalFileName?: string;
1111
/** Display name of the variant */
12-
displayName: string;
12+
displayName?: string;
1313
/** format of the variant */
14-
format: string;
14+
format?: string;
1515
/** Width in pixels */
16-
width: number;
16+
width?: number;
1717
/** Height in pixels */
1818
height?: number;
1919
/** Value between 0 and 100 representing the image quality */

src/serialization/types/AssetVariant.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ import type * as serializers from "../index";
66

77
export const AssetVariant: core.serialization.ObjectSchema<serializers.AssetVariant.Raw, Webflow.AssetVariant> =
88
core.serialization.object({
9-
hostedUrl: core.serialization.string(),
10-
originalFileName: core.serialization.string(),
11-
displayName: core.serialization.string(),
12-
format: core.serialization.string(),
13-
width: core.serialization.number(),
9+
hostedUrl: core.serialization.string().optional(),
10+
originalFileName: core.serialization.string().optional(),
11+
displayName: core.serialization.string().optional(),
12+
format: core.serialization.string().optional(),
13+
width: core.serialization.number().optional(),
1414
height: core.serialization.number().optional(),
15-
quality: core.serialization.number(),
15+
quality: core.serialization.number().optional(),
1616
error: core.serialization.string().optional(),
1717
});
1818

1919
export declare namespace AssetVariant {
2020
export interface Raw {
21-
hostedUrl: string;
22-
originalFileName: string;
23-
displayName: string;
24-
format: string;
25-
width: number;
21+
hostedUrl: string | null;
22+
originalFileName: string | null;
23+
displayName: string | null;
24+
format: string | null;
25+
width: number | null;
2626
height?: number | null;
27-
quality: number;
27+
quality: number | null;
2828
error?: string | null;
2929
}
3030
}

0 commit comments

Comments
 (0)