When I request Collection details through SDK, the response includes an object of Collection which includes fields list. Collection type defines fields as Record<string, unknown> but it should be Record<string, unknown>[].
/**
* This file was auto-generated by Fern from our API Definition.
*/
/**
* A collection object
*/
export interface Collection {
/** Unique identifier for a Collection */
id: string;
/** Name given to the Collection */
displayName?: string;
/** The name of one Item in Collection (e.g. ”Blog Post” if the Collection is called “Blog Posts”) */
singularName?: string;
/** Slug of Collection in Site URL structure */
slug?: string;
/** The date the collection was created */
createdOn?: Date;
/** The date the collection was last updated */
lastUpdated?: Date;
/** The list of fields in the Collection */
fields: Record<string, unknown>;
}
When I request Collection details through SDK, the response includes an object of Collection which includes
fields
list.Collection
type definesfields
asRecord<string, unknown>
but it should beRecord<string, unknown>[]
.My code:
This is
Collection.d.ts
file: