@jolibox/ads 1.1.25 → 1.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ import type { IAdsContext } from '@/type/base';
2
+ import type { IAbstractAFGProvider, IAdBreakParams, IAdConfigParams } from '../ads-interface';
3
+ import type { IAppsRocketsAdBreakServerParams, IAppsRocketsInitServerParams } from './type';
4
+ export declare class AppsRocketsForGameProvider implements IAbstractAFGProvider<IAppsRocketsInitServerParams, IAppsRocketsAdBreakServerParams> {
5
+ name: string;
6
+ private initialized;
7
+ private initCompleter;
8
+ private context;
9
+ private adsOverlay;
10
+ private adsIsShowing;
11
+ private lastUnDisplayedAdBreak;
12
+ private state;
13
+ constructor(context: IAdsContext, _initParams: IAppsRocketsInitServerParams['params']);
14
+ init(): Promise<void>;
15
+ private processUrl;
16
+ adConfig(params: IAdConfigParams): void;
17
+ adBreak(params: IAdBreakParams, serverParam: IAppsRocketsAdBreakServerParams): void;
18
+ }
@@ -0,0 +1,10 @@
1
+ export interface IAppsRocketsInitServerParams {
2
+ provider: 'APPSROCKETS';
3
+ params: Record<string, unknown>;
4
+ }
5
+ export interface IAppsRocketsAdBreakServerParams {
6
+ provider: 'ADSENSE';
7
+ params: {
8
+ url: string;
9
+ };
10
+ }
@@ -1,9 +1,12 @@
1
1
  import type { IGoogleAdSenseInitServerParams, GoogleAdSenseProvider, IGoogleAdSenseAdBreakServerParams } from './adsense';
2
- import type { OKSpinForGameProvider } from './okspin';
2
+ import { IAppsRocketsAdBreakServerParams, IAppsRocketsInitServerParams } from './appsrockets/type';
3
+ import type { AppsRocketsForGameProvider } from './appsrockets';
3
4
  import type { IOKSpinAdBreakServerParams, IOKSpinInitServerParams } from './okspin/type';
4
- export type IAFGInitServerParams = IGoogleAdSenseInitServerParams | IOKSpinInitServerParams;
5
- export type IAFGAdBreakServerParams = IGoogleAdSenseAdBreakServerParams | IOKSpinAdBreakServerParams;
5
+ import type { OKSpinForGameProvider } from './okspin';
6
+ export type IAFGInitServerParams = IGoogleAdSenseInitServerParams | IOKSpinInitServerParams | IAppsRocketsInitServerParams;
7
+ export type IAFGAdBreakServerParams = IGoogleAdSenseAdBreakServerParams | IOKSpinAdBreakServerParams | IAppsRocketsAdBreakServerParams;
6
8
  export interface IAFGProviders {
7
9
  ADSENSE?: GoogleAdSenseProvider;
8
10
  OKSPIN?: OKSpinForGameProvider;
11
+ APPSROCKETS?: AppsRocketsForGameProvider;
9
12
  }
@@ -0,0 +1,17 @@
1
+ import type { IAdsContext } from '../../type/base';
2
+ import type { IAppsRocketsForVideoInitServerParams, IAppsRocketsForVideoRequestAdServerParams } from './type';
3
+ import { type IAbstractAFVProvider, type IAFVRequestAdParams } from '../ads-interface';
4
+ export declare class AppsRocketsForVideoProvider implements IAbstractAFVProvider {
5
+ name: string;
6
+ private initialized;
7
+ private initCompleter;
8
+ private context;
9
+ private adsOverlay;
10
+ private adsIsShowing;
11
+ private state;
12
+ constructor(context: IAdsContext);
13
+ private processUrl;
14
+ init: (serverParams: IAppsRocketsForVideoInitServerParams) => Promise<void>;
15
+ destroy: () => void;
16
+ requestAd: (clientParams: IAFVRequestAdParams<undefined>, serverParam: IAppsRocketsForVideoRequestAdServerParams) => void;
17
+ }
@@ -0,0 +1,10 @@
1
+ export interface IAppsRocketsForVideoInitServerParams {
2
+ provider: 'APPSROCKETS';
3
+ params: Record<string, unknown>;
4
+ }
5
+ export interface IAppsRocketsForVideoRequestAdServerParams {
6
+ provider: 'APPSROCKETS';
7
+ params: {
8
+ url: string;
9
+ };
10
+ }
@@ -1,10 +1,13 @@
1
1
  import type { GoogleIMAProvider } from './ima';
2
2
  import type { IGoogleIMAInitServerParams, IGoogleIMARequestAdServerParams } from './ima/type';
3
- import { OKSpinForVideoProvider } from './okspin';
4
- import { IOKSpinForVideoInitServerParams, IOKSpinForVideoRequestAdServerParams } from './okspin/type';
5
- export type IAFVInitServerParams = IGoogleIMAInitServerParams | IOKSpinForVideoInitServerParams;
6
- export type IAFVRequestAdServerParams = IGoogleIMARequestAdServerParams | IOKSpinForVideoRequestAdServerParams;
3
+ import type { OKSpinForVideoProvider } from './okspin';
4
+ import type { IOKSpinForVideoInitServerParams, IOKSpinForVideoRequestAdServerParams } from './okspin/type';
5
+ import type { IAppsRocketsForVideoInitServerParams, IAppsRocketsForVideoRequestAdServerParams } from './appsrockets/type';
6
+ import type { AppsRocketsForVideoProvider } from './appsrockets';
7
+ export type IAFVInitServerParams = IGoogleIMAInitServerParams | IOKSpinForVideoInitServerParams | IAppsRocketsForVideoInitServerParams;
8
+ export type IAFVRequestAdServerParams = IGoogleIMARequestAdServerParams | IOKSpinForVideoRequestAdServerParams | IAppsRocketsForVideoRequestAdServerParams;
7
9
  export interface IAFVProviders {
8
10
  GOOGLE_IMA?: GoogleIMAProvider;
9
11
  OKSPIN?: OKSpinForVideoProvider;
12
+ APPSROCKETS?: AppsRocketsForVideoProvider;
10
13
  }
@@ -0,0 +1,16 @@
1
+ export declare const createState: () => {
2
+ afterAd: import("@preact/signals").Signal<(() => void) | null | undefined>;
3
+ adDismissed: import("@preact/signals").Signal<(() => void) | null | undefined>;
4
+ adViewed: import("@preact/signals").Signal<(() => void) | null | undefined>;
5
+ adBreakDone: import("@preact/signals").Signal<(() => void) | null | undefined>;
6
+ adLoaded: import("@preact/signals").Signal<(() => void) | null | undefined>;
7
+ adLinkClicked: import("@preact/signals").Signal<((link: string) => void) | null | undefined>;
8
+ adError: import("@preact/signals").Signal<(() => void) | null | undefined>;
9
+ visible: import("@preact/signals").Signal<boolean>;
10
+ src: import("@preact/signals").Signal<string>;
11
+ };
12
+ type State = ReturnType<typeof createState>;
13
+ export declare const JoliboxAFGOverlay: ({ state }: {
14
+ state: State;
15
+ }) => JSX.Element | null;
16
+ export {};
@@ -0,0 +1,12 @@
1
+ type Messages = {
2
+ appsrockets_ad_clicked: string;
3
+ appsrockets_ad_impressed: never;
4
+ appsrockets_ad_skipped: never;
5
+ appsrockets_ad_completed: never;
6
+ appsrockets_ad_rewarded: never;
7
+ appsrockets_ad_dismissed: never;
8
+ appsrockets_ad_loaded: never;
9
+ appsrockets_ad_error: never;
10
+ };
11
+ export declare const useSubscribeWindowMessage: <T extends keyof Messages>(type: T, listener: (data: Messages[T]) => void) => void;
12
+ export {};