Skip to content

Commit 0f3e715

Browse files
committed
Temporary patch to allow additional fieldData properties in CMS Item payloads
1 parent e6efe1e commit 0f3e715

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

src/api/resources/collections/resources/items/client/Client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ export class Items {
536536
},
537537
contentType: "application/json",
538538
requestType: "json",
539-
body: serializers.BulkCollectionItem.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
539+
body: serializers.BulkCollectionItem.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough" }),
540540
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
541541
maxRetries: requestOptions?.maxRetries,
542542
abortSignal: requestOptions?.abortSignal,
@@ -848,7 +848,7 @@ export class Items {
848848
},
849849
contentType: "application/json",
850850
requestType: "json",
851-
body: serializers.CollectionItem.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
851+
body: serializers.CollectionItem.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough" }),
852852
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
853853
maxRetries: requestOptions?.maxRetries,
854854
abortSignal: requestOptions?.abortSignal,
@@ -1160,7 +1160,7 @@ export class Items {
11601160
},
11611161
contentType: "application/json",
11621162
requestType: "json",
1163-
body: serializers.CollectionItem.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
1163+
body: serializers.CollectionItem.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough" }),
11641164
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
11651165
maxRetries: requestOptions?.maxRetries,
11661166
abortSignal: requestOptions?.abortSignal,

src/api/types/BulkCollectionItemFieldData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ export interface BulkCollectionItemFieldData {
77
name?: string;
88
/** URL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug. */
99
slug?: string;
10+
/** Additional CMS Item field properties with any name and any type */
11+
[key: string]: any;
1012
}

src/api/types/CollectionItemFieldData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ export interface CollectionItemFieldData {
77
name?: string;
88
/** URL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug. */
99
slug?: string;
10+
/** Additional CMS Item field properties with any name and any type */
11+
[key: string]: any;
1012
}

src/serialization/types/BulkCollectionItemFieldData.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ export declare namespace BulkCollectionItemFieldData {
1818
interface Raw {
1919
name?: string | null;
2020
slug?: string | null;
21+
[key: string]: any;
2122
}
2223
}

src/serialization/types/CollectionItemFieldData.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ export declare namespace CollectionItemFieldData {
1818
interface Raw {
1919
name?: string | null;
2020
slug?: string | null;
21+
[key: string]: any;
2122
}
2223
}

0 commit comments

Comments
 (0)