UNPKG

@mochabug/adapt-plugin-toolkit

Version:

The API toolkit to facilitate mochabug adapt plugin development

1,032 lines 30.4 kB
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import type { Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt"; import type { SignalData, SignalDataJson } from "../../graph/signal_data_pb"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file mochabugapis/adapt/automations/v1/automations.proto. */ export declare const file_mochabugapis_adapt_automations_v1_automations: GenFile; /** * The inherit session request * The actual token determines which release it will utilize * * @generated from message mochabugapis.adapt.automations.v1.InheritSessionRequest */ export type InheritSessionRequest = Message<"mochabugapis.adapt.automations.v1.InheritSessionRequest"> & { /** * The automation id you would like to inherit * * @generated from field: string id = 1; */ id: string; }; /** * The inherit session request * The actual token determines which release it will utilize * * @generated from message mochabugapis.adapt.automations.v1.InheritSessionRequest */ export type InheritSessionRequestJson = { /** * The automation id you would like to inherit * * @generated from field: string id = 1; */ id?: string; }; /** * Describes the message mochabugapis.adapt.automations.v1.InheritSessionRequest. * Use `create(InheritSessionRequestSchema)` to create a new message. */ export declare const InheritSessionRequestSchema: GenMessage<InheritSessionRequest, { jsonType: InheritSessionRequestJson; }>; /** * The inherit session response * * @generated from message mochabugapis.adapt.automations.v1.InheritSessionResponse */ export type InheritSessionResponse = Message<"mochabugapis.adapt.automations.v1.InheritSessionResponse"> & { /** * The access token for the session * * @generated from field: string token = 1; */ token: string; /** * The credentials you may use to connect to the broker and retrieve the session data * in real time * * @generated from field: bytes broker_credentials = 2; */ brokerCredentials: Uint8Array; /** * The consumer name to use for the broker * * @generated from field: string consumer_name = 3; */ consumerName: string; /** * The stream name to use for the broker * * @generated from field: string stream_name = 4; */ streamName: string; /** * The timestamp when the session expires, if not set, the session never expires (typically the case for long-running stream vertices) * * @generated from field: optional google.protobuf.Timestamp expires = 5; */ expires?: Timestamp; }; /** * The inherit session response * * @generated from message mochabugapis.adapt.automations.v1.InheritSessionResponse */ export type InheritSessionResponseJson = { /** * The access token for the session * * @generated from field: string token = 1; */ token?: string; /** * The credentials you may use to connect to the broker and retrieve the session data * in real time * * @generated from field: bytes broker_credentials = 2; */ brokerCredentials?: string; /** * The consumer name to use for the broker * * @generated from field: string consumer_name = 3; */ consumerName?: string; /** * The stream name to use for the broker * * @generated from field: string stream_name = 4; */ streamName?: string; /** * The timestamp when the session expires, if not set, the session never expires (typically the case for long-running stream vertices) * * @generated from field: optional google.protobuf.Timestamp expires = 5; */ expires?: TimestampJson; }; /** * Describes the message mochabugapis.adapt.automations.v1.InheritSessionResponse. * Use `create(InheritSessionResponseSchema)` to create a new message. */ export declare const InheritSessionResponseSchema: GenMessage<InheritSessionResponse, { jsonType: InheritSessionResponseJson; }>; /** * The read output request * The actual token determines which release it will utilize * * @generated from message mochabugapis.adapt.automations.v1.ReadOutputRequest */ export type ReadOutputRequest = Message<"mochabugapis.adapt.automations.v1.ReadOutputRequest"> & { /** * The automation id you would like to fetch a session for * * @generated from field: string id = 1; */ id: string; /** * An optional page size, if not set, it will default to 100 * * @generated from field: uint32 page_size = 2; */ pageSize: number; /** * You can specify a specific node you wan to read the output from as well * If not set, it will return all outputs * * @generated from field: optional string vertex = 3; */ vertex?: string; /** * A sortable time uuid to indicate that that the outputs need to be newer than * Unset returns everything * * @generated from field: optional string newer_than = 4; */ newerThan?: string; }; /** * The read output request * The actual token determines which release it will utilize * * @generated from message mochabugapis.adapt.automations.v1.ReadOutputRequest */ export type ReadOutputRequestJson = { /** * The automation id you would like to fetch a session for * * @generated from field: string id = 1; */ id?: string; /** * An optional page size, if not set, it will default to 100 * * @generated from field: uint32 page_size = 2; */ pageSize?: number; /** * You can specify a specific node you wan to read the output from as well * If not set, it will return all outputs * * @generated from field: optional string vertex = 3; */ vertex?: string; /** * A sortable time uuid to indicate that that the outputs need to be newer than * Unset returns everything * * @generated from field: optional string newer_than = 4; */ newerThan?: string; }; /** * Describes the message mochabugapis.adapt.automations.v1.ReadOutputRequest. * Use `create(ReadOutputRequestSchema)` to create a new message. */ export declare const ReadOutputRequestSchema: GenMessage<ReadOutputRequest, { jsonType: ReadOutputRequestJson; }>; /** * The read output response * * @generated from message mochabugapis.adapt.automations.v1.ReadOutputResponse */ export type ReadOutputResponse = Message<"mochabugapis.adapt.automations.v1.ReadOutputResponse"> & { /** * The session information * * @generated from field: mochabugapis.adapt.automations.v1.Session session = 1; */ session?: Session; /** * The outputs from the session, sorted with oldest first and newest last * * @generated from field: repeated mochabugapis.adapt.automations.v1.Output outputs = 2; */ outputs: Output[]; /** * A optional next-page cursor equivalent to the id of the last output * * @generated from field: optional string next_page_cursor = 3; */ nextPageCursor?: string; }; /** * The read output response * * @generated from message mochabugapis.adapt.automations.v1.ReadOutputResponse */ export type ReadOutputResponseJson = { /** * The session information * * @generated from field: mochabugapis.adapt.automations.v1.Session session = 1; */ session?: SessionJson; /** * The outputs from the session, sorted with oldest first and newest last * * @generated from field: repeated mochabugapis.adapt.automations.v1.Output outputs = 2; */ outputs?: OutputJson[]; /** * A optional next-page cursor equivalent to the id of the last output * * @generated from field: optional string next_page_cursor = 3; */ nextPageCursor?: string; }; /** * Describes the message mochabugapis.adapt.automations.v1.ReadOutputResponse. * Use `create(ReadOutputResponseSchema)` to create a new message. */ export declare const ReadOutputResponseSchema: GenMessage<ReadOutputResponse, { jsonType: ReadOutputResponseJson; }>; /** * The read URLs request * The actual token determines which release it will utilize * * @generated from message mochabugapis.adapt.automations.v1.ReadUrlsRequest */ export type ReadUrlsRequest = Message<"mochabugapis.adapt.automations.v1.ReadUrlsRequest"> & { /** * The automation id you would like to fetch a session for * * @generated from field: string id = 1; */ id: string; /** * An optional page size, if not set, it will default to 100 * * @generated from field: uint32 page_size = 2; */ pageSize: number; /** * A sortable time uuid to indicate that that the urls need to be newer than * Unset returns everything * * @generated from field: optional string newer_than = 3; */ newerThan?: string; }; /** * The read URLs request * The actual token determines which release it will utilize * * @generated from message mochabugapis.adapt.automations.v1.ReadUrlsRequest */ export type ReadUrlsRequestJson = { /** * The automation id you would like to fetch a session for * * @generated from field: string id = 1; */ id?: string; /** * An optional page size, if not set, it will default to 100 * * @generated from field: uint32 page_size = 2; */ pageSize?: number; /** * A sortable time uuid to indicate that that the urls need to be newer than * Unset returns everything * * @generated from field: optional string newer_than = 3; */ newerThan?: string; }; /** * Describes the message mochabugapis.adapt.automations.v1.ReadUrlsRequest. * Use `create(ReadUrlsRequestSchema)` to create a new message. */ export declare const ReadUrlsRequestSchema: GenMessage<ReadUrlsRequest, { jsonType: ReadUrlsRequestJson; }>; /** * The read URLs response * * @generated from message mochabugapis.adapt.automations.v1.ReadUrlsResponse */ export type ReadUrlsResponse = Message<"mochabugapis.adapt.automations.v1.ReadUrlsResponse"> & { /** * The session information * * @generated from field: mochabugapis.adapt.automations.v1.Session session = 1; */ session?: Session; /** * The URLs for the session, sorted with oldest first and newest last * * @generated from field: repeated mochabugapis.adapt.automations.v1.Url urls = 2; */ urls: Url[]; /** * A optional next-page cursor equivalent to the id of the last output * * @generated from field: optional string next_page_cursor = 3; */ nextPageCursor?: string; }; /** * The read URLs response * * @generated from message mochabugapis.adapt.automations.v1.ReadUrlsResponse */ export type ReadUrlsResponseJson = { /** * The session information * * @generated from field: mochabugapis.adapt.automations.v1.Session session = 1; */ session?: SessionJson; /** * The URLs for the session, sorted with oldest first and newest last * * @generated from field: repeated mochabugapis.adapt.automations.v1.Url urls = 2; */ urls?: UrlJson[]; /** * A optional next-page cursor equivalent to the id of the last output * * @generated from field: optional string next_page_cursor = 3; */ nextPageCursor?: string; }; /** * Describes the message mochabugapis.adapt.automations.v1.ReadUrlsResponse. * Use `create(ReadUrlsResponseSchema)` to create a new message. */ export declare const ReadUrlsResponseSchema: GenMessage<ReadUrlsResponse, { jsonType: ReadUrlsResponseJson; }>; /** * The start session request * * @generated from message mochabugapis.adapt.automations.v1.StartSessionRequest */ export type StartSessionRequest = Message<"mochabugapis.adapt.automations.v1.StartSessionRequest"> & { /** * The automation id to start * * @generated from field: string id = 1; */ id: string; /** * The transmitter to start from (optional, it defaults to the first one, always) * * @generated from field: optional string transmitter = 2; */ transmitter?: string; /** * The signals on the transmitter you wish to start with * Make sure that they align to the signals JTD schema * * @generated from field: map<string, mochabugapis.adapt.graph.SignalData> signals = 3; */ signals: { [key: string]: SignalData; }; }; /** * The start session request * * @generated from message mochabugapis.adapt.automations.v1.StartSessionRequest */ export type StartSessionRequestJson = { /** * The automation id to start * * @generated from field: string id = 1; */ id?: string; /** * The transmitter to start from (optional, it defaults to the first one, always) * * @generated from field: optional string transmitter = 2; */ transmitter?: string; /** * The signals on the transmitter you wish to start with * Make sure that they align to the signals JTD schema * * @generated from field: map<string, mochabugapis.adapt.graph.SignalData> signals = 3; */ signals?: { [key: string]: SignalDataJson; }; }; /** * Describes the message mochabugapis.adapt.automations.v1.StartSessionRequest. * Use `create(StartSessionRequestSchema)` to create a new message. */ export declare const StartSessionRequestSchema: GenMessage<StartSessionRequest, { jsonType: StartSessionRequestJson; }>; /** * The start session response * * @generated from message mochabugapis.adapt.automations.v1.StartSessionResponse */ export type StartSessionResponse = Message<"mochabugapis.adapt.automations.v1.StartSessionResponse"> & { /** * The access token for the session * * @generated from field: string token = 1; */ token: string; /** * The timestamp when the session expires, if not set, the session never expires (typically the case for long-running stream vertices) * * @generated from field: optional google.protobuf.Timestamp expires = 2; */ expires?: Timestamp; }; /** * The start session response * * @generated from message mochabugapis.adapt.automations.v1.StartSessionResponse */ export type StartSessionResponseJson = { /** * The access token for the session * * @generated from field: string token = 1; */ token?: string; /** * The timestamp when the session expires, if not set, the session never expires (typically the case for long-running stream vertices) * * @generated from field: optional google.protobuf.Timestamp expires = 2; */ expires?: TimestampJson; }; /** * Describes the message mochabugapis.adapt.automations.v1.StartSessionResponse. * Use `create(StartSessionResponseSchema)` to create a new message. */ export declare const StartSessionResponseSchema: GenMessage<StartSessionResponse, { jsonType: StartSessionResponseJson; }>; /** * The stop session request * The actual token determines which release it will utilize * * @generated from message mochabugapis.adapt.automations.v1.StopSessionRequest */ export type StopSessionRequest = Message<"mochabugapis.adapt.automations.v1.StopSessionRequest"> & { /** * The automation id you would like to fetch a session for * * @generated from field: string id = 1; */ id: string; }; /** * The stop session request * The actual token determines which release it will utilize * * @generated from message mochabugapis.adapt.automations.v1.StopSessionRequest */ export type StopSessionRequestJson = { /** * The automation id you would like to fetch a session for * * @generated from field: string id = 1; */ id?: string; }; /** * Describes the message mochabugapis.adapt.automations.v1.StopSessionRequest. * Use `create(StopSessionRequestSchema)` to create a new message. */ export declare const StopSessionRequestSchema: GenMessage<StopSessionRequest, { jsonType: StopSessionRequestJson; }>; /** * The stop session response * * @generated from message mochabugapis.adapt.automations.v1.StopSessionResponse */ export type StopSessionResponse = Message<"mochabugapis.adapt.automations.v1.StopSessionResponse"> & {}; /** * The stop session response * * @generated from message mochabugapis.adapt.automations.v1.StopSessionResponse */ export type StopSessionResponseJson = {}; /** * Describes the message mochabugapis.adapt.automations.v1.StopSessionResponse. * Use `create(StopSessionResponseSchema)` to create a new message. */ export declare const StopSessionResponseSchema: GenMessage<StopSessionResponse, { jsonType: StopSessionResponseJson; }>; /** * The get session request * * @generated from message mochabugapis.adapt.automations.v1.GetSessionRequest */ export type GetSessionRequest = Message<"mochabugapis.adapt.automations.v1.GetSessionRequest"> & { /** * The automation id you would like to fetch a session for * * @generated from field: string id = 1; */ id: string; }; /** * The get session request * * @generated from message mochabugapis.adapt.automations.v1.GetSessionRequest */ export type GetSessionRequestJson = { /** * The automation id you would like to fetch a session for * * @generated from field: string id = 1; */ id?: string; }; /** * Describes the message mochabugapis.adapt.automations.v1.GetSessionRequest. * Use `create(GetSessionRequestSchema)` to create a new message. */ export declare const GetSessionRequestSchema: GenMessage<GetSessionRequest, { jsonType: GetSessionRequestJson; }>; /** * The get session response * * @generated from message mochabugapis.adapt.automations.v1.GetSessionResponse */ export type GetSessionResponse = Message<"mochabugapis.adapt.automations.v1.GetSessionResponse"> & { /** * The session information * * @generated from field: mochabugapis.adapt.automations.v1.Session session = 1; */ session?: Session; }; /** * The get session response * * @generated from message mochabugapis.adapt.automations.v1.GetSessionResponse */ export type GetSessionResponseJson = { /** * The session information * * @generated from field: mochabugapis.adapt.automations.v1.Session session = 1; */ session?: SessionJson; }; /** * Describes the message mochabugapis.adapt.automations.v1.GetSessionResponse. * Use `create(GetSessionResponseSchema)` to create a new message. */ export declare const GetSessionResponseSchema: GenMessage<GetSessionResponse, { jsonType: GetSessionResponseJson; }>; /** * Output data from the automation (corresponds to an output vertex instance) * * @generated from message mochabugapis.adapt.automations.v1.Output */ export type Output = Message<"mochabugapis.adapt.automations.v1.Output"> & { /** * The vertex id * * @generated from field: string vertex = 1; */ vertex: string; /** * The fork id, empty if running on the main path * * @generated from field: string fork = 2; */ fork: string; /** * The actual data that has been output from the vertex * * @generated from field: map<string, mochabugapis.adapt.graph.SignalData> data = 3; */ data: { [key: string]: SignalData; }; /** * The timestamp when the output was created * * @generated from field: google.protobuf.Timestamp created = 4; */ created?: Timestamp; }; /** * Output data from the automation (corresponds to an output vertex instance) * * @generated from message mochabugapis.adapt.automations.v1.Output */ export type OutputJson = { /** * The vertex id * * @generated from field: string vertex = 1; */ vertex?: string; /** * The fork id, empty if running on the main path * * @generated from field: string fork = 2; */ fork?: string; /** * The actual data that has been output from the vertex * * @generated from field: map<string, mochabugapis.adapt.graph.SignalData> data = 3; */ data?: { [key: string]: SignalDataJson; }; /** * The timestamp when the output was created * * @generated from field: google.protobuf.Timestamp created = 4; */ created?: TimestampJson; }; /** * Describes the message mochabugapis.adapt.automations.v1.Output. * Use `create(OutputSchema)` to create a new message. */ export declare const OutputSchema: GenMessage<Output, { jsonType: OutputJson; }>; /** * A representation of a URL * * @generated from message mochabugapis.adapt.automations.v1.Url */ export type Url = Message<"mochabugapis.adapt.automations.v1.Url"> & { /** * The URL * * @generated from field: string url = 1; */ url: string; /** * The fork id, empty if running on the main path * * @generated from field: string fork = 2; */ fork: string; /** * The vertex id that generated the URL * * @generated from field: string vertex = 3; */ vertex: string; /** * Whether or not the URL is done executing * The client should only open URLs that are not done * Since the processes are generic, it's possible that a process generates multiple URLs in parallel * and the client should only open the ones that are not done * * @generated from field: bool done = 4; */ done: boolean; /** * The timestamp when the URL was created * * @generated from field: google.protobuf.Timestamp created = 5; */ created?: Timestamp; /** * The access token to access the node session * * @generated from field: string token = 6; */ token: string; }; /** * A representation of a URL * * @generated from message mochabugapis.adapt.automations.v1.Url */ export type UrlJson = { /** * The URL * * @generated from field: string url = 1; */ url?: string; /** * The fork id, empty if running on the main path * * @generated from field: string fork = 2; */ fork?: string; /** * The vertex id that generated the URL * * @generated from field: string vertex = 3; */ vertex?: string; /** * Whether or not the URL is done executing * The client should only open URLs that are not done * Since the processes are generic, it's possible that a process generates multiple URLs in parallel * and the client should only open the ones that are not done * * @generated from field: bool done = 4; */ done?: boolean; /** * The timestamp when the URL was created * * @generated from field: google.protobuf.Timestamp created = 5; */ created?: TimestampJson; /** * The access token to access the node session * * @generated from field: string token = 6; */ token?: string; }; /** * Describes the message mochabugapis.adapt.automations.v1.Url. * Use `create(UrlSchema)` to create a new message. */ export declare const UrlSchema: GenMessage<Url, { jsonType: UrlJson; }>; /** * The session information * * @generated from message mochabugapis.adapt.automations.v1.Session */ export type Session = Message<"mochabugapis.adapt.automations.v1.Session"> & { /** * The automation id * * @generated from field: string id = 1; */ id: string; /** * The status of the session * * @generated from field: mochabugapis.adapt.automations.v1.Status status = 2; */ status: Status; }; /** * The session information * * @generated from message mochabugapis.adapt.automations.v1.Session */ export type SessionJson = { /** * The automation id * * @generated from field: string id = 1; */ id?: string; /** * The status of the session * * @generated from field: mochabugapis.adapt.automations.v1.Status status = 2; */ status?: StatusJson; }; /** * Describes the message mochabugapis.adapt.automations.v1.Session. * Use `create(SessionSchema)` to create a new message. */ export declare const SessionSchema: GenMessage<Session, { jsonType: SessionJson; }>; /** * WebsocketMessage wraps all possible message types sent over WebSocket * * @generated from message mochabugapis.adapt.automations.v1.WebsocketMessage */ export type WebsocketMessage = Message<"mochabugapis.adapt.automations.v1.WebsocketMessage"> & { /** * The actual message, one of the following types * * @generated from oneof mochabugapis.adapt.automations.v1.WebsocketMessage.message */ message: { /** * Output message from a vertex * * @generated from field: mochabugapis.adapt.automations.v1.Output output = 1; */ value: Output; case: "output"; } | { /** * URL message for browser interaction * * @generated from field: mochabugapis.adapt.automations.v1.Url url = 2; */ value: Url; case: "url"; } | { /** * Session status update * * @generated from field: mochabugapis.adapt.automations.v1.Session session = 3; */ value: Session; case: "session"; } | { case: undefined; value?: undefined; }; /** * A timesortable uuid for the message * * @generated from field: string id = 5; */ id: string; }; /** * WebsocketMessage wraps all possible message types sent over WebSocket * * @generated from message mochabugapis.adapt.automations.v1.WebsocketMessage */ export type WebsocketMessageJson = { /** * Output message from a vertex * * @generated from field: mochabugapis.adapt.automations.v1.Output output = 1; */ output?: OutputJson; /** * URL message for browser interaction * * @generated from field: mochabugapis.adapt.automations.v1.Url url = 2; */ url?: UrlJson; /** * Session status update * * @generated from field: mochabugapis.adapt.automations.v1.Session session = 3; */ session?: SessionJson; /** * A timesortable uuid for the message * * @generated from field: string id = 5; */ id?: string; }; /** * Describes the message mochabugapis.adapt.automations.v1.WebsocketMessage. * Use `create(WebsocketMessageSchema)` to create a new message. */ export declare const WebsocketMessageSchema: GenMessage<WebsocketMessage, { jsonType: WebsocketMessageJson; }>; /** * The session enum status * * @generated from enum mochabugapis.adapt.automations.v1.Status */ export declare enum Status { /** * Unspecified * * @generated from enum value: STATUS_UNSPECIFIED = 0; */ UNSPECIFIED = 0, /** * The session is running * * @generated from enum value: STATUS_RUNNING = 1; */ RUNNING = 1, /** * The session has been stopped * * @generated from enum value: STATUS_STOPPED = 2; */ STOPPED = 2, /** * The session is being stopped * * @generated from enum value: STATUS_STOPPING = 3; */ STOPPING = 3, /** * The session has been completed * * @generated from enum value: STATUS_COMPLETED = 4; */ COMPLETED = 4, /** * The session has expired * * @generated from enum value: STATUS_EXPIRED = 5; */ EXPIRED = 5, /** * The session has been errored (errors during the runtime) * * @generated from enum value: STATUS_ERRORED = 6; */ ERRORED = 6 } /** * The session enum status * * @generated from enum mochabugapis.adapt.automations.v1.Status */ export type StatusJson = "STATUS_UNSPECIFIED" | "STATUS_RUNNING" | "STATUS_STOPPED" | "STATUS_STOPPING" | "STATUS_COMPLETED" | "STATUS_EXPIRED" | "STATUS_ERRORED"; /** * Describes the enum mochabugapis.adapt.automations.v1.Status. */ export declare const StatusSchema: GenEnum<Status, StatusJson>; /** * A service that provides automation functionality. * * @generated from service mochabugapis.adapt.automations.v1.AutomationService */ export declare const AutomationService: GenService<{ /** * Start a session of the specified automation * * @generated from rpc mochabugapis.adapt.automations.v1.AutomationService.StartSession */ startSession: { methodKind: "unary"; input: typeof StartSessionRequestSchema; output: typeof StartSessionResponseSchema; }; /** * Stop a specific session * * @generated from rpc mochabugapis.adapt.automations.v1.AutomationService.StopSession */ stopSession: { methodKind: "unary"; input: typeof StopSessionRequestSchema; output: typeof StopSessionResponseSchema; }; /** * Inherit a session * * @generated from rpc mochabugapis.adapt.automations.v1.AutomationService.InheritSession */ inheritSession: { methodKind: "unary"; input: typeof InheritSessionRequestSchema; output: typeof InheritSessionResponseSchema; }; /** * Get session information * * @generated from rpc mochabugapis.adapt.automations.v1.AutomationService.GetSession */ getSession: { methodKind: "unary"; input: typeof GetSessionRequestSchema; output: typeof GetSessionResponseSchema; }; /** * Read the output from the session * * @generated from rpc mochabugapis.adapt.automations.v1.AutomationService.ReadOutput */ readOutput: { methodKind: "unary"; input: typeof ReadOutputRequestSchema; output: typeof ReadOutputResponseSchema; }; /** * Read URLs for the session for browser-based clients * * @generated from rpc mochabugapis.adapt.automations.v1.AutomationService.ReadUrls */ readUrls: { methodKind: "unary"; input: typeof ReadUrlsRequestSchema; output: typeof ReadUrlsResponseSchema; }; }>; //# sourceMappingURL=automations_pb.d.ts.map