UNPKG

1.25 kBTypeScriptView Raw
1import { ContentfulOrganizationAPI } from '../create-organization-api';
2import { MetaSysProps, DefaultElements, MakeRequest } from '../common-types';
3export declare type Organization = DefaultElements<OrganizationProp> & OrganizationProp & ContentfulOrganizationAPI;
4export declare type OrganizationProp = {
5 /**
6 * System metadata
7 */
8 sys: MetaSysProps;
9 /**
10 * Name
11 */
12 name: string;
13};
14/**
15 * This method creates the API for the given organization with all the methods for
16 * reading and creating other entities. It also passes down a clone of the
17 * http client with an organization id, so the base path for requests now has the
18 * organization id already set.
19 * @private
20 * @param makeRequest - function to make requests via an adapter
21 * @param data - API response for an Organization
22 * @return {Organization}
23 */
24export declare function wrapOrganization(makeRequest: MakeRequest, data: OrganizationProp): Organization;
25/**
26 * This method normalizes each organization in a collection.
27 * @private
28 */
29export declare const wrapOrganizationCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp<OrganizationProp>) => import("../common-types").Collection<Organization, OrganizationProp>;