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
save
save(): Promise<void>
The method saves a live chat client object.
The method updates the current client.
The following field is editable: _applicationItem.
Live Chat client object
Type parameters
I: Item<ItemData>
I: Item<ItemData>
Hierarchy
Properties
Readonly code
App code of the URL’s target (the app’s code).
Readonly data
Values of object’s fields.
Readonly fields
Description of the object’s fields.
Readonly id
ID of the URL’s target.
Readonly namespace
Link target namespace (the code of the app's workspace).
Methods
fetch
Request complete data of a reference object.
Returns Promise<LineClientItem>
getBlockedStatus
The method allows getting a client's block status.
Returns one of the values LineClientBlockedStatus:
const client = Context.data.client; const clientStatus = client. getBlockedStatus();Returns Promise<LineClientBlockedStatus>
normalize
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
save
The method saves a live chat client object.
The method updates the current client. The following field is editable:
_applicationItem.const client = await Context.data. client.fetch(); client.data._applicationItem = Context.data.contact; await client.save();Returns Promise<void>
Feedback sent successfully
Thank you for your input