Skip to content

Type Alias: ReactNativeServiceRequest ​

说明

本页由源码中的注释生成,内容为英文。

ReactNativeServiceRequest = object

A message the host sends to the adapter, one JSON object per line: {type: 'invoke', id, clientId?, data}, {type: 'subscribe', clientId}, {type: 'unsubscribe', clientId}, {type: 'pause'} or {type: 'resume'}

Properties ​

clientId? ​

optional clientId?: string

The id of the user interface (a non-empty string of at most 200 characters): the clientId of the context of its requests (optional to invoke, required to subscribe and to unsubscribe)


data? ​

optional data?: Record<string, unknown>

The action's pattern and its input, as {cmd: 'greet', name: 'you'} (invoke)


id? ​

optional id?: string | number

The id of the invocation, which its response carries (invoke)


type ​

type: "invoke" | "subscribe" | "unsubscribe" | "pause" | "resume"

What the host asks: to invoke an action, to make its user interface a client (the events pushed to it are sent), to remove its client (its requests in progress are aborted), or tells the application that it goes to the background (pause, answered with paused) or comes back (resume)

Released under the MIT License.