import { SfCommand } from '@salesforce/sf-plugins-core';
import { AnyJson } from '@salesforce/ts-types';
export default class HardisOrgCommunityUpdate extends SfCommand<any> {
    static readonly summary: string;
    static readonly description = "\n## Command Behavior\n\n**Updates the status of one or more Salesforce Experience Cloud (Community) networks.**\n\nThis command provides a way to programmatically change the status of your Salesforce Communities, allowing you to manage their availability. This is particularly useful for:\n\n- **Maintenance:** Taking communities offline for planned maintenance (`DownForMaintenance`).\n- **Activation/Deactivation:** Bringing communities online or offline (`Live`, `DownForMaintenance`).\n- **Automation:** Integrating community status changes into CI/CD pipelines or scheduled jobs.\n\nKey functionalities:\n\n- **Network Selection:** You can specify one or more community network names (separated by commas) using the `--name` flag.\n- **Status Update:** You can set the new status for the selected communities using the `--status` flag. Supported values are `Live` and `DownForMaintenance`.\n- **Confirmation Prompt:** In non-CI environments, it provides a confirmation prompt before executing the update, ensuring intentional changes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the Salesforce `Network` object using SOQL to retrieve the `Id`, `Name`, and `Status` of the specified communities. This ensures that only existing communities are targeted.\n- **SObject Update:** It then constructs an array of `Network` sObjects with their `Id` and the new `Status` and performs a DML update operation using `conn.sobject(\"Network\").update()`. The `allOrNone: false` option is used to allow partial success in case some updates fail.\n- **Error Handling and Reporting:** It iterates through the update results, logging success or failure for each community. It also provides a summary of successful and erroneous updates.\n- **User Interaction:** Uses `prompts` to confirm the update action with the user when not running in a CI environment.\n- **Salesforce Connection:** Establishes a connection to the target Salesforce org using the `target-org` flag.\n</details>\n";
    static examples: string[];
    static readonly flags: {
        name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
        status: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
        debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
        'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
    };
    run(): Promise<AnyJson>;
}
