horizon-mcp 0.0.0-development

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 (99) hide show
  1. package/README.md +138 -0
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +7 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/prompts/debug-connection.d.ts +3 -0
  7. package/dist/prompts/debug-connection.d.ts.map +1 -0
  8. package/dist/prompts/debug-connection.js +17 -0
  9. package/dist/prompts/debug-connection.js.map +1 -0
  10. package/dist/prompts/explain-feature.d.ts +3 -0
  11. package/dist/prompts/explain-feature.d.ts.map +1 -0
  12. package/dist/prompts/explain-feature.js +32 -0
  13. package/dist/prompts/explain-feature.js.map +1 -0
  14. package/dist/prompts/index.d.ts +6 -0
  15. package/dist/prompts/index.d.ts.map +1 -0
  16. package/dist/prompts/index.js +14 -0
  17. package/dist/prompts/index.js.map +1 -0
  18. package/dist/prompts/integrate-feature.d.ts +3 -0
  19. package/dist/prompts/integrate-feature.d.ts.map +1 -0
  20. package/dist/prompts/integrate-feature.js +35 -0
  21. package/dist/prompts/integrate-feature.js.map +1 -0
  22. package/dist/prompts/setup-auth.d.ts +3 -0
  23. package/dist/prompts/setup-auth.d.ts.map +1 -0
  24. package/dist/prompts/setup-auth.js +26 -0
  25. package/dist/prompts/setup-auth.js.map +1 -0
  26. package/dist/resources/index.d.ts +6 -0
  27. package/dist/resources/index.d.ts.map +1 -0
  28. package/dist/resources/index.js +208 -0
  29. package/dist/resources/index.js.map +1 -0
  30. package/dist/server.d.ts +3 -0
  31. package/dist/server.d.ts.map +1 -0
  32. package/dist/server.js +15 -0
  33. package/dist/server.js.map +1 -0
  34. package/dist/tools/__tests__/api-client.test.d.ts +2 -0
  35. package/dist/tools/__tests__/api-client.test.d.ts.map +1 -0
  36. package/dist/tools/__tests__/api-client.test.js +156 -0
  37. package/dist/tools/__tests__/api-client.test.js.map +1 -0
  38. package/dist/tools/api-client.d.ts +25 -0
  39. package/dist/tools/api-client.d.ts.map +1 -0
  40. package/dist/tools/api-client.js +78 -0
  41. package/dist/tools/api-client.js.map +1 -0
  42. package/dist/tools/auth.d.ts +3 -0
  43. package/dist/tools/auth.d.ts.map +1 -0
  44. package/dist/tools/auth.js +123 -0
  45. package/dist/tools/auth.js.map +1 -0
  46. package/dist/tools/cloud-save.d.ts +3 -0
  47. package/dist/tools/cloud-save.d.ts.map +1 -0
  48. package/dist/tools/cloud-save.js +50 -0
  49. package/dist/tools/cloud-save.js.map +1 -0
  50. package/dist/tools/connection.d.ts +3 -0
  51. package/dist/tools/connection.d.ts.map +1 -0
  52. package/dist/tools/connection.js +20 -0
  53. package/dist/tools/connection.js.map +1 -0
  54. package/dist/tools/feedback.d.ts +3 -0
  55. package/dist/tools/feedback.d.ts.map +1 -0
  56. package/dist/tools/feedback.js +36 -0
  57. package/dist/tools/feedback.js.map +1 -0
  58. package/dist/tools/gift-codes.d.ts +3 -0
  59. package/dist/tools/gift-codes.d.ts.map +1 -0
  60. package/dist/tools/gift-codes.js +52 -0
  61. package/dist/tools/gift-codes.js.map +1 -0
  62. package/dist/tools/index.d.ts +6 -0
  63. package/dist/tools/index.d.ts.map +1 -0
  64. package/dist/tools/index.js +24 -0
  65. package/dist/tools/index.js.map +1 -0
  66. package/dist/tools/leaderboard.d.ts +3 -0
  67. package/dist/tools/leaderboard.d.ts.map +1 -0
  68. package/dist/tools/leaderboard.js +96 -0
  69. package/dist/tools/leaderboard.js.map +1 -0
  70. package/dist/tools/news.d.ts +3 -0
  71. package/dist/tools/news.d.ts.map +1 -0
  72. package/dist/tools/news.js +29 -0
  73. package/dist/tools/news.js.map +1 -0
  74. package/dist/tools/remote-config.d.ts +3 -0
  75. package/dist/tools/remote-config.d.ts.map +1 -0
  76. package/dist/tools/remote-config.js +42 -0
  77. package/dist/tools/remote-config.js.map +1 -0
  78. package/dist/tools/tool-helpers.d.ts +24 -0
  79. package/dist/tools/tool-helpers.d.ts.map +1 -0
  80. package/dist/tools/tool-helpers.js +54 -0
  81. package/dist/tools/tool-helpers.js.map +1 -0
  82. package/dist/tools/user-logs.d.ts +3 -0
  83. package/dist/tools/user-logs.d.ts.map +1 -0
  84. package/dist/tools/user-logs.js +30 -0
  85. package/dist/tools/user-logs.js.map +1 -0
  86. package/package.json +52 -0
  87. package/src/resources/api/app-api.md +495 -0
  88. package/src/resources/docs/auth.md +280 -0
  89. package/src/resources/docs/cloud-save.md +180 -0
  90. package/src/resources/docs/feedback.md +126 -0
  91. package/src/resources/docs/gift-codes.md +153 -0
  92. package/src/resources/docs/leaderboard.md +201 -0
  93. package/src/resources/docs/news.md +114 -0
  94. package/src/resources/docs/overview.md +80 -0
  95. package/src/resources/docs/remote-config.md +149 -0
  96. package/src/resources/docs/user-logs.md +144 -0
  97. package/src/resources/quickstart/godot.md +224 -0
  98. package/src/resources/quickstart/unity.md +317 -0
  99. package/src/resources/quickstart/unreal.md +390 -0
@@ -0,0 +1,495 @@
1
+ # horizOn App API Reference
2
+
3
+ ## Base URL
4
+
5
+ ```
6
+ https://horizon.pm
7
+ ```
8
+
9
+ ## Authentication
10
+
11
+ All requests require the `X-API-Key` header:
12
+
13
+ ```
14
+ X-API-Key: your-api-key-here
15
+ Content-Type: application/json
16
+ ```
17
+
18
+ ## Rate Limit
19
+
20
+ **10 requests per minute per client** (all tiers).
21
+
22
+ ---
23
+
24
+ ## User Management (Authentication)
25
+
26
+ ### POST /api/v1/app/user-management/signup
27
+
28
+ Create a new user account.
29
+
30
+ **Request:**
31
+ ```json
32
+ {
33
+ "type": "ANONYMOUS | EMAIL | GOOGLE",
34
+ "username": "string (optional, 1-50 chars)",
35
+ "email": "string (required for EMAIL)",
36
+ "password": "string (required for EMAIL, 4-32 chars)",
37
+ "anonymousToken": "string (required for ANONYMOUS, max 32 chars)",
38
+ "googleAuthorizationCode": "string (required for GOOGLE)",
39
+ "googleRedirectUri": "string (optional)"
40
+ }
41
+ ```
42
+
43
+ **Response (200):**
44
+ ```json
45
+ {
46
+ "userId": "string",
47
+ "username": "string",
48
+ "email": "string | null",
49
+ "isAnonymous": "boolean",
50
+ "isVerified": "boolean",
51
+ "anonymousToken": "string | null",
52
+ "createdAt": "ISO 8601 datetime"
53
+ }
54
+ ```
55
+
56
+ **Status Codes:** `200` success, `401` invalid API key, `409` user already exists.
57
+
58
+ ---
59
+
60
+ ### POST /api/v1/app/user-management/signin
61
+
62
+ Authenticate an existing user.
63
+
64
+ **Request:**
65
+ ```json
66
+ {
67
+ "type": "EMAIL | ANONYMOUS | GOOGLE",
68
+ "email": "string (EMAIL only)",
69
+ "password": "string (EMAIL only)",
70
+ "anonymousToken": "string (ANONYMOUS only)",
71
+ "googleAuthorizationCode": "string (GOOGLE only)",
72
+ "googleRedirectUri": "string (optional)"
73
+ }
74
+ ```
75
+
76
+ **Response (200):**
77
+ ```json
78
+ {
79
+ "userId": "string | null",
80
+ "username": "string | null",
81
+ "email": "string | null",
82
+ "accessToken": "string | null",
83
+ "authStatus": "AUTHENTICATED | FAILED | NOT_VERIFIED",
84
+ "message": "string | null"
85
+ }
86
+ ```
87
+
88
+ **Status Codes:** `200` success, `401` invalid API key, `403` not verified, `404` user not found.
89
+
90
+ ---
91
+
92
+ ### POST /api/v1/app/user-management/check-auth
93
+
94
+ Validate a session token.
95
+
96
+ **Request:**
97
+ ```json
98
+ {
99
+ "userId": "string",
100
+ "sessionToken": "string"
101
+ }
102
+ ```
103
+
104
+ **Response (200):**
105
+ ```json
106
+ {
107
+ "userId": "string | null",
108
+ "isAuthenticated": "boolean",
109
+ "authStatus": "AUTHENTICATED | FAILED",
110
+ "message": "string | null"
111
+ }
112
+ ```
113
+
114
+ ---
115
+
116
+ ### POST /api/v1/app/user-management/change-name
117
+
118
+ Change a user's display name.
119
+
120
+ **Request:**
121
+ ```json
122
+ {
123
+ "userId": "string",
124
+ "sessionToken": "string",
125
+ "newName": "string (1-50 chars)"
126
+ }
127
+ ```
128
+
129
+ **Response (200):**
130
+ ```json
131
+ {
132
+ "isAuthenticated": "boolean",
133
+ "authStatus": "string"
134
+ }
135
+ ```
136
+
137
+ ---
138
+
139
+ ### POST /api/v1/app/user-management/verify-email
140
+
141
+ Verify a user's email with a verification token.
142
+
143
+ **Request:**
144
+ ```json
145
+ {
146
+ "token": "string"
147
+ }
148
+ ```
149
+
150
+ **Response (200):** Success message.
151
+
152
+ **Status Codes:** `200` success, `400` invalid token.
153
+
154
+ ---
155
+
156
+ ### POST /api/v1/app/user-management/forgot-password
157
+
158
+ Request a password reset email.
159
+
160
+ **Request:**
161
+ ```json
162
+ {
163
+ "email": "string"
164
+ }
165
+ ```
166
+
167
+ **Response (200):** Success message (always succeeds to prevent email enumeration).
168
+
169
+ ---
170
+
171
+ ### POST /api/v1/app/user-management/reset-password
172
+
173
+ Reset password with a reset token.
174
+
175
+ **Request:**
176
+ ```json
177
+ {
178
+ "token": "string",
179
+ "newPassword": "string (4-128 chars)"
180
+ }
181
+ ```
182
+
183
+ **Response (200):** Success message.
184
+
185
+ **Status Codes:** `200` success, `400` invalid token or password.
186
+
187
+ ---
188
+
189
+ ## Leaderboard
190
+
191
+ ### POST /api/v1/app/leaderboard/submit
192
+
193
+ Submit a score (only updates if higher than previous best).
194
+
195
+ **Request:**
196
+ ```json
197
+ {
198
+ "userId": "string",
199
+ "score": "number (positive integer)"
200
+ }
201
+ ```
202
+
203
+ **Response (200):**
204
+ ```json
205
+ {
206
+ "success": true
207
+ }
208
+ ```
209
+
210
+ ---
211
+
212
+ ### GET /api/v1/app/leaderboard/top?userId={userId}&limit={limit}
213
+
214
+ Get top leaderboard entries.
215
+
216
+ | Param | Type | Required | Default |
217
+ |-------|------|----------|---------|
218
+ | `userId` | string | Yes | - |
219
+ | `limit` | number | No | 10 (max 100) |
220
+
221
+ **Response (200):**
222
+ ```json
223
+ {
224
+ "entries": [
225
+ { "position": 1, "username": "string", "score": "number" }
226
+ ]
227
+ }
228
+ ```
229
+
230
+ ---
231
+
232
+ ### GET /api/v1/app/leaderboard/rank?userId={userId}
233
+
234
+ Get a user's rank.
235
+
236
+ | Param | Type | Required |
237
+ |-------|------|----------|
238
+ | `userId` | string | Yes |
239
+
240
+ **Response (200):**
241
+ ```json
242
+ {
243
+ "position": "number",
244
+ "username": "string",
245
+ "score": "number"
246
+ }
247
+ ```
248
+
249
+ ---
250
+
251
+ ### GET /api/v1/app/leaderboard/around?userId={userId}&range={range}
252
+
253
+ Get entries around a user's rank.
254
+
255
+ | Param | Type | Required | Default |
256
+ |-------|------|----------|---------|
257
+ | `userId` | string | Yes | - |
258
+ | `range` | number | No | 10 |
259
+
260
+ **Response (200):**
261
+ ```json
262
+ {
263
+ "entries": [
264
+ { "position": "number", "username": "string", "score": "number" }
265
+ ]
266
+ }
267
+ ```
268
+
269
+ ---
270
+
271
+ ## Cloud Save
272
+
273
+ ### POST /api/v1/app/cloud-save/save
274
+
275
+ Save data to the cloud (JSON mode).
276
+
277
+ **Request:**
278
+ ```json
279
+ {
280
+ "userId": "string",
281
+ "saveData": "string (JSON)"
282
+ }
283
+ ```
284
+
285
+ **Response (200):**
286
+ ```json
287
+ {
288
+ "success": true,
289
+ "dataSizeBytes": "number"
290
+ }
291
+ ```
292
+
293
+ **Binary mode:** `POST /api/v1/app/cloud-save/save?userId={userId}` with `Content-Type: application/octet-stream`.
294
+
295
+ **Status Codes:** `200` success, `403` exceeds tier size limit.
296
+
297
+ **Tier limits:** FREE=1KB, BASIC=5KB, PRO=20KB, ENTERPRISE=250KB.
298
+
299
+ ---
300
+
301
+ ### POST /api/v1/app/cloud-save/load
302
+
303
+ Load data from the cloud (JSON mode).
304
+
305
+ **Request:**
306
+ ```json
307
+ {
308
+ "userId": "string"
309
+ }
310
+ ```
311
+
312
+ **Response (200):**
313
+ ```json
314
+ {
315
+ "found": "boolean",
316
+ "saveData": "string | null"
317
+ }
318
+ ```
319
+
320
+ **Binary mode:** `GET /api/v1/app/cloud-save/load?userId={userId}` with `Accept: application/octet-stream`.
321
+
322
+ ---
323
+
324
+ ## Remote Config
325
+
326
+ ### GET /api/v1/app/remote-config/{configKey}
327
+
328
+ Get a single configuration value.
329
+
330
+ | Param | Type | Required |
331
+ |-------|------|----------|
332
+ | `configKey` | string (path) | Yes |
333
+
334
+ **Response (200):**
335
+ ```json
336
+ {
337
+ "configKey": "string",
338
+ "configValue": "string | null",
339
+ "found": "boolean"
340
+ }
341
+ ```
342
+
343
+ ---
344
+
345
+ ### GET /api/v1/app/remote-config/all
346
+
347
+ Get all configuration values.
348
+
349
+ **Response (200):**
350
+ ```json
351
+ {
352
+ "configs": { "key": "value" },
353
+ "total": "number"
354
+ }
355
+ ```
356
+
357
+ ---
358
+
359
+ ## News
360
+
361
+ ### GET /api/v1/app/news?limit={limit}&languageCode={languageCode}
362
+
363
+ Get news entries.
364
+
365
+ | Param | Type | Required | Default |
366
+ |-------|------|----------|---------|
367
+ | `limit` | number | No | 20 (max 100) |
368
+ | `languageCode` | string | No | all languages |
369
+
370
+ **Response (200):**
371
+ ```json
372
+ [
373
+ {
374
+ "id": "string",
375
+ "title": "string",
376
+ "message": "string",
377
+ "releaseDate": "ISO 8601 datetime",
378
+ "languageCode": "string"
379
+ }
380
+ ]
381
+ ```
382
+
383
+ ---
384
+
385
+ ## Gift Codes
386
+
387
+ ### POST /api/v1/app/gift-codes/validate
388
+
389
+ Validate a gift code without redeeming it.
390
+
391
+ **Request:**
392
+ ```json
393
+ {
394
+ "code": "string",
395
+ "userId": "string"
396
+ }
397
+ ```
398
+
399
+ **Response (200):**
400
+ ```json
401
+ {
402
+ "valid": "boolean"
403
+ }
404
+ ```
405
+
406
+ ---
407
+
408
+ ### POST /api/v1/app/gift-codes/redeem
409
+
410
+ Redeem a gift code.
411
+
412
+ **Request:**
413
+ ```json
414
+ {
415
+ "code": "string",
416
+ "userId": "string"
417
+ }
418
+ ```
419
+
420
+ **Response (200):**
421
+ ```json
422
+ {
423
+ "success": "boolean",
424
+ "message": "string",
425
+ "giftData": "string (JSON) | null"
426
+ }
427
+ ```
428
+
429
+ ---
430
+
431
+ ## User Feedback
432
+
433
+ ### POST /api/v1/app/user-feedback/submit
434
+
435
+ Submit user feedback.
436
+
437
+ **Request:**
438
+ ```json
439
+ {
440
+ "title": "string (1-100 chars)",
441
+ "message": "string (1-2048 chars)",
442
+ "userId": "string",
443
+ "email": "string (optional)",
444
+ "category": "BUG | FEATURE | GENERAL (optional)",
445
+ "deviceInfo": "string (optional, max 500 chars)"
446
+ }
447
+ ```
448
+
449
+ **Response (200):**
450
+ ```
451
+ "ok"
452
+ ```
453
+
454
+ ---
455
+
456
+ ## User Logs
457
+
458
+ ### POST /api/v1/app/user-logs/create
459
+
460
+ Create a user log entry. **Requires BASIC tier or higher.**
461
+
462
+ **Request:**
463
+ ```json
464
+ {
465
+ "message": "string (max 1000 chars)",
466
+ "type": "INFO | WARN | ERROR",
467
+ "userId": "string",
468
+ "errorCode": "string (optional, max 50 chars)"
469
+ }
470
+ ```
471
+
472
+ **Response (200):**
473
+ ```json
474
+ {
475
+ "id": "string",
476
+ "createdAt": "ISO 8601 datetime"
477
+ }
478
+ ```
479
+
480
+ **Status Codes:** `200` success, `403` FREE tier (not available).
481
+
482
+ ---
483
+
484
+ ## Common Status Codes (All Endpoints)
485
+
486
+ | Code | Meaning |
487
+ |------|---------|
488
+ | 200 | Success |
489
+ | 400 | Bad Request (missing/invalid parameters) |
490
+ | 401 | Unauthorized (invalid API key) |
491
+ | 403 | Forbidden (tier restriction or not verified) |
492
+ | 404 | Not Found |
493
+ | 409 | Conflict (duplicate) |
494
+ | 429 | Too Many Requests (rate limited) |
495
+ | 500 | Internal Server Error |