genshin-manager
Version:
<div align="center"> <p> <a href="https://www.npmjs.com/package/genshin-manager"><img src="https://img.shields.io/npm/v/genshin-manager.svg?maxAge=3600" alt="npm version" /></a> <a href="https://www.npmjs.com/package/genshin-manager"><img src="https:
105 lines (104 loc) • 2.64 kB
TypeScript
import { ImageAssets } from '../models/assets/ImageAssets';
import { ValueOf } from '../types';
import { NoticeLanguage, Region } from '../types/sg-hk4e-api';
import { ContentList, DataList } from '../types/sg-hk4e-api/response';
/**
* Class for compiling in-game announcement information
*/
export declare class Notice {
/**
* Date and time format options
*/
private static dateTimeFormatOptions;
/**
* Notice ID
*/
readonly id: number;
/**
* Notice title
*/
readonly title: string;
/**
* Notice subtitle
*/
readonly subtitle: string;
/**
* Notice banner
*/
readonly banner: ImageAssets;
/**
* Notice content DOM(jQuery)
* @warning This property does not exclude table tags
*/
readonly $: cheerio.Root;
/**
* Notice type (1:event or 2:important)
*/
readonly type: number;
/**
* Notice type label (event or important)
*/
readonly typeLabel: string;
/**
* Notice tag (1:! 2:star 3:flag)
*/
readonly tag: number;
/**
* Notice tag icon
*/
readonly tagIcon: ImageAssets;
/**
* Event start time
* @description If `undefined`, use getEventDuration()
*/
readonly eventStart: Date | undefined;
/**
* Event end time
* @description If `undefined`, use getEventDuration()
*/
readonly eventEnd: Date | undefined;
/**
* Reward image
*/
readonly rewardImg: ImageAssets | undefined;
/**
* Notice remind version
*/
readonly version: number;
/**
* Notice language
*/
readonly lang: ValueOf<typeof NoticeLanguage>;
/**
* Notice region
*/
readonly region: Region;
private readonly _en$;
/**
* Create a Notice
* @param annList AnnList
* @param annContent AnnContent
* @param enAnnContent AnnContent(lang=en)
* @param region Region
*/
constructor(annList: DataList, annContent: ContentList, enAnnContent: ContentList, region: Region);
/**
* Get the text of the notice
* @warning This method does not exclude table tags
* @returns Notice all text
*/
get text(): string;
/**
* Get the duration of the event
* @returns Event duration
*/
get eventDuration(): string | undefined;
private get durationTitleElement();
/**
* Convert t tag to region time
* @warning t tags work fine when inserted with text() content because the original is \> or \<.
* @param text Text
* @returns Converted text
*/
private convertLocalDate;
}