Skip to content

Commit ef48106

Browse files
committed
manually add back optional object key types
1 parent 7983a73 commit ef48106

16 files changed

+96
-96
lines changed

src/api/types/Asset.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ import * as Webflow from "../index";
99
*/
1010
export interface Asset {
1111
/** Unique identifier for this asset */
12-
id: string;
12+
id?: string;
1313
/** File format type */
14-
contentType: string;
14+
contentType?: string;
1515
/** size in bytes */
16-
size: number;
16+
size?: number;
1717
/** Unique identifier for the site that hosts this asset */
18-
siteId: string;
18+
siteId?: string;
1919
/** Link to the asset */
20-
hostedUrl: string;
20+
hostedUrl?: string;
2121
/** Original file name at the time of upload */
22-
originalFileName: string;
22+
originalFileName?: string;
2323
/** Display name of the asset */
24-
displayName: string;
24+
displayName?: string;
2525
/** Date the asset metadata was last updated */
26-
lastUpdated: Date;
26+
lastUpdated?: Date;
2727
/** Date the asset metadata was created */
28-
createdOn: Date;
28+
createdOn?: Date;
2929
/** A list of [asset variants](https://help.webflow.com/hc/en-us/articles/33961378697107-Responsive-images) created by Webflow to serve your site responsively. */
30-
variants: Webflow.AssetVariant[];
30+
variants?: Webflow.AssetVariant[];
3131
/** The visual description of the asset */
3232
altText?: string;
3333
}

src/api/types/AssetVariant.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
*/
88
export interface AssetVariant {
99
/** URL of where the asset variant is hosted */
10-
hostedUrl: string;
10+
hostedUrl?: string;
1111
/** Original file name of the variant */
12-
originalFileName: string;
12+
originalFileName?: string;
1313
/** Display name of the variant */
14-
displayName: string;
14+
displayName?: string;
1515
/** format of the variant */
16-
format: string;
16+
format?: string;
1717
/** Width in pixels */
18-
width: number;
18+
width?: number;
1919
/** Height in pixels */
20-
height: number;
20+
height?: number;
2121
/** Value between 0 and 100 representing the image quality */
22-
quality: number;
22+
quality?: number;
2323
/** Any associated validation errors */
2424
error?: string;
2525
}

src/api/types/Collection.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export interface Collection {
1111
/** Unique identifier for a Collection */
1212
id: string;
1313
/** Name given to the Collection */
14-
displayName: string;
14+
displayName?: string;
1515
/** The name of one Item in Collection (e.g. ”Blog Post” if the Collection is called “Blog Posts”) */
16-
singularName: string;
16+
singularName?: string;
1717
/** Slug of Collection in Site URL structure */
1818
slug?: string;
1919
/** The date the collection was created */

src/api/types/CollectionItem.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ export interface CollectionItem {
1717
/** Identifier for the locale of the CMS item */
1818
cmsLocaleId?: string;
1919
/** The date the item was last published */
20-
lastPublished: string;
20+
lastPublished?: string;
2121
/** The date the item was last updated */
22-
lastUpdated: string;
22+
lastUpdated?: string;
2323
/** The date the item was created */
24-
createdOn: string;
24+
createdOn?: string;
2525
/** Boolean determining if the Item is set to archived */
2626
isArchived?: boolean;
2727
/** Boolean determining if the Item is set to draft */

src/api/types/ComponentNode.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import * as Webflow from "../index";
99
*/
1010
export interface ComponentNode {
1111
/** The unique identifier of the component instance node */
12-
id: string;
12+
id?: string;
1313
/** The unique identifier of the component */
14-
componentId: string;
14+
componentId?: string;
1515
/** List of component properties with overrides for a component instance. */
16-
propertyOverrides: Webflow.ComponentProperty[];
16+
propertyOverrides?: Webflow.ComponentProperty[];
1717
}

src/api/types/ImageNode.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import * as Webflow from "../index";
99
*/
1010
export interface ImageNode {
1111
/** Node UUID */
12-
id: string;
12+
id?: string;
1313
/** The image details of the node */
14-
image: Webflow.ImageNodeImage;
14+
image?: Webflow.ImageNodeImage;
1515
/** The custom attributes of the node */
1616
attributes?: Record<string, string>;
1717
}

src/api/types/Pagination.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88
export interface Pagination {
99
/** The limit used for pagination */
10-
limit: number;
10+
limit?: number;
1111
/** The offset used for pagination */
12-
offset: number;
12+
offset?: number;
1313
/** The total number of records */
14-
total: number;
14+
total?: number;
1515
}

src/api/types/TextNode.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import * as Webflow from "../index";
99
*/
1010
export interface TextNode {
1111
/** Node UUID */
12-
id: string;
12+
id?: string;
1313
/** The text content of the node */
14-
text: Webflow.TextNodeText;
14+
text?: Webflow.TextNodeText;
1515
/** The custom attributes of the node */
1616
attributes?: Record<string, string>;
1717
}

src/serialization/types/Asset.ts

+20-20
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,31 @@ import * as core from "../../core";
88
import { AssetVariant } from "./AssetVariant";
99

1010
export const Asset: core.serialization.ObjectSchema<serializers.Asset.Raw, Webflow.Asset> = core.serialization.object({
11-
id: core.serialization.string(),
12-
contentType: core.serialization.string(),
13-
size: core.serialization.number(),
14-
siteId: core.serialization.string(),
15-
hostedUrl: core.serialization.string(),
16-
originalFileName: core.serialization.string(),
17-
displayName: core.serialization.string(),
18-
lastUpdated: core.serialization.date(),
19-
createdOn: core.serialization.date(),
20-
variants: core.serialization.list(AssetVariant),
11+
id: core.serialization.string().optional(),
12+
contentType: core.serialization.string().optional(),
13+
size: core.serialization.number().optional(),
14+
siteId: core.serialization.string().optional(),
15+
hostedUrl: core.serialization.string().optional(),
16+
originalFileName: core.serialization.string().optional(),
17+
displayName: core.serialization.string().optional(),
18+
lastUpdated: core.serialization.date().optional(),
19+
createdOn: core.serialization.date().optional(),
20+
variants: core.serialization.list(AssetVariant).optional(),
2121
altText: core.serialization.string().optional(),
2222
});
2323

2424
export declare namespace Asset {
2525
interface Raw {
26-
id: string;
27-
contentType: string;
28-
size: number;
29-
siteId: string;
30-
hostedUrl: string;
31-
originalFileName: string;
32-
displayName: string;
33-
lastUpdated: string;
34-
createdOn: string;
35-
variants: AssetVariant.Raw[];
26+
id?: string | null;
27+
contentType?: string | null;
28+
size?: number | null;
29+
siteId?: string | null;
30+
hostedUrl?: string | null;
31+
originalFileName?: string | null;
32+
displayName?: string | null;
33+
lastUpdated?: string | null;
34+
createdOn?: string | null;
35+
variants?: AssetVariant.Raw[] | null;
3636
altText?: string | null;
3737
}
3838
}

src/serialization/types/AssetVariant.ts

+14-14
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ import * as core from "../../core";
88

99
export const AssetVariant: core.serialization.ObjectSchema<serializers.AssetVariant.Raw, Webflow.AssetVariant> =
1010
core.serialization.object({
11-
hostedUrl: core.serialization.string(),
12-
originalFileName: core.serialization.string(),
13-
displayName: core.serialization.string(),
14-
format: core.serialization.string(),
15-
width: core.serialization.number(),
16-
height: core.serialization.number(),
17-
quality: core.serialization.number(),
11+
hostedUrl: core.serialization.string().optional(),
12+
originalFileName: core.serialization.string().optional(),
13+
displayName: core.serialization.string().optional(),
14+
format: core.serialization.string().optional(),
15+
width: core.serialization.number().optional(),
16+
height: core.serialization.number().optional(),
17+
quality: core.serialization.number().optional(),
1818
error: core.serialization.string().optional(),
1919
});
2020

2121
export declare namespace AssetVariant {
2222
interface Raw {
23-
hostedUrl: string;
24-
originalFileName: string;
25-
displayName: string;
26-
format: string;
27-
width: number;
28-
height: number;
29-
quality: number;
23+
hostedUrl?: string | null;
24+
originalFileName?: string | null;
25+
displayName?: string | null;
26+
format?: string | null;
27+
width?: number | null;
28+
height?: number | null;
29+
quality?: number | null;
3030
error?: string | null;
3131
}
3232
}

src/serialization/types/Collection.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { Field } from "./Field";
1010
export const Collection: core.serialization.ObjectSchema<serializers.Collection.Raw, Webflow.Collection> =
1111
core.serialization.object({
1212
id: core.serialization.string(),
13-
displayName: core.serialization.string(),
14-
singularName: core.serialization.string(),
13+
displayName: core.serialization.string().optional(),
14+
singularName: core.serialization.string().optional(),
1515
slug: core.serialization.string().optional(),
1616
createdOn: core.serialization.date().optional(),
1717
lastUpdated: core.serialization.date().optional(),
@@ -21,8 +21,8 @@ export const Collection: core.serialization.ObjectSchema<serializers.Collection.
2121
export declare namespace Collection {
2222
interface Raw {
2323
id: string;
24-
displayName: string;
25-
singularName: string;
24+
displayName?: string | null;
25+
singularName?: string | null;
2626
slug?: string | null;
2727
createdOn?: string | null;
2828
lastUpdated?: string | null;

src/serialization/types/CollectionItem.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export const CollectionItem: core.serialization.ObjectSchema<serializers.Collect
1111
core.serialization.object({
1212
id: core.serialization.string().optional(),
1313
cmsLocaleId: core.serialization.string().optional(),
14-
lastPublished: core.serialization.string(),
15-
lastUpdated: core.serialization.string(),
16-
createdOn: core.serialization.string(),
14+
lastPublished: core.serialization.string().optional(),
15+
lastUpdated: core.serialization.string().optional(),
16+
createdOn: core.serialization.string().optional(),
1717
isArchived: core.serialization.boolean().optional(),
1818
isDraft: core.serialization.boolean().optional(),
1919
fieldData: CollectionItemFieldData,
@@ -23,9 +23,9 @@ export declare namespace CollectionItem {
2323
interface Raw {
2424
id?: string | null;
2525
cmsLocaleId?: string | null;
26-
lastPublished: string;
27-
lastUpdated: string;
28-
createdOn: string;
26+
lastPublished?: string | null;
27+
lastUpdated?: string | null;
28+
createdOn?: string | null;
2929
isArchived?: boolean | null;
3030
isDraft?: boolean | null;
3131
fieldData: CollectionItemFieldData.Raw;

src/serialization/types/ComponentNode.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import { ComponentProperty } from "./ComponentProperty";
99

1010
export const ComponentNode: core.serialization.ObjectSchema<serializers.ComponentNode.Raw, Webflow.ComponentNode> =
1111
core.serialization.object({
12-
id: core.serialization.string(),
13-
componentId: core.serialization.string(),
14-
propertyOverrides: core.serialization.list(ComponentProperty),
12+
id: core.serialization.string().optional(),
13+
componentId: core.serialization.string().optional(),
14+
propertyOverrides: core.serialization.list(ComponentProperty).optional(),
1515
});
1616

1717
export declare namespace ComponentNode {
1818
interface Raw {
19-
id: string;
20-
componentId: string;
21-
propertyOverrides: ComponentProperty.Raw[];
19+
id?: string | null;
20+
componentId?: string | null;
21+
propertyOverrides?: ComponentProperty.Raw[] | null;
2222
}
2323
}

src/serialization/types/ImageNode.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import { ImageNodeImage } from "./ImageNodeImage";
99

1010
export const ImageNode: core.serialization.ObjectSchema<serializers.ImageNode.Raw, Webflow.ImageNode> =
1111
core.serialization.object({
12-
id: core.serialization.string(),
13-
image: ImageNodeImage,
12+
id: core.serialization.string().optional(),
13+
image: ImageNodeImage.optional(),
1414
attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(),
1515
});
1616

1717
export declare namespace ImageNode {
1818
interface Raw {
19-
id: string;
20-
image: ImageNodeImage.Raw;
19+
id?: string | null;
20+
image?: ImageNodeImage.Raw | null;
2121
attributes?: Record<string, string> | null;
2222
}
2323
}

src/serialization/types/Pagination.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import * as core from "../../core";
88

99
export const Pagination: core.serialization.ObjectSchema<serializers.Pagination.Raw, Webflow.Pagination> =
1010
core.serialization.object({
11-
limit: core.serialization.number(),
12-
offset: core.serialization.number(),
13-
total: core.serialization.number(),
11+
limit: core.serialization.number().optional(),
12+
offset: core.serialization.number().optional(),
13+
total: core.serialization.number().optional(),
1414
});
1515

1616
export declare namespace Pagination {
1717
interface Raw {
18-
limit: number;
19-
offset: number;
20-
total: number;
18+
limit?: number | null;
19+
offset?: number | null;
20+
total?: number | null;
2121
}
2222
}

src/serialization/types/TextNode.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ import { TextNodeText } from "./TextNodeText";
99

1010
export const TextNode: core.serialization.ObjectSchema<serializers.TextNode.Raw, Webflow.TextNode> =
1111
core.serialization.object({
12-
id: core.serialization.string(),
13-
text: TextNodeText,
12+
id: core.serialization.string().optional(),
13+
text: TextNodeText.optional(),
1414
attributes: core.serialization.record(core.serialization.string(), core.serialization.string()).optional(),
1515
});
1616

1717
export declare namespace TextNode {
1818
interface Raw {
19-
id: string;
20-
text: TextNodeText.Raw;
19+
id?: string | null;
20+
text?: TextNodeText.Raw | null;
2121
attributes?: Record<string, string> | null;
2222
}
2323
}

0 commit comments

Comments
 (0)