web-push-notifications
Version:
Pushwoosh web push notifications
64 lines (63 loc) • 1.39 kB
TypeScript
export interface INotificationPayloadInboxParams {
image?: string;
rt?: string;
}
export interface INotificationPayload {
body: string;
p?: string;
silent?: string;
header?: string;
i?: string;
u?: string;
md?: string;
l?: string;
pwcid?: string;
image?: string;
buttons?: string;
pw_inbox?: string;
inbox_params?: string;
[key: string]: any;
}
export interface IChromeNotificationPayload {
data: INotificationPayload;
from: string;
}
export interface INotificationButton {
title: string;
action?: string;
url?: string;
}
export interface INotificationOptionsPayload {
body: string;
title: string;
icon: string;
image: string;
buttons: Array<INotificationButton>;
customData: {
[key: string]: any;
};
metaData: {
[key: string]: any;
};
campaignCode: string;
openUrl: string;
[key: string]: any;
}
export interface IShowNotificationOptionsData {
code: string;
buttons: Array<INotificationButton>;
image: string;
campaignCode: string;
inboxId: string;
}
export interface IShowNotificationOptions {
body: string;
icon: string;
tag: string;
data: IShowNotificationOptionsData;
actions: Array<INotificationButton>;
image: string;
badge?: string;
silent?: boolean;
[key: string]: any;
}