@webuildbots/webuildbots-sdk
Version:
webuildbots sdk
21 lines (20 loc) • 804 B
TypeScript
/**
* Uses the "builder" design pattern to build {@link WebhookResponse}
*
* @author Mark Irvine
*/
import Block from '../interfaces/block';
import { DeepPartial } from '../helpers/helpers-types';
import { BlockPointer, WebhookResponse } from '..';
import BlockBuilder from './block/block-builder';
import { FileLinkBlockParams, FollowUpParams, FunctionFailureParams } from '../interfaces/webhook';
export default class ResponseBuilder {
private resp;
pushBlock(block: DeepPartial<Block> | BlockBuilder): this;
pushBlockPointer(blockPointer: BlockPointer): this;
functionFailure(params: FunctionFailureParams): this;
unsetFunctionForm(): this;
setFollowUp(params: FollowUpParams): this;
setFileLinkBlock(params: FileLinkBlockParams): this;
build(): WebhookResponse;
}