mtmsdk 0.0.8 → 0.0.9
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/dist/gomtmapi/@tanstack/react-query.gen.d.ts +2883 -0
- package/dist/gomtmapi/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/gomtmapi/@tanstack/react-query.gen.js +2990 -0
- package/dist/gomtmapi/@tanstack/react-query.gen.js.map +1 -0
- package/dist/gomtmapi/client/client.d.ts +3 -0
- package/dist/gomtmapi/client/client.d.ts.map +1 -0
- package/dist/gomtmapi/client/client.js +146 -0
- package/dist/gomtmapi/client/client.js.map +1 -0
- package/dist/gomtmapi/client/index.d.ts +8 -0
- package/dist/gomtmapi/client/index.d.ts.map +1 -0
- package/dist/gomtmapi/client/index.js +5 -0
- package/dist/gomtmapi/client/index.js.map +1 -0
- package/dist/gomtmapi/client/types.d.ts +120 -0
- package/dist/gomtmapi/client/types.d.ts.map +1 -0
- package/dist/gomtmapi/client/types.js +2 -0
- package/dist/gomtmapi/client/types.js.map +1 -0
- package/dist/gomtmapi/client/utils.d.ts +46 -0
- package/dist/gomtmapi/client/utils.d.ts.map +1 -0
- package/dist/gomtmapi/client/utils.js +285 -0
- package/dist/gomtmapi/client/utils.js.map +1 -0
- package/dist/gomtmapi/client.gen.d.ts +13 -0
- package/dist/gomtmapi/client.gen.d.ts.map +1 -0
- package/dist/gomtmapi/client.gen.js +4 -0
- package/dist/gomtmapi/client.gen.js.map +1 -0
- package/dist/gomtmapi/core/auth.d.ts +19 -0
- package/dist/gomtmapi/core/auth.d.ts.map +1 -0
- package/dist/gomtmapi/core/auth.js +14 -0
- package/dist/gomtmapi/core/auth.js.map +1 -0
- package/dist/gomtmapi/core/bodySerializer.d.ts +18 -0
- package/dist/gomtmapi/core/bodySerializer.d.ts.map +1 -0
- package/dist/gomtmapi/core/bodySerializer.js +54 -0
- package/dist/gomtmapi/core/bodySerializer.js.map +1 -0
- package/dist/gomtmapi/core/params.d.ts +24 -0
- package/dist/gomtmapi/core/params.d.ts.map +1 -0
- package/dist/gomtmapi/core/params.js +88 -0
- package/dist/gomtmapi/core/params.js.map +1 -0
- package/dist/gomtmapi/core/pathSerializer.d.ts +34 -0
- package/dist/gomtmapi/core/pathSerializer.d.ts.map +1 -0
- package/dist/gomtmapi/core/pathSerializer.js +114 -0
- package/dist/gomtmapi/core/pathSerializer.js.map +1 -0
- package/dist/gomtmapi/core/types.d.ts +74 -0
- package/dist/gomtmapi/core/types.d.ts.map +1 -0
- package/dist/gomtmapi/core/types.js +2 -0
- package/dist/gomtmapi/core/types.js.map +1 -0
- package/dist/gomtmapi/index.d.ts +3 -0
- package/dist/gomtmapi/index.d.ts.map +1 -0
- package/dist/gomtmapi/index.js +4 -0
- package/dist/gomtmapi/index.js.map +1 -0
- package/dist/gomtmapi/schemas.gen.d.ts +4385 -0
- package/dist/gomtmapi/schemas.gen.d.ts.map +1 -0
- package/dist/gomtmapi/schemas.gen.js +4521 -0
- package/dist/gomtmapi/schemas.gen.js.map +1 -0
- package/dist/gomtmapi/sdk.gen.d.ts +574 -0
- package/dist/gomtmapi/sdk.gen.d.ts.map +1 -0
- package/dist/gomtmapi/sdk.gen.js +2259 -0
- package/dist/gomtmapi/sdk.gen.js.map +1 -0
- package/dist/gomtmapi/types.gen.d.ts +6480 -0
- package/dist/gomtmapi/types.gen.d.ts.map +1 -0
- package/dist/gomtmapi/types.gen.js +70 -0
- package/dist/gomtmapi/types.gen.js.map +1 -0
- package/dist/gomtmapi/zod.gen.d.ts +5324 -0
- package/dist/gomtmapi/zod.gen.d.ts.map +1 -0
- package/dist/gomtmapi/zod.gen.js +2534 -0
- package/dist/gomtmapi/zod.gen.js.map +1 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts +2260 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.js +2413 -0
- package/dist/gomtmapi_v2/@tanstack/react-query.gen.js.map +1 -0
- package/dist/gomtmapi_v2/client/client.d.ts +3 -0
- package/dist/gomtmapi_v2/client/client.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/client.js +146 -0
- package/dist/gomtmapi_v2/client/client.js.map +1 -0
- package/dist/gomtmapi_v2/client/index.d.ts +8 -0
- package/dist/gomtmapi_v2/client/index.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/index.js +5 -0
- package/dist/gomtmapi_v2/client/index.js.map +1 -0
- package/dist/gomtmapi_v2/client/types.d.ts +120 -0
- package/dist/gomtmapi_v2/client/types.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/types.js +2 -0
- package/dist/gomtmapi_v2/client/types.js.map +1 -0
- package/dist/gomtmapi_v2/client/utils.d.ts +46 -0
- package/dist/gomtmapi_v2/client/utils.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client/utils.js +285 -0
- package/dist/gomtmapi_v2/client/utils.js.map +1 -0
- package/dist/gomtmapi_v2/client.gen.d.ts +13 -0
- package/dist/gomtmapi_v2/client.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/client.gen.js +4 -0
- package/dist/gomtmapi_v2/client.gen.js.map +1 -0
- package/dist/gomtmapi_v2/core/auth.d.ts +19 -0
- package/dist/gomtmapi_v2/core/auth.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/auth.js +14 -0
- package/dist/gomtmapi_v2/core/auth.js.map +1 -0
- package/dist/gomtmapi_v2/core/bodySerializer.d.ts +18 -0
- package/dist/gomtmapi_v2/core/bodySerializer.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/bodySerializer.js +54 -0
- package/dist/gomtmapi_v2/core/bodySerializer.js.map +1 -0
- package/dist/gomtmapi_v2/core/params.d.ts +24 -0
- package/dist/gomtmapi_v2/core/params.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/params.js +88 -0
- package/dist/gomtmapi_v2/core/params.js.map +1 -0
- package/dist/gomtmapi_v2/core/pathSerializer.d.ts +34 -0
- package/dist/gomtmapi_v2/core/pathSerializer.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/pathSerializer.js +114 -0
- package/dist/gomtmapi_v2/core/pathSerializer.js.map +1 -0
- package/dist/gomtmapi_v2/core/types.d.ts +74 -0
- package/dist/gomtmapi_v2/core/types.d.ts.map +1 -0
- package/dist/gomtmapi_v2/core/types.js +2 -0
- package/dist/gomtmapi_v2/core/types.js.map +1 -0
- package/dist/gomtmapi_v2/index.d.ts +3 -0
- package/dist/gomtmapi_v2/index.d.ts.map +1 -0
- package/dist/gomtmapi_v2/index.js +4 -0
- package/dist/gomtmapi_v2/index.js.map +1 -0
- package/dist/gomtmapi_v2/schemas.gen.d.ts +2371 -0
- package/dist/gomtmapi_v2/schemas.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/schemas.gen.js +2372 -0
- package/dist/gomtmapi_v2/schemas.gen.js.map +1 -0
- package/dist/gomtmapi_v2/sdk.gen.d.ts +974 -0
- package/dist/gomtmapi_v2/sdk.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/sdk.gen.js +1345 -0
- package/dist/gomtmapi_v2/sdk.gen.js.map +1 -0
- package/dist/gomtmapi_v2/types.gen.d.ts +2964 -0
- package/dist/gomtmapi_v2/types.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/types.gen.js +3 -0
- package/dist/gomtmapi_v2/types.gen.js.map +1 -0
- package/dist/gomtmapi_v2/zod.gen.d.ts +2327 -0
- package/dist/gomtmapi_v2/zod.gen.d.ts.map +1 -0
- package/dist/gomtmapi_v2/zod.gen.js +1768 -0
- package/dist/gomtmapi_v2/zod.gen.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/adk-utils.d.ts +24 -0
- package/dist/lib/adk-utils.d.ts.map +1 -0
- package/dist/lib/adk-utils.js +51 -0
- package/dist/lib/adk-utils.js.map +1 -0
- package/dist/lib/constants.d.ts +40 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +40 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/d1-utils.d.ts +5 -0
- package/dist/lib/d1-utils.d.ts.map +1 -0
- package/dist/lib/d1-utils.js +36 -0
- package/dist/lib/d1-utils.js.map +1 -0
- package/dist/lib/get-query-client.d.ts +3 -0
- package/dist/lib/get-query-client.d.ts.map +1 -0
- package/dist/lib/get-query-client.js +43 -0
- package/dist/lib/get-query-client.js.map +1 -0
- package/dist/lib/mtmutils.d.ts +2 -0
- package/dist/lib/mtmutils.d.ts.map +1 -0
- package/dist/lib/mtmutils.js +9 -0
- package/dist/lib/mtmutils.js.map +1 -0
- package/dist/mtgate_api/zod.gen.d.ts +48 -48
- package/dist/mtmai_api/@tanstack/react-query.gen.d.ts +1286 -0
- package/dist/mtmai_api/@tanstack/react-query.gen.d.ts.map +1 -0
- package/dist/mtmai_api/@tanstack/react-query.gen.js +1321 -0
- package/dist/mtmai_api/@tanstack/react-query.gen.js.map +1 -0
- package/dist/mtmai_api/client/client.d.ts +3 -0
- package/dist/mtmai_api/client/client.d.ts.map +1 -0
- package/dist/mtmai_api/client/client.js +146 -0
- package/dist/mtmai_api/client/client.js.map +1 -0
- package/dist/mtmai_api/client/index.d.ts +8 -0
- package/dist/mtmai_api/client/index.d.ts.map +1 -0
- package/dist/mtmai_api/client/index.js +5 -0
- package/dist/mtmai_api/client/index.js.map +1 -0
- package/dist/mtmai_api/client/types.d.ts +120 -0
- package/dist/mtmai_api/client/types.d.ts.map +1 -0
- package/dist/mtmai_api/client/types.js +2 -0
- package/dist/mtmai_api/client/types.js.map +1 -0
- package/dist/mtmai_api/client/utils.d.ts +46 -0
- package/dist/mtmai_api/client/utils.d.ts.map +1 -0
- package/dist/mtmai_api/client/utils.js +285 -0
- package/dist/mtmai_api/client/utils.js.map +1 -0
- package/dist/mtmai_api/client.gen.d.ts +13 -0
- package/dist/mtmai_api/client.gen.d.ts.map +1 -0
- package/dist/mtmai_api/client.gen.js +4 -0
- package/dist/mtmai_api/client.gen.js.map +1 -0
- package/dist/mtmai_api/core/auth.d.ts +19 -0
- package/dist/mtmai_api/core/auth.d.ts.map +1 -0
- package/dist/mtmai_api/core/auth.js +14 -0
- package/dist/mtmai_api/core/auth.js.map +1 -0
- package/dist/mtmai_api/core/bodySerializer.d.ts +18 -0
- package/dist/mtmai_api/core/bodySerializer.d.ts.map +1 -0
- package/dist/mtmai_api/core/bodySerializer.js +54 -0
- package/dist/mtmai_api/core/bodySerializer.js.map +1 -0
- package/dist/mtmai_api/core/params.d.ts +24 -0
- package/dist/mtmai_api/core/params.d.ts.map +1 -0
- package/dist/mtmai_api/core/params.js +88 -0
- package/dist/mtmai_api/core/params.js.map +1 -0
- package/dist/mtmai_api/core/pathSerializer.d.ts +34 -0
- package/dist/mtmai_api/core/pathSerializer.d.ts.map +1 -0
- package/dist/mtmai_api/core/pathSerializer.js +114 -0
- package/dist/mtmai_api/core/pathSerializer.js.map +1 -0
- package/dist/mtmai_api/core/types.d.ts +74 -0
- package/dist/mtmai_api/core/types.d.ts.map +1 -0
- package/dist/mtmai_api/core/types.js +2 -0
- package/dist/mtmai_api/core/types.js.map +1 -0
- package/dist/mtmai_api/index.d.ts +3 -0
- package/dist/mtmai_api/index.d.ts.map +1 -0
- package/dist/mtmai_api/index.js +4 -0
- package/dist/mtmai_api/index.js.map +1 -0
- package/dist/mtmai_api/schemas.gen.d.ts +7364 -0
- package/dist/mtmai_api/schemas.gen.d.ts.map +1 -0
- package/dist/mtmai_api/schemas.gen.js +9574 -0
- package/dist/mtmai_api/schemas.gen.js.map +1 -0
- package/dist/mtmai_api/sdk.gen.d.ts +264 -0
- package/dist/mtmai_api/sdk.gen.d.ts.map +1 -0
- package/dist/mtmai_api/sdk.gen.js +598 -0
- package/dist/mtmai_api/sdk.gen.js.map +1 -0
- package/dist/mtmai_api/types.gen.d.ts +6376 -0
- package/dist/mtmai_api/types.gen.d.ts.map +1 -0
- package/dist/mtmai_api/types.gen.js +240 -0
- package/dist/mtmai_api/types.gen.js.map +1 -0
- package/dist/mtmai_api/zod.gen.d.ts +35067 -0
- package/dist/mtmai_api/zod.gen.d.ts.map +1 -0
- package/dist/mtmai_api/zod.gen.js +2930 -0
- package/dist/mtmai_api/zod.gen.js.map +1 -0
- package/dist/store/MtmsdkProvider.d.ts +15 -0
- package/dist/store/MtmsdkProvider.d.ts.map +1 -0
- package/dist/store/MtmsdkProvider.js +50 -0
- package/dist/store/MtmsdkProvider.js.map +1 -0
- package/dist/store/ReactQueryApiV2Provider.d.ts +10 -0
- package/dist/store/ReactQueryApiV2Provider.d.ts.map +1 -0
- package/dist/store/ReactQueryApiV2Provider.js +24 -0
- package/dist/store/ReactQueryApiV2Provider.js.map +1 -0
- package/dist/store/ReactQueryCfApiProvider.d.ts +9 -0
- package/dist/store/ReactQueryCfApiProvider.d.ts.map +1 -0
- package/dist/store/ReactQueryCfApiProvider.js +26 -0
- package/dist/store/ReactQueryCfApiProvider.js.map +1 -0
- package/dist/store/ReactQueryMtmaiApiProvider.d.ts +10 -0
- package/dist/store/ReactQueryMtmaiApiProvider.d.ts.map +1 -0
- package/dist/store/ReactQueryMtmaiApiProvider.js +23 -0
- package/dist/store/ReactQueryMtmaiApiProvider.js.map +1 -0
- package/dist/store/ReactQueryProvider.d.ts +10 -0
- package/dist/store/ReactQueryProvider.d.ts.map +1 -0
- package/dist/store/ReactQueryProvider.js +24 -0
- package/dist/store/ReactQueryProvider.js.map +1 -0
- package/package.json +69 -15
|
@@ -0,0 +1,2413 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { agentList, agentCreate, getApiV2AgentsDemoChat, agentEvent, agentSchedule, agentDelete, agentGet, agentUpdate, langchatChatbotsList, langchatChatbotsUpsert, langchatChatbotsLogin, langchatChatbotsRun, langchatChatbotsDelete, langchatChatbotsGet, langchatChatbotsUpdate, langchatPlatformTypes, napcatStart, napcatGetStatus, napcatProxyOneBot11Get, napcatProxyOneBot11Post, langchatChatbotsMessagesList, langchatChatbotsMessagesGet, langchatChatbotsSessionsList, pAccountList, pAccountCreate, pAccountExport, pAccountImport, pAccountDelete, pAccountGet, pAccountUpdate, pAccountListBrowserConfigs, pAccountCreateBrowserConfig, pAccountLaunchBrowser, pAccountListSessions, pAccountCreateSession, pAccountDeleteSession, pAccountGetSession, pAccountUpdateSession, platformList, platformCreate, platformExport, platformImport, platformDelete, platformGet, platformUpdate, proxyList, proxyUpsert, proxyDelete, proxyGet, sandboxStartNapcat, napcatCheckStatus, sbServiceList, sbServiceCreate, sbServiceGetServiceTypes, sbServiceDelete, sbServiceGet, sessionGetCurrent, userGetCurrent, napcatProxyWebUiget, napcatProxyWebUipost, } from "../sdk.gen";
|
|
3
|
+
import { queryOptions, infiniteQueryOptions, } from "@tanstack/react-query";
|
|
4
|
+
import { client as _heyApiClient } from "../client.gen";
|
|
5
|
+
const createQueryKey = (id, options, infinite) => {
|
|
6
|
+
const params = {
|
|
7
|
+
_id: id,
|
|
8
|
+
baseUrl: (options?.client ?? _heyApiClient).getConfig().baseUrl,
|
|
9
|
+
};
|
|
10
|
+
if (infinite) {
|
|
11
|
+
params._infinite = infinite;
|
|
12
|
+
}
|
|
13
|
+
if (options?.body) {
|
|
14
|
+
params.body = options.body;
|
|
15
|
+
}
|
|
16
|
+
if (options?.headers) {
|
|
17
|
+
params.headers = options.headers;
|
|
18
|
+
}
|
|
19
|
+
if (options?.path) {
|
|
20
|
+
params.path = options.path;
|
|
21
|
+
}
|
|
22
|
+
if (options?.query) {
|
|
23
|
+
params.query = options.query;
|
|
24
|
+
}
|
|
25
|
+
return [params];
|
|
26
|
+
};
|
|
27
|
+
export const agentListQueryKey = (options) => createQueryKey("agentList", options);
|
|
28
|
+
/**
|
|
29
|
+
* List agents
|
|
30
|
+
* #### Controller:
|
|
31
|
+
*
|
|
32
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/agent.(*AgentService).listAgents`
|
|
33
|
+
*
|
|
34
|
+
* #### Middlewares:
|
|
35
|
+
*
|
|
36
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
37
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
38
|
+
*
|
|
39
|
+
* ---
|
|
40
|
+
*
|
|
41
|
+
* Get a paginated list of agents for the current tenant
|
|
42
|
+
*/
|
|
43
|
+
export const agentListOptions = (options) => {
|
|
44
|
+
return queryOptions({
|
|
45
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
46
|
+
const { data } = await agentList({
|
|
47
|
+
...options,
|
|
48
|
+
...queryKey[0],
|
|
49
|
+
signal,
|
|
50
|
+
throwOnError: true,
|
|
51
|
+
});
|
|
52
|
+
return data;
|
|
53
|
+
},
|
|
54
|
+
queryKey: agentListQueryKey(options),
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
export const agentCreateQueryKey = (options) => createQueryKey("agentCreate", options);
|
|
58
|
+
/**
|
|
59
|
+
* Create agent
|
|
60
|
+
* #### Controller:
|
|
61
|
+
*
|
|
62
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/agent.(*AgentService).createAgent`
|
|
63
|
+
*
|
|
64
|
+
* #### Middlewares:
|
|
65
|
+
*
|
|
66
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
67
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
68
|
+
*
|
|
69
|
+
* ---
|
|
70
|
+
*
|
|
71
|
+
* Create a new agent
|
|
72
|
+
*/
|
|
73
|
+
export const agentCreateOptions = (options) => {
|
|
74
|
+
return queryOptions({
|
|
75
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
76
|
+
const { data } = await agentCreate({
|
|
77
|
+
...options,
|
|
78
|
+
...queryKey[0],
|
|
79
|
+
signal,
|
|
80
|
+
throwOnError: true,
|
|
81
|
+
});
|
|
82
|
+
return data;
|
|
83
|
+
},
|
|
84
|
+
queryKey: agentCreateQueryKey(options),
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Create agent
|
|
89
|
+
* #### Controller:
|
|
90
|
+
*
|
|
91
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/agent.(*AgentService).createAgent`
|
|
92
|
+
*
|
|
93
|
+
* #### Middlewares:
|
|
94
|
+
*
|
|
95
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
96
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
97
|
+
*
|
|
98
|
+
* ---
|
|
99
|
+
*
|
|
100
|
+
* Create a new agent
|
|
101
|
+
*/
|
|
102
|
+
export const agentCreateMutation = (options) => {
|
|
103
|
+
const mutationOptions = {
|
|
104
|
+
mutationFn: async (localOptions) => {
|
|
105
|
+
const { data } = await agentCreate({
|
|
106
|
+
...options,
|
|
107
|
+
...localOptions,
|
|
108
|
+
throwOnError: true,
|
|
109
|
+
});
|
|
110
|
+
return data;
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
return mutationOptions;
|
|
114
|
+
};
|
|
115
|
+
export const getApiV2AgentsDemoChatQueryKey = (options) => createQueryKey("getApiV2AgentsDemoChat", options);
|
|
116
|
+
/**
|
|
117
|
+
* demo chat
|
|
118
|
+
* #### Controller:
|
|
119
|
+
*
|
|
120
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/agent.(*AgentService).demoChat`
|
|
121
|
+
*
|
|
122
|
+
* #### Middlewares:
|
|
123
|
+
*
|
|
124
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
125
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
126
|
+
*
|
|
127
|
+
* ---
|
|
128
|
+
*
|
|
129
|
+
*
|
|
130
|
+
*/
|
|
131
|
+
export const getApiV2AgentsDemoChatOptions = (options) => {
|
|
132
|
+
return queryOptions({
|
|
133
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
134
|
+
const { data } = await getApiV2AgentsDemoChat({
|
|
135
|
+
...options,
|
|
136
|
+
...queryKey[0],
|
|
137
|
+
signal,
|
|
138
|
+
throwOnError: true,
|
|
139
|
+
});
|
|
140
|
+
return data;
|
|
141
|
+
},
|
|
142
|
+
queryKey: getApiV2AgentsDemoChatQueryKey(options),
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
export const agentEventQueryKey = (options) => createQueryKey("agentEvent", options);
|
|
146
|
+
/**
|
|
147
|
+
* agent 事件提交
|
|
148
|
+
* #### Controller:
|
|
149
|
+
*
|
|
150
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/agent.(*AgentService).event`
|
|
151
|
+
*
|
|
152
|
+
* #### Middlewares:
|
|
153
|
+
*
|
|
154
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
155
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
156
|
+
*
|
|
157
|
+
* ---
|
|
158
|
+
*
|
|
159
|
+
* agen 事件提交
|
|
160
|
+
*/
|
|
161
|
+
export const agentEventOptions = (options) => {
|
|
162
|
+
return queryOptions({
|
|
163
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
164
|
+
const { data } = await agentEvent({
|
|
165
|
+
...options,
|
|
166
|
+
...queryKey[0],
|
|
167
|
+
signal,
|
|
168
|
+
throwOnError: true,
|
|
169
|
+
});
|
|
170
|
+
return data;
|
|
171
|
+
},
|
|
172
|
+
queryKey: agentEventQueryKey(options),
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
/**
|
|
176
|
+
* agent 事件提交
|
|
177
|
+
* #### Controller:
|
|
178
|
+
*
|
|
179
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/agent.(*AgentService).event`
|
|
180
|
+
*
|
|
181
|
+
* #### Middlewares:
|
|
182
|
+
*
|
|
183
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
184
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
185
|
+
*
|
|
186
|
+
* ---
|
|
187
|
+
*
|
|
188
|
+
* agen 事件提交
|
|
189
|
+
*/
|
|
190
|
+
export const agentEventMutation = (options) => {
|
|
191
|
+
const mutationOptions = {
|
|
192
|
+
mutationFn: async (localOptions) => {
|
|
193
|
+
const { data } = await agentEvent({
|
|
194
|
+
...options,
|
|
195
|
+
...localOptions,
|
|
196
|
+
throwOnError: true,
|
|
197
|
+
});
|
|
198
|
+
return data;
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
return mutationOptions;
|
|
202
|
+
};
|
|
203
|
+
export const agentScheduleQueryKey = (options) => createQueryKey("agentSchedule", options);
|
|
204
|
+
/**
|
|
205
|
+
* agent 事件提交
|
|
206
|
+
* #### Controller:
|
|
207
|
+
*
|
|
208
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/agent.(*AgentService).listAgentSchedule`
|
|
209
|
+
*
|
|
210
|
+
* #### Middlewares:
|
|
211
|
+
*
|
|
212
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
213
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
214
|
+
*
|
|
215
|
+
* ---
|
|
216
|
+
*
|
|
217
|
+
* agen 事件提交
|
|
218
|
+
*/
|
|
219
|
+
export const agentScheduleOptions = (options) => {
|
|
220
|
+
return queryOptions({
|
|
221
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
222
|
+
const { data } = await agentSchedule({
|
|
223
|
+
...options,
|
|
224
|
+
...queryKey[0],
|
|
225
|
+
signal,
|
|
226
|
+
throwOnError: true,
|
|
227
|
+
});
|
|
228
|
+
return data;
|
|
229
|
+
},
|
|
230
|
+
queryKey: agentScheduleQueryKey(options),
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Delete agent
|
|
235
|
+
* #### Controller:
|
|
236
|
+
*
|
|
237
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/agent.(*AgentService).deleteAgent`
|
|
238
|
+
*
|
|
239
|
+
* #### Middlewares:
|
|
240
|
+
*
|
|
241
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
242
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
243
|
+
*
|
|
244
|
+
* ---
|
|
245
|
+
*
|
|
246
|
+
* Delete an agent
|
|
247
|
+
*/
|
|
248
|
+
export const agentDeleteMutation = (options) => {
|
|
249
|
+
const mutationOptions = {
|
|
250
|
+
mutationFn: async (localOptions) => {
|
|
251
|
+
const { data } = await agentDelete({
|
|
252
|
+
...options,
|
|
253
|
+
...localOptions,
|
|
254
|
+
throwOnError: true,
|
|
255
|
+
});
|
|
256
|
+
return data;
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
return mutationOptions;
|
|
260
|
+
};
|
|
261
|
+
export const agentGetQueryKey = (options) => createQueryKey("agentGet", options);
|
|
262
|
+
/**
|
|
263
|
+
* Get agent
|
|
264
|
+
* #### Controller:
|
|
265
|
+
*
|
|
266
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/agent.(*AgentService).getAgent`
|
|
267
|
+
*
|
|
268
|
+
* #### Middlewares:
|
|
269
|
+
*
|
|
270
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
271
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
272
|
+
*
|
|
273
|
+
* ---
|
|
274
|
+
*
|
|
275
|
+
* Get a specific agent by ID
|
|
276
|
+
*/
|
|
277
|
+
export const agentGetOptions = (options) => {
|
|
278
|
+
return queryOptions({
|
|
279
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
280
|
+
const { data } = await agentGet({
|
|
281
|
+
...options,
|
|
282
|
+
...queryKey[0],
|
|
283
|
+
signal,
|
|
284
|
+
throwOnError: true,
|
|
285
|
+
});
|
|
286
|
+
return data;
|
|
287
|
+
},
|
|
288
|
+
queryKey: agentGetQueryKey(options),
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
/**
|
|
292
|
+
* Update agent
|
|
293
|
+
* #### Controller:
|
|
294
|
+
*
|
|
295
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/agent.(*AgentService).updateAgent`
|
|
296
|
+
*
|
|
297
|
+
* #### Middlewares:
|
|
298
|
+
*
|
|
299
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
300
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
301
|
+
*
|
|
302
|
+
* ---
|
|
303
|
+
*
|
|
304
|
+
* Update an existing agent
|
|
305
|
+
*/
|
|
306
|
+
export const agentUpdateMutation = (options) => {
|
|
307
|
+
const mutationOptions = {
|
|
308
|
+
mutationFn: async (localOptions) => {
|
|
309
|
+
const { data } = await agentUpdate({
|
|
310
|
+
...options,
|
|
311
|
+
...localOptions,
|
|
312
|
+
throwOnError: true,
|
|
313
|
+
});
|
|
314
|
+
return data;
|
|
315
|
+
},
|
|
316
|
+
};
|
|
317
|
+
return mutationOptions;
|
|
318
|
+
};
|
|
319
|
+
export const langchatChatbotsListQueryKey = (options) => createQueryKey("langchatChatbotsList", options);
|
|
320
|
+
/**
|
|
321
|
+
* List chatbots
|
|
322
|
+
* #### Controller:
|
|
323
|
+
*
|
|
324
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).listChatbots`
|
|
325
|
+
*
|
|
326
|
+
* #### Middlewares:
|
|
327
|
+
*
|
|
328
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
329
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
330
|
+
*
|
|
331
|
+
* ---
|
|
332
|
+
*
|
|
333
|
+
* Get a paginated list of chatbots for the current tenant
|
|
334
|
+
*/
|
|
335
|
+
export const langchatChatbotsListOptions = (options) => {
|
|
336
|
+
return queryOptions({
|
|
337
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
338
|
+
const { data } = await langchatChatbotsList({
|
|
339
|
+
...options,
|
|
340
|
+
...queryKey[0],
|
|
341
|
+
signal,
|
|
342
|
+
throwOnError: true,
|
|
343
|
+
});
|
|
344
|
+
return data;
|
|
345
|
+
},
|
|
346
|
+
queryKey: langchatChatbotsListQueryKey(options),
|
|
347
|
+
});
|
|
348
|
+
};
|
|
349
|
+
export const langchatChatbotsUpsertQueryKey = (options) => createQueryKey("langchatChatbotsUpsert", options);
|
|
350
|
+
/**
|
|
351
|
+
* Create or update chatbot
|
|
352
|
+
* #### Controller:
|
|
353
|
+
*
|
|
354
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).upsertChatbot`
|
|
355
|
+
*
|
|
356
|
+
* #### Middlewares:
|
|
357
|
+
*
|
|
358
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
359
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
360
|
+
*
|
|
361
|
+
* ---
|
|
362
|
+
*
|
|
363
|
+
* Create a new chatbot or update an existing one
|
|
364
|
+
*/
|
|
365
|
+
export const langchatChatbotsUpsertOptions = (options) => {
|
|
366
|
+
return queryOptions({
|
|
367
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
368
|
+
const { data } = await langchatChatbotsUpsert({
|
|
369
|
+
...options,
|
|
370
|
+
...queryKey[0],
|
|
371
|
+
signal,
|
|
372
|
+
throwOnError: true,
|
|
373
|
+
});
|
|
374
|
+
return data;
|
|
375
|
+
},
|
|
376
|
+
queryKey: langchatChatbotsUpsertQueryKey(options),
|
|
377
|
+
});
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Create or update chatbot
|
|
381
|
+
* #### Controller:
|
|
382
|
+
*
|
|
383
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).upsertChatbot`
|
|
384
|
+
*
|
|
385
|
+
* #### Middlewares:
|
|
386
|
+
*
|
|
387
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
388
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
389
|
+
*
|
|
390
|
+
* ---
|
|
391
|
+
*
|
|
392
|
+
* Create a new chatbot or update an existing one
|
|
393
|
+
*/
|
|
394
|
+
export const langchatChatbotsUpsertMutation = (options) => {
|
|
395
|
+
const mutationOptions = {
|
|
396
|
+
mutationFn: async (localOptions) => {
|
|
397
|
+
const { data } = await langchatChatbotsUpsert({
|
|
398
|
+
...options,
|
|
399
|
+
...localOptions,
|
|
400
|
+
throwOnError: true,
|
|
401
|
+
});
|
|
402
|
+
return data;
|
|
403
|
+
},
|
|
404
|
+
};
|
|
405
|
+
return mutationOptions;
|
|
406
|
+
};
|
|
407
|
+
export const langchatChatbotsLoginQueryKey = (options) => createQueryKey("langchatChatbotsLogin", options);
|
|
408
|
+
/**
|
|
409
|
+
* Login chatbot
|
|
410
|
+
* #### Controller:
|
|
411
|
+
*
|
|
412
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).loginChatbot`
|
|
413
|
+
*
|
|
414
|
+
* #### Middlewares:
|
|
415
|
+
*
|
|
416
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
417
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
418
|
+
*
|
|
419
|
+
* ---
|
|
420
|
+
*
|
|
421
|
+
* Trigger the chatbot login workflow
|
|
422
|
+
*/
|
|
423
|
+
export const langchatChatbotsLoginOptions = (options) => {
|
|
424
|
+
return queryOptions({
|
|
425
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
426
|
+
const { data } = await langchatChatbotsLogin({
|
|
427
|
+
...options,
|
|
428
|
+
...queryKey[0],
|
|
429
|
+
signal,
|
|
430
|
+
throwOnError: true,
|
|
431
|
+
});
|
|
432
|
+
return data;
|
|
433
|
+
},
|
|
434
|
+
queryKey: langchatChatbotsLoginQueryKey(options),
|
|
435
|
+
});
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* Login chatbot
|
|
439
|
+
* #### Controller:
|
|
440
|
+
*
|
|
441
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).loginChatbot`
|
|
442
|
+
*
|
|
443
|
+
* #### Middlewares:
|
|
444
|
+
*
|
|
445
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
446
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
447
|
+
*
|
|
448
|
+
* ---
|
|
449
|
+
*
|
|
450
|
+
* Trigger the chatbot login workflow
|
|
451
|
+
*/
|
|
452
|
+
export const langchatChatbotsLoginMutation = (options) => {
|
|
453
|
+
const mutationOptions = {
|
|
454
|
+
mutationFn: async (localOptions) => {
|
|
455
|
+
const { data } = await langchatChatbotsLogin({
|
|
456
|
+
...options,
|
|
457
|
+
...localOptions,
|
|
458
|
+
throwOnError: true,
|
|
459
|
+
});
|
|
460
|
+
return data;
|
|
461
|
+
},
|
|
462
|
+
};
|
|
463
|
+
return mutationOptions;
|
|
464
|
+
};
|
|
465
|
+
export const langchatChatbotsRunQueryKey = (options) => createQueryKey("langchatChatbotsRun", options);
|
|
466
|
+
/**
|
|
467
|
+
* Run chatbot
|
|
468
|
+
* #### Controller:
|
|
469
|
+
*
|
|
470
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).runChatbot`
|
|
471
|
+
*
|
|
472
|
+
* #### Middlewares:
|
|
473
|
+
*
|
|
474
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
475
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
476
|
+
*
|
|
477
|
+
* ---
|
|
478
|
+
*
|
|
479
|
+
* Trigger the chatbot startup workflow
|
|
480
|
+
*/
|
|
481
|
+
export const langchatChatbotsRunOptions = (options) => {
|
|
482
|
+
return queryOptions({
|
|
483
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
484
|
+
const { data } = await langchatChatbotsRun({
|
|
485
|
+
...options,
|
|
486
|
+
...queryKey[0],
|
|
487
|
+
signal,
|
|
488
|
+
throwOnError: true,
|
|
489
|
+
});
|
|
490
|
+
return data;
|
|
491
|
+
},
|
|
492
|
+
queryKey: langchatChatbotsRunQueryKey(options),
|
|
493
|
+
});
|
|
494
|
+
};
|
|
495
|
+
/**
|
|
496
|
+
* Run chatbot
|
|
497
|
+
* #### Controller:
|
|
498
|
+
*
|
|
499
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).runChatbot`
|
|
500
|
+
*
|
|
501
|
+
* #### Middlewares:
|
|
502
|
+
*
|
|
503
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
504
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
505
|
+
*
|
|
506
|
+
* ---
|
|
507
|
+
*
|
|
508
|
+
* Trigger the chatbot startup workflow
|
|
509
|
+
*/
|
|
510
|
+
export const langchatChatbotsRunMutation = (options) => {
|
|
511
|
+
const mutationOptions = {
|
|
512
|
+
mutationFn: async (localOptions) => {
|
|
513
|
+
const { data } = await langchatChatbotsRun({
|
|
514
|
+
...options,
|
|
515
|
+
...localOptions,
|
|
516
|
+
throwOnError: true,
|
|
517
|
+
});
|
|
518
|
+
return data;
|
|
519
|
+
},
|
|
520
|
+
};
|
|
521
|
+
return mutationOptions;
|
|
522
|
+
};
|
|
523
|
+
/**
|
|
524
|
+
* Delete chatbot
|
|
525
|
+
* #### Controller:
|
|
526
|
+
*
|
|
527
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).deleteChatbot`
|
|
528
|
+
*
|
|
529
|
+
* #### Middlewares:
|
|
530
|
+
*
|
|
531
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
532
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
533
|
+
*
|
|
534
|
+
* ---
|
|
535
|
+
*
|
|
536
|
+
* Delete a chatbot
|
|
537
|
+
*/
|
|
538
|
+
export const langchatChatbotsDeleteMutation = (options) => {
|
|
539
|
+
const mutationOptions = {
|
|
540
|
+
mutationFn: async (localOptions) => {
|
|
541
|
+
const { data } = await langchatChatbotsDelete({
|
|
542
|
+
...options,
|
|
543
|
+
...localOptions,
|
|
544
|
+
throwOnError: true,
|
|
545
|
+
});
|
|
546
|
+
return data;
|
|
547
|
+
},
|
|
548
|
+
};
|
|
549
|
+
return mutationOptions;
|
|
550
|
+
};
|
|
551
|
+
export const langchatChatbotsGetQueryKey = (options) => createQueryKey("langchatChatbotsGet", options);
|
|
552
|
+
/**
|
|
553
|
+
* Get chatbot
|
|
554
|
+
* #### Controller:
|
|
555
|
+
*
|
|
556
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).getChatbot`
|
|
557
|
+
*
|
|
558
|
+
* #### Middlewares:
|
|
559
|
+
*
|
|
560
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
561
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
562
|
+
*
|
|
563
|
+
* ---
|
|
564
|
+
*
|
|
565
|
+
* Get a specific chatbot by ID
|
|
566
|
+
*/
|
|
567
|
+
export const langchatChatbotsGetOptions = (options) => {
|
|
568
|
+
return queryOptions({
|
|
569
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
570
|
+
const { data } = await langchatChatbotsGet({
|
|
571
|
+
...options,
|
|
572
|
+
...queryKey[0],
|
|
573
|
+
signal,
|
|
574
|
+
throwOnError: true,
|
|
575
|
+
});
|
|
576
|
+
return data;
|
|
577
|
+
},
|
|
578
|
+
queryKey: langchatChatbotsGetQueryKey(options),
|
|
579
|
+
});
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
* Update chatbot
|
|
583
|
+
* #### Controller:
|
|
584
|
+
*
|
|
585
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).upsertChatbotByPath`
|
|
586
|
+
*
|
|
587
|
+
* #### Middlewares:
|
|
588
|
+
*
|
|
589
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
590
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
591
|
+
*
|
|
592
|
+
* ---
|
|
593
|
+
*
|
|
594
|
+
* Update an existing chatbot
|
|
595
|
+
*/
|
|
596
|
+
export const langchatChatbotsUpdateMutation = (options) => {
|
|
597
|
+
const mutationOptions = {
|
|
598
|
+
mutationFn: async (localOptions) => {
|
|
599
|
+
const { data } = await langchatChatbotsUpdate({
|
|
600
|
+
...options,
|
|
601
|
+
...localOptions,
|
|
602
|
+
throwOnError: true,
|
|
603
|
+
});
|
|
604
|
+
return data;
|
|
605
|
+
},
|
|
606
|
+
};
|
|
607
|
+
return mutationOptions;
|
|
608
|
+
};
|
|
609
|
+
export const langchatPlatformTypesQueryKey = (options) => createQueryKey("langchatPlatformTypes", options);
|
|
610
|
+
/**
|
|
611
|
+
* List platform types
|
|
612
|
+
* #### Controller:
|
|
613
|
+
*
|
|
614
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/langchat.(*LangchatService).listPlatformTypes`
|
|
615
|
+
*
|
|
616
|
+
* #### Middlewares:
|
|
617
|
+
*
|
|
618
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
619
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
620
|
+
*
|
|
621
|
+
* ---
|
|
622
|
+
*
|
|
623
|
+
* Get available platform types
|
|
624
|
+
*/
|
|
625
|
+
export const langchatPlatformTypesOptions = (options) => {
|
|
626
|
+
return queryOptions({
|
|
627
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
628
|
+
const { data } = await langchatPlatformTypes({
|
|
629
|
+
...options,
|
|
630
|
+
...queryKey[0],
|
|
631
|
+
signal,
|
|
632
|
+
throwOnError: true,
|
|
633
|
+
});
|
|
634
|
+
return data;
|
|
635
|
+
},
|
|
636
|
+
queryKey: langchatPlatformTypesQueryKey(options),
|
|
637
|
+
});
|
|
638
|
+
};
|
|
639
|
+
export const napcatStartQueryKey = (options) => createQueryKey("napcatStart", options);
|
|
640
|
+
/**
|
|
641
|
+
* Start napcat service
|
|
642
|
+
* #### Controller:
|
|
643
|
+
*
|
|
644
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/napcat.(*NapcatService).StartNapcat`
|
|
645
|
+
*
|
|
646
|
+
* #### Middlewares:
|
|
647
|
+
*
|
|
648
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
649
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
650
|
+
*
|
|
651
|
+
* ---
|
|
652
|
+
*
|
|
653
|
+
* Start napcat service with specified configuration
|
|
654
|
+
*/
|
|
655
|
+
export const napcatStartOptions = (options) => {
|
|
656
|
+
return queryOptions({
|
|
657
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
658
|
+
const { data } = await napcatStart({
|
|
659
|
+
...options,
|
|
660
|
+
...queryKey[0],
|
|
661
|
+
signal,
|
|
662
|
+
throwOnError: true,
|
|
663
|
+
});
|
|
664
|
+
return data;
|
|
665
|
+
},
|
|
666
|
+
queryKey: napcatStartQueryKey(options),
|
|
667
|
+
});
|
|
668
|
+
};
|
|
669
|
+
/**
|
|
670
|
+
* Start napcat service
|
|
671
|
+
* #### Controller:
|
|
672
|
+
*
|
|
673
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/napcat.(*NapcatService).StartNapcat`
|
|
674
|
+
*
|
|
675
|
+
* #### Middlewares:
|
|
676
|
+
*
|
|
677
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
678
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
679
|
+
*
|
|
680
|
+
* ---
|
|
681
|
+
*
|
|
682
|
+
* Start napcat service with specified configuration
|
|
683
|
+
*/
|
|
684
|
+
export const napcatStartMutation = (options) => {
|
|
685
|
+
const mutationOptions = {
|
|
686
|
+
mutationFn: async (localOptions) => {
|
|
687
|
+
const { data } = await napcatStart({
|
|
688
|
+
...options,
|
|
689
|
+
...localOptions,
|
|
690
|
+
throwOnError: true,
|
|
691
|
+
});
|
|
692
|
+
return data;
|
|
693
|
+
},
|
|
694
|
+
};
|
|
695
|
+
return mutationOptions;
|
|
696
|
+
};
|
|
697
|
+
export const napcatGetStatusQueryKey = (options) => createQueryKey("napcatGetStatus", options);
|
|
698
|
+
/**
|
|
699
|
+
* Get napcat status
|
|
700
|
+
* #### Controller:
|
|
701
|
+
*
|
|
702
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/napcat.(*NapcatService).GetStatus`
|
|
703
|
+
*
|
|
704
|
+
* #### Middlewares:
|
|
705
|
+
*
|
|
706
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
707
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
708
|
+
*
|
|
709
|
+
* ---
|
|
710
|
+
*
|
|
711
|
+
* Get current napcat running status
|
|
712
|
+
*/
|
|
713
|
+
export const napcatGetStatusOptions = (options) => {
|
|
714
|
+
return queryOptions({
|
|
715
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
716
|
+
const { data } = await napcatGetStatus({
|
|
717
|
+
...options,
|
|
718
|
+
...queryKey[0],
|
|
719
|
+
signal,
|
|
720
|
+
throwOnError: true,
|
|
721
|
+
});
|
|
722
|
+
return data;
|
|
723
|
+
},
|
|
724
|
+
queryKey: napcatGetStatusQueryKey(options),
|
|
725
|
+
});
|
|
726
|
+
};
|
|
727
|
+
export const napcatProxyOneBot11GetQueryKey = (options) => createQueryKey("napcatProxyOneBot11Get", options);
|
|
728
|
+
/**
|
|
729
|
+
* Proxy OneBot11 API GET requests
|
|
730
|
+
* #### Controller:
|
|
731
|
+
*
|
|
732
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/napcat.(*NapcatService).ProxyToNapcat`
|
|
733
|
+
*
|
|
734
|
+
* #### Middlewares:
|
|
735
|
+
*
|
|
736
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
737
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
738
|
+
*
|
|
739
|
+
* ---
|
|
740
|
+
*
|
|
741
|
+
* Proxy all OneBot11 API GET requests to napcat HTTP server
|
|
742
|
+
*/
|
|
743
|
+
export const napcatProxyOneBot11GetOptions = (options) => {
|
|
744
|
+
return queryOptions({
|
|
745
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
746
|
+
const { data } = await napcatProxyOneBot11Get({
|
|
747
|
+
...options,
|
|
748
|
+
...queryKey[0],
|
|
749
|
+
signal,
|
|
750
|
+
throwOnError: true,
|
|
751
|
+
});
|
|
752
|
+
return data;
|
|
753
|
+
},
|
|
754
|
+
queryKey: napcatProxyOneBot11GetQueryKey(options),
|
|
755
|
+
});
|
|
756
|
+
};
|
|
757
|
+
export const napcatProxyOneBot11PostQueryKey = (options) => createQueryKey("napcatProxyOneBot11Post", options);
|
|
758
|
+
/**
|
|
759
|
+
* Proxy OneBot11 API POST requests
|
|
760
|
+
* #### Controller:
|
|
761
|
+
*
|
|
762
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/napcat.(*NapcatService).ProxyToNapcat`
|
|
763
|
+
*
|
|
764
|
+
* #### Middlewares:
|
|
765
|
+
*
|
|
766
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
767
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
768
|
+
*
|
|
769
|
+
* ---
|
|
770
|
+
*
|
|
771
|
+
* Proxy all OneBot11 API POST requests to napcat HTTP server
|
|
772
|
+
*/
|
|
773
|
+
export const napcatProxyOneBot11PostOptions = (options) => {
|
|
774
|
+
return queryOptions({
|
|
775
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
776
|
+
const { data } = await napcatProxyOneBot11Post({
|
|
777
|
+
...options,
|
|
778
|
+
...queryKey[0],
|
|
779
|
+
signal,
|
|
780
|
+
throwOnError: true,
|
|
781
|
+
});
|
|
782
|
+
return data;
|
|
783
|
+
},
|
|
784
|
+
queryKey: napcatProxyOneBot11PostQueryKey(options),
|
|
785
|
+
});
|
|
786
|
+
};
|
|
787
|
+
/**
|
|
788
|
+
* Proxy OneBot11 API POST requests
|
|
789
|
+
* #### Controller:
|
|
790
|
+
*
|
|
791
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/napcat.(*NapcatService).ProxyToNapcat`
|
|
792
|
+
*
|
|
793
|
+
* #### Middlewares:
|
|
794
|
+
*
|
|
795
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
796
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
797
|
+
*
|
|
798
|
+
* ---
|
|
799
|
+
*
|
|
800
|
+
* Proxy all OneBot11 API POST requests to napcat HTTP server
|
|
801
|
+
*/
|
|
802
|
+
export const napcatProxyOneBot11PostMutation = (options) => {
|
|
803
|
+
const mutationOptions = {
|
|
804
|
+
mutationFn: async (localOptions) => {
|
|
805
|
+
const { data } = await napcatProxyOneBot11Post({
|
|
806
|
+
...options,
|
|
807
|
+
...localOptions,
|
|
808
|
+
throwOnError: true,
|
|
809
|
+
});
|
|
810
|
+
return data;
|
|
811
|
+
},
|
|
812
|
+
};
|
|
813
|
+
return mutationOptions;
|
|
814
|
+
};
|
|
815
|
+
export const langchatChatbotsMessagesListQueryKey = (options) => createQueryKey("langchatChatbotsMessagesList", options);
|
|
816
|
+
/**
|
|
817
|
+
* List OneBot11 messages
|
|
818
|
+
* #### Controller:
|
|
819
|
+
*
|
|
820
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/onebot11.(*OneBot11Service).ListMessages`
|
|
821
|
+
*
|
|
822
|
+
* #### Middlewares:
|
|
823
|
+
*
|
|
824
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
825
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
826
|
+
*
|
|
827
|
+
* ---
|
|
828
|
+
*
|
|
829
|
+
* Get a list of OneBot11 messages with optional filtering
|
|
830
|
+
*/
|
|
831
|
+
export const langchatChatbotsMessagesListOptions = (options) => {
|
|
832
|
+
return queryOptions({
|
|
833
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
834
|
+
const { data } = await langchatChatbotsMessagesList({
|
|
835
|
+
...options,
|
|
836
|
+
...queryKey[0],
|
|
837
|
+
signal,
|
|
838
|
+
throwOnError: true,
|
|
839
|
+
});
|
|
840
|
+
return data;
|
|
841
|
+
},
|
|
842
|
+
queryKey: langchatChatbotsMessagesListQueryKey(options),
|
|
843
|
+
});
|
|
844
|
+
};
|
|
845
|
+
const createInfiniteParams = (queryKey, page) => {
|
|
846
|
+
const params = {
|
|
847
|
+
...queryKey[0],
|
|
848
|
+
};
|
|
849
|
+
if (page.body) {
|
|
850
|
+
params.body = {
|
|
851
|
+
...queryKey[0].body,
|
|
852
|
+
...page.body,
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
if (page.headers) {
|
|
856
|
+
params.headers = {
|
|
857
|
+
...queryKey[0].headers,
|
|
858
|
+
...page.headers,
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
if (page.path) {
|
|
862
|
+
params.path = {
|
|
863
|
+
...queryKey[0].path,
|
|
864
|
+
...page.path,
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
if (page.query) {
|
|
868
|
+
params.query = {
|
|
869
|
+
...queryKey[0].query,
|
|
870
|
+
...page.query,
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
return params;
|
|
874
|
+
};
|
|
875
|
+
export const langchatChatbotsMessagesListInfiniteQueryKey = (options) => createQueryKey("langchatChatbotsMessagesList", options, true);
|
|
876
|
+
/**
|
|
877
|
+
* List OneBot11 messages
|
|
878
|
+
* #### Controller:
|
|
879
|
+
*
|
|
880
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/onebot11.(*OneBot11Service).ListMessages`
|
|
881
|
+
*
|
|
882
|
+
* #### Middlewares:
|
|
883
|
+
*
|
|
884
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
885
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
886
|
+
*
|
|
887
|
+
* ---
|
|
888
|
+
*
|
|
889
|
+
* Get a list of OneBot11 messages with optional filtering
|
|
890
|
+
*/
|
|
891
|
+
export const langchatChatbotsMessagesListInfiniteOptions = (options) => {
|
|
892
|
+
return infiniteQueryOptions(
|
|
893
|
+
// @ts-ignore
|
|
894
|
+
{
|
|
895
|
+
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
896
|
+
// @ts-ignore
|
|
897
|
+
const page = typeof pageParam === "object"
|
|
898
|
+
? pageParam
|
|
899
|
+
: {
|
|
900
|
+
query: {
|
|
901
|
+
page: pageParam,
|
|
902
|
+
},
|
|
903
|
+
};
|
|
904
|
+
const params = createInfiniteParams(queryKey, page);
|
|
905
|
+
const { data } = await langchatChatbotsMessagesList({
|
|
906
|
+
...options,
|
|
907
|
+
...params,
|
|
908
|
+
signal,
|
|
909
|
+
throwOnError: true,
|
|
910
|
+
});
|
|
911
|
+
return data;
|
|
912
|
+
},
|
|
913
|
+
queryKey: langchatChatbotsMessagesListInfiniteQueryKey(options),
|
|
914
|
+
});
|
|
915
|
+
};
|
|
916
|
+
export const langchatChatbotsMessagesGetQueryKey = (options) => createQueryKey("langchatChatbotsMessagesGet", options);
|
|
917
|
+
/**
|
|
918
|
+
* Get OneBot11 message
|
|
919
|
+
* #### Controller:
|
|
920
|
+
*
|
|
921
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/onebot11.(*OneBot11Service).GetMessage`
|
|
922
|
+
*
|
|
923
|
+
* #### Middlewares:
|
|
924
|
+
*
|
|
925
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
926
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
927
|
+
*
|
|
928
|
+
* ---
|
|
929
|
+
*
|
|
930
|
+
* Get a specific OneBot11 message by ID
|
|
931
|
+
*/
|
|
932
|
+
export const langchatChatbotsMessagesGetOptions = (options) => {
|
|
933
|
+
return queryOptions({
|
|
934
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
935
|
+
const { data } = await langchatChatbotsMessagesGet({
|
|
936
|
+
...options,
|
|
937
|
+
...queryKey[0],
|
|
938
|
+
signal,
|
|
939
|
+
throwOnError: true,
|
|
940
|
+
});
|
|
941
|
+
return data;
|
|
942
|
+
},
|
|
943
|
+
queryKey: langchatChatbotsMessagesGetQueryKey(options),
|
|
944
|
+
});
|
|
945
|
+
};
|
|
946
|
+
export const langchatChatbotsSessionsListQueryKey = (options) => createQueryKey("langchatChatbotsSessionsList", options);
|
|
947
|
+
/**
|
|
948
|
+
* List OneBot11 sessions
|
|
949
|
+
* #### Controller:
|
|
950
|
+
*
|
|
951
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/onebot11.(*OneBot11Service).ListSessions`
|
|
952
|
+
*
|
|
953
|
+
* #### Middlewares:
|
|
954
|
+
*
|
|
955
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
956
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
957
|
+
*
|
|
958
|
+
* ---
|
|
959
|
+
*
|
|
960
|
+
* Get a list of OneBot11 sessions with optional filtering
|
|
961
|
+
*/
|
|
962
|
+
export const langchatChatbotsSessionsListOptions = (options) => {
|
|
963
|
+
return queryOptions({
|
|
964
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
965
|
+
const { data } = await langchatChatbotsSessionsList({
|
|
966
|
+
...options,
|
|
967
|
+
...queryKey[0],
|
|
968
|
+
signal,
|
|
969
|
+
throwOnError: true,
|
|
970
|
+
});
|
|
971
|
+
return data;
|
|
972
|
+
},
|
|
973
|
+
queryKey: langchatChatbotsSessionsListQueryKey(options),
|
|
974
|
+
});
|
|
975
|
+
};
|
|
976
|
+
export const langchatChatbotsSessionsListInfiniteQueryKey = (options) => createQueryKey("langchatChatbotsSessionsList", options, true);
|
|
977
|
+
/**
|
|
978
|
+
* List OneBot11 sessions
|
|
979
|
+
* #### Controller:
|
|
980
|
+
*
|
|
981
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/onebot11.(*OneBot11Service).ListSessions`
|
|
982
|
+
*
|
|
983
|
+
* #### Middlewares:
|
|
984
|
+
*
|
|
985
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
986
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
987
|
+
*
|
|
988
|
+
* ---
|
|
989
|
+
*
|
|
990
|
+
* Get a list of OneBot11 sessions with optional filtering
|
|
991
|
+
*/
|
|
992
|
+
export const langchatChatbotsSessionsListInfiniteOptions = (options) => {
|
|
993
|
+
return infiniteQueryOptions(
|
|
994
|
+
// @ts-ignore
|
|
995
|
+
{
|
|
996
|
+
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
997
|
+
// @ts-ignore
|
|
998
|
+
const page = typeof pageParam === "object"
|
|
999
|
+
? pageParam
|
|
1000
|
+
: {
|
|
1001
|
+
query: {
|
|
1002
|
+
page: pageParam,
|
|
1003
|
+
},
|
|
1004
|
+
};
|
|
1005
|
+
const params = createInfiniteParams(queryKey, page);
|
|
1006
|
+
const { data } = await langchatChatbotsSessionsList({
|
|
1007
|
+
...options,
|
|
1008
|
+
...params,
|
|
1009
|
+
signal,
|
|
1010
|
+
throwOnError: true,
|
|
1011
|
+
});
|
|
1012
|
+
return data;
|
|
1013
|
+
},
|
|
1014
|
+
queryKey: langchatChatbotsSessionsListInfiniteQueryKey(options),
|
|
1015
|
+
});
|
|
1016
|
+
};
|
|
1017
|
+
export const pAccountListQueryKey = (options) => createQueryKey("pAccountList", options);
|
|
1018
|
+
/**
|
|
1019
|
+
* List platform accounts
|
|
1020
|
+
* #### Controller:
|
|
1021
|
+
*
|
|
1022
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).listPAccounts`
|
|
1023
|
+
*
|
|
1024
|
+
* #### Middlewares:
|
|
1025
|
+
*
|
|
1026
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1027
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1028
|
+
*
|
|
1029
|
+
* ---
|
|
1030
|
+
*
|
|
1031
|
+
* Get list of platform accounts with pagination
|
|
1032
|
+
*/
|
|
1033
|
+
export const pAccountListOptions = (options) => {
|
|
1034
|
+
return queryOptions({
|
|
1035
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1036
|
+
const { data } = await pAccountList({
|
|
1037
|
+
...options,
|
|
1038
|
+
...queryKey[0],
|
|
1039
|
+
signal,
|
|
1040
|
+
throwOnError: true,
|
|
1041
|
+
});
|
|
1042
|
+
return data;
|
|
1043
|
+
},
|
|
1044
|
+
queryKey: pAccountListQueryKey(options),
|
|
1045
|
+
});
|
|
1046
|
+
};
|
|
1047
|
+
export const pAccountCreateQueryKey = (options) => createQueryKey("pAccountCreate", options);
|
|
1048
|
+
/**
|
|
1049
|
+
* Create platform account
|
|
1050
|
+
* #### Controller:
|
|
1051
|
+
*
|
|
1052
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).createPAccount`
|
|
1053
|
+
*
|
|
1054
|
+
* #### Middlewares:
|
|
1055
|
+
*
|
|
1056
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1057
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1058
|
+
*
|
|
1059
|
+
* ---
|
|
1060
|
+
*
|
|
1061
|
+
* Create a new platform account
|
|
1062
|
+
*/
|
|
1063
|
+
export const pAccountCreateOptions = (options) => {
|
|
1064
|
+
return queryOptions({
|
|
1065
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1066
|
+
const { data } = await pAccountCreate({
|
|
1067
|
+
...options,
|
|
1068
|
+
...queryKey[0],
|
|
1069
|
+
signal,
|
|
1070
|
+
throwOnError: true,
|
|
1071
|
+
});
|
|
1072
|
+
return data;
|
|
1073
|
+
},
|
|
1074
|
+
queryKey: pAccountCreateQueryKey(options),
|
|
1075
|
+
});
|
|
1076
|
+
};
|
|
1077
|
+
/**
|
|
1078
|
+
* Create platform account
|
|
1079
|
+
* #### Controller:
|
|
1080
|
+
*
|
|
1081
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).createPAccount`
|
|
1082
|
+
*
|
|
1083
|
+
* #### Middlewares:
|
|
1084
|
+
*
|
|
1085
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1086
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1087
|
+
*
|
|
1088
|
+
* ---
|
|
1089
|
+
*
|
|
1090
|
+
* Create a new platform account
|
|
1091
|
+
*/
|
|
1092
|
+
export const pAccountCreateMutation = (options) => {
|
|
1093
|
+
const mutationOptions = {
|
|
1094
|
+
mutationFn: async (localOptions) => {
|
|
1095
|
+
const { data } = await pAccountCreate({
|
|
1096
|
+
...options,
|
|
1097
|
+
...localOptions,
|
|
1098
|
+
throwOnError: true,
|
|
1099
|
+
});
|
|
1100
|
+
return data;
|
|
1101
|
+
},
|
|
1102
|
+
};
|
|
1103
|
+
return mutationOptions;
|
|
1104
|
+
};
|
|
1105
|
+
export const pAccountExportQueryKey = (options) => createQueryKey("pAccountExport", options);
|
|
1106
|
+
/**
|
|
1107
|
+
* Export platform accounts
|
|
1108
|
+
* #### Controller:
|
|
1109
|
+
*
|
|
1110
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).exportPAccounts`
|
|
1111
|
+
*
|
|
1112
|
+
* #### Middlewares:
|
|
1113
|
+
*
|
|
1114
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1115
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1116
|
+
*
|
|
1117
|
+
* ---
|
|
1118
|
+
*
|
|
1119
|
+
* Export all platform accounts data
|
|
1120
|
+
*/
|
|
1121
|
+
export const pAccountExportOptions = (options) => {
|
|
1122
|
+
return queryOptions({
|
|
1123
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1124
|
+
const { data } = await pAccountExport({
|
|
1125
|
+
...options,
|
|
1126
|
+
...queryKey[0],
|
|
1127
|
+
signal,
|
|
1128
|
+
throwOnError: true,
|
|
1129
|
+
});
|
|
1130
|
+
return data;
|
|
1131
|
+
},
|
|
1132
|
+
queryKey: pAccountExportQueryKey(options),
|
|
1133
|
+
});
|
|
1134
|
+
};
|
|
1135
|
+
export const pAccountImportQueryKey = (options) => createQueryKey("pAccountImport", options);
|
|
1136
|
+
/**
|
|
1137
|
+
* Import platform accounts
|
|
1138
|
+
* #### Controller:
|
|
1139
|
+
*
|
|
1140
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).importPAccounts`
|
|
1141
|
+
*
|
|
1142
|
+
* #### Middlewares:
|
|
1143
|
+
*
|
|
1144
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1145
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1146
|
+
*
|
|
1147
|
+
* ---
|
|
1148
|
+
*
|
|
1149
|
+
* Import platform accounts data
|
|
1150
|
+
*/
|
|
1151
|
+
export const pAccountImportOptions = (options) => {
|
|
1152
|
+
return queryOptions({
|
|
1153
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1154
|
+
const { data } = await pAccountImport({
|
|
1155
|
+
...options,
|
|
1156
|
+
...queryKey[0],
|
|
1157
|
+
signal,
|
|
1158
|
+
throwOnError: true,
|
|
1159
|
+
});
|
|
1160
|
+
return data;
|
|
1161
|
+
},
|
|
1162
|
+
queryKey: pAccountImportQueryKey(options),
|
|
1163
|
+
});
|
|
1164
|
+
};
|
|
1165
|
+
/**
|
|
1166
|
+
* Import platform accounts
|
|
1167
|
+
* #### Controller:
|
|
1168
|
+
*
|
|
1169
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).importPAccounts`
|
|
1170
|
+
*
|
|
1171
|
+
* #### Middlewares:
|
|
1172
|
+
*
|
|
1173
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1174
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1175
|
+
*
|
|
1176
|
+
* ---
|
|
1177
|
+
*
|
|
1178
|
+
* Import platform accounts data
|
|
1179
|
+
*/
|
|
1180
|
+
export const pAccountImportMutation = (options) => {
|
|
1181
|
+
const mutationOptions = {
|
|
1182
|
+
mutationFn: async (localOptions) => {
|
|
1183
|
+
const { data } = await pAccountImport({
|
|
1184
|
+
...options,
|
|
1185
|
+
...localOptions,
|
|
1186
|
+
throwOnError: true,
|
|
1187
|
+
});
|
|
1188
|
+
return data;
|
|
1189
|
+
},
|
|
1190
|
+
};
|
|
1191
|
+
return mutationOptions;
|
|
1192
|
+
};
|
|
1193
|
+
/**
|
|
1194
|
+
* Delete platform account
|
|
1195
|
+
* #### Controller:
|
|
1196
|
+
*
|
|
1197
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).deletePAccount`
|
|
1198
|
+
*
|
|
1199
|
+
* #### Middlewares:
|
|
1200
|
+
*
|
|
1201
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1202
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1203
|
+
*
|
|
1204
|
+
* ---
|
|
1205
|
+
*
|
|
1206
|
+
* Delete platform account by ID
|
|
1207
|
+
*/
|
|
1208
|
+
export const pAccountDeleteMutation = (options) => {
|
|
1209
|
+
const mutationOptions = {
|
|
1210
|
+
mutationFn: async (localOptions) => {
|
|
1211
|
+
const { data } = await pAccountDelete({
|
|
1212
|
+
...options,
|
|
1213
|
+
...localOptions,
|
|
1214
|
+
throwOnError: true,
|
|
1215
|
+
});
|
|
1216
|
+
return data;
|
|
1217
|
+
},
|
|
1218
|
+
};
|
|
1219
|
+
return mutationOptions;
|
|
1220
|
+
};
|
|
1221
|
+
export const pAccountGetQueryKey = (options) => createQueryKey("pAccountGet", options);
|
|
1222
|
+
/**
|
|
1223
|
+
* Get platform account
|
|
1224
|
+
* #### Controller:
|
|
1225
|
+
*
|
|
1226
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).getPAccount`
|
|
1227
|
+
*
|
|
1228
|
+
* #### Middlewares:
|
|
1229
|
+
*
|
|
1230
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1231
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1232
|
+
*
|
|
1233
|
+
* ---
|
|
1234
|
+
*
|
|
1235
|
+
* Get platform account by ID
|
|
1236
|
+
*/
|
|
1237
|
+
export const pAccountGetOptions = (options) => {
|
|
1238
|
+
return queryOptions({
|
|
1239
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1240
|
+
const { data } = await pAccountGet({
|
|
1241
|
+
...options,
|
|
1242
|
+
...queryKey[0],
|
|
1243
|
+
signal,
|
|
1244
|
+
throwOnError: true,
|
|
1245
|
+
});
|
|
1246
|
+
return data;
|
|
1247
|
+
},
|
|
1248
|
+
queryKey: pAccountGetQueryKey(options),
|
|
1249
|
+
});
|
|
1250
|
+
};
|
|
1251
|
+
/**
|
|
1252
|
+
* Update platform account
|
|
1253
|
+
* #### Controller:
|
|
1254
|
+
*
|
|
1255
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).updatePAccount`
|
|
1256
|
+
*
|
|
1257
|
+
* #### Middlewares:
|
|
1258
|
+
*
|
|
1259
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1260
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1261
|
+
*
|
|
1262
|
+
* ---
|
|
1263
|
+
*
|
|
1264
|
+
* Update platform account by ID
|
|
1265
|
+
*/
|
|
1266
|
+
export const pAccountUpdateMutation = (options) => {
|
|
1267
|
+
const mutationOptions = {
|
|
1268
|
+
mutationFn: async (localOptions) => {
|
|
1269
|
+
const { data } = await pAccountUpdate({
|
|
1270
|
+
...options,
|
|
1271
|
+
...localOptions,
|
|
1272
|
+
throwOnError: true,
|
|
1273
|
+
});
|
|
1274
|
+
return data;
|
|
1275
|
+
},
|
|
1276
|
+
};
|
|
1277
|
+
return mutationOptions;
|
|
1278
|
+
};
|
|
1279
|
+
export const pAccountListBrowserConfigsQueryKey = (options) => createQueryKey("pAccountListBrowserConfigs", options);
|
|
1280
|
+
/**
|
|
1281
|
+
* List browser configs
|
|
1282
|
+
* #### Controller:
|
|
1283
|
+
*
|
|
1284
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).listBrowserConfigs`
|
|
1285
|
+
*
|
|
1286
|
+
* #### Middlewares:
|
|
1287
|
+
*
|
|
1288
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1289
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1290
|
+
*
|
|
1291
|
+
* ---
|
|
1292
|
+
*
|
|
1293
|
+
* List browser configurations for platform account
|
|
1294
|
+
*/
|
|
1295
|
+
export const pAccountListBrowserConfigsOptions = (options) => {
|
|
1296
|
+
return queryOptions({
|
|
1297
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1298
|
+
const { data } = await pAccountListBrowserConfigs({
|
|
1299
|
+
...options,
|
|
1300
|
+
...queryKey[0],
|
|
1301
|
+
signal,
|
|
1302
|
+
throwOnError: true,
|
|
1303
|
+
});
|
|
1304
|
+
return data;
|
|
1305
|
+
},
|
|
1306
|
+
queryKey: pAccountListBrowserConfigsQueryKey(options),
|
|
1307
|
+
});
|
|
1308
|
+
};
|
|
1309
|
+
export const pAccountCreateBrowserConfigQueryKey = (options) => createQueryKey("pAccountCreateBrowserConfig", options);
|
|
1310
|
+
/**
|
|
1311
|
+
* Create browser config
|
|
1312
|
+
* #### Controller:
|
|
1313
|
+
*
|
|
1314
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).createBrowserConfig`
|
|
1315
|
+
*
|
|
1316
|
+
* #### Middlewares:
|
|
1317
|
+
*
|
|
1318
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1319
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1320
|
+
*
|
|
1321
|
+
* ---
|
|
1322
|
+
*
|
|
1323
|
+
* Create browser configuration for platform account
|
|
1324
|
+
*/
|
|
1325
|
+
export const pAccountCreateBrowserConfigOptions = (options) => {
|
|
1326
|
+
return queryOptions({
|
|
1327
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1328
|
+
const { data } = await pAccountCreateBrowserConfig({
|
|
1329
|
+
...options,
|
|
1330
|
+
...queryKey[0],
|
|
1331
|
+
signal,
|
|
1332
|
+
throwOnError: true,
|
|
1333
|
+
});
|
|
1334
|
+
return data;
|
|
1335
|
+
},
|
|
1336
|
+
queryKey: pAccountCreateBrowserConfigQueryKey(options),
|
|
1337
|
+
});
|
|
1338
|
+
};
|
|
1339
|
+
/**
|
|
1340
|
+
* Create browser config
|
|
1341
|
+
* #### Controller:
|
|
1342
|
+
*
|
|
1343
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).createBrowserConfig`
|
|
1344
|
+
*
|
|
1345
|
+
* #### Middlewares:
|
|
1346
|
+
*
|
|
1347
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1348
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1349
|
+
*
|
|
1350
|
+
* ---
|
|
1351
|
+
*
|
|
1352
|
+
* Create browser configuration for platform account
|
|
1353
|
+
*/
|
|
1354
|
+
export const pAccountCreateBrowserConfigMutation = (options) => {
|
|
1355
|
+
const mutationOptions = {
|
|
1356
|
+
mutationFn: async (localOptions) => {
|
|
1357
|
+
const { data } = await pAccountCreateBrowserConfig({
|
|
1358
|
+
...options,
|
|
1359
|
+
...localOptions,
|
|
1360
|
+
throwOnError: true,
|
|
1361
|
+
});
|
|
1362
|
+
return data;
|
|
1363
|
+
},
|
|
1364
|
+
};
|
|
1365
|
+
return mutationOptions;
|
|
1366
|
+
};
|
|
1367
|
+
export const pAccountLaunchBrowserQueryKey = (options) => createQueryKey("pAccountLaunchBrowser", options);
|
|
1368
|
+
/**
|
|
1369
|
+
* Launch browser for account
|
|
1370
|
+
* #### Controller:
|
|
1371
|
+
*
|
|
1372
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).launchBrowser`
|
|
1373
|
+
*
|
|
1374
|
+
* #### Middlewares:
|
|
1375
|
+
*
|
|
1376
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1377
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1378
|
+
*
|
|
1379
|
+
* ---
|
|
1380
|
+
*
|
|
1381
|
+
* Launch browser session for platform account
|
|
1382
|
+
*/
|
|
1383
|
+
export const pAccountLaunchBrowserOptions = (options) => {
|
|
1384
|
+
return queryOptions({
|
|
1385
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1386
|
+
const { data } = await pAccountLaunchBrowser({
|
|
1387
|
+
...options,
|
|
1388
|
+
...queryKey[0],
|
|
1389
|
+
signal,
|
|
1390
|
+
throwOnError: true,
|
|
1391
|
+
});
|
|
1392
|
+
return data;
|
|
1393
|
+
},
|
|
1394
|
+
queryKey: pAccountLaunchBrowserQueryKey(options),
|
|
1395
|
+
});
|
|
1396
|
+
};
|
|
1397
|
+
/**
|
|
1398
|
+
* Launch browser for account
|
|
1399
|
+
* #### Controller:
|
|
1400
|
+
*
|
|
1401
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).launchBrowser`
|
|
1402
|
+
*
|
|
1403
|
+
* #### Middlewares:
|
|
1404
|
+
*
|
|
1405
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1406
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1407
|
+
*
|
|
1408
|
+
* ---
|
|
1409
|
+
*
|
|
1410
|
+
* Launch browser session for platform account
|
|
1411
|
+
*/
|
|
1412
|
+
export const pAccountLaunchBrowserMutation = (options) => {
|
|
1413
|
+
const mutationOptions = {
|
|
1414
|
+
mutationFn: async (localOptions) => {
|
|
1415
|
+
const { data } = await pAccountLaunchBrowser({
|
|
1416
|
+
...options,
|
|
1417
|
+
...localOptions,
|
|
1418
|
+
throwOnError: true,
|
|
1419
|
+
});
|
|
1420
|
+
return data;
|
|
1421
|
+
},
|
|
1422
|
+
};
|
|
1423
|
+
return mutationOptions;
|
|
1424
|
+
};
|
|
1425
|
+
export const pAccountListSessionsQueryKey = (options) => createQueryKey("pAccountListSessions", options);
|
|
1426
|
+
/**
|
|
1427
|
+
* List sessions
|
|
1428
|
+
* #### Controller:
|
|
1429
|
+
*
|
|
1430
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).listSessions`
|
|
1431
|
+
*
|
|
1432
|
+
* #### Middlewares:
|
|
1433
|
+
*
|
|
1434
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1435
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1436
|
+
*
|
|
1437
|
+
* ---
|
|
1438
|
+
*
|
|
1439
|
+
* List sessions for platform account
|
|
1440
|
+
*/
|
|
1441
|
+
export const pAccountListSessionsOptions = (options) => {
|
|
1442
|
+
return queryOptions({
|
|
1443
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1444
|
+
const { data } = await pAccountListSessions({
|
|
1445
|
+
...options,
|
|
1446
|
+
...queryKey[0],
|
|
1447
|
+
signal,
|
|
1448
|
+
throwOnError: true,
|
|
1449
|
+
});
|
|
1450
|
+
return data;
|
|
1451
|
+
},
|
|
1452
|
+
queryKey: pAccountListSessionsQueryKey(options),
|
|
1453
|
+
});
|
|
1454
|
+
};
|
|
1455
|
+
export const pAccountCreateSessionQueryKey = (options) => createQueryKey("pAccountCreateSession", options);
|
|
1456
|
+
/**
|
|
1457
|
+
* Create session
|
|
1458
|
+
* #### Controller:
|
|
1459
|
+
*
|
|
1460
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).createSession`
|
|
1461
|
+
*
|
|
1462
|
+
* #### Middlewares:
|
|
1463
|
+
*
|
|
1464
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1465
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1466
|
+
*
|
|
1467
|
+
* ---
|
|
1468
|
+
*
|
|
1469
|
+
* Create session for platform account
|
|
1470
|
+
*/
|
|
1471
|
+
export const pAccountCreateSessionOptions = (options) => {
|
|
1472
|
+
return queryOptions({
|
|
1473
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1474
|
+
const { data } = await pAccountCreateSession({
|
|
1475
|
+
...options,
|
|
1476
|
+
...queryKey[0],
|
|
1477
|
+
signal,
|
|
1478
|
+
throwOnError: true,
|
|
1479
|
+
});
|
|
1480
|
+
return data;
|
|
1481
|
+
},
|
|
1482
|
+
queryKey: pAccountCreateSessionQueryKey(options),
|
|
1483
|
+
});
|
|
1484
|
+
};
|
|
1485
|
+
/**
|
|
1486
|
+
* Create session
|
|
1487
|
+
* #### Controller:
|
|
1488
|
+
*
|
|
1489
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).createSession`
|
|
1490
|
+
*
|
|
1491
|
+
* #### Middlewares:
|
|
1492
|
+
*
|
|
1493
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1494
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1495
|
+
*
|
|
1496
|
+
* ---
|
|
1497
|
+
*
|
|
1498
|
+
* Create session for platform account
|
|
1499
|
+
*/
|
|
1500
|
+
export const pAccountCreateSessionMutation = (options) => {
|
|
1501
|
+
const mutationOptions = {
|
|
1502
|
+
mutationFn: async (localOptions) => {
|
|
1503
|
+
const { data } = await pAccountCreateSession({
|
|
1504
|
+
...options,
|
|
1505
|
+
...localOptions,
|
|
1506
|
+
throwOnError: true,
|
|
1507
|
+
});
|
|
1508
|
+
return data;
|
|
1509
|
+
},
|
|
1510
|
+
};
|
|
1511
|
+
return mutationOptions;
|
|
1512
|
+
};
|
|
1513
|
+
/**
|
|
1514
|
+
* Delete session
|
|
1515
|
+
* #### Controller:
|
|
1516
|
+
*
|
|
1517
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).deleteSession`
|
|
1518
|
+
*
|
|
1519
|
+
* #### Middlewares:
|
|
1520
|
+
*
|
|
1521
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1522
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1523
|
+
*
|
|
1524
|
+
* ---
|
|
1525
|
+
*
|
|
1526
|
+
* Delete session by ID
|
|
1527
|
+
*/
|
|
1528
|
+
export const pAccountDeleteSessionMutation = (options) => {
|
|
1529
|
+
const mutationOptions = {
|
|
1530
|
+
mutationFn: async (localOptions) => {
|
|
1531
|
+
const { data } = await pAccountDeleteSession({
|
|
1532
|
+
...options,
|
|
1533
|
+
...localOptions,
|
|
1534
|
+
throwOnError: true,
|
|
1535
|
+
});
|
|
1536
|
+
return data;
|
|
1537
|
+
},
|
|
1538
|
+
};
|
|
1539
|
+
return mutationOptions;
|
|
1540
|
+
};
|
|
1541
|
+
export const pAccountGetSessionQueryKey = (options) => createQueryKey("pAccountGetSession", options);
|
|
1542
|
+
/**
|
|
1543
|
+
* Get session
|
|
1544
|
+
* #### Controller:
|
|
1545
|
+
*
|
|
1546
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).getSession`
|
|
1547
|
+
*
|
|
1548
|
+
* #### Middlewares:
|
|
1549
|
+
*
|
|
1550
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1551
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1552
|
+
*
|
|
1553
|
+
* ---
|
|
1554
|
+
*
|
|
1555
|
+
* Get session by ID
|
|
1556
|
+
*/
|
|
1557
|
+
export const pAccountGetSessionOptions = (options) => {
|
|
1558
|
+
return queryOptions({
|
|
1559
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1560
|
+
const { data } = await pAccountGetSession({
|
|
1561
|
+
...options,
|
|
1562
|
+
...queryKey[0],
|
|
1563
|
+
signal,
|
|
1564
|
+
throwOnError: true,
|
|
1565
|
+
});
|
|
1566
|
+
return data;
|
|
1567
|
+
},
|
|
1568
|
+
queryKey: pAccountGetSessionQueryKey(options),
|
|
1569
|
+
});
|
|
1570
|
+
};
|
|
1571
|
+
/**
|
|
1572
|
+
* Update session
|
|
1573
|
+
* #### Controller:
|
|
1574
|
+
*
|
|
1575
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/paccount.(*PAccountService).updateSession`
|
|
1576
|
+
*
|
|
1577
|
+
* #### Middlewares:
|
|
1578
|
+
*
|
|
1579
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1580
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1581
|
+
*
|
|
1582
|
+
* ---
|
|
1583
|
+
*
|
|
1584
|
+
* Update session by ID
|
|
1585
|
+
*/
|
|
1586
|
+
export const pAccountUpdateSessionMutation = (options) => {
|
|
1587
|
+
const mutationOptions = {
|
|
1588
|
+
mutationFn: async (localOptions) => {
|
|
1589
|
+
const { data } = await pAccountUpdateSession({
|
|
1590
|
+
...options,
|
|
1591
|
+
...localOptions,
|
|
1592
|
+
throwOnError: true,
|
|
1593
|
+
});
|
|
1594
|
+
return data;
|
|
1595
|
+
},
|
|
1596
|
+
};
|
|
1597
|
+
return mutationOptions;
|
|
1598
|
+
};
|
|
1599
|
+
export const platformListQueryKey = (options) => createQueryKey("platformList", options);
|
|
1600
|
+
/**
|
|
1601
|
+
* List platforms
|
|
1602
|
+
* #### Controller:
|
|
1603
|
+
*
|
|
1604
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/platform.(*PlatformService).listPlatforms`
|
|
1605
|
+
*
|
|
1606
|
+
* #### Middlewares:
|
|
1607
|
+
*
|
|
1608
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1609
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1610
|
+
*
|
|
1611
|
+
* ---
|
|
1612
|
+
*
|
|
1613
|
+
* Get list of platforms with pagination
|
|
1614
|
+
*/
|
|
1615
|
+
export const platformListOptions = (options) => {
|
|
1616
|
+
return queryOptions({
|
|
1617
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1618
|
+
const { data } = await platformList({
|
|
1619
|
+
...options,
|
|
1620
|
+
...queryKey[0],
|
|
1621
|
+
signal,
|
|
1622
|
+
throwOnError: true,
|
|
1623
|
+
});
|
|
1624
|
+
return data;
|
|
1625
|
+
},
|
|
1626
|
+
queryKey: platformListQueryKey(options),
|
|
1627
|
+
});
|
|
1628
|
+
};
|
|
1629
|
+
export const platformCreateQueryKey = (options) => createQueryKey("platformCreate", options);
|
|
1630
|
+
/**
|
|
1631
|
+
* Create platform
|
|
1632
|
+
* #### Controller:
|
|
1633
|
+
*
|
|
1634
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/platform.(*PlatformService).createPlatform`
|
|
1635
|
+
*
|
|
1636
|
+
* #### Middlewares:
|
|
1637
|
+
*
|
|
1638
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1639
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1640
|
+
*
|
|
1641
|
+
* ---
|
|
1642
|
+
*
|
|
1643
|
+
* Create a new platform
|
|
1644
|
+
*/
|
|
1645
|
+
export const platformCreateOptions = (options) => {
|
|
1646
|
+
return queryOptions({
|
|
1647
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1648
|
+
const { data } = await platformCreate({
|
|
1649
|
+
...options,
|
|
1650
|
+
...queryKey[0],
|
|
1651
|
+
signal,
|
|
1652
|
+
throwOnError: true,
|
|
1653
|
+
});
|
|
1654
|
+
return data;
|
|
1655
|
+
},
|
|
1656
|
+
queryKey: platformCreateQueryKey(options),
|
|
1657
|
+
});
|
|
1658
|
+
};
|
|
1659
|
+
/**
|
|
1660
|
+
* Create platform
|
|
1661
|
+
* #### Controller:
|
|
1662
|
+
*
|
|
1663
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/platform.(*PlatformService).createPlatform`
|
|
1664
|
+
*
|
|
1665
|
+
* #### Middlewares:
|
|
1666
|
+
*
|
|
1667
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1668
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1669
|
+
*
|
|
1670
|
+
* ---
|
|
1671
|
+
*
|
|
1672
|
+
* Create a new platform
|
|
1673
|
+
*/
|
|
1674
|
+
export const platformCreateMutation = (options) => {
|
|
1675
|
+
const mutationOptions = {
|
|
1676
|
+
mutationFn: async (localOptions) => {
|
|
1677
|
+
const { data } = await platformCreate({
|
|
1678
|
+
...options,
|
|
1679
|
+
...localOptions,
|
|
1680
|
+
throwOnError: true,
|
|
1681
|
+
});
|
|
1682
|
+
return data;
|
|
1683
|
+
},
|
|
1684
|
+
};
|
|
1685
|
+
return mutationOptions;
|
|
1686
|
+
};
|
|
1687
|
+
export const platformExportQueryKey = (options) => createQueryKey("platformExport", options);
|
|
1688
|
+
/**
|
|
1689
|
+
* Export platforms
|
|
1690
|
+
* #### Controller:
|
|
1691
|
+
*
|
|
1692
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/platform.(*PlatformService).exportPlatforms`
|
|
1693
|
+
*
|
|
1694
|
+
* #### Middlewares:
|
|
1695
|
+
*
|
|
1696
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1697
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1698
|
+
*
|
|
1699
|
+
* ---
|
|
1700
|
+
*
|
|
1701
|
+
* Export all platforms data
|
|
1702
|
+
*/
|
|
1703
|
+
export const platformExportOptions = (options) => {
|
|
1704
|
+
return queryOptions({
|
|
1705
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1706
|
+
const { data } = await platformExport({
|
|
1707
|
+
...options,
|
|
1708
|
+
...queryKey[0],
|
|
1709
|
+
signal,
|
|
1710
|
+
throwOnError: true,
|
|
1711
|
+
});
|
|
1712
|
+
return data;
|
|
1713
|
+
},
|
|
1714
|
+
queryKey: platformExportQueryKey(options),
|
|
1715
|
+
});
|
|
1716
|
+
};
|
|
1717
|
+
export const platformImportQueryKey = (options) => createQueryKey("platformImport", options);
|
|
1718
|
+
/**
|
|
1719
|
+
* Import platforms
|
|
1720
|
+
* #### Controller:
|
|
1721
|
+
*
|
|
1722
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/platform.(*PlatformService).importPlatforms`
|
|
1723
|
+
*
|
|
1724
|
+
* #### Middlewares:
|
|
1725
|
+
*
|
|
1726
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1727
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1728
|
+
*
|
|
1729
|
+
* ---
|
|
1730
|
+
*
|
|
1731
|
+
* Import platforms data
|
|
1732
|
+
*/
|
|
1733
|
+
export const platformImportOptions = (options) => {
|
|
1734
|
+
return queryOptions({
|
|
1735
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1736
|
+
const { data } = await platformImport({
|
|
1737
|
+
...options,
|
|
1738
|
+
...queryKey[0],
|
|
1739
|
+
signal,
|
|
1740
|
+
throwOnError: true,
|
|
1741
|
+
});
|
|
1742
|
+
return data;
|
|
1743
|
+
},
|
|
1744
|
+
queryKey: platformImportQueryKey(options),
|
|
1745
|
+
});
|
|
1746
|
+
};
|
|
1747
|
+
/**
|
|
1748
|
+
* Import platforms
|
|
1749
|
+
* #### Controller:
|
|
1750
|
+
*
|
|
1751
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/platform.(*PlatformService).importPlatforms`
|
|
1752
|
+
*
|
|
1753
|
+
* #### Middlewares:
|
|
1754
|
+
*
|
|
1755
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1756
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1757
|
+
*
|
|
1758
|
+
* ---
|
|
1759
|
+
*
|
|
1760
|
+
* Import platforms data
|
|
1761
|
+
*/
|
|
1762
|
+
export const platformImportMutation = (options) => {
|
|
1763
|
+
const mutationOptions = {
|
|
1764
|
+
mutationFn: async (localOptions) => {
|
|
1765
|
+
const { data } = await platformImport({
|
|
1766
|
+
...options,
|
|
1767
|
+
...localOptions,
|
|
1768
|
+
throwOnError: true,
|
|
1769
|
+
});
|
|
1770
|
+
return data;
|
|
1771
|
+
},
|
|
1772
|
+
};
|
|
1773
|
+
return mutationOptions;
|
|
1774
|
+
};
|
|
1775
|
+
/**
|
|
1776
|
+
* Delete platform
|
|
1777
|
+
* #### Controller:
|
|
1778
|
+
*
|
|
1779
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/platform.(*PlatformService).deletePlatform`
|
|
1780
|
+
*
|
|
1781
|
+
* #### Middlewares:
|
|
1782
|
+
*
|
|
1783
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1784
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1785
|
+
*
|
|
1786
|
+
* ---
|
|
1787
|
+
*
|
|
1788
|
+
* Delete platform by ID
|
|
1789
|
+
*/
|
|
1790
|
+
export const platformDeleteMutation = (options) => {
|
|
1791
|
+
const mutationOptions = {
|
|
1792
|
+
mutationFn: async (localOptions) => {
|
|
1793
|
+
const { data } = await platformDelete({
|
|
1794
|
+
...options,
|
|
1795
|
+
...localOptions,
|
|
1796
|
+
throwOnError: true,
|
|
1797
|
+
});
|
|
1798
|
+
return data;
|
|
1799
|
+
},
|
|
1800
|
+
};
|
|
1801
|
+
return mutationOptions;
|
|
1802
|
+
};
|
|
1803
|
+
export const platformGetQueryKey = (options) => createQueryKey("platformGet", options);
|
|
1804
|
+
/**
|
|
1805
|
+
* Get platform
|
|
1806
|
+
* #### Controller:
|
|
1807
|
+
*
|
|
1808
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/platform.(*PlatformService).getPlatform`
|
|
1809
|
+
*
|
|
1810
|
+
* #### Middlewares:
|
|
1811
|
+
*
|
|
1812
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1813
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1814
|
+
*
|
|
1815
|
+
* ---
|
|
1816
|
+
*
|
|
1817
|
+
* Get platform by ID
|
|
1818
|
+
*/
|
|
1819
|
+
export const platformGetOptions = (options) => {
|
|
1820
|
+
return queryOptions({
|
|
1821
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1822
|
+
const { data } = await platformGet({
|
|
1823
|
+
...options,
|
|
1824
|
+
...queryKey[0],
|
|
1825
|
+
signal,
|
|
1826
|
+
throwOnError: true,
|
|
1827
|
+
});
|
|
1828
|
+
return data;
|
|
1829
|
+
},
|
|
1830
|
+
queryKey: platformGetQueryKey(options),
|
|
1831
|
+
});
|
|
1832
|
+
};
|
|
1833
|
+
/**
|
|
1834
|
+
* Update platform
|
|
1835
|
+
* #### Controller:
|
|
1836
|
+
*
|
|
1837
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/platform.(*PlatformService).updatePlatform`
|
|
1838
|
+
*
|
|
1839
|
+
* #### Middlewares:
|
|
1840
|
+
*
|
|
1841
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1842
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1843
|
+
*
|
|
1844
|
+
* ---
|
|
1845
|
+
*
|
|
1846
|
+
* Update platform by ID
|
|
1847
|
+
*/
|
|
1848
|
+
export const platformUpdateMutation = (options) => {
|
|
1849
|
+
const mutationOptions = {
|
|
1850
|
+
mutationFn: async (localOptions) => {
|
|
1851
|
+
const { data } = await platformUpdate({
|
|
1852
|
+
...options,
|
|
1853
|
+
...localOptions,
|
|
1854
|
+
throwOnError: true,
|
|
1855
|
+
});
|
|
1856
|
+
return data;
|
|
1857
|
+
},
|
|
1858
|
+
};
|
|
1859
|
+
return mutationOptions;
|
|
1860
|
+
};
|
|
1861
|
+
export const proxyListQueryKey = (options) => createQueryKey("proxyList", options);
|
|
1862
|
+
/**
|
|
1863
|
+
* List proxies
|
|
1864
|
+
* #### Controller:
|
|
1865
|
+
*
|
|
1866
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/proxy.(*ProxyService).ListProxies`
|
|
1867
|
+
*
|
|
1868
|
+
* #### Middlewares:
|
|
1869
|
+
*
|
|
1870
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1871
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1872
|
+
*
|
|
1873
|
+
* ---
|
|
1874
|
+
*
|
|
1875
|
+
* Get a paginated list of proxies for the current tenant
|
|
1876
|
+
*/
|
|
1877
|
+
export const proxyListOptions = (options) => {
|
|
1878
|
+
return queryOptions({
|
|
1879
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1880
|
+
const { data } = await proxyList({
|
|
1881
|
+
...options,
|
|
1882
|
+
...queryKey[0],
|
|
1883
|
+
signal,
|
|
1884
|
+
throwOnError: true,
|
|
1885
|
+
});
|
|
1886
|
+
return data;
|
|
1887
|
+
},
|
|
1888
|
+
queryKey: proxyListQueryKey(options),
|
|
1889
|
+
});
|
|
1890
|
+
};
|
|
1891
|
+
/**
|
|
1892
|
+
* Upsert proxy
|
|
1893
|
+
* #### Controller:
|
|
1894
|
+
*
|
|
1895
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/proxy.(*ProxyService).UpsertProxy`
|
|
1896
|
+
*
|
|
1897
|
+
* #### Middlewares:
|
|
1898
|
+
*
|
|
1899
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1900
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1901
|
+
*
|
|
1902
|
+
* ---
|
|
1903
|
+
*
|
|
1904
|
+
* Create or update a proxy
|
|
1905
|
+
*/
|
|
1906
|
+
export const proxyUpsertMutation = (options) => {
|
|
1907
|
+
const mutationOptions = {
|
|
1908
|
+
mutationFn: async (localOptions) => {
|
|
1909
|
+
const { data } = await proxyUpsert({
|
|
1910
|
+
...options,
|
|
1911
|
+
...localOptions,
|
|
1912
|
+
throwOnError: true,
|
|
1913
|
+
});
|
|
1914
|
+
return data;
|
|
1915
|
+
},
|
|
1916
|
+
};
|
|
1917
|
+
return mutationOptions;
|
|
1918
|
+
};
|
|
1919
|
+
/**
|
|
1920
|
+
* Delete proxy
|
|
1921
|
+
* #### Controller:
|
|
1922
|
+
*
|
|
1923
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/proxy.(*ProxyService).DeleteProxy`
|
|
1924
|
+
*
|
|
1925
|
+
* #### Middlewares:
|
|
1926
|
+
*
|
|
1927
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1928
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1929
|
+
*
|
|
1930
|
+
* ---
|
|
1931
|
+
*
|
|
1932
|
+
* Delete a proxy
|
|
1933
|
+
*/
|
|
1934
|
+
export const proxyDeleteMutation = (options) => {
|
|
1935
|
+
const mutationOptions = {
|
|
1936
|
+
mutationFn: async (localOptions) => {
|
|
1937
|
+
const { data } = await proxyDelete({
|
|
1938
|
+
...options,
|
|
1939
|
+
...localOptions,
|
|
1940
|
+
throwOnError: true,
|
|
1941
|
+
});
|
|
1942
|
+
return data;
|
|
1943
|
+
},
|
|
1944
|
+
};
|
|
1945
|
+
return mutationOptions;
|
|
1946
|
+
};
|
|
1947
|
+
export const proxyGetQueryKey = (options) => createQueryKey("proxyGet", options);
|
|
1948
|
+
/**
|
|
1949
|
+
* Get proxy
|
|
1950
|
+
* #### Controller:
|
|
1951
|
+
*
|
|
1952
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/proxy.(*ProxyService).GetProxy`
|
|
1953
|
+
*
|
|
1954
|
+
* #### Middlewares:
|
|
1955
|
+
*
|
|
1956
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1957
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
1958
|
+
*
|
|
1959
|
+
* ---
|
|
1960
|
+
*
|
|
1961
|
+
* Get a specific proxy by ID
|
|
1962
|
+
*/
|
|
1963
|
+
export const proxyGetOptions = (options) => {
|
|
1964
|
+
return queryOptions({
|
|
1965
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1966
|
+
const { data } = await proxyGet({
|
|
1967
|
+
...options,
|
|
1968
|
+
...queryKey[0],
|
|
1969
|
+
signal,
|
|
1970
|
+
throwOnError: true,
|
|
1971
|
+
});
|
|
1972
|
+
return data;
|
|
1973
|
+
},
|
|
1974
|
+
queryKey: proxyGetQueryKey(options),
|
|
1975
|
+
});
|
|
1976
|
+
};
|
|
1977
|
+
export const sandboxStartNapcatQueryKey = (options) => createQueryKey("sandboxStartNapcat", options);
|
|
1978
|
+
/**
|
|
1979
|
+
* Start Napcat sandbox
|
|
1980
|
+
* #### Controller:
|
|
1981
|
+
*
|
|
1982
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/sbservice.(*SbServiceService).startNapcatSandbox`
|
|
1983
|
+
*
|
|
1984
|
+
* #### Middlewares:
|
|
1985
|
+
*
|
|
1986
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
1987
|
+
*
|
|
1988
|
+
* ---
|
|
1989
|
+
*
|
|
1990
|
+
* Start a Napcat sandbox instance
|
|
1991
|
+
*/
|
|
1992
|
+
export const sandboxStartNapcatOptions = (options) => {
|
|
1993
|
+
return queryOptions({
|
|
1994
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1995
|
+
const { data } = await sandboxStartNapcat({
|
|
1996
|
+
...options,
|
|
1997
|
+
...queryKey[0],
|
|
1998
|
+
signal,
|
|
1999
|
+
throwOnError: true,
|
|
2000
|
+
});
|
|
2001
|
+
return data;
|
|
2002
|
+
},
|
|
2003
|
+
queryKey: sandboxStartNapcatQueryKey(options),
|
|
2004
|
+
});
|
|
2005
|
+
};
|
|
2006
|
+
/**
|
|
2007
|
+
* Start Napcat sandbox
|
|
2008
|
+
* #### Controller:
|
|
2009
|
+
*
|
|
2010
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/sbservice.(*SbServiceService).startNapcatSandbox`
|
|
2011
|
+
*
|
|
2012
|
+
* #### Middlewares:
|
|
2013
|
+
*
|
|
2014
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2015
|
+
*
|
|
2016
|
+
* ---
|
|
2017
|
+
*
|
|
2018
|
+
* Start a Napcat sandbox instance
|
|
2019
|
+
*/
|
|
2020
|
+
export const sandboxStartNapcatMutation = (options) => {
|
|
2021
|
+
const mutationOptions = {
|
|
2022
|
+
mutationFn: async (localOptions) => {
|
|
2023
|
+
const { data } = await sandboxStartNapcat({
|
|
2024
|
+
...options,
|
|
2025
|
+
...localOptions,
|
|
2026
|
+
throwOnError: true,
|
|
2027
|
+
});
|
|
2028
|
+
return data;
|
|
2029
|
+
},
|
|
2030
|
+
};
|
|
2031
|
+
return mutationOptions;
|
|
2032
|
+
};
|
|
2033
|
+
export const napcatCheckStatusQueryKey = (options) => createQueryKey("napcatCheckStatus", options);
|
|
2034
|
+
/**
|
|
2035
|
+
* Check sandbox status
|
|
2036
|
+
* #### Controller:
|
|
2037
|
+
*
|
|
2038
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/sbservice.(*SbServiceService).checkSandboxStatus`
|
|
2039
|
+
*
|
|
2040
|
+
* #### Middlewares:
|
|
2041
|
+
*
|
|
2042
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2043
|
+
*
|
|
2044
|
+
* ---
|
|
2045
|
+
*
|
|
2046
|
+
* Check the status of specified sandbox instances
|
|
2047
|
+
*/
|
|
2048
|
+
export const napcatCheckStatusOptions = (options) => {
|
|
2049
|
+
return queryOptions({
|
|
2050
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2051
|
+
const { data } = await napcatCheckStatus({
|
|
2052
|
+
...options,
|
|
2053
|
+
...queryKey[0],
|
|
2054
|
+
signal,
|
|
2055
|
+
throwOnError: true,
|
|
2056
|
+
});
|
|
2057
|
+
return data;
|
|
2058
|
+
},
|
|
2059
|
+
queryKey: napcatCheckStatusQueryKey(options),
|
|
2060
|
+
});
|
|
2061
|
+
};
|
|
2062
|
+
/**
|
|
2063
|
+
* Check sandbox status
|
|
2064
|
+
* #### Controller:
|
|
2065
|
+
*
|
|
2066
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/sbservice.(*SbServiceService).checkSandboxStatus`
|
|
2067
|
+
*
|
|
2068
|
+
* #### Middlewares:
|
|
2069
|
+
*
|
|
2070
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2071
|
+
*
|
|
2072
|
+
* ---
|
|
2073
|
+
*
|
|
2074
|
+
* Check the status of specified sandbox instances
|
|
2075
|
+
*/
|
|
2076
|
+
export const napcatCheckStatusMutation = (options) => {
|
|
2077
|
+
const mutationOptions = {
|
|
2078
|
+
mutationFn: async (localOptions) => {
|
|
2079
|
+
const { data } = await napcatCheckStatus({
|
|
2080
|
+
...options,
|
|
2081
|
+
...localOptions,
|
|
2082
|
+
throwOnError: true,
|
|
2083
|
+
});
|
|
2084
|
+
return data;
|
|
2085
|
+
},
|
|
2086
|
+
};
|
|
2087
|
+
return mutationOptions;
|
|
2088
|
+
};
|
|
2089
|
+
export const sbServiceListQueryKey = (options) => createQueryKey("sbServiceList", options);
|
|
2090
|
+
/**
|
|
2091
|
+
* List sandbox services
|
|
2092
|
+
* #### Controller:
|
|
2093
|
+
*
|
|
2094
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/sbservice.(*SbServiceService).listSbServices`
|
|
2095
|
+
*
|
|
2096
|
+
* #### Middlewares:
|
|
2097
|
+
*
|
|
2098
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2099
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2100
|
+
*
|
|
2101
|
+
* ---
|
|
2102
|
+
*
|
|
2103
|
+
* Get a paginated list of sandbox services for the current tenant
|
|
2104
|
+
*/
|
|
2105
|
+
export const sbServiceListOptions = (options) => {
|
|
2106
|
+
return queryOptions({
|
|
2107
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2108
|
+
const { data } = await sbServiceList({
|
|
2109
|
+
...options,
|
|
2110
|
+
...queryKey[0],
|
|
2111
|
+
signal,
|
|
2112
|
+
throwOnError: true,
|
|
2113
|
+
});
|
|
2114
|
+
return data;
|
|
2115
|
+
},
|
|
2116
|
+
queryKey: sbServiceListQueryKey(options),
|
|
2117
|
+
});
|
|
2118
|
+
};
|
|
2119
|
+
export const sbServiceCreateQueryKey = (options) => createQueryKey("sbServiceCreate", options);
|
|
2120
|
+
/**
|
|
2121
|
+
* Create sandbox service
|
|
2122
|
+
* #### Controller:
|
|
2123
|
+
*
|
|
2124
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/sbservice.(*SbServiceService).createSbService`
|
|
2125
|
+
*
|
|
2126
|
+
* #### Middlewares:
|
|
2127
|
+
*
|
|
2128
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2129
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2130
|
+
*
|
|
2131
|
+
* ---
|
|
2132
|
+
*
|
|
2133
|
+
* Create a new sandbox service
|
|
2134
|
+
*/
|
|
2135
|
+
export const sbServiceCreateOptions = (options) => {
|
|
2136
|
+
return queryOptions({
|
|
2137
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2138
|
+
const { data } = await sbServiceCreate({
|
|
2139
|
+
...options,
|
|
2140
|
+
...queryKey[0],
|
|
2141
|
+
signal,
|
|
2142
|
+
throwOnError: true,
|
|
2143
|
+
});
|
|
2144
|
+
return data;
|
|
2145
|
+
},
|
|
2146
|
+
queryKey: sbServiceCreateQueryKey(options),
|
|
2147
|
+
});
|
|
2148
|
+
};
|
|
2149
|
+
/**
|
|
2150
|
+
* Create sandbox service
|
|
2151
|
+
* #### Controller:
|
|
2152
|
+
*
|
|
2153
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/sbservice.(*SbServiceService).createSbService`
|
|
2154
|
+
*
|
|
2155
|
+
* #### Middlewares:
|
|
2156
|
+
*
|
|
2157
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2158
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2159
|
+
*
|
|
2160
|
+
* ---
|
|
2161
|
+
*
|
|
2162
|
+
* Create a new sandbox service
|
|
2163
|
+
*/
|
|
2164
|
+
export const sbServiceCreateMutation = (options) => {
|
|
2165
|
+
const mutationOptions = {
|
|
2166
|
+
mutationFn: async (localOptions) => {
|
|
2167
|
+
const { data } = await sbServiceCreate({
|
|
2168
|
+
...options,
|
|
2169
|
+
...localOptions,
|
|
2170
|
+
throwOnError: true,
|
|
2171
|
+
});
|
|
2172
|
+
return data;
|
|
2173
|
+
},
|
|
2174
|
+
};
|
|
2175
|
+
return mutationOptions;
|
|
2176
|
+
};
|
|
2177
|
+
export const sbServiceGetServiceTypesQueryKey = (options) => createQueryKey("sbServiceGetServiceTypes", options);
|
|
2178
|
+
/**
|
|
2179
|
+
* Get available service types
|
|
2180
|
+
* #### Controller:
|
|
2181
|
+
*
|
|
2182
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/sbservice.(*SbServiceService).getServiceTypes`
|
|
2183
|
+
*
|
|
2184
|
+
* #### Middlewares:
|
|
2185
|
+
*
|
|
2186
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2187
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2188
|
+
*
|
|
2189
|
+
* ---
|
|
2190
|
+
*
|
|
2191
|
+
* Get a list of available service types for sandbox services
|
|
2192
|
+
*/
|
|
2193
|
+
export const sbServiceGetServiceTypesOptions = (options) => {
|
|
2194
|
+
return queryOptions({
|
|
2195
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2196
|
+
const { data } = await sbServiceGetServiceTypes({
|
|
2197
|
+
...options,
|
|
2198
|
+
...queryKey[0],
|
|
2199
|
+
signal,
|
|
2200
|
+
throwOnError: true,
|
|
2201
|
+
});
|
|
2202
|
+
return data;
|
|
2203
|
+
},
|
|
2204
|
+
queryKey: sbServiceGetServiceTypesQueryKey(options),
|
|
2205
|
+
});
|
|
2206
|
+
};
|
|
2207
|
+
/**
|
|
2208
|
+
* Delete sandbox service
|
|
2209
|
+
* #### Controller:
|
|
2210
|
+
*
|
|
2211
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/sbservice.(*SbServiceService).deleteSbService`
|
|
2212
|
+
*
|
|
2213
|
+
* #### Middlewares:
|
|
2214
|
+
*
|
|
2215
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2216
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2217
|
+
*
|
|
2218
|
+
* ---
|
|
2219
|
+
*
|
|
2220
|
+
* Delete a sandbox service
|
|
2221
|
+
*/
|
|
2222
|
+
export const sbServiceDeleteMutation = (options) => {
|
|
2223
|
+
const mutationOptions = {
|
|
2224
|
+
mutationFn: async (localOptions) => {
|
|
2225
|
+
const { data } = await sbServiceDelete({
|
|
2226
|
+
...options,
|
|
2227
|
+
...localOptions,
|
|
2228
|
+
throwOnError: true,
|
|
2229
|
+
});
|
|
2230
|
+
return data;
|
|
2231
|
+
},
|
|
2232
|
+
};
|
|
2233
|
+
return mutationOptions;
|
|
2234
|
+
};
|
|
2235
|
+
export const sbServiceGetQueryKey = (options) => createQueryKey("sbServiceGet", options);
|
|
2236
|
+
/**
|
|
2237
|
+
* Get sandbox service
|
|
2238
|
+
* #### Controller:
|
|
2239
|
+
*
|
|
2240
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/sbservice.(*SbServiceService).getSbService`
|
|
2241
|
+
*
|
|
2242
|
+
* #### Middlewares:
|
|
2243
|
+
*
|
|
2244
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2245
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2246
|
+
*
|
|
2247
|
+
* ---
|
|
2248
|
+
*
|
|
2249
|
+
* Get a specific sandbox service by ID
|
|
2250
|
+
*/
|
|
2251
|
+
export const sbServiceGetOptions = (options) => {
|
|
2252
|
+
return queryOptions({
|
|
2253
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2254
|
+
const { data } = await sbServiceGet({
|
|
2255
|
+
...options,
|
|
2256
|
+
...queryKey[0],
|
|
2257
|
+
signal,
|
|
2258
|
+
throwOnError: true,
|
|
2259
|
+
});
|
|
2260
|
+
return data;
|
|
2261
|
+
},
|
|
2262
|
+
queryKey: sbServiceGetQueryKey(options),
|
|
2263
|
+
});
|
|
2264
|
+
};
|
|
2265
|
+
export const sessionGetCurrentQueryKey = (options) => createQueryKey("sessionGetCurrent", options);
|
|
2266
|
+
/**
|
|
2267
|
+
* Get current session
|
|
2268
|
+
* #### Controller:
|
|
2269
|
+
*
|
|
2270
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/session.(*SessionService).getSession`
|
|
2271
|
+
*
|
|
2272
|
+
* #### Middlewares:
|
|
2273
|
+
*
|
|
2274
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2275
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2276
|
+
*
|
|
2277
|
+
* ---
|
|
2278
|
+
*
|
|
2279
|
+
* Get current user session information including user ID and tenant ID
|
|
2280
|
+
*/
|
|
2281
|
+
export const sessionGetCurrentOptions = (options) => {
|
|
2282
|
+
return queryOptions({
|
|
2283
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2284
|
+
const { data } = await sessionGetCurrent({
|
|
2285
|
+
...options,
|
|
2286
|
+
...queryKey[0],
|
|
2287
|
+
signal,
|
|
2288
|
+
throwOnError: true,
|
|
2289
|
+
});
|
|
2290
|
+
return data;
|
|
2291
|
+
},
|
|
2292
|
+
queryKey: sessionGetCurrentQueryKey(options),
|
|
2293
|
+
});
|
|
2294
|
+
};
|
|
2295
|
+
export const userGetCurrentQueryKey = (options) => createQueryKey("userGetCurrent", options);
|
|
2296
|
+
/**
|
|
2297
|
+
* Get current user
|
|
2298
|
+
* #### Controller:
|
|
2299
|
+
*
|
|
2300
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/users.(*UserService).getCurrentUser`
|
|
2301
|
+
*
|
|
2302
|
+
* #### Middlewares:
|
|
2303
|
+
*
|
|
2304
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2305
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2306
|
+
*
|
|
2307
|
+
* ---
|
|
2308
|
+
*
|
|
2309
|
+
* Get current user information
|
|
2310
|
+
*/
|
|
2311
|
+
export const userGetCurrentOptions = (options) => {
|
|
2312
|
+
return queryOptions({
|
|
2313
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2314
|
+
const { data } = await userGetCurrent({
|
|
2315
|
+
...options,
|
|
2316
|
+
...queryKey[0],
|
|
2317
|
+
signal,
|
|
2318
|
+
throwOnError: true,
|
|
2319
|
+
});
|
|
2320
|
+
return data;
|
|
2321
|
+
},
|
|
2322
|
+
queryKey: userGetCurrentQueryKey(options),
|
|
2323
|
+
});
|
|
2324
|
+
};
|
|
2325
|
+
export const napcatProxyWebUigetQueryKey = (options) => createQueryKey("napcatProxyWebUiget", options);
|
|
2326
|
+
/**
|
|
2327
|
+
* Proxy WebUI GET requests
|
|
2328
|
+
* #### Controller:
|
|
2329
|
+
*
|
|
2330
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/napcat.(*NapcatService).ProxyToWebUI`
|
|
2331
|
+
*
|
|
2332
|
+
* #### Middlewares:
|
|
2333
|
+
*
|
|
2334
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2335
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2336
|
+
*
|
|
2337
|
+
* ---
|
|
2338
|
+
*
|
|
2339
|
+
* Proxy all WebUI GET requests to napcat WebUI server
|
|
2340
|
+
*/
|
|
2341
|
+
export const napcatProxyWebUigetOptions = (options) => {
|
|
2342
|
+
return queryOptions({
|
|
2343
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2344
|
+
const { data } = await napcatProxyWebUiget({
|
|
2345
|
+
...options,
|
|
2346
|
+
...queryKey[0],
|
|
2347
|
+
signal,
|
|
2348
|
+
throwOnError: true,
|
|
2349
|
+
});
|
|
2350
|
+
return data;
|
|
2351
|
+
},
|
|
2352
|
+
queryKey: napcatProxyWebUigetQueryKey(options),
|
|
2353
|
+
});
|
|
2354
|
+
};
|
|
2355
|
+
export const napcatProxyWebUipostQueryKey = (options) => createQueryKey("napcatProxyWebUipost", options);
|
|
2356
|
+
/**
|
|
2357
|
+
* Proxy WebUI POST requests
|
|
2358
|
+
* #### Controller:
|
|
2359
|
+
*
|
|
2360
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/napcat.(*NapcatService).ProxyToWebUI`
|
|
2361
|
+
*
|
|
2362
|
+
* #### Middlewares:
|
|
2363
|
+
*
|
|
2364
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2365
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2366
|
+
*
|
|
2367
|
+
* ---
|
|
2368
|
+
*
|
|
2369
|
+
* Proxy all WebUI POST requests to napcat WebUI server
|
|
2370
|
+
*/
|
|
2371
|
+
export const napcatProxyWebUipostOptions = (options) => {
|
|
2372
|
+
return queryOptions({
|
|
2373
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2374
|
+
const { data } = await napcatProxyWebUipost({
|
|
2375
|
+
...options,
|
|
2376
|
+
...queryKey[0],
|
|
2377
|
+
signal,
|
|
2378
|
+
throwOnError: true,
|
|
2379
|
+
});
|
|
2380
|
+
return data;
|
|
2381
|
+
},
|
|
2382
|
+
queryKey: napcatProxyWebUipostQueryKey(options),
|
|
2383
|
+
});
|
|
2384
|
+
};
|
|
2385
|
+
/**
|
|
2386
|
+
* Proxy WebUI POST requests
|
|
2387
|
+
* #### Controller:
|
|
2388
|
+
*
|
|
2389
|
+
* `github.com/codeh007/gomtm/mtm/api/v2/handlers/napcat.(*NapcatService).ProxyToWebUI`
|
|
2390
|
+
*
|
|
2391
|
+
* #### Middlewares:
|
|
2392
|
+
*
|
|
2393
|
+
* - `github.com/go-fuego/fuego.defaultLogger.middleware`
|
|
2394
|
+
* - `github.com/codeh007/gomtm/mtm/api/v2.NewServer.AuthMiddleware.func4`
|
|
2395
|
+
*
|
|
2396
|
+
* ---
|
|
2397
|
+
*
|
|
2398
|
+
* Proxy all WebUI POST requests to napcat WebUI server
|
|
2399
|
+
*/
|
|
2400
|
+
export const napcatProxyWebUipostMutation = (options) => {
|
|
2401
|
+
const mutationOptions = {
|
|
2402
|
+
mutationFn: async (localOptions) => {
|
|
2403
|
+
const { data } = await napcatProxyWebUipost({
|
|
2404
|
+
...options,
|
|
2405
|
+
...localOptions,
|
|
2406
|
+
throwOnError: true,
|
|
2407
|
+
});
|
|
2408
|
+
return data;
|
|
2409
|
+
},
|
|
2410
|
+
};
|
|
2411
|
+
return mutationOptions;
|
|
2412
|
+
};
|
|
2413
|
+
//# sourceMappingURL=react-query.gen.js.map
|