Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • getExecuteEventSlug(options: { id: string }): string
  • summary

    Get the slug of an execute event card

    function

    Parameters

    • options: { id: string }

      options

      • id: string

        request id

    Returns string

    slug

  • getLastExecutionEvent(logContext: LogContext, jellyfish: Kernel, session: string, originator: string): Promise<any>
  • summary

    Get the last execution event given an originator

    function
    example

    const originator = '4a962ad9-20b5-4dd8-a707-bf819593cc84'

    const executeEvent = await events.getLastExecutionEvent({ ... }, jellyfish, session, originator) if (executeEvent) { console.log(executeEvent.data.timestamp) }

    Parameters

    • logContext: LogContext

      log context

    • jellyfish: Kernel

      jellyfish instance

    • session: string

      session id

    • originator: string

      originator card id

    Returns Promise<any>

    last execution event

  • post(logContext: LogContext, jellyfish: Kernel, session: string, options: PostOptions, results: PostResults): Promise<ExecuteContract>
  • summary

    Create request execution event

    function
    example

    const session = '4a962ad9-20b5-4dd8-a707-bf819593cc84' const card = await events.post({ ... }, jellyfish, session, { id: '414f2345-4f5e-4571-820f-28a49731733d', action: '57692206-8da2-46e1-91c9-159b2c6928ef', card: '033d9184-70b2-4ec9-bc39-9a249b186422', actor: '57692206-8da2-46e1-91c9-159b2c6928ef', originator: 'cb3523c5-b37d-41c8-ae32-9e7cc9309165', timestamp: '2018-06-30T19:34:42.829Z' }, { error: false, data: '414f2345-4f5e-4571-820f-28a49731733d' })

    console.log(card.id)

    Parameters

    • logContext: LogContext

      log context

    • jellyfish: Kernel

      jellyfish instance

    • session: string

      session id

    • options: PostOptions

      options

    • results: PostResults

      action results

    Returns Promise<ExecuteContract>

    event card

  • summary

    Wait for an execution request event

    function
    example

    const session = '4a962ad9-20b5-4dd8-a707-bf819593cc84' const card = await events.wait({ ... }, jellyfish, session, { id: '4a962ad9-20b5-4dd8-a707-bf819593cc84', card: '033d9184-70b2-4ec9-bc39-9a249b186422' })

    console.log(card.id)

    Parameters

    • logContext: LogContext

      log context

    • jellyfish: Kernel

      jellyfish instance

    • session: string

      session id

    • options: WaitOptions

      options

    Returns Promise<ExecuteContract>

    execution request event

Generated using TypeDoc