Skip to content

Integration

This class defines a Integration from an [[User]] to an external service.

Extends

  • ResourceProperty<bkper.Integration>

Constructors

Constructor

new Integration(payload?, config?): Integration;

Parameters

ParameterType
payload?Integration
config?Config

Returns

Integration

Overrides

ResourceProperty<bkper.Integration>.constructor

Properties

payload

payload: Integration;

The underlying payload data for this resource

Inherited from

ResourceProperty.payload

Methods

deleteProperty()

deleteProperty(key): this;

Deletes a custom property.

Parameters

ParameterTypeDescription
keystringThe property key

Returns

this

This resource, for chaining

Inherited from

ResourceProperty.deleteProperty

getAddedBy()

getAddedBy(): string | undefined;

Gets the name of the user who added the Integration.

Returns

string | undefined

The user name of who added the Integration


getAgentId()

getAgentId(): string | undefined;

Gets the agent id of the Integration.

Returns

string | undefined

The Integration’s agent id


getBookId()

getBookId(): string | undefined;

Gets the [[Book]] id of the Integration.

Returns

string | undefined

The Integration’s Book id


getDateAddedMs()

getDateAddedMs(): string | undefined;

Gets the date when the Integration was added.

Returns

string | undefined

The Integration add date in milliseconds


getId()

getId(): string | undefined;

Gets the id of the Integration.

Returns

string | undefined

This Integration’s id


getLastUpdateMs()

getLastUpdateMs(): string | undefined;

Gets the date when the Integration was last updated.

Returns

string | undefined

The Integration last update date in milliseconds


getLogo(): string | undefined;

Gets the logo of the Integration.

Returns

string | undefined

The Integration’s logo


getLogoUrl()

getLogoUrl(): string | undefined;

Gets the logo url of this Integration.

Returns

string | undefined

The logo url of this Integration


getLogoUrlDark()

getLogoUrlDark(): string | undefined;

Gets the logo url of this Integration in dark mode.

Returns

string | undefined

The logo url of this Integration in dark mode


getName()

getName(): string | undefined;

Gets the name of the Integration.

Returns

string | undefined

The Integration’s name


getProperties()

getProperties(): object;

Gets the custom properties stored in this resource.

Returns

object

Object with key/value pair properties

Inherited from

ResourceProperty.getProperties

getProperty()

getProperty(...keys): string | undefined;

Gets the property value for given keys. First property found will be retrieved.

Parameters

ParameterTypeDescription
keysstring[]The property keys to search for

Returns

string | undefined

The property value or undefined if not found

Inherited from

ResourceProperty.getProperty

getPropertyKeys()

getPropertyKeys(): string[];

Gets the custom properties keys stored in this resource.

Returns

string[]

Array of property keys sorted alphabetically

Inherited from

ResourceProperty.getPropertyKeys

getVisibleProperties()

getVisibleProperties(): object;

Gets the visible custom properties stored in this resource. Hidden properties (those ending with ”_”) are excluded from the result.

Returns

object

Object with key/value pair properties, excluding hidden properties

Inherited from

ResourceProperty.getVisibleProperties

json()

json(): Integration;

Gets an immutable copy of the JSON payload for this resource.

Returns

Integration

An immutable copy of the json payload

Inherited from

ResourceProperty.json

remove()

remove(): Promise<Integration>;

Performs remove Integration.

Returns

Promise<Integration>

The removed Integration object


setProperties()

setProperties(properties): this;

Sets the custom properties of this resource.

Parameters

ParameterTypeDescription
properties{ [key: string]: string; }Object with key/value pair properties

Returns

this

This resource, for chaining

Inherited from

ResourceProperty.setProperties

setProperty()

setProperty(key, value): this;

Sets a custom property in this resource.

Parameters

ParameterTypeDescription
keystringThe property key
valuestring | null | undefinedThe property value, or null/undefined to clean it

Returns

this

This resource, for chaining

Inherited from

ResourceProperty.setProperty

setVisibleProperties()

setVisibleProperties(properties): this;

Sets the custom properties of this resource, filtering out hidden properties. Hidden properties are those whose keys end with an underscore ”_”.

Parameters

ParameterTypeDescription
properties{ [key: string]: string; }Object with key/value pair properties

Returns

this

This resource, for chaining

Inherited from

ResourceProperty.setVisibleProperties

setVisibleProperty()

setVisibleProperty(key, value): this;

Sets a custom property in this resource, filtering out hidden properties. Hidden properties are those whose keys end with an underscore ”_”.

Parameters

ParameterTypeDescription
keystringThe property key
valuestring | null | undefinedThe property value, or null/undefined to clean it

Returns

this

This resource, for chaining

Inherited from

ResourceProperty.setVisibleProperty