contentful-management
Version:
Client for Contentful's Content Management API
47 lines (46 loc) • 1.54 kB
TypeScript
import type { Link, DefaultElements } from '../common-types';
import type { MakeRequest } from '../common-types';
export type FunctionLogProps = {
sys: {
id: string;
type: 'FunctionLog';
createdBy: Link<'User'>;
createdAt: string;
space: Link<'Space'>;
environment: Link<'Environment'>;
appDefinition: Link<'AppDefinition'>;
};
severity: {
info: number;
warn: number;
error: number;
};
requestId: string;
event: {
type: string;
query: string;
isIntrospectionQuery: boolean;
variables: Record<string, any>;
};
messages: Array<{
timestamp: number;
type: 'INFO' | 'ERROR' | 'WARN';
message: string;
}>;
};
export interface FunctionLog extends FunctionLogProps, DefaultElements<FunctionLogProps> {
}
/**
* @private
* @param makeRequest - function to make requests via an adapter
* @param data - raw contentful-Function data
* @return Wrapped Function data
*/
export declare function wrapFunctionLog(makeRequest: MakeRequest, data: FunctionLogProps): FunctionLogProps;
/**
* @private
* @param makeRequest - function to make requests via an adapter
* @param data - raw contentful-function data
* @return Wrapped App Function collection data
*/
export declare const wrapFunctionLogCollection: (makeRequest: MakeRequest, data: import("../common-types").CollectionProp<FunctionLogProps>) => import("../common-types").Collection<FunctionLogProps, FunctionLogProps>;