import { HubItemEntity } from "../core/HubItemEntity"; import { IEditorConfig } from "../core/schemas/types"; import { IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior"; import type { IArcGISContext } from "../types/IArcGISContext"; import { Catalog } from "../search/Catalog"; import { InitiativeTemplateEditorType } from "./_internal/initiativeTemplateEditorTypes"; import { IWithCardBehavior } from "../core/behaviors/IWithCardBehavior"; import { IWithCatalogBehavior } from "../core/behaviors/IWithCatalogBehavior"; import { HubEntity } from "../core/types/HubEntity"; import { IEntityEditorContext } from "../core/types/HubEntityEditor"; import { IConvertToCardModelOpts, IHubCardViewModel } from "../core/types/IHubCardViewModel"; import { IHubInitiativeTemplate, IHubInitiativeTemplateEditor } from "../core/types/IHubInitiativeTemplate"; /** * Hub Initiative Template Class */ export declare class HubInitiativeTemplate extends HubItemEntity implements IWithCatalogBehavior, IWithEditorBehavior, IWithCardBehavior { private _catalog; private constructor(); get catalog(): Catalog; /** * Create an instance from an IHubInitiativeTemplate object * @param json - JSON object to create a HubInitiativeTemplate from * @param context - ArcGIS context * @returns - instance of HubInitiativeTemplate */ static fromJson(json: Partial, context: IArcGISContext): HubInitiativeTemplate; /** * Create a new HubInitiativeTemplate, returning a HubInitiativeTemplate instance. * Note: This does not persist the HubInitiativeTemplate into the backing store * @param partialInitiativeTemplate * @param context * @param save * @returns */ static create(partialInitiativeTemplate: Partial, context: IArcGISContext, save?: boolean): Promise; /** * Fetch a HubInitiativeTemplate from the backing store and return a HubInitiativeTemplate instance. * @param identifier - Identifier of the initiative template to load * @param context */ static fetch(identifier: string, context: IArcGISContext): Promise; /** * Given a partial initiative template, apply defaults to it to ensure that a baseline of properties are set * @param partialInitiativeTemplate * @param context * @returns */ private static applyDefaults; /** * Convert the project entity into a card view model that can * be consumed by the suite of hub gallery components * @param opts - view model options * @returns */ convertToCardModel(opts?: IConvertToCardModelOpts): IHubCardViewModel; /** * Get the editor config for the HubInitiativeTemplate entity. * @param i18nScope translation scope to be interpolated into the uiSchema * @param type editor type -- corresponds to the returned uiSchema */ getEditorConfig(i18nScope: string, type: InitiativeTemplateEditorType): Promise; /** * Return the initiative template as an editor object * @param editorContext */ toEditor(_editorContext?: IEntityEditorContext, include?: string[]): Promise; /** * Load the initiative template from the editor object * @param editor */ fromEditor(editor: IHubInitiativeTemplateEditor): Promise; /** * Apply a new state to the instance * @param changes */ update(changes: Partial): void; /** * Save the HubInitiativeTemplate to the backing store. * @returns */ save(): Promise; /** * Delete the HubInitiativeTemplate from the store * set a flag to indicate that it is destroyed * @returns */ delete(): Promise; }