@arkadiuminc/sdk 2.36.3 → 2.37.2
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/src/api/core/config-service.d.ts +66 -0
- package/dist/pkg/{api → src/api}/core/debug-provider.d.ts +6 -4
- package/dist/pkg/{api → src/api}/core/rpc.d.ts +4 -5
- package/dist/pkg/{api → src/api}/features/nakama/nakama-provider.d.ts +1 -0
- package/dist/pkg/src/api/utils/async-queue.test.d.ts +1 -0
- package/dist/pkg/{arkadium-arena-sdk.d.ts → src/arkadium-arena-sdk.d.ts} +1 -3
- package/dist/pkg/{ping.module.d.ts → src/ping.module.d.ts} +1 -5
- package/package.json +4 -2
- /package/dist/pkg/{api/features/ads/ads.mocks.d.ts → src/api/core/config-service.test.d.ts} +0 -0
- /package/dist/pkg/{api → src/api}/core/logger.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/core/timeout-tester.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/ads/__mocks__/display-ad.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/ads/__mocks__/video-ad.d.ts +0 -0
- /package/dist/pkg/{api/features/ads/index.test.d.ts → src/api/features/ads/ads.mocks.d.ts} +0 -0
- /package/dist/pkg/{api → src/api}/features/ads/display-ad.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/ads/index.d.ts +0 -0
- /package/dist/pkg/{api/features/friends → src/api/features/ads}/index.test.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/ads/video-ad.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/analytics.api.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/analytics.api.test.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/defs.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/dimensions.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/events.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/providers/AnalyticsProvider.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/providers/AppInsightsProvider.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/providers/AppInsightsProvider.test.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/providers/ConsoleProvider.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/providers/ConsoleProvider.test.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/analytics/providers/lazyLoad.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/auth/index.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/backend/aarp-session-storage.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/backend/backend.api.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/chat/index.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/friends/index.d.ts +0 -0
- /package/dist/pkg/{api/features/host → src/api/features/friends}/index.test.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/game-lifecycle/game-lifecycle.api.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/game-lifecycle/game-lifecycle.api.test.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/host/index.d.ts +0 -0
- /package/dist/pkg/{api/features/leaderboard → src/api/features/host}/index.test.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/leaderboard/index.d.ts +0 -0
- /package/dist/pkg/{api/features/persistence → src/api/features/leaderboard}/index.test.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/nakama/nakama-provider.test.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/nakama/nakama-service.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/notifications/index.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/persistence/index.d.ts +0 -0
- /package/dist/pkg/{api/features/wallet → src/api/features/persistence}/index.test.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/support-v1/game-state/game-state.api.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/support-v1/support-v1.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/features/wallet/index.d.ts +0 -0
- /package/dist/pkg/{api/interface.test.d.ts → src/api/features/wallet/index.test.d.ts} +0 -0
- /package/dist/pkg/{api/utils/async-queue.test.d.ts → src/api/interface.test.d.ts} +0 -0
- /package/dist/pkg/{api → src/api}/utils/async-queue.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/utils/deferred.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/utils/fetch.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/utils/mockUser.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/utils/observable.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/utils/promise-retry.d.ts +0 -0
- /package/dist/pkg/{api → src/api}/version.d.ts +0 -0
- /package/dist/pkg/{arkadium-game-sdk.d.ts → src/arkadium-game-sdk.d.ts} +0 -0
- /package/dist/pkg/{loader.d.ts → src/loader.d.ts} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { default as defaultConfig } from '../../../config/config.json';
|
|
2
|
+
|
|
3
|
+
export { defaultConfig };
|
|
4
|
+
interface ConfigSchema {
|
|
5
|
+
nakama: {
|
|
6
|
+
isEnabled: boolean;
|
|
7
|
+
envs: string[];
|
|
8
|
+
debugMode: boolean;
|
|
9
|
+
};
|
|
10
|
+
config: {
|
|
11
|
+
refreshInterval: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare const schema: {
|
|
15
|
+
type: string;
|
|
16
|
+
properties: {
|
|
17
|
+
nakama: {
|
|
18
|
+
type: string;
|
|
19
|
+
properties: {
|
|
20
|
+
isEnabled: {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
envs: {
|
|
24
|
+
type: string;
|
|
25
|
+
items: {
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
debugMode: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
required: string[];
|
|
34
|
+
additionalProperties: boolean;
|
|
35
|
+
};
|
|
36
|
+
config: {
|
|
37
|
+
type: string;
|
|
38
|
+
properties: {
|
|
39
|
+
refreshInterval: {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
required: string[];
|
|
44
|
+
additionalProperties: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
required: string[];
|
|
48
|
+
additionalProperties: boolean;
|
|
49
|
+
};
|
|
50
|
+
declare type ConfigChangeCallback = (config: ConfigSchema) => void;
|
|
51
|
+
export declare class ConfigService {
|
|
52
|
+
private _validate;
|
|
53
|
+
private _config;
|
|
54
|
+
private static _instance;
|
|
55
|
+
private _isLoaded;
|
|
56
|
+
private _refreshTimer;
|
|
57
|
+
private _configChangeCallbacks;
|
|
58
|
+
private constructor();
|
|
59
|
+
static get Instance(): ConfigService;
|
|
60
|
+
subscribe(callback: ConfigChangeCallback): () => void;
|
|
61
|
+
private notifyConfigChange;
|
|
62
|
+
init(): Promise<void>;
|
|
63
|
+
loadConfig(): Promise<void>;
|
|
64
|
+
get config(): ConfigSchema;
|
|
65
|
+
dispose(): void;
|
|
66
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { RpcProvider } from './rpc';
|
|
2
1
|
import { ObserverFn } from '../utils/observable';
|
|
3
2
|
|
|
4
3
|
export interface DebugProvider {
|
|
@@ -9,9 +8,11 @@ export interface DebugProvider {
|
|
|
9
8
|
}
|
|
10
9
|
export declare function isDebugMode(): boolean;
|
|
11
10
|
export declare class DebugProviderArena implements DebugProvider {
|
|
11
|
+
private static _instance;
|
|
12
12
|
private observers;
|
|
13
13
|
private isDebug;
|
|
14
|
-
constructor(
|
|
14
|
+
private constructor();
|
|
15
|
+
static get Instance(): DebugProviderArena;
|
|
15
16
|
private initDebugMode;
|
|
16
17
|
isDebugMode(): boolean;
|
|
17
18
|
setDebugMode(isEnabled: boolean): void;
|
|
@@ -19,7 +20,8 @@ export declare class DebugProviderArena implements DebugProvider {
|
|
|
19
20
|
onDebugEvent(observer: ObserverFn<string>): void;
|
|
20
21
|
}
|
|
21
22
|
export declare class DebugProviderGame implements DebugProvider {
|
|
22
|
-
private
|
|
23
|
-
constructor(
|
|
23
|
+
private static _instance;
|
|
24
|
+
private constructor();
|
|
25
|
+
static get Instance(): DebugProviderGame;
|
|
24
26
|
sendDebugEvent(type: string, ...args: any[]): void;
|
|
25
27
|
}
|
|
@@ -7,9 +7,7 @@ declare type RpcRequest = {
|
|
|
7
7
|
declare class RpcPublisher {
|
|
8
8
|
private rpcCallbacks;
|
|
9
9
|
private target;
|
|
10
|
-
private instanceId;
|
|
11
10
|
private eventListener;
|
|
12
|
-
constructor(instanceId: string);
|
|
13
11
|
init(target: any): void;
|
|
14
12
|
sendMessage(message: RpcRequest): Promise<any>;
|
|
15
13
|
unsubscribe(): void;
|
|
@@ -19,9 +17,8 @@ declare class RpcPublisher {
|
|
|
19
17
|
private unregisterCB;
|
|
20
18
|
}
|
|
21
19
|
declare class RpcSubscriber {
|
|
22
|
-
private instanceId;
|
|
23
20
|
private eventListener;
|
|
24
|
-
constructor(
|
|
21
|
+
constructor();
|
|
25
22
|
private registry;
|
|
26
23
|
private target;
|
|
27
24
|
init(target: any): void;
|
|
@@ -35,8 +32,10 @@ declare class RpcSubscriber {
|
|
|
35
32
|
export declare function shouldSubscribe(name: string, value: any): boolean;
|
|
36
33
|
/** @hidden */
|
|
37
34
|
export declare class RpcProvider {
|
|
35
|
+
private static _instance;
|
|
38
36
|
rpcPublisher: RpcPublisher;
|
|
39
37
|
rpcSubscriber: RpcSubscriber;
|
|
40
|
-
constructor();
|
|
38
|
+
private constructor();
|
|
39
|
+
static get Instance(): RpcProvider;
|
|
41
40
|
}
|
|
42
41
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ApiEnv, Backend, SessionStorageType } from './api/features/backend/backend.api';
|
|
2
2
|
import { GameLifecycleArena } from './api/features/game-lifecycle/game-lifecycle.api';
|
|
3
|
-
import { RpcProvider } from './api/core/rpc';
|
|
4
3
|
import { AdsArena } from './api/features/ads/';
|
|
5
4
|
import { AuthArena } from './api/features/auth/';
|
|
6
5
|
import { AnalyticsApiContract } from './api/features/analytics/analytics.api';
|
|
@@ -19,7 +18,6 @@ import { ChatArena } from './api/features/chat';
|
|
|
19
18
|
import * as MockUserUtils from './api/utils/mockUser';
|
|
20
19
|
/** @hidden */
|
|
21
20
|
export declare class ArkadiumArenaSdk {
|
|
22
|
-
private rpcProvider;
|
|
23
21
|
backendApi: Backend;
|
|
24
22
|
host: HostArena;
|
|
25
23
|
lifecycle: GameLifecycleArena;
|
|
@@ -41,7 +39,7 @@ export declare class ArkadiumArenaSdk {
|
|
|
41
39
|
private gamePingListener;
|
|
42
40
|
$pingNotification: Observable<number>;
|
|
43
41
|
version: string;
|
|
44
|
-
constructor(
|
|
42
|
+
constructor(backendApi: Backend, host: HostArena, lifecycle: GameLifecycleArena, ads: AdsArena, auth: AuthArena, analytics: AnalyticsApiContract, timeoutTester: TimeoutTesterContract, persistence: PersistenceArena, wallet: WalletArena, debug: DebugProviderArena, supportV1: SupportV1, leaderboard: LeaderboardArena, friends: FriendsArena, notifications: NotificationsArena, chats: ChatArena);
|
|
45
43
|
setEnv(e: ApiEnv): void;
|
|
46
44
|
initialize(env: ApiEnv, isGameSide: boolean, sessionStorage?: SessionStorageType | null): Promise<void>;
|
|
47
45
|
private envDiscoverListener;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { RpcProvider } from './api/core/rpc';
|
|
2
|
-
|
|
3
1
|
/** @hidden */
|
|
4
2
|
export declare class PingModule {
|
|
5
|
-
constructor(
|
|
3
|
+
constructor();
|
|
6
4
|
$ping: import('./api/utils/observable').Observable<number>;
|
|
7
5
|
ping(): boolean;
|
|
8
6
|
}
|
|
9
7
|
/** @hidden */
|
|
10
8
|
export declare class PingModuleProxy {
|
|
11
|
-
private rpcProvider;
|
|
12
|
-
constructor(rpcProvider: RpcProvider);
|
|
13
9
|
ping(): Promise<any>;
|
|
14
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arkadiuminc/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.37.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"main": "dist/pkg/arkadium-sdk.umd.js",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@arkadium/eagle-payments-api-client": "^0.0.35",
|
|
65
|
-
"@arkadium/eagle-virtual-items-api-client": "^0.1.3",
|
|
66
65
|
"@arkadium/eagle-user-client": "^0.0.94",
|
|
66
|
+
"@arkadium/eagle-virtual-items-api-client": "^0.1.3",
|
|
67
67
|
"@commitlint/cli": "^17.8.1",
|
|
68
68
|
"@commitlint/config-conventional": "^17.8.1",
|
|
69
69
|
"@types/jest": "^29.5.11",
|
|
@@ -98,6 +98,8 @@
|
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"@heroiclabs/nakama-js": "^2.8.0",
|
|
100
100
|
"@microsoft/applicationinsights-web": "^3.0.4",
|
|
101
|
+
"ajv": "^8.17.1",
|
|
102
|
+
"ajv-formats": "^3.0.1",
|
|
101
103
|
"jsonpack": "^1.1.5",
|
|
102
104
|
"nanoid": "^5.0.4",
|
|
103
105
|
"vite-plugin-string-replace": "^1.1.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/pkg/{api → src/api}/features/analytics/providers/AppInsightsProvider.test.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|