@sixb/client 0.1.2 → 0.1.3
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-5vp5zr0d.js → chunk-6esh0dxx.js} +1 -1
- package/dist/{chunk-tsdnw994.js → chunk-7ts981a8.js} +2 -2
- package/dist/{chunk-skkt217g.js → chunk-eyd61e4t.js} +7 -2
- package/dist/chunk-eyd61e4t.js.map +19 -0
- package/dist/{chunk-ctf97s25.js → chunk-heqezbjc.js} +2 -2
- package/dist/{chunk-v4jdc1nb.js → chunk-hfk246y4.js} +3 -3
- package/dist/{chunk-zfne7wxr.js → chunk-yjank04c.js} +1 -1
- package/dist/connectors/queries.d.ts.map +1 -1
- package/dist/generated/@tanstack/react-query.gen.d.ts +2123 -26
- 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 +9 -1
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/types.gen.d.ts +498 -7
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/hooks.js +59 -6
- package/dist/hooks.js.map +3 -3
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/logs.js +3 -3
- package/dist/models.js +6 -2
- 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 +101 -0
- package/src/generated/index.ts +12 -0
- package/src/generated/sdk.gen.ts +29 -0
- package/src/generated/types.gen.ts +609 -2
- package/dist/chunk-skkt217g.js.map +0 -19
- /package/dist/{chunk-5vp5zr0d.js.map → chunk-6esh0dxx.js.map} +0 -0
- /package/dist/{chunk-tsdnw994.js.map → chunk-7ts981a8.js.map} +0 -0
- /package/dist/{chunk-ctf97s25.js.map → chunk-heqezbjc.js.map} +0 -0
- /package/dist/{chunk-v4jdc1nb.js.map → chunk-hfk246y4.js.map} +0 -0
- /package/dist/{chunk-zfne7wxr.js.map → chunk-yjank04c.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-hfk246y4.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-heqezbjc.js";
|
|
34
|
+
import"./chunk-6esh0dxx.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-yjank04c.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,
|
|
@@ -173,7 +175,7 @@ import {
|
|
|
173
175
|
uploadFileRaw,
|
|
174
176
|
upsertObject,
|
|
175
177
|
upsertObjectLink
|
|
176
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-eyd61e4t.js";
|
|
177
179
|
export {
|
|
178
180
|
waitForActionRun,
|
|
179
181
|
upsertObjectLink,
|
|
@@ -247,6 +249,7 @@ export {
|
|
|
247
249
|
listAuthMembers,
|
|
248
250
|
listAuthInvitations,
|
|
249
251
|
listAuthAccessTokens,
|
|
252
|
+
listAiModelCalls,
|
|
250
253
|
listAgents,
|
|
251
254
|
listAgentThreads,
|
|
252
255
|
listAgentThreadRuns,
|
|
@@ -291,6 +294,7 @@ export {
|
|
|
291
294
|
getAuthMembershipOptions,
|
|
292
295
|
getAuthInvitationOptions,
|
|
293
296
|
getAuthAccessManagementOptions,
|
|
297
|
+
getAiAccountingOverview,
|
|
294
298
|
getAgentThread,
|
|
295
299
|
getAgentRun,
|
|
296
300
|
getAgentMessageFileContent,
|
|
@@ -340,4 +344,4 @@ export {
|
|
|
340
344
|
ActionRunFailedError
|
|
341
345
|
};
|
|
342
346
|
|
|
343
|
-
//# debugId=
|
|
347
|
+
//# debugId=4134380B9DF18A0364756E2164756E21
|
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-heqezbjc.js";
|
|
10
|
+
import"./chunk-6esh0dxx.js";
|
|
11
11
|
import"./chunk-trpg18dp.js";
|
|
12
|
-
import"./chunk-
|
|
12
|
+
import"./chunk-eyd61e4t.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,
|
|
@@ -130,7 +132,7 @@ import {
|
|
|
130
132
|
uploadFileRaw,
|
|
131
133
|
upsertObject,
|
|
132
134
|
upsertObjectLink
|
|
133
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-eyd61e4t.js";
|
|
134
136
|
export {
|
|
135
137
|
upsertObjectLink,
|
|
136
138
|
upsertObject,
|
|
@@ -192,6 +194,7 @@ export {
|
|
|
192
194
|
listAuthMembers,
|
|
193
195
|
listAuthInvitations,
|
|
194
196
|
listAuthAccessTokens,
|
|
197
|
+
listAiModelCalls,
|
|
195
198
|
listAgents,
|
|
196
199
|
listAgentThreads,
|
|
197
200
|
listAgentThreadRuns,
|
|
@@ -231,6 +234,7 @@ export {
|
|
|
231
234
|
getAuthMembershipOptions,
|
|
232
235
|
getAuthInvitationOptions,
|
|
233
236
|
getAuthAccessManagementOptions,
|
|
237
|
+
getAiAccountingOverview,
|
|
234
238
|
getAgentThread,
|
|
235
239
|
getAgentRun,
|
|
236
240
|
getAgentMessageFileContent,
|
|
@@ -261,4 +265,4 @@ export {
|
|
|
261
265
|
abortFileUpload
|
|
262
266
|
};
|
|
263
267
|
|
|
264
|
-
//# debugId=
|
|
268
|
+
//# debugId=A1A0C7BE7AF4DA9C64756E2164756E21
|
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-7ts981a8.js";
|
|
7
|
+
import"./chunk-yjank04c.js";
|
|
8
|
+
import"./chunk-eyd61e4t.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.3",
|
|
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.3"
|
|
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,
|
|
@@ -203,6 +205,9 @@ import type {
|
|
|
203
205
|
GetAgentThreadData,
|
|
204
206
|
GetAgentThreadError,
|
|
205
207
|
GetAgentThreadResponse,
|
|
208
|
+
GetAiAccountingOverviewData,
|
|
209
|
+
GetAiAccountingOverviewError,
|
|
210
|
+
GetAiAccountingOverviewResponse,
|
|
206
211
|
GetAuthAccessManagementOptionsData,
|
|
207
212
|
GetAuthAccessManagementOptionsError,
|
|
208
213
|
GetAuthAccessManagementOptionsResponse,
|
|
@@ -300,6 +305,9 @@ import type {
|
|
|
300
305
|
ListAgentThreadsData,
|
|
301
306
|
ListAgentThreadsError,
|
|
302
307
|
ListAgentThreadsResponse,
|
|
308
|
+
ListAiModelCallsData,
|
|
309
|
+
ListAiModelCallsError,
|
|
310
|
+
ListAiModelCallsResponse,
|
|
303
311
|
ListAuthAccessTokensData,
|
|
304
312
|
ListAuthAccessTokensError,
|
|
305
313
|
ListAuthAccessTokensResponse,
|
|
@@ -1246,6 +1254,99 @@ export const reactivateAuthMemberMutation = (
|
|
|
1246
1254
|
return mutationOptions
|
|
1247
1255
|
}
|
|
1248
1256
|
|
|
1257
|
+
export const getAiAccountingOverviewQueryKey = (options: Options<GetAiAccountingOverviewData>) =>
|
|
1258
|
+
createQueryKey("getAiAccountingOverview", options)
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* Get project AI usage and cost analytics
|
|
1262
|
+
*/
|
|
1263
|
+
export const getAiAccountingOverviewOptions = (options: Options<GetAiAccountingOverviewData>) =>
|
|
1264
|
+
queryOptions<
|
|
1265
|
+
GetAiAccountingOverviewResponse,
|
|
1266
|
+
GetAiAccountingOverviewError,
|
|
1267
|
+
GetAiAccountingOverviewResponse,
|
|
1268
|
+
ReturnType<typeof getAiAccountingOverviewQueryKey>
|
|
1269
|
+
>({
|
|
1270
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1271
|
+
const { data } = await getAiAccountingOverview({
|
|
1272
|
+
...options,
|
|
1273
|
+
...queryKey[0],
|
|
1274
|
+
signal,
|
|
1275
|
+
throwOnError: true,
|
|
1276
|
+
})
|
|
1277
|
+
return data
|
|
1278
|
+
},
|
|
1279
|
+
queryKey: getAiAccountingOverviewQueryKey(options),
|
|
1280
|
+
})
|
|
1281
|
+
|
|
1282
|
+
export const listAiModelCallsQueryKey = (options: Options<ListAiModelCallsData>) =>
|
|
1283
|
+
createQueryKey("listAiModelCalls", options)
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* List project AI model-call accounting records
|
|
1287
|
+
*/
|
|
1288
|
+
export const listAiModelCallsOptions = (options: Options<ListAiModelCallsData>) =>
|
|
1289
|
+
queryOptions<
|
|
1290
|
+
ListAiModelCallsResponse,
|
|
1291
|
+
ListAiModelCallsError,
|
|
1292
|
+
ListAiModelCallsResponse,
|
|
1293
|
+
ReturnType<typeof listAiModelCallsQueryKey>
|
|
1294
|
+
>({
|
|
1295
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
1296
|
+
const { data } = await listAiModelCalls({
|
|
1297
|
+
...options,
|
|
1298
|
+
...queryKey[0],
|
|
1299
|
+
signal,
|
|
1300
|
+
throwOnError: true,
|
|
1301
|
+
})
|
|
1302
|
+
return data
|
|
1303
|
+
},
|
|
1304
|
+
queryKey: listAiModelCallsQueryKey(options),
|
|
1305
|
+
})
|
|
1306
|
+
|
|
1307
|
+
export const listAiModelCallsInfiniteQueryKey = (
|
|
1308
|
+
options: Options<ListAiModelCallsData>
|
|
1309
|
+
): QueryKey<Options<ListAiModelCallsData>> => createQueryKey("listAiModelCalls", options, true)
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* List project AI model-call accounting records
|
|
1313
|
+
*/
|
|
1314
|
+
export const listAiModelCallsInfiniteOptions = (options: Options<ListAiModelCallsData>) =>
|
|
1315
|
+
infiniteQueryOptions<
|
|
1316
|
+
ListAiModelCallsResponse,
|
|
1317
|
+
ListAiModelCallsError,
|
|
1318
|
+
InfiniteData<ListAiModelCallsResponse>,
|
|
1319
|
+
QueryKey<Options<ListAiModelCallsData>>,
|
|
1320
|
+
string | Pick<QueryKey<Options<ListAiModelCallsData>>[0], "body" | "headers" | "path" | "query">
|
|
1321
|
+
>(
|
|
1322
|
+
// @ts-ignore
|
|
1323
|
+
{
|
|
1324
|
+
queryFn: async ({ pageParam, queryKey, signal }) => {
|
|
1325
|
+
// @ts-ignore
|
|
1326
|
+
const page: Pick<
|
|
1327
|
+
QueryKey<Options<ListAiModelCallsData>>[0],
|
|
1328
|
+
"body" | "headers" | "path" | "query"
|
|
1329
|
+
> =
|
|
1330
|
+
typeof pageParam === "object"
|
|
1331
|
+
? pageParam
|
|
1332
|
+
: {
|
|
1333
|
+
query: {
|
|
1334
|
+
offset: pageParam,
|
|
1335
|
+
},
|
|
1336
|
+
}
|
|
1337
|
+
const params = createInfiniteParams(queryKey, page)
|
|
1338
|
+
const { data } = await listAiModelCalls({
|
|
1339
|
+
...options,
|
|
1340
|
+
...params,
|
|
1341
|
+
signal,
|
|
1342
|
+
throwOnError: true,
|
|
1343
|
+
})
|
|
1344
|
+
return data
|
|
1345
|
+
},
|
|
1346
|
+
queryKey: listAiModelCallsInfiniteQueryKey(options),
|
|
1347
|
+
}
|
|
1348
|
+
)
|
|
1349
|
+
|
|
1249
1350
|
export const getProjectInfoQueryKey = (options?: Options<GetProjectInfoData>) =>
|
|
1250
1351
|
createQueryKey("getProjectInfo", options)
|
|
1251
1352
|
|
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,
|
|
@@ -251,6 +253,11 @@ export type {
|
|
|
251
253
|
GetAgentThreadErrors,
|
|
252
254
|
GetAgentThreadResponse,
|
|
253
255
|
GetAgentThreadResponses,
|
|
256
|
+
GetAiAccountingOverviewData,
|
|
257
|
+
GetAiAccountingOverviewError,
|
|
258
|
+
GetAiAccountingOverviewErrors,
|
|
259
|
+
GetAiAccountingOverviewResponse,
|
|
260
|
+
GetAiAccountingOverviewResponses,
|
|
254
261
|
GetAuthAccessManagementOptionsData,
|
|
255
262
|
GetAuthAccessManagementOptionsError,
|
|
256
263
|
GetAuthAccessManagementOptionsErrors,
|
|
@@ -431,6 +438,11 @@ export type {
|
|
|
431
438
|
ListAgentThreadsErrors,
|
|
432
439
|
ListAgentThreadsResponse,
|
|
433
440
|
ListAgentThreadsResponses,
|
|
441
|
+
ListAiModelCallsData,
|
|
442
|
+
ListAiModelCallsError,
|
|
443
|
+
ListAiModelCallsErrors,
|
|
444
|
+
ListAiModelCallsResponse,
|
|
445
|
+
ListAiModelCallsResponses,
|
|
434
446
|
ListAuthAccessTokensData,
|
|
435
447
|
ListAuthAccessTokensError,
|
|
436
448
|
ListAuthAccessTokensErrors,
|
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,
|
|
@@ -762,6 +768,29 @@ export const reactivateAuthMember = <ThrowOnError extends boolean = false>(
|
|
|
762
768
|
...options,
|
|
763
769
|
})
|
|
764
770
|
|
|
771
|
+
/**
|
|
772
|
+
* Get project AI usage and cost analytics
|
|
773
|
+
*/
|
|
774
|
+
export const getAiAccountingOverview = <ThrowOnError extends boolean = false>(
|
|
775
|
+
options: Options<GetAiAccountingOverviewData, ThrowOnError>
|
|
776
|
+
) =>
|
|
777
|
+
(options.client ?? client).get<
|
|
778
|
+
GetAiAccountingOverviewResponses,
|
|
779
|
+
GetAiAccountingOverviewErrors,
|
|
780
|
+
ThrowOnError
|
|
781
|
+
>({ url: "/api/ai/accounting/overview", ...options })
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* List project AI model-call accounting records
|
|
785
|
+
*/
|
|
786
|
+
export const listAiModelCalls = <ThrowOnError extends boolean = false>(
|
|
787
|
+
options: Options<ListAiModelCallsData, ThrowOnError>
|
|
788
|
+
) =>
|
|
789
|
+
(options.client ?? client).get<ListAiModelCallsResponses, ListAiModelCallsErrors, ThrowOnError>({
|
|
790
|
+
url: "/api/ai/model-calls",
|
|
791
|
+
...options,
|
|
792
|
+
})
|
|
793
|
+
|
|
765
794
|
/**
|
|
766
795
|
* Get current project metadata
|
|
767
796
|
*/
|