ChannelContentResult
OCP App SDK / ChannelContentResult
ChannelContentResult
Result of validate and publish.
Hierarchy
FormResult
.ChannelContentResult
Index
Constructors
Properties
Methods
Constructors
constructor()
Signature
new ChannelContentResult(): ChannelContentResult;
Returns
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
Name | Type | Description |
---|---|---|
form | "settings" | "template" | the type of content form that the error applies to (settings or template) |
section | string | the section within the form that the error applies to |
field | string | the field within the section that the error applies to |
error | string | message to display to the user |
Returns
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
Name | Type | Description |
---|---|---|
intent | Intent | one of the supported intents that will affect how the toast is displayed |
message | string | to display in the toast |
Returns
Inherited from: FormResult.addToast
Defined in: src/app/lib/FormResult.ts:13
Updated 2 months ago