@sixb/client 0.1.2 → 0.1.4
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/browser.js +2 -2
- package/dist/{chunk-ctf97s25.js → chunk-5y58b4tr.js} +2 -2
- package/dist/{chunk-zfne7wxr.js → chunk-9bwme2g7.js} +1 -1
- package/dist/{chunk-skkt217g.js → chunk-ehjnq01h.js} +21 -5
- package/dist/{chunk-skkt217g.js.map → chunk-ehjnq01h.js.map} +3 -3
- package/dist/{chunk-5vp5zr0d.js → chunk-g19v53kt.js} +1 -1
- package/dist/{chunk-v4jdc1nb.js → chunk-hwg7mwq7.js} +3 -3
- package/dist/{chunk-tsdnw994.js → chunk-ks27bq5b.js} +2 -2
- package/dist/connectors/queries.d.ts.map +1 -1
- package/dist/generated/@tanstack/react-query.gen.d.ts +2285 -99
- package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/sdk.gen.d.ts +15 -3
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/types.gen.d.ts +612 -53
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +114 -27
- package/dist/hooks.js.map +4 -4
- package/dist/index.js +14 -8
- package/dist/index.js.map +1 -1
- package/dist/logs.js +3 -3
- package/dist/models.js +10 -4
- package/dist/models.js.map +1 -1
- package/dist/query.js +3 -3
- package/package.json +2 -2
- package/src/generated/@tanstack/react-query.gen.ts +145 -14
- package/src/generated/index.ts +26 -6
- package/src/generated/sdk.gen.ts +58 -9
- package/src/generated/types.gen.ts +733 -50
- package/src/hooks.ts +37 -16
- /package/dist/{chunk-ctf97s25.js.map → chunk-5y58b4tr.js.map} +0 -0
- /package/dist/{chunk-zfne7wxr.js.map → chunk-9bwme2g7.js.map} +0 -0
- /package/dist/{chunk-5vp5zr0d.js.map → chunk-g19v53kt.js.map} +0 -0
- /package/dist/{chunk-v4jdc1nb.js.map → chunk-hwg7mwq7.js.map} +0 -0
- /package/dist/{chunk-tsdnw994.js.map → chunk-ks27bq5b.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
telemetryUpdateKey,
|
|
23
23
|
uploadFile,
|
|
24
24
|
waitForActionRun
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-hwg7mwq7.js";
|
|
26
26
|
import {
|
|
27
27
|
createLogSocket,
|
|
28
28
|
createSixbLogsWebSocketUrl,
|
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
isStoredLogLine1 as isStoredLogLine2,
|
|
31
31
|
logs,
|
|
32
32
|
parseLogStreamMessage
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import"./chunk-
|
|
33
|
+
} from "./chunk-5y58b4tr.js";
|
|
34
|
+
import"./chunk-g19v53kt.js";
|
|
35
35
|
import {
|
|
36
36
|
decodeObjectId,
|
|
37
37
|
encodeObjectId,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
createSixbClientConfig,
|
|
51
51
|
isSixbApiError,
|
|
52
52
|
normalizeSixbApiBaseUrl
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-9bwme2g7.js";
|
|
54
54
|
import {
|
|
55
55
|
abortFileUpload,
|
|
56
56
|
addConnectorConnection,
|
|
@@ -78,6 +78,7 @@ import {
|
|
|
78
78
|
getAgentMessageFileContent,
|
|
79
79
|
getAgentRun,
|
|
80
80
|
getAgentThread,
|
|
81
|
+
getAiAccountingOverview,
|
|
81
82
|
getAuthAccessManagementOptions,
|
|
82
83
|
getAuthInvitationOptions,
|
|
83
84
|
getAuthMembershipOptions,
|
|
@@ -117,6 +118,7 @@ import {
|
|
|
117
118
|
listAgentThreadRuns,
|
|
118
119
|
listAgentThreads,
|
|
119
120
|
listAgents,
|
|
121
|
+
listAiModelCalls,
|
|
120
122
|
listAuthAccessTokens,
|
|
121
123
|
listAuthInvitations,
|
|
122
124
|
listAuthMembers,
|
|
@@ -130,7 +132,7 @@ import {
|
|
|
130
132
|
listDatasets,
|
|
131
133
|
listEvents,
|
|
132
134
|
listLogs,
|
|
133
|
-
|
|
135
|
+
listModels,
|
|
134
136
|
listObjectTypes,
|
|
135
137
|
listObjects,
|
|
136
138
|
listPipelineRuns,
|
|
@@ -146,6 +148,7 @@ import {
|
|
|
146
148
|
listWorkflowRuns,
|
|
147
149
|
listWorkflows,
|
|
148
150
|
postAgentThreadMessage,
|
|
151
|
+
queryObjectLinks,
|
|
149
152
|
queryObjects,
|
|
150
153
|
reactivateAuthMember,
|
|
151
154
|
reauthorizeConnectorConnection,
|
|
@@ -173,7 +176,7 @@ import {
|
|
|
173
176
|
uploadFileRaw,
|
|
174
177
|
upsertObject,
|
|
175
178
|
upsertObjectLink
|
|
176
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-ehjnq01h.js";
|
|
177
180
|
export {
|
|
178
181
|
waitForActionRun,
|
|
179
182
|
upsertObjectLink,
|
|
@@ -211,6 +214,7 @@ export {
|
|
|
211
214
|
reauthorizeConnectorConnection,
|
|
212
215
|
reactivateAuthMember,
|
|
213
216
|
queryObjects,
|
|
217
|
+
queryObjectLinks,
|
|
214
218
|
postAgentThreadMessage,
|
|
215
219
|
parseLogStreamMessage,
|
|
216
220
|
parseEventStreamMessage,
|
|
@@ -233,7 +237,7 @@ export {
|
|
|
233
237
|
listPipelineRuns,
|
|
234
238
|
listObjects,
|
|
235
239
|
listObjectTypes,
|
|
236
|
-
|
|
240
|
+
listModels,
|
|
237
241
|
listLogs,
|
|
238
242
|
listEvents,
|
|
239
243
|
listDatasets,
|
|
@@ -247,6 +251,7 @@ export {
|
|
|
247
251
|
listAuthMembers,
|
|
248
252
|
listAuthInvitations,
|
|
249
253
|
listAuthAccessTokens,
|
|
254
|
+
listAiModelCalls,
|
|
250
255
|
listAgents,
|
|
251
256
|
listAgentThreads,
|
|
252
257
|
listAgentThreadRuns,
|
|
@@ -291,6 +296,7 @@ export {
|
|
|
291
296
|
getAuthMembershipOptions,
|
|
292
297
|
getAuthInvitationOptions,
|
|
293
298
|
getAuthAccessManagementOptions,
|
|
299
|
+
getAiAccountingOverview,
|
|
294
300
|
getAgentThread,
|
|
295
301
|
getAgentRun,
|
|
296
302
|
getAgentMessageFileContent,
|
|
@@ -340,4 +346,4 @@ export {
|
|
|
340
346
|
ActionRunFailedError
|
|
341
347
|
};
|
|
342
348
|
|
|
343
|
-
//# debugId=
|
|
349
|
+
//# debugId=34865457087D1F5264756E2164756E21
|
package/dist/index.js.map
CHANGED
package/dist/logs.js
CHANGED
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
isStoredLogLine1 as isStoredLogLine2,
|
|
7
7
|
logs,
|
|
8
8
|
parseLogStreamMessage
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import"./chunk-
|
|
9
|
+
} from "./chunk-5y58b4tr.js";
|
|
10
|
+
import"./chunk-g19v53kt.js";
|
|
11
11
|
import"./chunk-trpg18dp.js";
|
|
12
|
-
import"./chunk-
|
|
12
|
+
import"./chunk-ehjnq01h.js";
|
|
13
13
|
export {
|
|
14
14
|
parseLogStreamMessage,
|
|
15
15
|
logs,
|
package/dist/models.js
CHANGED
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
getAgentMessageFileContent,
|
|
36
36
|
getAgentRun,
|
|
37
37
|
getAgentThread,
|
|
38
|
+
getAiAccountingOverview,
|
|
38
39
|
getAuthAccessManagementOptions,
|
|
39
40
|
getAuthInvitationOptions,
|
|
40
41
|
getAuthMembershipOptions,
|
|
@@ -74,6 +75,7 @@ import {
|
|
|
74
75
|
listAgentThreadRuns,
|
|
75
76
|
listAgentThreads,
|
|
76
77
|
listAgents,
|
|
78
|
+
listAiModelCalls,
|
|
77
79
|
listAuthAccessTokens,
|
|
78
80
|
listAuthInvitations,
|
|
79
81
|
listAuthMembers,
|
|
@@ -87,7 +89,7 @@ import {
|
|
|
87
89
|
listDatasets,
|
|
88
90
|
listEvents,
|
|
89
91
|
listLogs,
|
|
90
|
-
|
|
92
|
+
listModels,
|
|
91
93
|
listObjectTypes,
|
|
92
94
|
listObjects,
|
|
93
95
|
listPipelineRuns,
|
|
@@ -103,6 +105,7 @@ import {
|
|
|
103
105
|
listWorkflowRuns,
|
|
104
106
|
listWorkflows,
|
|
105
107
|
postAgentThreadMessage,
|
|
108
|
+
queryObjectLinks,
|
|
106
109
|
queryObjects,
|
|
107
110
|
reactivateAuthMember,
|
|
108
111
|
reauthorizeConnectorConnection,
|
|
@@ -130,7 +133,7 @@ import {
|
|
|
130
133
|
uploadFileRaw,
|
|
131
134
|
upsertObject,
|
|
132
135
|
upsertObjectLink
|
|
133
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-ehjnq01h.js";
|
|
134
137
|
export {
|
|
135
138
|
upsertObjectLink,
|
|
136
139
|
upsertObject,
|
|
@@ -163,6 +166,7 @@ export {
|
|
|
163
166
|
reauthorizeConnectorConnection,
|
|
164
167
|
reactivateAuthMember,
|
|
165
168
|
queryObjects,
|
|
169
|
+
queryObjectLinks,
|
|
166
170
|
postAgentThreadMessage,
|
|
167
171
|
listWorkflows,
|
|
168
172
|
listWorkflowRuns,
|
|
@@ -178,7 +182,7 @@ export {
|
|
|
178
182
|
listPipelineRuns,
|
|
179
183
|
listObjects,
|
|
180
184
|
listObjectTypes,
|
|
181
|
-
|
|
185
|
+
listModels,
|
|
182
186
|
listLogs,
|
|
183
187
|
listEvents,
|
|
184
188
|
listDatasets,
|
|
@@ -192,6 +196,7 @@ export {
|
|
|
192
196
|
listAuthMembers,
|
|
193
197
|
listAuthInvitations,
|
|
194
198
|
listAuthAccessTokens,
|
|
199
|
+
listAiModelCalls,
|
|
195
200
|
listAgents,
|
|
196
201
|
listAgentThreads,
|
|
197
202
|
listAgentThreadRuns,
|
|
@@ -231,6 +236,7 @@ export {
|
|
|
231
236
|
getAuthMembershipOptions,
|
|
232
237
|
getAuthInvitationOptions,
|
|
233
238
|
getAuthAccessManagementOptions,
|
|
239
|
+
getAiAccountingOverview,
|
|
234
240
|
getAgentThread,
|
|
235
241
|
getAgentRun,
|
|
236
242
|
getAgentMessageFileContent,
|
|
@@ -261,4 +267,4 @@ export {
|
|
|
261
267
|
abortFileUpload
|
|
262
268
|
};
|
|
263
269
|
|
|
264
|
-
//# debugId=
|
|
270
|
+
//# debugId=89FBAAF7E1FEDFB564756E2164756E21
|
package/dist/models.js.map
CHANGED
package/dist/query.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
SixbQueryError,
|
|
4
4
|
createHttpQueryExecutor,
|
|
5
5
|
objects
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import"./chunk-
|
|
8
|
-
import"./chunk-
|
|
6
|
+
} from "./chunk-ks27bq5b.js";
|
|
7
|
+
import"./chunk-9bwme2g7.js";
|
|
8
|
+
import"./chunk-ehjnq01h.js";
|
|
9
9
|
export {
|
|
10
10
|
objects,
|
|
11
11
|
createHttpQueryExecutor,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sixb/client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Type-safe SDK for Sixb API with TanStack Query hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sixb",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"prepack": "bun run build"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@sixb/core": "^0.1.
|
|
70
|
+
"@sixb/core": "^0.1.4"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@tanstack/react-query": "^5.0.0",
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
getAgentMessageFileContent,
|
|
36
36
|
getAgentRun,
|
|
37
37
|
getAgentThread,
|
|
38
|
+
getAiAccountingOverview,
|
|
38
39
|
getAuthAccessManagementOptions,
|
|
39
40
|
getAuthInvitationOptions,
|
|
40
41
|
getAuthMembershipOptions,
|
|
@@ -69,6 +70,7 @@ import {
|
|
|
69
70
|
listAgentThreadMessages,
|
|
70
71
|
listAgentThreadRuns,
|
|
71
72
|
listAgentThreads,
|
|
73
|
+
listAiModelCalls,
|
|
72
74
|
listAuthAccessTokens,
|
|
73
75
|
listAuthInvitations,
|
|
74
76
|
listAuthMembers,
|
|
@@ -82,7 +84,7 @@ import {
|
|
|
82
84
|
listDatasetVersions,
|
|
83
85
|
listEvents,
|
|
84
86
|
listLogs,
|
|
85
|
-
|
|
87
|
+
listModels,
|
|
86
88
|
listObjects,
|
|
87
89
|
listObjectTypes,
|
|
88
90
|
listPipelineRuns,
|
|
@@ -99,6 +101,7 @@ import {
|
|
|
99
101
|
listWorkflows,
|
|
100
102
|
type Options,
|
|
101
103
|
postAgentThreadMessage,
|
|
104
|
+
queryObjectLinks,
|
|
102
105
|
queryObjects,
|
|
103
106
|
reactivateAuthMember,
|
|
104
107
|
reauthorizeConnectorConnection,
|
|
@@ -203,6 +206,9 @@ import type {
|
|
|
203
206
|
GetAgentThreadData,
|
|
204
207
|
GetAgentThreadError,
|
|
205
208
|
GetAgentThreadResponse,
|
|
209
|
+
GetAiAccountingOverviewData,
|
|
210
|
+
GetAiAccountingOverviewError,
|
|
211
|
+
GetAiAccountingOverviewResponse,
|
|
206
212
|
GetAuthAccessManagementOptionsData,
|
|
207
213
|
GetAuthAccessManagementOptionsError,
|
|
208
214
|
GetAuthAccessManagementOptionsResponse,
|
|
@@ -300,6 +306,9 @@ import type {
|
|
|
300
306
|
ListAgentThreadsData,
|
|
301
307
|
ListAgentThreadsError,
|
|
302
308
|
ListAgentThreadsResponse,
|
|
309
|
+
ListAiModelCallsData,
|
|
310
|
+
ListAiModelCallsError,
|
|
311
|
+
ListAiModelCallsResponse,
|
|
303
312
|
ListAuthAccessTokensData,
|
|
304
313
|
ListAuthAccessTokensError,
|
|
305
314
|
ListAuthAccessTokensResponse,
|
|
@@ -338,9 +347,8 @@ import type {
|
|
|
338
347
|
ListLogsData,
|
|
339
348
|
ListLogsError,
|
|
340
349
|
ListLogsResponse,
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
ListObjectLinksResponse,
|
|
350
|
+
ListModelsData,
|
|
351
|
+
ListModelsResponse,
|
|
344
352
|
ListObjectsData,
|
|
345
353
|
ListObjectsError,
|
|
346
354
|
ListObjectsResponse,
|
|
@@ -380,6 +388,9 @@ import type {
|
|
|
380
388
|
PostAgentThreadMessageData,
|
|
381
389
|
PostAgentThreadMessageError,
|
|
382
390
|
PostAgentThreadMessageResponse,
|
|
391
|
+
QueryObjectLinksData,
|
|
392
|
+
QueryObjectLinksError,
|
|
393
|
+
QueryObjectLinksResponse,
|
|
383
394
|
QueryObjectsData,
|
|
384
395
|
QueryObjectsError,
|
|
385
396
|
QueryObjectsResponse,
|
|
@@ -1246,6 +1257,99 @@ export const reactivateAuthMemberMutation = (
|
|
|
1246
1257
|
return mutationOptions
|
|
1247
1258
|
}
|
|
1248
1259
|
|
|
1260
|
+
export const getAiAccountingOverviewQueryKey = (options: Options<GetAiAccountingOverviewData>) =>
|
|
1261
|
+
createQueryKey("getAiAccountingOverview", options)
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* Get project AI usage and cost analytics
|
|
1265
|
+
*/
|
|
1266
|
+
export const getAiAccountingOverviewOptions = (options: Options<GetAiAccountingOverviewData>) =>
|
|
1267
|
+
queryOptions<
|
|
1268
|
+
GetAiAccountingOverviewResponse,
|
|
1269
|
+
GetAiAccountingOverviewError,
|
|
1270
|
+
GetAiAccountingOverviewResponse,
|
|
1271
|
+
ReturnType<typeof getAiAccountingOverviewQueryKey>
|
|
1272
|
+
>({
|
|
1273
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1274
|
+
const { data } = await getAiAccountingOverview({
|
|
1275
|
+
...options,
|
|
1276
|
+
...queryKey[0],
|
|
1277
|
+
signal,
|
|
1278
|
+
throwOnError: true,
|
|
1279
|
+
})
|
|
1280
|
+
return data
|
|
1281
|
+
},
|
|
1282
|
+
queryKey: getAiAccountingOverviewQueryKey(options),
|
|
1283
|
+
})
|
|
1284
|
+
|
|
1285
|
+
export const listAiModelCallsQueryKey = (options: Options<ListAiModelCallsData>) =>
|
|
1286
|
+
createQueryKey("listAiModelCalls", options)
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* List project AI model-call accounting records
|
|
1290
|
+
*/
|
|
1291
|
+
export const listAiModelCallsOptions = (options: Options<ListAiModelCallsData>) =>
|
|
1292
|
+
queryOptions<
|
|
1293
|
+
ListAiModelCallsResponse,
|
|
1294
|
+
ListAiModelCallsError,
|
|
1295
|
+
ListAiModelCallsResponse,
|
|
1296
|
+
ReturnType<typeof listAiModelCallsQueryKey>
|
|
1297
|
+
>({
|
|
1298
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1299
|
+
const { data } = await listAiModelCalls({
|
|
1300
|
+
...options,
|
|
1301
|
+
...queryKey[0],
|
|
1302
|
+
signal,
|
|
1303
|
+
throwOnError: true,
|
|
1304
|
+
})
|
|
1305
|
+
return data
|
|
1306
|
+
},
|
|
1307
|
+
queryKey: listAiModelCallsQueryKey(options),
|
|
1308
|
+
})
|
|
1309
|
+
|
|
1310
|
+
export const listAiModelCallsInfiniteQueryKey = (
|
|
1311
|
+
options: Options<ListAiModelCallsData>
|
|
1312
|
+
): QueryKey<Options<ListAiModelCallsData>> => createQueryKey("listAiModelCalls", options, true)
|
|
1313
|
+
|
|
1314
|
+
/**
|
|
1315
|
+
* List project AI model-call accounting records
|
|
1316
|
+
*/
|
|
1317
|
+
export const listAiModelCallsInfiniteOptions = (options: Options<ListAiModelCallsData>) =>
|
|
1318
|
+
infiniteQueryOptions<
|
|
1319
|
+
ListAiModelCallsResponse,
|
|
1320
|
+
ListAiModelCallsError,
|
|
1321
|
+
InfiniteData<ListAiModelCallsResponse>,
|
|
1322
|
+
QueryKey<Options<ListAiModelCallsData>>,
|
|
1323
|
+
string | Pick<QueryKey<Options<ListAiModelCallsData>>[0], "body" | "headers" | "path" | "query">
|
|
1324
|
+
>(
|
|
1325
|
+
// @ts-ignore
|
|
1326
|
+
{
|
|
1327
|
+
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
1328
|
+
// @ts-ignore
|
|
1329
|
+
const page: Pick<
|
|
1330
|
+
QueryKey<Options<ListAiModelCallsData>>[0],
|
|
1331
|
+
"body" | "headers" | "path" | "query"
|
|
1332
|
+
> =
|
|
1333
|
+
typeof pageParam === "object"
|
|
1334
|
+
? pageParam
|
|
1335
|
+
: {
|
|
1336
|
+
query: {
|
|
1337
|
+
offset: pageParam,
|
|
1338
|
+
},
|
|
1339
|
+
}
|
|
1340
|
+
const params = createInfiniteParams(queryKey, page)
|
|
1341
|
+
const { data } = await listAiModelCalls({
|
|
1342
|
+
...options,
|
|
1343
|
+
...params,
|
|
1344
|
+
signal,
|
|
1345
|
+
throwOnError: true,
|
|
1346
|
+
})
|
|
1347
|
+
return data
|
|
1348
|
+
},
|
|
1349
|
+
queryKey: listAiModelCallsInfiniteQueryKey(options),
|
|
1350
|
+
}
|
|
1351
|
+
)
|
|
1352
|
+
|
|
1249
1353
|
export const getProjectInfoQueryKey = (options?: Options<GetProjectInfoData>) =>
|
|
1250
1354
|
createQueryKey("getProjectInfo", options)
|
|
1251
1355
|
|
|
@@ -2746,6 +2850,33 @@ export const queryObjectsMutation = (
|
|
|
2746
2850
|
return mutationOptions
|
|
2747
2851
|
}
|
|
2748
2852
|
|
|
2853
|
+
/**
|
|
2854
|
+
* Query object links
|
|
2855
|
+
*/
|
|
2856
|
+
export const queryObjectLinksMutation = (
|
|
2857
|
+
options?: Partial<Options<QueryObjectLinksData>>
|
|
2858
|
+
): UseMutationOptions<
|
|
2859
|
+
QueryObjectLinksResponse,
|
|
2860
|
+
QueryObjectLinksError,
|
|
2861
|
+
Options<QueryObjectLinksData>
|
|
2862
|
+
> => {
|
|
2863
|
+
const mutationOptions: UseMutationOptions<
|
|
2864
|
+
QueryObjectLinksResponse,
|
|
2865
|
+
QueryObjectLinksError,
|
|
2866
|
+
Options<QueryObjectLinksData>
|
|
2867
|
+
> = {
|
|
2868
|
+
mutationFn: async (fnOptions) => {
|
|
2869
|
+
const { data } = await queryObjectLinks({
|
|
2870
|
+
...options,
|
|
2871
|
+
...fnOptions,
|
|
2872
|
+
throwOnError: true,
|
|
2873
|
+
})
|
|
2874
|
+
return data
|
|
2875
|
+
},
|
|
2876
|
+
}
|
|
2877
|
+
return mutationOptions
|
|
2878
|
+
}
|
|
2879
|
+
|
|
2749
2880
|
/**
|
|
2750
2881
|
* Count objects
|
|
2751
2882
|
*/
|
|
@@ -3675,21 +3806,21 @@ export const getAgentRunOptions = (options: Options<GetAgentRunData>) =>
|
|
|
3675
3806
|
queryKey: getAgentRunQueryKey(options),
|
|
3676
3807
|
})
|
|
3677
3808
|
|
|
3678
|
-
export const
|
|
3679
|
-
createQueryKey("
|
|
3809
|
+
export const listModelsQueryKey = (options?: Options<ListModelsData>) =>
|
|
3810
|
+
createQueryKey("listModels", options)
|
|
3680
3811
|
|
|
3681
3812
|
/**
|
|
3682
|
-
* List
|
|
3813
|
+
* List the project model catalog
|
|
3683
3814
|
*/
|
|
3684
|
-
export const
|
|
3815
|
+
export const listModelsOptions = (options?: Options<ListModelsData>) =>
|
|
3685
3816
|
queryOptions<
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
ReturnType<typeof
|
|
3817
|
+
ListModelsResponse,
|
|
3818
|
+
DefaultError,
|
|
3819
|
+
ListModelsResponse,
|
|
3820
|
+
ReturnType<typeof listModelsQueryKey>
|
|
3690
3821
|
>({
|
|
3691
3822
|
queryFn: async ({ queryKey, signal }) => {
|
|
3692
|
-
const { data } = await
|
|
3823
|
+
const { data } = await listModels({
|
|
3693
3824
|
...options,
|
|
3694
3825
|
...queryKey[0],
|
|
3695
3826
|
signal,
|
|
@@ -3697,7 +3828,7 @@ export const listObjectLinksOptions = (options: Options<ListObjectLinksData>) =>
|
|
|
3697
3828
|
})
|
|
3698
3829
|
return data
|
|
3699
3830
|
},
|
|
3700
|
-
queryKey:
|
|
3831
|
+
queryKey: listModelsQueryKey(options),
|
|
3701
3832
|
})
|
|
3702
3833
|
|
|
3703
3834
|
/**
|
package/src/generated/index.ts
CHANGED
|
@@ -26,6 +26,7 @@ export {
|
|
|
26
26
|
getAgentMessageFileContent,
|
|
27
27
|
getAgentRun,
|
|
28
28
|
getAgentThread,
|
|
29
|
+
getAiAccountingOverview,
|
|
29
30
|
getAuthAccessManagementOptions,
|
|
30
31
|
getAuthInvitationOptions,
|
|
31
32
|
getAuthMembershipOptions,
|
|
@@ -65,6 +66,7 @@ export {
|
|
|
65
66
|
listAgentThreadMessages,
|
|
66
67
|
listAgentThreadRuns,
|
|
67
68
|
listAgentThreads,
|
|
69
|
+
listAiModelCalls,
|
|
68
70
|
listAuthAccessTokens,
|
|
69
71
|
listAuthInvitations,
|
|
70
72
|
listAuthMembers,
|
|
@@ -78,7 +80,7 @@ export {
|
|
|
78
80
|
listDatasetVersions,
|
|
79
81
|
listEvents,
|
|
80
82
|
listLogs,
|
|
81
|
-
|
|
83
|
+
listModels,
|
|
82
84
|
listObjects,
|
|
83
85
|
listObjectTypes,
|
|
84
86
|
listPipelineRuns,
|
|
@@ -95,6 +97,7 @@ export {
|
|
|
95
97
|
listWorkflows,
|
|
96
98
|
type Options,
|
|
97
99
|
postAgentThreadMessage,
|
|
100
|
+
queryObjectLinks,
|
|
98
101
|
queryObjects,
|
|
99
102
|
reactivateAuthMember,
|
|
100
103
|
reauthorizeConnectorConnection,
|
|
@@ -251,6 +254,11 @@ export type {
|
|
|
251
254
|
GetAgentThreadErrors,
|
|
252
255
|
GetAgentThreadResponse,
|
|
253
256
|
GetAgentThreadResponses,
|
|
257
|
+
GetAiAccountingOverviewData,
|
|
258
|
+
GetAiAccountingOverviewError,
|
|
259
|
+
GetAiAccountingOverviewErrors,
|
|
260
|
+
GetAiAccountingOverviewResponse,
|
|
261
|
+
GetAiAccountingOverviewResponses,
|
|
254
262
|
GetAuthAccessManagementOptionsData,
|
|
255
263
|
GetAuthAccessManagementOptionsError,
|
|
256
264
|
GetAuthAccessManagementOptionsErrors,
|
|
@@ -431,6 +439,11 @@ export type {
|
|
|
431
439
|
ListAgentThreadsErrors,
|
|
432
440
|
ListAgentThreadsResponse,
|
|
433
441
|
ListAgentThreadsResponses,
|
|
442
|
+
ListAiModelCallsData,
|
|
443
|
+
ListAiModelCallsError,
|
|
444
|
+
ListAiModelCallsErrors,
|
|
445
|
+
ListAiModelCallsResponse,
|
|
446
|
+
ListAiModelCallsResponses,
|
|
434
447
|
ListAuthAccessTokensData,
|
|
435
448
|
ListAuthAccessTokensError,
|
|
436
449
|
ListAuthAccessTokensErrors,
|
|
@@ -494,11 +507,9 @@ export type {
|
|
|
494
507
|
ListLogsErrors,
|
|
495
508
|
ListLogsResponse,
|
|
496
509
|
ListLogsResponses,
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
ListObjectLinksResponse,
|
|
501
|
-
ListObjectLinksResponses,
|
|
510
|
+
ListModelsData,
|
|
511
|
+
ListModelsResponse,
|
|
512
|
+
ListModelsResponses,
|
|
502
513
|
ListObjectsData,
|
|
503
514
|
ListObjectsError,
|
|
504
515
|
ListObjectsErrors,
|
|
@@ -570,6 +581,9 @@ export type {
|
|
|
570
581
|
ObjectQueryFacetsRequest,
|
|
571
582
|
ObjectQueryFacetsResponse,
|
|
572
583
|
ObjectQueryIssue,
|
|
584
|
+
ObjectQueryLink,
|
|
585
|
+
ObjectQueryLinksRequest,
|
|
586
|
+
ObjectQueryLinksResponse,
|
|
573
587
|
ObjectQueryLinkValue,
|
|
574
588
|
ObjectQueryObject,
|
|
575
589
|
ObjectQueryPlanSummary,
|
|
@@ -577,11 +591,17 @@ export type {
|
|
|
577
591
|
ObjectQueryRequest,
|
|
578
592
|
ObjectQueryResponse,
|
|
579
593
|
ObjectQuerySortField,
|
|
594
|
+
ObjectRef,
|
|
580
595
|
PostAgentThreadMessageData,
|
|
581
596
|
PostAgentThreadMessageError,
|
|
582
597
|
PostAgentThreadMessageErrors,
|
|
583
598
|
PostAgentThreadMessageResponse,
|
|
584
599
|
PostAgentThreadMessageResponses,
|
|
600
|
+
QueryObjectLinksData,
|
|
601
|
+
QueryObjectLinksError,
|
|
602
|
+
QueryObjectLinksErrors,
|
|
603
|
+
QueryObjectLinksResponse,
|
|
604
|
+
QueryObjectLinksResponses,
|
|
585
605
|
QueryObjectsData,
|
|
586
606
|
QueryObjectsError,
|
|
587
607
|
QueryObjectsErrors,
|
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -83,6 +83,9 @@ import type {
|
|
|
83
83
|
GetAgentThreadData,
|
|
84
84
|
GetAgentThreadErrors,
|
|
85
85
|
GetAgentThreadResponses,
|
|
86
|
+
GetAiAccountingOverviewData,
|
|
87
|
+
GetAiAccountingOverviewErrors,
|
|
88
|
+
GetAiAccountingOverviewResponses,
|
|
86
89
|
GetAuthAccessManagementOptionsData,
|
|
87
90
|
GetAuthAccessManagementOptionsErrors,
|
|
88
91
|
GetAuthAccessManagementOptionsResponses,
|
|
@@ -195,6 +198,9 @@ import type {
|
|
|
195
198
|
ListAgentThreadsData,
|
|
196
199
|
ListAgentThreadsErrors,
|
|
197
200
|
ListAgentThreadsResponses,
|
|
201
|
+
ListAiModelCallsData,
|
|
202
|
+
ListAiModelCallsErrors,
|
|
203
|
+
ListAiModelCallsResponses,
|
|
198
204
|
ListAuthAccessTokensData,
|
|
199
205
|
ListAuthAccessTokensErrors,
|
|
200
206
|
ListAuthAccessTokensResponses,
|
|
@@ -233,9 +239,8 @@ import type {
|
|
|
233
239
|
ListLogsData,
|
|
234
240
|
ListLogsErrors,
|
|
235
241
|
ListLogsResponses,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
ListObjectLinksResponses,
|
|
242
|
+
ListModelsData,
|
|
243
|
+
ListModelsResponses,
|
|
239
244
|
ListObjectsData,
|
|
240
245
|
ListObjectsErrors,
|
|
241
246
|
ListObjectsResponses,
|
|
@@ -275,6 +280,9 @@ import type {
|
|
|
275
280
|
PostAgentThreadMessageData,
|
|
276
281
|
PostAgentThreadMessageErrors,
|
|
277
282
|
PostAgentThreadMessageResponses,
|
|
283
|
+
QueryObjectLinksData,
|
|
284
|
+
QueryObjectLinksErrors,
|
|
285
|
+
QueryObjectLinksResponses,
|
|
278
286
|
QueryObjectsData,
|
|
279
287
|
QueryObjectsErrors,
|
|
280
288
|
QueryObjectsResponses,
|
|
@@ -762,6 +770,29 @@ export const reactivateAuthMember = <ThrowOnError extends boolean = false>(
|
|
|
762
770
|
...options,
|
|
763
771
|
})
|
|
764
772
|
|
|
773
|
+
/**
|
|
774
|
+
* Get project AI usage and cost analytics
|
|
775
|
+
*/
|
|
776
|
+
export const getAiAccountingOverview = <ThrowOnError extends boolean = false>(
|
|
777
|
+
options: Options<GetAiAccountingOverviewData, ThrowOnError>
|
|
778
|
+
) =>
|
|
779
|
+
(options.client ?? client).get<
|
|
780
|
+
GetAiAccountingOverviewResponses,
|
|
781
|
+
GetAiAccountingOverviewErrors,
|
|
782
|
+
ThrowOnError
|
|
783
|
+
>({ url: "/api/ai/accounting/overview", ...options })
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* List project AI model-call accounting records
|
|
787
|
+
*/
|
|
788
|
+
export const listAiModelCalls = <ThrowOnError extends boolean = false>(
|
|
789
|
+
options: Options<ListAiModelCallsData, ThrowOnError>
|
|
790
|
+
) =>
|
|
791
|
+
(options.client ?? client).get<ListAiModelCallsResponses, ListAiModelCallsErrors, ThrowOnError>({
|
|
792
|
+
url: "/api/ai/model-calls",
|
|
793
|
+
...options,
|
|
794
|
+
})
|
|
795
|
+
|
|
765
796
|
/**
|
|
766
797
|
* Get current project metadata
|
|
767
798
|
*/
|
|
@@ -1445,6 +1476,25 @@ export const queryObjects = <ThrowOnError extends boolean = false>(
|
|
|
1445
1476
|
},
|
|
1446
1477
|
})
|
|
1447
1478
|
|
|
1479
|
+
/**
|
|
1480
|
+
* Query object links
|
|
1481
|
+
*/
|
|
1482
|
+
export const queryObjectLinks = <ThrowOnError extends boolean = false>(
|
|
1483
|
+
options: Options<QueryObjectLinksData, ThrowOnError>
|
|
1484
|
+
) =>
|
|
1485
|
+
(options.client ?? client).post<QueryObjectLinksResponses, QueryObjectLinksErrors, ThrowOnError>({
|
|
1486
|
+
security: [
|
|
1487
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
1488
|
+
{ scheme: "bearer", type: "http" },
|
|
1489
|
+
],
|
|
1490
|
+
url: "/api/objects/query/links",
|
|
1491
|
+
...options,
|
|
1492
|
+
headers: {
|
|
1493
|
+
"Content-Type": "application/json",
|
|
1494
|
+
...options.headers,
|
|
1495
|
+
},
|
|
1496
|
+
})
|
|
1497
|
+
|
|
1448
1498
|
/**
|
|
1449
1499
|
* Count objects
|
|
1450
1500
|
*/
|
|
@@ -1947,14 +1997,13 @@ export const getAgentRun = <ThrowOnError extends boolean = false>(
|
|
|
1947
1997
|
})
|
|
1948
1998
|
|
|
1949
1999
|
/**
|
|
1950
|
-
* List
|
|
2000
|
+
* List the project model catalog
|
|
1951
2001
|
*/
|
|
1952
|
-
export const
|
|
1953
|
-
options
|
|
2002
|
+
export const listModels = <ThrowOnError extends boolean = false>(
|
|
2003
|
+
options?: Options<ListModelsData, ThrowOnError>
|
|
1954
2004
|
) =>
|
|
1955
|
-
(options
|
|
1956
|
-
|
|
1957
|
-
url: "/api/objects/{objectTypeId}/{objectId}/links",
|
|
2005
|
+
(options?.client ?? client).get<ListModelsResponses, unknown, ThrowOnError>({
|
|
2006
|
+
url: "/api/models",
|
|
1958
2007
|
...options,
|
|
1959
2008
|
})
|
|
1960
2009
|
|