@ptkl/sdk - v0.9.9
    Preparing search index...

    Class Component

    Hierarchy

    • default
      • Component
    Index

    Constructors

    • Parameters

      • ref: null | string = null

      Returns Component

    Properties

    client: AxiosInstance
    env: null | string = null
    host: null | string = null
    token: null | string = null

    Methods

    • Concurrent update model by uuid

      Parameters

      • uuid: string

        string - The uuid of the model

      • version: number

        number - The version of the model

      • data: Record<string, any>
      • options: UpdateOptions

      Returns Promise<AxiosResponse<any, any>>

    • Parameters

      • model: Record<string, any>

      Returns Promise<AxiosResponse<any, any>>

    • Parameters

      • uuid: string

      Returns Promise<AxiosResponse<any, any>>

    • Find method to search for models

      Parameters

      • filters: FindParams

        The filters to apply to the search

      • Optionalopts: FindOptions

        The options to apply to the search

      Returns Promise<AxiosResponse<FindResponse, any>>

      • The result of the search
      platform.component(name).find({
      currentPage: 1,
      perPage: 10,
      })

      // advanced search
      platform.component(name).find({
      $adv: {
      name: "John Doe",
      }
      )
    • FindOne method to search for a single model

      Parameters

      Returns Promise<null | Model>

      • The result of the search
      platform.component(name).findOne({
      name: "John Doe",
      })
    • Parameters

      • name: string
      • input: any

      Returns Promise<AxiosResponse<any, any>>

    • Get model by uuid

      Parameters

      • uuid: string

        string - The uuid of the model

      Returns Promise<AxiosResponse<Model, any>>

      (Promise)

    • Modify models by filters

      Parameters

      • filters: Record<string, any>
      • data: Record<string, any>
      • options: ModifyOptions

      Returns Promise<AxiosResponse<any, any>>

    • Parameters

      • settings: any
      • version: string

      Returns Promise<AxiosResponse<any, any>>

    • Parameters

      • version: string
      • sdkVersion: string
      • engine: string
      • dist: Record<string, string>

      Returns Promise<any>

    • Parameters

      • client: AxiosInstance

      Returns Component

    • Returns Promise<AxiosResponse<any, any>>

    • Update model by uuid

      Parameters

      • uuid: string

        string - The uuid of the model

      • data: Record<string, any>
      • options: UpdateOptions

      Returns Promise<AxiosResponse<any, any>>

    • Update many models

      Parameters

      Returns Promise<AxiosResponse<any, any>>

    • Parameters

      • event: string
      • input: any

      Returns Promise<AxiosResponse<any, any>>