Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "ajax"

Helpers for making AJAX calls to the platform. API documentation can be found here: https://manywho.github.io/slate/

Index

Functions

Const dispatchDataRequest

  • dispatchDataRequest(url: string, event: string, request: any, tenantId: string, stateId: string, authenticationToken: string, limit: number, search: string, orderBy: string, orderByDirection: string, page: number): JQueryXHR
  • Make a file or objectdata request to the platform

    Parameters

    • url: string

      Endpoint (excluding host) that the request will be made against

    • event: string

      Type of event, Settings.event(event + '.done') will be called when the request completes

    • request: any
    • tenantId: string
    • stateId: string
    • authenticationToken: string
    • limit: number

      Number of results to return

    • search: string

      Search string to apply to the list filter

    • orderBy: string

      Property name to order results by

    • orderByDirection: string

      ASC or DESC

    • page: number

      Page offset for the list filter

    Returns JQueryXHR

Const dispatchFileDataRequest

  • dispatchFileDataRequest(request: any, tenantId: string, stateId: string, authenticationToken: string, limit: number, search: string, orderBy: string, orderByDirection: string, page: number): JQueryXHR
  • POST to /api/service/1/file to make a filedata request

    Parameters

    • request: any
    • tenantId: string
    • stateId: string
    • authenticationToken: string
    • limit: number

      Number of results to return

    • search: string

      Search string to apply to the list filter

    • orderBy: string

      Property name to order results by

    • orderByDirection: string

      ASC or DESC

    • page: number

      Page offset for the list filter

    Returns JQueryXHR

Const dispatchObjectDataRequest

  • dispatchObjectDataRequest(request: any, tenantId: string, stateId: string, authenticationToken: string, limit: number, search: string, orderBy: string, orderByDirection: string, page: number): JQueryXHR
  • POST to /api/service/1/data to make an objectdata request

    Parameters

    • request: any
    • tenantId: string
    • stateId: string
    • authenticationToken: string
    • limit: number

      Number of results to return

    • search: string

      Search string to apply to the list filter

    • orderBy: string

      Property name to order results by

    • orderByDirection: string

      ASC or DESC

    • page: number

      Page offset for the list filter

    Returns JQueryXHR

Const flowOut

  • flowOut(stateId: string, tenantId: string, selectedOutcomeId: string, authenticationToken: string): JQueryXHR
  • POST to /api/run/1/state/out/stateId/selectedOutcomeId to flow out

    Parameters

    • stateId: string
    • tenantId: string
    • selectedOutcomeId: string
    • authenticationToken: string

    Returns JQueryXHR

Const follow

  • follow(tenantId: string, streamId: string, stateId: string, isFollowing: boolean, authenticationToken: string): JQueryXHR
  • POST to /api/social/1/stream/streamId?follow=isFollowing

    Parameters

    • tenantId: string
    • streamId: string
    • stateId: string
    • isFollowing: boolean
    • authenticationToken: string

    Returns JQueryXHR

Const getExecutionLog

  • getExecutionLog(tenantId: string, flowId: string, stateId: string, authenticationToken: string): JQueryXHR
  • GET at /api/log/flowId/stateId

    Parameters

    • tenantId: string
    • flowId: string
    • stateId: string
    • authenticationToken: string

    Returns JQueryXHR

Const getFlowByName

  • getFlowByName(name: string, tenantId: string, authenticationToken: string): JQueryXHR
  • GET at /api/run/1/flow/name/name

    Parameters

    • name: string
    • tenantId: string
    • authenticationToken: string

    Returns JQueryXHR

Const getNavigation

  • getNavigation(stateId: string, stateToken: string, navigationElementId: string, tenantId: string, authenticationToken?: string): JQueryXHR
  • POST to /api/run/1/navigation/stateId

    Parameters

    • stateId: string
    • stateToken: string
    • navigationElementId: string
    • tenantId: string
    • Optional authenticationToken: string

    Returns JQueryXHR

Const getSocialFollowers

  • getSocialFollowers(tenantId: string, streamId: string, stateId: string, authenticationToken: string): JQueryXHR
  • GET at /api/social/1/stream/streamId/follower

    Parameters

    • tenantId: string
    • streamId: string
    • stateId: string
    • authenticationToken: string

    Returns JQueryXHR

Const getSocialMe

  • getSocialMe(tenantId: string, streamId: string, stateId: string, authenticationToken: string): JQueryXHR
  • GET at /api/social/1/stream/streamId/user/me

    Parameters

    • tenantId: string
    • streamId: string
    • stateId: string
    • authenticationToken: string

    Returns JQueryXHR

Const getSocialMessages

  • getSocialMessages(tenantId: string, streamId: string, stateId: string, page: number, pageSize: number, authenticationToken: string): JQueryXHR
  • GET at /api/social/1/stream/streamId?page=page&pageSize=pageSize

    Parameters

    • tenantId: string
    • streamId: string
    • stateId: string
    • page: number
    • pageSize: number
    • authenticationToken: string

    Returns JQueryXHR

Const getSocialUsers

  • getSocialUsers(tenantId: string, streamId: string, stateId: string, name: string, authenticationToken: string): JQueryXHR
  • GET at /api/social/1/stream/streamId/user?name=name

    Parameters

    • tenantId: string
    • streamId: string
    • stateId: string
    • name: string
    • authenticationToken: string

    Returns JQueryXHR

Const initialize

  • initialize(engineInitializationRequest: any, tenantId: string, authenticationToken: string): JQueryXHR
  • POST to /api/run/1 to initialize a state

    Parameters

    • engineInitializationRequest: any
    • tenantId: string
    • authenticationToken: string

    Returns JQueryXHR

Const initializeSimple

  • initializeSimple(engineInitializationRequest: any, tenantId: string): JQueryXHR
  • POST to /api/run/1/state to initialize a state

    Parameters

    • engineInitializationRequest: any
    • tenantId: string

    Returns JQueryXHR

Const invoke

  • invoke(engineInvokeRequest: any, tenantId: string, authenticationToken: string): JQueryXHR
  • POST to /api/run/1/state/engineInvokeRequest.stateId to update the state of the flow

    Parameters

    • engineInvokeRequest: any
    • tenantId: string
    • authenticationToken: string

    Returns JQueryXHR

Const join

  • join(stateId: string, tenantId: string, authenticationToken: string): JQueryXHR
  • GET the state of currently executing flow at /api/run/1/state/stateId

    Parameters

    • stateId: string
    • tenantId: string
    • authenticationToken: string

    Returns JQueryXHR

Const login

  • login(loginUrl: string, username: string, password: string, sessionId: string, sessionUrl: string, stateId: string, tenantId: string): JQueryXHR
  • POST to /api/run/1/authentication/stateId

    Parameters

    • loginUrl: string
    • username: string
    • password: string
    • sessionId: string
    • sessionUrl: string
    • stateId: string
    • tenantId: string

    Returns JQueryXHR

Const ping

  • ping(tenantId: string, stateId: string, stateToken: string, authenticationToken: string): JQueryXHR
  • GET at /api/run/1/state/stateId/ping/

    Parameters

    • tenantId: string
    • stateId: string
    • stateToken: string
    • authenticationToken: string

    Returns JQueryXHR

Const sendSocialMessage

  • sendSocialMessage(tenantId: string, streamId: string, stateId: string, request: any, authenticationToken: string): JQueryXHR
  • POST to /api/social/1/stream/streamId/message

    Parameters

    • tenantId: string
    • streamId: string
    • stateId: string
    • request: any
    • authenticationToken: string

    Returns JQueryXHR

Const sessionAuthentication

  • sessionAuthentication(tenantId: string, stateId: string, request: any, authenticationToken: string): JQueryXHR
  • POST to /api/run/1/authentication/stateId

    Parameters

    • tenantId: string
    • stateId: string
    • request: any
    • authenticationToken: string

    Returns JQueryXHR

Const uploadFile

  • uploadFile(formData: FormData, tenantId: string, authenticationToken: string, onProgress: EventListenerOrEventListenerObject): JQueryXHR
  • POST to /api/service/1/file/content to upload a file to a 3rd party service DEPRECATED: Does not support offline file upload

    Parameters

    • formData: FormData
    • tenantId: string
    • authenticationToken: string
    • onProgress: EventListenerOrEventListenerObject

      Callback to recieve progress event info

    Returns JQueryXHR

Const uploadFiles

  • uploadFiles(files: File[], request: any, tenantId: string, authenticationToken: string, onProgress: EventListenerOrEventListenerObject, stateId: string): JQueryXHR
  • POST to /api/service/1/file/content to upload a file to a 3rd party service (offline supported)

    Parameters

    • files: File[]
    • request: any
    • tenantId: string
    • authenticationToken: string
    • onProgress: EventListenerOrEventListenerObject

      Callback to recieve progress event info

    • stateId: string

    Returns JQueryXHR

Const uploadSocialFile

  • uploadSocialFile(formData: FormData, streamId: string, tenantId: string, authenticationToken: string, onProgress: EventListenerOrEventListenerObject): JQueryXHR
  • POST to /api/social/1/stream/streamId/file to upload a file to a 3rd party social stream

    Parameters

    • formData: FormData
    • streamId: string
    • tenantId: string
    • authenticationToken: string
    • onProgress: EventListenerOrEventListenerObject

      Callback to recieve progress event info

    Returns JQueryXHR

Generated using TypeDoc