A limited and simplified version of an Efficy SDK build around the public API version 1. Each method immediatly invokes a request to the server and returns the received data object.

Hierarchy

  • CrmFetch
    • Api

Constructors

  • Parameters

    • Optional crmEnv: CrmEnv
    • apiVersion: string = "v1"

    Returns Api

Properties

apiVersion: string = "v1"
crmEnv: CrmEnv = ...
fetchOptions: RequestInit = ...
name: string = "CrmFetch"
requestCounter: number = 0
sessionId?: string

Accessors

  • get lastResponseObject(): null | object
  • Returns null | object

  • get lastResponseStatus(): number
  • Returns number

Methods

  • Type Parameters

    • R

    Parameters

    Returns Promise<null | R>

  • Parameters

    • requestUrl: string
    • Optional requestPayload: ModulePostPayload
    • Optional requestOptions: RequestInit
    • isRetry: boolean = false

    Returns Promise<null | object>

  • Retrieve file linked to a specific document

    Type Parameters

    Parameters

    • docuKey: string

      ID of the documents

    • fileKey: string

      ID of the file

    Returns Promise<null | T>

  • Retrieve a list of files linked to a specific document

    Type Parameters

    Parameters

    • docuKey: string

      ID of the document

    • Optional queryParams: QueryParams

    Returns Promise<null | T>

  • Parameters

    Returns string

  • Parameters

    • method: "POST" | "GET"

    Returns void

  • Returns void