@arkadiuminc/sdk 2.45.4 → 2.47.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.
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { default as defaultConfig } from '../../config.json';
|
|
2
|
+
import { IHost } from '../features/host';
|
|
2
3
|
|
|
3
4
|
export { defaultConfig };
|
|
5
|
+
export declare type AdsConfig = {
|
|
6
|
+
isEnabled: boolean;
|
|
7
|
+
adTypes?: string[];
|
|
8
|
+
cooldown?: number;
|
|
9
|
+
};
|
|
4
10
|
interface ConfigSchema {
|
|
5
11
|
nakama: {
|
|
6
12
|
isEnabled: boolean;
|
|
@@ -13,6 +19,16 @@ interface ConfigSchema {
|
|
|
13
19
|
leaderboards: {
|
|
14
20
|
scoreBlacklist: string[];
|
|
15
21
|
};
|
|
22
|
+
ads: {
|
|
23
|
+
isEnabled: boolean;
|
|
24
|
+
configs: Array<{
|
|
25
|
+
conditions: string;
|
|
26
|
+
config: {
|
|
27
|
+
adTypes: string[];
|
|
28
|
+
cooldown: number;
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
16
32
|
}
|
|
17
33
|
export declare const schema: {
|
|
18
34
|
type: string;
|
|
@@ -59,6 +75,45 @@ export declare const schema: {
|
|
|
59
75
|
required: string[];
|
|
60
76
|
additionalProperties: boolean;
|
|
61
77
|
};
|
|
78
|
+
ads: {
|
|
79
|
+
type: string;
|
|
80
|
+
properties: {
|
|
81
|
+
isEnabled: {
|
|
82
|
+
type: string;
|
|
83
|
+
};
|
|
84
|
+
configs: {
|
|
85
|
+
type: string;
|
|
86
|
+
items: {
|
|
87
|
+
type: string;
|
|
88
|
+
properties: {
|
|
89
|
+
conditions: {
|
|
90
|
+
type: string;
|
|
91
|
+
};
|
|
92
|
+
config: {
|
|
93
|
+
type: string;
|
|
94
|
+
properties: {
|
|
95
|
+
adTypes: {
|
|
96
|
+
type: string;
|
|
97
|
+
items: {
|
|
98
|
+
type: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
cooldown: {
|
|
102
|
+
type: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
required: string[];
|
|
106
|
+
additionalProperties: boolean;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
required: string[];
|
|
110
|
+
additionalProperties: boolean;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
required: string[];
|
|
115
|
+
additionalProperties: boolean;
|
|
116
|
+
};
|
|
62
117
|
};
|
|
63
118
|
required: string[];
|
|
64
119
|
additionalProperties: boolean;
|
|
@@ -71,12 +126,24 @@ export declare class ConfigService {
|
|
|
71
126
|
private _isLoaded;
|
|
72
127
|
private _refreshTimer;
|
|
73
128
|
private _configChangeCallbacks;
|
|
129
|
+
private _gameId;
|
|
130
|
+
private _platformId;
|
|
131
|
+
private _platformType;
|
|
74
132
|
private constructor();
|
|
75
133
|
static get Instance(): ConfigService;
|
|
76
134
|
subscribe(callback: ConfigChangeCallback): () => void;
|
|
77
135
|
private notifyConfigChange;
|
|
78
|
-
init(): Promise<void>;
|
|
136
|
+
init(host?: IHost): Promise<void>;
|
|
79
137
|
loadConfig(): Promise<void>;
|
|
80
138
|
get config(): ConfigSchema;
|
|
81
139
|
dispose(): void;
|
|
140
|
+
getConfigForProperty(property: string): any;
|
|
141
|
+
private tokenize;
|
|
142
|
+
private parseExpression;
|
|
143
|
+
private evaluateAST;
|
|
144
|
+
private evaluateCondition;
|
|
145
|
+
private isDebugMode;
|
|
146
|
+
private isPlatform;
|
|
147
|
+
private isPlatformType;
|
|
148
|
+
private isGame;
|
|
82
149
|
}
|
|
@@ -14,7 +14,9 @@ export declare enum LifecycleEvent {
|
|
|
14
14
|
AD_INTERSTITIAL_REQUESTED = 10,
|
|
15
15
|
AD_INTERSTITIAL_SHOWN = 11,
|
|
16
16
|
AD_REWARDED_REQUESTED = 12,
|
|
17
|
-
AD_REWARDED_SHOWN = 13
|
|
17
|
+
AD_REWARDED_SHOWN = 13,
|
|
18
|
+
LEVEL_START = 14,
|
|
19
|
+
LEVEL_END = 15
|
|
18
20
|
}
|
|
19
21
|
declare type LifecycleFn = (event: LifecycleEvent, payload?: any) => void;
|
|
20
22
|
declare global {
|
|
@@ -65,6 +67,8 @@ export declare class GameLifecycleGame {
|
|
|
65
67
|
onGameResume(): Promise<void>;
|
|
66
68
|
onPauseReady(): Promise<void>;
|
|
67
69
|
onGemsUpdate(): Promise<void>;
|
|
70
|
+
onLevelStart(level: number): Promise<void>;
|
|
71
|
+
onLevelEnd(level: number): Promise<void>;
|
|
68
72
|
registerEventCallback(event: LifecycleEvent, callback: () => void): void;
|
|
69
73
|
}
|
|
70
74
|
export {};
|
|
@@ -2,9 +2,9 @@ import { DebugProvider } from '../../core/debug-provider';
|
|
|
2
2
|
import { RpcProvider } from '../../core/rpc';
|
|
3
3
|
|
|
4
4
|
export declare enum ArenaType {
|
|
5
|
-
ARKCOM =
|
|
6
|
-
ARENA51 =
|
|
7
|
-
AARP =
|
|
5
|
+
ARKCOM = "ARKCOM",
|
|
6
|
+
ARENA51 = "ARENA51",
|
|
7
|
+
AARP = "AARP"
|
|
8
8
|
}
|
|
9
9
|
export interface IHost {
|
|
10
10
|
getQueryParameter(key: string): Promise<string | null>;
|