@sixb/client 0.2.3 → 0.2.5
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/agent-streams.d.ts +1 -1
- package/dist/agent-streams.d.ts.map +1 -1
- package/dist/browser.js +1 -1
- package/dist/{chunk-zerhr00d.js → chunk-60fdvjxa.js} +61 -2
- package/dist/chunk-60fdvjxa.js.map +10 -0
- package/dist/{chunk-seeyb9k9.js → chunk-pn4b10k4.js} +1 -1
- package/dist/{chunk-bgpzb1fn.js → chunk-tm588tr7.js} +1 -1
- package/dist/{chunk-90q7wa43.js → chunk-zta9jf24.js} +1 -1
- package/dist/{chunk-90q7wa43.js.map → chunk-zta9jf24.js.map} +2 -2
- package/dist/connectors/queries.d.ts.map +1 -1
- package/dist/generated/@tanstack/react-query.gen.d.ts +1620 -392
- 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 +32 -4
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/types.gen.d.ts +1589 -220
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/hooks.js +97 -5
- package/dist/hooks.js.map +3 -3
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/logs.js +2 -2
- package/dist/models.js +15 -3
- package/dist/models.js.map +1 -1
- package/dist/query.js +2 -2
- package/dist/users-hooks.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/agent-streams.ts +1 -0
- package/src/generated/@tanstack/react-query.gen.ts +188 -3
- package/src/generated/index.ts +35 -0
- package/src/generated/sdk.gen.ts +142 -3
- package/src/generated/types.gen.ts +2167 -272
- package/dist/chunk-zerhr00d.js.map +0 -10
- /package/dist/{chunk-seeyb9k9.js.map → chunk-pn4b10k4.js.map} +0 -0
- /package/dist/{chunk-bgpzb1fn.js.map → chunk-tm588tr7.js.map} +0 -0
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -192,6 +192,9 @@ import type {
|
|
|
192
192
|
GetArtifactFileContentData,
|
|
193
193
|
GetArtifactFileContentErrors,
|
|
194
194
|
GetArtifactFileContentResponses,
|
|
195
|
+
GetArtifactPdfData,
|
|
196
|
+
GetArtifactPdfErrors,
|
|
197
|
+
GetArtifactPdfResponses,
|
|
195
198
|
GetArtifactQueryData,
|
|
196
199
|
GetArtifactQueryErrors,
|
|
197
200
|
GetArtifactQueryResponses,
|
|
@@ -381,6 +384,9 @@ import type {
|
|
|
381
384
|
ListAgentThreadChildrenData,
|
|
382
385
|
ListAgentThreadChildrenErrors,
|
|
383
386
|
ListAgentThreadChildrenResponses,
|
|
387
|
+
ListAgentThreadInboxData,
|
|
388
|
+
ListAgentThreadInboxErrors,
|
|
389
|
+
ListAgentThreadInboxResponses,
|
|
384
390
|
ListAgentThreadMessagesData,
|
|
385
391
|
ListAgentThreadMessagesErrors,
|
|
386
392
|
ListAgentThreadMessagesResponses,
|
|
@@ -514,6 +520,9 @@ import type {
|
|
|
514
520
|
PostAgentThreadMessageData,
|
|
515
521
|
PostAgentThreadMessageErrors,
|
|
516
522
|
PostAgentThreadMessageResponses,
|
|
523
|
+
PrintArtifactPdfData,
|
|
524
|
+
PrintArtifactPdfErrors,
|
|
525
|
+
PrintArtifactPdfResponses,
|
|
517
526
|
QueryObjectLinksData,
|
|
518
527
|
QueryObjectLinksErrors,
|
|
519
528
|
QueryObjectLinksResponses,
|
|
@@ -553,6 +562,9 @@ import type {
|
|
|
553
562
|
ResolveArtifactCommentData,
|
|
554
563
|
ResolveArtifactCommentErrors,
|
|
555
564
|
ResolveArtifactCommentResponses,
|
|
565
|
+
RestoreAgentThreadSandboxData,
|
|
566
|
+
RestoreAgentThreadSandboxErrors,
|
|
567
|
+
RestoreAgentThreadSandboxResponses,
|
|
556
568
|
RestoreArtifactData,
|
|
557
569
|
RestoreArtifactErrors,
|
|
558
570
|
RestoreArtifactResponses,
|
|
@@ -625,6 +637,9 @@ import type {
|
|
|
625
637
|
UpdateAgentPreferencesData,
|
|
626
638
|
UpdateAgentPreferencesErrors,
|
|
627
639
|
UpdateAgentPreferencesResponses,
|
|
640
|
+
UpdateAgentThreadInboxItemData,
|
|
641
|
+
UpdateAgentThreadInboxItemErrors,
|
|
642
|
+
UpdateAgentThreadInboxItemResponses,
|
|
628
643
|
UpdateAiLimitPolicyData,
|
|
629
644
|
UpdateAiLimitPolicyErrors,
|
|
630
645
|
UpdateAiLimitPolicyResponses,
|
|
@@ -643,6 +658,9 @@ import type {
|
|
|
643
658
|
UploadFileRawData,
|
|
644
659
|
UploadFileRawErrors,
|
|
645
660
|
UploadFileRawResponses,
|
|
661
|
+
WithdrawAgentThreadInboxItemData,
|
|
662
|
+
WithdrawAgentThreadInboxItemErrors,
|
|
663
|
+
WithdrawAgentThreadInboxItemResponses,
|
|
646
664
|
} from "./types.gen"
|
|
647
665
|
|
|
648
666
|
export type Options<
|
|
@@ -3097,6 +3115,29 @@ export const recreateAgentThreadSandbox = <ThrowOnError extends boolean = false>
|
|
|
3097
3115
|
},
|
|
3098
3116
|
})
|
|
3099
3117
|
|
|
3118
|
+
/**
|
|
3119
|
+
* Explicitly go on in the workspace a failed save left, with its files as they were
|
|
3120
|
+
*/
|
|
3121
|
+
export const restoreAgentThreadSandbox = <ThrowOnError extends boolean = false>(
|
|
3122
|
+
options: Options<RestoreAgentThreadSandboxData, ThrowOnError>
|
|
3123
|
+
) =>
|
|
3124
|
+
(options.client ?? client).post<
|
|
3125
|
+
RestoreAgentThreadSandboxResponses,
|
|
3126
|
+
RestoreAgentThreadSandboxErrors,
|
|
3127
|
+
ThrowOnError
|
|
3128
|
+
>({
|
|
3129
|
+
security: [
|
|
3130
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
3131
|
+
{ scheme: "bearer", type: "http" },
|
|
3132
|
+
],
|
|
3133
|
+
url: "/api/agent-threads/{threadId}/sandbox/restore",
|
|
3134
|
+
...options,
|
|
3135
|
+
headers: {
|
|
3136
|
+
"Content-Type": "application/json",
|
|
3137
|
+
...options.headers,
|
|
3138
|
+
},
|
|
3139
|
+
})
|
|
3140
|
+
|
|
3100
3141
|
/**
|
|
3101
3142
|
* List agent thread messages
|
|
3102
3143
|
*/
|
|
@@ -3177,6 +3218,67 @@ export const headAgentMessageFileContent = <ThrowOnError extends boolean = false
|
|
|
3177
3218
|
...options,
|
|
3178
3219
|
})
|
|
3179
3220
|
|
|
3221
|
+
/**
|
|
3222
|
+
* List agent thread inbox messages
|
|
3223
|
+
*/
|
|
3224
|
+
export const listAgentThreadInbox = <ThrowOnError extends boolean = false>(
|
|
3225
|
+
options: Options<ListAgentThreadInboxData, ThrowOnError>
|
|
3226
|
+
) =>
|
|
3227
|
+
(options.client ?? client).get<
|
|
3228
|
+
ListAgentThreadInboxResponses,
|
|
3229
|
+
ListAgentThreadInboxErrors,
|
|
3230
|
+
ThrowOnError
|
|
3231
|
+
>({
|
|
3232
|
+
security: [
|
|
3233
|
+
{ scheme: "bearer", type: "http" },
|
|
3234
|
+
{ scheme: "bearer", type: "http" },
|
|
3235
|
+
],
|
|
3236
|
+
url: "/api/agent-threads/{threadId}/inbox",
|
|
3237
|
+
...options,
|
|
3238
|
+
})
|
|
3239
|
+
|
|
3240
|
+
/**
|
|
3241
|
+
* Withdraw a waiting agent thread message
|
|
3242
|
+
*/
|
|
3243
|
+
export const withdrawAgentThreadInboxItem = <ThrowOnError extends boolean = false>(
|
|
3244
|
+
options: Options<WithdrawAgentThreadInboxItemData, ThrowOnError>
|
|
3245
|
+
) =>
|
|
3246
|
+
(options.client ?? client).delete<
|
|
3247
|
+
WithdrawAgentThreadInboxItemResponses,
|
|
3248
|
+
WithdrawAgentThreadInboxItemErrors,
|
|
3249
|
+
ThrowOnError
|
|
3250
|
+
>({
|
|
3251
|
+
security: [
|
|
3252
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
3253
|
+
{ scheme: "bearer", type: "http" },
|
|
3254
|
+
],
|
|
3255
|
+
url: "/api/agent-threads/{threadId}/inbox/{itemId}",
|
|
3256
|
+
...options,
|
|
3257
|
+
})
|
|
3258
|
+
|
|
3259
|
+
/**
|
|
3260
|
+
* Update a waiting agent thread message
|
|
3261
|
+
*/
|
|
3262
|
+
export const updateAgentThreadInboxItem = <ThrowOnError extends boolean = false>(
|
|
3263
|
+
options: Options<UpdateAgentThreadInboxItemData, ThrowOnError>
|
|
3264
|
+
) =>
|
|
3265
|
+
(options.client ?? client).patch<
|
|
3266
|
+
UpdateAgentThreadInboxItemResponses,
|
|
3267
|
+
UpdateAgentThreadInboxItemErrors,
|
|
3268
|
+
ThrowOnError
|
|
3269
|
+
>({
|
|
3270
|
+
security: [
|
|
3271
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
3272
|
+
{ scheme: "bearer", type: "http" },
|
|
3273
|
+
],
|
|
3274
|
+
url: "/api/agent-threads/{threadId}/inbox/{itemId}",
|
|
3275
|
+
...options,
|
|
3276
|
+
headers: {
|
|
3277
|
+
"Content-Type": "application/json",
|
|
3278
|
+
...options.headers,
|
|
3279
|
+
},
|
|
3280
|
+
})
|
|
3281
|
+
|
|
3180
3282
|
/**
|
|
3181
3283
|
* Cancel an agent thread's active run
|
|
3182
3284
|
*
|
|
@@ -4021,7 +4123,7 @@ export const freezeArtifactVersion = <ThrowOnError extends boolean = false>(
|
|
|
4021
4123
|
/**
|
|
4022
4124
|
* List an artifact's comments
|
|
4023
4125
|
*
|
|
4024
|
-
* Every comment and reply, oldest first, resolved ones included. Whoever reads the artifact reads them.
|
|
4126
|
+
* Every comment and reply, oldest first, resolved ones included. Whoever reads the artifact reads them; a shared link's guest reads only the threads started by a guest of the same link, with every reply in them.
|
|
4025
4127
|
*/
|
|
4026
4128
|
export const listArtifactComments = <ThrowOnError extends boolean = false>(
|
|
4027
4129
|
options: Options<ListArtifactCommentsData, ThrowOnError>
|
|
@@ -4043,7 +4145,7 @@ export const listArtifactComments = <ThrowOnError extends boolean = false>(
|
|
|
4043
4145
|
/**
|
|
4044
4146
|
* Comment on an artifact
|
|
4045
4147
|
*
|
|
4046
|
-
* Adds a comment, or a reply with parentId, as the caller. Whoever reads the artifact may, a shared link's guest included, under the name they gave its session (400 name_required until they give one). A canvas's comment can be about one of its boards, or an element of a board by its address. Readers receive artifact.commented.
|
|
4148
|
+
* Adds a comment, or a reply with parentId, as the caller. Whoever reads the artifact may, a shared link's guest included, under the name they gave its session (400 name_required until they give one), and replies only in a thread they read (404 comment_not_found otherwise). A canvas's comment can be about one of its boards, or an element of a board by its address. Readers of the thread receive artifact.commented.
|
|
4047
4149
|
*/
|
|
4048
4150
|
export const addArtifactComment = <ThrowOnError extends boolean = false>(
|
|
4049
4151
|
options: Options<AddArtifactCommentData, ThrowOnError>
|
|
@@ -4243,6 +4345,43 @@ export const getArtifactVersion = <ThrowOnError extends boolean = false>(
|
|
|
4243
4345
|
...options,
|
|
4244
4346
|
})
|
|
4245
4347
|
|
|
4348
|
+
/**
|
|
4349
|
+
* Get a designed document's PDF
|
|
4350
|
+
*
|
|
4351
|
+
* The version printed to PDF, with the values its fields read as the caller reads them, as a download named after the title it printed with: for a document that shows live data, those its POST's key names. 404 pdf_not_found until it is printed: ask for it with POST first. A frozen version's PDF never changes, and is cached as such.
|
|
4352
|
+
*/
|
|
4353
|
+
export const getArtifactPdf = <ThrowOnError extends boolean = false>(
|
|
4354
|
+
options: Options<GetArtifactPdfData, ThrowOnError>
|
|
4355
|
+
) =>
|
|
4356
|
+
(options.client ?? client).get<GetArtifactPdfResponses, GetArtifactPdfErrors, ThrowOnError>({
|
|
4357
|
+
security: [
|
|
4358
|
+
{ scheme: "bearer", type: "http" },
|
|
4359
|
+
{ scheme: "bearer", type: "http" },
|
|
4360
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
4361
|
+
],
|
|
4362
|
+
url: "/api/artifacts/{artifactId}/versions/{version}/pdf",
|
|
4363
|
+
...options,
|
|
4364
|
+
})
|
|
4365
|
+
|
|
4366
|
+
/**
|
|
4367
|
+
* Print a designed document to PDF
|
|
4368
|
+
*
|
|
4369
|
+
* Answers ready once the version is printed, and printing until then, having asked for it: ask again after a few seconds, then get it. Failed with why when it could not be printed; retry=true asks again. A document that shows live data answers with a key: ask again and get it with that key, which names the values the first ask printed. It prints as its stylesheets' @page rule lays it out, in a sandbox of the project. Whoever reads the artifact may ask. 400 invalid_artifact when the version is not a designed document; 501 pdf_unavailable in a project without sandboxes.
|
|
4370
|
+
*/
|
|
4371
|
+
export const printArtifactPdf = <ThrowOnError extends boolean = false>(
|
|
4372
|
+
options: Options<PrintArtifactPdfData, ThrowOnError>
|
|
4373
|
+
) =>
|
|
4374
|
+
(options.client ?? client).post<PrintArtifactPdfResponses, PrintArtifactPdfErrors, ThrowOnError>({
|
|
4375
|
+
security: [
|
|
4376
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
4377
|
+
{ scheme: "bearer", type: "http" },
|
|
4378
|
+
{ scheme: "bearer", type: "http" },
|
|
4379
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
4380
|
+
],
|
|
4381
|
+
url: "/api/artifacts/{artifactId}/versions/{version}/pdf",
|
|
4382
|
+
...options,
|
|
4383
|
+
})
|
|
4384
|
+
|
|
4246
4385
|
/**
|
|
4247
4386
|
* Get the preview of a canvas's board
|
|
4248
4387
|
*
|
|
@@ -4268,7 +4407,7 @@ export const getArtifactBoardPreview = <ThrowOnError extends boolean = false>(
|
|
|
4268
4407
|
/**
|
|
4269
4408
|
* Run an artifact's query
|
|
4270
4409
|
*
|
|
4271
|
-
* Runs the version's queries/<name>.json as the caller, with their rights: a type they cannot view is refused with 403, and a marked property they are not cleared for is left out of each row. Rows are serialized as POST /api/objects/query returns them, beside the schema of what they hold as the caller may view it. Use "latest" for the newest version. A query the ontology no longer admits is refused with 409 query_invalid.
|
|
4410
|
+
* Runs the version's queries/<name>.json as the caller, with their rights: a type they cannot view is refused with 403, and a marked property they are not cleared for is left out of each row. Rows are serialized as POST /api/objects/query returns them, beside the schema of what they hold as the caller may view it. Use "latest" for the newest version. A query the ontology no longer admits is refused with 409 query_invalid. A designed document's "holder" is the object that holds it, of the type it names, with the links its fields read through: 404 holder_not_found when no one such object the caller reads holds it.
|
|
4272
4411
|
*/
|
|
4273
4412
|
export const getArtifactQuery = <ThrowOnError extends boolean = false>(
|
|
4274
4413
|
options: Options<GetArtifactQueryData, ThrowOnError>
|