@series-inc/rundot-game-sdk 5.0.3 → 5.0.5
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/README.md +32 -32
- package/dist/{AdsApi-BMEW7MCB.d.ts → AdsApi-D6XpO0ZH.d.ts} +133 -1
- package/dist/SandboxHost-TDQBMVAL.js +2145 -0
- package/dist/SandboxHost-TDQBMVAL.js.map +1 -0
- package/dist/chunk-67VOGKWP.js +2010 -0
- package/dist/chunk-67VOGKWP.js.map +1 -0
- package/dist/{chunk-3GKY3LY5.js → chunk-CJU2J3S6.js} +2 -2
- package/dist/chunk-CJU2J3S6.js.map +1 -0
- package/dist/{chunk-QT3UKD6U.js → chunk-QNSEI74P.js} +46 -1890
- package/dist/chunk-QNSEI74P.js.map +1 -0
- package/dist/chunk-SVZSNHMX.js +12 -0
- package/dist/chunk-SVZSNHMX.js.map +1 -0
- package/dist/core-Z4AOFL5J.js +3 -0
- package/dist/{core-6DQFSOBL.js.map → core-Z4AOFL5J.js.map} +1 -1
- package/dist/index.d.ts +14 -4
- package/dist/index.js +4 -3
- package/dist/rundot-game-api/index.d.ts +12 -12
- package/dist/rundot-game-api/index.js +5 -3
- package/dist/rundot-game-api/index.js.map +1 -1
- package/dist/vite/index.css +1 -1
- package/dist/vite/index.css.map +1 -1
- package/dist/vite/index.d.ts +3 -1
- package/dist/vite/index.js +85 -9
- package/dist/vite/index.js.map +1 -1
- package/dist/webview/index.js +1 -1
- package/package.json +74 -72
- package/dist/chunk-3GKY3LY5.js.map +0 -1
- package/dist/chunk-74OSND3B.js +0 -12
- package/dist/chunk-74OSND3B.js.map +0 -1
- package/dist/chunk-QT3UKD6U.js.map +0 -1
- package/dist/core-6DQFSOBL.js +0 -3
package/README.md
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
# RUN.game SDK API
|
|
2
|
-
|
|
3
|
-
Build connected HTML5 games that integrate deeply with the RUN.game platform. This package provides the client SDK used by hosted games as well as the local mock environment for development.
|
|
4
|
-
|
|
5
|
-
## Highlights
|
|
6
|
-
|
|
7
|
-
- Typed APIs for RUN.game platform services (simulation, rooms, analytics, ads, and more)
|
|
8
|
-
- Host-aware tooling including lifecycle hooks, safe-area utilities, and asset loading helpers
|
|
9
|
-
|
|
10
|
-
## Quick Start
|
|
11
|
-
|
|
12
|
-
### Installation
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm install @series-inc/rundot-game-sdk@latest
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
### Initialize
|
|
19
|
-
|
|
20
|
-
```typescript
|
|
21
|
-
import { default as RundotGameAPI } from '@series-inc/rundot-game-sdk/api'
|
|
22
|
-
|
|
23
|
-
// Initialize the API
|
|
24
|
-
await RundotGameAPI.initializeAsync()
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Documentation
|
|
28
|
-
|
|
29
|
-
The complete RUN.game SDK manuals live on [Run.game Docs](https://series-1.gitbook.io/getreel-docs). Start there for setup guides, API references, tutorials, and best practices.
|
|
30
|
-
|
|
31
|
-
## Support & Links
|
|
32
|
-
|
|
1
|
+
# RUN.game SDK API
|
|
2
|
+
|
|
3
|
+
Build connected HTML5 games that integrate deeply with the RUN.game platform. This package provides the client SDK used by hosted games as well as the local mock environment for development.
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
6
|
+
|
|
7
|
+
- Typed APIs for RUN.game platform services (simulation, rooms, analytics, ads, and more)
|
|
8
|
+
- Host-aware tooling including lifecycle hooks, safe-area utilities, and asset loading helpers
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
### Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @series-inc/rundot-game-sdk@latest
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Initialize
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { default as RundotGameAPI } from '@series-inc/rundot-game-sdk/api'
|
|
22
|
+
|
|
23
|
+
// Initialize the API
|
|
24
|
+
await RundotGameAPI.initializeAsync()
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Documentation
|
|
28
|
+
|
|
29
|
+
The complete RUN.game SDK manuals live on [Run.game Docs](https://series-1.gitbook.io/getreel-docs). Start there for setup guides, API references, tutorials, and best practices.
|
|
30
|
+
|
|
31
|
+
## Support & Links
|
|
32
|
+
|
|
33
33
|
- [Join our Discord!](https://discord.gg/NcjhKQHx)
|
|
@@ -1092,6 +1092,136 @@ interface LeaderboardApi {
|
|
|
1092
1092
|
getPodiumScores(options?: GetPodiumScoresOptions): Promise<PodiumScoresResponse>;
|
|
1093
1093
|
}
|
|
1094
1094
|
|
|
1095
|
+
/**
|
|
1096
|
+
* UGC (User-Generated Content) API
|
|
1097
|
+
*
|
|
1098
|
+
* Provides CRUD operations for user-generated content within H5 apps.
|
|
1099
|
+
* Content is scoped per-app and persists across game versions.
|
|
1100
|
+
*/
|
|
1101
|
+
interface UgcEntry {
|
|
1102
|
+
id: string;
|
|
1103
|
+
appId: string;
|
|
1104
|
+
authorId: string;
|
|
1105
|
+
authorName: string;
|
|
1106
|
+
authorAvatarUrl: string | null;
|
|
1107
|
+
contentType: string;
|
|
1108
|
+
data: Record<string, unknown>;
|
|
1109
|
+
createdAt: number;
|
|
1110
|
+
updatedAt: number;
|
|
1111
|
+
isPublic: boolean;
|
|
1112
|
+
title?: string;
|
|
1113
|
+
tags?: string[];
|
|
1114
|
+
useCount?: number;
|
|
1115
|
+
likeCount?: number;
|
|
1116
|
+
}
|
|
1117
|
+
interface UgcCreateParams {
|
|
1118
|
+
contentType: string;
|
|
1119
|
+
data: Record<string, unknown>;
|
|
1120
|
+
isPublic?: boolean;
|
|
1121
|
+
title?: string;
|
|
1122
|
+
tags?: string[];
|
|
1123
|
+
}
|
|
1124
|
+
interface UgcUpdateParams {
|
|
1125
|
+
id: string;
|
|
1126
|
+
data?: Record<string, unknown>;
|
|
1127
|
+
isPublic?: boolean;
|
|
1128
|
+
title?: string;
|
|
1129
|
+
tags?: string[];
|
|
1130
|
+
}
|
|
1131
|
+
interface UgcListParams {
|
|
1132
|
+
contentType?: string;
|
|
1133
|
+
cursor?: string;
|
|
1134
|
+
limit?: number;
|
|
1135
|
+
}
|
|
1136
|
+
interface UgcBrowseParams {
|
|
1137
|
+
contentType?: string;
|
|
1138
|
+
cursor?: string;
|
|
1139
|
+
limit?: number;
|
|
1140
|
+
sortBy?: 'recent' | 'mostLiked' | 'mostUsed';
|
|
1141
|
+
}
|
|
1142
|
+
interface UgcListResponse {
|
|
1143
|
+
entries: UgcEntry[];
|
|
1144
|
+
nextCursor?: string;
|
|
1145
|
+
}
|
|
1146
|
+
interface UgcBrowseResponse {
|
|
1147
|
+
entries: Array<UgcEntry & {
|
|
1148
|
+
isLikedByMe?: boolean;
|
|
1149
|
+
}>;
|
|
1150
|
+
nextCursor?: string;
|
|
1151
|
+
}
|
|
1152
|
+
interface UgcReportParams {
|
|
1153
|
+
id: string;
|
|
1154
|
+
reason: 'inappropriate' | 'spam' | 'harassment' | 'other';
|
|
1155
|
+
details?: string;
|
|
1156
|
+
}
|
|
1157
|
+
interface UgcApi {
|
|
1158
|
+
/**
|
|
1159
|
+
* Create new user-generated content
|
|
1160
|
+
* @param params Content creation parameters
|
|
1161
|
+
* @returns The created entry
|
|
1162
|
+
*/
|
|
1163
|
+
create(params: UgcCreateParams): Promise<UgcEntry>;
|
|
1164
|
+
/**
|
|
1165
|
+
* Update existing content (must be author)
|
|
1166
|
+
* @param params Update parameters including entry ID
|
|
1167
|
+
* @returns The updated entry
|
|
1168
|
+
*/
|
|
1169
|
+
update(params: UgcUpdateParams): Promise<UgcEntry>;
|
|
1170
|
+
/**
|
|
1171
|
+
* Delete content (must be author)
|
|
1172
|
+
* @param id Entry ID to delete
|
|
1173
|
+
*/
|
|
1174
|
+
delete(id: string): Promise<void>;
|
|
1175
|
+
/**
|
|
1176
|
+
* Get a single entry by ID
|
|
1177
|
+
* @param id Entry ID
|
|
1178
|
+
* @returns The entry or null if not found
|
|
1179
|
+
*/
|
|
1180
|
+
get(id: string): Promise<UgcEntry | null>;
|
|
1181
|
+
/**
|
|
1182
|
+
* List the current user's content
|
|
1183
|
+
* @param params List parameters (optional filtering and pagination)
|
|
1184
|
+
* @returns Paginated list of entries
|
|
1185
|
+
*/
|
|
1186
|
+
listMine(params?: UgcListParams): Promise<UgcListResponse>;
|
|
1187
|
+
/**
|
|
1188
|
+
* Browse community content (public entries only)
|
|
1189
|
+
* @param params Browse parameters (optional filtering, pagination, sorting)
|
|
1190
|
+
* @returns Paginated list of entries with isLikedByMe status
|
|
1191
|
+
*/
|
|
1192
|
+
browse(params?: UgcBrowseParams): Promise<UgcBrowseResponse>;
|
|
1193
|
+
/**
|
|
1194
|
+
* Like an entry
|
|
1195
|
+
* @param id Entry ID to like
|
|
1196
|
+
* @returns Updated like count
|
|
1197
|
+
*/
|
|
1198
|
+
like(id: string): Promise<{
|
|
1199
|
+
likeCount: number;
|
|
1200
|
+
}>;
|
|
1201
|
+
/**
|
|
1202
|
+
* Unlike an entry
|
|
1203
|
+
* @param id Entry ID to unlike
|
|
1204
|
+
* @returns Updated like count
|
|
1205
|
+
*/
|
|
1206
|
+
unlike(id: string): Promise<{
|
|
1207
|
+
likeCount: number;
|
|
1208
|
+
}>;
|
|
1209
|
+
/**
|
|
1210
|
+
* Record a use of an entry (e.g., user imported/used this content)
|
|
1211
|
+
* Rate limited per user per entry per day
|
|
1212
|
+
* @param id Entry ID
|
|
1213
|
+
* @returns Updated use count
|
|
1214
|
+
*/
|
|
1215
|
+
recordUse(id: string): Promise<{
|
|
1216
|
+
useCount: number;
|
|
1217
|
+
}>;
|
|
1218
|
+
/**
|
|
1219
|
+
* Report an entry for moderation review
|
|
1220
|
+
* @param params Report parameters
|
|
1221
|
+
*/
|
|
1222
|
+
report(params: UgcReportParams): Promise<void>;
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1095
1225
|
interface PreloaderApi {
|
|
1096
1226
|
showLoadScreen(): Promise<void>;
|
|
1097
1227
|
hideLoadScreen(): Promise<void>;
|
|
@@ -1222,6 +1352,7 @@ interface Host {
|
|
|
1222
1352
|
readonly rooms: RoomsApi;
|
|
1223
1353
|
readonly logging: LoggingApi;
|
|
1224
1354
|
readonly leaderboard: LeaderboardApi;
|
|
1355
|
+
readonly ugc: UgcApi;
|
|
1225
1356
|
readonly preloader: PreloaderApi;
|
|
1226
1357
|
readonly social: SocialApi;
|
|
1227
1358
|
readonly isInitialized: boolean;
|
|
@@ -1532,6 +1663,7 @@ interface RundotGameAPI {
|
|
|
1532
1663
|
initializeAsync(options?: InitializationOptions): Promise<InitializationContext>;
|
|
1533
1664
|
simulation: SimulationApi;
|
|
1534
1665
|
leaderboard: LeaderboardApi;
|
|
1666
|
+
ugc: UgcApi;
|
|
1535
1667
|
log(message: string, ...args: any[]): void;
|
|
1536
1668
|
error(message: string, ...args: any[]): void;
|
|
1537
1669
|
isAvailable(): boolean;
|
|
@@ -1696,4 +1828,4 @@ interface AdsApi {
|
|
|
1696
1828
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
1697
1829
|
}
|
|
1698
1830
|
|
|
1699
|
-
export { type AiChatCompletionRequest as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type ScheduleLocalNotification as C, type ScheduleNotificationOptions as D, type PopupsApi as E, type ShowToastOptions as F, type ShowInterstitialAdOptions as G, type Host as H, type ShowRewardedAdOptions as I, type ProfileApi as J, type DeviceApi as K, type DeviceInfo as L, type EnvironmentApi as M, type NavigationApi as N, type EnvironmentInfo as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationRunSummary as S, type SystemApi as T, type SafeArea as U, type CdnApi as V, type FetchFromCdnOptions as W, type TimeApi as X, type ServerTimeData as Y, type GetFutureTimeOptions as Z, type AiApi as _, type RecipeRequirementResult as a, type PlayerRankOptions as a$, type AiChatCompletionData as a0, type HapticsApi as a1, HapticFeedbackStyle as a2, type FeaturesApi as a3, type Experiment as a4, type LifecycleApi as a5, type SleepCallback as a6, type Subscription as a7, type AwakeCallback as a8, type PauseCallback as a9, type RoomMessageEvent as aA, type ProposedMoveEvent as aB, RundotGameTransport as aC, type RoomsApi as aD, type CreateRoomOptions as aE, type JoinOrCreateRoomOptions as aF, type JoinOrCreateResult as aG, type ListRoomsOptions as aH, type UpdateRoomDataOptions as aI, type RoomMessageRequest as aJ, type StartRoomGameOptions as aK, type ProposeMoveRequest as aL, type ProposeMoveResult as aM, type ValidateMoveVerdict as aN, type ValidateMoveResult as aO, type RoomSubscriptionOptions as aP, type LoggingApi as aQ, type IapApi as aR, type SpendCurrencyOptions as aS, type LoadEmbeddedAssetsResponse as aT, type SharedAssetsApi as aU, type LeaderboardApi as aV, type ScoreToken as aW, type SubmitScoreParams as aX, type SubmitScoreResult as aY, type GetPagedScoresOptions as aZ, type PagedScoresResponse as a_, type ResumeCallback as aa, type QuitCallback as ab, type SimulationApi as ac, type SimulationSlotValidationResult as ad, type SimulationBatchOperation as ae, type SimulationBatchOperationsResult as af, type SimulationAvailableItem as ag, type SimulationPowerPreview as ah, type SimulationSlotMutationResult as ai, type SimulationSlotContainer as aj, type SimulationAssignment as ak, type SimulationState as al, type ExecuteRecipeOptions as am, type ExecuteRecipeResponse as an, type CollectRecipeResult as ao, type ResetStateOptions as ap, type ResetStateResult as aq, type GetActiveRunsOptions as ar, type ExecuteScopedRecipeOptions as as, type ExecuteScopedRecipeResult as at, type GetAvailableRecipesOptions as au, type GetAvailableRecipesResult as av, type Recipe as aw, type GetBatchRecipeRequirements as ax, type TriggerRecipeChainOptions as ay, type RoomDataUpdate as az, type RundotGameSimulationStateResponse as b, type PlayerRankResult as b0, type GetPodiumScoresOptions as b1, type PodiumScoresResponse as b2, type PreloaderApi as b3, type SocialApi as b4, type ShareMetadata as b5, type ShareLinkResult as b6, type SocialQRCodeOptions as b7, type QRCodeResult as b8, type Avatar3dApi as b9, type
|
|
1831
|
+
export { type AiChatCompletionRequest as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type ScheduleLocalNotification as C, type ScheduleNotificationOptions as D, type PopupsApi as E, type ShowToastOptions as F, type ShowInterstitialAdOptions as G, type Host as H, type ShowRewardedAdOptions as I, type ProfileApi as J, type DeviceApi as K, type DeviceInfo as L, type EnvironmentApi as M, type NavigationApi as N, type EnvironmentInfo as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationRunSummary as S, type SystemApi as T, type SafeArea as U, type CdnApi as V, type FetchFromCdnOptions as W, type TimeApi as X, type ServerTimeData as Y, type GetFutureTimeOptions as Z, type AiApi as _, type RecipeRequirementResult as a, type PlayerRankOptions as a$, type AiChatCompletionData as a0, type HapticsApi as a1, HapticFeedbackStyle as a2, type FeaturesApi as a3, type Experiment as a4, type LifecycleApi as a5, type SleepCallback as a6, type Subscription as a7, type AwakeCallback as a8, type PauseCallback as a9, type RoomMessageEvent as aA, type ProposedMoveEvent as aB, RundotGameTransport as aC, type RoomsApi as aD, type CreateRoomOptions as aE, type JoinOrCreateRoomOptions as aF, type JoinOrCreateResult as aG, type ListRoomsOptions as aH, type UpdateRoomDataOptions as aI, type RoomMessageRequest as aJ, type StartRoomGameOptions as aK, type ProposeMoveRequest as aL, type ProposeMoveResult as aM, type ValidateMoveVerdict as aN, type ValidateMoveResult as aO, type RoomSubscriptionOptions as aP, type LoggingApi as aQ, type IapApi as aR, type SpendCurrencyOptions as aS, type LoadEmbeddedAssetsResponse as aT, type SharedAssetsApi as aU, type LeaderboardApi as aV, type ScoreToken as aW, type SubmitScoreParams as aX, type SubmitScoreResult as aY, type GetPagedScoresOptions as aZ, type PagedScoresResponse as a_, type ResumeCallback as aa, type QuitCallback as ab, type SimulationApi as ac, type SimulationSlotValidationResult as ad, type SimulationBatchOperation as ae, type SimulationBatchOperationsResult as af, type SimulationAvailableItem as ag, type SimulationPowerPreview as ah, type SimulationSlotMutationResult as ai, type SimulationSlotContainer as aj, type SimulationAssignment as ak, type SimulationState as al, type ExecuteRecipeOptions as am, type ExecuteRecipeResponse as an, type CollectRecipeResult as ao, type ResetStateOptions as ap, type ResetStateResult as aq, type GetActiveRunsOptions as ar, type ExecuteScopedRecipeOptions as as, type ExecuteScopedRecipeResult as at, type GetAvailableRecipesOptions as au, type GetAvailableRecipesResult as av, type Recipe as aw, type GetBatchRecipeRequirements as ax, type TriggerRecipeChainOptions as ay, type RoomDataUpdate as az, type RundotGameSimulationStateResponse as b, type PlayerRankResult as b0, type GetPodiumScoresOptions as b1, type PodiumScoresResponse as b2, type PreloaderApi as b3, type SocialApi as b4, type ShareMetadata as b5, type ShareLinkResult as b6, type SocialQRCodeOptions as b7, type QRCodeResult as b8, type Avatar3dApi as b9, type RundotGameRoomRules as bA, type RundotGameRoomCustomMetadata as bB, type RundotGameRoomPayload as bC, type RoomEnvelopeResponse as bD, type RoomsEnvelopeResponse as bE, type JoinOrCreateRoomEnvelopeResponse as bF, type RecipeInfo as bG, type SimulationPersonalState as bH, type SimulationRoomActiveRecipe as bI, type SimulationRoomState as bJ, type SimulationBatchOperationAssign as bK, type SimulationBatchOperationRemove as bL, type SimulationBatchOperationResult as bM, RpcSharedAssetsApi as bN, type LoadEmbeddedAssetsRequest as bO, type LeaderboardModeConfig as bP, type LeaderboardPeriodType as bQ, type LeaderboardPeriodConfig as bR, type LeaderboardAntiCheatConfig as bS, type LeaderboardDisplaySettings as bT, type LeaderboardConfig as bU, type LeaderboardEntry as bV, type PodiumScoresContext as bW, type HudInsets as bX, createHost as bY, type AssetManifest as ba, type Avatar3dConfig as bb, type ShowEditorOptions as bc, type Avatar3dEdits as bd, type AdsApi as be, type UgcApi as bf, type InitializationContext as bg, type InitializationOptions as bh, type AiMessage as bi, type Asset as bj, type Category as bk, MockAvatarApi as bl, type SubPath as bm, type TimeIntervalTriggerInput as bn, type NotificationTriggerInput as bo, type OnRequestCallback as bp, type OnResponseCallback as bq, type OnNotificationCallback as br, type RpcTransport as bs, type JoinRoomMatchCriteria as bt, type RoomMessageEventType as bu, type RoomMessagePayload as bv, type ProposedMovePayload as bw, ROOM_GAME_PHASES as bx, type RoomGamePhase as by, type RundotGameRoomRulesGameState as bz, type SimulationUpdateType as c, type SimulationEntityUpdate as d, type SimulationActiveRunsUpdate as e, type SimulationSnapshotUpdate as f, type SimulationUpdateData as g, type SimulationSubscribeOptions as h, type RundotGameSimulationEffect as i, type RundotGameSimulationRecipe as j, type RundotGameSimulationConfig as k, type RecipeRequirementQuery as l, type RundotGameExecuteRecipeOptions as m, type RundotGameExecuteScopedRecipeOptions as n, type RundotGameAvailableRecipe as o, type RundotGameCollectRecipeResult as p, type RundotGameExecuteRecipeResult as q, RundotGameRoom as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NotificationsApi as z };
|