contentful-management
Version:
Client for Contentful's Content Management API
34 lines (33 loc) • 1.36 kB
TypeScript
import type { ContentfulOrganizationAPI } from '../create-organization-api';
import type { MetaSysProps, DefaultElements, MakeRequest } from '../common-types';
export type Organization = DefaultElements<OrganizationProps> & OrganizationProps & ContentfulOrganizationAPI;
export type OrganizationProps = {
/**
* System metadata
*/
sys: MetaSysProps;
/**
* Name
*/
name: string;
};
/**
* @deprecated Use `OrganizationProps` instead.
*/
export type OrganizationProp = OrganizationProps;
/**
* This method creates the API for the given organization with all the methods for
* reading and creating other entities. It also passes down a clone of the
* http client with an organization id, so the base path for requests now has the
* organization id already set.
* @private
* @param makeRequest - function to make requests via an adapter
* @param data - API response for an Organization
* @return {Organization}
*/
export declare function wrapOrganization(makeRequest: MakeRequest, data: OrganizationProps): Organization;
/**
* This method normalizes each organization in a collection.
* @private
*/
export declare const wrapOrganizationCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp<OrganizationProps>) => import("../common-types").Collection<Organization, OrganizationProps>;