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,1321 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { listApps, debugGetTraceDict, debugGetSessionTrace, deleteSession, getSession, createSessionWithId, listSessions, createSession, evaluationListEvalSets, evaluationCreateEvalSet, evaluationCreateEvalSetLegacy, evaluationListEvalSetsLegacy, evaluationAddSessionToEvalSet, evaluationListEvalsInEvalSet, evaluationDeleteEval, evaluationGetEval, evaluationUpdateEval, evaluationRunEvalLegacy, evaluationRunEval, evaluationGetEvalResult, evaluationGetEvalResultLegacy, evaluationListEvalResults, evaluationListEvalResultsLegacy, evaluationListMetricsInfo, deleteArtifact, loadArtifact, loadArtifactVersion, listArtifactNames, listArtifactVersions, runAgent, runAgentSse, debugGetEventGraph, redirectRootToDevUi, redirectDevUiAddSlash, builderBuild, getAgentBuilder, chatAgentGetChatConfig, chatAgentUpdateChatConfig, chatAgentGetProviders, chatAgentValidateApiKey, chatAgentExportConfig, chatAgentImportConfig, chatAgentChat, listItems, createItem, deleteItem, getItem, updateItem, searchItems, agentsAgentrun, demoDemo1, sandboxStartNapcatSandbox, sandboxCheckSandboxStatus, } from "../sdk.gen";
|
|
3
|
+
import { queryOptions } 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 listAppsQueryKey = (options) => createQueryKey("listApps", options);
|
|
28
|
+
/**
|
|
29
|
+
* List Apps
|
|
30
|
+
*/
|
|
31
|
+
export const listAppsOptions = (options) => {
|
|
32
|
+
return queryOptions({
|
|
33
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
34
|
+
const { data } = await listApps({
|
|
35
|
+
...options,
|
|
36
|
+
...queryKey[0],
|
|
37
|
+
signal,
|
|
38
|
+
throwOnError: true,
|
|
39
|
+
});
|
|
40
|
+
return data;
|
|
41
|
+
},
|
|
42
|
+
queryKey: listAppsQueryKey(options),
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
export const debugGetTraceDictQueryKey = (options) => createQueryKey("debugGetTraceDict", options);
|
|
46
|
+
/**
|
|
47
|
+
* Get Trace Dict
|
|
48
|
+
*/
|
|
49
|
+
export const debugGetTraceDictOptions = (options) => {
|
|
50
|
+
return queryOptions({
|
|
51
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
52
|
+
const { data } = await debugGetTraceDict({
|
|
53
|
+
...options,
|
|
54
|
+
...queryKey[0],
|
|
55
|
+
signal,
|
|
56
|
+
throwOnError: true,
|
|
57
|
+
});
|
|
58
|
+
return data;
|
|
59
|
+
},
|
|
60
|
+
queryKey: debugGetTraceDictQueryKey(options),
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
export const debugGetSessionTraceQueryKey = (options) => createQueryKey("debugGetSessionTrace", options);
|
|
64
|
+
/**
|
|
65
|
+
* Get Session Trace
|
|
66
|
+
*/
|
|
67
|
+
export const debugGetSessionTraceOptions = (options) => {
|
|
68
|
+
return queryOptions({
|
|
69
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
70
|
+
const { data } = await debugGetSessionTrace({
|
|
71
|
+
...options,
|
|
72
|
+
...queryKey[0],
|
|
73
|
+
signal,
|
|
74
|
+
throwOnError: true,
|
|
75
|
+
});
|
|
76
|
+
return data;
|
|
77
|
+
},
|
|
78
|
+
queryKey: debugGetSessionTraceQueryKey(options),
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Delete Session
|
|
83
|
+
*/
|
|
84
|
+
export const deleteSessionMutation = (options) => {
|
|
85
|
+
const mutationOptions = {
|
|
86
|
+
mutationFn: async (localOptions) => {
|
|
87
|
+
const { data } = await deleteSession({
|
|
88
|
+
...options,
|
|
89
|
+
...localOptions,
|
|
90
|
+
throwOnError: true,
|
|
91
|
+
});
|
|
92
|
+
return data;
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
return mutationOptions;
|
|
96
|
+
};
|
|
97
|
+
export const getSessionQueryKey = (options) => createQueryKey("getSession", options);
|
|
98
|
+
/**
|
|
99
|
+
* Get Session
|
|
100
|
+
*/
|
|
101
|
+
export const getSessionOptions = (options) => {
|
|
102
|
+
return queryOptions({
|
|
103
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
104
|
+
const { data } = await getSession({
|
|
105
|
+
...options,
|
|
106
|
+
...queryKey[0],
|
|
107
|
+
signal,
|
|
108
|
+
throwOnError: true,
|
|
109
|
+
});
|
|
110
|
+
return data;
|
|
111
|
+
},
|
|
112
|
+
queryKey: getSessionQueryKey(options),
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
export const createSessionWithIdQueryKey = (options) => createQueryKey("createSessionWithId", options);
|
|
116
|
+
/**
|
|
117
|
+
* Create Session With Id
|
|
118
|
+
*/
|
|
119
|
+
export const createSessionWithIdOptions = (options) => {
|
|
120
|
+
return queryOptions({
|
|
121
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
122
|
+
const { data } = await createSessionWithId({
|
|
123
|
+
...options,
|
|
124
|
+
...queryKey[0],
|
|
125
|
+
signal,
|
|
126
|
+
throwOnError: true,
|
|
127
|
+
});
|
|
128
|
+
return data;
|
|
129
|
+
},
|
|
130
|
+
queryKey: createSessionWithIdQueryKey(options),
|
|
131
|
+
});
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Create Session With Id
|
|
135
|
+
*/
|
|
136
|
+
export const createSessionWithIdMutation = (options) => {
|
|
137
|
+
const mutationOptions = {
|
|
138
|
+
mutationFn: async (localOptions) => {
|
|
139
|
+
const { data } = await createSessionWithId({
|
|
140
|
+
...options,
|
|
141
|
+
...localOptions,
|
|
142
|
+
throwOnError: true,
|
|
143
|
+
});
|
|
144
|
+
return data;
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
return mutationOptions;
|
|
148
|
+
};
|
|
149
|
+
export const listSessionsQueryKey = (options) => createQueryKey("listSessions", options);
|
|
150
|
+
/**
|
|
151
|
+
* List Sessions
|
|
152
|
+
*/
|
|
153
|
+
export const listSessionsOptions = (options) => {
|
|
154
|
+
return queryOptions({
|
|
155
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
156
|
+
const { data } = await listSessions({
|
|
157
|
+
...options,
|
|
158
|
+
...queryKey[0],
|
|
159
|
+
signal,
|
|
160
|
+
throwOnError: true,
|
|
161
|
+
});
|
|
162
|
+
return data;
|
|
163
|
+
},
|
|
164
|
+
queryKey: listSessionsQueryKey(options),
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
export const createSessionQueryKey = (options) => createQueryKey("createSession", options);
|
|
168
|
+
/**
|
|
169
|
+
* Create Session
|
|
170
|
+
*/
|
|
171
|
+
export const createSessionOptions = (options) => {
|
|
172
|
+
return queryOptions({
|
|
173
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
174
|
+
const { data } = await createSession({
|
|
175
|
+
...options,
|
|
176
|
+
...queryKey[0],
|
|
177
|
+
signal,
|
|
178
|
+
throwOnError: true,
|
|
179
|
+
});
|
|
180
|
+
return data;
|
|
181
|
+
},
|
|
182
|
+
queryKey: createSessionQueryKey(options),
|
|
183
|
+
});
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Create Session
|
|
187
|
+
*/
|
|
188
|
+
export const createSessionMutation = (options) => {
|
|
189
|
+
const mutationOptions = {
|
|
190
|
+
mutationFn: async (localOptions) => {
|
|
191
|
+
const { data } = await createSession({
|
|
192
|
+
...options,
|
|
193
|
+
...localOptions,
|
|
194
|
+
throwOnError: true,
|
|
195
|
+
});
|
|
196
|
+
return data;
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
return mutationOptions;
|
|
200
|
+
};
|
|
201
|
+
export const evaluationListEvalSetsQueryKey = (options) => createQueryKey("evaluationListEvalSets", options);
|
|
202
|
+
/**
|
|
203
|
+
* List Eval Sets
|
|
204
|
+
* Lists all eval sets for the given app.
|
|
205
|
+
*/
|
|
206
|
+
export const evaluationListEvalSetsOptions = (options) => {
|
|
207
|
+
return queryOptions({
|
|
208
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
209
|
+
const { data } = await evaluationListEvalSets({
|
|
210
|
+
...options,
|
|
211
|
+
...queryKey[0],
|
|
212
|
+
signal,
|
|
213
|
+
throwOnError: true,
|
|
214
|
+
});
|
|
215
|
+
return data;
|
|
216
|
+
},
|
|
217
|
+
queryKey: evaluationListEvalSetsQueryKey(options),
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
export const evaluationCreateEvalSetQueryKey = (options) => createQueryKey("evaluationCreateEvalSet", options);
|
|
221
|
+
/**
|
|
222
|
+
* Create Eval Set
|
|
223
|
+
*/
|
|
224
|
+
export const evaluationCreateEvalSetOptions = (options) => {
|
|
225
|
+
return queryOptions({
|
|
226
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
227
|
+
const { data } = await evaluationCreateEvalSet({
|
|
228
|
+
...options,
|
|
229
|
+
...queryKey[0],
|
|
230
|
+
signal,
|
|
231
|
+
throwOnError: true,
|
|
232
|
+
});
|
|
233
|
+
return data;
|
|
234
|
+
},
|
|
235
|
+
queryKey: evaluationCreateEvalSetQueryKey(options),
|
|
236
|
+
});
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* Create Eval Set
|
|
240
|
+
*/
|
|
241
|
+
export const evaluationCreateEvalSetMutation = (options) => {
|
|
242
|
+
const mutationOptions = {
|
|
243
|
+
mutationFn: async (localOptions) => {
|
|
244
|
+
const { data } = await evaluationCreateEvalSet({
|
|
245
|
+
...options,
|
|
246
|
+
...localOptions,
|
|
247
|
+
throwOnError: true,
|
|
248
|
+
});
|
|
249
|
+
return data;
|
|
250
|
+
},
|
|
251
|
+
};
|
|
252
|
+
return mutationOptions;
|
|
253
|
+
};
|
|
254
|
+
export const evaluationCreateEvalSetLegacyQueryKey = (options) => createQueryKey("evaluationCreateEvalSetLegacy", options);
|
|
255
|
+
/**
|
|
256
|
+
* Create Eval Set Legacy
|
|
257
|
+
* Creates an eval set, given the id.
|
|
258
|
+
*/
|
|
259
|
+
export const evaluationCreateEvalSetLegacyOptions = (options) => {
|
|
260
|
+
return queryOptions({
|
|
261
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
262
|
+
const { data } = await evaluationCreateEvalSetLegacy({
|
|
263
|
+
...options,
|
|
264
|
+
...queryKey[0],
|
|
265
|
+
signal,
|
|
266
|
+
throwOnError: true,
|
|
267
|
+
});
|
|
268
|
+
return data;
|
|
269
|
+
},
|
|
270
|
+
queryKey: evaluationCreateEvalSetLegacyQueryKey(options),
|
|
271
|
+
});
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* Create Eval Set Legacy
|
|
275
|
+
* Creates an eval set, given the id.
|
|
276
|
+
*/
|
|
277
|
+
export const evaluationCreateEvalSetLegacyMutation = (options) => {
|
|
278
|
+
const mutationOptions = {
|
|
279
|
+
mutationFn: async (localOptions) => {
|
|
280
|
+
const { data } = await evaluationCreateEvalSetLegacy({
|
|
281
|
+
...options,
|
|
282
|
+
...localOptions,
|
|
283
|
+
throwOnError: true,
|
|
284
|
+
});
|
|
285
|
+
return data;
|
|
286
|
+
},
|
|
287
|
+
};
|
|
288
|
+
return mutationOptions;
|
|
289
|
+
};
|
|
290
|
+
export const evaluationListEvalSetsLegacyQueryKey = (options) => createQueryKey("evaluationListEvalSetsLegacy", options);
|
|
291
|
+
/**
|
|
292
|
+
* List Eval Sets Legacy
|
|
293
|
+
*/
|
|
294
|
+
export const evaluationListEvalSetsLegacyOptions = (options) => {
|
|
295
|
+
return queryOptions({
|
|
296
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
297
|
+
const { data } = await evaluationListEvalSetsLegacy({
|
|
298
|
+
...options,
|
|
299
|
+
...queryKey[0],
|
|
300
|
+
signal,
|
|
301
|
+
throwOnError: true,
|
|
302
|
+
});
|
|
303
|
+
return data;
|
|
304
|
+
},
|
|
305
|
+
queryKey: evaluationListEvalSetsLegacyQueryKey(options),
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
export const evaluationAddSessionToEvalSetQueryKey = (options) => createQueryKey("evaluationAddSessionToEvalSet", options);
|
|
309
|
+
/**
|
|
310
|
+
* Add Session To Eval Set
|
|
311
|
+
*/
|
|
312
|
+
export const evaluationAddSessionToEvalSetOptions = (options) => {
|
|
313
|
+
return queryOptions({
|
|
314
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
315
|
+
const { data } = await evaluationAddSessionToEvalSet({
|
|
316
|
+
...options,
|
|
317
|
+
...queryKey[0],
|
|
318
|
+
signal,
|
|
319
|
+
throwOnError: true,
|
|
320
|
+
});
|
|
321
|
+
return data;
|
|
322
|
+
},
|
|
323
|
+
queryKey: evaluationAddSessionToEvalSetQueryKey(options),
|
|
324
|
+
});
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* Add Session To Eval Set
|
|
328
|
+
*/
|
|
329
|
+
export const evaluationAddSessionToEvalSetMutation = (options) => {
|
|
330
|
+
const mutationOptions = {
|
|
331
|
+
mutationFn: async (localOptions) => {
|
|
332
|
+
const { data } = await evaluationAddSessionToEvalSet({
|
|
333
|
+
...options,
|
|
334
|
+
...localOptions,
|
|
335
|
+
throwOnError: true,
|
|
336
|
+
});
|
|
337
|
+
return data;
|
|
338
|
+
},
|
|
339
|
+
};
|
|
340
|
+
return mutationOptions;
|
|
341
|
+
};
|
|
342
|
+
export const evaluationListEvalsInEvalSetQueryKey = (options) => createQueryKey("evaluationListEvalsInEvalSet", options);
|
|
343
|
+
/**
|
|
344
|
+
* List Evals In Eval Set
|
|
345
|
+
* Lists all evals in an eval set.
|
|
346
|
+
*/
|
|
347
|
+
export const evaluationListEvalsInEvalSetOptions = (options) => {
|
|
348
|
+
return queryOptions({
|
|
349
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
350
|
+
const { data } = await evaluationListEvalsInEvalSet({
|
|
351
|
+
...options,
|
|
352
|
+
...queryKey[0],
|
|
353
|
+
signal,
|
|
354
|
+
throwOnError: true,
|
|
355
|
+
});
|
|
356
|
+
return data;
|
|
357
|
+
},
|
|
358
|
+
queryKey: evaluationListEvalsInEvalSetQueryKey(options),
|
|
359
|
+
});
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* Delete Eval
|
|
363
|
+
*/
|
|
364
|
+
export const evaluationDeleteEvalMutation = (options) => {
|
|
365
|
+
const mutationOptions = {
|
|
366
|
+
mutationFn: async (localOptions) => {
|
|
367
|
+
const { data } = await evaluationDeleteEval({
|
|
368
|
+
...options,
|
|
369
|
+
...localOptions,
|
|
370
|
+
throwOnError: true,
|
|
371
|
+
});
|
|
372
|
+
return data;
|
|
373
|
+
},
|
|
374
|
+
};
|
|
375
|
+
return mutationOptions;
|
|
376
|
+
};
|
|
377
|
+
export const evaluationGetEvalQueryKey = (options) => createQueryKey("evaluationGetEval", options);
|
|
378
|
+
/**
|
|
379
|
+
* Get Eval
|
|
380
|
+
* Gets an eval case in an eval set.
|
|
381
|
+
*/
|
|
382
|
+
export const evaluationGetEvalOptions = (options) => {
|
|
383
|
+
return queryOptions({
|
|
384
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
385
|
+
const { data } = await evaluationGetEval({
|
|
386
|
+
...options,
|
|
387
|
+
...queryKey[0],
|
|
388
|
+
signal,
|
|
389
|
+
throwOnError: true,
|
|
390
|
+
});
|
|
391
|
+
return data;
|
|
392
|
+
},
|
|
393
|
+
queryKey: evaluationGetEvalQueryKey(options),
|
|
394
|
+
});
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* Update Eval
|
|
398
|
+
*/
|
|
399
|
+
export const evaluationUpdateEvalMutation = (options) => {
|
|
400
|
+
const mutationOptions = {
|
|
401
|
+
mutationFn: async (localOptions) => {
|
|
402
|
+
const { data } = await evaluationUpdateEval({
|
|
403
|
+
...options,
|
|
404
|
+
...localOptions,
|
|
405
|
+
throwOnError: true,
|
|
406
|
+
});
|
|
407
|
+
return data;
|
|
408
|
+
},
|
|
409
|
+
};
|
|
410
|
+
return mutationOptions;
|
|
411
|
+
};
|
|
412
|
+
export const evaluationRunEvalLegacyQueryKey = (options) => createQueryKey("evaluationRunEvalLegacy", options);
|
|
413
|
+
/**
|
|
414
|
+
* Run Eval Legacy
|
|
415
|
+
*/
|
|
416
|
+
export const evaluationRunEvalLegacyOptions = (options) => {
|
|
417
|
+
return queryOptions({
|
|
418
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
419
|
+
const { data } = await evaluationRunEvalLegacy({
|
|
420
|
+
...options,
|
|
421
|
+
...queryKey[0],
|
|
422
|
+
signal,
|
|
423
|
+
throwOnError: true,
|
|
424
|
+
});
|
|
425
|
+
return data;
|
|
426
|
+
},
|
|
427
|
+
queryKey: evaluationRunEvalLegacyQueryKey(options),
|
|
428
|
+
});
|
|
429
|
+
};
|
|
430
|
+
/**
|
|
431
|
+
* Run Eval Legacy
|
|
432
|
+
*/
|
|
433
|
+
export const evaluationRunEvalLegacyMutation = (options) => {
|
|
434
|
+
const mutationOptions = {
|
|
435
|
+
mutationFn: async (localOptions) => {
|
|
436
|
+
const { data } = await evaluationRunEvalLegacy({
|
|
437
|
+
...options,
|
|
438
|
+
...localOptions,
|
|
439
|
+
throwOnError: true,
|
|
440
|
+
});
|
|
441
|
+
return data;
|
|
442
|
+
},
|
|
443
|
+
};
|
|
444
|
+
return mutationOptions;
|
|
445
|
+
};
|
|
446
|
+
export const evaluationRunEvalQueryKey = (options) => createQueryKey("evaluationRunEval", options);
|
|
447
|
+
/**
|
|
448
|
+
* Run Eval
|
|
449
|
+
* Runs an eval given the details in the eval request.
|
|
450
|
+
*/
|
|
451
|
+
export const evaluationRunEvalOptions = (options) => {
|
|
452
|
+
return queryOptions({
|
|
453
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
454
|
+
const { data } = await evaluationRunEval({
|
|
455
|
+
...options,
|
|
456
|
+
...queryKey[0],
|
|
457
|
+
signal,
|
|
458
|
+
throwOnError: true,
|
|
459
|
+
});
|
|
460
|
+
return data;
|
|
461
|
+
},
|
|
462
|
+
queryKey: evaluationRunEvalQueryKey(options),
|
|
463
|
+
});
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Run Eval
|
|
467
|
+
* Runs an eval given the details in the eval request.
|
|
468
|
+
*/
|
|
469
|
+
export const evaluationRunEvalMutation = (options) => {
|
|
470
|
+
const mutationOptions = {
|
|
471
|
+
mutationFn: async (localOptions) => {
|
|
472
|
+
const { data } = await evaluationRunEval({
|
|
473
|
+
...options,
|
|
474
|
+
...localOptions,
|
|
475
|
+
throwOnError: true,
|
|
476
|
+
});
|
|
477
|
+
return data;
|
|
478
|
+
},
|
|
479
|
+
};
|
|
480
|
+
return mutationOptions;
|
|
481
|
+
};
|
|
482
|
+
export const evaluationGetEvalResultQueryKey = (options) => createQueryKey("evaluationGetEvalResult", options);
|
|
483
|
+
/**
|
|
484
|
+
* Get Eval Result
|
|
485
|
+
* Gets the eval result for the given eval id.
|
|
486
|
+
*/
|
|
487
|
+
export const evaluationGetEvalResultOptions = (options) => {
|
|
488
|
+
return queryOptions({
|
|
489
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
490
|
+
const { data } = await evaluationGetEvalResult({
|
|
491
|
+
...options,
|
|
492
|
+
...queryKey[0],
|
|
493
|
+
signal,
|
|
494
|
+
throwOnError: true,
|
|
495
|
+
});
|
|
496
|
+
return data;
|
|
497
|
+
},
|
|
498
|
+
queryKey: evaluationGetEvalResultQueryKey(options),
|
|
499
|
+
});
|
|
500
|
+
};
|
|
501
|
+
export const evaluationGetEvalResultLegacyQueryKey = (options) => createQueryKey("evaluationGetEvalResultLegacy", options);
|
|
502
|
+
/**
|
|
503
|
+
* Get Eval Result Legacy
|
|
504
|
+
*/
|
|
505
|
+
export const evaluationGetEvalResultLegacyOptions = (options) => {
|
|
506
|
+
return queryOptions({
|
|
507
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
508
|
+
const { data } = await evaluationGetEvalResultLegacy({
|
|
509
|
+
...options,
|
|
510
|
+
...queryKey[0],
|
|
511
|
+
signal,
|
|
512
|
+
throwOnError: true,
|
|
513
|
+
});
|
|
514
|
+
return data;
|
|
515
|
+
},
|
|
516
|
+
queryKey: evaluationGetEvalResultLegacyQueryKey(options),
|
|
517
|
+
});
|
|
518
|
+
};
|
|
519
|
+
export const evaluationListEvalResultsQueryKey = (options) => createQueryKey("evaluationListEvalResults", options);
|
|
520
|
+
/**
|
|
521
|
+
* List Eval Results
|
|
522
|
+
* Lists all eval results for the given app.
|
|
523
|
+
*/
|
|
524
|
+
export const evaluationListEvalResultsOptions = (options) => {
|
|
525
|
+
return queryOptions({
|
|
526
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
527
|
+
const { data } = await evaluationListEvalResults({
|
|
528
|
+
...options,
|
|
529
|
+
...queryKey[0],
|
|
530
|
+
signal,
|
|
531
|
+
throwOnError: true,
|
|
532
|
+
});
|
|
533
|
+
return data;
|
|
534
|
+
},
|
|
535
|
+
queryKey: evaluationListEvalResultsQueryKey(options),
|
|
536
|
+
});
|
|
537
|
+
};
|
|
538
|
+
export const evaluationListEvalResultsLegacyQueryKey = (options) => createQueryKey("evaluationListEvalResultsLegacy", options);
|
|
539
|
+
/**
|
|
540
|
+
* List Eval Results Legacy
|
|
541
|
+
*/
|
|
542
|
+
export const evaluationListEvalResultsLegacyOptions = (options) => {
|
|
543
|
+
return queryOptions({
|
|
544
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
545
|
+
const { data } = await evaluationListEvalResultsLegacy({
|
|
546
|
+
...options,
|
|
547
|
+
...queryKey[0],
|
|
548
|
+
signal,
|
|
549
|
+
throwOnError: true,
|
|
550
|
+
});
|
|
551
|
+
return data;
|
|
552
|
+
},
|
|
553
|
+
queryKey: evaluationListEvalResultsLegacyQueryKey(options),
|
|
554
|
+
});
|
|
555
|
+
};
|
|
556
|
+
export const evaluationListMetricsInfoQueryKey = (options) => createQueryKey("evaluationListMetricsInfo", options);
|
|
557
|
+
/**
|
|
558
|
+
* List Metrics Info
|
|
559
|
+
* Lists all eval metrics for the given app.
|
|
560
|
+
*/
|
|
561
|
+
export const evaluationListMetricsInfoOptions = (options) => {
|
|
562
|
+
return queryOptions({
|
|
563
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
564
|
+
const { data } = await evaluationListMetricsInfo({
|
|
565
|
+
...options,
|
|
566
|
+
...queryKey[0],
|
|
567
|
+
signal,
|
|
568
|
+
throwOnError: true,
|
|
569
|
+
});
|
|
570
|
+
return data;
|
|
571
|
+
},
|
|
572
|
+
queryKey: evaluationListMetricsInfoQueryKey(options),
|
|
573
|
+
});
|
|
574
|
+
};
|
|
575
|
+
/**
|
|
576
|
+
* Delete Artifact
|
|
577
|
+
*/
|
|
578
|
+
export const deleteArtifactMutation = (options) => {
|
|
579
|
+
const mutationOptions = {
|
|
580
|
+
mutationFn: async (localOptions) => {
|
|
581
|
+
const { data } = await deleteArtifact({
|
|
582
|
+
...options,
|
|
583
|
+
...localOptions,
|
|
584
|
+
throwOnError: true,
|
|
585
|
+
});
|
|
586
|
+
return data;
|
|
587
|
+
},
|
|
588
|
+
};
|
|
589
|
+
return mutationOptions;
|
|
590
|
+
};
|
|
591
|
+
export const loadArtifactQueryKey = (options) => createQueryKey("loadArtifact", options);
|
|
592
|
+
/**
|
|
593
|
+
* Load Artifact
|
|
594
|
+
*/
|
|
595
|
+
export const loadArtifactOptions = (options) => {
|
|
596
|
+
return queryOptions({
|
|
597
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
598
|
+
const { data } = await loadArtifact({
|
|
599
|
+
...options,
|
|
600
|
+
...queryKey[0],
|
|
601
|
+
signal,
|
|
602
|
+
throwOnError: true,
|
|
603
|
+
});
|
|
604
|
+
return data;
|
|
605
|
+
},
|
|
606
|
+
queryKey: loadArtifactQueryKey(options),
|
|
607
|
+
});
|
|
608
|
+
};
|
|
609
|
+
export const loadArtifactVersionQueryKey = (options) => createQueryKey("loadArtifactVersion", options);
|
|
610
|
+
/**
|
|
611
|
+
* Load Artifact Version
|
|
612
|
+
*/
|
|
613
|
+
export const loadArtifactVersionOptions = (options) => {
|
|
614
|
+
return queryOptions({
|
|
615
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
616
|
+
const { data } = await loadArtifactVersion({
|
|
617
|
+
...options,
|
|
618
|
+
...queryKey[0],
|
|
619
|
+
signal,
|
|
620
|
+
throwOnError: true,
|
|
621
|
+
});
|
|
622
|
+
return data;
|
|
623
|
+
},
|
|
624
|
+
queryKey: loadArtifactVersionQueryKey(options),
|
|
625
|
+
});
|
|
626
|
+
};
|
|
627
|
+
export const listArtifactNamesQueryKey = (options) => createQueryKey("listArtifactNames", options);
|
|
628
|
+
/**
|
|
629
|
+
* List Artifact Names
|
|
630
|
+
*/
|
|
631
|
+
export const listArtifactNamesOptions = (options) => {
|
|
632
|
+
return queryOptions({
|
|
633
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
634
|
+
const { data } = await listArtifactNames({
|
|
635
|
+
...options,
|
|
636
|
+
...queryKey[0],
|
|
637
|
+
signal,
|
|
638
|
+
throwOnError: true,
|
|
639
|
+
});
|
|
640
|
+
return data;
|
|
641
|
+
},
|
|
642
|
+
queryKey: listArtifactNamesQueryKey(options),
|
|
643
|
+
});
|
|
644
|
+
};
|
|
645
|
+
export const listArtifactVersionsQueryKey = (options) => createQueryKey("listArtifactVersions", options);
|
|
646
|
+
/**
|
|
647
|
+
* List Artifact Versions
|
|
648
|
+
*/
|
|
649
|
+
export const listArtifactVersionsOptions = (options) => {
|
|
650
|
+
return queryOptions({
|
|
651
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
652
|
+
const { data } = await listArtifactVersions({
|
|
653
|
+
...options,
|
|
654
|
+
...queryKey[0],
|
|
655
|
+
signal,
|
|
656
|
+
throwOnError: true,
|
|
657
|
+
});
|
|
658
|
+
return data;
|
|
659
|
+
},
|
|
660
|
+
queryKey: listArtifactVersionsQueryKey(options),
|
|
661
|
+
});
|
|
662
|
+
};
|
|
663
|
+
export const runAgentQueryKey = (options) => createQueryKey("runAgent", options);
|
|
664
|
+
/**
|
|
665
|
+
* Run Agent
|
|
666
|
+
*/
|
|
667
|
+
export const runAgentOptions = (options) => {
|
|
668
|
+
return queryOptions({
|
|
669
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
670
|
+
const { data } = await runAgent({
|
|
671
|
+
...options,
|
|
672
|
+
...queryKey[0],
|
|
673
|
+
signal,
|
|
674
|
+
throwOnError: true,
|
|
675
|
+
});
|
|
676
|
+
return data;
|
|
677
|
+
},
|
|
678
|
+
queryKey: runAgentQueryKey(options),
|
|
679
|
+
});
|
|
680
|
+
};
|
|
681
|
+
/**
|
|
682
|
+
* Run Agent
|
|
683
|
+
*/
|
|
684
|
+
export const runAgentMutation = (options) => {
|
|
685
|
+
const mutationOptions = {
|
|
686
|
+
mutationFn: async (localOptions) => {
|
|
687
|
+
const { data } = await runAgent({
|
|
688
|
+
...options,
|
|
689
|
+
...localOptions,
|
|
690
|
+
throwOnError: true,
|
|
691
|
+
});
|
|
692
|
+
return data;
|
|
693
|
+
},
|
|
694
|
+
};
|
|
695
|
+
return mutationOptions;
|
|
696
|
+
};
|
|
697
|
+
export const runAgentSseQueryKey = (options) => createQueryKey("runAgentSse", options);
|
|
698
|
+
/**
|
|
699
|
+
* Run Agent Sse
|
|
700
|
+
*/
|
|
701
|
+
export const runAgentSseOptions = (options) => {
|
|
702
|
+
return queryOptions({
|
|
703
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
704
|
+
const { data } = await runAgentSse({
|
|
705
|
+
...options,
|
|
706
|
+
...queryKey[0],
|
|
707
|
+
signal,
|
|
708
|
+
throwOnError: true,
|
|
709
|
+
});
|
|
710
|
+
return data;
|
|
711
|
+
},
|
|
712
|
+
queryKey: runAgentSseQueryKey(options),
|
|
713
|
+
});
|
|
714
|
+
};
|
|
715
|
+
/**
|
|
716
|
+
* Run Agent Sse
|
|
717
|
+
*/
|
|
718
|
+
export const runAgentSseMutation = (options) => {
|
|
719
|
+
const mutationOptions = {
|
|
720
|
+
mutationFn: async (localOptions) => {
|
|
721
|
+
const { data } = await runAgentSse({
|
|
722
|
+
...options,
|
|
723
|
+
...localOptions,
|
|
724
|
+
throwOnError: true,
|
|
725
|
+
});
|
|
726
|
+
return data;
|
|
727
|
+
},
|
|
728
|
+
};
|
|
729
|
+
return mutationOptions;
|
|
730
|
+
};
|
|
731
|
+
export const debugGetEventGraphQueryKey = (options) => createQueryKey("debugGetEventGraph", options);
|
|
732
|
+
/**
|
|
733
|
+
* Get Event Graph
|
|
734
|
+
*/
|
|
735
|
+
export const debugGetEventGraphOptions = (options) => {
|
|
736
|
+
return queryOptions({
|
|
737
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
738
|
+
const { data } = await debugGetEventGraph({
|
|
739
|
+
...options,
|
|
740
|
+
...queryKey[0],
|
|
741
|
+
signal,
|
|
742
|
+
throwOnError: true,
|
|
743
|
+
});
|
|
744
|
+
return data;
|
|
745
|
+
},
|
|
746
|
+
queryKey: debugGetEventGraphQueryKey(options),
|
|
747
|
+
});
|
|
748
|
+
};
|
|
749
|
+
export const redirectRootToDevUiQueryKey = (options) => createQueryKey("redirectRootToDevUi", options);
|
|
750
|
+
/**
|
|
751
|
+
* Redirect Root To Dev Ui
|
|
752
|
+
*/
|
|
753
|
+
export const redirectRootToDevUiOptions = (options) => {
|
|
754
|
+
return queryOptions({
|
|
755
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
756
|
+
const { data } = await redirectRootToDevUi({
|
|
757
|
+
...options,
|
|
758
|
+
...queryKey[0],
|
|
759
|
+
signal,
|
|
760
|
+
throwOnError: true,
|
|
761
|
+
});
|
|
762
|
+
return data;
|
|
763
|
+
},
|
|
764
|
+
queryKey: redirectRootToDevUiQueryKey(options),
|
|
765
|
+
});
|
|
766
|
+
};
|
|
767
|
+
export const redirectDevUiAddSlashQueryKey = (options) => createQueryKey("redirectDevUiAddSlash", options);
|
|
768
|
+
/**
|
|
769
|
+
* Redirect Dev Ui Add Slash
|
|
770
|
+
*/
|
|
771
|
+
export const redirectDevUiAddSlashOptions = (options) => {
|
|
772
|
+
return queryOptions({
|
|
773
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
774
|
+
const { data } = await redirectDevUiAddSlash({
|
|
775
|
+
...options,
|
|
776
|
+
...queryKey[0],
|
|
777
|
+
signal,
|
|
778
|
+
throwOnError: true,
|
|
779
|
+
});
|
|
780
|
+
return data;
|
|
781
|
+
},
|
|
782
|
+
queryKey: redirectDevUiAddSlashQueryKey(options),
|
|
783
|
+
});
|
|
784
|
+
};
|
|
785
|
+
export const builderBuildQueryKey = (options) => createQueryKey("builderBuild", options);
|
|
786
|
+
/**
|
|
787
|
+
* Builder Build
|
|
788
|
+
*/
|
|
789
|
+
export const builderBuildOptions = (options) => {
|
|
790
|
+
return queryOptions({
|
|
791
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
792
|
+
const { data } = await builderBuild({
|
|
793
|
+
...options,
|
|
794
|
+
...queryKey[0],
|
|
795
|
+
signal,
|
|
796
|
+
throwOnError: true,
|
|
797
|
+
});
|
|
798
|
+
return data;
|
|
799
|
+
},
|
|
800
|
+
queryKey: builderBuildQueryKey(options),
|
|
801
|
+
});
|
|
802
|
+
};
|
|
803
|
+
/**
|
|
804
|
+
* Builder Build
|
|
805
|
+
*/
|
|
806
|
+
export const builderBuildMutation = (options) => {
|
|
807
|
+
const mutationOptions = {
|
|
808
|
+
mutationFn: async (localOptions) => {
|
|
809
|
+
const { data } = await builderBuild({
|
|
810
|
+
...options,
|
|
811
|
+
...localOptions,
|
|
812
|
+
throwOnError: true,
|
|
813
|
+
});
|
|
814
|
+
return data;
|
|
815
|
+
},
|
|
816
|
+
};
|
|
817
|
+
return mutationOptions;
|
|
818
|
+
};
|
|
819
|
+
export const getAgentBuilderQueryKey = (options) => createQueryKey("getAgentBuilder", options);
|
|
820
|
+
/**
|
|
821
|
+
* Get Agent Builder
|
|
822
|
+
*/
|
|
823
|
+
export const getAgentBuilderOptions = (options) => {
|
|
824
|
+
return queryOptions({
|
|
825
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
826
|
+
const { data } = await getAgentBuilder({
|
|
827
|
+
...options,
|
|
828
|
+
...queryKey[0],
|
|
829
|
+
signal,
|
|
830
|
+
throwOnError: true,
|
|
831
|
+
});
|
|
832
|
+
return data;
|
|
833
|
+
},
|
|
834
|
+
queryKey: getAgentBuilderQueryKey(options),
|
|
835
|
+
});
|
|
836
|
+
};
|
|
837
|
+
export const chatAgentGetChatConfigQueryKey = (options) => createQueryKey("chatAgentGetChatConfig", options);
|
|
838
|
+
/**
|
|
839
|
+
* Get Chat Config
|
|
840
|
+
* 获取当前聊天配置
|
|
841
|
+
*/
|
|
842
|
+
export const chatAgentGetChatConfigOptions = (options) => {
|
|
843
|
+
return queryOptions({
|
|
844
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
845
|
+
const { data } = await chatAgentGetChatConfig({
|
|
846
|
+
...options,
|
|
847
|
+
...queryKey[0],
|
|
848
|
+
signal,
|
|
849
|
+
throwOnError: true,
|
|
850
|
+
});
|
|
851
|
+
return data;
|
|
852
|
+
},
|
|
853
|
+
queryKey: chatAgentGetChatConfigQueryKey(options),
|
|
854
|
+
});
|
|
855
|
+
};
|
|
856
|
+
export const chatAgentUpdateChatConfigQueryKey = (options) => createQueryKey("chatAgentUpdateChatConfig", options);
|
|
857
|
+
/**
|
|
858
|
+
* Update Chat Config
|
|
859
|
+
* 更新聊天配置
|
|
860
|
+
*/
|
|
861
|
+
export const chatAgentUpdateChatConfigOptions = (options) => {
|
|
862
|
+
return queryOptions({
|
|
863
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
864
|
+
const { data } = await chatAgentUpdateChatConfig({
|
|
865
|
+
...options,
|
|
866
|
+
...queryKey[0],
|
|
867
|
+
signal,
|
|
868
|
+
throwOnError: true,
|
|
869
|
+
});
|
|
870
|
+
return data;
|
|
871
|
+
},
|
|
872
|
+
queryKey: chatAgentUpdateChatConfigQueryKey(options),
|
|
873
|
+
});
|
|
874
|
+
};
|
|
875
|
+
/**
|
|
876
|
+
* Update Chat Config
|
|
877
|
+
* 更新聊天配置
|
|
878
|
+
*/
|
|
879
|
+
export const chatAgentUpdateChatConfigMutation = (options) => {
|
|
880
|
+
const mutationOptions = {
|
|
881
|
+
mutationFn: async (localOptions) => {
|
|
882
|
+
const { data } = await chatAgentUpdateChatConfig({
|
|
883
|
+
...options,
|
|
884
|
+
...localOptions,
|
|
885
|
+
throwOnError: true,
|
|
886
|
+
});
|
|
887
|
+
return data;
|
|
888
|
+
},
|
|
889
|
+
};
|
|
890
|
+
return mutationOptions;
|
|
891
|
+
};
|
|
892
|
+
export const chatAgentGetProvidersQueryKey = (options) => createQueryKey("chatAgentGetProviders", options);
|
|
893
|
+
/**
|
|
894
|
+
* Get Providers
|
|
895
|
+
* 获取所有可用的AI提供商
|
|
896
|
+
*/
|
|
897
|
+
export const chatAgentGetProvidersOptions = (options) => {
|
|
898
|
+
return queryOptions({
|
|
899
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
900
|
+
const { data } = await chatAgentGetProviders({
|
|
901
|
+
...options,
|
|
902
|
+
...queryKey[0],
|
|
903
|
+
signal,
|
|
904
|
+
throwOnError: true,
|
|
905
|
+
});
|
|
906
|
+
return data;
|
|
907
|
+
},
|
|
908
|
+
queryKey: chatAgentGetProvidersQueryKey(options),
|
|
909
|
+
});
|
|
910
|
+
};
|
|
911
|
+
export const chatAgentValidateApiKeyQueryKey = (options) => createQueryKey("chatAgentValidateApiKey", options);
|
|
912
|
+
/**
|
|
913
|
+
* Validate Api Key
|
|
914
|
+
* 验证API密钥
|
|
915
|
+
*/
|
|
916
|
+
export const chatAgentValidateApiKeyOptions = (options) => {
|
|
917
|
+
return queryOptions({
|
|
918
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
919
|
+
const { data } = await chatAgentValidateApiKey({
|
|
920
|
+
...options,
|
|
921
|
+
...queryKey[0],
|
|
922
|
+
signal,
|
|
923
|
+
throwOnError: true,
|
|
924
|
+
});
|
|
925
|
+
return data;
|
|
926
|
+
},
|
|
927
|
+
queryKey: chatAgentValidateApiKeyQueryKey(options),
|
|
928
|
+
});
|
|
929
|
+
};
|
|
930
|
+
/**
|
|
931
|
+
* Validate Api Key
|
|
932
|
+
* 验证API密钥
|
|
933
|
+
*/
|
|
934
|
+
export const chatAgentValidateApiKeyMutation = (options) => {
|
|
935
|
+
const mutationOptions = {
|
|
936
|
+
mutationFn: async (localOptions) => {
|
|
937
|
+
const { data } = await chatAgentValidateApiKey({
|
|
938
|
+
...options,
|
|
939
|
+
...localOptions,
|
|
940
|
+
throwOnError: true,
|
|
941
|
+
});
|
|
942
|
+
return data;
|
|
943
|
+
},
|
|
944
|
+
};
|
|
945
|
+
return mutationOptions;
|
|
946
|
+
};
|
|
947
|
+
export const chatAgentExportConfigQueryKey = (options) => createQueryKey("chatAgentExportConfig", options);
|
|
948
|
+
/**
|
|
949
|
+
* Export Config
|
|
950
|
+
* 导出AI配置
|
|
951
|
+
*/
|
|
952
|
+
export const chatAgentExportConfigOptions = (options) => {
|
|
953
|
+
return queryOptions({
|
|
954
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
955
|
+
const { data } = await chatAgentExportConfig({
|
|
956
|
+
...options,
|
|
957
|
+
...queryKey[0],
|
|
958
|
+
signal,
|
|
959
|
+
throwOnError: true,
|
|
960
|
+
});
|
|
961
|
+
return data;
|
|
962
|
+
},
|
|
963
|
+
queryKey: chatAgentExportConfigQueryKey(options),
|
|
964
|
+
});
|
|
965
|
+
};
|
|
966
|
+
export const chatAgentImportConfigQueryKey = (options) => createQueryKey("chatAgentImportConfig", options);
|
|
967
|
+
/**
|
|
968
|
+
* Import Config
|
|
969
|
+
* 导入AI配置
|
|
970
|
+
*/
|
|
971
|
+
export const chatAgentImportConfigOptions = (options) => {
|
|
972
|
+
return queryOptions({
|
|
973
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
974
|
+
const { data } = await chatAgentImportConfig({
|
|
975
|
+
...options,
|
|
976
|
+
...queryKey[0],
|
|
977
|
+
signal,
|
|
978
|
+
throwOnError: true,
|
|
979
|
+
});
|
|
980
|
+
return data;
|
|
981
|
+
},
|
|
982
|
+
queryKey: chatAgentImportConfigQueryKey(options),
|
|
983
|
+
});
|
|
984
|
+
};
|
|
985
|
+
/**
|
|
986
|
+
* Import Config
|
|
987
|
+
* 导入AI配置
|
|
988
|
+
*/
|
|
989
|
+
export const chatAgentImportConfigMutation = (options) => {
|
|
990
|
+
const mutationOptions = {
|
|
991
|
+
mutationFn: async (localOptions) => {
|
|
992
|
+
const { data } = await chatAgentImportConfig({
|
|
993
|
+
...options,
|
|
994
|
+
...localOptions,
|
|
995
|
+
throwOnError: true,
|
|
996
|
+
});
|
|
997
|
+
return data;
|
|
998
|
+
},
|
|
999
|
+
};
|
|
1000
|
+
return mutationOptions;
|
|
1001
|
+
};
|
|
1002
|
+
export const chatAgentChatQueryKey = (options) => createQueryKey("chatAgentChat", options);
|
|
1003
|
+
/**
|
|
1004
|
+
* Chat
|
|
1005
|
+
* 处理聊天请求 - 使用新的Agent架构
|
|
1006
|
+
*/
|
|
1007
|
+
export const chatAgentChatOptions = (options) => {
|
|
1008
|
+
return queryOptions({
|
|
1009
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1010
|
+
const { data } = await chatAgentChat({
|
|
1011
|
+
...options,
|
|
1012
|
+
...queryKey[0],
|
|
1013
|
+
signal,
|
|
1014
|
+
throwOnError: true,
|
|
1015
|
+
});
|
|
1016
|
+
return data;
|
|
1017
|
+
},
|
|
1018
|
+
queryKey: chatAgentChatQueryKey(options),
|
|
1019
|
+
});
|
|
1020
|
+
};
|
|
1021
|
+
/**
|
|
1022
|
+
* Chat
|
|
1023
|
+
* 处理聊天请求 - 使用新的Agent架构
|
|
1024
|
+
*/
|
|
1025
|
+
export const chatAgentChatMutation = (options) => {
|
|
1026
|
+
const mutationOptions = {
|
|
1027
|
+
mutationFn: async (localOptions) => {
|
|
1028
|
+
const { data } = await chatAgentChat({
|
|
1029
|
+
...options,
|
|
1030
|
+
...localOptions,
|
|
1031
|
+
throwOnError: true,
|
|
1032
|
+
});
|
|
1033
|
+
return data;
|
|
1034
|
+
},
|
|
1035
|
+
};
|
|
1036
|
+
return mutationOptions;
|
|
1037
|
+
};
|
|
1038
|
+
export const listItemsQueryKey = (options) => createQueryKey("listItems", options);
|
|
1039
|
+
/**
|
|
1040
|
+
* List Items
|
|
1041
|
+
* List all items in the database.
|
|
1042
|
+
*
|
|
1043
|
+
* Returns a list of items, with pagination support.
|
|
1044
|
+
*/
|
|
1045
|
+
export const listItemsOptions = (options) => {
|
|
1046
|
+
return queryOptions({
|
|
1047
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1048
|
+
const { data } = await listItems({
|
|
1049
|
+
...options,
|
|
1050
|
+
...queryKey[0],
|
|
1051
|
+
signal,
|
|
1052
|
+
throwOnError: true,
|
|
1053
|
+
});
|
|
1054
|
+
return data;
|
|
1055
|
+
},
|
|
1056
|
+
queryKey: listItemsQueryKey(options),
|
|
1057
|
+
});
|
|
1058
|
+
};
|
|
1059
|
+
export const createItemQueryKey = (options) => createQueryKey("createItem", options);
|
|
1060
|
+
/**
|
|
1061
|
+
* Create Item
|
|
1062
|
+
* Create a new item in the database.
|
|
1063
|
+
*
|
|
1064
|
+
* Returns the created item with its assigned ID.
|
|
1065
|
+
*/
|
|
1066
|
+
export const createItemOptions = (options) => {
|
|
1067
|
+
return queryOptions({
|
|
1068
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1069
|
+
const { data } = await createItem({
|
|
1070
|
+
...options,
|
|
1071
|
+
...queryKey[0],
|
|
1072
|
+
signal,
|
|
1073
|
+
throwOnError: true,
|
|
1074
|
+
});
|
|
1075
|
+
return data;
|
|
1076
|
+
},
|
|
1077
|
+
queryKey: createItemQueryKey(options),
|
|
1078
|
+
});
|
|
1079
|
+
};
|
|
1080
|
+
/**
|
|
1081
|
+
* Create Item
|
|
1082
|
+
* Create a new item in the database.
|
|
1083
|
+
*
|
|
1084
|
+
* Returns the created item with its assigned ID.
|
|
1085
|
+
*/
|
|
1086
|
+
export const createItemMutation = (options) => {
|
|
1087
|
+
const mutationOptions = {
|
|
1088
|
+
mutationFn: async (localOptions) => {
|
|
1089
|
+
const { data } = await createItem({
|
|
1090
|
+
...options,
|
|
1091
|
+
...localOptions,
|
|
1092
|
+
throwOnError: true,
|
|
1093
|
+
});
|
|
1094
|
+
return data;
|
|
1095
|
+
},
|
|
1096
|
+
};
|
|
1097
|
+
return mutationOptions;
|
|
1098
|
+
};
|
|
1099
|
+
/**
|
|
1100
|
+
* Delete Item
|
|
1101
|
+
* Delete an item from the database.
|
|
1102
|
+
*
|
|
1103
|
+
* Raises a 404 error if the item does not exist.
|
|
1104
|
+
*/
|
|
1105
|
+
export const deleteItemMutation = (options) => {
|
|
1106
|
+
const mutationOptions = {
|
|
1107
|
+
mutationFn: async (localOptions) => {
|
|
1108
|
+
const { data } = await deleteItem({
|
|
1109
|
+
...options,
|
|
1110
|
+
...localOptions,
|
|
1111
|
+
throwOnError: true,
|
|
1112
|
+
});
|
|
1113
|
+
return data;
|
|
1114
|
+
},
|
|
1115
|
+
};
|
|
1116
|
+
return mutationOptions;
|
|
1117
|
+
};
|
|
1118
|
+
export const getItemQueryKey = (options) => createQueryKey("getItem", options);
|
|
1119
|
+
/**
|
|
1120
|
+
* Read Item
|
|
1121
|
+
* Get a specific item by its ID.
|
|
1122
|
+
*
|
|
1123
|
+
* Raises a 404 error if the item does not exist.
|
|
1124
|
+
*/
|
|
1125
|
+
export const getItemOptions = (options) => {
|
|
1126
|
+
return queryOptions({
|
|
1127
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1128
|
+
const { data } = await getItem({
|
|
1129
|
+
...options,
|
|
1130
|
+
...queryKey[0],
|
|
1131
|
+
signal,
|
|
1132
|
+
throwOnError: true,
|
|
1133
|
+
});
|
|
1134
|
+
return data;
|
|
1135
|
+
},
|
|
1136
|
+
queryKey: getItemQueryKey(options),
|
|
1137
|
+
});
|
|
1138
|
+
};
|
|
1139
|
+
/**
|
|
1140
|
+
* Update Item
|
|
1141
|
+
* Update an existing item.
|
|
1142
|
+
*
|
|
1143
|
+
* Raises a 404 error if the item does not exist.
|
|
1144
|
+
*/
|
|
1145
|
+
export const updateItemMutation = (options) => {
|
|
1146
|
+
const mutationOptions = {
|
|
1147
|
+
mutationFn: async (localOptions) => {
|
|
1148
|
+
const { data } = await updateItem({
|
|
1149
|
+
...options,
|
|
1150
|
+
...localOptions,
|
|
1151
|
+
throwOnError: true,
|
|
1152
|
+
});
|
|
1153
|
+
return data;
|
|
1154
|
+
},
|
|
1155
|
+
};
|
|
1156
|
+
return mutationOptions;
|
|
1157
|
+
};
|
|
1158
|
+
export const searchItemsQueryKey = (options) => createQueryKey("searchItems", options);
|
|
1159
|
+
/**
|
|
1160
|
+
* Search Items
|
|
1161
|
+
* Search for items with various filters.
|
|
1162
|
+
*
|
|
1163
|
+
* Returns a list of items that match the search criteria.
|
|
1164
|
+
*/
|
|
1165
|
+
export const searchItemsOptions = (options) => {
|
|
1166
|
+
return queryOptions({
|
|
1167
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1168
|
+
const { data } = await searchItems({
|
|
1169
|
+
...options,
|
|
1170
|
+
...queryKey[0],
|
|
1171
|
+
signal,
|
|
1172
|
+
throwOnError: true,
|
|
1173
|
+
});
|
|
1174
|
+
return data;
|
|
1175
|
+
},
|
|
1176
|
+
queryKey: searchItemsQueryKey(options),
|
|
1177
|
+
});
|
|
1178
|
+
};
|
|
1179
|
+
export const agentsAgentrunQueryKey = (options) => createQueryKey("agentsAgentrun", options);
|
|
1180
|
+
/**
|
|
1181
|
+
* Agentrun
|
|
1182
|
+
*/
|
|
1183
|
+
export const agentsAgentrunOptions = (options) => {
|
|
1184
|
+
return queryOptions({
|
|
1185
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1186
|
+
const { data } = await agentsAgentrun({
|
|
1187
|
+
...options,
|
|
1188
|
+
...queryKey[0],
|
|
1189
|
+
signal,
|
|
1190
|
+
throwOnError: true,
|
|
1191
|
+
});
|
|
1192
|
+
return data;
|
|
1193
|
+
},
|
|
1194
|
+
queryKey: agentsAgentrunQueryKey(options),
|
|
1195
|
+
});
|
|
1196
|
+
};
|
|
1197
|
+
/**
|
|
1198
|
+
* Agentrun
|
|
1199
|
+
*/
|
|
1200
|
+
export const agentsAgentrunMutation = (options) => {
|
|
1201
|
+
const mutationOptions = {
|
|
1202
|
+
mutationFn: async (localOptions) => {
|
|
1203
|
+
const { data } = await agentsAgentrun({
|
|
1204
|
+
...options,
|
|
1205
|
+
...localOptions,
|
|
1206
|
+
throwOnError: true,
|
|
1207
|
+
});
|
|
1208
|
+
return data;
|
|
1209
|
+
},
|
|
1210
|
+
};
|
|
1211
|
+
return mutationOptions;
|
|
1212
|
+
};
|
|
1213
|
+
export const demoDemo1QueryKey = (options) => createQueryKey("demoDemo1", options);
|
|
1214
|
+
/**
|
|
1215
|
+
* Demo1
|
|
1216
|
+
* 演示: 调用 honoapi (使用 HonoClient)
|
|
1217
|
+
*/
|
|
1218
|
+
export const demoDemo1Options = (options) => {
|
|
1219
|
+
return queryOptions({
|
|
1220
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1221
|
+
const { data } = await demoDemo1({
|
|
1222
|
+
...options,
|
|
1223
|
+
...queryKey[0],
|
|
1224
|
+
signal,
|
|
1225
|
+
throwOnError: true,
|
|
1226
|
+
});
|
|
1227
|
+
return data;
|
|
1228
|
+
},
|
|
1229
|
+
queryKey: demoDemo1QueryKey(options),
|
|
1230
|
+
});
|
|
1231
|
+
};
|
|
1232
|
+
/**
|
|
1233
|
+
* Demo1
|
|
1234
|
+
* 演示: 调用 honoapi (使用 HonoClient)
|
|
1235
|
+
*/
|
|
1236
|
+
export const demoDemo1Mutation = (options) => {
|
|
1237
|
+
const mutationOptions = {
|
|
1238
|
+
mutationFn: async (localOptions) => {
|
|
1239
|
+
const { data } = await demoDemo1({
|
|
1240
|
+
...options,
|
|
1241
|
+
...localOptions,
|
|
1242
|
+
throwOnError: true,
|
|
1243
|
+
});
|
|
1244
|
+
return data;
|
|
1245
|
+
},
|
|
1246
|
+
};
|
|
1247
|
+
return mutationOptions;
|
|
1248
|
+
};
|
|
1249
|
+
export const sandboxStartNapcatSandboxQueryKey = (options) => createQueryKey("sandboxStartNapcatSandbox", options);
|
|
1250
|
+
/**
|
|
1251
|
+
* Start Napcat Sandbox
|
|
1252
|
+
* 启动 Napcat 沙箱(同步返回结果)
|
|
1253
|
+
*/
|
|
1254
|
+
export const sandboxStartNapcatSandboxOptions = (options) => {
|
|
1255
|
+
return queryOptions({
|
|
1256
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1257
|
+
const { data } = await sandboxStartNapcatSandbox({
|
|
1258
|
+
...options,
|
|
1259
|
+
...queryKey[0],
|
|
1260
|
+
signal,
|
|
1261
|
+
throwOnError: true,
|
|
1262
|
+
});
|
|
1263
|
+
return data;
|
|
1264
|
+
},
|
|
1265
|
+
queryKey: sandboxStartNapcatSandboxQueryKey(options),
|
|
1266
|
+
});
|
|
1267
|
+
};
|
|
1268
|
+
/**
|
|
1269
|
+
* Start Napcat Sandbox
|
|
1270
|
+
* 启动 Napcat 沙箱(同步返回结果)
|
|
1271
|
+
*/
|
|
1272
|
+
export const sandboxStartNapcatSandboxMutation = (options) => {
|
|
1273
|
+
const mutationOptions = {
|
|
1274
|
+
mutationFn: async (localOptions) => {
|
|
1275
|
+
const { data } = await sandboxStartNapcatSandbox({
|
|
1276
|
+
...options,
|
|
1277
|
+
...localOptions,
|
|
1278
|
+
throwOnError: true,
|
|
1279
|
+
});
|
|
1280
|
+
return data;
|
|
1281
|
+
},
|
|
1282
|
+
};
|
|
1283
|
+
return mutationOptions;
|
|
1284
|
+
};
|
|
1285
|
+
export const sandboxCheckSandboxStatusQueryKey = (options) => createQueryKey("sandboxCheckSandboxStatus", options);
|
|
1286
|
+
/**
|
|
1287
|
+
* Check Sandbox Status
|
|
1288
|
+
* 检查指定沙盒的状态
|
|
1289
|
+
*/
|
|
1290
|
+
export const sandboxCheckSandboxStatusOptions = (options) => {
|
|
1291
|
+
return queryOptions({
|
|
1292
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1293
|
+
const { data } = await sandboxCheckSandboxStatus({
|
|
1294
|
+
...options,
|
|
1295
|
+
...queryKey[0],
|
|
1296
|
+
signal,
|
|
1297
|
+
throwOnError: true,
|
|
1298
|
+
});
|
|
1299
|
+
return data;
|
|
1300
|
+
},
|
|
1301
|
+
queryKey: sandboxCheckSandboxStatusQueryKey(options),
|
|
1302
|
+
});
|
|
1303
|
+
};
|
|
1304
|
+
/**
|
|
1305
|
+
* Check Sandbox Status
|
|
1306
|
+
* 检查指定沙盒的状态
|
|
1307
|
+
*/
|
|
1308
|
+
export const sandboxCheckSandboxStatusMutation = (options) => {
|
|
1309
|
+
const mutationOptions = {
|
|
1310
|
+
mutationFn: async (localOptions) => {
|
|
1311
|
+
const { data } = await sandboxCheckSandboxStatus({
|
|
1312
|
+
...options,
|
|
1313
|
+
...localOptions,
|
|
1314
|
+
throwOnError: true,
|
|
1315
|
+
});
|
|
1316
|
+
return data;
|
|
1317
|
+
},
|
|
1318
|
+
};
|
|
1319
|
+
return mutationOptions;
|
|
1320
|
+
};
|
|
1321
|
+
//# sourceMappingURL=react-query.gen.js.map
|