package.dist.src.webhookutils.index.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
Client SDK for Momento services
The newest version!
type Props = {
/**
* The signing secret associated with the webhook
*/
signingSecret: string;
/**
* The 'momento-signature' header passed with the request
*/
signature: string;
/**
* The stringified body of the request
*/
body: string;
};
export declare enum RequestValidation {
VALID = "valid",
INVALID = "invalid"
}
/**
* This function is a helper function that can be used to validate that webhook
* requests are coming from Momento. It is best practice to validate incoming
* request to a public webhook endpoint
* @param props {Props}
*/
export declare const validateWebhookRequest: (props: Props) => RequestValidation;
export {};