parseImageEdits(event, requestType) {
        if (requestType === "Default") {
            const decoded = this.decodeRequest(event);
            return decoded.edits;
        } else if (requestType === "Thumbor") {
            const thumborMapping = new ThumborMapping();
            thumborMapping.process(event);
            return thumborMapping.edits;
        } else if (requestType === "Custom") {
            const thumborMapping = new ThumborMapping();
            const parsedPath = thumborMapping.parseCustomPath(event.path);
            thumborMapping.process(parsedPath);
            return thumborMapping.edits;
        } else {
            throw ({
                status: 400,
                code: 'ImageEdits::CannotParseEdits',
                message: 'The edits you provided could not be parsed. Please check the syntax of your request and refer to the documentation for additional guidance.'
            });
        }
    }
/**
     * Parses the edits to be made to the original image.
     * @param {string} event - Lambda request body.
     * @param {string} requestType - Image handler request type.
     */
Parses the edits to be made to the original image.
@param {string} event - Lambda request body.
@param {string} requestType - Image handler request type.
Parses the edits to be made to the original image . @param { string } event - Lambda request body . @param { string } requestType - Image handler request type .
parseImageEdits(event, requestType) {
        if (requestType === "Default") {
            const decoded = this.decodeRequest(event);
            return decoded.edits;
        } else if (requestType === "Thumbor") {
            const thumborMapping = new ThumborMapping();
            thumborMapping.process(event);
            return thumborMapping.edits;
        } else if (requestType === "Custom") {
            const thumborMapping = new ThumborMapping();
            const parsedPath = thumborMapping.parseCustomPath(event.path);
            thumborMapping.process(parsedPath);
            return thumborMapping.edits;
        } else {
            throw ({
                status: 400,
                code: 'ImageEdits::CannotParseEdits',
                message: 'The edits you provided could not be parsed. Please check the syntax of your request and refer to the documentation for additional guidance.'
            });
        }
    }
parseImageEdits ( event , requestType ) { if ( requestType === "Default" ) { const decoded = this . decodeRequest ( event ) ; return decoded . edits ; } else if ( requestType === "Thumbor" ) { const thumborMapping = new ThumborMapping ( ) ; thumborMapping . process ( event ) ; return thumborMapping . edits ; } else if ( requestType === "Custom" ) { const thumborMapping = new ThumborMapping ( ) ; const parsedPath = thumborMapping . parseCustomPath ( event . path ) ; thumborMapping . process ( parsedPath ) ; return thumborMapping . edits ; } else { throw ( { status : 400 , code : 'ImageEdits::CannotParseEdits' , message : 'The edits you provided could not be parsed. Please check the syntax of your request and refer to the documentation for additional guidance.' } ) ; } }
Parses the edits to be made to the original image.
Parses the edits to be made to the original image .