IntercomSystem

@osaas/client-intercom. IntercomSystem

new IntercomSystem(context, name, customEndpointopt)

Description:
  • Constructor for IntercomSystem

Parameters:
Name Type Attributes Description
context Context

Open Source Cloud configuration context

name string

The name of the Intercom system

customEndpoint string <optional>

Optional custom endpoint for the Intercom system (if running outside of Open Source Cloud)

Methods

(async) addLineToProduction(productionId, lineName, programOutputLine) → {Promise.<Array.<IntercomProductionLine>>}

Description:
  • Add a new line to a production

Parameters:
Name Type Description
productionId string

The production ID to add the line to

lineName string

The name of the line to add

programOutputLine boolean

Whether the line is a program output line

Returns:
  • The updated list of lines for the production
Type
Promise.<Array.<IntercomProductionLine>>

(async) createProduction(name, lines) → {Promise.<IntercomProduction>}

Description:
  • Create a new production in the Intercom system

Example
import { Context } from '@osaas/client-core';
import { IntercomSystem } from '@osaas/client-intercom';

const ctx = new Context();
const intercom = new IntercomSystem({ context: ctx, name: 'example' });
await intercom.init();
await intercom.createProduction('my-production', [
  { name: 'Line 1', programOutputLine: true },
  { name: 'Line 2', programOutputLine: false }
]);
Parameters:
Name Type Description
name string

The name of the production

lines NewProductionLine

The lines to create in the production

Returns:
  • The created production
Type
Promise.<IntercomProduction>

(async) deleteProduction(productionId)

Description:
  • Delete a production in the Intercom system

Parameters:
Name Type Description
productionId string

The production ID to delete

(async) getParticipantsForLine(productionId, lineId) → {Promise.<Array.<IntercomProductionLineParticipant>>}

Description:
  • Get the list of participants for a given line in a production

Parameters:
Name Type Description
productionId string

The production ID to get participants for

lineId string

The line ID to get participants for

Returns:
  • The list of participants for the line
Type
Promise.<Array.<IntercomProductionLineParticipant>>

(async) init()

Description:
  • Initialize the Intercom system

(async) listLinesForProduction(productionId) → {Array.<IntercomProductionLine>}

Description:
  • List all lines for a given production

Parameters:
Name Type Description
productionId string

The production ID to list lines for

Returns:
  • List of lines for the production
Type
Array.<IntercomProductionLine>

(async) listProductions() → {Promise.<Array.<IntercomProduction>>}

Description:
  • List all productions in the Intercom system

Returns:
  • List of productions
Type
Promise.<Array.<IntercomProduction>>

(async) modifyLine(productionId, lineId, name, programOutputLine) → {Promise.<IntercomProductionLine>}

Description:
  • Modify a line in a production

Parameters:
Name Type Description
productionId string

The production ID to modify the line in

lineId string

The line ID to modify

name string

The new name for the line

programOutputLine boolean

Whether the line is a program output line

Returns:
  • The modified line
Type
Promise.<IntercomProductionLine>