ConnectedService class

Warning

This API is now deprecated.

See https://aka.ms/bot-file-basics for more information.

Base class for all connected service definitions.

Constructors

ConnectedService(IConnectedService, ServiceTypes)

Creates a new ConnectedService instance.

Properties

id

Unique Id for the service.

name

Friendly name for the service.

type

Methods

decrypt(string, (value: string, secret: string) => string)

Decrypt properties on this service.

encrypt(string, (value: string, secret: string) => string)

Encrypt properties on this service.

toJSON()

Creates a JSON based version of the model for saving to disk.

Constructor Details

ConnectedService(IConnectedService, ServiceTypes)

Creates a new ConnectedService instance.

new ConnectedService(source?: IConnectedService, type?: ServiceTypes)

Parameters

source
IConnectedService

(Optional) JSON based service definition.

type
ServiceTypes

(Optional) type of service being defined.

Property Details

id

Unique Id for the service.

id: string

Property Value

string

name

Friendly name for the service.

name: string

Property Value

string

type

type?: ServiceTypes

Property Value

Method Details

decrypt(string, (value: string, secret: string) => string)

Decrypt properties on this service.

function decrypt(_secret: string, _decryptString: (value: string, secret: string) => string)

Parameters

_secret

string

Secret to use to decrypt the keys in this service.

_decryptString

(value: string, secret: string) => string

Function called to decrypt an individual value.

encrypt(string, (value: string, secret: string) => string)

Encrypt properties on this service.

function encrypt(_secret: string, _encryptString: (value: string, secret: string) => string)

Parameters

_secret

string

Secret to use to encrypt the keys in this service.

_encryptString

(value: string, secret: string) => string

Function called to encrypt an individual value.

toJSON()

Creates a JSON based version of the model for saving to disk.

function toJSON(): IConnectedService

Returns

An IConnectedService JSON.