import { SalesforceService } from '@vlocode/salesforce'; import { Logger } from '@vlocode/core'; import { FlexCardLwcCompiler } from './flexCardLwcCompiler'; import { FlexCardDefinition, FlexCardDefinitionAccess, FlexCardIdentifier } from './flexCardDefinition'; export interface FlexCardActivationOptions { /** * Skip the LWC deployment for the FlexCard and only activate the FlexCard record. */ skipLwcDeployment?: boolean; /** * When set to true, the compiler will use the standard runtime for the generated LWC components */ useStandardRuntime?: boolean; /** * When `true`, the LWC components will be updated an deployed using the tooling API instead of the metadata API. * The benefit of this is that the LWC components will be deployed to the org without the need to deploy the entire package. */ toolingApi?: boolean; /** * Timeout in milliseconds for the tooling API deployment. Default is 120 seconds. */ toolingApiTimeout?: number; } /** * Activates an FlexCard creating compiled FlexCardDefinition__c records in Salesforce and sets the script state to active. */ export declare class FlexCardActivator { private readonly salesforceService; private readonly lwcCompiler; private readonly lookup; private readonly logger; constructor(salesforceService: SalesforceService, lwcCompiler: FlexCardLwcCompiler, lookup: FlexCardDefinitionAccess, logger: Logger); /** * Activates the specified FlexCard, update the status to activated and deploys the LWC component to the org. * @param input FlexCard to activate * @param options Extra options that control how the script is activated */ activate(input: FlexCardDefinition | FlexCardIdentifier | string, options?: FlexCardActivationOptions): Promise; /** * Activates a FlexCard definition in Salesforce. * * This method performs the following steps: * 1. Finds any currently active cards with the same name as the target card * 2. Deactivates those cards to prevent activation conflicts * 3. Activates the target card * 4. Updates the card's IsActive property to reflect the new state * * @param card - The FlexCard definition to activate * @throws Error if the activation of the target card fails */ activateRecord(card: FlexCardDefinition): Promise; /** * Activate the LWC component for the specified FlexCard regardless of the script is LWC enabled or not. * @param id Id of the FlexCard for which to activate the LWC component */ activateLwc(input: FlexCardIdentifier, options?: Omit): Promise; /** * Get the LWC component bundle as metadata package for the specified FlexCard * @param id Id of the FlexCard * @returns Deployable Metadata package */ getMetadataPackage(input: FlexCardIdentifier): Promise; /** * Generate the LWC component bundlen for the specified FlexCard definition and deploy it to the org. * @param card Definition of the FlexCard to deploy * @param options Extra options that control how the script is activated */ private deployLwc; private deployLwcWithMetadataApi; private deployLwcWithToolingApi; private upsertToolingRecord; } //# sourceMappingURL=flexCardActivator.d.ts.map