Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

Dev Guide
Dev GuideUser GuidesLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

ChannelContentResult

OCP App SDK / ChannelContentResult

ChannelContentResult

Result of validate and publish.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor()

Signature

new ChannelContentResult(): ChannelContentResult;

Returns

ChannelContentResult

Inherited from: FormResult.constructor

Properties

errors

Protected object = {}

Index signature

[field: string]: string[]

Type declaration

Inherited from: FormResult.errors

Defined in: src/app/lib/FormResult.ts:4

toasts

Protected {

`intent`: [`Intent`](app-sdk-api-reference-types-intent);
`message`: `string`;

}[] = []

Inherited from: FormResult.toasts

Defined in: src/app/lib/FormResult.ts:5

Methods

addError()

Add an error to display to the user for a particular form field.

Signature

addError(
  form: "settings" | "template",
  section: string,
  field: string,
  error: string): ChannelContentResult;

Parameters

NameTypeDescription
form"settings" | "template"the type of content form that the error applies to (settings or template)
sectionstringthe section within the form that the error applies to
fieldstringthe field within the section that the error applies to
errorstringmessage to display to the user

Returns

ChannelContentResult

Defined in: src/app/lib/ChannelContentResult.ts:22

addToast()

Display a toast to user, such as, "Successfully authenticated with " or
"Authentication failed, please check your credentials and try again."

Signature

addToast(intent: Intent, message: string): ChannelContentResult;

Parameters

NameTypeDescription
intentIntentone of the supported intents that will affect how the toast is displayed
messagestringto display in the toast

Returns

ChannelContentResult

Inherited from: FormResult.addToast

Defined in: src/app/lib/FormResult.ts:13