import type { SystemMessage } from "../_internal/types.gen";
import type { RequestOptions } from "../base-client";
import { RequestBuilder } from "../request-builder";
/** The kind of platform-wide system message. */
export type SystemMessageType = "tos" | "privacy_policy" | "welcome" | "announcement";
/** Attributes accepted when creating a system message. */
export type CreateSystemMessageAttributes = {
    /** Required. The kind of system message. */
    type: SystemMessageType;
    /** Required. Human-readable title shown to users. */
    title: string;
    /** Required. Markdown body content. */
    content: string;
    /** Semantic version of this message. Default: "1.0.0". */
    version?: string;
    /**
     * For ToS: forces users to re-accept even if they accepted a previous
     * version. Default: false.
     */
    requires_acceptance?: boolean;
    /**
     * Whether the message is live. When true at creation, `published_at` is
     * set automatically. Default: false.
     */
    is_active?: boolean;
};
/** Attributes accepted when updating a system message (PATCH semantics). */
export type UpdateSystemMessageAttributes = Partial<Omit<CreateSystemMessageAttributes, "type">>;
/**
 * Creates the system-messages namespace, providing platform-admin management
 * of platform-wide system messages — Terms of Service, privacy policies,
 * welcome messages, and announcements.
 *
 * Accessed via `admin.systemMessages.*`. All write operations require a
 * platform-admin actor (`sk_sys_` key); other actors are denied by policy.
 *
 * @param rb - The internal `RequestBuilder` instance used to execute API calls.
 * @returns An object exposing list/get/create/update/delete plus the
 *   `publish` and `unpublish` lifecycle transitions.
 */
export declare function createSystemMessagesNamespace(rb: RequestBuilder): {
    /**
     * Lists all platform-wide system messages.
     *
     * @param options - Optional request options (pagination, filters, sorting).
     * @returns A promise resolving to an array of `SystemMessage` records.
     *
     * @example
     * ```ts
     * const messages = await admin.systemMessages.list();
     * ```
     */
    list: (options?: RequestOptions) => Promise<SystemMessage[]>;
    /**
     * Fetches a single system message by its unique identifier.
     *
     * @param id - The UUID of the system message.
     * @param options - Optional request options.
     * @returns A promise resolving to the matching `SystemMessage` record.
     *
     * @example
     * ```ts
     * const tos = await admin.systemMessages.get("msg-uuid");
     * ```
     */
    get: (id: string, options?: RequestOptions) => Promise<SystemMessage>;
    /**
     * Creates a new platform-wide system message. If `is_active` is true at
     * creation time, `published_at` is set automatically. Requires a
     * platform-admin actor.
     *
     * @param attributes - The system message attributes.
     * @param options - Optional request options.
     * @returns A promise resolving to the created `SystemMessage`.
     *
     * @example
     * ```ts
     * const announcement = await admin.systemMessages.create({
     *   type: "announcement",
     *   title: "Scheduled maintenance",
     *   content: "We will be down Sunday 02:00–03:00 UTC.",
     *   is_active: true,
     * });
     * ```
     */
    create: (attributes: CreateSystemMessageAttributes, options?: RequestOptions) => Promise<SystemMessage>;
    /**
     * Edits a system message's content, title, or version. Use `publish` /
     * `unpublish` for lifecycle transitions rather than toggling `is_active`
     * here. Requires a platform-admin actor.
     *
     * @param id - The UUID of the system message to update.
     * @param attributes - The fields to change.
     * @param options - Optional request options.
     * @returns A promise resolving to the updated `SystemMessage`.
     *
     * @example
     * ```ts
     * const updated = await admin.systemMessages.update("msg-uuid", {
     *   content: "Revised policy text.",
     *   version: "1.1.0",
     * });
     * ```
     */
    update: (id: string, attributes: UpdateSystemMessageAttributes, options?: RequestOptions) => Promise<SystemMessage>;
    /**
     * Permanently deletes a system message. Requires a platform-admin actor.
     *
     * @param id - The UUID of the system message to delete.
     * @param options - Optional request options.
     * @returns A promise resolving to `true` on success.
     *
     * @example
     * ```ts
     * await admin.systemMessages.delete("msg-uuid");
     * ```
     */
    delete: (id: string, options?: RequestOptions) => Promise<true>;
    /**
     * Activates a system message so it is visible to all authenticated users.
     * Sets `is_active: true` and records `published_at` on first publish
     * (preserved on subsequent re-activations). Requires a platform-admin
     * actor.
     *
     * @param id - The UUID of the system message to publish.
     * @param options - Optional request options.
     * @returns A promise resolving to the updated `SystemMessage`.
     *
     * @example
     * ```ts
     * const live = await admin.systemMessages.publish("msg-uuid");
     * ```
     */
    publish: (id: string, options?: RequestOptions) => Promise<SystemMessage>;
    /**
     * Deactivates a system message, removing it from the live feed without
     * deleting it. Use `publish` to re-activate. Requires a platform-admin
     * actor.
     *
     * @param id - The UUID of the system message to unpublish.
     * @param options - Optional request options.
     * @returns A promise resolving to the updated `SystemMessage`.
     *
     * @example
     * ```ts
     * const hidden = await admin.systemMessages.unpublish("msg-uuid");
     * ```
     */
    unpublish: (id: string, options?: RequestOptions) => Promise<SystemMessage>;
};
//# sourceMappingURL=system-messages.d.ts.map