import { Base } from "./Base"; import { z } from "zod"; declare const cloudNotificationSchema: z.ZodObject<{ title: z.ZodString; description: z.ZodString; }, "strip", z.ZodTypeAny, { title: string; description: string; }, { title: string; description: string; }>; /** * The zod-based validator for the shape of the JSON here https://k8slens.dev/ads/cloud_notifications.json */ export declare const cloudNotificationsSchema: z.ZodObject<{ /** * @deprecated never used in production */ icon: z.ZodString; /** * @deprecated never used in production */ color: z.ZodString; notifications: z.ZodArray, "many">; }, "strip", z.ZodTypeAny, { notifications: { title: string; description: string; }[]; color: string; icon: string; }, { notifications: { title: string; description: string; }[]; color: string; icon: string; }>; /** * The shape of the JSON here https://k8slens.dev/ads/cloud_notifications.json */ export type CloudNotification = z.infer; /** * Notification severity levels */ export declare const severityLevels: readonly ["blocker", "critical", "major", "minor", "low"]; /** * Notification kinds, used to determine how to display the notification */ export declare const notificationKind: readonly ["link", "dialog", "text"]; declare const lensCloudNotificationSchema: z.ZodObject<{ /** optional, if present, only user with ALL (&& operator) the attributes will get this notifications */ forUserAttributes: z.ZodOptional>; /** the title of the notification */ title: z.ZodString; /** the title of the notification */ summary: z.ZodString; /** the severity enum of the notification */ severity: z.ZodEnum<["blocker", "critical", "major", "minor", "low"]>; /** the notification kind, text: basic notification, dialog: opens a modal on click, link: open the give .link */ kind: z.ZodEnum<["link", "dialog", "text"]>; /** to be open when clicks, must start with `https://` or `lens://`(custom protocol handler) */ link: z.ZodOptional>; /** must be a valid html, used to render in the body of the dialog */ context: z.ZodOptional; /** the text of the close button of the dialog */ closeBtnText: z.ZodOptional; }, "strip", z.ZodTypeAny, { summary: string; title: string; kind: "link" | "dialog" | "text"; severity: "low" | "blocker" | "critical" | "major" | "minor"; forUserAttributes?: string[] | undefined; link?: string | undefined; context?: string | undefined; closeBtnText?: string | undefined; }, { summary: string; title: string; kind: "link" | "dialog" | "text"; severity: "low" | "blocker" | "critical" | "major" | "minor"; forUserAttributes?: string[] | undefined; link?: string | undefined; context?: string | undefined; closeBtnText?: string | undefined; }>; /** * The zod-based validator for the shape of the JSON here https://k8slens.dev/ads/lens_cloud_notifications.json */ export declare const lensCloudNotificationsSchema: z.ZodObject<{ notifications: z.ZodArray>; /** the title of the notification */ title: z.ZodString; /** the title of the notification */ summary: z.ZodString; /** the severity enum of the notification */ severity: z.ZodEnum<["blocker", "critical", "major", "minor", "low"]>; /** the notification kind, text: basic notification, dialog: opens a modal on click, link: open the give .link */ kind: z.ZodEnum<["link", "dialog", "text"]>; /** to be open when clicks, must start with `https://` or `lens://`(custom protocol handler) */ link: z.ZodOptional>; /** must be a valid html, used to render in the body of the dialog */ context: z.ZodOptional; /** the text of the close button of the dialog */ closeBtnText: z.ZodOptional; }, "strip", z.ZodTypeAny, { summary: string; title: string; kind: "link" | "dialog" | "text"; severity: "low" | "blocker" | "critical" | "major" | "minor"; forUserAttributes?: string[] | undefined; link?: string | undefined; context?: string | undefined; closeBtnText?: string | undefined; }, { summary: string; title: string; kind: "link" | "dialog" | "text"; severity: "low" | "blocker" | "critical" | "major" | "minor"; forUserAttributes?: string[] | undefined; link?: string | undefined; context?: string | undefined; closeBtnText?: string | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { notifications: { summary: string; title: string; kind: "link" | "dialog" | "text"; severity: "low" | "blocker" | "critical" | "major" | "minor"; forUserAttributes?: string[] | undefined; link?: string | undefined; context?: string | undefined; closeBtnText?: string | undefined; }[]; }, { notifications: { summary: string; title: string; kind: "link" | "dialog" | "text"; severity: "low" | "blocker" | "critical" | "major" | "minor"; forUserAttributes?: string[] | undefined; link?: string | undefined; context?: string | undefined; closeBtnText?: string | undefined; }[]; }>; /** * The shape of the JSON here https://k8slens.dev/ads/lens_cloud_notifications.json */ export type LensCloudNotification = z.infer; export declare class NotificationService extends Base { /** * Lists notifications for the authenticated user. */ getMany(): Promise<({ title: string; description: string; } | { summary: string; title: string; kind: "link" | "dialog" | "text"; severity: "low" | "blocker" | "critical" | "major" | "minor"; forUserAttributes?: string[] | undefined; link?: string | undefined; context?: string | undefined; closeBtnText?: string | undefined; })[]>; } export {};