ChannelTargetResult
OCP App SDK / ChannelTargetResult
ChannelTargetResult
Result of target.
Hierarchy
FormResult
.ChannelTargetResult
Index
Constructors
Properties
Methods
Constructors
constructor()
Signature
new ChannelTargetResult(targeting?: CampaignTargeting[]): ChannelTargetResult;
Parameters
Name | Type | Description |
---|---|---|
targeting? | CampaignTargeting [] | the complete set of targeting requirements, if already known |
Returns
Overrides: FormResult.constructor
Defined in: src/app/lib/ChannelTargetResult.ts:22
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 (implicitly scoped to the content settings form)
Signature
addError(section: string, field: string, error: string): ChannelTargetResult;
Parameters
Name | Type | Description |
---|---|---|
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/ChannelTargetResult.ts:51
addTargeting()
Add a single targeting requirement
Signature
addTargeting(targeting: CampaignTargeting): ChannelTargetResult;
Parameters
Name | Type | Description |
---|---|---|
targeting | CampaignTargeting | requirement to add |
Returns
Defined in: src/app/lib/ChannelTargetResult.ts:31
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): ChannelTargetResult;
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
setTargeting()
Provide the complete set of targeting requirements
Signature
setTargeting(targeting: CampaignTargeting[]): ChannelTargetResult;
Parameters
Name | Type | Description |
---|---|---|
targeting | CampaignTargeting [] | requirements to provide |
Returns
Defined in: src/app/lib/ChannelTargetResult.ts:40
Updated 3 months ago