@arkadiuminc/sdk 2.46.1 → 2.48.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
|
}
|
|
@@ -27,6 +27,8 @@ interface UserProfileReaderContract {
|
|
|
27
27
|
interface AuthUIManagerContract {
|
|
28
28
|
openAuthRequest: ReturnType<typeof createStore<boolean>>;
|
|
29
29
|
openAuthForm(): Promise<void>;
|
|
30
|
+
closeAuthForm(): Promise<void>;
|
|
31
|
+
onOpenAuthForm(observer: any): void;
|
|
30
32
|
}
|
|
31
33
|
export declare function getAvatarLink(avatarName: string, extension: string): string;
|
|
32
34
|
export declare abstract class Auth {
|
|
@@ -41,7 +43,8 @@ export declare abstract class Auth {
|
|
|
41
43
|
abstract getUserProfile(): Promise<UserProfile | null>;
|
|
42
44
|
onAuthStatusChange(observer: any): () => void;
|
|
43
45
|
openAuthForm(): Promise<void>;
|
|
44
|
-
|
|
46
|
+
closeAuthForm(): Promise<void>;
|
|
47
|
+
onOpenAuthForm(observer: any): void | undefined;
|
|
45
48
|
getUserId(): Promise<string | undefined>;
|
|
46
49
|
}
|
|
47
50
|
export declare class AuthArena extends Auth {
|
|
@@ -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>;
|