-
Notifications
You must be signed in to change notification settings - Fork 1
/
AirshipInApp.ts
42 lines (37 loc) · 1.05 KB
/
AirshipInApp.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import type { AirshipPluginWrapper } from './AirshipPlugin';
/**
* Airship InApp Experiences.
*/
export class AirshipInApp {
constructor(private readonly plugin: AirshipPluginWrapper) {}
/**
* Pauses messages.
* @param paused `true` to pause, `false` to resume.
* @returns A promise.
*/
public setPaused(paused: boolean): Promise<void> {
return this.plugin.perform('inApp#setPaused', paused);
}
/**
* Checks if messages are paused.
* @returns A promise with the result.
*/
public isPaused(): Promise<boolean> {
return this.plugin.perform('inApp#isPaused');
}
/**
* Sets the display interval for messages.
* @param milliseconds Display interval
* @returns A promise.
*/
public setDisplayInterval(milliseconds: number): Promise<void> {
return this.plugin.perform('inApp#setDisplayInterval', milliseconds);
}
/**
* Gets the display interval.
* @returns A promise with the result.
*/
public getDisplayInterval(): Promise<number> {
return this.plugin.perform('inApp#getDisplayInterval');
}
}