@arkadiuminc/sdk 2.69.3 → 2.70.0
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.
- package/dist/pkg/api/core/ab-test-service.d.ts +28 -0
- package/dist/pkg/api/core/ab-test-service.test.d.ts +1 -0
- package/dist/pkg/api/core/config-service.d.ts +35 -1
- package/dist/pkg/api/features/ads/ad-blocker-popup.d.ts +1 -0
- package/dist/pkg/api/features/ads/ad-blocker-popup.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare type ABTestGroup = {
|
|
2
|
+
weight: number;
|
|
3
|
+
value: unknown;
|
|
4
|
+
};
|
|
5
|
+
export declare type ABTestDefinition = {
|
|
6
|
+
ABTest: string;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
groups: ABTestGroup[];
|
|
9
|
+
};
|
|
10
|
+
export declare type ABTestAssignment = {
|
|
11
|
+
name: string;
|
|
12
|
+
group: number;
|
|
13
|
+
};
|
|
14
|
+
export declare class ABTestService {
|
|
15
|
+
private static _instance;
|
|
16
|
+
private _assignments;
|
|
17
|
+
private constructor();
|
|
18
|
+
static get Instance(): ABTestService;
|
|
19
|
+
resolveConfig<T>(config: T): T;
|
|
20
|
+
getAssignments(): ABTestAssignment[];
|
|
21
|
+
setAssignments(assignments: ABTestAssignment[]): void;
|
|
22
|
+
appendToAbVariations(existing: string | undefined): string | undefined;
|
|
23
|
+
resetAssignments(): void;
|
|
24
|
+
private getOrAssignGroup;
|
|
25
|
+
private getStorage;
|
|
26
|
+
private readStoredGroup;
|
|
27
|
+
private storeGroup;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ABTestAssignment } from './ab-test-service';
|
|
1
2
|
import { ArenaType } from '../features/host/arena-type';
|
|
2
3
|
import { IHost } from '../features/host';
|
|
3
4
|
|
|
@@ -12,10 +13,12 @@ export declare enum GameConfigProperty {
|
|
|
12
13
|
hasEagle = "hasEagle",
|
|
13
14
|
slug = "slug"
|
|
14
15
|
}
|
|
15
|
-
declare type
|
|
16
|
+
declare type GamePlatformFilterEntry = {
|
|
16
17
|
games?: string[];
|
|
17
18
|
platformTypes?: ArenaType[];
|
|
18
19
|
};
|
|
20
|
+
declare type LifecycleBlacklistEntry = GamePlatformFilterEntry;
|
|
21
|
+
export declare type AdBlockerDetectionEntry = GamePlatformFilterEntry;
|
|
19
22
|
declare type LifecycleEventConfig = {
|
|
20
23
|
blacklists: LifecycleBlacklistEntry[];
|
|
21
24
|
};
|
|
@@ -46,6 +49,7 @@ export interface ConfigSchema {
|
|
|
46
49
|
cooldown: number;
|
|
47
50
|
};
|
|
48
51
|
}>;
|
|
52
|
+
adBlockerDetection: AdBlockerDetectionEntry[];
|
|
49
53
|
};
|
|
50
54
|
}
|
|
51
55
|
export declare const defaultConfig: ConfigSchema;
|
|
@@ -185,6 +189,31 @@ export declare const schema: {
|
|
|
185
189
|
additionalProperties: boolean;
|
|
186
190
|
};
|
|
187
191
|
};
|
|
192
|
+
adBlockerDetection: {
|
|
193
|
+
type: string;
|
|
194
|
+
items: {
|
|
195
|
+
type: string;
|
|
196
|
+
properties: {
|
|
197
|
+
games: {
|
|
198
|
+
type: string;
|
|
199
|
+
items: {
|
|
200
|
+
type: string;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
platformTypes: {
|
|
204
|
+
type: string;
|
|
205
|
+
items: {
|
|
206
|
+
type: string;
|
|
207
|
+
enum: ArenaType[];
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
anyOf: {
|
|
212
|
+
required: string[];
|
|
213
|
+
}[];
|
|
214
|
+
additionalProperties: boolean;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
188
217
|
};
|
|
189
218
|
required: string[];
|
|
190
219
|
additionalProperties: boolean;
|
|
@@ -206,6 +235,7 @@ export declare class ConfigService {
|
|
|
206
235
|
private _platformType;
|
|
207
236
|
private _host;
|
|
208
237
|
private _gameConfig;
|
|
238
|
+
private _abTestService;
|
|
209
239
|
private constructor();
|
|
210
240
|
static get Instance(): ConfigService;
|
|
211
241
|
subscribe(callback: ConfigChangeCallback): () => void;
|
|
@@ -213,6 +243,10 @@ export declare class ConfigService {
|
|
|
213
243
|
init(host?: IHost): Promise<void>;
|
|
214
244
|
loadConfig(): Promise<void>;
|
|
215
245
|
get config(): ConfigSchema;
|
|
246
|
+
getAbTestAssignments(): ABTestAssignment[];
|
|
247
|
+
appendAbTestToAbVariations(existing: string | undefined): string | undefined;
|
|
248
|
+
isAdBlockerDetectionEnabled(): boolean;
|
|
249
|
+
private matchesGamePlatformFilter;
|
|
216
250
|
dispose(): void;
|
|
217
251
|
getConfigForProperty(property: string): any;
|
|
218
252
|
private tokenize;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showAdBlockerPopup(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|