@sixb/client 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/agent-streams.d.ts +11 -2
  2. package/dist/agent-streams.d.ts.map +1 -1
  3. package/dist/artifact-live.js +1 -1
  4. package/dist/browser.js +1 -1
  5. package/dist/{chunk-ktqfenfd.js → chunk-3dxa8d3r.js} +46 -6
  6. package/dist/chunk-3dxa8d3r.js.map +10 -0
  7. package/dist/{chunk-zta9jf24.js → chunk-4t68c4gf.js} +10 -3
  8. package/dist/{chunk-zta9jf24.js.map → chunk-4t68c4gf.js.map} +3 -3
  9. package/dist/{chunk-tm588tr7.js → chunk-6caavk8p.js} +1 -1
  10. package/dist/{chunk-pn4b10k4.js → chunk-pzz6gtn5.js} +2 -2
  11. package/dist/{chunk-60fdvjxa.js → chunk-vydypkf1.js} +39 -2
  12. package/dist/chunk-vydypkf1.js.map +10 -0
  13. package/dist/connectors/connection.d.ts +12 -0
  14. package/dist/connectors/connection.d.ts.map +1 -1
  15. package/dist/connectors/index.d.ts +1 -1
  16. package/dist/connectors/index.d.ts.map +1 -1
  17. package/dist/connectors/queries.d.ts.map +1 -1
  18. package/dist/generated/@tanstack/react-query.gen.d.ts +940 -113
  19. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  20. package/dist/generated/index.d.ts +2 -2
  21. package/dist/generated/index.d.ts.map +1 -1
  22. package/dist/generated/sdk.gen.d.ts +27 -3
  23. package/dist/generated/sdk.gen.d.ts.map +1 -1
  24. package/dist/generated/types.gen.d.ts +884 -12
  25. package/dist/generated/types.gen.d.ts.map +1 -1
  26. package/dist/hooks.js +87 -5
  27. package/dist/hooks.js.map +4 -4
  28. package/dist/index.js +13 -5
  29. package/dist/index.js.map +1 -1
  30. package/dist/logs.js +3 -3
  31. package/dist/models.js +10 -2
  32. package/dist/models.js.map +1 -1
  33. package/dist/query.js +2 -2
  34. package/dist/users-hooks.d.ts.map +1 -1
  35. package/dist/ws-socket.d.ts +2 -0
  36. package/dist/ws-socket.d.ts.map +1 -1
  37. package/package.json +2 -2
  38. package/src/agent-streams.ts +22 -0
  39. package/src/connectors/connection.ts +59 -0
  40. package/src/connectors/index.ts +1 -0
  41. package/src/generated/@tanstack/react-query.gen.ts +131 -2
  42. package/src/generated/index.ts +20 -0
  43. package/src/generated/sdk.gen.ts +93 -2
  44. package/src/generated/types.gen.ts +1341 -15
  45. package/src/ws-socket.ts +62 -7
  46. package/dist/chunk-60fdvjxa.js.map +0 -10
  47. package/dist/chunk-ktqfenfd.js.map +0 -10
  48. /package/dist/{chunk-tm588tr7.js.map → chunk-6caavk8p.js.map} +0 -0
  49. /package/dist/{chunk-pn4b10k4.js.map → chunk-pzz6gtn5.js.map} +0 -0
@@ -31,6 +31,7 @@ export {
31
31
  deleteArtifactStateValue,
32
32
  disableAuthServiceAccount,
33
33
  disconnectConnectorConnection,
34
+ editAgentThreadMessage,
34
35
  exchangeDeviceAuthorization,
35
36
  exchangeSharedAccess,
36
37
  existsObjects,
@@ -145,6 +146,8 @@ export {
145
146
  listAuthServiceAccountAccessTokens,
146
147
  listAuthServiceAccounts,
147
148
  listAuthSessions,
149
+ listConnectorAccounts,
150
+ listConnectorConnectionSyncRuns,
148
151
  listConnectorConnections,
149
152
  listConnectors,
150
153
  listDatasetRows,
@@ -173,6 +176,7 @@ export {
173
176
  listWorkflowInterventions,
174
177
  listWorkflowRuns,
175
178
  listWorkflows,
179
+ markAgentThreadRead,
176
180
  moveAgentThreadToCloud,
177
181
  moveAgentThreadToComputer,
178
182
  type Options,
@@ -387,6 +391,11 @@ export type {
387
391
  DisconnectConnectorConnectionErrors,
388
392
  DisconnectConnectorConnectionResponse,
389
393
  DisconnectConnectorConnectionResponses,
394
+ EditAgentThreadMessageData,
395
+ EditAgentThreadMessageError,
396
+ EditAgentThreadMessageErrors,
397
+ EditAgentThreadMessageResponse,
398
+ EditAgentThreadMessageResponses,
390
399
  ErrorResponse,
391
400
  ExchangeDeviceAuthorizationData,
392
401
  ExchangeDeviceAuthorizationResponse,
@@ -940,6 +949,12 @@ export type {
940
949
  ListAuthSessionsErrors,
941
950
  ListAuthSessionsResponse,
942
951
  ListAuthSessionsResponses,
952
+ ListConnectorAccountsData,
953
+ ListConnectorAccountsResponse,
954
+ ListConnectorAccountsResponses,
955
+ ListConnectorConnectionSyncRunsData,
956
+ ListConnectorConnectionSyncRunsResponse,
957
+ ListConnectorConnectionSyncRunsResponses,
943
958
  ListConnectorConnectionsData,
944
959
  ListConnectorConnectionsError,
945
960
  ListConnectorConnectionsErrors,
@@ -1064,6 +1079,11 @@ export type {
1064
1079
  ListWorkflowsData,
1065
1080
  ListWorkflowsResponse,
1066
1081
  ListWorkflowsResponses,
1082
+ MarkAgentThreadReadData,
1083
+ MarkAgentThreadReadError,
1084
+ MarkAgentThreadReadErrors,
1085
+ MarkAgentThreadReadResponse,
1086
+ MarkAgentThreadReadResponses,
1067
1087
  MoveAgentThreadToCloudData,
1068
1088
  MoveAgentThreadToCloudError,
1069
1089
  MoveAgentThreadToCloudErrors,
@@ -98,6 +98,9 @@ import type {
98
98
  DisconnectConnectorConnectionData,
99
99
  DisconnectConnectorConnectionErrors,
100
100
  DisconnectConnectorConnectionResponses,
101
+ EditAgentThreadMessageData,
102
+ EditAgentThreadMessageErrors,
103
+ EditAgentThreadMessageResponses,
101
104
  ExchangeDeviceAuthorizationData,
102
105
  ExchangeDeviceAuthorizationResponses,
103
106
  ExchangeSharedAccessData,
@@ -435,6 +438,10 @@ import type {
435
438
  ListAuthSessionsData,
436
439
  ListAuthSessionsErrors,
437
440
  ListAuthSessionsResponses,
441
+ ListConnectorAccountsData,
442
+ ListConnectorAccountsResponses,
443
+ ListConnectorConnectionSyncRunsData,
444
+ ListConnectorConnectionSyncRunsResponses,
438
445
  ListConnectorConnectionsData,
439
446
  ListConnectorConnectionsErrors,
440
447
  ListConnectorConnectionsResponses,
@@ -511,6 +518,9 @@ import type {
511
518
  ListWorkflowRunsResponses,
512
519
  ListWorkflowsData,
513
520
  ListWorkflowsResponses,
521
+ MarkAgentThreadReadData,
522
+ MarkAgentThreadReadErrors,
523
+ MarkAgentThreadReadResponses,
514
524
  MoveAgentThreadToCloudData,
515
525
  MoveAgentThreadToCloudErrors,
516
526
  MoveAgentThreadToCloudResponses,
@@ -1898,6 +1908,37 @@ export const getSync = <ThrowOnError extends boolean = false>(
1898
1908
  ...options,
1899
1909
  })
1900
1910
 
1911
+ /**
1912
+ * List a connector's accounts and how they synced
1913
+ *
1914
+ * On an OAuth connector, each connected account you may see, with the latest run of each of its syncs you may run. Empty for a static connector.
1915
+ */
1916
+ export const listConnectorAccounts = <ThrowOnError extends boolean = false>(
1917
+ options: Options<ListConnectorAccountsData, ThrowOnError>
1918
+ ) =>
1919
+ (options.client ?? client).get<ListConnectorAccountsResponses, unknown, ThrowOnError>({
1920
+ security: [
1921
+ { scheme: "bearer", type: "http" },
1922
+ { scheme: "bearer", type: "http" },
1923
+ ],
1924
+ url: "/api/connectors/{connectorId}/accounts",
1925
+ ...options,
1926
+ })
1927
+
1928
+ /**
1929
+ * Latest sync runs of a connection
1930
+ *
1931
+ * The latest run of each sync of one connection: your own, or anyone's with can.manage on its connector. Empty for a connection you don't see.
1932
+ */
1933
+ export const listConnectorConnectionSyncRuns = <ThrowOnError extends boolean = false>(
1934
+ options: Options<ListConnectorConnectionSyncRunsData, ThrowOnError>
1935
+ ) =>
1936
+ (options.client ?? client).get<ListConnectorConnectionSyncRunsResponses, unknown, ThrowOnError>({
1937
+ security: [{ scheme: "bearer", type: "http" }],
1938
+ url: "/api/connectors/{connectorId}/connections/{connectionId}/sync-runs",
1939
+ ...options,
1940
+ })
1941
+
1901
1942
  /**
1902
1943
  * List sync run history
1903
1944
  */
@@ -3279,6 +3320,31 @@ export const updateAgentThreadInboxItem = <ThrowOnError extends boolean = false>
3279
3320
  },
3280
3321
  })
3281
3322
 
3323
+ /**
3324
+ * Edit an agent thread message and restart from that turn
3325
+ *
3326
+ * Replaces a user-authored message in place, removes any messages and compaction summaries from that turn onward, and starts a new turn from the edited message. While a turn runs, the edit stops it and waits in the thread's inbox: the turn's end rewinds the thread and starts the edited message.
3327
+ */
3328
+ export const editAgentThreadMessage = <ThrowOnError extends boolean = false>(
3329
+ options: Options<EditAgentThreadMessageData, ThrowOnError>
3330
+ ) =>
3331
+ (options.client ?? client).post<
3332
+ EditAgentThreadMessageResponses,
3333
+ EditAgentThreadMessageErrors,
3334
+ ThrowOnError
3335
+ >({
3336
+ security: [
3337
+ { name: "x-sixb-csrf", type: "apiKey" },
3338
+ { scheme: "bearer", type: "http" },
3339
+ ],
3340
+ url: "/api/agent-threads/{threadId}/messages/{messageId}/edit",
3341
+ ...options,
3342
+ headers: {
3343
+ "Content-Type": "application/json",
3344
+ ...options.headers,
3345
+ },
3346
+ })
3347
+
3282
3348
  /**
3283
3349
  * Cancel an agent thread's active run
3284
3350
  *
@@ -3386,6 +3452,31 @@ export const cancelAgentRunById = <ThrowOnError extends boolean = false>(
3386
3452
  ...options,
3387
3453
  })
3388
3454
 
3455
+ /**
3456
+ * Mark how far you have read an Agent thread
3457
+ *
3458
+ * Record that your reading of a conversation reached a message, or its newest when `throughMessageId` is omitted, which is what a Done button sends. It never moves backwards, so another device that read further keeps its place; a message a retry or an edit took away marks nothing. Session routes only: a runner has no reading.
3459
+ */
3460
+ export const markAgentThreadRead = <ThrowOnError extends boolean = false>(
3461
+ options: Options<MarkAgentThreadReadData, ThrowOnError>
3462
+ ) =>
3463
+ (options.client ?? client).put<
3464
+ MarkAgentThreadReadResponses,
3465
+ MarkAgentThreadReadErrors,
3466
+ ThrowOnError
3467
+ >({
3468
+ security: [
3469
+ { name: "x-sixb-csrf", type: "apiKey" },
3470
+ { scheme: "bearer", type: "http" },
3471
+ ],
3472
+ url: "/api/agent-threads/{threadId}/read",
3473
+ ...options,
3474
+ headers: {
3475
+ "Content-Type": "application/json",
3476
+ ...options.headers,
3477
+ },
3478
+ })
3479
+
3389
3480
  /**
3390
3481
  * List the sub-agents of an agent conversation
3391
3482
  *
@@ -3465,7 +3556,7 @@ export const listAgentComputers = <ThrowOnError extends boolean = false>(
3465
3556
  /**
3466
3557
  * Move a thread from your computer to the cloud
3467
3558
  *
3468
- * Its turns run in the cloud from now on, starting with the one waiting for the computer, if any. The files it worked on stay on the computer. Refused while a turn runs there or waits on approvals.
3559
+ * Its turns run in the cloud from now on, starting with the one waiting for the computer, if any, and its owner can move it to a computer or folder again later. The files it worked on stay on the computer. Refused while a turn runs there or waits on approvals.
3469
3560
  */
3470
3561
  export const moveAgentThreadToCloud = <ThrowOnError extends boolean = false>(
3471
3562
  options: Options<MoveAgentThreadToCloudData, ThrowOnError>
@@ -3486,7 +3577,7 @@ export const moveAgentThreadToCloud = <ThrowOnError extends boolean = false>(
3486
3577
  /**
3487
3578
  * Move a thread to one of your computers, in a folder there
3488
3579
  *
3489
- * A thread that runs on its owner's computer runs there alone, in one folder: only `sixb` open in that folder claims its turns. Its owner moves it to another folder or computer. Refused while a turn runs or waits on approvals.
3580
+ * Its turns run there alone from now on, in that folder: only `sixb` open in it claims them. Its owner moves it from the cloud or from another folder or computer, as often as they need; files from where it ran before stay there. Refused while a turn runs or waits on approvals.
3490
3581
  */
3491
3582
  export const moveAgentThreadToComputer = <ThrowOnError extends boolean = false>(
3492
3583
  options: Options<MoveAgentThreadToComputerData, ThrowOnError>