AboutSupportDeveloper GuideVersion 36.122.80.23

Interface SessionContextGroup

An instance of a SessionContextGroup

Hierarchy

  • SessionContextGroup

Properties

addContextHandler: ((handler, contextType?) => Promise<{
    unsubscribe: (() => void);
}>)

Type declaration

    • (handler, contextType?): Promise<{
          unsubscribe: (() => void);
      }>
    • A SessionContextGroup instance method for adding a handler for context change.

      Parameters

      • handler: ContextHandler

        The callback to be invoked. Is invoked when (a) the context changes or (b) immediately after getting created if the context is already set.

      • Optional contextType: string

        The context type this handler should listen to. If not specified, a global handler for all context types will get created. Only one global handler is allowed per SessionContextGroup.

      Returns Promise<{
          unsubscribe: (() => void);
      }>

getCurrentContext: ((type?) => Promise<Context>)

Type declaration

    • (type?): Promise<Context>
    • A SessionContextGroup instance method for getting the current context of a certain type.

      Parameters

      • Optional type: string

        The Context Type to get. If not specified the last contextType set would get used.

      Returns Promise<Context>

id: string

The SessionContextGroup's id.

setContext: ((context) => Promise<void>)

Type declaration

    • (context): Promise<void>
    • A SessionContextGroup instance method for setting a context in the SessionContextGroup.

      Parameters

      • context: Context

        The Context to be set.

      Returns Promise<void>