import type { BaseDocument } from "./BaseDocument";

type MessageDeliveryMethodWebPushVapid = {
  name: "message_delivery_method_web_push_vapid";
  value: {
    subject: string;
    keys: {
      publicKey: string;
      privateKey: string;
    };
  };
};
type MessageDeliveryMethodWebPushGcmApiKey = {
  name: "message_delivery_method_web_push_gcm_api_key";
  value: string;
};

export type ServerSettingsDocument = (
  | MessageDeliveryMethodWebPushVapid
  | MessageDeliveryMethodWebPushGcmApiKey
) & {
  _id: string; // Формат: "server_settings:<name>"
  type: "server_settings";
} & BaseDocument;
