import { Request } from "@pepperi-addons/debug-server/dist"; import { APIGatewayProxyEventPathParameters } from "aws-lambda"; export interface CodeJobMessage { MessageType: string; AddonData: { AddonUUID: string | undefined | null; AddonPath: string; AddonVersion: string | undefined | null; }; UUID: string | undefined | null; DistributorUUID: string | undefined | null; NumberOfTry: number; NumberOfTries: number; UserUUID: string | undefined | null; ExecutionMemoryLevel: number; FunctionName: string | undefined | null; FunctionPath?: string | undefined | null; CallbackUUID: string | undefined | null; Request: Request; StartDateTime?: Date; EndDateTime?: Date; } export interface LoggingHeaderDictionary { [key: string]: any; CodeJobUUID: string; DistributorUUID: string; AddonUUID?: string; ActionUUID: string; CodeRevisionURL: string; UserUUID: string; NumberOfTry: number; Pid: number; Machine?: string; Source?: string; ThreadId: number; Exception?: any; LambdaVersion?: string; RequestID: string; Message?: string; Level?: string; IsClientLog?: 0 | 1; LambdaMemorySize?: number; Duration?: number; } export interface LoggerObject { error: (message: string, ...args: any[]) => void; log: (message: string, ...args: any[]) => void; warning: (message: string, ...args: any[]) => void; warn: (message: string, ...args: any[]) => void; debug: (message: string, ...args: any[]) => void; } export interface ErrorResponse { success: string | boolean; errorMessage: string; errorCode: string; resultObject: any; } export interface Client { AddonUUID: string; BaseURL: string; AssetsBaseUrl: string; OAuthAccessToken: string; Retry: (delay: number) => void; CodeRevisionURL?: string; AddonSecretKey?: string; ExecutionUUID?: string; NumberOfTry?: number; Module?: any; ActionUUID?: string; ValidatePermission: (policyName: string) => Promise; isAsync?: () => boolean; isDebug?: boolean; } export interface ResponseParameters { Exception?: { errorMessage: string; }; } export interface UpdateResult { SucceedToRetry?: boolean | "ignore"; success?: boolean | any; } export interface AddonExecutionData { PathToExecute: string; FunctionName: string; CdnBaseURL: string; ClientObject: Client; } export declare type HttpMethod = "GET" | "POST" | "PUT" | "DELETE"; export interface AddonRunnerParameters { /** * The body of the request, will be passed to the function on the request object */ Body: any; /** * The headers of the request * All "X-Pepperi-*" headers are passed to the function on the request object */ Headers: { /** * The bearer token of the request */ Authorization: string; /** * The Action UUID of the request. If it is not provided, a random UUID will be generated */ ActionID?: string; [key: string]: string | undefined; }; /** * The query string parameters of the request will be passed to the function on the request object */ QueryStringParameters: APIGatewayProxyEventPathParameters | null; /** * These parameters determine the addon to run, its version, the requested file and function to run */ HostedFunctionParameters: { AddonVersion: string; AddonUUID: string; AddonFunctionName: string; AddonFileName: string; }; /** * The http method of the request */ HttpMethod: HttpMethod; PathParameters: APIGatewayProxyEventPathParameters | null; }