@integromat/proto
Version:
Integromat Proto-Classes
30 lines • 981 B
TypeScript
import { IMTBase, ModuleType } from './base';
import { DoneCallback, DoneWithResultCallback } from './types';
/**
* Base class for all Triggers.
*/
export declare class IMTTrigger extends IMTBase {
readonly type = ModuleType.TRIGGER;
/**
* Fetches data of a specific document. Used by webhooks.
*
* @param {Number} id Document id.
* @callback done Callback to call when module is initialized.
* @param {Error} err Error on error, otherwise null.
*/
fetch(id: number, done: DoneCallback): void;
/**
* Reads data.
*
* @callback done Callback to call when operations are done.
* @param {Error} err Error on error, otherwise null.
* @param {Object|Array} bundle Collection of data read. Or batch of collections.
*/
read(done: DoneWithResultCallback): void;
}
/**
* Base Gateway Trigger.
*/
export declare class IMTGatewayTrigger extends IMTTrigger {
}
//# sourceMappingURL=trigger.d.ts.map