contentful-management
Version:
Client for Contentful's Content Management API
33 lines (32 loc) • 1.12 kB
TypeScript
import type { Link, DefaultElements } from '../common-types';
import type { MakeRequest } from '../common-types';
export type FunctionProps = {
sys: {
id: string;
type: 'Function';
createdBy: Link<'User'>;
createdAt: string;
updatedBy: Link<'User'>;
updatedAt: string;
organization: Link<'Organization'>;
appDefinition: Link<'AppDefinition'>;
};
name: string;
description: string;
path: string;
accepts: string[];
allowNetworks?: string[];
};
export interface Function extends FunctionProps, DefaultElements<FunctionProps> {
}
/**
* @private
* @param makeRequest - (real) function to make requests via an adapter
* @param data - raw contentful-Function data
* @return Wrapped Function data
*/
export declare function wrapFunction(makeRequest: MakeRequest, data: FunctionProps): FunctionProps;
/**
* @private
*/
export declare const wrapFunctionCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp<FunctionProps>) => import("../common-types").Collection<FunctionProps, FunctionProps>;