mtmsdk 0.0.36 → 0.0.39

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 (243) hide show
  1. package/dist/api_hatchet/client/client.gen.d.ts.map +1 -1
  2. package/dist/api_hatchet/client/client.gen.js +8 -1
  3. package/dist/api_hatchet/client/client.gen.js.map +1 -1
  4. package/dist/api_hatchet/index.d.ts +2 -2
  5. package/dist/api_hatchet/index.d.ts.map +1 -1
  6. package/dist/api_hatchet/index.js +2 -2
  7. package/dist/api_hatchet/index.js.map +1 -1
  8. package/dist/api_hatchet/zod.gen.d.ts +3 -3
  9. package/dist/api_hatchet/zod.gen.js +53 -53
  10. package/dist/api_hatchet/zod.gen.js.map +1 -1
  11. package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts +73 -979
  12. package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts.map +1 -1
  13. package/dist/gomtmapi_v2/@tanstack/react-query.gen.js +208 -1000
  14. package/dist/gomtmapi_v2/@tanstack/react-query.gen.js.map +1 -1
  15. package/dist/gomtmapi_v2/client/client.gen.d.ts.map +1 -1
  16. package/dist/gomtmapi_v2/client/client.gen.js +8 -1
  17. package/dist/gomtmapi_v2/client/client.gen.js.map +1 -1
  18. package/dist/gomtmapi_v2/index.d.ts +2 -2
  19. package/dist/gomtmapi_v2/index.d.ts.map +1 -1
  20. package/dist/gomtmapi_v2/index.js +1 -1
  21. package/dist/gomtmapi_v2/index.js.map +1 -1
  22. package/dist/gomtmapi_v2/schemas.gen.d.ts +305 -1415
  23. package/dist/gomtmapi_v2/schemas.gen.d.ts.map +1 -1
  24. package/dist/gomtmapi_v2/schemas.gen.js +282 -1407
  25. package/dist/gomtmapi_v2/schemas.gen.js.map +1 -1
  26. package/dist/gomtmapi_v2/sdk.gen.d.ts +63 -513
  27. package/dist/gomtmapi_v2/sdk.gen.d.ts.map +1 -1
  28. package/dist/gomtmapi_v2/sdk.gen.js +94 -537
  29. package/dist/gomtmapi_v2/sdk.gen.js.map +1 -1
  30. package/dist/gomtmapi_v2/types.gen.d.ts +443 -1531
  31. package/dist/gomtmapi_v2/types.gen.d.ts.map +1 -1
  32. package/dist/gomtmapi_v2/zod.gen.d.ts +293 -1292
  33. package/dist/gomtmapi_v2/zod.gen.d.ts.map +1 -1
  34. package/dist/gomtmapi_v2/zod.gen.js +187 -793
  35. package/dist/gomtmapi_v2/zod.gen.js.map +1 -1
  36. package/dist/mtgate_api/@tanstack/react-query.gen.d.ts +4 -158
  37. package/dist/mtgate_api/@tanstack/react-query.gen.d.ts.map +1 -1
  38. package/dist/mtgate_api/@tanstack/react-query.gen.js +17 -212
  39. package/dist/mtgate_api/@tanstack/react-query.gen.js.map +1 -1
  40. package/dist/mtgate_api/client/client.gen.d.ts.map +1 -1
  41. package/dist/mtgate_api/client/client.gen.js +8 -1
  42. package/dist/mtgate_api/client/client.gen.js.map +1 -1
  43. package/dist/mtgate_api/index.d.ts +2 -2
  44. package/dist/mtgate_api/index.d.ts.map +1 -1
  45. package/dist/mtgate_api/index.js +1 -1
  46. package/dist/mtgate_api/index.js.map +1 -1
  47. package/dist/mtgate_api/schemas.gen.d.ts +0 -396
  48. package/dist/mtgate_api/schemas.gen.d.ts.map +1 -1
  49. package/dist/mtgate_api/schemas.gen.js +0 -439
  50. package/dist/mtgate_api/schemas.gen.js.map +1 -1
  51. package/dist/mtgate_api/sdk.gen.d.ts +1 -26
  52. package/dist/mtgate_api/sdk.gen.d.ts.map +1 -1
  53. package/dist/mtgate_api/sdk.gen.js +0 -67
  54. package/dist/mtgate_api/sdk.gen.js.map +1 -1
  55. package/dist/mtgate_api/types.gen.d.ts +0 -310
  56. package/dist/mtgate_api/types.gen.d.ts.map +1 -1
  57. package/dist/mtgate_api/zod.gen.d.ts +0 -771
  58. package/dist/mtgate_api/zod.gen.d.ts.map +1 -1
  59. package/dist/mtgate_api/zod.gen.js +0 -249
  60. package/dist/mtgate_api/zod.gen.js.map +1 -1
  61. package/dist/mtmai_api/client/client.gen.d.ts.map +1 -1
  62. package/dist/mtmai_api/client/client.gen.js +8 -1
  63. package/dist/mtmai_api/client/client.gen.js.map +1 -1
  64. package/dist/mtmai_api/index.d.ts +2 -2
  65. package/dist/mtmai_api/index.d.ts.map +1 -1
  66. package/dist/mtmai_api/index.js +2 -2
  67. package/dist/mtmai_api/index.js.map +1 -1
  68. package/dist/opencode/@tanstack/react-query.gen.d.ts +1903 -0
  69. package/dist/opencode/@tanstack/react-query.gen.d.ts.map +1 -0
  70. package/dist/opencode/@tanstack/react-query.gen.js +1696 -0
  71. package/dist/opencode/@tanstack/react-query.gen.js.map +1 -0
  72. package/dist/opencode/client/client.gen.d.ts +3 -0
  73. package/dist/opencode/client/client.gen.d.ts.map +1 -0
  74. package/dist/opencode/client/client.gen.js +236 -0
  75. package/dist/opencode/client/client.gen.js.map +1 -0
  76. package/dist/opencode/client/index.d.ts +9 -0
  77. package/dist/opencode/client/index.d.ts.map +1 -0
  78. package/dist/opencode/client/index.js +7 -0
  79. package/dist/opencode/client/index.js.map +1 -0
  80. package/dist/opencode/client/types.gen.d.ts +118 -0
  81. package/dist/opencode/client/types.gen.d.ts.map +1 -0
  82. package/dist/opencode/client/types.gen.js +3 -0
  83. package/dist/opencode/client/types.gen.js.map +1 -0
  84. package/dist/opencode/client/utils.gen.d.ts +34 -0
  85. package/dist/opencode/client/utils.gen.d.ts.map +1 -0
  86. package/dist/opencode/client/utils.gen.js +232 -0
  87. package/dist/opencode/client/utils.gen.js.map +1 -0
  88. package/dist/opencode/client.gen.d.ts +13 -0
  89. package/dist/opencode/client.gen.d.ts.map +1 -0
  90. package/dist/opencode/client.gen.js +4 -0
  91. package/dist/opencode/client.gen.js.map +1 -0
  92. package/dist/opencode/core/auth.gen.d.ts +19 -0
  93. package/dist/opencode/core/auth.gen.d.ts.map +1 -0
  94. package/dist/opencode/core/auth.gen.js +15 -0
  95. package/dist/opencode/core/auth.gen.js.map +1 -0
  96. package/dist/opencode/core/bodySerializer.gen.d.ts +26 -0
  97. package/dist/opencode/core/bodySerializer.gen.d.ts.map +1 -0
  98. package/dist/opencode/core/bodySerializer.gen.js +58 -0
  99. package/dist/opencode/core/bodySerializer.gen.js.map +1 -0
  100. package/dist/opencode/core/params.gen.d.ts +44 -0
  101. package/dist/opencode/core/params.gen.d.ts.map +1 -0
  102. package/dist/opencode/core/params.gen.js +101 -0
  103. package/dist/opencode/core/params.gen.js.map +1 -0
  104. package/dist/opencode/core/pathSerializer.gen.d.ts +34 -0
  105. package/dist/opencode/core/pathSerializer.gen.d.ts.map +1 -0
  106. package/dist/opencode/core/pathSerializer.gen.js +115 -0
  107. package/dist/opencode/core/pathSerializer.gen.js.map +1 -0
  108. package/dist/opencode/core/queryKeySerializer.gen.d.ts +19 -0
  109. package/dist/opencode/core/queryKeySerializer.gen.d.ts.map +1 -0
  110. package/dist/opencode/core/queryKeySerializer.gen.js +100 -0
  111. package/dist/opencode/core/queryKeySerializer.gen.js.map +1 -0
  112. package/dist/opencode/core/serverSentEvents.gen.d.ts +72 -0
  113. package/dist/opencode/core/serverSentEvents.gen.d.ts.map +1 -0
  114. package/dist/opencode/core/serverSentEvents.gen.js +138 -0
  115. package/dist/opencode/core/serverSentEvents.gen.js.map +1 -0
  116. package/dist/opencode/core/types.gen.d.ts +79 -0
  117. package/dist/opencode/core/types.gen.d.ts.map +1 -0
  118. package/dist/opencode/core/types.gen.js +3 -0
  119. package/dist/opencode/core/types.gen.js.map +1 -0
  120. package/dist/opencode/core/utils.gen.d.ts +20 -0
  121. package/dist/opencode/core/utils.gen.d.ts.map +1 -0
  122. package/dist/opencode/core/utils.gen.js +88 -0
  123. package/dist/opencode/core/utils.gen.js.map +1 -0
  124. package/dist/opencode/index.d.ts +3 -0
  125. package/dist/opencode/index.d.ts.map +1 -0
  126. package/dist/opencode/index.js +4 -0
  127. package/dist/opencode/index.js.map +1 -0
  128. package/dist/opencode/schemas.gen.d.ts +4823 -0
  129. package/dist/opencode/schemas.gen.d.ts.map +1 -0
  130. package/dist/opencode/schemas.gen.js +5816 -0
  131. package/dist/opencode/schemas.gen.js.map +1 -0
  132. package/dist/opencode/sdk.gen.d.ts +562 -0
  133. package/dist/opencode/sdk.gen.d.ts.map +1 -0
  134. package/dist/opencode/sdk.gen.js +766 -0
  135. package/dist/opencode/sdk.gen.js.map +1 -0
  136. package/dist/opencode/types.gen.d.ts +4213 -0
  137. package/dist/opencode/types.gen.d.ts.map +1 -0
  138. package/dist/opencode/types.gen.js +25 -0
  139. package/dist/opencode/types.gen.js.map +1 -0
  140. package/dist/opencode/zod.gen.d.ts +17243 -0
  141. package/dist/opencode/zod.gen.d.ts.map +1 -0
  142. package/dist/opencode/zod.gen.js +2876 -0
  143. package/dist/opencode/zod.gen.js.map +1 -0
  144. package/dist/sbapi/client/client.gen.d.ts.map +1 -1
  145. package/dist/sbapi/client/client.gen.js +8 -1
  146. package/dist/sbapi/client/client.gen.js.map +1 -1
  147. package/dist/sbapi/index.d.ts +2 -2
  148. package/dist/sbapi/index.d.ts.map +1 -1
  149. package/dist/sbapi/index.js +1 -1
  150. package/dist/sbapi/index.js.map +1 -1
  151. package/dist/sbmng/@tanstack/react-query.gen.d.ts +2418 -0
  152. package/dist/sbmng/@tanstack/react-query.gen.d.ts.map +1 -0
  153. package/dist/sbmng/@tanstack/react-query.gen.js +2657 -0
  154. package/dist/sbmng/@tanstack/react-query.gen.js.map +1 -0
  155. package/dist/sbmng/client/client.gen.d.ts +3 -0
  156. package/dist/sbmng/client/client.gen.d.ts.map +1 -0
  157. package/dist/sbmng/client/client.gen.js +236 -0
  158. package/dist/sbmng/client/client.gen.js.map +1 -0
  159. package/dist/sbmng/client/index.d.ts +9 -0
  160. package/dist/sbmng/client/index.d.ts.map +1 -0
  161. package/dist/sbmng/client/index.js +7 -0
  162. package/dist/sbmng/client/index.js.map +1 -0
  163. package/dist/sbmng/client/types.gen.d.ts +118 -0
  164. package/dist/sbmng/client/types.gen.d.ts.map +1 -0
  165. package/dist/sbmng/client/types.gen.js +3 -0
  166. package/dist/sbmng/client/types.gen.js.map +1 -0
  167. package/dist/sbmng/client/utils.gen.d.ts +34 -0
  168. package/dist/sbmng/client/utils.gen.d.ts.map +1 -0
  169. package/dist/sbmng/client/utils.gen.js +232 -0
  170. package/dist/sbmng/client/utils.gen.js.map +1 -0
  171. package/dist/sbmng/client.gen.d.ts +13 -0
  172. package/dist/sbmng/client.gen.d.ts.map +1 -0
  173. package/dist/sbmng/client.gen.js +4 -0
  174. package/dist/sbmng/client.gen.js.map +1 -0
  175. package/dist/sbmng/core/auth.gen.d.ts +19 -0
  176. package/dist/sbmng/core/auth.gen.d.ts.map +1 -0
  177. package/dist/sbmng/core/auth.gen.js +15 -0
  178. package/dist/sbmng/core/auth.gen.js.map +1 -0
  179. package/dist/sbmng/core/bodySerializer.gen.d.ts +26 -0
  180. package/dist/sbmng/core/bodySerializer.gen.d.ts.map +1 -0
  181. package/dist/sbmng/core/bodySerializer.gen.js +58 -0
  182. package/dist/sbmng/core/bodySerializer.gen.js.map +1 -0
  183. package/dist/sbmng/core/params.gen.d.ts +44 -0
  184. package/dist/sbmng/core/params.gen.d.ts.map +1 -0
  185. package/dist/sbmng/core/params.gen.js +101 -0
  186. package/dist/sbmng/core/params.gen.js.map +1 -0
  187. package/dist/sbmng/core/pathSerializer.gen.d.ts +34 -0
  188. package/dist/sbmng/core/pathSerializer.gen.d.ts.map +1 -0
  189. package/dist/sbmng/core/pathSerializer.gen.js +115 -0
  190. package/dist/sbmng/core/pathSerializer.gen.js.map +1 -0
  191. package/dist/sbmng/core/queryKeySerializer.gen.d.ts +19 -0
  192. package/dist/sbmng/core/queryKeySerializer.gen.d.ts.map +1 -0
  193. package/dist/sbmng/core/queryKeySerializer.gen.js +100 -0
  194. package/dist/sbmng/core/queryKeySerializer.gen.js.map +1 -0
  195. package/dist/sbmng/core/serverSentEvents.gen.d.ts +72 -0
  196. package/dist/sbmng/core/serverSentEvents.gen.d.ts.map +1 -0
  197. package/dist/sbmng/core/serverSentEvents.gen.js +138 -0
  198. package/dist/sbmng/core/serverSentEvents.gen.js.map +1 -0
  199. package/dist/sbmng/core/types.gen.d.ts +79 -0
  200. package/dist/sbmng/core/types.gen.d.ts.map +1 -0
  201. package/dist/sbmng/core/types.gen.js +3 -0
  202. package/dist/sbmng/core/types.gen.js.map +1 -0
  203. package/dist/sbmng/core/utils.gen.d.ts +20 -0
  204. package/dist/sbmng/core/utils.gen.d.ts.map +1 -0
  205. package/dist/sbmng/core/utils.gen.js +88 -0
  206. package/dist/sbmng/core/utils.gen.js.map +1 -0
  207. package/dist/sbmng/index.d.ts +3 -0
  208. package/dist/sbmng/index.d.ts.map +1 -0
  209. package/dist/sbmng/index.js +3 -0
  210. package/dist/sbmng/index.js.map +1 -0
  211. package/dist/sbmng/schemas.gen.d.ts +7220 -0
  212. package/dist/sbmng/schemas.gen.d.ts.map +1 -0
  213. package/dist/sbmng/schemas.gen.js +9392 -0
  214. package/dist/sbmng/schemas.gen.js.map +1 -0
  215. package/dist/sbmng/sdk.gen.d.ts +743 -0
  216. package/dist/sbmng/sdk.gen.d.ts.map +1 -0
  217. package/dist/sbmng/sdk.gen.js +1543 -0
  218. package/dist/sbmng/sdk.gen.js.map +1 -0
  219. package/dist/sbmng/types.gen.d.ts +7003 -0
  220. package/dist/sbmng/types.gen.d.ts.map +1 -0
  221. package/dist/sbmng/types.gen.js +3 -0
  222. package/dist/sbmng/types.gen.js.map +1 -0
  223. package/dist/supabase/context.d.ts +14 -0
  224. package/dist/supabase/context.d.ts.map +1 -0
  225. package/dist/supabase/context.js +33 -0
  226. package/dist/supabase/context.js.map +1 -0
  227. package/dist/supabase/supabase-client.d.ts +1625 -304
  228. package/dist/supabase/supabase-client.d.ts.map +1 -1
  229. package/dist/supabase/supabase.d.ts +3551 -909
  230. package/dist/supabase/supabase.d.ts.map +1 -1
  231. package/dist/supabase/supabase.js +1 -34
  232. package/dist/supabase/supabase.js.map +1 -1
  233. package/dist/types/database.types.d.ts +1656 -314
  234. package/dist/types/database.types.d.ts.map +1 -1
  235. package/dist/types/database.types.js +3 -1
  236. package/dist/types/database.types.js.map +1 -1
  237. package/dist/types/index.d.ts +30 -1
  238. package/dist/types/index.d.ts.map +1 -1
  239. package/package.json +45 -42
  240. package/dist/supabase/supabase-browser.d.ts +0 -4
  241. package/dist/supabase/supabase-browser.d.ts.map +0 -1
  242. package/dist/supabase/supabase-browser.js +0 -20
  243. package/dist/supabase/supabase-browser.js.map +0 -1
@@ -1,13 +1,13 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
- import { infiniteQueryOptions, queryOptions } from '@tanstack/react-query';
2
+ import { queryOptions } from '@tanstack/react-query';
3
3
  import { client } from '../client.gen';
4
- import { codeRun, langchatChatbotsDelete, langchatChatbotsGet, langchatChatbotsList, langchatChatbotsLogin, langchatChatbotsMessagesGet, langchatChatbotsMessagesList, langchatChatbotsRun, langchatChatbotsSessionsList, langchatChatbotsUpdate, langchatChatbotsUpsert, langchatPlatformTypes, napcatGetStatus, napcatProxyOneBot11Get, napcatProxyOneBot11Post, napcatProxyWebUiget, napcatProxyWebUipost, napcatStart, pAccountCreate, pAccountCreateBrowserConfig, pAccountCreateSession, pAccountDelete, pAccountDeleteSession, pAccountExport, pAccountGet, pAccountGetSession, pAccountImport, pAccountLaunchBrowser, pAccountList, pAccountListBrowserConfigs, pAccountListSessions, pAccountUpdate, pAccountUpdateSession, platformCreate, platformDelete, platformExport, platformGet, platformImport, platformList, platformUpdate, taskRun, userGetCurrent } from '../sdk.gen';
4
+ import { agentRun, browserAction, browserOpen, coddingToolEditFile, coddingToolListDir, coddingToolReadFiles, coddingToolSearchFiles, codeRun, computeAddNode, computeListNodes, computeRemoveNode, dbQueryExecuteQuery, humanRequestAction, napcatGetStatus, napcatProxyOneBot11Get, napcatProxyOneBot11Post, napcatProxyWebUiget, napcatProxyWebUipost, napcatStart, sandboxEnsure, sandboxListTasks, taskRun } from '../sdk.gen';
5
5
  /**
6
- * run code
6
+ * agent run
7
7
  *
8
8
  * #### Controller:
9
9
  *
10
- * `github.com/codeh007/gomtm/pkg/handlers/code.(*CodeService).RunCode`
10
+ * `github.com/codeh007/gomtm/pkg/routes/api/agent.(*AgentService).AgentRun`
11
11
  *
12
12
  * #### Middlewares:
13
13
  *
@@ -15,12 +15,12 @@ import { codeRun, langchatChatbotsDelete, langchatChatbotsGet, langchatChatbotsL
15
15
  *
16
16
  * ---
17
17
  *
18
- * run code
18
+ *
19
19
  */
20
- export const codeRunMutation = (options) => {
20
+ export const agentRunMutation = (options) => {
21
21
  const mutationOptions = {
22
22
  mutationFn: async (fnOptions) => {
23
- const { data } = await codeRun({
23
+ const { data } = await agentRun({
24
24
  ...options,
25
25
  ...fnOptions,
26
26
  throwOnError: true
@@ -30,75 +30,33 @@ export const codeRunMutation = (options) => {
30
30
  };
31
31
  return mutationOptions;
32
32
  };
33
- const createQueryKey = (id, options, infinite, tags) => {
34
- const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
35
- if (infinite) {
36
- params._infinite = infinite;
37
- }
38
- if (tags) {
39
- params.tags = tags;
40
- }
41
- if (options?.body) {
42
- params.body = options.body;
43
- }
44
- if (options?.headers) {
45
- params.headers = options.headers;
46
- }
47
- if (options?.path) {
48
- params.path = options.path;
49
- }
50
- if (options?.query) {
51
- params.query = options.query;
52
- }
53
- return [params];
54
- };
55
- export const langchatChatbotsListQueryKey = (options) => createQueryKey('langchatChatbotsList', options);
56
33
  /**
57
- * List chatbots
58
- *
59
- * #### Controller:
60
- *
61
- * `github.com/codeh007/gomtm/pkg/handlers/langchat.(*LangchatService).listChatbots`
62
- *
63
- * #### Middlewares:
34
+ * handle action submit
64
35
  *
65
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
66
- *
67
- * ---
68
- *
69
- * Get a paginated list of chatbots for the current tenant
36
+ * Submit a browser interaction task.
70
37
  */
71
- export const langchatChatbotsListOptions = (options) => queryOptions({
72
- queryFn: async ({ queryKey, signal }) => {
73
- const { data } = await langchatChatbotsList({
74
- ...options,
75
- ...queryKey[0],
76
- signal,
77
- throwOnError: true
78
- });
79
- return data;
80
- },
81
- queryKey: langchatChatbotsListQueryKey(options)
82
- });
38
+ export const browserActionMutation = (options) => {
39
+ const mutationOptions = {
40
+ mutationFn: async (fnOptions) => {
41
+ const { data } = await browserAction({
42
+ ...options,
43
+ ...fnOptions,
44
+ throwOnError: true
45
+ });
46
+ return data;
47
+ }
48
+ };
49
+ return mutationOptions;
50
+ };
83
51
  /**
84
- * Create or update chatbot
85
- *
86
- * #### Controller:
87
- *
88
- * `github.com/codeh007/gomtm/pkg/handlers/langchat.(*LangchatService).upsertChatbot`
89
- *
90
- * #### Middlewares:
91
- *
92
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
93
- *
94
- * ---
52
+ * handle open submit
95
53
  *
96
- * Create a new chatbot or update an existing one
54
+ * Submit a task to open a browser.
97
55
  */
98
- export const langchatChatbotsUpsertMutation = (options) => {
56
+ export const browserOpenMutation = (options) => {
99
57
  const mutationOptions = {
100
58
  mutationFn: async (fnOptions) => {
101
- const { data } = await langchatChatbotsUpsert({
59
+ const { data } = await browserOpen({
102
60
  ...options,
103
61
  ...fnOptions,
104
62
  throwOnError: true
@@ -109,24 +67,14 @@ export const langchatChatbotsUpsertMutation = (options) => {
109
67
  return mutationOptions;
110
68
  };
111
69
  /**
112
- * Login chatbot
113
- *
114
- * #### Controller:
115
- *
116
- * `github.com/codeh007/gomtm/pkg/handlers/langchat.(*LangchatService).loginChatbot`
117
- *
118
- * #### Middlewares:
119
- *
120
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
70
+ * edit file
121
71
  *
122
- * ---
123
- *
124
- * Trigger the chatbot login workflow
72
+ * Replace text in a file. Matches exact 'old_string'. Use 'replace_all=true' for multiple occurrences.
125
73
  */
126
- export const langchatChatbotsLoginMutation = (options) => {
74
+ export const coddingToolEditFileMutation = (options) => {
127
75
  const mutationOptions = {
128
76
  mutationFn: async (fnOptions) => {
129
- const { data } = await langchatChatbotsLogin({
77
+ const { data } = await coddingToolEditFile({
130
78
  ...options,
131
79
  ...fnOptions,
132
80
  throwOnError: true
@@ -137,24 +85,14 @@ export const langchatChatbotsLoginMutation = (options) => {
137
85
  return mutationOptions;
138
86
  };
139
87
  /**
140
- * Run chatbot
141
- *
142
- * #### Controller:
143
- *
144
- * `github.com/codeh007/gomtm/pkg/handlers/langchat.(*LangchatService).runChatbot`
145
- *
146
- * #### Middlewares:
147
- *
148
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
149
- *
150
- * ---
88
+ * list dir
151
89
  *
152
- * Trigger the chatbot startup workflow
90
+ * List files and directories in a given path.
153
91
  */
154
- export const langchatChatbotsRunMutation = (options) => {
92
+ export const coddingToolListDirMutation = (options) => {
155
93
  const mutationOptions = {
156
94
  mutationFn: async (fnOptions) => {
157
- const { data } = await langchatChatbotsRun({
95
+ const { data } = await coddingToolListDir({
158
96
  ...options,
159
97
  ...fnOptions,
160
98
  throwOnError: true
@@ -165,24 +103,14 @@ export const langchatChatbotsRunMutation = (options) => {
165
103
  return mutationOptions;
166
104
  };
167
105
  /**
168
- * Delete chatbot
169
- *
170
- * #### Controller:
171
- *
172
- * `github.com/codeh007/gomtm/pkg/handlers/langchat.(*LangchatService).deleteChatbot`
173
- *
174
- * #### Middlewares:
106
+ * read files
175
107
  *
176
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
177
- *
178
- * ---
179
- *
180
- * Delete a chatbot
108
+ * Read content of multiple files. Supports simple glob patterns.
181
109
  */
182
- export const langchatChatbotsDeleteMutation = (options) => {
110
+ export const coddingToolReadFilesMutation = (options) => {
183
111
  const mutationOptions = {
184
112
  mutationFn: async (fnOptions) => {
185
- const { data } = await langchatChatbotsDelete({
113
+ const { data } = await coddingToolReadFiles({
186
114
  ...options,
187
115
  ...fnOptions,
188
116
  throwOnError: true
@@ -192,40 +120,30 @@ export const langchatChatbotsDeleteMutation = (options) => {
192
120
  };
193
121
  return mutationOptions;
194
122
  };
195
- export const langchatChatbotsGetQueryKey = (options) => createQueryKey('langchatChatbotsGet', options);
196
123
  /**
197
- * Get chatbot
198
- *
199
- * #### Controller:
200
- *
201
- * `github.com/codeh007/gomtm/pkg/handlers/langchat.(*LangchatService).getChatbot`
202
- *
203
- * #### Middlewares:
204
- *
205
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
206
- *
207
- * ---
124
+ * search files
208
125
  *
209
- * Get a specific chatbot by ID
126
+ * Search for a pattern in files using grep.
210
127
  */
211
- export const langchatChatbotsGetOptions = (options) => queryOptions({
212
- queryFn: async ({ queryKey, signal }) => {
213
- const { data } = await langchatChatbotsGet({
214
- ...options,
215
- ...queryKey[0],
216
- signal,
217
- throwOnError: true
218
- });
219
- return data;
220
- },
221
- queryKey: langchatChatbotsGetQueryKey(options)
222
- });
128
+ export const coddingToolSearchFilesMutation = (options) => {
129
+ const mutationOptions = {
130
+ mutationFn: async (fnOptions) => {
131
+ const { data } = await coddingToolSearchFiles({
132
+ ...options,
133
+ ...fnOptions,
134
+ throwOnError: true
135
+ });
136
+ return data;
137
+ }
138
+ };
139
+ return mutationOptions;
140
+ };
223
141
  /**
224
- * Update chatbot
142
+ * run code
225
143
  *
226
144
  * #### Controller:
227
145
  *
228
- * `github.com/codeh007/gomtm/pkg/handlers/langchat.(*LangchatService).upsertChatbotByPath`
146
+ * `github.com/codeh007/gomtm/pkg/routes/api/code.(*CodeService).RunCode`
229
147
  *
230
148
  * #### Middlewares:
231
149
  *
@@ -233,12 +151,12 @@ export const langchatChatbotsGetOptions = (options) => queryOptions({
233
151
  *
234
152
  * ---
235
153
  *
236
- * Update an existing chatbot
154
+ * run code
237
155
  */
238
- export const langchatChatbotsUpdateMutation = (options) => {
156
+ export const codeRunMutation = (options) => {
239
157
  const mutationOptions = {
240
158
  mutationFn: async (fnOptions) => {
241
- const { data } = await langchatChatbotsUpdate({
159
+ const { data } = await codeRun({
242
160
  ...options,
243
161
  ...fnOptions,
244
162
  throwOnError: true
@@ -248,40 +166,102 @@ export const langchatChatbotsUpdateMutation = (options) => {
248
166
  };
249
167
  return mutationOptions;
250
168
  };
251
- export const langchatPlatformTypesQueryKey = (options) => createQueryKey('langchatPlatformTypes', options);
252
169
  /**
253
- * List platform types
254
- *
255
- * #### Controller:
170
+ * add node
256
171
  *
257
- * `github.com/codeh007/gomtm/pkg/handlers/langchat.(*LangchatService).listPlatformTypes`
172
+ * Add or update a compute node.
173
+ */
174
+ export const computeAddNodeMutation = (options) => {
175
+ const mutationOptions = {
176
+ mutationFn: async (fnOptions) => {
177
+ const { data } = await computeAddNode({
178
+ ...options,
179
+ ...fnOptions,
180
+ throwOnError: true
181
+ });
182
+ return data;
183
+ }
184
+ };
185
+ return mutationOptions;
186
+ };
187
+ /**
188
+ * list nodes
258
189
  *
259
- * #### Middlewares:
190
+ * List compute nodes (VPS/Host).
191
+ */
192
+ export const computeListNodesMutation = (options) => {
193
+ const mutationOptions = {
194
+ mutationFn: async (fnOptions) => {
195
+ const { data } = await computeListNodes({
196
+ ...options,
197
+ ...fnOptions,
198
+ throwOnError: true
199
+ });
200
+ return data;
201
+ }
202
+ };
203
+ return mutationOptions;
204
+ };
205
+ /**
206
+ * remove node
260
207
  *
261
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
208
+ * Remove a compute node.
209
+ */
210
+ export const computeRemoveNodeMutation = (options) => {
211
+ const mutationOptions = {
212
+ mutationFn: async (fnOptions) => {
213
+ const { data } = await computeRemoveNode({
214
+ ...options,
215
+ ...fnOptions,
216
+ throwOnError: true
217
+ });
218
+ return data;
219
+ }
220
+ };
221
+ return mutationOptions;
222
+ };
223
+ /**
224
+ * execute query
262
225
  *
263
- * ---
226
+ * Execute SQL query(s) on the public schema. Supports multiple statements separated by semicolons. Max execution time is 60 seconds.
227
+ */
228
+ export const dbQueryExecuteQueryMutation = (options) => {
229
+ const mutationOptions = {
230
+ mutationFn: async (fnOptions) => {
231
+ const { data } = await dbQueryExecuteQuery({
232
+ ...options,
233
+ ...fnOptions,
234
+ throwOnError: true
235
+ });
236
+ return data;
237
+ }
238
+ };
239
+ return mutationOptions;
240
+ };
241
+ /**
242
+ * request action
264
243
  *
265
- * Get available platform types
244
+ * Request specific manual actions from the user when automated attempts fail.
266
245
  */
267
- export const langchatPlatformTypesOptions = (options) => queryOptions({
268
- queryFn: async ({ queryKey, signal }) => {
269
- const { data } = await langchatPlatformTypes({
270
- ...options,
271
- ...queryKey[0],
272
- signal,
273
- throwOnError: true
274
- });
275
- return data;
276
- },
277
- queryKey: langchatPlatformTypesQueryKey(options)
278
- });
246
+ export const humanRequestActionMutation = (options) => {
247
+ const mutationOptions = {
248
+ mutationFn: async (fnOptions) => {
249
+ const { data } = await humanRequestAction({
250
+ ...options,
251
+ ...fnOptions,
252
+ throwOnError: true
253
+ });
254
+ return data;
255
+ }
256
+ };
257
+ return mutationOptions;
258
+ };
279
259
  /**
280
260
  * Start napcat service
281
261
  *
282
262
  * #### Controller:
283
263
  *
284
- * `github.com/codeh007/gomtm/pkg/handlers/napcat.(*NapcatService).StartNapcat`
264
+ * `github.com/codeh007/gomtm/pkg/routes/api/napcat.(*NapcatService).StartNapcat`
285
265
  *
286
266
  * #### Middlewares:
287
267
  *
@@ -304,13 +284,35 @@ export const napcatStartMutation = (options) => {
304
284
  };
305
285
  return mutationOptions;
306
286
  };
287
+ const createQueryKey = (id, options, infinite, tags) => {
288
+ const params = { _id: id, baseUrl: options?.baseUrl || (options?.client ?? client).getConfig().baseUrl };
289
+ if (infinite) {
290
+ params._infinite = infinite;
291
+ }
292
+ if (tags) {
293
+ params.tags = tags;
294
+ }
295
+ if (options?.body) {
296
+ params.body = options.body;
297
+ }
298
+ if (options?.headers) {
299
+ params.headers = options.headers;
300
+ }
301
+ if (options?.path) {
302
+ params.path = options.path;
303
+ }
304
+ if (options?.query) {
305
+ params.query = options.query;
306
+ }
307
+ return [params];
308
+ };
307
309
  export const napcatGetStatusQueryKey = (options) => createQueryKey('napcatGetStatus', options);
308
310
  /**
309
311
  * Get napcat status
310
312
  *
311
313
  * #### Controller:
312
314
  *
313
- * `github.com/codeh007/gomtm/pkg/handlers/napcat.(*NapcatService).GetStatus`
315
+ * `github.com/codeh007/gomtm/pkg/routes/api/napcat.(*NapcatService).GetStatus`
314
316
  *
315
317
  * #### Middlewares:
316
318
  *
@@ -338,7 +340,7 @@ export const napcatProxyOneBot11GetQueryKey = (options) => createQueryKey('napca
338
340
  *
339
341
  * #### Controller:
340
342
  *
341
- * `github.com/codeh007/gomtm/pkg/handlers/napcat.(*NapcatService).ProxyToNapcat`
343
+ * `github.com/codeh007/gomtm/pkg/routes/api/napcat.(*NapcatService).ProxyToNapcat`
342
344
  *
343
345
  * #### Middlewares:
344
346
  *
@@ -365,7 +367,7 @@ export const napcatProxyOneBot11GetOptions = (options) => queryOptions({
365
367
  *
366
368
  * #### Controller:
367
369
  *
368
- * `github.com/codeh007/gomtm/pkg/handlers/napcat.(*NapcatService).ProxyToNapcat`
370
+ * `github.com/codeh007/gomtm/pkg/routes/api/napcat.(*NapcatService).ProxyToNapcat`
369
371
  *
370
372
  * #### Middlewares:
371
373
  *
@@ -388,13 +390,48 @@ export const napcatProxyOneBot11PostMutation = (options) => {
388
390
  };
389
391
  return mutationOptions;
390
392
  };
391
- export const langchatChatbotsMessagesListQueryKey = (options) => createQueryKey('langchatChatbotsMessagesList', options);
392
393
  /**
393
- * List OneBot11 messages
394
+ * ensure sandbox
395
+ *
396
+ * Ensure a sandbox execution environment exists. Checks for active sandboxes. If not ready, starts an async task.
397
+ */
398
+ export const sandboxEnsureMutation = (options) => {
399
+ const mutationOptions = {
400
+ mutationFn: async (fnOptions) => {
401
+ const { data } = await sandboxEnsure({
402
+ ...options,
403
+ ...fnOptions,
404
+ throwOnError: true
405
+ });
406
+ return data;
407
+ }
408
+ };
409
+ return mutationOptions;
410
+ };
411
+ /**
412
+ * list tasks
413
+ *
414
+ * List background tasks.
415
+ */
416
+ export const sandboxListTasksMutation = (options) => {
417
+ const mutationOptions = {
418
+ mutationFn: async (fnOptions) => {
419
+ const { data } = await sandboxListTasks({
420
+ ...options,
421
+ ...fnOptions,
422
+ throwOnError: true
423
+ });
424
+ return data;
425
+ }
426
+ };
427
+ return mutationOptions;
428
+ };
429
+ /**
430
+ * 运行通用任务
394
431
  *
395
432
  * #### Controller:
396
433
  *
397
- * `github.com/codeh007/gomtm/pkg/handlers/onebot11.(*OneBot11Service).ListMessages`
434
+ * `github.com/codeh007/gomtm/pkg/routes/api/task.(*TaskService).handleTaskRun`
398
435
  *
399
436
  * #### Middlewares:
400
437
  *
@@ -402,808 +439,7 @@ export const langchatChatbotsMessagesListQueryKey = (options) => createQueryKey(
402
439
  *
403
440
  * ---
404
441
  *
405
- * Get a list of OneBot11 messages with optional filtering
406
- */
407
- export const langchatChatbotsMessagesListOptions = (options) => queryOptions({
408
- queryFn: async ({ queryKey, signal }) => {
409
- const { data } = await langchatChatbotsMessagesList({
410
- ...options,
411
- ...queryKey[0],
412
- signal,
413
- throwOnError: true
414
- });
415
- return data;
416
- },
417
- queryKey: langchatChatbotsMessagesListQueryKey(options)
418
- });
419
- const createInfiniteParams = (queryKey, page) => {
420
- const params = { ...queryKey[0] };
421
- if (page.body) {
422
- params.body = {
423
- ...queryKey[0].body,
424
- ...page.body
425
- };
426
- }
427
- if (page.headers) {
428
- params.headers = {
429
- ...queryKey[0].headers,
430
- ...page.headers
431
- };
432
- }
433
- if (page.path) {
434
- params.path = {
435
- ...queryKey[0].path,
436
- ...page.path
437
- };
438
- }
439
- if (page.query) {
440
- params.query = {
441
- ...queryKey[0].query,
442
- ...page.query
443
- };
444
- }
445
- return params;
446
- };
447
- export const langchatChatbotsMessagesListInfiniteQueryKey = (options) => createQueryKey('langchatChatbotsMessagesList', options, true);
448
- /**
449
- * List OneBot11 messages
450
- *
451
- * #### Controller:
452
- *
453
- * `github.com/codeh007/gomtm/pkg/handlers/onebot11.(*OneBot11Service).ListMessages`
454
- *
455
- * #### Middlewares:
456
- *
457
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
458
- *
459
- * ---
460
- *
461
- * Get a list of OneBot11 messages with optional filtering
462
- */
463
- export const langchatChatbotsMessagesListInfiniteOptions = (options) => infiniteQueryOptions(
464
- // @ts-ignore
465
- {
466
- queryFn: async ({ pageParam, queryKey, signal }) => {
467
- // @ts-ignore
468
- const page = typeof pageParam === 'object' ? pageParam : {
469
- query: {
470
- page: pageParam
471
- }
472
- };
473
- const params = createInfiniteParams(queryKey, page);
474
- const { data } = await langchatChatbotsMessagesList({
475
- ...options,
476
- ...params,
477
- signal,
478
- throwOnError: true
479
- });
480
- return data;
481
- },
482
- queryKey: langchatChatbotsMessagesListInfiniteQueryKey(options)
483
- });
484
- export const langchatChatbotsMessagesGetQueryKey = (options) => createQueryKey('langchatChatbotsMessagesGet', options);
485
- /**
486
- * Get OneBot11 message
487
- *
488
- * #### Controller:
489
- *
490
- * `github.com/codeh007/gomtm/pkg/handlers/onebot11.(*OneBot11Service).GetMessage`
491
- *
492
- * #### Middlewares:
493
- *
494
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
495
- *
496
- * ---
497
- *
498
- * Get a specific OneBot11 message by ID
499
- */
500
- export const langchatChatbotsMessagesGetOptions = (options) => queryOptions({
501
- queryFn: async ({ queryKey, signal }) => {
502
- const { data } = await langchatChatbotsMessagesGet({
503
- ...options,
504
- ...queryKey[0],
505
- signal,
506
- throwOnError: true
507
- });
508
- return data;
509
- },
510
- queryKey: langchatChatbotsMessagesGetQueryKey(options)
511
- });
512
- export const langchatChatbotsSessionsListQueryKey = (options) => createQueryKey('langchatChatbotsSessionsList', options);
513
- /**
514
- * List OneBot11 sessions
515
- *
516
- * #### Controller:
517
- *
518
- * `github.com/codeh007/gomtm/pkg/handlers/onebot11.(*OneBot11Service).ListSessions`
519
- *
520
- * #### Middlewares:
521
- *
522
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
523
- *
524
- * ---
525
- *
526
- * Get a list of OneBot11 sessions with optional filtering
527
- */
528
- export const langchatChatbotsSessionsListOptions = (options) => queryOptions({
529
- queryFn: async ({ queryKey, signal }) => {
530
- const { data } = await langchatChatbotsSessionsList({
531
- ...options,
532
- ...queryKey[0],
533
- signal,
534
- throwOnError: true
535
- });
536
- return data;
537
- },
538
- queryKey: langchatChatbotsSessionsListQueryKey(options)
539
- });
540
- export const langchatChatbotsSessionsListInfiniteQueryKey = (options) => createQueryKey('langchatChatbotsSessionsList', options, true);
541
- /**
542
- * List OneBot11 sessions
543
- *
544
- * #### Controller:
545
- *
546
- * `github.com/codeh007/gomtm/pkg/handlers/onebot11.(*OneBot11Service).ListSessions`
547
- *
548
- * #### Middlewares:
549
- *
550
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
551
- *
552
- * ---
553
- *
554
- * Get a list of OneBot11 sessions with optional filtering
555
- */
556
- export const langchatChatbotsSessionsListInfiniteOptions = (options) => infiniteQueryOptions(
557
- // @ts-ignore
558
- {
559
- queryFn: async ({ pageParam, queryKey, signal }) => {
560
- // @ts-ignore
561
- const page = typeof pageParam === 'object' ? pageParam : {
562
- query: {
563
- page: pageParam
564
- }
565
- };
566
- const params = createInfiniteParams(queryKey, page);
567
- const { data } = await langchatChatbotsSessionsList({
568
- ...options,
569
- ...params,
570
- signal,
571
- throwOnError: true
572
- });
573
- return data;
574
- },
575
- queryKey: langchatChatbotsSessionsListInfiniteQueryKey(options)
576
- });
577
- export const pAccountListQueryKey = (options) => createQueryKey('pAccountList', options);
578
- /**
579
- * List platform accounts
580
- *
581
- * #### Controller:
582
- *
583
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).listPAccounts`
584
- *
585
- * #### Middlewares:
586
- *
587
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
588
- *
589
- * ---
590
- *
591
- * Get list of platform accounts with pagination
592
- */
593
- export const pAccountListOptions = (options) => queryOptions({
594
- queryFn: async ({ queryKey, signal }) => {
595
- const { data } = await pAccountList({
596
- ...options,
597
- ...queryKey[0],
598
- signal,
599
- throwOnError: true
600
- });
601
- return data;
602
- },
603
- queryKey: pAccountListQueryKey(options)
604
- });
605
- /**
606
- * Create platform account
607
- *
608
- * #### Controller:
609
- *
610
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).createPAccount`
611
- *
612
- * #### Middlewares:
613
- *
614
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
615
- *
616
- * ---
617
- *
618
- * Create a new platform account
619
- */
620
- export const pAccountCreateMutation = (options) => {
621
- const mutationOptions = {
622
- mutationFn: async (fnOptions) => {
623
- const { data } = await pAccountCreate({
624
- ...options,
625
- ...fnOptions,
626
- throwOnError: true
627
- });
628
- return data;
629
- }
630
- };
631
- return mutationOptions;
632
- };
633
- export const pAccountExportQueryKey = (options) => createQueryKey('pAccountExport', options);
634
- /**
635
- * Export platform accounts
636
- *
637
- * #### Controller:
638
- *
639
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).exportPAccounts`
640
- *
641
- * #### Middlewares:
642
- *
643
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
644
- *
645
- * ---
646
- *
647
- * Export all platform accounts data
648
- */
649
- export const pAccountExportOptions = (options) => queryOptions({
650
- queryFn: async ({ queryKey, signal }) => {
651
- const { data } = await pAccountExport({
652
- ...options,
653
- ...queryKey[0],
654
- signal,
655
- throwOnError: true
656
- });
657
- return data;
658
- },
659
- queryKey: pAccountExportQueryKey(options)
660
- });
661
- /**
662
- * Import platform accounts
663
- *
664
- * #### Controller:
665
- *
666
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).importPAccounts`
667
- *
668
- * #### Middlewares:
669
- *
670
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
671
- *
672
- * ---
673
- *
674
- * Import platform accounts data
675
- */
676
- export const pAccountImportMutation = (options) => {
677
- const mutationOptions = {
678
- mutationFn: async (fnOptions) => {
679
- const { data } = await pAccountImport({
680
- ...options,
681
- ...fnOptions,
682
- throwOnError: true
683
- });
684
- return data;
685
- }
686
- };
687
- return mutationOptions;
688
- };
689
- /**
690
- * Delete platform account
691
- *
692
- * #### Controller:
693
- *
694
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).deletePAccount`
695
- *
696
- * #### Middlewares:
697
- *
698
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
699
- *
700
- * ---
701
- *
702
- * Delete platform account by ID
703
- */
704
- export const pAccountDeleteMutation = (options) => {
705
- const mutationOptions = {
706
- mutationFn: async (fnOptions) => {
707
- const { data } = await pAccountDelete({
708
- ...options,
709
- ...fnOptions,
710
- throwOnError: true
711
- });
712
- return data;
713
- }
714
- };
715
- return mutationOptions;
716
- };
717
- export const pAccountGetQueryKey = (options) => createQueryKey('pAccountGet', options);
718
- /**
719
- * Get platform account
720
- *
721
- * #### Controller:
722
- *
723
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).getPAccount`
724
- *
725
- * #### Middlewares:
726
- *
727
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
728
- *
729
- * ---
730
- *
731
- * Get platform account by ID
732
- */
733
- export const pAccountGetOptions = (options) => queryOptions({
734
- queryFn: async ({ queryKey, signal }) => {
735
- const { data } = await pAccountGet({
736
- ...options,
737
- ...queryKey[0],
738
- signal,
739
- throwOnError: true
740
- });
741
- return data;
742
- },
743
- queryKey: pAccountGetQueryKey(options)
744
- });
745
- /**
746
- * Update platform account
747
- *
748
- * #### Controller:
749
- *
750
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).updatePAccount`
751
- *
752
- * #### Middlewares:
753
- *
754
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
755
- *
756
- * ---
757
- *
758
- * Update platform account by ID
759
- */
760
- export const pAccountUpdateMutation = (options) => {
761
- const mutationOptions = {
762
- mutationFn: async (fnOptions) => {
763
- const { data } = await pAccountUpdate({
764
- ...options,
765
- ...fnOptions,
766
- throwOnError: true
767
- });
768
- return data;
769
- }
770
- };
771
- return mutationOptions;
772
- };
773
- export const pAccountListBrowserConfigsQueryKey = (options) => createQueryKey('pAccountListBrowserConfigs', options);
774
- /**
775
- * List browser configs
776
- *
777
- * #### Controller:
778
- *
779
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).listBrowserConfigs`
780
- *
781
- * #### Middlewares:
782
- *
783
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
784
- *
785
- * ---
786
- *
787
- * List browser configurations for platform account
788
- */
789
- export const pAccountListBrowserConfigsOptions = (options) => queryOptions({
790
- queryFn: async ({ queryKey, signal }) => {
791
- const { data } = await pAccountListBrowserConfigs({
792
- ...options,
793
- ...queryKey[0],
794
- signal,
795
- throwOnError: true
796
- });
797
- return data;
798
- },
799
- queryKey: pAccountListBrowserConfigsQueryKey(options)
800
- });
801
- /**
802
- * Create browser config
803
- *
804
- * #### Controller:
805
- *
806
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).createBrowserConfig`
807
- *
808
- * #### Middlewares:
809
- *
810
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
811
- *
812
- * ---
813
- *
814
- * Create browser configuration for platform account
815
- */
816
- export const pAccountCreateBrowserConfigMutation = (options) => {
817
- const mutationOptions = {
818
- mutationFn: async (fnOptions) => {
819
- const { data } = await pAccountCreateBrowserConfig({
820
- ...options,
821
- ...fnOptions,
822
- throwOnError: true
823
- });
824
- return data;
825
- }
826
- };
827
- return mutationOptions;
828
- };
829
- /**
830
- * Launch browser for account
831
- *
832
- * #### Controller:
833
- *
834
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).launchBrowser`
835
- *
836
- * #### Middlewares:
837
- *
838
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
839
- *
840
- * ---
841
- *
842
- * Launch browser session for platform account
843
- */
844
- export const pAccountLaunchBrowserMutation = (options) => {
845
- const mutationOptions = {
846
- mutationFn: async (fnOptions) => {
847
- const { data } = await pAccountLaunchBrowser({
848
- ...options,
849
- ...fnOptions,
850
- throwOnError: true
851
- });
852
- return data;
853
- }
854
- };
855
- return mutationOptions;
856
- };
857
- export const pAccountListSessionsQueryKey = (options) => createQueryKey('pAccountListSessions', options);
858
- /**
859
- * List sessions
860
- *
861
- * #### Controller:
862
- *
863
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).listSessions`
864
- *
865
- * #### Middlewares:
866
- *
867
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
868
- *
869
- * ---
870
- *
871
- * List sessions for platform account
872
- */
873
- export const pAccountListSessionsOptions = (options) => queryOptions({
874
- queryFn: async ({ queryKey, signal }) => {
875
- const { data } = await pAccountListSessions({
876
- ...options,
877
- ...queryKey[0],
878
- signal,
879
- throwOnError: true
880
- });
881
- return data;
882
- },
883
- queryKey: pAccountListSessionsQueryKey(options)
884
- });
885
- /**
886
- * Create session
887
- *
888
- * #### Controller:
889
- *
890
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).createSession`
891
- *
892
- * #### Middlewares:
893
- *
894
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
895
- *
896
- * ---
897
- *
898
- * Create session for platform account
899
- */
900
- export const pAccountCreateSessionMutation = (options) => {
901
- const mutationOptions = {
902
- mutationFn: async (fnOptions) => {
903
- const { data } = await pAccountCreateSession({
904
- ...options,
905
- ...fnOptions,
906
- throwOnError: true
907
- });
908
- return data;
909
- }
910
- };
911
- return mutationOptions;
912
- };
913
- /**
914
- * Delete session
915
- *
916
- * #### Controller:
917
- *
918
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).deleteSession`
919
- *
920
- * #### Middlewares:
921
- *
922
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
923
- *
924
- * ---
925
- *
926
- * Delete session by ID
927
- */
928
- export const pAccountDeleteSessionMutation = (options) => {
929
- const mutationOptions = {
930
- mutationFn: async (fnOptions) => {
931
- const { data } = await pAccountDeleteSession({
932
- ...options,
933
- ...fnOptions,
934
- throwOnError: true
935
- });
936
- return data;
937
- }
938
- };
939
- return mutationOptions;
940
- };
941
- export const pAccountGetSessionQueryKey = (options) => createQueryKey('pAccountGetSession', options);
942
- /**
943
- * Get session
944
- *
945
- * #### Controller:
946
- *
947
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).getSession`
948
- *
949
- * #### Middlewares:
950
- *
951
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
952
- *
953
- * ---
954
- *
955
- * Get session by ID
956
- */
957
- export const pAccountGetSessionOptions = (options) => queryOptions({
958
- queryFn: async ({ queryKey, signal }) => {
959
- const { data } = await pAccountGetSession({
960
- ...options,
961
- ...queryKey[0],
962
- signal,
963
- throwOnError: true
964
- });
965
- return data;
966
- },
967
- queryKey: pAccountGetSessionQueryKey(options)
968
- });
969
- /**
970
- * Update session
971
- *
972
- * #### Controller:
973
- *
974
- * `github.com/codeh007/gomtm/pkg/handlers/paccount.(*PAccountService).updateSession`
975
- *
976
- * #### Middlewares:
977
- *
978
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
979
- *
980
- * ---
981
- *
982
- * Update session by ID
983
- */
984
- export const pAccountUpdateSessionMutation = (options) => {
985
- const mutationOptions = {
986
- mutationFn: async (fnOptions) => {
987
- const { data } = await pAccountUpdateSession({
988
- ...options,
989
- ...fnOptions,
990
- throwOnError: true
991
- });
992
- return data;
993
- }
994
- };
995
- return mutationOptions;
996
- };
997
- export const platformListQueryKey = (options) => createQueryKey('platformList', options);
998
- /**
999
- * List platforms
1000
- *
1001
- * #### Controller:
1002
- *
1003
- * `github.com/codeh007/gomtm/pkg/handlers/platform.(*PlatformService).listPlatforms`
1004
- *
1005
- * #### Middlewares:
1006
- *
1007
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
1008
- *
1009
- * ---
1010
- *
1011
- * Get list of platforms with pagination
1012
- */
1013
- export const platformListOptions = (options) => queryOptions({
1014
- queryFn: async ({ queryKey, signal }) => {
1015
- const { data } = await platformList({
1016
- ...options,
1017
- ...queryKey[0],
1018
- signal,
1019
- throwOnError: true
1020
- });
1021
- return data;
1022
- },
1023
- queryKey: platformListQueryKey(options)
1024
- });
1025
- /**
1026
- * Create platform
1027
- *
1028
- * #### Controller:
1029
- *
1030
- * `github.com/codeh007/gomtm/pkg/handlers/platform.(*PlatformService).createPlatform`
1031
- *
1032
- * #### Middlewares:
1033
- *
1034
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
1035
- *
1036
- * ---
1037
- *
1038
- * Create a new platform
1039
- */
1040
- export const platformCreateMutation = (options) => {
1041
- const mutationOptions = {
1042
- mutationFn: async (fnOptions) => {
1043
- const { data } = await platformCreate({
1044
- ...options,
1045
- ...fnOptions,
1046
- throwOnError: true
1047
- });
1048
- return data;
1049
- }
1050
- };
1051
- return mutationOptions;
1052
- };
1053
- export const platformExportQueryKey = (options) => createQueryKey('platformExport', options);
1054
- /**
1055
- * Export platforms
1056
- *
1057
- * #### Controller:
1058
- *
1059
- * `github.com/codeh007/gomtm/pkg/handlers/platform.(*PlatformService).exportPlatforms`
1060
- *
1061
- * #### Middlewares:
1062
- *
1063
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
1064
- *
1065
- * ---
1066
- *
1067
- * Export all platforms data
1068
- */
1069
- export const platformExportOptions = (options) => queryOptions({
1070
- queryFn: async ({ queryKey, signal }) => {
1071
- const { data } = await platformExport({
1072
- ...options,
1073
- ...queryKey[0],
1074
- signal,
1075
- throwOnError: true
1076
- });
1077
- return data;
1078
- },
1079
- queryKey: platformExportQueryKey(options)
1080
- });
1081
- /**
1082
- * Import platforms
1083
- *
1084
- * #### Controller:
1085
- *
1086
- * `github.com/codeh007/gomtm/pkg/handlers/platform.(*PlatformService).importPlatforms`
1087
- *
1088
- * #### Middlewares:
1089
- *
1090
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
1091
- *
1092
- * ---
1093
- *
1094
- * Import platforms data
1095
- */
1096
- export const platformImportMutation = (options) => {
1097
- const mutationOptions = {
1098
- mutationFn: async (fnOptions) => {
1099
- const { data } = await platformImport({
1100
- ...options,
1101
- ...fnOptions,
1102
- throwOnError: true
1103
- });
1104
- return data;
1105
- }
1106
- };
1107
- return mutationOptions;
1108
- };
1109
- /**
1110
- * Delete platform
1111
- *
1112
- * #### Controller:
1113
- *
1114
- * `github.com/codeh007/gomtm/pkg/handlers/platform.(*PlatformService).deletePlatform`
1115
- *
1116
- * #### Middlewares:
1117
- *
1118
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
1119
- *
1120
- * ---
1121
- *
1122
- * Delete platform by ID
1123
- */
1124
- export const platformDeleteMutation = (options) => {
1125
- const mutationOptions = {
1126
- mutationFn: async (fnOptions) => {
1127
- const { data } = await platformDelete({
1128
- ...options,
1129
- ...fnOptions,
1130
- throwOnError: true
1131
- });
1132
- return data;
1133
- }
1134
- };
1135
- return mutationOptions;
1136
- };
1137
- export const platformGetQueryKey = (options) => createQueryKey('platformGet', options);
1138
- /**
1139
- * Get platform
1140
- *
1141
- * #### Controller:
1142
- *
1143
- * `github.com/codeh007/gomtm/pkg/handlers/platform.(*PlatformService).getPlatform`
1144
- *
1145
- * #### Middlewares:
1146
- *
1147
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
1148
- *
1149
- * ---
1150
- *
1151
- * Get platform by ID
1152
- */
1153
- export const platformGetOptions = (options) => queryOptions({
1154
- queryFn: async ({ queryKey, signal }) => {
1155
- const { data } = await platformGet({
1156
- ...options,
1157
- ...queryKey[0],
1158
- signal,
1159
- throwOnError: true
1160
- });
1161
- return data;
1162
- },
1163
- queryKey: platformGetQueryKey(options)
1164
- });
1165
- /**
1166
- * Update platform
1167
- *
1168
- * #### Controller:
1169
- *
1170
- * `github.com/codeh007/gomtm/pkg/handlers/platform.(*PlatformService).updatePlatform`
1171
- *
1172
- * #### Middlewares:
1173
- *
1174
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
1175
- *
1176
- * ---
1177
- *
1178
- * Update platform by ID
1179
- */
1180
- export const platformUpdateMutation = (options) => {
1181
- const mutationOptions = {
1182
- mutationFn: async (fnOptions) => {
1183
- const { data } = await platformUpdate({
1184
- ...options,
1185
- ...fnOptions,
1186
- throwOnError: true
1187
- });
1188
- return data;
1189
- }
1190
- };
1191
- return mutationOptions;
1192
- };
1193
- /**
1194
- * 运行通用任务
1195
- *
1196
- * #### Controller:
1197
- *
1198
- * `github.com/codeh007/gomtm/pkg/handlers/task.(*TaskService).handleTaskRun`
1199
- *
1200
- * #### Middlewares:
1201
- *
1202
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
1203
- *
1204
- * ---
1205
- *
1206
- * 接收来自数据库的任务推送,异步执行并回调结果
442
+ * 接收来自数据库的任务推送,异步执行并回调结果
1207
443
  */
1208
444
  export const taskRunMutation = (options) => {
1209
445
  const mutationOptions = {
@@ -1218,41 +454,13 @@ export const taskRunMutation = (options) => {
1218
454
  };
1219
455
  return mutationOptions;
1220
456
  };
1221
- export const userGetCurrentQueryKey = (options) => createQueryKey('userGetCurrent', options);
1222
- /**
1223
- * Get current user
1224
- *
1225
- * #### Controller:
1226
- *
1227
- * `github.com/codeh007/gomtm/pkg/handlers/users.(*UserService).getCurrentUser`
1228
- *
1229
- * #### Middlewares:
1230
- *
1231
- * - `github.com/go-fuego/fuego.defaultLogger.middleware`
1232
- *
1233
- * ---
1234
- *
1235
- * Get current user information
1236
- */
1237
- export const userGetCurrentOptions = (options) => queryOptions({
1238
- queryFn: async ({ queryKey, signal }) => {
1239
- const { data } = await userGetCurrent({
1240
- ...options,
1241
- ...queryKey[0],
1242
- signal,
1243
- throwOnError: true
1244
- });
1245
- return data;
1246
- },
1247
- queryKey: userGetCurrentQueryKey(options)
1248
- });
1249
457
  export const napcatProxyWebUigetQueryKey = (options) => createQueryKey('napcatProxyWebUiget', options);
1250
458
  /**
1251
459
  * Proxy WebUI GET requests
1252
460
  *
1253
461
  * #### Controller:
1254
462
  *
1255
- * `github.com/codeh007/gomtm/pkg/handlers/napcat.(*NapcatService).ProxyToWebUI`
463
+ * `github.com/codeh007/gomtm/pkg/routes/api/napcat.(*NapcatService).ProxyToWebUI`
1256
464
  *
1257
465
  * #### Middlewares:
1258
466
  *
@@ -1279,7 +487,7 @@ export const napcatProxyWebUigetOptions = (options) => queryOptions({
1279
487
  *
1280
488
  * #### Controller:
1281
489
  *
1282
- * `github.com/codeh007/gomtm/pkg/handlers/napcat.(*NapcatService).ProxyToWebUI`
490
+ * `github.com/codeh007/gomtm/pkg/routes/api/napcat.(*NapcatService).ProxyToWebUI`
1283
491
  *
1284
492
  * #### Middlewares:
1285
493
  *