@sixb/client 0.2.0 → 0.2.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/artifact-live.d.ts +31 -0
- package/dist/artifact-live.d.ts.map +1 -0
- package/dist/artifact-live.js +67 -0
- package/dist/artifact-live.js.map +10 -0
- package/dist/browser.d.ts +5 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +38 -17
- package/dist/browser.js.map +3 -3
- package/dist/{chunk-j9t5h44d.js → chunk-15ynvne0.js} +40 -28
- package/dist/{chunk-j9t5h44d.js.map → chunk-15ynvne0.js.map} +4 -4
- package/dist/{chunk-1wdszw1c.js → chunk-90q7wa43.js} +30 -21
- package/dist/chunk-90q7wa43.js.map +17 -0
- package/dist/{chunk-s2pagg09.js → chunk-bgpzb1fn.js} +6 -6
- package/dist/{chunk-s2pagg09.js.map → chunk-bgpzb1fn.js.map} +1 -1
- package/dist/{chunk-sh0f609h.js → chunk-br10prhs.js} +4 -4
- package/dist/{chunk-sh0f609h.js.map → chunk-br10prhs.js.map} +1 -1
- package/dist/chunk-hj4h6hw6.js +827 -0
- package/dist/chunk-hj4h6hw6.js.map +18 -0
- package/dist/{chunk-mk0w4zr1.js → chunk-ktqfenfd.js} +43 -11
- package/dist/chunk-ktqfenfd.js.map +10 -0
- package/dist/{chunk-fnd56xxz.js → chunk-seeyb9k9.js} +8 -6
- package/dist/{chunk-fnd56xxz.js.map → chunk-seeyb9k9.js.map} +2 -2
- package/dist/{chunk-m2rmbshc.js → chunk-y9mhb8x4.js} +3 -1
- package/dist/chunk-y9mhb8x4.js.map +10 -0
- package/dist/{chunk-2qsekqcn.js → chunk-zerhr00d.js} +167 -832
- package/dist/chunk-zerhr00d.js.map +10 -0
- package/dist/client-authority.d.ts +11 -0
- package/dist/client-authority.d.ts.map +1 -1
- package/dist/connectors/connection.d.ts +8 -3
- package/dist/connectors/connection.d.ts.map +1 -1
- package/dist/connectors/mutations.d.ts +4 -0
- package/dist/connectors/mutations.d.ts.map +1 -1
- package/dist/connectors/queries.d.ts +98 -0
- package/dist/connectors/queries.d.ts.map +1 -1
- package/dist/events-builder.d.ts +2 -0
- package/dist/events-builder.d.ts.map +1 -1
- package/dist/events-provider.d.ts.map +1 -1
- package/dist/events-transport.d.ts.map +1 -1
- package/dist/file.d.ts +8 -0
- package/dist/file.d.ts.map +1 -1
- package/dist/generated/@tanstack/react-query.gen.d.ts +1891 -486
- 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 +92 -6
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/types.gen.d.ts +2957 -195
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +321 -57
- package/dist/hooks.js.map +9 -9
- package/dist/index.js +90 -56
- package/dist/index.js.map +1 -1
- package/dist/logs.js +6 -5
- package/dist/logs.js.map +1 -1
- package/dist/models.d.ts +5 -2
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js +38 -6
- package/dist/models.js.map +1 -1
- package/dist/query.js +6 -5
- package/dist/query.js.map +1 -1
- package/dist/useDesktop.d.ts +25 -0
- package/dist/useDesktop.d.ts.map +1 -1
- package/dist/users-hooks.d.ts.map +1 -1
- package/dist/ws-socket.d.ts +17 -2
- package/dist/ws-socket.d.ts.map +1 -1
- package/package.json +8 -2
- package/src/artifact-live.ts +97 -0
- package/src/browser.ts +43 -5
- package/src/client-authority.ts +21 -0
- package/src/connectors/connection.ts +34 -12
- package/src/connectors/mutations.ts +8 -2
- package/src/connectors/queries.ts +6 -2
- package/src/events-builder.ts +9 -8
- package/src/events-provider.ts +13 -0
- package/src/events-transport.ts +3 -0
- package/src/file.ts +17 -0
- package/src/generated/@tanstack/react-query.gen.ts +492 -17
- package/src/generated/index.ts +96 -6
- package/src/generated/sdk.gen.ts +389 -12
- package/src/generated/types.gen.ts +3267 -300
- package/src/hooks.ts +7 -1
- package/src/models.ts +6 -2
- package/src/useDesktop.ts +27 -0
- package/src/ws-socket.ts +64 -10
- package/dist/chunk-1wdszw1c.js.map +0 -17
- package/dist/chunk-2qsekqcn.js.map +0 -19
- package/dist/chunk-m2rmbshc.js.map +0 -10
- package/dist/chunk-mk0w4zr1.js.map +0 -10
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -14,6 +14,9 @@ import type {
|
|
|
14
14
|
AddAgentThreadParticipantsData,
|
|
15
15
|
AddAgentThreadParticipantsErrors,
|
|
16
16
|
AddAgentThreadParticipantsResponses,
|
|
17
|
+
AddArtifactCommentData,
|
|
18
|
+
AddArtifactCommentErrors,
|
|
19
|
+
AddArtifactCommentResponses,
|
|
17
20
|
AddConnectorConnectionData,
|
|
18
21
|
AddConnectorConnectionErrors,
|
|
19
22
|
AddConnectorConnectionResponses,
|
|
@@ -80,6 +83,9 @@ import type {
|
|
|
80
83
|
DeleteAiLimitPolicyData,
|
|
81
84
|
DeleteAiLimitPolicyErrors,
|
|
82
85
|
DeleteAiLimitPolicyResponses,
|
|
86
|
+
DeleteArtifactCommentData,
|
|
87
|
+
DeleteArtifactCommentErrors,
|
|
88
|
+
DeleteArtifactCommentResponses,
|
|
83
89
|
DeleteArtifactData,
|
|
84
90
|
DeleteArtifactErrors,
|
|
85
91
|
DeleteArtifactResponses,
|
|
@@ -106,6 +112,9 @@ import type {
|
|
|
106
112
|
ForkAgentThreadData,
|
|
107
113
|
ForkAgentThreadErrors,
|
|
108
114
|
ForkAgentThreadResponses,
|
|
115
|
+
FreezeArtifactVersionData,
|
|
116
|
+
FreezeArtifactVersionErrors,
|
|
117
|
+
FreezeArtifactVersionResponses,
|
|
109
118
|
GenerateImagesData,
|
|
110
119
|
GenerateImagesErrors,
|
|
111
120
|
GenerateImagesResponses,
|
|
@@ -175,6 +184,9 @@ import type {
|
|
|
175
184
|
GetAiModelCallFilesData,
|
|
176
185
|
GetAiModelCallFilesErrors,
|
|
177
186
|
GetAiModelCallFilesResponses,
|
|
187
|
+
GetArtifactBoardPreviewData,
|
|
188
|
+
GetArtifactBoardPreviewErrors,
|
|
189
|
+
GetArtifactBoardPreviewResponses,
|
|
178
190
|
GetArtifactData,
|
|
179
191
|
GetArtifactErrors,
|
|
180
192
|
GetArtifactFileContentData,
|
|
@@ -184,6 +196,12 @@ import type {
|
|
|
184
196
|
GetArtifactQueryErrors,
|
|
185
197
|
GetArtifactQueryResponses,
|
|
186
198
|
GetArtifactResponses,
|
|
199
|
+
GetArtifactRestorePointData,
|
|
200
|
+
GetArtifactRestorePointErrors,
|
|
201
|
+
GetArtifactRestorePointFileContentData,
|
|
202
|
+
GetArtifactRestorePointFileContentErrors,
|
|
203
|
+
GetArtifactRestorePointFileContentResponses,
|
|
204
|
+
GetArtifactRestorePointResponses,
|
|
187
205
|
GetArtifactStateData,
|
|
188
206
|
GetArtifactStateErrors,
|
|
189
207
|
GetArtifactStateResponses,
|
|
@@ -222,6 +240,9 @@ import type {
|
|
|
222
240
|
GetDatasetVersionLineageErrors,
|
|
223
241
|
GetDatasetVersionLineageResponses,
|
|
224
242
|
GetDatasetVersionResponses,
|
|
243
|
+
GetLakeHealthData,
|
|
244
|
+
GetLakeHealthErrors,
|
|
245
|
+
GetLakeHealthResponses,
|
|
225
246
|
GetLatestTelemetryData,
|
|
226
247
|
GetLatestTelemetryErrors,
|
|
227
248
|
GetLatestTelemetryResponses,
|
|
@@ -348,6 +369,9 @@ import type {
|
|
|
348
369
|
ListAgentApprovalsData,
|
|
349
370
|
ListAgentApprovalsErrors,
|
|
350
371
|
ListAgentApprovalsResponses,
|
|
372
|
+
ListAgentComputersData,
|
|
373
|
+
ListAgentComputersErrors,
|
|
374
|
+
ListAgentComputersResponses,
|
|
351
375
|
ListAgentMemoryRevisionsData,
|
|
352
376
|
ListAgentMemoryRevisionsErrors,
|
|
353
377
|
ListAgentMemoryRevisionsResponses,
|
|
@@ -375,6 +399,15 @@ import type {
|
|
|
375
399
|
ListAiModelCallsData,
|
|
376
400
|
ListAiModelCallsErrors,
|
|
377
401
|
ListAiModelCallsResponses,
|
|
402
|
+
ListArtifactCommentsData,
|
|
403
|
+
ListArtifactCommentsErrors,
|
|
404
|
+
ListArtifactCommentsResponses,
|
|
405
|
+
ListArtifactHoldersData,
|
|
406
|
+
ListArtifactHoldersErrors,
|
|
407
|
+
ListArtifactHoldersResponses,
|
|
408
|
+
ListArtifactRestorePointsData,
|
|
409
|
+
ListArtifactRestorePointsErrors,
|
|
410
|
+
ListArtifactRestorePointsResponses,
|
|
378
411
|
ListArtifactsData,
|
|
379
412
|
ListArtifactsErrors,
|
|
380
413
|
ListArtifactsResponses,
|
|
@@ -481,9 +514,6 @@ import type {
|
|
|
481
514
|
PostAgentThreadMessageData,
|
|
482
515
|
PostAgentThreadMessageErrors,
|
|
483
516
|
PostAgentThreadMessageResponses,
|
|
484
|
-
PublishArtifactVersionData,
|
|
485
|
-
PublishArtifactVersionErrors,
|
|
486
|
-
PublishArtifactVersionResponses,
|
|
487
517
|
QueryObjectLinksData,
|
|
488
518
|
QueryObjectLinksErrors,
|
|
489
519
|
QueryObjectLinksResponses,
|
|
@@ -520,6 +550,12 @@ import type {
|
|
|
520
550
|
RequestWorkflowRunData,
|
|
521
551
|
RequestWorkflowRunErrors,
|
|
522
552
|
RequestWorkflowRunResponses,
|
|
553
|
+
ResolveArtifactCommentData,
|
|
554
|
+
ResolveArtifactCommentErrors,
|
|
555
|
+
ResolveArtifactCommentResponses,
|
|
556
|
+
RestoreArtifactData,
|
|
557
|
+
RestoreArtifactErrors,
|
|
558
|
+
RestoreArtifactResponses,
|
|
523
559
|
RetryAgentRunData,
|
|
524
560
|
RetryAgentRunErrors,
|
|
525
561
|
RetryAgentRunResponses,
|
|
@@ -556,6 +592,9 @@ import type {
|
|
|
556
592
|
SetArtifactStateData,
|
|
557
593
|
SetArtifactStateErrors,
|
|
558
594
|
SetArtifactStateResponses,
|
|
595
|
+
SetSharedAccessGuestNameData,
|
|
596
|
+
SetSharedAccessGuestNameErrors,
|
|
597
|
+
SetSharedAccessGuestNameResponses,
|
|
559
598
|
SignFileUploadPartData,
|
|
560
599
|
SignFileUploadPartErrors,
|
|
561
600
|
SignFileUploadPartResponses,
|
|
@@ -571,6 +610,9 @@ import type {
|
|
|
571
610
|
StartConnectorConnectionRunData,
|
|
572
611
|
StartConnectorConnectionRunErrors,
|
|
573
612
|
StartConnectorConnectionRunResponses,
|
|
613
|
+
StopAgentBackgroundCommandData,
|
|
614
|
+
StopAgentBackgroundCommandErrors,
|
|
615
|
+
StopAgentBackgroundCommandResponses,
|
|
574
616
|
SubmitWorkflowInterventionData,
|
|
575
617
|
SubmitWorkflowInterventionErrors,
|
|
576
618
|
SubmitWorkflowInterventionResponses,
|
|
@@ -586,6 +628,9 @@ import type {
|
|
|
586
628
|
UpdateAiLimitPolicyData,
|
|
587
629
|
UpdateAiLimitPolicyErrors,
|
|
588
630
|
UpdateAiLimitPolicyResponses,
|
|
631
|
+
UpdateArtifactData,
|
|
632
|
+
UpdateArtifactErrors,
|
|
633
|
+
UpdateArtifactResponses,
|
|
589
634
|
UpdateAuthMemberGroupsData,
|
|
590
635
|
UpdateAuthMemberGroupsErrors,
|
|
591
636
|
UpdateAuthMemberGroupsResponses,
|
|
@@ -1790,6 +1835,21 @@ export const listDatasetRows = <ThrowOnError extends boolean = false>(
|
|
|
1790
1835
|
...options,
|
|
1791
1836
|
})
|
|
1792
1837
|
|
|
1838
|
+
/**
|
|
1839
|
+
* Describe how the lake stores each dataset, and what its retention does
|
|
1840
|
+
*/
|
|
1841
|
+
export const getLakeHealth = <ThrowOnError extends boolean = false>(
|
|
1842
|
+
options?: Options<GetLakeHealthData, ThrowOnError>
|
|
1843
|
+
) =>
|
|
1844
|
+
(options?.client ?? client).get<GetLakeHealthResponses, GetLakeHealthErrors, ThrowOnError>({
|
|
1845
|
+
security: [
|
|
1846
|
+
{ scheme: "bearer", type: "http" },
|
|
1847
|
+
{ scheme: "bearer", type: "http" },
|
|
1848
|
+
],
|
|
1849
|
+
url: "/api/lake/health",
|
|
1850
|
+
...options,
|
|
1851
|
+
})
|
|
1852
|
+
|
|
1793
1853
|
/**
|
|
1794
1854
|
* List registered syncs
|
|
1795
1855
|
*/
|
|
@@ -2344,6 +2404,28 @@ export const getSharedAccessSession = <ThrowOnError extends boolean = false>(
|
|
|
2344
2404
|
ThrowOnError
|
|
2345
2405
|
>({ url: "/api/shared-access/{grantId}/session", ...options })
|
|
2346
2406
|
|
|
2407
|
+
/**
|
|
2408
|
+
* Name a shared-access session's visitor
|
|
2409
|
+
*
|
|
2410
|
+
* The visitor of a shared link has no account: they give their name once, and their comments and live presence carry it, marked as a guest's. Giving it again replaces it for what comes next; comments keep the name they were written under.
|
|
2411
|
+
*/
|
|
2412
|
+
export const setSharedAccessGuestName = <ThrowOnError extends boolean = false>(
|
|
2413
|
+
options: Options<SetSharedAccessGuestNameData, ThrowOnError>
|
|
2414
|
+
) =>
|
|
2415
|
+
(options.client ?? client).put<
|
|
2416
|
+
SetSharedAccessGuestNameResponses,
|
|
2417
|
+
SetSharedAccessGuestNameErrors,
|
|
2418
|
+
ThrowOnError
|
|
2419
|
+
>({
|
|
2420
|
+
security: [{ name: "x-sixb-csrf", type: "apiKey" }],
|
|
2421
|
+
url: "/api/shared-access/{grantId}/name",
|
|
2422
|
+
...options,
|
|
2423
|
+
headers: {
|
|
2424
|
+
"Content-Type": "application/json",
|
|
2425
|
+
...options.headers,
|
|
2426
|
+
},
|
|
2427
|
+
})
|
|
2428
|
+
|
|
2347
2429
|
/**
|
|
2348
2430
|
* Sign out a shared-access session
|
|
2349
2431
|
*/
|
|
@@ -3260,6 +3342,24 @@ export const headAgentChildFileContent = <ThrowOnError extends boolean = false>(
|
|
|
3260
3342
|
...options,
|
|
3261
3343
|
})
|
|
3262
3344
|
|
|
3345
|
+
/**
|
|
3346
|
+
* List your computers with sixb open now
|
|
3347
|
+
*
|
|
3348
|
+
* Each of your computers with a live session, and the folders `sixb` is open in there: a thread created to run in one of them runs there now.
|
|
3349
|
+
*/
|
|
3350
|
+
export const listAgentComputers = <ThrowOnError extends boolean = false>(
|
|
3351
|
+
options?: Options<ListAgentComputersData, ThrowOnError>
|
|
3352
|
+
) =>
|
|
3353
|
+
(options?.client ?? client).get<
|
|
3354
|
+
ListAgentComputersResponses,
|
|
3355
|
+
ListAgentComputersErrors,
|
|
3356
|
+
ThrowOnError
|
|
3357
|
+
>({
|
|
3358
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3359
|
+
url: "/api/agent-computers",
|
|
3360
|
+
...options,
|
|
3361
|
+
})
|
|
3362
|
+
|
|
3263
3363
|
/**
|
|
3264
3364
|
* Move a thread from your computer to the cloud
|
|
3265
3365
|
*
|
|
@@ -3330,7 +3430,7 @@ export const releaseAgentComputerSession = <ThrowOnError extends boolean = false
|
|
|
3330
3430
|
/**
|
|
3331
3431
|
* Open or renew a computer session
|
|
3332
3432
|
*
|
|
3333
|
-
* `sixb` holds one while it is open: your threads on this computer, in this folder, read as online, and you can continue them from anywhere. It lapses a minute after its last renewal.
|
|
3433
|
+
* `sixb` holds one while it is open: your threads on this computer, in this folder, read as online, and you can continue them from anywhere. It lapses a minute after its last renewal. It reports the background commands it runs for your threads; the answer lists the turns waiting for it, and the commands someone asked to stop.
|
|
3334
3434
|
*/
|
|
3335
3435
|
export const holdAgentComputerSession = <ThrowOnError extends boolean = false>(
|
|
3336
3436
|
options: Options<HoldAgentComputerSessionData, ThrowOnError>
|
|
@@ -3352,6 +3452,31 @@ export const holdAgentComputerSession = <ThrowOnError extends boolean = false>(
|
|
|
3352
3452
|
},
|
|
3353
3453
|
})
|
|
3354
3454
|
|
|
3455
|
+
/**
|
|
3456
|
+
* Stop a background command on your computer
|
|
3457
|
+
*
|
|
3458
|
+
* A command the agent ran in the background on your computer keeps running after its turn. `sixb` there stops it, and everything it started, at its next renewal, which this asks for at once. The thread's owner alone stops it.
|
|
3459
|
+
*/
|
|
3460
|
+
export const stopAgentBackgroundCommand = <ThrowOnError extends boolean = false>(
|
|
3461
|
+
options: Options<StopAgentBackgroundCommandData, ThrowOnError>
|
|
3462
|
+
) =>
|
|
3463
|
+
(options.client ?? client).post<
|
|
3464
|
+
StopAgentBackgroundCommandResponses,
|
|
3465
|
+
StopAgentBackgroundCommandErrors,
|
|
3466
|
+
ThrowOnError
|
|
3467
|
+
>({
|
|
3468
|
+
security: [
|
|
3469
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
3470
|
+
{ scheme: "bearer", type: "http" },
|
|
3471
|
+
],
|
|
3472
|
+
url: "/api/agent-threads/{threadId}/background-commands/{commandId}/stop",
|
|
3473
|
+
...options,
|
|
3474
|
+
headers: {
|
|
3475
|
+
"Content-Type": "application/json",
|
|
3476
|
+
...options.headers,
|
|
3477
|
+
},
|
|
3478
|
+
})
|
|
3479
|
+
|
|
3355
3480
|
/**
|
|
3356
3481
|
* Get your Agent preferences
|
|
3357
3482
|
*/
|
|
@@ -3736,11 +3861,34 @@ export const getArtifact = <ThrowOnError extends boolean = false>(
|
|
|
3736
3861
|
security: [
|
|
3737
3862
|
{ scheme: "bearer", type: "http" },
|
|
3738
3863
|
{ scheme: "bearer", type: "http" },
|
|
3864
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
3739
3865
|
],
|
|
3740
3866
|
url: "/api/artifacts/{artifactId}",
|
|
3741
3867
|
...options,
|
|
3742
3868
|
})
|
|
3743
3869
|
|
|
3870
|
+
/**
|
|
3871
|
+
* List the objects that hold an artifact
|
|
3872
|
+
*
|
|
3873
|
+
* The objects whose property holds the artifact, among those you read with that property, in a stable order. Whoever reads such an object reads the artifact.
|
|
3874
|
+
*/
|
|
3875
|
+
export const listArtifactHolders = <ThrowOnError extends boolean = false>(
|
|
3876
|
+
options: Options<ListArtifactHoldersData, ThrowOnError>
|
|
3877
|
+
) =>
|
|
3878
|
+
(options.client ?? client).get<
|
|
3879
|
+
ListArtifactHoldersResponses,
|
|
3880
|
+
ListArtifactHoldersErrors,
|
|
3881
|
+
ThrowOnError
|
|
3882
|
+
>({
|
|
3883
|
+
security: [
|
|
3884
|
+
{ scheme: "bearer", type: "http" },
|
|
3885
|
+
{ scheme: "bearer", type: "http" },
|
|
3886
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
3887
|
+
],
|
|
3888
|
+
url: "/api/artifacts/{artifactId}/holders",
|
|
3889
|
+
...options,
|
|
3890
|
+
})
|
|
3891
|
+
|
|
3744
3892
|
/**
|
|
3745
3893
|
* Reset what a page keeps
|
|
3746
3894
|
*
|
|
@@ -3823,24 +3971,226 @@ export const setArtifactState = <ThrowOnError extends boolean = false>(
|
|
|
3823
3971
|
})
|
|
3824
3972
|
|
|
3825
3973
|
/**
|
|
3826
|
-
*
|
|
3974
|
+
* Update an artifact
|
|
3975
|
+
*
|
|
3976
|
+
* Writes the artifact's latest version: its content is replaced while the version is open, and the next version opens when it is frozen. Either way the revision grows. The kind must be the artifact's. With baseRevision, it is refused with 409 artifact_moved when the artifact changed since. With a run token, only an artifact the run's conversation shares, its requester owns, or an object its requester edits holds; it is shared in that conversation, and the turn's first write to it keeps a restore point. A run that lost its execution gets 409 execution_lost.
|
|
3977
|
+
*/
|
|
3978
|
+
export const updateArtifact = <ThrowOnError extends boolean = false>(
|
|
3979
|
+
options: Options<UpdateArtifactData, ThrowOnError>
|
|
3980
|
+
) =>
|
|
3981
|
+
(options.client ?? client).put<UpdateArtifactResponses, UpdateArtifactErrors, ThrowOnError>({
|
|
3982
|
+
security: [
|
|
3983
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
3984
|
+
{ scheme: "bearer", type: "http" },
|
|
3985
|
+
{ scheme: "bearer", type: "http" },
|
|
3986
|
+
],
|
|
3987
|
+
url: "/api/artifacts/{artifactId}/content",
|
|
3988
|
+
...options,
|
|
3989
|
+
headers: {
|
|
3990
|
+
"Content-Type": "application/json",
|
|
3991
|
+
...options.headers,
|
|
3992
|
+
},
|
|
3993
|
+
})
|
|
3994
|
+
|
|
3995
|
+
/**
|
|
3996
|
+
* Create a version
|
|
3997
|
+
*
|
|
3998
|
+
* Freezes the artifact's open latest version: it never changes again, and the next write opens the next version. A latest version already frozen is returned as it is. Whoever may update the artifact may create a version. With baseRevision, it is refused with 409 artifact_moved when the open version changed since.
|
|
3999
|
+
*/
|
|
4000
|
+
export const freezeArtifactVersion = <ThrowOnError extends boolean = false>(
|
|
4001
|
+
options: Options<FreezeArtifactVersionData, ThrowOnError>
|
|
4002
|
+
) =>
|
|
4003
|
+
(options.client ?? client).post<
|
|
4004
|
+
FreezeArtifactVersionResponses,
|
|
4005
|
+
FreezeArtifactVersionErrors,
|
|
4006
|
+
ThrowOnError
|
|
4007
|
+
>({
|
|
4008
|
+
security: [
|
|
4009
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
4010
|
+
{ scheme: "bearer", type: "http" },
|
|
4011
|
+
{ scheme: "bearer", type: "http" },
|
|
4012
|
+
],
|
|
4013
|
+
url: "/api/artifacts/{artifactId}/freeze",
|
|
4014
|
+
...options,
|
|
4015
|
+
headers: {
|
|
4016
|
+
"Content-Type": "application/json",
|
|
4017
|
+
...options.headers,
|
|
4018
|
+
},
|
|
4019
|
+
})
|
|
4020
|
+
|
|
4021
|
+
/**
|
|
4022
|
+
* List an artifact's comments
|
|
4023
|
+
*
|
|
4024
|
+
* Every comment and reply, oldest first, resolved ones included. Whoever reads the artifact reads them.
|
|
4025
|
+
*/
|
|
4026
|
+
export const listArtifactComments = <ThrowOnError extends boolean = false>(
|
|
4027
|
+
options: Options<ListArtifactCommentsData, ThrowOnError>
|
|
4028
|
+
) =>
|
|
4029
|
+
(options.client ?? client).get<
|
|
4030
|
+
ListArtifactCommentsResponses,
|
|
4031
|
+
ListArtifactCommentsErrors,
|
|
4032
|
+
ThrowOnError
|
|
4033
|
+
>({
|
|
4034
|
+
security: [
|
|
4035
|
+
{ scheme: "bearer", type: "http" },
|
|
4036
|
+
{ scheme: "bearer", type: "http" },
|
|
4037
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
4038
|
+
],
|
|
4039
|
+
url: "/api/artifacts/{artifactId}/comments",
|
|
4040
|
+
...options,
|
|
4041
|
+
})
|
|
4042
|
+
|
|
4043
|
+
/**
|
|
4044
|
+
* Comment on an artifact
|
|
4045
|
+
*
|
|
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.
|
|
4047
|
+
*/
|
|
4048
|
+
export const addArtifactComment = <ThrowOnError extends boolean = false>(
|
|
4049
|
+
options: Options<AddArtifactCommentData, ThrowOnError>
|
|
4050
|
+
) =>
|
|
4051
|
+
(options.client ?? client).post<
|
|
4052
|
+
AddArtifactCommentResponses,
|
|
4053
|
+
AddArtifactCommentErrors,
|
|
4054
|
+
ThrowOnError
|
|
4055
|
+
>({
|
|
4056
|
+
security: [
|
|
4057
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
4058
|
+
{ scheme: "bearer", type: "http" },
|
|
4059
|
+
{ scheme: "bearer", type: "http" },
|
|
4060
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
4061
|
+
],
|
|
4062
|
+
url: "/api/artifacts/{artifactId}/comments",
|
|
4063
|
+
...options,
|
|
4064
|
+
headers: {
|
|
4065
|
+
"Content-Type": "application/json",
|
|
4066
|
+
...options.headers,
|
|
4067
|
+
},
|
|
4068
|
+
})
|
|
4069
|
+
|
|
4070
|
+
/**
|
|
4071
|
+
* Resolve an artifact's comment
|
|
3827
4072
|
*
|
|
3828
|
-
*
|
|
4073
|
+
* Marks the comment resolved, or, with resolved false, opens it again. Its author, or whoever may update the artifact, may; anyone else is refused with 403 not_allowed. A guest's comment is resolved only by whoever may update the artifact.
|
|
3829
4074
|
*/
|
|
3830
|
-
export const
|
|
3831
|
-
options: Options<
|
|
4075
|
+
export const resolveArtifactComment = <ThrowOnError extends boolean = false>(
|
|
4076
|
+
options: Options<ResolveArtifactCommentData, ThrowOnError>
|
|
3832
4077
|
) =>
|
|
3833
4078
|
(options.client ?? client).post<
|
|
3834
|
-
|
|
3835
|
-
|
|
4079
|
+
ResolveArtifactCommentResponses,
|
|
4080
|
+
ResolveArtifactCommentErrors,
|
|
4081
|
+
ThrowOnError
|
|
4082
|
+
>({
|
|
4083
|
+
security: [
|
|
4084
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
4085
|
+
{ scheme: "bearer", type: "http" },
|
|
4086
|
+
{ scheme: "bearer", type: "http" },
|
|
4087
|
+
],
|
|
4088
|
+
url: "/api/artifacts/{artifactId}/comments/{commentId}/resolve",
|
|
4089
|
+
...options,
|
|
4090
|
+
headers: {
|
|
4091
|
+
"Content-Type": "application/json",
|
|
4092
|
+
...options.headers,
|
|
4093
|
+
},
|
|
4094
|
+
})
|
|
4095
|
+
|
|
4096
|
+
/**
|
|
4097
|
+
* Delete an artifact's comment
|
|
4098
|
+
*
|
|
4099
|
+
* Deletes the comment and its replies. Its author, or whoever may update the artifact, may.
|
|
4100
|
+
*/
|
|
4101
|
+
export const deleteArtifactComment = <ThrowOnError extends boolean = false>(
|
|
4102
|
+
options: Options<DeleteArtifactCommentData, ThrowOnError>
|
|
4103
|
+
) =>
|
|
4104
|
+
(options.client ?? client).delete<
|
|
4105
|
+
DeleteArtifactCommentResponses,
|
|
4106
|
+
DeleteArtifactCommentErrors,
|
|
4107
|
+
ThrowOnError
|
|
4108
|
+
>({
|
|
4109
|
+
security: [
|
|
4110
|
+
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
4111
|
+
{ scheme: "bearer", type: "http" },
|
|
4112
|
+
{ scheme: "bearer", type: "http" },
|
|
4113
|
+
],
|
|
4114
|
+
url: "/api/artifacts/{artifactId}/comments/{commentId}",
|
|
4115
|
+
...options,
|
|
4116
|
+
})
|
|
4117
|
+
|
|
4118
|
+
/**
|
|
4119
|
+
* List an artifact's restore points
|
|
4120
|
+
*
|
|
4121
|
+
* What the artifact's latest version held before each Agent turn's first write to it, and before each restore, newest first. They are not versions: restoring one puts its content back in the latest version.
|
|
4122
|
+
*/
|
|
4123
|
+
export const listArtifactRestorePoints = <ThrowOnError extends boolean = false>(
|
|
4124
|
+
options: Options<ListArtifactRestorePointsData, ThrowOnError>
|
|
4125
|
+
) =>
|
|
4126
|
+
(options.client ?? client).get<
|
|
4127
|
+
ListArtifactRestorePointsResponses,
|
|
4128
|
+
ListArtifactRestorePointsErrors,
|
|
3836
4129
|
ThrowOnError
|
|
3837
4130
|
>({
|
|
4131
|
+
security: [
|
|
4132
|
+
{ scheme: "bearer", type: "http" },
|
|
4133
|
+
{ scheme: "bearer", type: "http" },
|
|
4134
|
+
],
|
|
4135
|
+
url: "/api/artifacts/{artifactId}/restore-points",
|
|
4136
|
+
...options,
|
|
4137
|
+
})
|
|
4138
|
+
|
|
4139
|
+
/**
|
|
4140
|
+
* Get an artifact's restore point
|
|
4141
|
+
*
|
|
4142
|
+
* Its files, outline, and references, as the latest version held them. Read a file's bytes with GET /api/artifacts/{artifactId}/restore-points/{revision}/content.
|
|
4143
|
+
*/
|
|
4144
|
+
export const getArtifactRestorePoint = <ThrowOnError extends boolean = false>(
|
|
4145
|
+
options: Options<GetArtifactRestorePointData, ThrowOnError>
|
|
4146
|
+
) =>
|
|
4147
|
+
(options.client ?? client).get<
|
|
4148
|
+
GetArtifactRestorePointResponses,
|
|
4149
|
+
GetArtifactRestorePointErrors,
|
|
4150
|
+
ThrowOnError
|
|
4151
|
+
>({
|
|
4152
|
+
security: [
|
|
4153
|
+
{ scheme: "bearer", type: "http" },
|
|
4154
|
+
{ scheme: "bearer", type: "http" },
|
|
4155
|
+
],
|
|
4156
|
+
url: "/api/artifacts/{artifactId}/restore-points/{revision}",
|
|
4157
|
+
...options,
|
|
4158
|
+
})
|
|
4159
|
+
|
|
4160
|
+
/**
|
|
4161
|
+
* Get a file of an artifact's restore point
|
|
4162
|
+
*/
|
|
4163
|
+
export const getArtifactRestorePointFileContent = <ThrowOnError extends boolean = false>(
|
|
4164
|
+
options: Options<GetArtifactRestorePointFileContentData, ThrowOnError>
|
|
4165
|
+
) =>
|
|
4166
|
+
(options.client ?? client).get<
|
|
4167
|
+
GetArtifactRestorePointFileContentResponses,
|
|
4168
|
+
GetArtifactRestorePointFileContentErrors,
|
|
4169
|
+
ThrowOnError
|
|
4170
|
+
>({
|
|
4171
|
+
security: [
|
|
4172
|
+
{ scheme: "bearer", type: "http" },
|
|
4173
|
+
{ scheme: "bearer", type: "http" },
|
|
4174
|
+
],
|
|
4175
|
+
url: "/api/artifacts/{artifactId}/restore-points/{revision}/content",
|
|
4176
|
+
...options,
|
|
4177
|
+
})
|
|
4178
|
+
|
|
4179
|
+
/**
|
|
4180
|
+
* Restore an artifact
|
|
4181
|
+
*
|
|
4182
|
+
* Puts a restore point's content back in the latest version, as an update writes it: in place while it is open, as the next version when it is frozen. What it replaces becomes a restore point, so the restore can be undone. Whoever may update the artifact may restore it. With baseRevision, it is refused with 409 artifact_moved when the artifact changed since.
|
|
4183
|
+
*/
|
|
4184
|
+
export const restoreArtifact = <ThrowOnError extends boolean = false>(
|
|
4185
|
+
options: Options<RestoreArtifactData, ThrowOnError>
|
|
4186
|
+
) =>
|
|
4187
|
+
(options.client ?? client).post<RestoreArtifactResponses, RestoreArtifactErrors, ThrowOnError>({
|
|
3838
4188
|
security: [
|
|
3839
4189
|
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
3840
4190
|
{ scheme: "bearer", type: "http" },
|
|
3841
4191
|
{ scheme: "bearer", type: "http" },
|
|
3842
4192
|
],
|
|
3843
|
-
url: "/api/artifacts/{artifactId}/
|
|
4193
|
+
url: "/api/artifacts/{artifactId}/restore-points/{revision}/restore",
|
|
3844
4194
|
...options,
|
|
3845
4195
|
headers: {
|
|
3846
4196
|
"Content-Type": "application/json",
|
|
@@ -3851,7 +4201,7 @@ export const publishArtifactVersion = <ThrowOnError extends boolean = false>(
|
|
|
3851
4201
|
/**
|
|
3852
4202
|
* Open a version in a frame
|
|
3853
4203
|
*
|
|
3854
|
-
* A short-lived path that serves the files of a version that opens in a sandboxed frame, as slides do. It expires within an hour. A kind that does not open in a frame is refused with 409 artifact_kind_mismatch.
|
|
4204
|
+
* A short-lived path that serves the files of a version that opens in a sandboxed frame, as slides do, at the revision it has now: once the version is written again, the path serves nothing and a new one is needed. It expires within an hour. A kind that does not open in a frame is refused with 409 artifact_kind_mismatch.
|
|
3855
4205
|
*/
|
|
3856
4206
|
export const createArtifactFrame = <ThrowOnError extends boolean = false>(
|
|
3857
4207
|
options: Options<CreateArtifactFrameData, ThrowOnError>
|
|
@@ -3865,6 +4215,7 @@ export const createArtifactFrame = <ThrowOnError extends boolean = false>(
|
|
|
3865
4215
|
{ name: "x-sixb-csrf", type: "apiKey" },
|
|
3866
4216
|
{ scheme: "bearer", type: "http" },
|
|
3867
4217
|
{ scheme: "bearer", type: "http" },
|
|
4218
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
3868
4219
|
],
|
|
3869
4220
|
url: "/api/artifacts/{artifactId}/versions/{version}/frame",
|
|
3870
4221
|
...options,
|
|
@@ -3886,11 +4237,34 @@ export const getArtifactVersion = <ThrowOnError extends boolean = false>(
|
|
|
3886
4237
|
security: [
|
|
3887
4238
|
{ scheme: "bearer", type: "http" },
|
|
3888
4239
|
{ scheme: "bearer", type: "http" },
|
|
4240
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
3889
4241
|
],
|
|
3890
4242
|
url: "/api/artifacts/{artifactId}/versions/{version}",
|
|
3891
4243
|
...options,
|
|
3892
4244
|
})
|
|
3893
4245
|
|
|
4246
|
+
/**
|
|
4247
|
+
* Get the preview of a canvas's board
|
|
4248
|
+
*
|
|
4249
|
+
* A picture of the board as its version shows it, in the reader's mode: a PNG at its own size, or with size=small a WebP at most 480 pixels wide, which a viewer shows until the board is opened. It shows the data the version's author can see. A frozen version's preview never changes, and is cached as such, as is one asked for at a revision; an open version's otherwise, and "latest", are revalidated. 404 preview_not_found until it is rendered, when it never will be, or when revision is not the version's current one: the version says which.
|
|
4250
|
+
*/
|
|
4251
|
+
export const getArtifactBoardPreview = <ThrowOnError extends boolean = false>(
|
|
4252
|
+
options: Options<GetArtifactBoardPreviewData, ThrowOnError>
|
|
4253
|
+
) =>
|
|
4254
|
+
(options.client ?? client).get<
|
|
4255
|
+
GetArtifactBoardPreviewResponses,
|
|
4256
|
+
GetArtifactBoardPreviewErrors,
|
|
4257
|
+
ThrowOnError
|
|
4258
|
+
>({
|
|
4259
|
+
security: [
|
|
4260
|
+
{ scheme: "bearer", type: "http" },
|
|
4261
|
+
{ scheme: "bearer", type: "http" },
|
|
4262
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
4263
|
+
],
|
|
4264
|
+
url: "/api/artifacts/{artifactId}/versions/{version}/boards/{board}/preview",
|
|
4265
|
+
...options,
|
|
4266
|
+
})
|
|
4267
|
+
|
|
3894
4268
|
/**
|
|
3895
4269
|
* Run an artifact's query
|
|
3896
4270
|
*
|
|
@@ -3903,6 +4277,7 @@ export const getArtifactQuery = <ThrowOnError extends boolean = false>(
|
|
|
3903
4277
|
security: [
|
|
3904
4278
|
{ scheme: "bearer", type: "http" },
|
|
3905
4279
|
{ scheme: "bearer", type: "http" },
|
|
4280
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
3906
4281
|
],
|
|
3907
4282
|
url: "/api/artifacts/{artifactId}/versions/{version}/queries/{name}",
|
|
3908
4283
|
...options,
|
|
@@ -3922,6 +4297,7 @@ export const getArtifactFileContent = <ThrowOnError extends boolean = false>(
|
|
|
3922
4297
|
security: [
|
|
3923
4298
|
{ scheme: "bearer", type: "http" },
|
|
3924
4299
|
{ scheme: "bearer", type: "http" },
|
|
4300
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
3925
4301
|
],
|
|
3926
4302
|
url: "/api/artifacts/{artifactId}/versions/{version}/content",
|
|
3927
4303
|
...options,
|
|
@@ -3941,6 +4317,7 @@ export const headArtifactFileContent = <ThrowOnError extends boolean = false>(
|
|
|
3941
4317
|
security: [
|
|
3942
4318
|
{ scheme: "bearer", type: "http" },
|
|
3943
4319
|
{ scheme: "bearer", type: "http" },
|
|
4320
|
+
{ name: "x-sixb-share-grant", type: "apiKey" },
|
|
3944
4321
|
],
|
|
3945
4322
|
url: "/api/artifacts/{artifactId}/versions/{version}/content",
|
|
3946
4323
|
...options,
|