@elbwalker/destination-web-api
Version:
API web destination for walkerOS
34 lines (29 loc) • 1.27 kB
TypeScript
import { Mapping } from '@elbwalker/types';
import { SendHeaders, SendDataValue } from '@elbwalker/utils';
import { SendWebTransport } from '@elbwalker/utils/web';
import { DestinationWeb } from '@elbwalker/walker.js';
interface Destination extends DestinationWeb.Destination<Custom, CustomEvent> {
}
type Config = DestinationWeb.Config<Custom, CustomEvent>;
interface Custom {
url: string;
headers?: SendHeaders;
method?: string;
transform?: Transform;
transport?: SendWebTransport;
}
interface CustomEvent {
}
type EventConfig = Mapping.EventConfig<CustomEvent>;
type Transform = (data?: unknown, config?: Config, mapping?: DestinationWeb.EventMapping<CustomEvent>) => SendDataValue;
type index_Config = Config;
type index_Custom = Custom;
type index_CustomEvent = CustomEvent;
type index_Destination = Destination;
type index_EventConfig = EventConfig;
type index_Transform = Transform;
declare namespace index {
export type { index_Config as Config, index_Custom as Custom, index_CustomEvent as CustomEvent, index_Destination as Destination, index_EventConfig as EventConfig, index_Transform as Transform };
}
declare const destinationWebAPI: Destination;
export { index as DestinationWebAPI, destinationWebAPI as default, destinationWebAPI };