@bluecopa/react 0.1.79 β 0.1.81
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/README.md +1068 -0
- package/dist/hooks/useGetFileByFolderIdAndName.d.ts +12 -0
- package/dist/hooks/useGetFileByFolderIdAndName.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +234 -216
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ A React library providing opinionated custom hooks for TanStack React Query inte
|
|
|
26
26
|
- [`useInputTable(inputTableId, options?)`](#useinputtableinputtableid-options)
|
|
27
27
|
- [`useRows(tableId, options?)`](#userowstableid-options)
|
|
28
28
|
- [`useGetFileUrlByFileId(fileId, options?)`](#usegetfileurlbyfileidfileid-options)
|
|
29
|
+
- [`useGetFileByFolderIdAndName(folderId, name, options?)`](#usegetfilebyfolderidandnamefolderid-name-options)
|
|
29
30
|
- [`useGetPublishedWorkbookById(workbookId, options?)`](#usegetpublishedworkbookbyidworkbookid-options)
|
|
30
31
|
- [`useGetTableById(tableId, options?)`](#usegettablebyidtableid-options)
|
|
31
32
|
- [`useGetWorkbooksByType(workbookType, options?)`](#usegetworkbooksbytypeworkbooktype-options)
|
|
@@ -40,6 +41,7 @@ A React library providing opinionated custom hooks for TanStack React Query inte
|
|
|
40
41
|
- [`useWorkbook(workbookId, options?)`](#useworkbookworkbookid-options)
|
|
41
42
|
- [`useWorkflow(workflowId, options?)`](#useworkflowworkflowid-options)
|
|
42
43
|
- [`useWorksheet(worksheetId, options?)`](#useworksheetworksheetid-options)
|
|
44
|
+
- _Plus domain-grouped hooks for Audit, Chat, Email Engine, Files, Forms, Inbox Items, Input Table mutations, Permissions, Process, Recon, Statement, Task, Templated Pipelines, Templates, TCN, Users (extras), Webcron (webhooks/schedules/executions/tasks/inspection), Workbook (mutations), and Workflow (extras) β see sections after `useWorksheet`._
|
|
43
45
|
- [Configuration](#configuration)
|
|
44
46
|
- [Default Query Configuration](#default-query-configuration)
|
|
45
47
|
- [Customizable Parameters](#customizable-parameters)
|
|
@@ -263,6 +265,38 @@ function TableRows({ tableId }) {
|
|
|
263
265
|
|
|
264
266
|
π **For detailed documentation on `useRows` including filtering, pagination, and advanced usage, see [docs/useRows.md](./docs/useRows.md)**
|
|
265
267
|
|
|
268
|
+
#### `useGetFileByFolderIdAndName` - Look up a filebox file by folder + name
|
|
269
|
+
|
|
270
|
+
```tsx
|
|
271
|
+
import { useGetFileByFolderIdAndName } from "@bluecopa/react";
|
|
272
|
+
|
|
273
|
+
function FileBadge({ folderId, fileName }) {
|
|
274
|
+
const { data, isLoading, error } = useGetFileByFolderIdAndName(
|
|
275
|
+
folderId,
|
|
276
|
+
fileName,
|
|
277
|
+
{
|
|
278
|
+
staleTime: 60 * 1000, // 1 minute
|
|
279
|
+
retry: 1,
|
|
280
|
+
},
|
|
281
|
+
);
|
|
282
|
+
|
|
283
|
+
if (!folderId || !fileName) return <div>Pick a folder and a file.</div>;
|
|
284
|
+
if (isLoading) return <div>Resolving fileβ¦</div>;
|
|
285
|
+
if (error) return <div>Could not find β{fileName}β: {error.message}</div>;
|
|
286
|
+
if (!data) return null;
|
|
287
|
+
|
|
288
|
+
return (
|
|
289
|
+
<div>
|
|
290
|
+
<strong>{data.name}</strong> Β· {data.type} Β·{" "}
|
|
291
|
+
<code>{data.blobFileId}</code>
|
|
292
|
+
{data.status === "PUBLISHED" ? " (published)" : " (draft)"}
|
|
293
|
+
</div>
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
The query is auto-disabled until both `folderId` and `name` are truthy, so you can safely pass `null`/`undefined` while the user is still picking inputs.
|
|
299
|
+
|
|
266
300
|
## API Documentation
|
|
267
301
|
|
|
268
302
|
### `useUser(options?)`
|
|
@@ -403,6 +437,23 @@ Fetches the URL for a file by its ID.
|
|
|
403
437
|
- `error`: Error object if request failed
|
|
404
438
|
- `refetch`: Function to manually trigger refetch
|
|
405
439
|
|
|
440
|
+
### `useGetFileByFolderIdAndName(folderId, name, options?)`
|
|
441
|
+
|
|
442
|
+
Fetches a filebox file by its parent folder id and exact name. The query is disabled until both `folderId` and `name` are truthy.
|
|
443
|
+
|
|
444
|
+
**Parameters:**
|
|
445
|
+
|
|
446
|
+
- `folderId`: Parent folder id (null/undefined disables the query)
|
|
447
|
+
- `name`: Exact file name to look up (null/undefined disables the query)
|
|
448
|
+
- `options` (optional): Query options extending TanStack React Query's `UseQueryOptions`
|
|
449
|
+
|
|
450
|
+
**Returns:**
|
|
451
|
+
|
|
452
|
+
- `data`: `FileboxFile` β file metadata (id, name, type, parentId, blobFileId, status, β¦)
|
|
453
|
+
- `isLoading`: Boolean indicating loading state
|
|
454
|
+
- `error`: Error object if request failed
|
|
455
|
+
- `refetch`: Function to manually trigger refetch
|
|
456
|
+
|
|
406
457
|
### `useGetPublishedWorkbookById(workbookId, options?)`
|
|
407
458
|
|
|
408
459
|
Fetches published workbook details by ID.
|
|
@@ -627,6 +678,1023 @@ Fetches worksheet details by ID.
|
|
|
627
678
|
- `error`: Error object if request failed
|
|
628
679
|
- `refetch`: Function to manually trigger refetch
|
|
629
680
|
|
|
681
|
+
> **Mutation hooks** below follow TanStack Query's `useMutation` shape. Their returns include `mutate(variables)` and `mutateAsync(variables)` to trigger the action, `isPending` (loading), `data` (on success), `error`, `isError`, `isSuccess`, and `reset()`. The `options` parameter accepts the standard `UseMutationOptions` (including `onSuccess`, `onError`, `onSettled`, `retry`, etc.).
|
|
682
|
+
|
|
683
|
+
_β Audit hooks_
|
|
684
|
+
|
|
685
|
+
### `useCreateAuditLog(options?)`
|
|
686
|
+
|
|
687
|
+
Records an audit log entry.
|
|
688
|
+
|
|
689
|
+
**Parameters:**
|
|
690
|
+
|
|
691
|
+
- `options` (optional): Mutation options. `mutate(request: CreateAuditLogRequest)` triggers the action.
|
|
692
|
+
|
|
693
|
+
**Returns:** Mutation result with `data: CreateAuditLogResponse`.
|
|
694
|
+
|
|
695
|
+
### `useGetAuditLogs(options?)`
|
|
696
|
+
|
|
697
|
+
Fetches audit log entries on demand. Implemented as a mutation so the request payload can be passed at call time.
|
|
698
|
+
|
|
699
|
+
**Parameters:**
|
|
700
|
+
|
|
701
|
+
- `options` (optional): Mutation options. `mutate(request: GetAuditLogsRequest)` triggers the fetch.
|
|
702
|
+
|
|
703
|
+
**Returns:** Mutation result with `data: AuditLogResponse`.
|
|
704
|
+
|
|
705
|
+
_β Chat hooks_
|
|
706
|
+
|
|
707
|
+
### `useCreateThread(options?)`
|
|
708
|
+
|
|
709
|
+
Creates a new chat thread.
|
|
710
|
+
|
|
711
|
+
**Parameters:**
|
|
712
|
+
|
|
713
|
+
- `options` (optional): Mutation options including `onSuccess`, `onError`, `retry`, `retryDelay`.
|
|
714
|
+
|
|
715
|
+
**Returns:** Mutation result with `data: copaApi.chat.CreateThreadResponse`.
|
|
716
|
+
|
|
717
|
+
### `useGetCommentsByThreadId(threadId, options?)`
|
|
718
|
+
|
|
719
|
+
Fetches comments for a chat thread. Disabled until `threadId` is set.
|
|
720
|
+
|
|
721
|
+
**Parameters:**
|
|
722
|
+
|
|
723
|
+
- `threadId`: Thread id (null/undefined disables the query)
|
|
724
|
+
- `options` (optional): Query options
|
|
725
|
+
|
|
726
|
+
**Returns:** Query result with `data: copaApi.chat.GetCommentsByThreadIdResponse`.
|
|
727
|
+
|
|
728
|
+
### `usePostComment(options?)`
|
|
729
|
+
|
|
730
|
+
Posts a new comment to a thread.
|
|
731
|
+
|
|
732
|
+
**Parameters:**
|
|
733
|
+
|
|
734
|
+
- `options` (optional): Mutation options. `mutate(request: PostCommentRequest)` triggers the post.
|
|
735
|
+
|
|
736
|
+
**Returns:** Mutation result with `data: copaApi.chat.PostCommentResponse`.
|
|
737
|
+
|
|
738
|
+
### `useUpdateComment(options?)`
|
|
739
|
+
|
|
740
|
+
Updates an existing comment.
|
|
741
|
+
|
|
742
|
+
**Parameters:**
|
|
743
|
+
|
|
744
|
+
- `options` (optional): Mutation options. `mutate(request: UpdateCommentRequest)` triggers the update.
|
|
745
|
+
|
|
746
|
+
**Returns:** Mutation result with `data: copaApi.chat.UpdateCommentResponse`.
|
|
747
|
+
|
|
748
|
+
### `useDeleteComment(options?)`
|
|
749
|
+
|
|
750
|
+
Deletes a comment by id.
|
|
751
|
+
|
|
752
|
+
**Parameters:**
|
|
753
|
+
|
|
754
|
+
- `options` (optional): Mutation options. `mutate(commentId: string)` triggers the delete.
|
|
755
|
+
|
|
756
|
+
**Returns:** Mutation result with `data: copaApi.chat.DeleteCommentResponse`.
|
|
757
|
+
|
|
758
|
+
### `useSubscribeUser(options?)`
|
|
759
|
+
|
|
760
|
+
Subscribes a user to chat updates.
|
|
761
|
+
|
|
762
|
+
**Parameters:**
|
|
763
|
+
|
|
764
|
+
- `options` (optional): Mutation options. `mutate(request: SubscribeUserRequest)` triggers the action.
|
|
765
|
+
|
|
766
|
+
**Returns:** Mutation result with `data: copaApi.chat.SubscribeUserResponse`.
|
|
767
|
+
|
|
768
|
+
### `useUnsubscribeUser(options?)`
|
|
769
|
+
|
|
770
|
+
Unsubscribes a user from chat updates.
|
|
771
|
+
|
|
772
|
+
**Parameters:**
|
|
773
|
+
|
|
774
|
+
- `options` (optional): Mutation options. `mutate(request: UnsubscribeUserRequest)` triggers the action.
|
|
775
|
+
|
|
776
|
+
**Returns:** Mutation result with `data: copaApi.chat.UnsubscribeUserResponse`.
|
|
777
|
+
|
|
778
|
+
### `useCheckSubscriptionStatus(userId, threadId, options?)`
|
|
779
|
+
|
|
780
|
+
Checks whether a user is subscribed to a thread.
|
|
781
|
+
|
|
782
|
+
**Parameters:**
|
|
783
|
+
|
|
784
|
+
- `userId`: User id (null/undefined disables the query)
|
|
785
|
+
- `threadId`: Thread id (null/undefined disables the query)
|
|
786
|
+
- `options` (optional): Query options
|
|
787
|
+
|
|
788
|
+
**Returns:** Query result with `data: copaApi.chat.CheckSubscriptionStatusResponse`.
|
|
789
|
+
|
|
790
|
+
_β Email Engine hooks_
|
|
791
|
+
|
|
792
|
+
### `useGetAllConversations(params?, options?)`
|
|
793
|
+
|
|
794
|
+
Lists email conversations (paginated).
|
|
795
|
+
|
|
796
|
+
**Parameters:**
|
|
797
|
+
|
|
798
|
+
- `params` (optional): `GetAllConversationsParams` filters
|
|
799
|
+
- `options` (optional): Query options
|
|
800
|
+
|
|
801
|
+
**Returns:** Query result with `data: PageChunkEmailConversation`.
|
|
802
|
+
|
|
803
|
+
### `useGetConversation(conversationId, options?)`
|
|
804
|
+
|
|
805
|
+
Fetches a single email conversation by id.
|
|
806
|
+
|
|
807
|
+
**Parameters:**
|
|
808
|
+
|
|
809
|
+
- `conversationId`: Conversation id (null/undefined disables the query)
|
|
810
|
+
- `options` (optional): Query options
|
|
811
|
+
|
|
812
|
+
**Returns:** Query result with `data: EmailConversation`.
|
|
813
|
+
|
|
814
|
+
### `useCreateConversation(options?)`
|
|
815
|
+
|
|
816
|
+
Creates a new email conversation.
|
|
817
|
+
|
|
818
|
+
**Parameters:**
|
|
819
|
+
|
|
820
|
+
- `options` (optional): Mutation options. `mutate(request: CreateConversationRequest)` triggers the create.
|
|
821
|
+
|
|
822
|
+
**Returns:** Mutation result with `data: EmailConversation`.
|
|
823
|
+
|
|
824
|
+
### `useReplyToConversation(options?)`
|
|
825
|
+
|
|
826
|
+
Sends a reply on an email conversation.
|
|
827
|
+
|
|
828
|
+
**Parameters:**
|
|
829
|
+
|
|
830
|
+
- `options` (optional): Mutation options. `mutate(request: ReplyToConversationRequest)` triggers the reply.
|
|
831
|
+
|
|
832
|
+
**Returns:** Mutation result.
|
|
833
|
+
|
|
834
|
+
### `useFilterMessagesBySenderId(params, options?)`
|
|
835
|
+
|
|
836
|
+
Fetches messages filtered by sender id.
|
|
837
|
+
|
|
838
|
+
**Parameters:**
|
|
839
|
+
|
|
840
|
+
- `params`: `FilterOnSenderId` β sender id and paging
|
|
841
|
+
- `options` (optional): Query options
|
|
842
|
+
|
|
843
|
+
**Returns:** Query result with `data: PageChunkEmailMessage`.
|
|
844
|
+
|
|
845
|
+
_β File hooks (mutations & download)_
|
|
846
|
+
|
|
847
|
+
### `useFileUpload(options?)`
|
|
848
|
+
|
|
849
|
+
Uploads file data to storage and returns the resulting file id/path.
|
|
850
|
+
|
|
851
|
+
**Parameters:**
|
|
852
|
+
|
|
853
|
+
- `options` (optional): Mutation options. `mutate(request: FileUploadRequest)` triggers the upload.
|
|
854
|
+
|
|
855
|
+
**Returns:** Mutation result with `data: FileUploadResponse`.
|
|
856
|
+
|
|
857
|
+
### `useFileDownload(params, options?)`
|
|
858
|
+
|
|
859
|
+
Downloads a file by id. Implemented as a query (auto-fetches when params are valid).
|
|
860
|
+
|
|
861
|
+
**Parameters:**
|
|
862
|
+
|
|
863
|
+
- `params`: `{ fileId: string; contentType: string; method: 'GET' | 'PUT' }`
|
|
864
|
+
- `options` (optional): Query options
|
|
865
|
+
|
|
866
|
+
**Returns:** Query result with the downloaded data.
|
|
867
|
+
|
|
868
|
+
_β Form hooks_
|
|
869
|
+
|
|
870
|
+
### `useGetFormById(formId, options?)`
|
|
871
|
+
|
|
872
|
+
Fetches a form by id.
|
|
873
|
+
|
|
874
|
+
**Parameters:**
|
|
875
|
+
|
|
876
|
+
- `formId`: Form id (null/undefined disables the query)
|
|
877
|
+
- `options` (optional): Query options
|
|
878
|
+
|
|
879
|
+
**Returns:** Query result with the form definition.
|
|
880
|
+
|
|
881
|
+
### `useGetFormSchema(formInstanceId, formRevision, options?)`
|
|
882
|
+
|
|
883
|
+
Fetches a form's schema for a given instance + revision.
|
|
884
|
+
|
|
885
|
+
**Parameters:**
|
|
886
|
+
|
|
887
|
+
- `formInstanceId`: Form instance id (null/undefined disables the query)
|
|
888
|
+
- `formRevision`: Schema revision (string or number, null/undefined disables the query)
|
|
889
|
+
- `options` (optional): Query options
|
|
890
|
+
|
|
891
|
+
**Returns:** Query result with the form schema.
|
|
892
|
+
|
|
893
|
+
### `useGetFormData(formId, options?)`
|
|
894
|
+
|
|
895
|
+
Fetches submitted form data.
|
|
896
|
+
|
|
897
|
+
**Parameters:**
|
|
898
|
+
|
|
899
|
+
- `formId`: Form id (null/undefined disables the query)
|
|
900
|
+
- `options` (optional): Query options
|
|
901
|
+
|
|
902
|
+
**Returns:** Query result with the form data.
|
|
903
|
+
|
|
904
|
+
### `useCreateOrUpdateForm(options?)`
|
|
905
|
+
|
|
906
|
+
Creates or updates a form definition.
|
|
907
|
+
|
|
908
|
+
**Parameters:**
|
|
909
|
+
|
|
910
|
+
- `options` (optional): Mutation options. `mutate(request: CreateOrUpdateFormRequest)` triggers the save.
|
|
911
|
+
|
|
912
|
+
**Returns:** Mutation result.
|
|
913
|
+
|
|
914
|
+
_β Inbox Items hooks_
|
|
915
|
+
|
|
916
|
+
### `useGetAllInboxItems(params?, options?)`
|
|
917
|
+
|
|
918
|
+
Lists inbox items.
|
|
919
|
+
|
|
920
|
+
**Parameters:**
|
|
921
|
+
|
|
922
|
+
- `params` (optional): `GetAllInboxItemsRequest` filters
|
|
923
|
+
- `options` (optional): Query options
|
|
924
|
+
|
|
925
|
+
**Returns:** Query result with the items array.
|
|
926
|
+
|
|
927
|
+
### `useCreateInboxItemPerUser(options?)`
|
|
928
|
+
|
|
929
|
+
Creates an inbox item for a specific user.
|
|
930
|
+
|
|
931
|
+
**Parameters:**
|
|
932
|
+
|
|
933
|
+
- `options` (optional): Mutation options. `mutate(request)` triggers the create.
|
|
934
|
+
|
|
935
|
+
**Returns:** Mutation result with the created inbox items.
|
|
936
|
+
|
|
937
|
+
### `useMarkItemAsRead(options?)`
|
|
938
|
+
|
|
939
|
+
Marks an inbox item as read.
|
|
940
|
+
|
|
941
|
+
**Parameters:**
|
|
942
|
+
|
|
943
|
+
- `options` (optional): Mutation options. `mutate(request: MarkItemAsReadRequest)` triggers the action.
|
|
944
|
+
|
|
945
|
+
**Returns:** Mutation result.
|
|
946
|
+
|
|
947
|
+
### `useMarkItemAsUnread(options?)`
|
|
948
|
+
|
|
949
|
+
Marks an inbox item as unread.
|
|
950
|
+
|
|
951
|
+
**Parameters:**
|
|
952
|
+
|
|
953
|
+
- `options` (optional): Mutation options. `mutate(request: MarkItemAsUnreadRequest)` triggers the action.
|
|
954
|
+
|
|
955
|
+
**Returns:** Mutation result.
|
|
956
|
+
|
|
957
|
+
_β Input Table mutation hooks_
|
|
958
|
+
|
|
959
|
+
### `useInsertRow(options?)`
|
|
960
|
+
|
|
961
|
+
Inserts a new row into an input table.
|
|
962
|
+
|
|
963
|
+
**Parameters:**
|
|
964
|
+
|
|
965
|
+
- `options` (optional): Mutation options. `mutate(request: InsertRowRequest)` triggers the insert.
|
|
966
|
+
|
|
967
|
+
**Returns:** Mutation result.
|
|
968
|
+
|
|
969
|
+
### `useUpdateRow(options?)`
|
|
970
|
+
|
|
971
|
+
Updates an existing row in an input table.
|
|
972
|
+
|
|
973
|
+
**Parameters:**
|
|
974
|
+
|
|
975
|
+
- `options` (optional): Mutation options. `mutate(request: UpdateRowRequest)` triggers the update.
|
|
976
|
+
|
|
977
|
+
**Returns:** Mutation result.
|
|
978
|
+
|
|
979
|
+
### `useDeleteRow(options?)`
|
|
980
|
+
|
|
981
|
+
Deletes a row by id from an input table.
|
|
982
|
+
|
|
983
|
+
**Parameters:**
|
|
984
|
+
|
|
985
|
+
- `options` (optional): Mutation options. `mutate(request: DeleteRowRequest)` triggers the delete.
|
|
986
|
+
|
|
987
|
+
**Returns:** Mutation result.
|
|
988
|
+
|
|
989
|
+
_β Permissions hooks_
|
|
990
|
+
|
|
991
|
+
### `useDocumentPermissions(objectId, objectType, options?)`
|
|
992
|
+
|
|
993
|
+
Fetches permissions for a given document/object.
|
|
994
|
+
|
|
995
|
+
**Parameters:**
|
|
996
|
+
|
|
997
|
+
- `objectId`: Object id (undefined disables the query)
|
|
998
|
+
- `objectType`: Object type (e.g. `Workbook`, `Dashboard`)
|
|
999
|
+
- `options` (optional): Query options
|
|
1000
|
+
|
|
1001
|
+
**Returns:** Query result with `data: PermissionsResponse`.
|
|
1002
|
+
|
|
1003
|
+
_β Process hooks_
|
|
1004
|
+
|
|
1005
|
+
### `useGetTriggersBySheet(sheetId, options?)`
|
|
1006
|
+
|
|
1007
|
+
Lists process triggers attached to a sheet.
|
|
1008
|
+
|
|
1009
|
+
**Parameters:**
|
|
1010
|
+
|
|
1011
|
+
- `sheetId`: Sheet id
|
|
1012
|
+
- `options` (optional): TanStack `UseQueryOptions` (omit `queryKey`/`queryFn`/`enabled`)
|
|
1013
|
+
|
|
1014
|
+
**Returns:** Query result with `data: ProcessTrigger[]`.
|
|
1015
|
+
|
|
1016
|
+
### `useRegisterProcessTrigger(options?)`
|
|
1017
|
+
|
|
1018
|
+
Registers a new process trigger.
|
|
1019
|
+
|
|
1020
|
+
**Parameters:**
|
|
1021
|
+
|
|
1022
|
+
- `options` (optional): Mutation options. `mutate(trigger: ProcessTrigger)` triggers the register.
|
|
1023
|
+
|
|
1024
|
+
**Returns:** Mutation result with `data: ProcessTrigger`.
|
|
1025
|
+
|
|
1026
|
+
### `useDeleteProcessTrigger(options?)`
|
|
1027
|
+
|
|
1028
|
+
Deletes a process trigger by id. Invalidates the corresponding trigger list query.
|
|
1029
|
+
|
|
1030
|
+
**Parameters:**
|
|
1031
|
+
|
|
1032
|
+
- `options` (optional): Mutation options. `mutate({ id, sheetId? })` triggers the delete.
|
|
1033
|
+
|
|
1034
|
+
**Returns:** Mutation result with `data: DeleteProcessTriggerResponse`.
|
|
1035
|
+
|
|
1036
|
+
### `useMarkTaskDone(options?)`
|
|
1037
|
+
|
|
1038
|
+
Marks a process task as done.
|
|
1039
|
+
|
|
1040
|
+
**Parameters:**
|
|
1041
|
+
|
|
1042
|
+
- `options` (optional): Mutation options. `mutate(request: MarkTaskDoneRequest)` triggers the action.
|
|
1043
|
+
|
|
1044
|
+
**Returns:** Mutation result.
|
|
1045
|
+
|
|
1046
|
+
### `useReassignTask(options?)`
|
|
1047
|
+
|
|
1048
|
+
Reassigns a process task to a different user.
|
|
1049
|
+
|
|
1050
|
+
**Parameters:**
|
|
1051
|
+
|
|
1052
|
+
- `options` (optional): Mutation options. `mutate(request: ReassignTaskRequest)` triggers the action.
|
|
1053
|
+
|
|
1054
|
+
**Returns:** Mutation result.
|
|
1055
|
+
|
|
1056
|
+
_β Recon hooks_
|
|
1057
|
+
|
|
1058
|
+
### `useGetAllRecon(options?)`
|
|
1059
|
+
|
|
1060
|
+
Lists all recon workflows.
|
|
1061
|
+
|
|
1062
|
+
**Parameters:**
|
|
1063
|
+
|
|
1064
|
+
- `options` (optional): Query options
|
|
1065
|
+
|
|
1066
|
+
**Returns:** Query result with `data: ReconWorkflow[]`.
|
|
1067
|
+
|
|
1068
|
+
### `useRunRecon(options?)`
|
|
1069
|
+
|
|
1070
|
+
Triggers a recon workflow run.
|
|
1071
|
+
|
|
1072
|
+
**Parameters:**
|
|
1073
|
+
|
|
1074
|
+
- `options` (optional): Mutation options. `mutate(request: RunReconRequest)` triggers the run.
|
|
1075
|
+
|
|
1076
|
+
**Returns:** Mutation result with `data: RunReconResponse`.
|
|
1077
|
+
|
|
1078
|
+
_β Statement hooks_
|
|
1079
|
+
|
|
1080
|
+
### `useGetStatementData(statementId, viewId?, runId?, options?)`
|
|
1081
|
+
|
|
1082
|
+
Fetches statement data for a given statement/view/run.
|
|
1083
|
+
|
|
1084
|
+
**Parameters:**
|
|
1085
|
+
|
|
1086
|
+
- `statementId`: Statement id (null/undefined disables the query)
|
|
1087
|
+
- `viewId` (optional): View id
|
|
1088
|
+
- `runId` (optional): Run id
|
|
1089
|
+
- `options` (optional): Query options
|
|
1090
|
+
|
|
1091
|
+
**Returns:** Query result with the statement data.
|
|
1092
|
+
|
|
1093
|
+
### `useGetViewsBySheetId(sheetId, options?)`
|
|
1094
|
+
|
|
1095
|
+
Lists statement views for a sheet.
|
|
1096
|
+
|
|
1097
|
+
**Parameters:**
|
|
1098
|
+
|
|
1099
|
+
- `sheetId`: Sheet id (null/undefined disables the query)
|
|
1100
|
+
- `options` (optional): Query options
|
|
1101
|
+
|
|
1102
|
+
**Returns:** Query result with the array of views.
|
|
1103
|
+
|
|
1104
|
+
### `useGetViewById(viewId, options?)`
|
|
1105
|
+
|
|
1106
|
+
Fetches a single statement view by id.
|
|
1107
|
+
|
|
1108
|
+
**Parameters:**
|
|
1109
|
+
|
|
1110
|
+
- `viewId`: View id (null/undefined disables the query)
|
|
1111
|
+
- `options` (optional): Query options
|
|
1112
|
+
|
|
1113
|
+
**Returns:** Query result with the view.
|
|
1114
|
+
|
|
1115
|
+
### `useGetRunsByViewId(viewId, options?)`
|
|
1116
|
+
|
|
1117
|
+
Lists statement runs for a given view.
|
|
1118
|
+
|
|
1119
|
+
**Parameters:**
|
|
1120
|
+
|
|
1121
|
+
- `viewId`: View id (null/undefined disables the query)
|
|
1122
|
+
- `options` (optional): Query options
|
|
1123
|
+
|
|
1124
|
+
**Returns:** Query result with the runs array.
|
|
1125
|
+
|
|
1126
|
+
### `useGetRunResultById(runId, options?)`
|
|
1127
|
+
|
|
1128
|
+
Fetches the result of a statement run.
|
|
1129
|
+
|
|
1130
|
+
**Parameters:**
|
|
1131
|
+
|
|
1132
|
+
- `runId`: Run id (null/undefined disables the query)
|
|
1133
|
+
- `options` (optional): Query options
|
|
1134
|
+
|
|
1135
|
+
**Returns:** Query result with the run result.
|
|
1136
|
+
|
|
1137
|
+
### `useCreateStatementRun(options?)`
|
|
1138
|
+
|
|
1139
|
+
Creates a new statement run.
|
|
1140
|
+
|
|
1141
|
+
**Parameters:**
|
|
1142
|
+
|
|
1143
|
+
- `options` (optional): Mutation options. `mutate(params: CreateStatementRunParams)` triggers the create.
|
|
1144
|
+
|
|
1145
|
+
**Returns:** Mutation result with `data: CreateStatementRunResult`.
|
|
1146
|
+
|
|
1147
|
+
_β Task hook_
|
|
1148
|
+
|
|
1149
|
+
### `useGetTaskDetails(taskId, options?)`
|
|
1150
|
+
|
|
1151
|
+
Fetches detailed information about a task.
|
|
1152
|
+
|
|
1153
|
+
**Parameters:**
|
|
1154
|
+
|
|
1155
|
+
- `taskId`: Task id (null/undefined disables the query)
|
|
1156
|
+
- `options` (optional): Query options
|
|
1157
|
+
|
|
1158
|
+
**Returns:** Query result with the task details.
|
|
1159
|
+
|
|
1160
|
+
_β Templated Pipeline hooks_
|
|
1161
|
+
|
|
1162
|
+
### `useGetAllTemplatedPipelines(options?)`
|
|
1163
|
+
|
|
1164
|
+
Lists all templated pipelines.
|
|
1165
|
+
|
|
1166
|
+
**Parameters:**
|
|
1167
|
+
|
|
1168
|
+
- `options` (optional): Query options
|
|
1169
|
+
|
|
1170
|
+
**Returns:** Query result with `data: TemplatedPipelineWorkflow[]`.
|
|
1171
|
+
|
|
1172
|
+
_β Template hooks_
|
|
1173
|
+
|
|
1174
|
+
### `useRenderTemplate(options?)`
|
|
1175
|
+
|
|
1176
|
+
Renders a template with the provided variables.
|
|
1177
|
+
|
|
1178
|
+
**Parameters:**
|
|
1179
|
+
|
|
1180
|
+
- `options` (optional): Mutation options. `mutate(request: RenderTemplateRequest)` triggers the render.
|
|
1181
|
+
|
|
1182
|
+
**Returns:** Mutation result with `data: RenderTemplateResponse`.
|
|
1183
|
+
|
|
1184
|
+
_β TCN hooks_
|
|
1185
|
+
|
|
1186
|
+
> All TCN mutation hooks take their TCN `token` (and other identifiers) as part of `mutate(variables)`. The `options` parameter is standard `UseMutationOptions`.
|
|
1187
|
+
|
|
1188
|
+
### `useTcnAuthUrl(options?)`
|
|
1189
|
+
|
|
1190
|
+
Returns the TCN OAuth authorization URL.
|
|
1191
|
+
|
|
1192
|
+
**Parameters:**
|
|
1193
|
+
|
|
1194
|
+
- `options` (optional): Query options
|
|
1195
|
+
|
|
1196
|
+
**Returns:** Query result with `data: { url: string }`.
|
|
1197
|
+
|
|
1198
|
+
### `useTcnExchangeCode(options?)`
|
|
1199
|
+
|
|
1200
|
+
Exchanges an OAuth code for TCN tokens.
|
|
1201
|
+
|
|
1202
|
+
**Parameters:** `mutate({ code })` triggers the exchange.
|
|
1203
|
+
|
|
1204
|
+
**Returns:** Mutation result with `data: TcnTokenData`.
|
|
1205
|
+
|
|
1206
|
+
### `useTcnRefreshToken(options?)`
|
|
1207
|
+
|
|
1208
|
+
Refreshes a TCN access token.
|
|
1209
|
+
|
|
1210
|
+
**Parameters:** `mutate({ refresh_token })`.
|
|
1211
|
+
|
|
1212
|
+
**Returns:** Mutation result with `data: TcnTokenData`.
|
|
1213
|
+
|
|
1214
|
+
### `useTcnCurrentAgent(options?)`
|
|
1215
|
+
|
|
1216
|
+
Fetches the currently signed-in TCN agent.
|
|
1217
|
+
|
|
1218
|
+
**Parameters:** `mutate({ token })`.
|
|
1219
|
+
|
|
1220
|
+
**Returns:** Mutation result with `data: TcnAgentData`.
|
|
1221
|
+
|
|
1222
|
+
### `useTcnAgentSkills(options?)`
|
|
1223
|
+
|
|
1224
|
+
Lists skills available to the agent in a hunt group.
|
|
1225
|
+
|
|
1226
|
+
**Parameters:** `mutate({ token, huntGroupSid })`.
|
|
1227
|
+
|
|
1228
|
+
**Returns:** Mutation result with `data: TcnSkillsData`.
|
|
1229
|
+
|
|
1230
|
+
### `useTcnCreateSession(options?)`
|
|
1231
|
+
|
|
1232
|
+
Creates a new TCN agent session.
|
|
1233
|
+
|
|
1234
|
+
**Parameters:** `mutate({ token, huntGroupSid, skills })`.
|
|
1235
|
+
|
|
1236
|
+
**Returns:** Mutation result with `data: TcnSessionData`.
|
|
1237
|
+
|
|
1238
|
+
### `useTcnKeepAlive(options?)`
|
|
1239
|
+
|
|
1240
|
+
Pings the TCN session to keep it alive.
|
|
1241
|
+
|
|
1242
|
+
**Parameters:** `mutate({ token, sessionSid })`.
|
|
1243
|
+
|
|
1244
|
+
**Returns:** Mutation result.
|
|
1245
|
+
|
|
1246
|
+
### `useTcnAgentGetStatus(options?)`
|
|
1247
|
+
|
|
1248
|
+
Returns the current agent status.
|
|
1249
|
+
|
|
1250
|
+
**Parameters:** `mutate({ token })`.
|
|
1251
|
+
|
|
1252
|
+
**Returns:** Mutation result with `data: TcnStatusData`.
|
|
1253
|
+
|
|
1254
|
+
### `useTcnAgentSetReady(options?)`
|
|
1255
|
+
|
|
1256
|
+
Marks the agent as ready.
|
|
1257
|
+
|
|
1258
|
+
**Parameters:** `mutate({ token, sessionSid })`.
|
|
1259
|
+
|
|
1260
|
+
**Returns:** Mutation result.
|
|
1261
|
+
|
|
1262
|
+
### `useTcnAgentPause(options?)`
|
|
1263
|
+
|
|
1264
|
+
Pauses the agent.
|
|
1265
|
+
|
|
1266
|
+
**Parameters:** `mutate({ token, sessionSid })`.
|
|
1267
|
+
|
|
1268
|
+
**Returns:** Mutation result.
|
|
1269
|
+
|
|
1270
|
+
### `useTcnAgentDisconnect(options?)`
|
|
1271
|
+
|
|
1272
|
+
Disconnects the agent.
|
|
1273
|
+
|
|
1274
|
+
**Parameters:** `mutate({ token, sessionSid, reason? })`.
|
|
1275
|
+
|
|
1276
|
+
**Returns:** Mutation result.
|
|
1277
|
+
|
|
1278
|
+
### `useTcnConnectedParty(options?)`
|
|
1279
|
+
|
|
1280
|
+
Returns the currently connected party for the agent.
|
|
1281
|
+
|
|
1282
|
+
**Parameters:** `mutate({ token, sessionSid })`.
|
|
1283
|
+
|
|
1284
|
+
**Returns:** Mutation result with `data: TcnConnectedParty`.
|
|
1285
|
+
|
|
1286
|
+
### `useTcnAgentPutCallOnHold(options?)`
|
|
1287
|
+
|
|
1288
|
+
Puts the agent's current call on hold.
|
|
1289
|
+
|
|
1290
|
+
**Parameters:** `mutate({ token, sessionSid, holdType? })`.
|
|
1291
|
+
|
|
1292
|
+
**Returns:** Mutation result.
|
|
1293
|
+
|
|
1294
|
+
### `useTcnAgentGetCallFromHold(options?)`
|
|
1295
|
+
|
|
1296
|
+
Resumes the agent's held call.
|
|
1297
|
+
|
|
1298
|
+
**Parameters:** `mutate({ token, sessionSid, holdType? })`.
|
|
1299
|
+
|
|
1300
|
+
**Returns:** Mutation result.
|
|
1301
|
+
|
|
1302
|
+
### `useTcnHuntGroupSettings(options?)`
|
|
1303
|
+
|
|
1304
|
+
Fetches hunt-group settings for the agent.
|
|
1305
|
+
|
|
1306
|
+
**Parameters:** `mutate({ token, huntGroupSid })`.
|
|
1307
|
+
|
|
1308
|
+
**Returns:** Mutation result with `data: TcnDialSettings`.
|
|
1309
|
+
|
|
1310
|
+
### `useTcnCallData(options?)`
|
|
1311
|
+
|
|
1312
|
+
Retrieves data for an active call.
|
|
1313
|
+
|
|
1314
|
+
**Parameters:** `mutate({ token, callSid })`.
|
|
1315
|
+
|
|
1316
|
+
**Returns:** Mutation result with `data: TcnCallData`.
|
|
1317
|
+
|
|
1318
|
+
### `useTcnDialManualPrepare(options?)`
|
|
1319
|
+
|
|
1320
|
+
Prepares a manual dial.
|
|
1321
|
+
|
|
1322
|
+
**Parameters:** `mutate({ token, sessionSid })`.
|
|
1323
|
+
|
|
1324
|
+
**Returns:** Mutation result.
|
|
1325
|
+
|
|
1326
|
+
### `useTcnManualDialStart(options?)`
|
|
1327
|
+
|
|
1328
|
+
Starts a prepared manual dial.
|
|
1329
|
+
|
|
1330
|
+
**Parameters:** `mutate({ token, agentSessionSid, huntGroupSid, simpleCallData })`.
|
|
1331
|
+
|
|
1332
|
+
**Returns:** Mutation result.
|
|
1333
|
+
|
|
1334
|
+
### `useTcnProcessManualDial(options?)`
|
|
1335
|
+
|
|
1336
|
+
Processes the result of a manual dial.
|
|
1337
|
+
|
|
1338
|
+
**Parameters:** `mutate({ token, call })`.
|
|
1339
|
+
|
|
1340
|
+
**Returns:** Mutation result.
|
|
1341
|
+
|
|
1342
|
+
_β User hooks (extras)_
|
|
1343
|
+
|
|
1344
|
+
### `useGetAllUsers(options?)`
|
|
1345
|
+
|
|
1346
|
+
Lists all users in the workspace.
|
|
1347
|
+
|
|
1348
|
+
**Parameters:**
|
|
1349
|
+
|
|
1350
|
+
- `options` (optional): Query options
|
|
1351
|
+
|
|
1352
|
+
**Returns:** Query result with `data: User[]`.
|
|
1353
|
+
|
|
1354
|
+
_β Webcron: Webhooks_
|
|
1355
|
+
|
|
1356
|
+
### `useListWebhooks(options?)`
|
|
1357
|
+
|
|
1358
|
+
Lists all webhooks.
|
|
1359
|
+
|
|
1360
|
+
**Parameters:**
|
|
1361
|
+
|
|
1362
|
+
- `options` (optional): Query options
|
|
1363
|
+
|
|
1364
|
+
**Returns:** Query result with the webhooks array.
|
|
1365
|
+
|
|
1366
|
+
### `useGetWebhook(id, options?)`
|
|
1367
|
+
|
|
1368
|
+
Fetches a single webhook by id.
|
|
1369
|
+
|
|
1370
|
+
**Parameters:**
|
|
1371
|
+
|
|
1372
|
+
- `id`: Webhook id
|
|
1373
|
+
- `options` (optional): Query options
|
|
1374
|
+
|
|
1375
|
+
**Returns:** Query result with the webhook.
|
|
1376
|
+
|
|
1377
|
+
### `useCreateWebhook(options?)`
|
|
1378
|
+
|
|
1379
|
+
Creates a new webhook. Invalidates the webhooks list query on success.
|
|
1380
|
+
|
|
1381
|
+
**Parameters:** `mutate(data)` triggers the create.
|
|
1382
|
+
|
|
1383
|
+
**Returns:** Mutation result.
|
|
1384
|
+
|
|
1385
|
+
### `useUpdateWebhook(options?)`
|
|
1386
|
+
|
|
1387
|
+
Updates an existing webhook.
|
|
1388
|
+
|
|
1389
|
+
**Parameters:** `mutate({ id, data })` triggers the update.
|
|
1390
|
+
|
|
1391
|
+
**Returns:** Mutation result.
|
|
1392
|
+
|
|
1393
|
+
### `useDeleteWebhook(options?)`
|
|
1394
|
+
|
|
1395
|
+
Deletes a webhook.
|
|
1396
|
+
|
|
1397
|
+
**Parameters:** `mutate(id: string)` triggers the delete.
|
|
1398
|
+
|
|
1399
|
+
**Returns:** Mutation result.
|
|
1400
|
+
|
|
1401
|
+
### `useTestWebhook(options?)`
|
|
1402
|
+
|
|
1403
|
+
Sends a test invocation through a webhook.
|
|
1404
|
+
|
|
1405
|
+
**Parameters:** `mutate(id: string)` triggers the test.
|
|
1406
|
+
|
|
1407
|
+
**Returns:** Mutation result.
|
|
1408
|
+
|
|
1409
|
+
### `useGetWebhookExecutions(id, params?, options?)`
|
|
1410
|
+
|
|
1411
|
+
Lists executions for a webhook.
|
|
1412
|
+
|
|
1413
|
+
**Parameters:**
|
|
1414
|
+
|
|
1415
|
+
- `id`: Webhook id
|
|
1416
|
+
- `params` (optional): `{ limit?: number; offset?: number }`
|
|
1417
|
+
- `options` (optional): Query options
|
|
1418
|
+
|
|
1419
|
+
**Returns:** Query result with executions.
|
|
1420
|
+
|
|
1421
|
+
### `useGetWebhookSchedules(id, options?)`
|
|
1422
|
+
|
|
1423
|
+
Lists schedules for a webhook.
|
|
1424
|
+
|
|
1425
|
+
**Parameters:**
|
|
1426
|
+
|
|
1427
|
+
- `id`: Webhook id
|
|
1428
|
+
- `options` (optional): Query options
|
|
1429
|
+
|
|
1430
|
+
**Returns:** Query result with schedules.
|
|
1431
|
+
|
|
1432
|
+
### `useCreateWebhookSchedule(options?)`
|
|
1433
|
+
|
|
1434
|
+
Creates a schedule attached to a webhook.
|
|
1435
|
+
|
|
1436
|
+
**Parameters:** `mutate({ webhookId, data })` triggers the create.
|
|
1437
|
+
|
|
1438
|
+
**Returns:** Mutation result.
|
|
1439
|
+
|
|
1440
|
+
_β Webcron: Schedules_
|
|
1441
|
+
|
|
1442
|
+
### `useGetSchedule(id, options?)`
|
|
1443
|
+
|
|
1444
|
+
Fetches a single schedule by id.
|
|
1445
|
+
|
|
1446
|
+
**Parameters:**
|
|
1447
|
+
|
|
1448
|
+
- `id`: Schedule id
|
|
1449
|
+
- `options` (optional): Query options
|
|
1450
|
+
|
|
1451
|
+
**Returns:** Query result with the schedule.
|
|
1452
|
+
|
|
1453
|
+
### `useUpdateSchedule(options?)`
|
|
1454
|
+
|
|
1455
|
+
Updates an existing schedule.
|
|
1456
|
+
|
|
1457
|
+
**Parameters:** `mutate({ id, data })`.
|
|
1458
|
+
|
|
1459
|
+
**Returns:** Mutation result.
|
|
1460
|
+
|
|
1461
|
+
### `useDeleteSchedule(options?)`
|
|
1462
|
+
|
|
1463
|
+
Deletes a schedule.
|
|
1464
|
+
|
|
1465
|
+
**Parameters:** `mutate(id: string)`.
|
|
1466
|
+
|
|
1467
|
+
**Returns:** Mutation result.
|
|
1468
|
+
|
|
1469
|
+
### `usePauseSchedule(options?)`
|
|
1470
|
+
|
|
1471
|
+
Pauses a schedule.
|
|
1472
|
+
|
|
1473
|
+
**Parameters:** `mutate(id: string)`.
|
|
1474
|
+
|
|
1475
|
+
**Returns:** Mutation result.
|
|
1476
|
+
|
|
1477
|
+
### `useResumeSchedule(options?)`
|
|
1478
|
+
|
|
1479
|
+
Resumes a paused schedule.
|
|
1480
|
+
|
|
1481
|
+
**Parameters:** `mutate(id: string)`.
|
|
1482
|
+
|
|
1483
|
+
**Returns:** Mutation result.
|
|
1484
|
+
|
|
1485
|
+
### `useTriggerSchedule(options?)`
|
|
1486
|
+
|
|
1487
|
+
Triggers a schedule immediately.
|
|
1488
|
+
|
|
1489
|
+
**Parameters:** `mutate(id: string)`.
|
|
1490
|
+
|
|
1491
|
+
**Returns:** Mutation result.
|
|
1492
|
+
|
|
1493
|
+
_β Webcron: Executions_
|
|
1494
|
+
|
|
1495
|
+
### `useListExecutions(params?, options?)`
|
|
1496
|
+
|
|
1497
|
+
Lists webcron executions with optional filtering.
|
|
1498
|
+
|
|
1499
|
+
**Parameters:**
|
|
1500
|
+
|
|
1501
|
+
- `params` (optional): `{ status?: string; webhookId?: string; limit?: number; offset?: number }`
|
|
1502
|
+
- `options` (optional): Query options
|
|
1503
|
+
|
|
1504
|
+
**Returns:** Query result with executions.
|
|
1505
|
+
|
|
1506
|
+
### `useGetExecution(id, options?)`
|
|
1507
|
+
|
|
1508
|
+
Fetches a single execution by id.
|
|
1509
|
+
|
|
1510
|
+
**Parameters:**
|
|
1511
|
+
|
|
1512
|
+
- `id`: Execution id
|
|
1513
|
+
- `options` (optional): Query options
|
|
1514
|
+
|
|
1515
|
+
**Returns:** Query result with the execution.
|
|
1516
|
+
|
|
1517
|
+
### `useRetryExecution(options?)`
|
|
1518
|
+
|
|
1519
|
+
Retries a failed execution.
|
|
1520
|
+
|
|
1521
|
+
**Parameters:** `mutate(id: string)`.
|
|
1522
|
+
|
|
1523
|
+
**Returns:** Mutation result.
|
|
1524
|
+
|
|
1525
|
+
_β Webcron: Tasks_
|
|
1526
|
+
|
|
1527
|
+
### `useListTasks(options?)`
|
|
1528
|
+
|
|
1529
|
+
Lists webcron tasks.
|
|
1530
|
+
|
|
1531
|
+
**Parameters:**
|
|
1532
|
+
|
|
1533
|
+
- `options` (optional): Query options
|
|
1534
|
+
|
|
1535
|
+
**Returns:** Query result with the tasks array.
|
|
1536
|
+
|
|
1537
|
+
### `useCreateTask(options?)`
|
|
1538
|
+
|
|
1539
|
+
Creates a new webcron task.
|
|
1540
|
+
|
|
1541
|
+
**Parameters:** `mutate(data)`.
|
|
1542
|
+
|
|
1543
|
+
**Returns:** Mutation result.
|
|
1544
|
+
|
|
1545
|
+
### `useGetTask(id, options?)`
|
|
1546
|
+
|
|
1547
|
+
Fetches a single task by id.
|
|
1548
|
+
|
|
1549
|
+
**Parameters:**
|
|
1550
|
+
|
|
1551
|
+
- `id`: Task id
|
|
1552
|
+
- `options` (optional): Query options
|
|
1553
|
+
|
|
1554
|
+
**Returns:** Query result with the task.
|
|
1555
|
+
|
|
1556
|
+
### `useCancelTask(options?)`
|
|
1557
|
+
|
|
1558
|
+
Cancels a task. Invalidates the task and tasks-list queries.
|
|
1559
|
+
|
|
1560
|
+
**Parameters:** `mutate(id: string)`.
|
|
1561
|
+
|
|
1562
|
+
**Returns:** Mutation result.
|
|
1563
|
+
|
|
1564
|
+
### `useRetryTask(options?)`
|
|
1565
|
+
|
|
1566
|
+
Retries a task.
|
|
1567
|
+
|
|
1568
|
+
**Parameters:** `mutate(id: string)`.
|
|
1569
|
+
|
|
1570
|
+
**Returns:** Mutation result.
|
|
1571
|
+
|
|
1572
|
+
### `useTaskProgress(options?)`
|
|
1573
|
+
|
|
1574
|
+
Reports progress on a running task.
|
|
1575
|
+
|
|
1576
|
+
**Parameters:** `mutate({ id, data })`.
|
|
1577
|
+
|
|
1578
|
+
**Returns:** Mutation result.
|
|
1579
|
+
|
|
1580
|
+
### `useTaskSignal(options?)`
|
|
1581
|
+
|
|
1582
|
+
Sends a signal to a running task.
|
|
1583
|
+
|
|
1584
|
+
**Parameters:** `mutate({ id, data, branchId? })`.
|
|
1585
|
+
|
|
1586
|
+
**Returns:** Mutation result.
|
|
1587
|
+
|
|
1588
|
+
_β Webcron: Inspection bins_
|
|
1589
|
+
|
|
1590
|
+
### `useListInspectionBins(options?)`
|
|
1591
|
+
|
|
1592
|
+
Lists inspection bins.
|
|
1593
|
+
|
|
1594
|
+
**Parameters:**
|
|
1595
|
+
|
|
1596
|
+
- `options` (optional): Query options
|
|
1597
|
+
|
|
1598
|
+
**Returns:** Query result with the bins array.
|
|
1599
|
+
|
|
1600
|
+
### `useCreateInspectionBin(options?)`
|
|
1601
|
+
|
|
1602
|
+
Creates a new inspection bin.
|
|
1603
|
+
|
|
1604
|
+
**Parameters:** `mutate(data)`.
|
|
1605
|
+
|
|
1606
|
+
**Returns:** Mutation result.
|
|
1607
|
+
|
|
1608
|
+
### `useGetInspectionBin(id, options?)`
|
|
1609
|
+
|
|
1610
|
+
Fetches a single inspection bin by id.
|
|
1611
|
+
|
|
1612
|
+
**Parameters:**
|
|
1613
|
+
|
|
1614
|
+
- `id`: Bin id
|
|
1615
|
+
- `options` (optional): Query options
|
|
1616
|
+
|
|
1617
|
+
**Returns:** Query result with the bin.
|
|
1618
|
+
|
|
1619
|
+
### `useDeleteInspectionBin(options?)`
|
|
1620
|
+
|
|
1621
|
+
Deletes an inspection bin.
|
|
1622
|
+
|
|
1623
|
+
**Parameters:** `mutate(id: string)`.
|
|
1624
|
+
|
|
1625
|
+
**Returns:** Mutation result.
|
|
1626
|
+
|
|
1627
|
+
### `useGetBinRequests(id, params?, options?)`
|
|
1628
|
+
|
|
1629
|
+
Lists requests captured by an inspection bin.
|
|
1630
|
+
|
|
1631
|
+
**Parameters:**
|
|
1632
|
+
|
|
1633
|
+
- `id`: Bin id
|
|
1634
|
+
- `params` (optional): `{ limit?: number; offset?: number }`
|
|
1635
|
+
- `options` (optional): Query options
|
|
1636
|
+
|
|
1637
|
+
**Returns:** Query result with the requests.
|
|
1638
|
+
|
|
1639
|
+
### `useClearBinRequests(options?)`
|
|
1640
|
+
|
|
1641
|
+
Clears all requests stored in an inspection bin.
|
|
1642
|
+
|
|
1643
|
+
**Parameters:** `mutate(id: string)`.
|
|
1644
|
+
|
|
1645
|
+
**Returns:** Mutation result.
|
|
1646
|
+
|
|
1647
|
+
_β Webcron: Workflow trigger_
|
|
1648
|
+
|
|
1649
|
+
### `useTriggerWorkflowById(options?)`
|
|
1650
|
+
|
|
1651
|
+
Triggers a workflow run via webcron.
|
|
1652
|
+
|
|
1653
|
+
**Parameters:** `mutate(params: TriggerWorkflowByIdParams)`.
|
|
1654
|
+
|
|
1655
|
+
**Returns:** Mutation result with `data: TriggerWorkflowResponse[]`.
|
|
1656
|
+
|
|
1657
|
+
_β Workbook hooks (mutations)_
|
|
1658
|
+
|
|
1659
|
+
### `useGetWorkbookDetails(workbookId, options?)`
|
|
1660
|
+
|
|
1661
|
+
Fetches workbook metadata/details.
|
|
1662
|
+
|
|
1663
|
+
**Parameters:**
|
|
1664
|
+
|
|
1665
|
+
- `workbookId`: Workbook id (null/undefined disables the query)
|
|
1666
|
+
- `options` (optional): Query options
|
|
1667
|
+
|
|
1668
|
+
**Returns:** Query result with the workbook details.
|
|
1669
|
+
|
|
1670
|
+
### `useSaveWorkbook(options?)`
|
|
1671
|
+
|
|
1672
|
+
Saves a workbook draft.
|
|
1673
|
+
|
|
1674
|
+
**Parameters:** `mutate(request: SaveWorkbookRequest)`.
|
|
1675
|
+
|
|
1676
|
+
**Returns:** Mutation result.
|
|
1677
|
+
|
|
1678
|
+
### `usePublishWorkbook(options?)`
|
|
1679
|
+
|
|
1680
|
+
Publishes a workbook.
|
|
1681
|
+
|
|
1682
|
+
**Parameters:** `mutate(request: PublishWorkbookRequest)`.
|
|
1683
|
+
|
|
1684
|
+
**Returns:** Mutation result.
|
|
1685
|
+
|
|
1686
|
+
_β Workflow hooks (extras)_
|
|
1687
|
+
|
|
1688
|
+
### `useGetAllHttpTriggers(options?)`
|
|
1689
|
+
|
|
1690
|
+
Lists all HTTP triggers.
|
|
1691
|
+
|
|
1692
|
+
**Parameters:**
|
|
1693
|
+
|
|
1694
|
+
- `options` (optional): Query options
|
|
1695
|
+
|
|
1696
|
+
**Returns:** Query result with `data: HttpTrigger[]`.
|
|
1697
|
+
|
|
630
1698
|
## Configuration
|
|
631
1699
|
|
|
632
1700
|
### Default Query Configuration
|