mx-jpush-expo
Version:
Expo 集成极光推送(JPush)一体化解决方案,支持 iOS/Android 厂商通道
104 lines • 2.02 kB
TypeScript
/**
* JPush Config Plugin Types
*/
/**
* 厂商通道配置
*/
export interface VendorChannelConfig {
/**
* 华为推送配置
*/
huawei?: {
enabled: boolean;
};
/**
* FCM 推送配置
*/
fcm?: {
enabled: boolean;
};
/**
* 魅族推送配置
*/
meizu?: {
appKey: string;
appId: string;
};
/**
* 小米推送配置
*/
xiaomi?: {
appId: string;
appKey: string;
};
/**
* OPPO 推送配置
*/
oppo?: {
appKey: string;
appId: string;
appSecret: string;
};
/**
* VIVO 推送配置
*/
vivo?: {
appKey: string;
appId: string;
};
/**
* 荣耀推送配置
*/
honor?: {
appId: string;
};
/**
* 蔚来推送配置
*/
nio?: {
appId: string;
};
}
/**
* JPush 插件配置参数
*/
export interface JPushPluginProps {
/**
* 极光推送 AppKey(必填)
*/
appKey: string;
/**
* 极光推送 Channel(必填)
*/
channel: string;
/**
* Android 包名(必填)
* 需要与极光推送控制台注册的包名一致
*/
packageName: string;
/**
* iOS 推送环境(可选)
* @default false - 开发环境
*/
apsForProduction?: boolean;
/**
* 厂商通道配置(可选)
*/
vendorChannels?: VendorChannelConfig;
}
/**
* 插件内部使用的已归一化配置
*/
export interface ResolvedJPushPluginProps extends JPushPluginProps {
apsForProduction: boolean;
}
/**
* 验证插件参数
* @throws {Error} 当参数无效时抛出错误
*/
export declare function validateProps(props: JPushPluginProps | undefined): asserts props is JPushPluginProps;
/**
* 归一化插件参数,补齐内部默认值
*/
export declare function resolveProps(props: JPushPluginProps): ResolvedJPushPluginProps;
//# sourceMappingURL=types.d.ts.map