import type { IGroup } from "@esri/arcgis-rest-portal"; import { HubItemEntity } from "../core/HubItemEntity"; import { IHubEventEditor, IHubEvent } from "../core/types/IHubEvent"; import { SettableAccessLevel } from "../core/types/types"; import type { IArcGISContext } from "../types/IArcGISContext"; import { IEditorConfig } from "../core/schemas/types"; import { EventEditorType } from "./_internal/eventEditorTypes"; import { IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior"; import { IEntityEditorContext } from "../core/types/HubEntityEditor"; /** * Defines the properties of a Hub Event object * @internal */ export declare class HubEvent extends HubItemEntity implements IWithEditorBehavior { /** * Create an instance from a HubEvent object * @param json - JSON object to create a HubEvent from * @param context - ArcGIS context * @returns HubEvent */ static fromJson(json: Partial, context: IArcGISContext): HubEvent; /** * Fetch an Event from the API and return a HubEvent instance. * @param identifier slug or item id * @param context ArcGIS context * @returns Promise */ static fetch(identifier: string, context: IArcGISContext): Promise; private static applyDefaults; /** * Apply a new state to the instance * @param changes A partial IHubEvent */ update(changes: Partial): void; /** * Creates or saves the Event. */ save(): Promise; /** * Deletes the Event */ delete(): Promise; /** * Share the Entity with the specified group id * @param groupId The ID of the group to share the Event to */ shareWithGroup(groupId: string): Promise; /** * Share the Entity with the specified group ids * @param groupIds The IDs of the groups to share the Event to */ shareWithGroups(groupIds: string[]): Promise; /** * Unshare the Event with the specified group id * @param groupId The ID of the group to unshar ethe Event with */ unshareWithGroup(groupId: string): Promise; /** * Unshare the Event with the specified group ids * @param groupIds The IDs of the groups to unshare the Event with */ unshareWithGroups(groupIds: string[]): Promise; /** * Sets the access level of the event * @param access The access level to set the Event to */ setAccess(access: SettableAccessLevel): Promise; /** * Return a list of groups the Entity is shared to. */ sharedWith(): Promise; getEditorConfig(i18nScope: string, type: EventEditorType): Promise; /** * Return the HubEvent object as an editor object * @param editorContext * @param include * @returns Promise */ toEditor(_editorContext?: IEntityEditorContext, _include?: string[]): Promise; /** * Load the HubEvent object from the editor object * @param editor * @param editorContext * @returns Promise */ fromEditor(editor: IHubEventEditor): Promise; }