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.
- package/README.md +351 -0
- package/dist/core/api-client.d.ts +131 -0
- package/dist/core/api-client.d.ts.map +1 -0
- package/dist/core/api-client.js +796 -0
- package/dist/core/api-client.js.map +1 -0
- package/dist/core/config.d.ts +11 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +37 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/constants.d.ts +51 -0
- package/dist/core/constants.d.ts.map +1 -0
- package/dist/core/constants.js +57 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +26 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/types/Action.d.ts +13 -0
- package/dist/core/types/Action.d.ts.map +1 -0
- package/dist/core/types/Action.js +3 -0
- package/dist/core/types/Action.js.map +1 -0
- package/dist/core/types/Aggregate.d.ts +11 -0
- package/dist/core/types/Aggregate.d.ts.map +1 -0
- package/dist/core/types/Aggregate.js +3 -0
- package/dist/core/types/Aggregate.js.map +1 -0
- package/dist/core/types/AiKnowledge.d.ts +10 -0
- package/dist/core/types/AiKnowledge.d.ts.map +1 -0
- package/dist/core/types/AiKnowledge.js +3 -0
- package/dist/core/types/AiKnowledge.js.map +1 -0
- package/dist/core/types/AuthModule.d.ts +12 -0
- package/dist/core/types/AuthModule.d.ts.map +1 -0
- package/dist/core/types/AuthModule.js +3 -0
- package/dist/core/types/AuthModule.js.map +1 -0
- package/dist/core/types/Challenge.d.ts +26 -0
- package/dist/core/types/Challenge.d.ts.map +1 -0
- package/dist/core/types/Challenge.js +3 -0
- package/dist/core/types/Challenge.js.map +1 -0
- package/dist/core/types/ChallengeAggregate.d.ts +13 -0
- package/dist/core/types/ChallengeAggregate.d.ts.map +1 -0
- package/dist/core/types/ChallengeAggregate.js +3 -0
- package/dist/core/types/ChallengeAggregate.js.map +1 -0
- package/dist/core/types/CustomPage.d.ts +15 -0
- package/dist/core/types/CustomPage.d.ts.map +1 -0
- package/dist/core/types/CustomPage.js +3 -0
- package/dist/core/types/CustomPage.js.map +1 -0
- package/dist/core/types/Leaderboard.d.ts +33 -0
- package/dist/core/types/Leaderboard.d.ts.map +1 -0
- package/dist/core/types/Leaderboard.js +3 -0
- package/dist/core/types/Leaderboard.js.map +1 -0
- package/dist/core/types/Level.d.ts +17 -0
- package/dist/core/types/Level.d.ts.map +1 -0
- package/dist/core/types/Level.js +3 -0
- package/dist/core/types/Level.js.map +1 -0
- package/dist/core/types/Point.d.ts +8 -0
- package/dist/core/types/Point.d.ts.map +1 -0
- package/dist/core/types/Point.js +3 -0
- package/dist/core/types/Point.js.map +1 -0
- package/dist/core/types/PublicEndpoint.d.ts +14 -0
- package/dist/core/types/PublicEndpoint.d.ts.map +1 -0
- package/dist/core/types/PublicEndpoint.js +3 -0
- package/dist/core/types/PublicEndpoint.js.map +1 -0
- package/dist/core/types/Quiz.d.ts +33 -0
- package/dist/core/types/Quiz.d.ts.map +1 -0
- package/dist/core/types/Quiz.js +3 -0
- package/dist/core/types/Quiz.js.map +1 -0
- package/dist/core/types/Scheduler.d.ts +15 -0
- package/dist/core/types/Scheduler.d.ts.map +1 -0
- package/dist/core/types/Scheduler.js +3 -0
- package/dist/core/types/Scheduler.js.map +1 -0
- package/dist/core/types/Trigger.d.ts +14 -0
- package/dist/core/types/Trigger.d.ts.map +1 -0
- package/dist/core/types/Trigger.js +3 -0
- package/dist/core/types/Trigger.js.map +1 -0
- package/dist/core/types/VirtualGood.d.ts +21 -0
- package/dist/core/types/VirtualGood.d.ts.map +1 -0
- package/dist/core/types/VirtualGood.js +3 -0
- package/dist/core/types/VirtualGood.js.map +1 -0
- package/dist/core/types/Websocket.d.ts +10 -0
- package/dist/core/types/Websocket.d.ts.map +1 -0
- package/dist/core/types/Websocket.js +3 -0
- package/dist/core/types/Websocket.js.map +1 -0
- package/dist/core/types/Widget.d.ts +15 -0
- package/dist/core/types/Widget.d.ts.map +1 -0
- package/dist/core/types/Widget.js +3 -0
- package/dist/core/types/Widget.js.map +1 -0
- package/dist/core/types/index.d.ts +18 -0
- package/dist/core/types/index.d.ts.map +1 -0
- package/dist/core/types/index.js +34 -0
- package/dist/core/types/index.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/api-holder.d.ts +40 -0
- package/dist/mcp/api-holder.d.ts.map +1 -0
- package/dist/mcp/api-holder.js +72 -0
- package/dist/mcp/api-holder.js.map +1 -0
- package/dist/mcp/bundle.js +99 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +36 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/prompts/templates.d.ts +3 -0
- package/dist/mcp/prompts/templates.d.ts.map +1 -0
- package/dist/mcp/prompts/templates.js +83 -0
- package/dist/mcp/prompts/templates.js.map +1 -0
- package/dist/mcp/resources/documentation.d.ts +3 -0
- package/dist/mcp/resources/documentation.d.ts.map +1 -0
- package/dist/mcp/resources/documentation.js +79 -0
- package/dist/mcp/resources/documentation.js.map +1 -0
- package/dist/mcp/tools/_fetch-current.d.ts +3 -0
- package/dist/mcp/tools/_fetch-current.d.ts.map +1 -0
- package/dist/mcp/tools/_fetch-current.js +67 -0
- package/dist/mcp/tools/_fetch-current.js.map +1 -0
- package/dist/mcp/tools/_merge.d.ts +2 -0
- package/dist/mcp/tools/_merge.d.ts.map +1 -0
- package/dist/mcp/tools/_merge.js +7 -0
- package/dist/mcp/tools/_merge.js.map +1 -0
- package/dist/mcp/tools/connect.d.ts +4 -0
- package/dist/mcp/tools/connect.d.ts.map +1 -0
- package/dist/mcp/tools/connect.js +44 -0
- package/dist/mcp/tools/connect.js.map +1 -0
- package/dist/mcp/tools/database.d.ts +4 -0
- package/dist/mcp/tools/database.d.ts.map +1 -0
- package/dist/mcp/tools/database.js +189 -0
- package/dist/mcp/tools/database.js.map +1 -0
- package/dist/mcp/tools/delete.d.ts +4 -0
- package/dist/mcp/tools/delete.d.ts.map +1 -0
- package/dist/mcp/tools/delete.js +97 -0
- package/dist/mcp/tools/delete.js.map +1 -0
- package/dist/mcp/tools/execute.d.ts +4 -0
- package/dist/mcp/tools/execute.d.ts.map +1 -0
- package/dist/mcp/tools/execute.js +84 -0
- package/dist/mcp/tools/execute.js.map +1 -0
- package/dist/mcp/tools/get.d.ts +4 -0
- package/dist/mcp/tools/get.d.ts.map +1 -0
- package/dist/mcp/tools/get.js +123 -0
- package/dist/mcp/tools/get.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +4 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +22 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/list.d.ts +4 -0
- package/dist/mcp/tools/list.d.ts.map +1 -0
- package/dist/mcp/tools/list.js +261 -0
- package/dist/mcp/tools/list.js.map +1 -0
- package/dist/mcp/tools/logs.d.ts +4 -0
- package/dist/mcp/tools/logs.d.ts.map +1 -0
- package/dist/mcp/tools/logs.js +50 -0
- package/dist/mcp/tools/logs.js.map +1 -0
- package/dist/mcp/tools/save.d.ts +4 -0
- package/dist/mcp/tools/save.d.ts.map +1 -0
- package/dist/mcp/tools/save.js +106 -0
- package/dist/mcp/tools/save.js.map +1 -0
- package/dist/mcp/tools/save.test.d.ts +2 -0
- package/dist/mcp/tools/save.test.d.ts.map +1 -0
- package/dist/mcp/tools/save.test.js +198 -0
- package/dist/mcp/tools/save.test.js.map +1 -0
- package/package.json +65 -0
- package/skills/funifier-create-action/SKILL.md +86 -0
- package/skills/funifier-create-aggregate/SKILL.md +87 -0
- package/skills/funifier-create-challenge/SKILL.md +87 -0
- package/skills/funifier-create-custom-page/SKILL.md +87 -0
- package/skills/funifier-create-leaderboard/SKILL.md +87 -0
- package/skills/funifier-create-level/SKILL.md +86 -0
- package/skills/funifier-create-point/SKILL.md +86 -0
- package/skills/funifier-create-quiz/SKILL.md +86 -0
- package/skills/funifier-create-scheduler/SKILL.md +87 -0
- package/skills/funifier-create-trigger/SKILL.md +88 -0
- package/skills/funifier-create-virtual-good/SKILL.md +86 -0
- package/skills/funifier-debug/SKILL.md +90 -0
- package/skills/funifier-help/SKILL.md +85 -0
- package/skills/funifier-implement-frontend/SKILL.md +89 -0
- 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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"VirtualGood.js","sourceRoot":"","sources":["../../../src/core/types/VirtualGood.ts"],"names":[],"mappings":""}
|
|
@@ -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 @@
|
|
|
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 @@
|
|
|
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"}
|
package/dist/index.d.ts
ADDED
|
@@ -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"}
|