@sixb/client 0.2.1 → 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/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-k2na62sa.js → chunk-60fdvjxa.js} +214 -832
- package/dist/chunk-60fdvjxa.js.map +10 -0
- package/dist/{chunk-hkn0keqj.js → chunk-br10prhs.js} +4 -4
- package/dist/{chunk-hkn0keqj.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-3kfn00we.js → chunk-ktqfenfd.js} +43 -11
- package/dist/chunk-ktqfenfd.js.map +10 -0
- package/dist/{chunk-r50kxqa5.js → chunk-pn4b10k4.js} +8 -6
- package/dist/{chunk-r50kxqa5.js.map → chunk-pn4b10k4.js.map} +2 -2
- package/dist/{chunk-rrexv1gk.js → chunk-tm588tr7.js} +6 -6
- package/dist/{chunk-rrexv1gk.js.map → chunk-tm588tr7.js.map} +1 -1
- package/dist/{chunk-m2rmbshc.js → chunk-y9mhb8x4.js} +3 -1
- package/dist/chunk-y9mhb8x4.js.map +10 -0
- package/dist/{chunk-0p42gyb5.js → chunk-zta9jf24.js} +30 -21
- package/dist/chunk-zta9jf24.js.map +17 -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 +3165 -732
- 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 +114 -6
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/types.gen.d.ts +6893 -2935
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/hooks.js +399 -58
- package/dist/hooks.js.map +7 -7
- package/dist/index.js +100 -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 +49 -7
- package/dist/models.js.map +1 -1
- package/dist/query.js +6 -5
- package/dist/query.js.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/agent-streams.ts +1 -0
- 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 +644 -17
- package/src/generated/index.ts +125 -6
- package/src/generated/sdk.gen.ts +500 -12
- package/src/generated/types.gen.ts +8968 -4291
- package/src/models.ts +6 -2
- package/src/ws-socket.ts +64 -10
- package/dist/chunk-0p42gyb5.js.map +0 -17
- package/dist/chunk-3kfn00we.js.map +0 -10
- package/dist/chunk-k2na62sa.js.map +0 -19
- package/dist/chunk-m2rmbshc.js.map +0 -10
|
@@ -12,6 +12,7 @@ import { client } from "../client.gen"
|
|
|
12
12
|
import {
|
|
13
13
|
abortFileUpload,
|
|
14
14
|
addAgentThreadParticipants,
|
|
15
|
+
addArtifactComment,
|
|
15
16
|
addConnectorConnection,
|
|
16
17
|
cancelAgentRun,
|
|
17
18
|
cancelAgentRunById,
|
|
@@ -35,6 +36,7 @@ import {
|
|
|
35
36
|
deleteAgentMemory,
|
|
36
37
|
deleteAiLimitPolicy,
|
|
37
38
|
deleteArtifact,
|
|
39
|
+
deleteArtifactComment,
|
|
38
40
|
deleteArtifactStateValue,
|
|
39
41
|
disableAuthServiceAccount,
|
|
40
42
|
disconnectConnectorConnection,
|
|
@@ -43,6 +45,7 @@ import {
|
|
|
43
45
|
existsObjects,
|
|
44
46
|
facetObjects,
|
|
45
47
|
forkAgentThread,
|
|
48
|
+
freezeArtifactVersion,
|
|
46
49
|
generateImages,
|
|
47
50
|
generateSpeech,
|
|
48
51
|
generateText,
|
|
@@ -67,8 +70,12 @@ import {
|
|
|
67
70
|
getAiModelCallFileContent,
|
|
68
71
|
getAiModelCallFiles,
|
|
69
72
|
getArtifact,
|
|
73
|
+
getArtifactBoardPreview,
|
|
70
74
|
getArtifactFileContent,
|
|
75
|
+
getArtifactPdf,
|
|
71
76
|
getArtifactQuery,
|
|
77
|
+
getArtifactRestorePoint,
|
|
78
|
+
getArtifactRestorePointFileContent,
|
|
72
79
|
getArtifactState,
|
|
73
80
|
getArtifactVersion,
|
|
74
81
|
getAuthAccessManagementOptions,
|
|
@@ -82,6 +89,7 @@ import {
|
|
|
82
89
|
getDataset,
|
|
83
90
|
getDatasetVersion,
|
|
84
91
|
getDatasetVersionLineage,
|
|
92
|
+
getLakeHealth,
|
|
85
93
|
getLatestTelemetry,
|
|
86
94
|
getObject,
|
|
87
95
|
getObjectByUniqueProperty,
|
|
@@ -117,15 +125,20 @@ import {
|
|
|
117
125
|
listActivityUsers,
|
|
118
126
|
listActivityVisits,
|
|
119
127
|
listAgentApprovals,
|
|
128
|
+
listAgentComputers,
|
|
120
129
|
listAgentMemoryRevisions,
|
|
121
130
|
listAgentThreadApprovals,
|
|
122
131
|
listAgentThreadChildren,
|
|
132
|
+
listAgentThreadInbox,
|
|
123
133
|
listAgentThreadMessages,
|
|
124
134
|
listAgentThreadRuns,
|
|
125
135
|
listAgentThreads,
|
|
126
136
|
listAiLimitPolicies,
|
|
127
137
|
listAiModelCallGroups,
|
|
128
138
|
listAiModelCalls,
|
|
139
|
+
listArtifactComments,
|
|
140
|
+
listArtifactHolders,
|
|
141
|
+
listArtifactRestorePoints,
|
|
129
142
|
listArtifacts,
|
|
130
143
|
listAuthAccessTokens,
|
|
131
144
|
listAuthInvitations,
|
|
@@ -165,7 +178,7 @@ import {
|
|
|
165
178
|
moveAgentThreadToComputer,
|
|
166
179
|
type Options,
|
|
167
180
|
postAgentThreadMessage,
|
|
168
|
-
|
|
181
|
+
printArtifactPdf,
|
|
169
182
|
queryObjectLinks,
|
|
170
183
|
queryObjects,
|
|
171
184
|
reactivateAuthMember,
|
|
@@ -178,6 +191,9 @@ import {
|
|
|
178
191
|
requestPipelineRun,
|
|
179
192
|
requestSyncRun,
|
|
180
193
|
requestWorkflowRun,
|
|
194
|
+
resolveArtifactComment,
|
|
195
|
+
restoreAgentThreadSandbox,
|
|
196
|
+
restoreArtifact,
|
|
181
197
|
retryAgentRun,
|
|
182
198
|
revokeAuthAccessToken,
|
|
183
199
|
revokeAuthInvitation,
|
|
@@ -190,6 +206,7 @@ import {
|
|
|
190
206
|
selectConnectorConnectionRunAccount,
|
|
191
207
|
setAgentThreadApprovalMode,
|
|
192
208
|
setArtifactState,
|
|
209
|
+
setSharedAccessGuestName,
|
|
193
210
|
signFileUploadPart,
|
|
194
211
|
signOut,
|
|
195
212
|
signOutAll,
|
|
@@ -200,11 +217,14 @@ import {
|
|
|
200
217
|
suspendAuthMember,
|
|
201
218
|
transcribeAudio,
|
|
202
219
|
updateAgentPreferences,
|
|
220
|
+
updateAgentThreadInboxItem,
|
|
203
221
|
updateAiLimitPolicy,
|
|
222
|
+
updateArtifact,
|
|
204
223
|
updateAuthMemberGroups,
|
|
205
224
|
updateAuthProfile,
|
|
206
225
|
uploadFileContent,
|
|
207
226
|
uploadFileRaw,
|
|
227
|
+
withdrawAgentThreadInboxItem,
|
|
208
228
|
} from "../sdk.gen"
|
|
209
229
|
import type {
|
|
210
230
|
AbortFileUploadData,
|
|
@@ -213,6 +233,9 @@ import type {
|
|
|
213
233
|
AddAgentThreadParticipantsData,
|
|
214
234
|
AddAgentThreadParticipantsError,
|
|
215
235
|
AddAgentThreadParticipantsResponse,
|
|
236
|
+
AddArtifactCommentData,
|
|
237
|
+
AddArtifactCommentError,
|
|
238
|
+
AddArtifactCommentResponse,
|
|
216
239
|
AddConnectorConnectionData,
|
|
217
240
|
AddConnectorConnectionError,
|
|
218
241
|
AddConnectorConnectionResponse,
|
|
@@ -279,6 +302,9 @@ import type {
|
|
|
279
302
|
DeleteAiLimitPolicyData,
|
|
280
303
|
DeleteAiLimitPolicyError,
|
|
281
304
|
DeleteAiLimitPolicyResponse,
|
|
305
|
+
DeleteArtifactCommentData,
|
|
306
|
+
DeleteArtifactCommentError,
|
|
307
|
+
DeleteArtifactCommentResponse,
|
|
282
308
|
DeleteArtifactData,
|
|
283
309
|
DeleteArtifactError,
|
|
284
310
|
DeleteArtifactResponse,
|
|
@@ -305,6 +331,9 @@ import type {
|
|
|
305
331
|
ForkAgentThreadData,
|
|
306
332
|
ForkAgentThreadError,
|
|
307
333
|
ForkAgentThreadResponse,
|
|
334
|
+
FreezeArtifactVersionData,
|
|
335
|
+
FreezeArtifactVersionError,
|
|
336
|
+
FreezeArtifactVersionResponse,
|
|
308
337
|
GenerateImagesData,
|
|
309
338
|
GenerateImagesError,
|
|
310
339
|
GenerateImagesResponse,
|
|
@@ -374,15 +403,27 @@ import type {
|
|
|
374
403
|
GetAiModelCallFilesData,
|
|
375
404
|
GetAiModelCallFilesError,
|
|
376
405
|
GetAiModelCallFilesResponse,
|
|
406
|
+
GetArtifactBoardPreviewData,
|
|
407
|
+
GetArtifactBoardPreviewError,
|
|
408
|
+
GetArtifactBoardPreviewResponse,
|
|
377
409
|
GetArtifactData,
|
|
378
410
|
GetArtifactError,
|
|
379
411
|
GetArtifactFileContentData,
|
|
380
412
|
GetArtifactFileContentError,
|
|
381
413
|
GetArtifactFileContentResponse,
|
|
414
|
+
GetArtifactPdfData,
|
|
415
|
+
GetArtifactPdfError,
|
|
416
|
+
GetArtifactPdfResponse,
|
|
382
417
|
GetArtifactQueryData,
|
|
383
418
|
GetArtifactQueryError,
|
|
384
419
|
GetArtifactQueryResponse,
|
|
385
420
|
GetArtifactResponse,
|
|
421
|
+
GetArtifactRestorePointData,
|
|
422
|
+
GetArtifactRestorePointError,
|
|
423
|
+
GetArtifactRestorePointFileContentData,
|
|
424
|
+
GetArtifactRestorePointFileContentError,
|
|
425
|
+
GetArtifactRestorePointFileContentResponse,
|
|
426
|
+
GetArtifactRestorePointResponse,
|
|
386
427
|
GetArtifactStateData,
|
|
387
428
|
GetArtifactStateError,
|
|
388
429
|
GetArtifactStateResponse,
|
|
@@ -421,6 +462,9 @@ import type {
|
|
|
421
462
|
GetDatasetVersionLineageError,
|
|
422
463
|
GetDatasetVersionLineageResponse,
|
|
423
464
|
GetDatasetVersionResponse,
|
|
465
|
+
GetLakeHealthData,
|
|
466
|
+
GetLakeHealthError,
|
|
467
|
+
GetLakeHealthResponse,
|
|
424
468
|
GetLatestTelemetryData,
|
|
425
469
|
GetLatestTelemetryError,
|
|
426
470
|
GetLatestTelemetryResponse,
|
|
@@ -523,6 +567,9 @@ import type {
|
|
|
523
567
|
ListAgentApprovalsData,
|
|
524
568
|
ListAgentApprovalsError,
|
|
525
569
|
ListAgentApprovalsResponse,
|
|
570
|
+
ListAgentComputersData,
|
|
571
|
+
ListAgentComputersError,
|
|
572
|
+
ListAgentComputersResponse,
|
|
526
573
|
ListAgentMemoryRevisionsData,
|
|
527
574
|
ListAgentMemoryRevisionsError,
|
|
528
575
|
ListAgentMemoryRevisionsResponse,
|
|
@@ -532,6 +579,9 @@ import type {
|
|
|
532
579
|
ListAgentThreadChildrenData,
|
|
533
580
|
ListAgentThreadChildrenError,
|
|
534
581
|
ListAgentThreadChildrenResponse,
|
|
582
|
+
ListAgentThreadInboxData,
|
|
583
|
+
ListAgentThreadInboxError,
|
|
584
|
+
ListAgentThreadInboxResponse,
|
|
535
585
|
ListAgentThreadMessagesData,
|
|
536
586
|
ListAgentThreadMessagesError,
|
|
537
587
|
ListAgentThreadMessagesResponse,
|
|
@@ -550,6 +600,15 @@ import type {
|
|
|
550
600
|
ListAiModelCallsData,
|
|
551
601
|
ListAiModelCallsError,
|
|
552
602
|
ListAiModelCallsResponse,
|
|
603
|
+
ListArtifactCommentsData,
|
|
604
|
+
ListArtifactCommentsError,
|
|
605
|
+
ListArtifactCommentsResponse,
|
|
606
|
+
ListArtifactHoldersData,
|
|
607
|
+
ListArtifactHoldersError,
|
|
608
|
+
ListArtifactHoldersResponse,
|
|
609
|
+
ListArtifactRestorePointsData,
|
|
610
|
+
ListArtifactRestorePointsError,
|
|
611
|
+
ListArtifactRestorePointsResponse,
|
|
553
612
|
ListArtifactsData,
|
|
554
613
|
ListArtifactsError,
|
|
555
614
|
ListArtifactsResponse,
|
|
@@ -656,9 +715,9 @@ import type {
|
|
|
656
715
|
PostAgentThreadMessageData,
|
|
657
716
|
PostAgentThreadMessageError,
|
|
658
717
|
PostAgentThreadMessageResponse,
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
718
|
+
PrintArtifactPdfData,
|
|
719
|
+
PrintArtifactPdfError,
|
|
720
|
+
PrintArtifactPdfResponse,
|
|
662
721
|
QueryObjectLinksData,
|
|
663
722
|
QueryObjectLinksError,
|
|
664
723
|
QueryObjectLinksResponse,
|
|
@@ -693,6 +752,15 @@ import type {
|
|
|
693
752
|
RequestWorkflowRunData,
|
|
694
753
|
RequestWorkflowRunError,
|
|
695
754
|
RequestWorkflowRunResponse,
|
|
755
|
+
ResolveArtifactCommentData,
|
|
756
|
+
ResolveArtifactCommentError,
|
|
757
|
+
ResolveArtifactCommentResponse,
|
|
758
|
+
RestoreAgentThreadSandboxData,
|
|
759
|
+
RestoreAgentThreadSandboxError,
|
|
760
|
+
RestoreAgentThreadSandboxResponse,
|
|
761
|
+
RestoreArtifactData,
|
|
762
|
+
RestoreArtifactError,
|
|
763
|
+
RestoreArtifactResponse,
|
|
696
764
|
RetryAgentRunData,
|
|
697
765
|
RetryAgentRunError,
|
|
698
766
|
RetryAgentRunResponse,
|
|
@@ -729,6 +797,9 @@ import type {
|
|
|
729
797
|
SetArtifactStateData,
|
|
730
798
|
SetArtifactStateError,
|
|
731
799
|
SetArtifactStateResponse,
|
|
800
|
+
SetSharedAccessGuestNameData,
|
|
801
|
+
SetSharedAccessGuestNameError,
|
|
802
|
+
SetSharedAccessGuestNameResponse,
|
|
732
803
|
SignFileUploadPartData,
|
|
733
804
|
SignFileUploadPartError,
|
|
734
805
|
SignFileUploadPartResponse,
|
|
@@ -759,9 +830,15 @@ import type {
|
|
|
759
830
|
UpdateAgentPreferencesData,
|
|
760
831
|
UpdateAgentPreferencesError,
|
|
761
832
|
UpdateAgentPreferencesResponse,
|
|
833
|
+
UpdateAgentThreadInboxItemData,
|
|
834
|
+
UpdateAgentThreadInboxItemError,
|
|
835
|
+
UpdateAgentThreadInboxItemResponse,
|
|
762
836
|
UpdateAiLimitPolicyData,
|
|
763
837
|
UpdateAiLimitPolicyError,
|
|
764
838
|
UpdateAiLimitPolicyResponse,
|
|
839
|
+
UpdateArtifactData,
|
|
840
|
+
UpdateArtifactError,
|
|
841
|
+
UpdateArtifactResponse,
|
|
765
842
|
UpdateAuthMemberGroupsData,
|
|
766
843
|
UpdateAuthMemberGroupsError,
|
|
767
844
|
UpdateAuthMemberGroupsResponse,
|
|
@@ -774,6 +851,8 @@ import type {
|
|
|
774
851
|
UploadFileRawData,
|
|
775
852
|
UploadFileRawError,
|
|
776
853
|
UploadFileRawResponse,
|
|
854
|
+
WithdrawAgentThreadInboxItemData,
|
|
855
|
+
WithdrawAgentThreadInboxItemError,
|
|
777
856
|
} from "../types.gen"
|
|
778
857
|
|
|
779
858
|
/**
|
|
@@ -2698,6 +2777,31 @@ export const listDatasetRowsInfiniteOptions = (options: Options<ListDatasetRowsD
|
|
|
2698
2777
|
}
|
|
2699
2778
|
)
|
|
2700
2779
|
|
|
2780
|
+
export const getLakeHealthQueryKey = (options?: Options<GetLakeHealthData>) =>
|
|
2781
|
+
createQueryKey("getLakeHealth", options)
|
|
2782
|
+
|
|
2783
|
+
/**
|
|
2784
|
+
* Describe how the lake stores each dataset, and what its retention does
|
|
2785
|
+
*/
|
|
2786
|
+
export const getLakeHealthOptions = (options?: Options<GetLakeHealthData>) =>
|
|
2787
|
+
queryOptions<
|
|
2788
|
+
GetLakeHealthResponse,
|
|
2789
|
+
GetLakeHealthError,
|
|
2790
|
+
GetLakeHealthResponse,
|
|
2791
|
+
ReturnType<typeof getLakeHealthQueryKey>
|
|
2792
|
+
>({
|
|
2793
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
2794
|
+
const { data } = await getLakeHealth({
|
|
2795
|
+
...options,
|
|
2796
|
+
...queryKey[0],
|
|
2797
|
+
signal,
|
|
2798
|
+
throwOnError: true,
|
|
2799
|
+
})
|
|
2800
|
+
return data
|
|
2801
|
+
},
|
|
2802
|
+
queryKey: getLakeHealthQueryKey(options),
|
|
2803
|
+
})
|
|
2804
|
+
|
|
2701
2805
|
export const listSyncsQueryKey = (options?: Options<ListSyncsData>) =>
|
|
2702
2806
|
createQueryKey("listSyncs", options)
|
|
2703
2807
|
|
|
@@ -3729,6 +3833,35 @@ export const getSharedAccessSessionOptions = (options: Options<GetSharedAccessSe
|
|
|
3729
3833
|
queryKey: getSharedAccessSessionQueryKey(options),
|
|
3730
3834
|
})
|
|
3731
3835
|
|
|
3836
|
+
/**
|
|
3837
|
+
* Name a shared-access session's visitor
|
|
3838
|
+
*
|
|
3839
|
+
* 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.
|
|
3840
|
+
*/
|
|
3841
|
+
export const setSharedAccessGuestNameMutation = (
|
|
3842
|
+
options?: Partial<Options<SetSharedAccessGuestNameData>>
|
|
3843
|
+
): UseMutationOptions<
|
|
3844
|
+
SetSharedAccessGuestNameResponse,
|
|
3845
|
+
SetSharedAccessGuestNameError,
|
|
3846
|
+
Options<SetSharedAccessGuestNameData>
|
|
3847
|
+
> => {
|
|
3848
|
+
const mutationOptions: UseMutationOptions<
|
|
3849
|
+
SetSharedAccessGuestNameResponse,
|
|
3850
|
+
SetSharedAccessGuestNameError,
|
|
3851
|
+
Options<SetSharedAccessGuestNameData>
|
|
3852
|
+
> = {
|
|
3853
|
+
mutationFn: async (fnOptions) => {
|
|
3854
|
+
const { data } = await setSharedAccessGuestName({
|
|
3855
|
+
...options,
|
|
3856
|
+
...fnOptions,
|
|
3857
|
+
throwOnError: true,
|
|
3858
|
+
})
|
|
3859
|
+
return data
|
|
3860
|
+
},
|
|
3861
|
+
}
|
|
3862
|
+
return mutationOptions
|
|
3863
|
+
}
|
|
3864
|
+
|
|
3732
3865
|
/**
|
|
3733
3866
|
* Sign out a shared-access session
|
|
3734
3867
|
*/
|
|
@@ -4732,6 +4865,33 @@ export const recreateAgentThreadSandboxMutation = (
|
|
|
4732
4865
|
return mutationOptions
|
|
4733
4866
|
}
|
|
4734
4867
|
|
|
4868
|
+
/**
|
|
4869
|
+
* Explicitly go on in the workspace a failed save left, with its files as they were
|
|
4870
|
+
*/
|
|
4871
|
+
export const restoreAgentThreadSandboxMutation = (
|
|
4872
|
+
options?: Partial<Options<RestoreAgentThreadSandboxData>>
|
|
4873
|
+
): UseMutationOptions<
|
|
4874
|
+
RestoreAgentThreadSandboxResponse,
|
|
4875
|
+
RestoreAgentThreadSandboxError,
|
|
4876
|
+
Options<RestoreAgentThreadSandboxData>
|
|
4877
|
+
> => {
|
|
4878
|
+
const mutationOptions: UseMutationOptions<
|
|
4879
|
+
RestoreAgentThreadSandboxResponse,
|
|
4880
|
+
RestoreAgentThreadSandboxError,
|
|
4881
|
+
Options<RestoreAgentThreadSandboxData>
|
|
4882
|
+
> = {
|
|
4883
|
+
mutationFn: async (fnOptions) => {
|
|
4884
|
+
const { data } = await restoreAgentThreadSandbox({
|
|
4885
|
+
...options,
|
|
4886
|
+
...fnOptions,
|
|
4887
|
+
throwOnError: true,
|
|
4888
|
+
})
|
|
4889
|
+
return data
|
|
4890
|
+
},
|
|
4891
|
+
}
|
|
4892
|
+
return mutationOptions
|
|
4893
|
+
}
|
|
4894
|
+
|
|
4735
4895
|
export const listAgentThreadMessagesQueryKey = (options: Options<ListAgentThreadMessagesData>) =>
|
|
4736
4896
|
createQueryKey("listAgentThreadMessages", options)
|
|
4737
4897
|
|
|
@@ -4859,6 +5019,85 @@ export const getAgentMessageFileContentOptions = (
|
|
|
4859
5019
|
queryKey: getAgentMessageFileContentQueryKey(options),
|
|
4860
5020
|
})
|
|
4861
5021
|
|
|
5022
|
+
export const listAgentThreadInboxQueryKey = (options: Options<ListAgentThreadInboxData>) =>
|
|
5023
|
+
createQueryKey("listAgentThreadInbox", options)
|
|
5024
|
+
|
|
5025
|
+
/**
|
|
5026
|
+
* List agent thread inbox messages
|
|
5027
|
+
*/
|
|
5028
|
+
export const listAgentThreadInboxOptions = (options: Options<ListAgentThreadInboxData>) =>
|
|
5029
|
+
queryOptions<
|
|
5030
|
+
ListAgentThreadInboxResponse,
|
|
5031
|
+
ListAgentThreadInboxError,
|
|
5032
|
+
ListAgentThreadInboxResponse,
|
|
5033
|
+
ReturnType<typeof listAgentThreadInboxQueryKey>
|
|
5034
|
+
>({
|
|
5035
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
5036
|
+
const { data } = await listAgentThreadInbox({
|
|
5037
|
+
...options,
|
|
5038
|
+
...queryKey[0],
|
|
5039
|
+
signal,
|
|
5040
|
+
throwOnError: true,
|
|
5041
|
+
})
|
|
5042
|
+
return data
|
|
5043
|
+
},
|
|
5044
|
+
queryKey: listAgentThreadInboxQueryKey(options),
|
|
5045
|
+
})
|
|
5046
|
+
|
|
5047
|
+
/**
|
|
5048
|
+
* Withdraw a waiting agent thread message
|
|
5049
|
+
*/
|
|
5050
|
+
export const withdrawAgentThreadInboxItemMutation = (
|
|
5051
|
+
options?: Partial<Options<WithdrawAgentThreadInboxItemData>>
|
|
5052
|
+
): UseMutationOptions<
|
|
5053
|
+
unknown,
|
|
5054
|
+
WithdrawAgentThreadInboxItemError,
|
|
5055
|
+
Options<WithdrawAgentThreadInboxItemData>
|
|
5056
|
+
> => {
|
|
5057
|
+
const mutationOptions: UseMutationOptions<
|
|
5058
|
+
unknown,
|
|
5059
|
+
WithdrawAgentThreadInboxItemError,
|
|
5060
|
+
Options<WithdrawAgentThreadInboxItemData>
|
|
5061
|
+
> = {
|
|
5062
|
+
mutationFn: async (fnOptions) => {
|
|
5063
|
+
const { data } = await withdrawAgentThreadInboxItem({
|
|
5064
|
+
...options,
|
|
5065
|
+
...fnOptions,
|
|
5066
|
+
throwOnError: true,
|
|
5067
|
+
})
|
|
5068
|
+
return data
|
|
5069
|
+
},
|
|
5070
|
+
}
|
|
5071
|
+
return mutationOptions
|
|
5072
|
+
}
|
|
5073
|
+
|
|
5074
|
+
/**
|
|
5075
|
+
* Update a waiting agent thread message
|
|
5076
|
+
*/
|
|
5077
|
+
export const updateAgentThreadInboxItemMutation = (
|
|
5078
|
+
options?: Partial<Options<UpdateAgentThreadInboxItemData>>
|
|
5079
|
+
): UseMutationOptions<
|
|
5080
|
+
UpdateAgentThreadInboxItemResponse,
|
|
5081
|
+
UpdateAgentThreadInboxItemError,
|
|
5082
|
+
Options<UpdateAgentThreadInboxItemData>
|
|
5083
|
+
> => {
|
|
5084
|
+
const mutationOptions: UseMutationOptions<
|
|
5085
|
+
UpdateAgentThreadInboxItemResponse,
|
|
5086
|
+
UpdateAgentThreadInboxItemError,
|
|
5087
|
+
Options<UpdateAgentThreadInboxItemData>
|
|
5088
|
+
> = {
|
|
5089
|
+
mutationFn: async (fnOptions) => {
|
|
5090
|
+
const { data } = await updateAgentThreadInboxItem({
|
|
5091
|
+
...options,
|
|
5092
|
+
...fnOptions,
|
|
5093
|
+
throwOnError: true,
|
|
5094
|
+
})
|
|
5095
|
+
return data
|
|
5096
|
+
},
|
|
5097
|
+
}
|
|
5098
|
+
return mutationOptions
|
|
5099
|
+
}
|
|
5100
|
+
|
|
4862
5101
|
/**
|
|
4863
5102
|
* Cancel an agent thread's active run
|
|
4864
5103
|
*
|
|
@@ -5116,6 +5355,33 @@ export const getAgentChildFileContentOptions = (options: Options<GetAgentChildFi
|
|
|
5116
5355
|
queryKey: getAgentChildFileContentQueryKey(options),
|
|
5117
5356
|
})
|
|
5118
5357
|
|
|
5358
|
+
export const listAgentComputersQueryKey = (options?: Options<ListAgentComputersData>) =>
|
|
5359
|
+
createQueryKey("listAgentComputers", options)
|
|
5360
|
+
|
|
5361
|
+
/**
|
|
5362
|
+
* List your computers with sixb open now
|
|
5363
|
+
*
|
|
5364
|
+
* 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.
|
|
5365
|
+
*/
|
|
5366
|
+
export const listAgentComputersOptions = (options?: Options<ListAgentComputersData>) =>
|
|
5367
|
+
queryOptions<
|
|
5368
|
+
ListAgentComputersResponse,
|
|
5369
|
+
ListAgentComputersError,
|
|
5370
|
+
ListAgentComputersResponse,
|
|
5371
|
+
ReturnType<typeof listAgentComputersQueryKey>
|
|
5372
|
+
>({
|
|
5373
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
5374
|
+
const { data } = await listAgentComputers({
|
|
5375
|
+
...options,
|
|
5376
|
+
...queryKey[0],
|
|
5377
|
+
signal,
|
|
5378
|
+
throwOnError: true,
|
|
5379
|
+
})
|
|
5380
|
+
return data
|
|
5381
|
+
},
|
|
5382
|
+
queryKey: listAgentComputersQueryKey(options),
|
|
5383
|
+
})
|
|
5384
|
+
|
|
5119
5385
|
/**
|
|
5120
5386
|
* Move a thread from your computer to the cloud
|
|
5121
5387
|
*
|
|
@@ -6117,6 +6383,33 @@ export const getArtifactOptions = (options: Options<GetArtifactData>) =>
|
|
|
6117
6383
|
queryKey: getArtifactQueryKey(options),
|
|
6118
6384
|
})
|
|
6119
6385
|
|
|
6386
|
+
export const listArtifactHoldersQueryKey = (options: Options<ListArtifactHoldersData>) =>
|
|
6387
|
+
createQueryKey("listArtifactHolders", options)
|
|
6388
|
+
|
|
6389
|
+
/**
|
|
6390
|
+
* List the objects that hold an artifact
|
|
6391
|
+
*
|
|
6392
|
+
* 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.
|
|
6393
|
+
*/
|
|
6394
|
+
export const listArtifactHoldersOptions = (options: Options<ListArtifactHoldersData>) =>
|
|
6395
|
+
queryOptions<
|
|
6396
|
+
ListArtifactHoldersResponse,
|
|
6397
|
+
ListArtifactHoldersError,
|
|
6398
|
+
ListArtifactHoldersResponse,
|
|
6399
|
+
ReturnType<typeof listArtifactHoldersQueryKey>
|
|
6400
|
+
>({
|
|
6401
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
6402
|
+
const { data } = await listArtifactHolders({
|
|
6403
|
+
...options,
|
|
6404
|
+
...queryKey[0],
|
|
6405
|
+
signal,
|
|
6406
|
+
throwOnError: true,
|
|
6407
|
+
})
|
|
6408
|
+
return data
|
|
6409
|
+
},
|
|
6410
|
+
queryKey: listArtifactHoldersQueryKey(options),
|
|
6411
|
+
})
|
|
6412
|
+
|
|
6120
6413
|
/**
|
|
6121
6414
|
* Reset what a page keeps
|
|
6122
6415
|
*
|
|
@@ -6230,24 +6523,275 @@ export const setArtifactStateMutation = (
|
|
|
6230
6523
|
}
|
|
6231
6524
|
|
|
6232
6525
|
/**
|
|
6233
|
-
*
|
|
6526
|
+
* Update an artifact
|
|
6527
|
+
*
|
|
6528
|
+
* 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.
|
|
6529
|
+
*/
|
|
6530
|
+
export const updateArtifactMutation = (
|
|
6531
|
+
options?: Partial<Options<UpdateArtifactData>>
|
|
6532
|
+
): UseMutationOptions<UpdateArtifactResponse, UpdateArtifactError, Options<UpdateArtifactData>> => {
|
|
6533
|
+
const mutationOptions: UseMutationOptions<
|
|
6534
|
+
UpdateArtifactResponse,
|
|
6535
|
+
UpdateArtifactError,
|
|
6536
|
+
Options<UpdateArtifactData>
|
|
6537
|
+
> = {
|
|
6538
|
+
mutationFn: async (fnOptions) => {
|
|
6539
|
+
const { data } = await updateArtifact({
|
|
6540
|
+
...options,
|
|
6541
|
+
...fnOptions,
|
|
6542
|
+
throwOnError: true,
|
|
6543
|
+
})
|
|
6544
|
+
return data
|
|
6545
|
+
},
|
|
6546
|
+
}
|
|
6547
|
+
return mutationOptions
|
|
6548
|
+
}
|
|
6549
|
+
|
|
6550
|
+
/**
|
|
6551
|
+
* Create a version
|
|
6234
6552
|
*
|
|
6235
|
-
*
|
|
6553
|
+
* 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.
|
|
6236
6554
|
*/
|
|
6237
|
-
export const
|
|
6238
|
-
options?: Partial<Options<
|
|
6555
|
+
export const freezeArtifactVersionMutation = (
|
|
6556
|
+
options?: Partial<Options<FreezeArtifactVersionData>>
|
|
6239
6557
|
): UseMutationOptions<
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
Options<
|
|
6558
|
+
FreezeArtifactVersionResponse,
|
|
6559
|
+
FreezeArtifactVersionError,
|
|
6560
|
+
Options<FreezeArtifactVersionData>
|
|
6243
6561
|
> => {
|
|
6244
6562
|
const mutationOptions: UseMutationOptions<
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
Options<
|
|
6563
|
+
FreezeArtifactVersionResponse,
|
|
6564
|
+
FreezeArtifactVersionError,
|
|
6565
|
+
Options<FreezeArtifactVersionData>
|
|
6248
6566
|
> = {
|
|
6249
6567
|
mutationFn: async (fnOptions) => {
|
|
6250
|
-
const { data } = await
|
|
6568
|
+
const { data } = await freezeArtifactVersion({
|
|
6569
|
+
...options,
|
|
6570
|
+
...fnOptions,
|
|
6571
|
+
throwOnError: true,
|
|
6572
|
+
})
|
|
6573
|
+
return data
|
|
6574
|
+
},
|
|
6575
|
+
}
|
|
6576
|
+
return mutationOptions
|
|
6577
|
+
}
|
|
6578
|
+
|
|
6579
|
+
export const listArtifactCommentsQueryKey = (options: Options<ListArtifactCommentsData>) =>
|
|
6580
|
+
createQueryKey("listArtifactComments", options)
|
|
6581
|
+
|
|
6582
|
+
/**
|
|
6583
|
+
* List an artifact's comments
|
|
6584
|
+
*
|
|
6585
|
+
* 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.
|
|
6586
|
+
*/
|
|
6587
|
+
export const listArtifactCommentsOptions = (options: Options<ListArtifactCommentsData>) =>
|
|
6588
|
+
queryOptions<
|
|
6589
|
+
ListArtifactCommentsResponse,
|
|
6590
|
+
ListArtifactCommentsError,
|
|
6591
|
+
ListArtifactCommentsResponse,
|
|
6592
|
+
ReturnType<typeof listArtifactCommentsQueryKey>
|
|
6593
|
+
>({
|
|
6594
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
6595
|
+
const { data } = await listArtifactComments({
|
|
6596
|
+
...options,
|
|
6597
|
+
...queryKey[0],
|
|
6598
|
+
signal,
|
|
6599
|
+
throwOnError: true,
|
|
6600
|
+
})
|
|
6601
|
+
return data
|
|
6602
|
+
},
|
|
6603
|
+
queryKey: listArtifactCommentsQueryKey(options),
|
|
6604
|
+
})
|
|
6605
|
+
|
|
6606
|
+
/**
|
|
6607
|
+
* Comment on an artifact
|
|
6608
|
+
*
|
|
6609
|
+
* 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.
|
|
6610
|
+
*/
|
|
6611
|
+
export const addArtifactCommentMutation = (
|
|
6612
|
+
options?: Partial<Options<AddArtifactCommentData>>
|
|
6613
|
+
): UseMutationOptions<
|
|
6614
|
+
AddArtifactCommentResponse,
|
|
6615
|
+
AddArtifactCommentError,
|
|
6616
|
+
Options<AddArtifactCommentData>
|
|
6617
|
+
> => {
|
|
6618
|
+
const mutationOptions: UseMutationOptions<
|
|
6619
|
+
AddArtifactCommentResponse,
|
|
6620
|
+
AddArtifactCommentError,
|
|
6621
|
+
Options<AddArtifactCommentData>
|
|
6622
|
+
> = {
|
|
6623
|
+
mutationFn: async (fnOptions) => {
|
|
6624
|
+
const { data } = await addArtifactComment({
|
|
6625
|
+
...options,
|
|
6626
|
+
...fnOptions,
|
|
6627
|
+
throwOnError: true,
|
|
6628
|
+
})
|
|
6629
|
+
return data
|
|
6630
|
+
},
|
|
6631
|
+
}
|
|
6632
|
+
return mutationOptions
|
|
6633
|
+
}
|
|
6634
|
+
|
|
6635
|
+
/**
|
|
6636
|
+
* Resolve an artifact's comment
|
|
6637
|
+
*
|
|
6638
|
+
* 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.
|
|
6639
|
+
*/
|
|
6640
|
+
export const resolveArtifactCommentMutation = (
|
|
6641
|
+
options?: Partial<Options<ResolveArtifactCommentData>>
|
|
6642
|
+
): UseMutationOptions<
|
|
6643
|
+
ResolveArtifactCommentResponse,
|
|
6644
|
+
ResolveArtifactCommentError,
|
|
6645
|
+
Options<ResolveArtifactCommentData>
|
|
6646
|
+
> => {
|
|
6647
|
+
const mutationOptions: UseMutationOptions<
|
|
6648
|
+
ResolveArtifactCommentResponse,
|
|
6649
|
+
ResolveArtifactCommentError,
|
|
6650
|
+
Options<ResolveArtifactCommentData>
|
|
6651
|
+
> = {
|
|
6652
|
+
mutationFn: async (fnOptions) => {
|
|
6653
|
+
const { data } = await resolveArtifactComment({
|
|
6654
|
+
...options,
|
|
6655
|
+
...fnOptions,
|
|
6656
|
+
throwOnError: true,
|
|
6657
|
+
})
|
|
6658
|
+
return data
|
|
6659
|
+
},
|
|
6660
|
+
}
|
|
6661
|
+
return mutationOptions
|
|
6662
|
+
}
|
|
6663
|
+
|
|
6664
|
+
/**
|
|
6665
|
+
* Delete an artifact's comment
|
|
6666
|
+
*
|
|
6667
|
+
* Deletes the comment and its replies. Its author, or whoever may update the artifact, may.
|
|
6668
|
+
*/
|
|
6669
|
+
export const deleteArtifactCommentMutation = (
|
|
6670
|
+
options?: Partial<Options<DeleteArtifactCommentData>>
|
|
6671
|
+
): UseMutationOptions<
|
|
6672
|
+
DeleteArtifactCommentResponse,
|
|
6673
|
+
DeleteArtifactCommentError,
|
|
6674
|
+
Options<DeleteArtifactCommentData>
|
|
6675
|
+
> => {
|
|
6676
|
+
const mutationOptions: UseMutationOptions<
|
|
6677
|
+
DeleteArtifactCommentResponse,
|
|
6678
|
+
DeleteArtifactCommentError,
|
|
6679
|
+
Options<DeleteArtifactCommentData>
|
|
6680
|
+
> = {
|
|
6681
|
+
mutationFn: async (fnOptions) => {
|
|
6682
|
+
const { data } = await deleteArtifactComment({
|
|
6683
|
+
...options,
|
|
6684
|
+
...fnOptions,
|
|
6685
|
+
throwOnError: true,
|
|
6686
|
+
})
|
|
6687
|
+
return data
|
|
6688
|
+
},
|
|
6689
|
+
}
|
|
6690
|
+
return mutationOptions
|
|
6691
|
+
}
|
|
6692
|
+
|
|
6693
|
+
export const listArtifactRestorePointsQueryKey = (
|
|
6694
|
+
options: Options<ListArtifactRestorePointsData>
|
|
6695
|
+
) => createQueryKey("listArtifactRestorePoints", options)
|
|
6696
|
+
|
|
6697
|
+
/**
|
|
6698
|
+
* List an artifact's restore points
|
|
6699
|
+
*
|
|
6700
|
+
* 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.
|
|
6701
|
+
*/
|
|
6702
|
+
export const listArtifactRestorePointsOptions = (options: Options<ListArtifactRestorePointsData>) =>
|
|
6703
|
+
queryOptions<
|
|
6704
|
+
ListArtifactRestorePointsResponse,
|
|
6705
|
+
ListArtifactRestorePointsError,
|
|
6706
|
+
ListArtifactRestorePointsResponse,
|
|
6707
|
+
ReturnType<typeof listArtifactRestorePointsQueryKey>
|
|
6708
|
+
>({
|
|
6709
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
6710
|
+
const { data } = await listArtifactRestorePoints({
|
|
6711
|
+
...options,
|
|
6712
|
+
...queryKey[0],
|
|
6713
|
+
signal,
|
|
6714
|
+
throwOnError: true,
|
|
6715
|
+
})
|
|
6716
|
+
return data
|
|
6717
|
+
},
|
|
6718
|
+
queryKey: listArtifactRestorePointsQueryKey(options),
|
|
6719
|
+
})
|
|
6720
|
+
|
|
6721
|
+
export const getArtifactRestorePointQueryKey = (options: Options<GetArtifactRestorePointData>) =>
|
|
6722
|
+
createQueryKey("getArtifactRestorePoint", options)
|
|
6723
|
+
|
|
6724
|
+
/**
|
|
6725
|
+
* Get an artifact's restore point
|
|
6726
|
+
*
|
|
6727
|
+
* 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.
|
|
6728
|
+
*/
|
|
6729
|
+
export const getArtifactRestorePointOptions = (options: Options<GetArtifactRestorePointData>) =>
|
|
6730
|
+
queryOptions<
|
|
6731
|
+
GetArtifactRestorePointResponse,
|
|
6732
|
+
GetArtifactRestorePointError,
|
|
6733
|
+
GetArtifactRestorePointResponse,
|
|
6734
|
+
ReturnType<typeof getArtifactRestorePointQueryKey>
|
|
6735
|
+
>({
|
|
6736
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
6737
|
+
const { data } = await getArtifactRestorePoint({
|
|
6738
|
+
...options,
|
|
6739
|
+
...queryKey[0],
|
|
6740
|
+
signal,
|
|
6741
|
+
throwOnError: true,
|
|
6742
|
+
})
|
|
6743
|
+
return data
|
|
6744
|
+
},
|
|
6745
|
+
queryKey: getArtifactRestorePointQueryKey(options),
|
|
6746
|
+
})
|
|
6747
|
+
|
|
6748
|
+
export const getArtifactRestorePointFileContentQueryKey = (
|
|
6749
|
+
options: Options<GetArtifactRestorePointFileContentData>
|
|
6750
|
+
) => createQueryKey("getArtifactRestorePointFileContent", options)
|
|
6751
|
+
|
|
6752
|
+
/**
|
|
6753
|
+
* Get a file of an artifact's restore point
|
|
6754
|
+
*/
|
|
6755
|
+
export const getArtifactRestorePointFileContentOptions = (
|
|
6756
|
+
options: Options<GetArtifactRestorePointFileContentData>
|
|
6757
|
+
) =>
|
|
6758
|
+
queryOptions<
|
|
6759
|
+
GetArtifactRestorePointFileContentResponse,
|
|
6760
|
+
GetArtifactRestorePointFileContentError,
|
|
6761
|
+
GetArtifactRestorePointFileContentResponse,
|
|
6762
|
+
ReturnType<typeof getArtifactRestorePointFileContentQueryKey>
|
|
6763
|
+
>({
|
|
6764
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
6765
|
+
const { data } = await getArtifactRestorePointFileContent({
|
|
6766
|
+
...options,
|
|
6767
|
+
...queryKey[0],
|
|
6768
|
+
signal,
|
|
6769
|
+
throwOnError: true,
|
|
6770
|
+
})
|
|
6771
|
+
return data
|
|
6772
|
+
},
|
|
6773
|
+
queryKey: getArtifactRestorePointFileContentQueryKey(options),
|
|
6774
|
+
})
|
|
6775
|
+
|
|
6776
|
+
/**
|
|
6777
|
+
* Restore an artifact
|
|
6778
|
+
*
|
|
6779
|
+
* 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.
|
|
6780
|
+
*/
|
|
6781
|
+
export const restoreArtifactMutation = (
|
|
6782
|
+
options?: Partial<Options<RestoreArtifactData>>
|
|
6783
|
+
): UseMutationOptions<
|
|
6784
|
+
RestoreArtifactResponse,
|
|
6785
|
+
RestoreArtifactError,
|
|
6786
|
+
Options<RestoreArtifactData>
|
|
6787
|
+
> => {
|
|
6788
|
+
const mutationOptions: UseMutationOptions<
|
|
6789
|
+
RestoreArtifactResponse,
|
|
6790
|
+
RestoreArtifactError,
|
|
6791
|
+
Options<RestoreArtifactData>
|
|
6792
|
+
> = {
|
|
6793
|
+
mutationFn: async (fnOptions) => {
|
|
6794
|
+
const { data } = await restoreArtifact({
|
|
6251
6795
|
...options,
|
|
6252
6796
|
...fnOptions,
|
|
6253
6797
|
throwOnError: true,
|
|
@@ -6261,7 +6805,7 @@ export const publishArtifactVersionMutation = (
|
|
|
6261
6805
|
/**
|
|
6262
6806
|
* Open a version in a frame
|
|
6263
6807
|
*
|
|
6264
|
-
* 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.
|
|
6808
|
+
* 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.
|
|
6265
6809
|
*/
|
|
6266
6810
|
export const createArtifactFrameMutation = (
|
|
6267
6811
|
options?: Partial<Options<CreateArtifactFrameData>>
|
|
@@ -6314,13 +6858,96 @@ export const getArtifactVersionOptions = (options: Options<GetArtifactVersionDat
|
|
|
6314
6858
|
queryKey: getArtifactVersionQueryKey(options),
|
|
6315
6859
|
})
|
|
6316
6860
|
|
|
6861
|
+
export const getArtifactPdfQueryKey = (options: Options<GetArtifactPdfData>) =>
|
|
6862
|
+
createQueryKey("getArtifactPdf", options)
|
|
6863
|
+
|
|
6864
|
+
/**
|
|
6865
|
+
* Get a designed document's PDF
|
|
6866
|
+
*
|
|
6867
|
+
* 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.
|
|
6868
|
+
*/
|
|
6869
|
+
export const getArtifactPdfOptions = (options: Options<GetArtifactPdfData>) =>
|
|
6870
|
+
queryOptions<
|
|
6871
|
+
GetArtifactPdfResponse,
|
|
6872
|
+
GetArtifactPdfError,
|
|
6873
|
+
GetArtifactPdfResponse,
|
|
6874
|
+
ReturnType<typeof getArtifactPdfQueryKey>
|
|
6875
|
+
>({
|
|
6876
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
6877
|
+
const { data } = await getArtifactPdf({
|
|
6878
|
+
...options,
|
|
6879
|
+
...queryKey[0],
|
|
6880
|
+
signal,
|
|
6881
|
+
throwOnError: true,
|
|
6882
|
+
})
|
|
6883
|
+
return data
|
|
6884
|
+
},
|
|
6885
|
+
queryKey: getArtifactPdfQueryKey(options),
|
|
6886
|
+
})
|
|
6887
|
+
|
|
6888
|
+
/**
|
|
6889
|
+
* Print a designed document to PDF
|
|
6890
|
+
*
|
|
6891
|
+
* 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.
|
|
6892
|
+
*/
|
|
6893
|
+
export const printArtifactPdfMutation = (
|
|
6894
|
+
options?: Partial<Options<PrintArtifactPdfData>>
|
|
6895
|
+
): UseMutationOptions<
|
|
6896
|
+
PrintArtifactPdfResponse,
|
|
6897
|
+
PrintArtifactPdfError,
|
|
6898
|
+
Options<PrintArtifactPdfData>
|
|
6899
|
+
> => {
|
|
6900
|
+
const mutationOptions: UseMutationOptions<
|
|
6901
|
+
PrintArtifactPdfResponse,
|
|
6902
|
+
PrintArtifactPdfError,
|
|
6903
|
+
Options<PrintArtifactPdfData>
|
|
6904
|
+
> = {
|
|
6905
|
+
mutationFn: async (fnOptions) => {
|
|
6906
|
+
const { data } = await printArtifactPdf({
|
|
6907
|
+
...options,
|
|
6908
|
+
...fnOptions,
|
|
6909
|
+
throwOnError: true,
|
|
6910
|
+
})
|
|
6911
|
+
return data
|
|
6912
|
+
},
|
|
6913
|
+
}
|
|
6914
|
+
return mutationOptions
|
|
6915
|
+
}
|
|
6916
|
+
|
|
6917
|
+
export const getArtifactBoardPreviewQueryKey = (options: Options<GetArtifactBoardPreviewData>) =>
|
|
6918
|
+
createQueryKey("getArtifactBoardPreview", options)
|
|
6919
|
+
|
|
6920
|
+
/**
|
|
6921
|
+
* Get the preview of a canvas's board
|
|
6922
|
+
*
|
|
6923
|
+
* 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.
|
|
6924
|
+
*/
|
|
6925
|
+
export const getArtifactBoardPreviewOptions = (options: Options<GetArtifactBoardPreviewData>) =>
|
|
6926
|
+
queryOptions<
|
|
6927
|
+
GetArtifactBoardPreviewResponse,
|
|
6928
|
+
GetArtifactBoardPreviewError,
|
|
6929
|
+
GetArtifactBoardPreviewResponse,
|
|
6930
|
+
ReturnType<typeof getArtifactBoardPreviewQueryKey>
|
|
6931
|
+
>({
|
|
6932
|
+
queryFn: async ({ queryKey, signal }) => {
|
|
6933
|
+
const { data } = await getArtifactBoardPreview({
|
|
6934
|
+
...options,
|
|
6935
|
+
...queryKey[0],
|
|
6936
|
+
signal,
|
|
6937
|
+
throwOnError: true,
|
|
6938
|
+
})
|
|
6939
|
+
return data
|
|
6940
|
+
},
|
|
6941
|
+
queryKey: getArtifactBoardPreviewQueryKey(options),
|
|
6942
|
+
})
|
|
6943
|
+
|
|
6317
6944
|
export const getArtifactQueryQueryKey = (options: Options<GetArtifactQueryData>) =>
|
|
6318
6945
|
createQueryKey("getArtifactQuery", options)
|
|
6319
6946
|
|
|
6320
6947
|
/**
|
|
6321
6948
|
* Run an artifact's query
|
|
6322
6949
|
*
|
|
6323
|
-
* 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.
|
|
6950
|
+
* 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.
|
|
6324
6951
|
*/
|
|
6325
6952
|
export const getArtifactQueryOptions = (options: Options<GetArtifactQueryData>) =>
|
|
6326
6953
|
queryOptions<
|