UNPKG

contentful-management

Version:
35 lines (34 loc) 1.28 kB
import type { BasicMetaSysProps, DefaultElements, MakeRequest } from '../common-types'; import type { ContentfulSpaceAPI } from '../create-space-api'; export type SpaceProps = { sys: BasicMetaSysProps & { organization: { sys: { id: string; }; }; archivedAt?: string; }; name: string; }; export type UnarchiveProps = { productId: string; }; export type Space = SpaceProps & DefaultElements<SpaceProps> & ContentfulSpaceAPI; /** * This method creates the API for the given space with all the methods for * reading and creating other entities. It also passes down a clone of the * http client with a space id, so the base path for requests now has the * space id already set. * @internal * @param makeRequest - function to make requests via an adapter * @param data - API response for a Space * @returns {Space} */ export declare function wrapSpace(makeRequest: MakeRequest, data: SpaceProps): Space; /** * This method wraps each space in a collection with the space API. See wrapSpace * above for more details. * @internal */ export declare const wrapSpaceCollection: (makeRequest: MakeRequest, data: import("..").CollectionProp<SpaceProps>) => import("..").Collection<Space, SpaceProps>;