功能新增: - OSS 存储使用情况显示(文件页面) - OSS 当日流量统计(阿里云云监控API) - 分享页面路由修复(/s/xxx 格式支持) Bug修复: - 修复分享页面资源路径(相对路径改绝对路径) - 修复分享码获取逻辑(支持路径格式) - 修复OSS配额undefined显示问题 - 修复登录流程OSS配置检查 - 修复文件数为null时的显示问题 依赖更新: - 添加 @alicloud/cms20190101 云监控SDK - 添加 @alicloud/openapi-client Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
71 lines
2.6 KiB
TypeScript
71 lines
2.6 KiB
TypeScript
import moment = require('moment');
|
|
import { MomentTimezone } from "./index";
|
|
|
|
declare module 'moment' {
|
|
|
|
/** Parsed / unpacked zone data. */
|
|
interface UnpackedZone {
|
|
/** The uniquely identifying name of the time zone. */
|
|
name: string;
|
|
/** zone abbreviations */
|
|
abbrs: Array<string>;
|
|
/** (measured in milliseconds) */
|
|
untils: Array<number | null>;
|
|
/** (measured in minutes) */
|
|
offsets: Array<number>;
|
|
}
|
|
|
|
/** Bundle of zone data and links for multiple timezones */
|
|
interface PackedZoneBundle {
|
|
version: string;
|
|
zones: Array<string>;
|
|
links: Array<string>;
|
|
}
|
|
|
|
/** Bundle of zone data and links for multiple timezones */
|
|
interface UnpackedZoneBundle {
|
|
version: string;
|
|
zones: Array<UnpackedZone>;
|
|
links: Array<string>;
|
|
}
|
|
|
|
/** extends MomentTimezone declared in index */
|
|
interface MomentTimezone {
|
|
/** Converts zone data in the unpacked format to the packed format. */
|
|
pack(unpackedObject: UnpackedZone): string;
|
|
|
|
/** Convert a base 10 number to a base 60 string. */
|
|
packBase60(input: number, precision?: number): string;
|
|
|
|
/** Create links out of two zones that share data.
|
|
* @returns A new ZoneBundle with duplicate zone data replaced by links
|
|
*/
|
|
createLinks(unlinked: UnpackedZoneBundle): PackedZoneBundle;
|
|
|
|
/**
|
|
* Filter out data for years outside a certain range.
|
|
* @return a new, filtered UnPackedZone object
|
|
*/
|
|
filterYears(unpackedZone: UnpackedZone, startYear: number, endYear: number): UnpackedZone;
|
|
/**
|
|
* Filter out data for years outside a certain range.
|
|
* @return a new, filtered UnPackedZone object
|
|
*/
|
|
filterYears(unpackedZone: UnpackedZone, startAndEndYear: number): UnpackedZone;
|
|
|
|
/**
|
|
* Combines packing, link creation, and subsetting of years into one simple interface.
|
|
* Pass in an unpacked bundle, start year, and end year and get a filtered, linked, packed bundle back.
|
|
*/
|
|
filterLinkPack(unpackedBundle: UnpackedZoneBundle, startYear: number, endYear: number): PackedZoneBundle;
|
|
/**
|
|
* Combines packing, link creation, and subsetting of years into one simple interface.
|
|
* Pass in an unpacked bundle, start year, and end year and get a filtered, linked, packed bundle back.
|
|
*/
|
|
filterLinkPack(unpackedBundle: UnpackedZoneBundle, startAndEndYear: number): PackedZoneBundle;
|
|
}
|
|
}
|
|
|
|
// require("moment-timezone") === require("moment")
|
|
export = moment;
|