@one-view/pd-oneview-cs-chat-box-types
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.18 • Public • Published

    FORMAT: 1A VERSION: 1.0.0 HOST: https://api.pd-oneview.net/cs-chat-box

    pd-oneview-cs-chat-box

    backend for cs-chat-box 1vU plugin

    Agent Info [/v1/info]

    agent information

    Get agent information [GET]

    • Request

      • Headers

          Authorization: bearer token
        
    • Response 200 (application/json)

      • Attributes (AgentInfo)
    • Response 400 (application/json)

      • Attributes (Error_400)
    • Response 403 (application/json)

      • Attributes (Error_403)
    • Response 404 (application/json)

      • Attributes (Error_404)
    • Response 500 (application/json)

      • Attributes (Error_500)

    update ticket first response time [/v1/tickets/{ticketID}/firstResponseTime]

    update ticket firstResponseTime when connected to chat-system

    • Parameters
      • ticketID (required, string, vsba-nhas)

    Update ticket information [POST]

    • Request

      • Headers

          Authorization: bearer token
        
    • Response 200 (application/json)

    • Response 400 (application/json)

      • Attributes (Error_400)
    • Response 403 (application/json)

      • Attributes (Error_403)
    • Response 404 (application/json)

      • Attributes (Error_404)
    • Response 500 (application/json)

      • Attributes (Error_500)

    get room [/v1/tickets/{ticketID}/room]

    providing room metadata information to allow plugin to connect with chat-system

    • Parameters

      • ticketID (required, string, vsba-nhas)
    • Attributes (Room)

    get room information [GET]

    • Request

      • Headers

          Authorization: bearer token
        
    • Response 200 (application/json)

      • Attributes (Room)
    • Response 400 (application/json)

      • Attributes (Error_400)
    • Response 403 (application/json)

      • Attributes (Error_403)
    • Response 404 (application/json)

      • Attributes (Error_404)
    • Response 500 (application/json)

      • Attributes (Error_500)

    close chat room [DELETE]

    • Request

      • Headers

          Authorization: bearer token
        
    • Response 200 (application/json)

    • Response 400 (application/json)

      • Attributes (Error_400)
    • Response 403 (application/json)

      • Attributes (Error_403)
    • Response 404 (application/json)

      • Attributes (Error_404)
    • Response 500 (application/json)

      • Attributes (Error_500)

    Chat History [/v1/rooms/{roomId}/history{?entityId,roomName}]

    chat room history

    • Parameters
      • roomId (required, string, vsba-nhas)
      • entityId (required, string, FP_SG)
      • roomName (required, string, sgg5h9vx)

    Get chat room history [GET]

    • Request

      • Headers

          Authorization: bearer token
        
    • Response 200 (application/json)

      • Attributes (MessageHistories)
    • Response 400 (application/json)

      • Attributes (Error_400)
    • Response 403 (application/json)

      • Attributes (Error_403)
    • Response 404 (application/json)

      • Attributes (Error_404)
    • Response 500 (application/json)

      • Attributes (Error_500)

    Chat Template Placeholder [/v1/orders/{orderCode}/placeholder{?geid,query}]

    chat template placeholder

    • Parameters
      • orderCode (required, string, vsba-nhas)
      • geid (required, string, FP_SG)
      • query (optional, string, ETA,RESTAURANT_NAME)

    Get chat template placeholder [GET]

    • Request

      • Headers

          Authorization: bearer token
        
    • Response 200 (application/json)

      • Attributes (Placeholders)
    • Response 400 (application/json)

      • Attributes (Error_400)
    • Response 401 (application/json)

      • Attributes (Error_401)
    • Response 403 (application/json)

      • Attributes (Error_403)
    • Response 404 (application/json)

      • Attributes (Error_404)
    • Response 500 (application/json)

      • Attributes (Error_500)

    get template list [/v1/templates{?user,ccr,templateType,search,titles,language,vertical,page,pageSize}]

    get list of general template

    • Parameters

      • user (string, required) - customer username
      • templateType (TemplateType, optional) - template types
      • ccr (string, optional) - ccr
      • search (string, optional) - subset of words to search template label
      • titles (string, optional) - Url encoded template titles. Supports multiple titles, seperated by comma
      • language (Language, optional) - template language
        • Default: eng
      • vertical (Vertical, optional) - template vertical
        • Default: restaurants
      • page (int32, optional) - page number
        • Default: 1
      • pageSize (int32, optional) - number of records per page
        • Default: 10
    • Attributes (TemplateList)

    get template list [GET]

    • Request

      • Headers

          Authorization: bearer token
        
    • Response 200 (application/json)

      • Attributes (TemplateList)
    • Response 400 (application/json)

      • Attributes (Error_400)
    • Response 403 (application/json)

      • Attributes (Error_403)
    • Response 404 (application/json)

      • Attributes (Error_404)
    • Response 500 (application/json)

      • Attributes (Error_500)

    Data Structures

    int32 (number)

    int64 (number)

    error_object (object)

    • status (string) - HTTP status code for this problem, expressed as a string value
    • title (string) - short, human-readable unique summary of the problem (not localized)

    Error (object)

    • errors (array[error_object])

    Error_401 (object)

    • errors (array)
      • error_object
        • status: 401 (string)
        • title: not authorize (string)

    Error_404 (object)

    • errors (array)
      • error_object
        • status: 404 (string)
        • title: not found (string)

    Error_403 (object)

    • errors (array)
      • error_object
        • status: 403 (string)
        • title: forbidden (string)

    Error_400 (object)

    • errors (array)
      • error_object
        • status: 400 (string)
        • title: bad request (string)

    Error_500 (object)

    • errors (array)
      • error_object
        • status: 500 (string)
        • title: internal server error (string)

    AgentInfo

    • id : f4b8f8e5-365a-4ed1-a122-0f4ba1afef44 (string, required) - agent id
    • name : somename (string) - agent name
    • email : foobar@foodpanda.com (string) - agent email
    • status : online (string) - agent status
    • statusAlias : online (string) - agent status alias
    • lastLoginTime : 2012-12-11 08:52:31 +0000 UTC (string) - time at which agent login last time
    • updatedAt : 2012-12-11 08:52:31 +0000 UTC (string) - time at which agent status updated
    • agentTimeInStatus : 1572499999 (int64) - duration of current agent status

    Room

    • accessKeys (object) - access keys
    • agentJwt : token (string) - agent jwt
    • agentJwtID : token (string) - agent jwt ID
    • id : id (string) - chat room id
    • name : roomname (string) - chat room name
    • subscriptionToken : token (string) - token for room subscription
    • status (RoomStatus) - room status
    • entityId : FP_SG (string) - global entity id

    MessageHistory

    • sort_id: 0 (int64) - message sort id
    • content: "event" (string) - message content
    • type: "event" (string) - message type
    • event: "join" (string) - message event
    • created_at: "2020-03-25T05:06:54.190Z" (timestamp) - time created
    • sender: "cust_name" (string) - message sender
    • access: "*" (string) - message access

    MessageHistories

    • data (array[MessageHistory], fixed-type)
    • count : 1 (int64) - number of messages

    TemplateList

    • list (array[Template]) - list of template

    Template

    • id (string, required) - id of text template
    • identifier (string, required) - identifier of text template can be username or ccr
    • label (string) - label of text template
    • template (string) - template in text

    TemplateTag

    • key (string, required) - key of tag
    • value (string) - value of tag

    Placeholders

    • list (array[Placeholder], required, fixed-typed) - list of placeholders

    Placeholder

    • key (string, required) - key of the placeholder
    • value (object, required) - value of the placeholder

    RoomStatus (enum)

    • OPEN
    • CLOSED

    TemplateType (enum)

    • general-template
    • ccr-template

    Language (enum)

    • eng
    • cmn
    • yue
    • tha
    • urd
    • mya
    • khm
    • lao
    • ben

    Vertical (enum)

    • restaurants
    • flowers
    • groceries
    • cosmetics
    • health_supplements
    • pharmacies
    • pets
    • drinks
    • cross_vertical
    • electronics
    • baby_supplies
    • furniture
    • bags_and_luggage
    • toys
    • optics
    • courier_business
    • shop
    • coffee
    • courier
    • cash
    • darkstores

    Keywords

    none

    Install

    npm i @one-view/pd-oneview-cs-chat-box-types

    DownloadsWeekly Downloads

    61

    Version

    0.0.18

    License

    none

    Unpacked Size

    55.8 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar