Type parameters

Hierarchy

Properties

Readonly code

code: string

App code of the URL’s target (the app’s code).

Readonly data

data: Based<Partial<LineChannelData>>

Values of object’s fields.

Readonly fields

fields: Readonly<object>

Description of the object’s fields.

Readonly id

id: string

ID of the URL’s target.

Readonly namespace

namespace: string

Namespace of the URL target (the code of the workspace that the app belongs to).

Methods

disconnect

  • disconnect(): Promise<void>
  • The method disconnects a live chat channel.

    await Context.data.channel.disconnect();
    

    Returns Promise<void>

fetch

normalize

  • normalize(): void
  • Delete duplicate data in arrays.

    The method deletes duplicates in fields that store arrays of links to system objects (users, files, app items, or documents). For example, you can call this method after bulk editing data within an object.

    const  app1 = await Context.data.app1.fetch();
    const app2 = await Context.data.app2 .fetch(); 
    app1.data.executors.push(app2.data.executors); 
    app1.normalize();  
    // Now we need to go over the elements in the new array 
    app1.data.executors .forEach( ... ); 
    

    Returns void

reconnect

  • reconnect(): Promise<void>
  • The method activates a previously disconnected live chat channel.

    The following types of channels can be reconnected: telegramBot, inbox,
    viberbot, livechat, and instagram (see LineChannelType).

    await Context.data.channel.reconnect();
    

    Returns Promise<void>