UNPKG

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