@bbc/timeline-state-resolver-types
Version:
Have timeline, control stuff
78 lines • 2.22 kB
TypeScript
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and re-run the "tsr-schema-types" tool to regenerate this file.
*/
import type { ActionExecutionResult } from "../actions";
export interface HttpSendOptions {
/**
* Minimum time in ms before a command is resent, set to <= 0 or undefined to disable
*/
resendTime?: number;
/**
* HTTP Proxy
*/
httpProxy?: string;
/**
* HTTPS Proxy
*/
httpsProxy?: string;
/**
* URLs not to use a proxy for (E.G. github.com)
*/
noProxy?: string[];
oauthTokenHost?: string;
oauthTokenPath?: string;
oauthClientId?: string;
oauthClientSecret?: string;
oauthAudience?: string;
bearerToken?: string;
}
export type SomeMappingHttpSend = Record<string, never>;
export interface HTTPSendCommandContent {
type: TimelineContentTypeHTTP;
url: string;
params: {
[k: string]: unknown;
};
paramsType?: TimelineContentTypeHTTPParamType;
headers?: {
[k: string]: string;
};
temporalPriority?: number;
/**
* Commands in the same queue will be sent in order (will wait for the previous to finish before sending next
*/
queueId?: string;
}
export declare enum TimelineContentTypeHTTP {
GET = "get",
POST = "post",
PUT = "put",
DELETE = "delete"
}
export declare enum TimelineContentTypeHTTPParamType {
JSON = "json",
FORM = "form"
}
export interface SendCommandResult {
statusCode: number;
headers: {
[k: string]: string | string[];
};
body: string;
}
export declare enum HttpSendActions {
Resync = "resync",
SendCommand = "sendCommand"
}
export interface HttpSendActionMethods {
[HttpSendActions.Resync]: (payload: Record<string, never>) => Promise<ActionExecutionResult<void>>;
[HttpSendActions.SendCommand]: (payload: HTTPSendCommandContent) => Promise<ActionExecutionResult<SendCommandResult>>;
}
export interface HttpSendDeviceTypes {
Options: HttpSendOptions;
Mappings: SomeMappingHttpSend;
Actions: HttpSendActionMethods;
}
//# sourceMappingURL=httpSend.d.ts.map