funifier-mcp 0.1.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 (174) hide show
  1. package/README.md +351 -0
  2. package/dist/core/api-client.d.ts +131 -0
  3. package/dist/core/api-client.d.ts.map +1 -0
  4. package/dist/core/api-client.js +796 -0
  5. package/dist/core/api-client.js.map +1 -0
  6. package/dist/core/config.d.ts +11 -0
  7. package/dist/core/config.d.ts.map +1 -0
  8. package/dist/core/config.js +37 -0
  9. package/dist/core/config.js.map +1 -0
  10. package/dist/core/constants.d.ts +51 -0
  11. package/dist/core/constants.d.ts.map +1 -0
  12. package/dist/core/constants.js +57 -0
  13. package/dist/core/constants.js.map +1 -0
  14. package/dist/core/index.d.ts +7 -0
  15. package/dist/core/index.d.ts.map +1 -0
  16. package/dist/core/index.js +26 -0
  17. package/dist/core/index.js.map +1 -0
  18. package/dist/core/types/Action.d.ts +13 -0
  19. package/dist/core/types/Action.d.ts.map +1 -0
  20. package/dist/core/types/Action.js +3 -0
  21. package/dist/core/types/Action.js.map +1 -0
  22. package/dist/core/types/Aggregate.d.ts +11 -0
  23. package/dist/core/types/Aggregate.d.ts.map +1 -0
  24. package/dist/core/types/Aggregate.js +3 -0
  25. package/dist/core/types/Aggregate.js.map +1 -0
  26. package/dist/core/types/AiKnowledge.d.ts +10 -0
  27. package/dist/core/types/AiKnowledge.d.ts.map +1 -0
  28. package/dist/core/types/AiKnowledge.js +3 -0
  29. package/dist/core/types/AiKnowledge.js.map +1 -0
  30. package/dist/core/types/AuthModule.d.ts +12 -0
  31. package/dist/core/types/AuthModule.d.ts.map +1 -0
  32. package/dist/core/types/AuthModule.js +3 -0
  33. package/dist/core/types/AuthModule.js.map +1 -0
  34. package/dist/core/types/Challenge.d.ts +26 -0
  35. package/dist/core/types/Challenge.d.ts.map +1 -0
  36. package/dist/core/types/Challenge.js +3 -0
  37. package/dist/core/types/Challenge.js.map +1 -0
  38. package/dist/core/types/ChallengeAggregate.d.ts +13 -0
  39. package/dist/core/types/ChallengeAggregate.d.ts.map +1 -0
  40. package/dist/core/types/ChallengeAggregate.js +3 -0
  41. package/dist/core/types/ChallengeAggregate.js.map +1 -0
  42. package/dist/core/types/CustomPage.d.ts +15 -0
  43. package/dist/core/types/CustomPage.d.ts.map +1 -0
  44. package/dist/core/types/CustomPage.js +3 -0
  45. package/dist/core/types/CustomPage.js.map +1 -0
  46. package/dist/core/types/Leaderboard.d.ts +33 -0
  47. package/dist/core/types/Leaderboard.d.ts.map +1 -0
  48. package/dist/core/types/Leaderboard.js +3 -0
  49. package/dist/core/types/Leaderboard.js.map +1 -0
  50. package/dist/core/types/Level.d.ts +17 -0
  51. package/dist/core/types/Level.d.ts.map +1 -0
  52. package/dist/core/types/Level.js +3 -0
  53. package/dist/core/types/Level.js.map +1 -0
  54. package/dist/core/types/Point.d.ts +8 -0
  55. package/dist/core/types/Point.d.ts.map +1 -0
  56. package/dist/core/types/Point.js +3 -0
  57. package/dist/core/types/Point.js.map +1 -0
  58. package/dist/core/types/PublicEndpoint.d.ts +14 -0
  59. package/dist/core/types/PublicEndpoint.d.ts.map +1 -0
  60. package/dist/core/types/PublicEndpoint.js +3 -0
  61. package/dist/core/types/PublicEndpoint.js.map +1 -0
  62. package/dist/core/types/Quiz.d.ts +33 -0
  63. package/dist/core/types/Quiz.d.ts.map +1 -0
  64. package/dist/core/types/Quiz.js +3 -0
  65. package/dist/core/types/Quiz.js.map +1 -0
  66. package/dist/core/types/Scheduler.d.ts +15 -0
  67. package/dist/core/types/Scheduler.d.ts.map +1 -0
  68. package/dist/core/types/Scheduler.js +3 -0
  69. package/dist/core/types/Scheduler.js.map +1 -0
  70. package/dist/core/types/Trigger.d.ts +14 -0
  71. package/dist/core/types/Trigger.d.ts.map +1 -0
  72. package/dist/core/types/Trigger.js +3 -0
  73. package/dist/core/types/Trigger.js.map +1 -0
  74. package/dist/core/types/VirtualGood.d.ts +21 -0
  75. package/dist/core/types/VirtualGood.d.ts.map +1 -0
  76. package/dist/core/types/VirtualGood.js +3 -0
  77. package/dist/core/types/VirtualGood.js.map +1 -0
  78. package/dist/core/types/Websocket.d.ts +10 -0
  79. package/dist/core/types/Websocket.d.ts.map +1 -0
  80. package/dist/core/types/Websocket.js +3 -0
  81. package/dist/core/types/Websocket.js.map +1 -0
  82. package/dist/core/types/Widget.d.ts +15 -0
  83. package/dist/core/types/Widget.d.ts.map +1 -0
  84. package/dist/core/types/Widget.js +3 -0
  85. package/dist/core/types/Widget.js.map +1 -0
  86. package/dist/core/types/index.d.ts +18 -0
  87. package/dist/core/types/index.d.ts.map +1 -0
  88. package/dist/core/types/index.js +34 -0
  89. package/dist/core/types/index.js.map +1 -0
  90. package/dist/index.d.ts +7 -0
  91. package/dist/index.d.ts.map +1 -0
  92. package/dist/index.js +27 -0
  93. package/dist/index.js.map +1 -0
  94. package/dist/mcp/api-holder.d.ts +40 -0
  95. package/dist/mcp/api-holder.d.ts.map +1 -0
  96. package/dist/mcp/api-holder.js +72 -0
  97. package/dist/mcp/api-holder.js.map +1 -0
  98. package/dist/mcp/bundle.js +99 -0
  99. package/dist/mcp/index.d.ts +3 -0
  100. package/dist/mcp/index.d.ts.map +1 -0
  101. package/dist/mcp/index.js +36 -0
  102. package/dist/mcp/index.js.map +1 -0
  103. package/dist/mcp/prompts/templates.d.ts +3 -0
  104. package/dist/mcp/prompts/templates.d.ts.map +1 -0
  105. package/dist/mcp/prompts/templates.js +83 -0
  106. package/dist/mcp/prompts/templates.js.map +1 -0
  107. package/dist/mcp/resources/documentation.d.ts +3 -0
  108. package/dist/mcp/resources/documentation.d.ts.map +1 -0
  109. package/dist/mcp/resources/documentation.js +79 -0
  110. package/dist/mcp/resources/documentation.js.map +1 -0
  111. package/dist/mcp/tools/_fetch-current.d.ts +3 -0
  112. package/dist/mcp/tools/_fetch-current.d.ts.map +1 -0
  113. package/dist/mcp/tools/_fetch-current.js +67 -0
  114. package/dist/mcp/tools/_fetch-current.js.map +1 -0
  115. package/dist/mcp/tools/_merge.d.ts +2 -0
  116. package/dist/mcp/tools/_merge.d.ts.map +1 -0
  117. package/dist/mcp/tools/_merge.js +7 -0
  118. package/dist/mcp/tools/_merge.js.map +1 -0
  119. package/dist/mcp/tools/connect.d.ts +4 -0
  120. package/dist/mcp/tools/connect.d.ts.map +1 -0
  121. package/dist/mcp/tools/connect.js +44 -0
  122. package/dist/mcp/tools/connect.js.map +1 -0
  123. package/dist/mcp/tools/database.d.ts +4 -0
  124. package/dist/mcp/tools/database.d.ts.map +1 -0
  125. package/dist/mcp/tools/database.js +189 -0
  126. package/dist/mcp/tools/database.js.map +1 -0
  127. package/dist/mcp/tools/delete.d.ts +4 -0
  128. package/dist/mcp/tools/delete.d.ts.map +1 -0
  129. package/dist/mcp/tools/delete.js +97 -0
  130. package/dist/mcp/tools/delete.js.map +1 -0
  131. package/dist/mcp/tools/execute.d.ts +4 -0
  132. package/dist/mcp/tools/execute.d.ts.map +1 -0
  133. package/dist/mcp/tools/execute.js +84 -0
  134. package/dist/mcp/tools/execute.js.map +1 -0
  135. package/dist/mcp/tools/get.d.ts +4 -0
  136. package/dist/mcp/tools/get.d.ts.map +1 -0
  137. package/dist/mcp/tools/get.js +123 -0
  138. package/dist/mcp/tools/get.js.map +1 -0
  139. package/dist/mcp/tools/index.d.ts +4 -0
  140. package/dist/mcp/tools/index.d.ts.map +1 -0
  141. package/dist/mcp/tools/index.js +22 -0
  142. package/dist/mcp/tools/index.js.map +1 -0
  143. package/dist/mcp/tools/list.d.ts +4 -0
  144. package/dist/mcp/tools/list.d.ts.map +1 -0
  145. package/dist/mcp/tools/list.js +261 -0
  146. package/dist/mcp/tools/list.js.map +1 -0
  147. package/dist/mcp/tools/logs.d.ts +4 -0
  148. package/dist/mcp/tools/logs.d.ts.map +1 -0
  149. package/dist/mcp/tools/logs.js +50 -0
  150. package/dist/mcp/tools/logs.js.map +1 -0
  151. package/dist/mcp/tools/save.d.ts +4 -0
  152. package/dist/mcp/tools/save.d.ts.map +1 -0
  153. package/dist/mcp/tools/save.js +106 -0
  154. package/dist/mcp/tools/save.js.map +1 -0
  155. package/dist/mcp/tools/save.test.d.ts +2 -0
  156. package/dist/mcp/tools/save.test.d.ts.map +1 -0
  157. package/dist/mcp/tools/save.test.js +198 -0
  158. package/dist/mcp/tools/save.test.js.map +1 -0
  159. package/package.json +65 -0
  160. package/skills/funifier-create-action/SKILL.md +86 -0
  161. package/skills/funifier-create-aggregate/SKILL.md +87 -0
  162. package/skills/funifier-create-challenge/SKILL.md +87 -0
  163. package/skills/funifier-create-custom-page/SKILL.md +87 -0
  164. package/skills/funifier-create-leaderboard/SKILL.md +87 -0
  165. package/skills/funifier-create-level/SKILL.md +86 -0
  166. package/skills/funifier-create-point/SKILL.md +86 -0
  167. package/skills/funifier-create-quiz/SKILL.md +86 -0
  168. package/skills/funifier-create-scheduler/SKILL.md +87 -0
  169. package/skills/funifier-create-trigger/SKILL.md +88 -0
  170. package/skills/funifier-create-virtual-good/SKILL.md +86 -0
  171. package/skills/funifier-debug/SKILL.md +90 -0
  172. package/skills/funifier-help/SKILL.md +85 -0
  173. package/skills/funifier-implement-frontend/SKILL.md +89 -0
  174. package/skills/funifier-index/SKILL.md +50 -0
@@ -0,0 +1,33 @@
1
+ export interface QuizChoice {
2
+ answer: string;
3
+ label: string;
4
+ grade: number;
5
+ extra?: Record<string, any>;
6
+ gradePercent?: number;
7
+ gradeCheck?: boolean;
8
+ }
9
+ export interface Question {
10
+ _id?: string;
11
+ quiz: string;
12
+ type: string;
13
+ title: string;
14
+ question: string;
15
+ grade: number;
16
+ choices: QuizChoice[];
17
+ select?: string;
18
+ shuffle?: boolean;
19
+ i18n?: Record<string, any>;
20
+ }
21
+ export interface Quiz {
22
+ _id: string;
23
+ title: string;
24
+ description?: string;
25
+ grade: number;
26
+ shuffle?: boolean;
27
+ showGradeBeforeFinish?: boolean;
28
+ questionNumbering?: string;
29
+ feedbacks?: any[];
30
+ extra?: Record<string, any>;
31
+ i18n?: Record<string, any>;
32
+ }
33
+ //# sourceMappingURL=Quiz.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Quiz.d.ts","sourceRoot":"","sources":["../../../src/core/types/Quiz.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,IAAI;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Quiz.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Quiz.js","sourceRoot":"","sources":["../../../src/core/types/Quiz.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export interface Scheduler {
2
+ _id: string;
3
+ name: string;
4
+ cron: string;
5
+ script: string;
6
+ timezone: string;
7
+ active: boolean;
8
+ timeout: number;
9
+ extra: Record<string, any>;
10
+ creation: number;
11
+ updated: number;
12
+ status?: string;
13
+ message?: string;
14
+ }
15
+ //# sourceMappingURL=Scheduler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scheduler.d.ts","sourceRoot":"","sources":["../../../src/core/types/Scheduler.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Scheduler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Scheduler.js","sourceRoot":"","sources":["../../../src/core/types/Scheduler.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export interface Trigger {
2
+ _id: string;
3
+ creation: number;
4
+ entity: string;
5
+ event: string;
6
+ name: string;
7
+ description?: string;
8
+ script: string;
9
+ timeout?: number;
10
+ updated: number;
11
+ status?: string;
12
+ message?: string;
13
+ }
14
+ //# sourceMappingURL=Trigger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Trigger.d.ts","sourceRoot":"","sources":["../../../src/core/types/Trigger.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Trigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Trigger.js","sourceRoot":"","sources":["../../../src/core/types/Trigger.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ export interface VirtualGoodCatalog {
2
+ _id: string;
3
+ catalog: string;
4
+ extra?: Record<string, any>;
5
+ i18n?: Record<string, any>;
6
+ }
7
+ export interface VirtualGoodItem {
8
+ _id: string;
9
+ catalogId: string;
10
+ name: string;
11
+ description?: string;
12
+ amount: number;
13
+ active: boolean;
14
+ requires?: any[];
15
+ rewards?: any[];
16
+ notifications?: any[];
17
+ extra?: Record<string, any>;
18
+ techniques?: string[];
19
+ i18n?: Record<string, any>;
20
+ }
21
+ //# sourceMappingURL=VirtualGood.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VirtualGood.d.ts","sourceRoot":"","sources":["../../../src/core/types/VirtualGood.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAChB,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=VirtualGood.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VirtualGood.js","sourceRoot":"","sources":["../../../src/core/types/VirtualGood.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export interface Websocket {
2
+ _id: string;
3
+ title: string;
4
+ description?: string;
5
+ script: string;
6
+ updated?: number;
7
+ status?: string;
8
+ message?: string;
9
+ }
10
+ //# sourceMappingURL=Websocket.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Websocket.d.ts","sourceRoot":"","sources":["../../../src/core/types/Websocket.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Websocket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Websocket.js","sourceRoot":"","sources":["../../../src/core/types/Websocket.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ export interface Widget {
2
+ _id: string;
3
+ created: number;
4
+ updated: number;
5
+ title: string;
6
+ i18n: string;
7
+ html: string;
8
+ css: string;
9
+ script: string;
10
+ resources: string[];
11
+ extra: unknown;
12
+ description: string;
13
+ techniques: string[];
14
+ }
15
+ //# sourceMappingURL=Widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Widget.d.ts","sourceRoot":"","sources":["../../../src/core/types/Widget.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Widget.js","sourceRoot":"","sources":["../../../src/core/types/Widget.ts"],"names":[],"mappings":""}
@@ -0,0 +1,18 @@
1
+ export * from "./Action";
2
+ export * from "./AiKnowledge";
3
+ export * from "./Aggregate";
4
+ export * from "./AuthModule";
5
+ export * from "./Challenge";
6
+ export * from "./ChallengeAggregate";
7
+ export * from "./CustomPage";
8
+ export * from "./Leaderboard";
9
+ export * from "./Level";
10
+ export * from "./Point";
11
+ export * from "./PublicEndpoint";
12
+ export * from "./Quiz";
13
+ export * from "./Scheduler";
14
+ export * from "./Trigger";
15
+ export * from "./VirtualGood";
16
+ export * from "./Websocket";
17
+ export * from "./Widget";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Action"), exports);
18
+ __exportStar(require("./AiKnowledge"), exports);
19
+ __exportStar(require("./Aggregate"), exports);
20
+ __exportStar(require("./AuthModule"), exports);
21
+ __exportStar(require("./Challenge"), exports);
22
+ __exportStar(require("./ChallengeAggregate"), exports);
23
+ __exportStar(require("./CustomPage"), exports);
24
+ __exportStar(require("./Leaderboard"), exports);
25
+ __exportStar(require("./Level"), exports);
26
+ __exportStar(require("./Point"), exports);
27
+ __exportStar(require("./PublicEndpoint"), exports);
28
+ __exportStar(require("./Quiz"), exports);
29
+ __exportStar(require("./Scheduler"), exports);
30
+ __exportStar(require("./Trigger"), exports);
31
+ __exportStar(require("./VirtualGood"), exports);
32
+ __exportStar(require("./Websocket"), exports);
33
+ __exportStar(require("./Widget"), exports);
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,gDAA8B;AAC9B,8CAA4B;AAC5B,+CAA6B;AAC7B,8CAA4B;AAC5B,uDAAqC;AACrC,+CAA6B;AAC7B,gDAA8B;AAC9B,0CAAwB;AACxB,0CAAwB;AACxB,mDAAiC;AACjC,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,gDAA8B;AAC9B,8CAA4B;AAC5B,2CAAyB"}
@@ -0,0 +1,7 @@
1
+ export { createAPIClient } from "./core/api-client";
2
+ export type { FunifierAPIClient } from "./core/api-client";
3
+ export { resolveConfig } from "./core/config";
4
+ export type { FunifierConfig } from "./core/config";
5
+ export { API, Endpoints } from "./core/constants";
6
+ export * from "./core/types";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,cAAc,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Endpoints = exports.API = exports.resolveConfig = exports.createAPIClient = void 0;
18
+ // Public API — use this when importing @funifier-ai as a library
19
+ var api_client_1 = require("./core/api-client");
20
+ Object.defineProperty(exports, "createAPIClient", { enumerable: true, get: function () { return api_client_1.createAPIClient; } });
21
+ var config_1 = require("./core/config");
22
+ Object.defineProperty(exports, "resolveConfig", { enumerable: true, get: function () { return config_1.resolveConfig; } });
23
+ var constants_1 = require("./core/constants");
24
+ Object.defineProperty(exports, "API", { enumerable: true, get: function () { return constants_1.API; } });
25
+ Object.defineProperty(exports, "Endpoints", { enumerable: true, get: function () { return constants_1.Endpoints; } });
26
+ __exportStar(require("./core/types"), exports);
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iEAAiE;AACjE,gDAAoD;AAA3C,6GAAA,eAAe,OAAA;AAExB,wCAA8C;AAArC,uGAAA,aAAa,OAAA;AAEtB,8CAAkD;AAAzC,gGAAA,GAAG,OAAA;AAAE,sGAAA,SAAS,OAAA;AACvB,+CAA6B"}
@@ -0,0 +1,40 @@
1
+ import type { FunifierAPIClient, FunifierConfig } from "../core";
2
+ /**
3
+ * Holds the current API client instance. Allows connecting, disconnecting,
4
+ * and switching between different Funifier gamification instances at runtime.
5
+ */
6
+ export declare class ApiHolder {
7
+ private client;
8
+ private currentConfig;
9
+ private connectionName;
10
+ /**
11
+ * Try to auto-connect from funifier.json or env vars.
12
+ * Returns true if connected, false if no config found (does NOT throw).
13
+ */
14
+ tryAutoConnect(): boolean;
15
+ /**
16
+ * Connect to a Funifier instance with the given credentials.
17
+ */
18
+ connect(config: FunifierConfig, name?: string): void;
19
+ /**
20
+ * Get the current API client. Returns null if not connected.
21
+ */
22
+ getClient(): FunifierAPIClient | null;
23
+ /**
24
+ * Get the current API client or throw a descriptive error.
25
+ */
26
+ requireClient(): FunifierAPIClient;
27
+ /**
28
+ * Get info about the current connection.
29
+ */
30
+ getConnectionInfo(): {
31
+ connected: boolean;
32
+ serverUrl: string | null;
33
+ name: string | null;
34
+ };
35
+ /**
36
+ * Disconnect from the current instance.
37
+ */
38
+ disconnect(): void;
39
+ }
40
+ //# sourceMappingURL=api-holder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-holder.d.ts","sourceRoot":"","sources":["../../src/mcp/api-holder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEjE;;;GAGG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,aAAa,CAA+B;IACpD,OAAO,CAAC,cAAc,CAAuB;IAE7C;;;OAGG;IACH,cAAc,IAAI,OAAO;IAUzB;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IAMpD;;OAEG;IACH,SAAS,IAAI,iBAAiB,GAAG,IAAI;IAIrC;;OAEG;IACH,aAAa,IAAI,iBAAiB;IASlC;;OAEG;IACH,iBAAiB,IAAI;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;IAQ1F;;OAEG;IACH,UAAU,IAAI,IAAI;CAKnB"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiHolder = void 0;
4
+ const core_1 = require("../core");
5
+ /**
6
+ * Holds the current API client instance. Allows connecting, disconnecting,
7
+ * and switching between different Funifier gamification instances at runtime.
8
+ */
9
+ class ApiHolder {
10
+ constructor() {
11
+ this.client = null;
12
+ this.currentConfig = null;
13
+ this.connectionName = null;
14
+ }
15
+ /**
16
+ * Try to auto-connect from funifier.json or env vars.
17
+ * Returns true if connected, false if no config found (does NOT throw).
18
+ */
19
+ tryAutoConnect() {
20
+ try {
21
+ const config = (0, core_1.resolveConfig)();
22
+ this.connect(config);
23
+ return true;
24
+ }
25
+ catch {
26
+ return false;
27
+ }
28
+ }
29
+ /**
30
+ * Connect to a Funifier instance with the given credentials.
31
+ */
32
+ connect(config, name) {
33
+ this.client = (0, core_1.createAPIClient)(config);
34
+ this.currentConfig = config;
35
+ this.connectionName = name || config.serverUrl;
36
+ }
37
+ /**
38
+ * Get the current API client. Returns null if not connected.
39
+ */
40
+ getClient() {
41
+ return this.client;
42
+ }
43
+ /**
44
+ * Get the current API client or throw a descriptive error.
45
+ */
46
+ requireClient() {
47
+ if (!this.client) {
48
+ throw new Error("Not connected to any Funifier instance. Use the funifier_connect tool first with your apiKey, secretKey, and serverUrl.");
49
+ }
50
+ return this.client;
51
+ }
52
+ /**
53
+ * Get info about the current connection.
54
+ */
55
+ getConnectionInfo() {
56
+ return {
57
+ connected: this.client !== null,
58
+ serverUrl: this.currentConfig?.serverUrl || null,
59
+ name: this.connectionName,
60
+ };
61
+ }
62
+ /**
63
+ * Disconnect from the current instance.
64
+ */
65
+ disconnect() {
66
+ this.client = null;
67
+ this.currentConfig = null;
68
+ this.connectionName = null;
69
+ }
70
+ }
71
+ exports.ApiHolder = ApiHolder;
72
+ //# sourceMappingURL=api-holder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-holder.js","sourceRoot":"","sources":["../../src/mcp/api-holder.ts"],"names":[],"mappings":";;;AAAA,kCAAyD;AAGzD;;;GAGG;AACH,MAAa,SAAS;IAAtB;QACU,WAAM,GAA6B,IAAI,CAAC;QACxC,kBAAa,GAA0B,IAAI,CAAC;QAC5C,mBAAc,GAAkB,IAAI,CAAC;IA+D/C,CAAC;IA7DC;;;OAGG;IACH,cAAc;QACZ,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAA,oBAAa,GAAE,CAAC;YAC/B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,MAAsB,EAAE,IAAa;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAA,sBAAe,EAAC,MAAM,CAAC,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;QAC5B,IAAI,CAAC,cAAc,GAAG,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,aAAa;QACX,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CACb,yHAAyH,CAC1H,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO;YACL,SAAS,EAAE,IAAI,CAAC,MAAM,KAAK,IAAI;YAC/B,SAAS,EAAE,IAAI,CAAC,aAAa,EAAE,SAAS,IAAI,IAAI;YAChD,IAAI,EAAE,IAAI,CAAC,cAAc;SAC1B,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,UAAU;QACR,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC7B,CAAC;CACF;AAlED,8BAkEC"}