@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
41 lines (39 loc) • 3.56 kB
TypeScript
import type ExpressionInfo from "./ExpressionInfo.js";
import type { ClonableMixin } from "../../core/Clonable.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { ExpressionInfoProperties } from "./ExpressionInfo.js";
export interface GeotriggerNotificationOptionsProperties extends Partial<Pick<GeotriggerNotificationOptions, "requestedActions">> {
/** An optional Arcade expression which can be used to configure notification information when the Geotrigger condition is met. The expression uses the [Geotrigger Notification](https://developers.arcgis.com/arcade/profiles/geotrigger-notification/) Arcade profile. The expression can return either a String that will be used for a user facing message or a Dictionary that can include a user facing message with the key 'message', and a recommended list of app actions using the key 'actions'. */
expressionInfo?: ExpressionInfoProperties | null;
}
/**
* Options that control the notification information sent to a client app client when a Geotrigger condition is met.
*
* @since 4.24
* @example
* let notificationOptions = new GeotriggerNotificationOptions({
* expressionInfo: { // autocasts as new ExpressionInfo()
* title: "Notice",
* expression: "'You have entered' + $fencefeature.AREA_NAME"
* }),
* requestedActions: [ "showMessage" ]
* })
*/
export default class GeotriggerNotificationOptions extends GeotriggerNotificationOptionsSuperclass {
constructor(properties?: GeotriggerNotificationOptionsProperties);
/** An optional Arcade expression which can be used to configure notification information when the Geotrigger condition is met. The expression uses the [Geotrigger Notification](https://developers.arcgis.com/arcade/profiles/geotrigger-notification/) Arcade profile. The expression can return either a String that will be used for a user facing message or a Dictionary that can include a user facing message with the key 'message', and a recommended list of app actions using the key 'actions'. */
get expressionInfo(): ExpressionInfo | null | undefined;
set expressionInfo(value: ExpressionInfoProperties | null | undefined);
/**
* An optional list of strings indicating the set of possible actions resulting from this Geotrigger. This property shows the full list of recommended actions that the author intends to be taken for this Geotrigger. Note that there is no requirement to take any action when a notification is delivered, but these provide a way to understand the intention of the author of the Geotrigger. These strings can be displayed to a user to make them aware of the Geotrigger's expected behavior, or used by client apps to determine whether the desired actions are supported. If a client app receives notification information containing an unrecognized action they should ignore it. Actions can be any strings that are supported by geotrigger enabled apps in your organization and should cover all possible 'action' values returned from evaluation of expressionInfo.expression.
*
* @example
* // Some actions a client app can consume and define behavior for
* options.requestedActions = [ "someAction", "someOtherAction", "aThirdAction" ]
*
* // A more realistic example: actions a client app can consume and define (likely tracking-related) behavior for
* options.requestedActions = [ "startTracking", "stopTracking" ]
*/
accessor requestedActions: string[] | null | undefined;
}
declare const GeotriggerNotificationOptionsSuperclass: typeof JSONSupport & typeof ClonableMixin