@oasisomniverse/web5-api 1.0.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.
Files changed (92) hide show
  1. package/README.md +250 -0
  2. package/docs/README.md +44 -0
  3. package/docs/modules/Avatar.md +606 -0
  4. package/docs/modules/CelestialBodies.md +1051 -0
  5. package/docs/modules/CelestialBodiesMetaData.md +949 -0
  6. package/docs/modules/CelestialSpaces.md +1051 -0
  7. package/docs/modules/Chapters.md +955 -0
  8. package/docs/modules/Competition.md +594 -0
  9. package/docs/modules/Cosmic.md +3653 -0
  10. package/docs/modules/Games.md +2619 -0
  11. package/docs/modules/GeoHotSpots.md +1027 -0
  12. package/docs/modules/GeoNFTs.md +1049 -0
  13. package/docs/modules/Health.md +90 -0
  14. package/docs/modules/Holons.md +1139 -0
  15. package/docs/modules/HolonsMetaData.md +949 -0
  16. package/docs/modules/InventoryItems.md +1071 -0
  17. package/docs/modules/Libraries.md +1052 -0
  18. package/docs/modules/Missions.md +1286 -0
  19. package/docs/modules/NFTs.md +1008 -0
  20. package/docs/modules/OAPPs.md +1190 -0
  21. package/docs/modules/Parks.md +1079 -0
  22. package/docs/modules/Plugins.md +1138 -0
  23. package/docs/modules/Quests.md +1941 -0
  24. package/docs/modules/Runtimes.md +1112 -0
  25. package/docs/modules/STAR.md +178 -0
  26. package/docs/modules/Templates.md +990 -0
  27. package/docs/modules/Zomes.md +1049 -0
  28. package/docs/modules/ZomesMetaData.md +949 -0
  29. package/index.d.ts +97 -0
  30. package/index.js +3 -0
  31. package/index.mjs +4 -0
  32. package/package.json +117 -0
  33. package/src/core/httpClient.js +110 -0
  34. package/src/core/routeHelper.js +85 -0
  35. package/src/core/tokenStore.js +52 -0
  36. package/src/core/types.d.ts +18 -0
  37. package/src/index.js +60 -0
  38. package/src/modules/Auth.d.ts +15 -0
  39. package/src/modules/Auth.js +62 -0
  40. package/src/modules/Avatar.d.ts +45 -0
  41. package/src/modules/Avatar.js +47 -0
  42. package/src/modules/CelestialBodies.d.ts +72 -0
  43. package/src/modules/CelestialBodies.js +65 -0
  44. package/src/modules/CelestialBodiesMetaData.d.ts +69 -0
  45. package/src/modules/CelestialBodiesMetaData.js +61 -0
  46. package/src/modules/CelestialSpaces.d.ts +72 -0
  47. package/src/modules/CelestialSpaces.js +65 -0
  48. package/src/modules/Chapters.d.ts +66 -0
  49. package/src/modules/Chapters.js +61 -0
  50. package/src/modules/Competition.d.ts +33 -0
  51. package/src/modules/Competition.js +39 -0
  52. package/src/modules/Cosmic.d.ts +222 -0
  53. package/src/modules/Cosmic.js +165 -0
  54. package/src/modules/Games.d.ts +171 -0
  55. package/src/modules/Games.js +131 -0
  56. package/src/modules/GeoHotSpots.d.ts +66 -0
  57. package/src/modules/GeoHotSpots.js +61 -0
  58. package/src/modules/GeoNFTs.d.ts +72 -0
  59. package/src/modules/GeoNFTs.js +65 -0
  60. package/src/modules/Health.d.ts +12 -0
  61. package/src/modules/Health.js +25 -0
  62. package/src/modules/Holons.d.ts +78 -0
  63. package/src/modules/Holons.js +69 -0
  64. package/src/modules/HolonsMetaData.d.ts +69 -0
  65. package/src/modules/HolonsMetaData.js +61 -0
  66. package/src/modules/InventoryItems.d.ts +69 -0
  67. package/src/modules/InventoryItems.js +63 -0
  68. package/src/modules/Libraries.d.ts +72 -0
  69. package/src/modules/Libraries.js +65 -0
  70. package/src/modules/Missions.d.ts +87 -0
  71. package/src/modules/Missions.js +75 -0
  72. package/src/modules/NFTs.d.ts +69 -0
  73. package/src/modules/NFTs.js +63 -0
  74. package/src/modules/OAPPs.d.ts +69 -0
  75. package/src/modules/OAPPs.js +61 -0
  76. package/src/modules/Parks.d.ts +72 -0
  77. package/src/modules/Parks.js +65 -0
  78. package/src/modules/Plugins.d.ts +78 -0
  79. package/src/modules/Plugins.js +69 -0
  80. package/src/modules/Quests.d.ts +129 -0
  81. package/src/modules/Quests.js +101 -0
  82. package/src/modules/Runtimes.d.ts +81 -0
  83. package/src/modules/Runtimes.js +69 -0
  84. package/src/modules/STAR.d.ts +18 -0
  85. package/src/modules/STAR.js +29 -0
  86. package/src/modules/Templates.d.ts +72 -0
  87. package/src/modules/Templates.js +63 -0
  88. package/src/modules/Zomes.d.ts +72 -0
  89. package/src/modules/Zomes.js +65 -0
  90. package/src/modules/ZomesMetaData.d.ts +69 -0
  91. package/src/modules/ZomesMetaData.js +61 -0
  92. package/src/modules/index.js +67 -0
@@ -0,0 +1,594 @@
1
+ # Competition — `star.competition`
2
+
3
+ Source controller: [`CompetitionController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/STAR%20ODK/NextGenSoftware.OASIS.STAR.WebAPI/Controllers/CompetitionController.cs)
4
+ Route prefix: `api/competition`
5
+ 9 operation(s).
6
+
7
+ Every method takes a single args object: any key matching a `{token}` in the route is substituted into the URL; everything else becomes the query string (GET/DELETE) or JSON body (POST/PUT). Every call resolves to the standard OASIS envelope:
8
+
9
+ ```ts
10
+ {
11
+ isError: boolean;
12
+ isWarning: boolean;
13
+ message: string;
14
+ errorCode?: string;
15
+ result: T; // see each endpoint's Response section below
16
+ }
17
+ ```
18
+
19
+ ## Operations
20
+
21
+ ### `getActiveTournaments`
22
+
23
+ Get active tournaments
24
+
25
+ **GET** `api/competition/tournaments`
26
+
27
+ **Request**
28
+
29
+ Query parameters:
30
+
31
+ | Field | Type |
32
+ | --- | --- |
33
+ | `competitionType` | `CompetitionType (optional)` |
34
+
35
+ **Response**
36
+
37
+ Standard `OASISResult` envelope (see top of this page) with:
38
+
39
+ `result` type: `Tournament` (array)
40
+
41
+ | Field | Type |
42
+ | --- | --- |
43
+ | `Id` | `Guid` |
44
+ | `Name` | `string` |
45
+ | `Description` | `string` |
46
+ | `TournamentType` | `TournamentType` |
47
+ | `CompetitionType` | `CompetitionType` |
48
+ | `Status` | `TournamentStatus` |
49
+ | `StartDate` | `DateTime` |
50
+ | `EndDate` | `DateTime` |
51
+ | `RegistrationStart` | `DateTime` |
52
+ | `RegistrationEnd` | `DateTime` |
53
+ | `MaxParticipants` | `int` |
54
+ | `CurrentParticipants` | `int` |
55
+ | `MinLevel` | `int` |
56
+ | `MaxLevel` | `int` |
57
+ | `Prerequisites` | `List<string>` |
58
+ | `Rewards` | `List<TournamentReward>` |
59
+ | `Participants` | `List<TournamentParticipant>` |
60
+ | `Matches` | `List<TournamentMatch>` |
61
+ | `Rules` | `Dictionary<string, object>` |
62
+ | `Metadata` | `Dictionary<string, object>` |
63
+ | `CreatedBy` | `Guid` |
64
+ | `CreatedAt` | `DateTime` |
65
+
66
+ **Example**
67
+
68
+ ```js
69
+ const { isError, message, result } = await star.competition.getActiveTournaments({
70
+ competitionType: '<competitionType>'
71
+ });
72
+ if (isError) throw new Error(message);
73
+ console.log(result);
74
+ ```
75
+
76
+ Example response:
77
+
78
+ ```json
79
+ {
80
+ "isError": false,
81
+ "message": "",
82
+ "result": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "TournamentType": { }, "CompetitionType": { }, "Status": { }, "StartDate": "2026-01-01T00:00:00Z", "EndDate": "2026-01-01T00:00:00Z", "RegistrationStart": "2026-01-01T00:00:00Z", "RegistrationEnd": "2026-01-01T00:00:00Z", "MaxParticipants": 1, "CurrentParticipants": 1, "MinLevel": 1, "MaxLevel": 1, "Prerequisites": ["example string"], "Rewards": [{ "Type": "example string", "Name": "example string", "Description": "example string", "Value": 1, "Position": 1, "ItemId": "example string", "Properties": { "<string>": {} } }], "Participants": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "AvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "AvatarName": "example string", "AvatarUsername": "example string", "Score": 1, "Rank": 1, "IsEliminated": true, "JoinedAt": "2026-01-01T00:00:00Z", "Stats": { "<string>": {} } }], "Matches": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Participant1Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Participant2Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Round": 1, "Status": { }, "Participant1Score": 1, "Participant2Score": 1, "WinnerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "StartTime": "2026-01-01T00:00:00Z", "EndTime": "2026-01-01T00:00:00Z", "MatchData": { "<string>": {} } }], "Rules": { "<string>": {} }, "Metadata": { "<string>": {} }, "CreatedBy": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "CreatedAt": "2026-01-01T00:00:00Z" }]
83
+ }
84
+ ```
85
+
86
+ ---
87
+
88
+ ### `getAvailableLeagues`
89
+
90
+ Get available leagues for a competition type and season
91
+
92
+ **GET** `api/competition/leagues/{competitionType}/{seasonType}`
93
+
94
+ Route parameters:
95
+
96
+ | Field | Type |
97
+ | --- | --- |
98
+ | `competitionType` | `CompetitionType` |
99
+ | `seasonType` | `SeasonType` |
100
+
101
+ **Request**
102
+
103
+ No request body.
104
+
105
+ **Response**
106
+
107
+ Standard `OASISResult` envelope (see top of this page) with:
108
+
109
+ `result` type: `League` (array)
110
+
111
+ | Field | Type |
112
+ | --- | --- |
113
+ | `Id` | `Guid` |
114
+ | `Name` | `string` |
115
+ | `Description` | `string` |
116
+ | `LeagueType` | `LeagueType` |
117
+ | `CompetitionType` | `CompetitionType` |
118
+ | `MinScore` | `long` |
119
+ | `MaxScore` | `long` |
120
+ | `MaxPlayers` | `int` |
121
+ | `CurrentPlayers` | `int` |
122
+ | `IsActive` | `bool` |
123
+ | `CreatedAt` | `DateTime` |
124
+ | `SeasonStart` | `DateTime?` |
125
+ | `SeasonEnd` | `DateTime?` |
126
+ | `SeasonType` | `SeasonType` |
127
+ | `Rewards` | `List<LeagueReward>` |
128
+ | `Requirements` | `Dictionary<string, object>` |
129
+ | `Metadata` | `Dictionary<string, object>` |
130
+
131
+ **Example**
132
+
133
+ ```js
134
+ const { isError, message, result } = await star.competition.getAvailableLeagues({
135
+ competitionType: '<competitionType>',
136
+ seasonType: '<seasonType>'
137
+ });
138
+ if (isError) throw new Error(message);
139
+ console.log(result);
140
+ ```
141
+
142
+ Example response:
143
+
144
+ ```json
145
+ {
146
+ "isError": false,
147
+ "message": "",
148
+ "result": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "LeagueType": { }, "CompetitionType": { }, "MinScore": 1, "MaxScore": 1, "MaxPlayers": 1, "CurrentPlayers": 1, "IsActive": true, "CreatedAt": "2026-01-01T00:00:00Z", "SeasonStart": "2026-01-01T00:00:00Z", "SeasonEnd": "2026-01-01T00:00:00Z", "SeasonType": { }, "Rewards": [{ "Type": "example string", "Name": "example string", "Description": "example string", "Value": 1, "ItemId": "example string", "Properties": { "<string>": {} } }], "Requirements": { "<string>": {} }, "Metadata": { "<string>": {} } }]
149
+ }
150
+ ```
151
+
152
+ ---
153
+
154
+ ### `getAvatarLeague`
155
+
156
+ Get avatar's league by ID
157
+
158
+ **GET** `api/competition/league/{avatarId}/{competitionType}/{seasonType}`
159
+
160
+ Route parameters:
161
+
162
+ | Field | Type |
163
+ | --- | --- |
164
+ | `avatarId` | `Guid` |
165
+ | `competitionType` | `CompetitionType` |
166
+ | `seasonType` | `SeasonType` |
167
+
168
+ **Request**
169
+
170
+ No request body.
171
+
172
+ **Response**
173
+
174
+ Standard `OASISResult` envelope (see top of this page) with:
175
+
176
+ `result` type: `League`
177
+
178
+ | Field | Type |
179
+ | --- | --- |
180
+ | `Id` | `Guid` |
181
+ | `Name` | `string` |
182
+ | `Description` | `string` |
183
+ | `LeagueType` | `LeagueType` |
184
+ | `CompetitionType` | `CompetitionType` |
185
+ | `MinScore` | `long` |
186
+ | `MaxScore` | `long` |
187
+ | `MaxPlayers` | `int` |
188
+ | `CurrentPlayers` | `int` |
189
+ | `IsActive` | `bool` |
190
+ | `CreatedAt` | `DateTime` |
191
+ | `SeasonStart` | `DateTime?` |
192
+ | `SeasonEnd` | `DateTime?` |
193
+ | `SeasonType` | `SeasonType` |
194
+ | `Rewards` | `List<LeagueReward>` |
195
+ | `Requirements` | `Dictionary<string, object>` |
196
+ | `Metadata` | `Dictionary<string, object>` |
197
+
198
+ **Example**
199
+
200
+ ```js
201
+ const { isError, message, result } = await star.competition.getAvatarLeague({
202
+ avatarId: '<avatarId>',
203
+ competitionType: '<competitionType>',
204
+ seasonType: '<seasonType>'
205
+ });
206
+ if (isError) throw new Error(message);
207
+ console.log(result);
208
+ ```
209
+
210
+ Example response:
211
+
212
+ ```json
213
+ {
214
+ "isError": false,
215
+ "message": "",
216
+ "result": { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "LeagueType": { }, "CompetitionType": { }, "MinScore": 1, "MaxScore": 1, "MaxPlayers": 1, "CurrentPlayers": 1, "IsActive": true, "CreatedAt": "2026-01-01T00:00:00Z", "SeasonStart": "2026-01-01T00:00:00Z", "SeasonEnd": "2026-01-01T00:00:00Z", "SeasonType": { }, "Rewards": [{ "Type": "example string", "Name": "example string", "Description": "example string", "Value": 1, "ItemId": "example string", "Properties": { "<string>": {} } }], "Requirements": { "<string>": {} }, "Metadata": { "<string>": {} } }
217
+ }
218
+ ```
219
+
220
+ ---
221
+
222
+ ### `getAvatarRank`
223
+
224
+ Get avatar's rank by ID in a specific competition
225
+
226
+ **GET** `api/competition/rank/{avatarId}/{competitionType}/{seasonType}`
227
+
228
+ Route parameters:
229
+
230
+ | Field | Type |
231
+ | --- | --- |
232
+ | `avatarId` | `Guid` |
233
+ | `competitionType` | `CompetitionType` |
234
+ | `seasonType` | `SeasonType` |
235
+
236
+ **Request**
237
+
238
+ No request body.
239
+
240
+ **Response**
241
+
242
+ Standard `OASISResult` envelope (see top of this page) with:
243
+
244
+ `result` type: `LeaderboardEntry`
245
+
246
+ | Field | Type |
247
+ | --- | --- |
248
+ | `Id` | `Guid` |
249
+ | `AvatarId` | `Guid` |
250
+ | `AvatarName` | `string` |
251
+ | `AvatarUsername` | `string` |
252
+ | `CompetitionType` | `CompetitionType` |
253
+ | `Score` | `long` |
254
+ | `Rank` | `int` |
255
+ | `PreviousRank` | `int` |
256
+ | `RankChange` | `int` |
257
+ | `LastUpdated` | `DateTime` |
258
+ | `SeasonStart` | `DateTime` |
259
+ | `SeasonEnd` | `DateTime` |
260
+ | `SeasonType` | `SeasonType` |
261
+ | `CurrentLeague` | `LeagueType` |
262
+ | `PreviousLeague` | `LeagueType` |
263
+ | `LeaguePromoted` | `bool` |
264
+ | `LeagueDemoted` | `bool` |
265
+ | `Stats` | `Dictionary<string, object>` |
266
+ | `Achievements` | `Dictionary<string, object>` |
267
+ | `Badges` | `List<string>` |
268
+ | `Metadata` | `Dictionary<string, object>` |
269
+
270
+ **Example**
271
+
272
+ ```js
273
+ const { isError, message, result } = await star.competition.getAvatarRank({
274
+ avatarId: '<avatarId>',
275
+ competitionType: '<competitionType>',
276
+ seasonType: '<seasonType>'
277
+ });
278
+ if (isError) throw new Error(message);
279
+ console.log(result);
280
+ ```
281
+
282
+ Example response:
283
+
284
+ ```json
285
+ {
286
+ "isError": false,
287
+ "message": "",
288
+ "result": { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "AvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "AvatarName": "example string", "AvatarUsername": "example string", "CompetitionType": { }, "Score": 1, "Rank": 1, "PreviousRank": 1, "RankChange": 1, "LastUpdated": "2026-01-01T00:00:00Z", "SeasonStart": "2026-01-01T00:00:00Z", "SeasonEnd": "2026-01-01T00:00:00Z", "SeasonType": { }, "CurrentLeague": { }, "PreviousLeague": {}, "LeaguePromoted": true, "LeagueDemoted": true, "Stats": { "<string>": {} }, "Achievements": { "<string>": {} }, "Badges": ["example string"], "Metadata": { "<string>": {} } }
289
+ }
290
+ ```
291
+
292
+ ---
293
+
294
+ ### `getLeaderboard`
295
+
296
+ Get leaderboard for a specific competition type and season
297
+
298
+ **GET** `api/competition/leaderboard/{competitionType}/{seasonType}`
299
+
300
+ Route parameters:
301
+
302
+ | Field | Type |
303
+ | --- | --- |
304
+ | `competitionType` | `CompetitionType` |
305
+ | `seasonType` | `SeasonType` |
306
+
307
+ **Request**
308
+
309
+ Query parameters:
310
+
311
+ | Field | Type |
312
+ | --- | --- |
313
+ | `limit` | `int (optional)` |
314
+ | `offset` | `int (optional)` |
315
+
316
+ **Response**
317
+
318
+ Standard `OASISResult` envelope (see top of this page) with:
319
+
320
+ `result` type: `LeaderboardEntry` (array)
321
+
322
+ | Field | Type |
323
+ | --- | --- |
324
+ | `Id` | `Guid` |
325
+ | `AvatarId` | `Guid` |
326
+ | `AvatarName` | `string` |
327
+ | `AvatarUsername` | `string` |
328
+ | `CompetitionType` | `CompetitionType` |
329
+ | `Score` | `long` |
330
+ | `Rank` | `int` |
331
+ | `PreviousRank` | `int` |
332
+ | `RankChange` | `int` |
333
+ | `LastUpdated` | `DateTime` |
334
+ | `SeasonStart` | `DateTime` |
335
+ | `SeasonEnd` | `DateTime` |
336
+ | `SeasonType` | `SeasonType` |
337
+ | `CurrentLeague` | `LeagueType` |
338
+ | `PreviousLeague` | `LeagueType` |
339
+ | `LeaguePromoted` | `bool` |
340
+ | `LeagueDemoted` | `bool` |
341
+ | `Stats` | `Dictionary<string, object>` |
342
+ | `Achievements` | `Dictionary<string, object>` |
343
+ | `Badges` | `List<string>` |
344
+ | `Metadata` | `Dictionary<string, object>` |
345
+
346
+ **Example**
347
+
348
+ ```js
349
+ const { isError, message, result } = await star.competition.getLeaderboard({
350
+ competitionType: '<competitionType>',
351
+ seasonType: '<seasonType>',
352
+ limit: 1,
353
+ offset: 1
354
+ });
355
+ if (isError) throw new Error(message);
356
+ console.log(result);
357
+ ```
358
+
359
+ Example response:
360
+
361
+ ```json
362
+ {
363
+ "isError": false,
364
+ "message": "",
365
+ "result": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "AvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "AvatarName": "example string", "AvatarUsername": "example string", "CompetitionType": { }, "Score": 1, "Rank": 1, "PreviousRank": 1, "RankChange": 1, "LastUpdated": "2026-01-01T00:00:00Z", "SeasonStart": "2026-01-01T00:00:00Z", "SeasonEnd": "2026-01-01T00:00:00Z", "SeasonType": { }, "CurrentLeague": { }, "PreviousLeague": {}, "LeaguePromoted": true, "LeagueDemoted": true, "Stats": { "<string>": {} }, "Achievements": { "<string>": {} }, "Badges": ["example string"], "Metadata": { "<string>": {} } }]
366
+ }
367
+ ```
368
+
369
+ ---
370
+
371
+ ### `getMyLeague`
372
+
373
+ Get current avatar's league
374
+
375
+ **GET** `api/competition/my-league/{competitionType}/{seasonType}`
376
+
377
+ Route parameters:
378
+
379
+ | Field | Type |
380
+ | --- | --- |
381
+ | `competitionType` | `CompetitionType` |
382
+ | `seasonType` | `SeasonType` |
383
+
384
+ **Request**
385
+
386
+ No request body.
387
+
388
+ **Response**
389
+
390
+ Standard `OASISResult` envelope (see top of this page) with:
391
+
392
+ `result` type: `League`
393
+
394
+ | Field | Type |
395
+ | --- | --- |
396
+ | `Id` | `Guid` |
397
+ | `Name` | `string` |
398
+ | `Description` | `string` |
399
+ | `LeagueType` | `LeagueType` |
400
+ | `CompetitionType` | `CompetitionType` |
401
+ | `MinScore` | `long` |
402
+ | `MaxScore` | `long` |
403
+ | `MaxPlayers` | `int` |
404
+ | `CurrentPlayers` | `int` |
405
+ | `IsActive` | `bool` |
406
+ | `CreatedAt` | `DateTime` |
407
+ | `SeasonStart` | `DateTime?` |
408
+ | `SeasonEnd` | `DateTime?` |
409
+ | `SeasonType` | `SeasonType` |
410
+ | `Rewards` | `List<LeagueReward>` |
411
+ | `Requirements` | `Dictionary<string, object>` |
412
+ | `Metadata` | `Dictionary<string, object>` |
413
+
414
+ **Example**
415
+
416
+ ```js
417
+ const { isError, message, result } = await star.competition.getMyLeague({
418
+ competitionType: '<competitionType>',
419
+ seasonType: '<seasonType>'
420
+ });
421
+ if (isError) throw new Error(message);
422
+ console.log(result);
423
+ ```
424
+
425
+ Example response:
426
+
427
+ ```json
428
+ {
429
+ "isError": false,
430
+ "message": "",
431
+ "result": { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": "example string", "LeagueType": { }, "CompetitionType": { }, "MinScore": 1, "MaxScore": 1, "MaxPlayers": 1, "CurrentPlayers": 1, "IsActive": true, "CreatedAt": "2026-01-01T00:00:00Z", "SeasonStart": "2026-01-01T00:00:00Z", "SeasonEnd": "2026-01-01T00:00:00Z", "SeasonType": { }, "Rewards": [{ "Type": "example string", "Name": "example string", "Description": "example string", "Value": 1, "ItemId": "example string", "Properties": { "<string>": {} } }], "Requirements": { "<string>": {} }, "Metadata": { "<string>": {} } }
432
+ }
433
+ ```
434
+
435
+ ---
436
+
437
+ ### `getMyRank`
438
+
439
+ Get current avatar's rank in a specific competition
440
+
441
+ **GET** `api/competition/my-rank/{competitionType}/{seasonType}`
442
+
443
+ Route parameters:
444
+
445
+ | Field | Type |
446
+ | --- | --- |
447
+ | `competitionType` | `CompetitionType` |
448
+ | `seasonType` | `SeasonType` |
449
+
450
+ **Request**
451
+
452
+ No request body.
453
+
454
+ **Response**
455
+
456
+ Standard `OASISResult` envelope (see top of this page) with:
457
+
458
+ `result` type: `LeaderboardEntry`
459
+
460
+ | Field | Type |
461
+ | --- | --- |
462
+ | `Id` | `Guid` |
463
+ | `AvatarId` | `Guid` |
464
+ | `AvatarName` | `string` |
465
+ | `AvatarUsername` | `string` |
466
+ | `CompetitionType` | `CompetitionType` |
467
+ | `Score` | `long` |
468
+ | `Rank` | `int` |
469
+ | `PreviousRank` | `int` |
470
+ | `RankChange` | `int` |
471
+ | `LastUpdated` | `DateTime` |
472
+ | `SeasonStart` | `DateTime` |
473
+ | `SeasonEnd` | `DateTime` |
474
+ | `SeasonType` | `SeasonType` |
475
+ | `CurrentLeague` | `LeagueType` |
476
+ | `PreviousLeague` | `LeagueType` |
477
+ | `LeaguePromoted` | `bool` |
478
+ | `LeagueDemoted` | `bool` |
479
+ | `Stats` | `Dictionary<string, object>` |
480
+ | `Achievements` | `Dictionary<string, object>` |
481
+ | `Badges` | `List<string>` |
482
+ | `Metadata` | `Dictionary<string, object>` |
483
+
484
+ **Example**
485
+
486
+ ```js
487
+ const { isError, message, result } = await star.competition.getMyRank({
488
+ competitionType: '<competitionType>',
489
+ seasonType: '<seasonType>'
490
+ });
491
+ if (isError) throw new Error(message);
492
+ console.log(result);
493
+ ```
494
+
495
+ Example response:
496
+
497
+ ```json
498
+ {
499
+ "isError": false,
500
+ "message": "",
501
+ "result": { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "AvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "AvatarName": "example string", "AvatarUsername": "example string", "CompetitionType": { }, "Score": 1, "Rank": 1, "PreviousRank": 1, "RankChange": 1, "LastUpdated": "2026-01-01T00:00:00Z", "SeasonStart": "2026-01-01T00:00:00Z", "SeasonEnd": "2026-01-01T00:00:00Z", "SeasonType": { }, "CurrentLeague": { }, "PreviousLeague": {}, "LeaguePromoted": true, "LeagueDemoted": true, "Stats": { "<string>": {} }, "Achievements": { "<string>": {} }, "Badges": ["example string"], "Metadata": { "<string>": {} } }
502
+ }
503
+ ```
504
+
505
+ ---
506
+
507
+ ### `getMyStats`
508
+
509
+ Get competition statistics for the current avatar
510
+
511
+ **GET** `api/competition/stats/{competitionType}/{seasonType}`
512
+
513
+ Route parameters:
514
+
515
+ | Field | Type |
516
+ | --- | --- |
517
+ | `competitionType` | `CompetitionType` |
518
+ | `seasonType` | `SeasonType` |
519
+
520
+ **Request**
521
+
522
+ No request body.
523
+
524
+ **Response**
525
+
526
+ Standard `OASISResult` envelope (see top of this page) with:
527
+
528
+ `result` type: `Dictionary<string, object>` - a key/value map keyed by `string`, each value a `object`.
529
+
530
+ **Example**
531
+
532
+ ```js
533
+ const { isError, message, result } = await star.competition.getMyStats({
534
+ competitionType: '<competitionType>',
535
+ seasonType: '<seasonType>'
536
+ });
537
+ if (isError) throw new Error(message);
538
+ console.log(result);
539
+ ```
540
+
541
+ Example response:
542
+
543
+ ```json
544
+ {
545
+ "isError": false,
546
+ "message": "",
547
+ "result": { "<string>": {} }
548
+ }
549
+ ```
550
+
551
+ ---
552
+
553
+ ### `joinTournament`
554
+
555
+ Join a tournament
556
+
557
+ **POST** `api/competition/tournaments/{tournamentId}/join`
558
+
559
+ Route parameters:
560
+
561
+ | Field | Type |
562
+ | --- | --- |
563
+ | `tournamentId` | `Guid` |
564
+
565
+ **Request**
566
+
567
+ No request body.
568
+
569
+ **Response**
570
+
571
+ Standard `OASISResult` envelope (see top of this page) with:
572
+
573
+ `result` type: `bool`
574
+
575
+ **Example**
576
+
577
+ ```js
578
+ const { isError, message, result } = await star.competition.joinTournament({
579
+ tournamentId: '<tournamentId>'
580
+ });
581
+ if (isError) throw new Error(message);
582
+ console.log(result);
583
+ ```
584
+
585
+ Example response:
586
+
587
+ ```json
588
+ {
589
+ "isError": false,
590
+ "message": "",
591
+ "result": true
592
+ }
593
+ ```
594
+