@bluecopa/react 0.1.116 → 0.1.118
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 +465 -1260
- package/dist/hooks/pipeline/useGetPipeline.d.ts +9 -0
- package/dist/hooks/pipeline/useGetPipeline.d.ts.map +1 -0
- package/dist/hooks/pipeline/useGetPipelineRunStatus.d.ts +9 -0
- package/dist/hooks/pipeline/useGetPipelineRunStatus.d.ts.map +1 -0
- package/dist/hooks/pipeline/useRunPipeline.d.ts +9 -0
- package/dist/hooks/pipeline/useRunPipeline.d.ts.map +1 -0
- package/dist/hooks/pipeline/useSavePipeline.d.ts +8 -0
- package/dist/hooks/pipeline/useSavePipeline.d.ts.map +1 -0
- package/dist/hooks/solutions/useSolutionSeedData.d.ts +10 -0
- package/dist/hooks/solutions/useSolutionSeedData.d.ts.map +1 -0
- package/dist/hooks/solutions/useSolutionsPackaging.d.ts +36 -0
- package/dist/hooks/solutions/useSolutionsPackaging.d.ts.map +1 -0
- package/dist/hooks/useConnectionsAuthoring.d.ts +20 -0
- package/dist/hooks/useConnectionsAuthoring.d.ts.map +1 -0
- package/dist/hooks/useCreateWorkbook.d.ts +4 -0
- package/dist/hooks/useCreateWorkbook.d.ts.map +1 -0
- package/dist/hooks/useCustomObjects.d.ts +12 -0
- package/dist/hooks/useCustomObjects.d.ts.map +1 -0
- package/dist/hooks/useCustomObjectsOfType.d.ts +12 -0
- package/dist/hooks/useCustomObjectsOfType.d.ts.map +1 -0
- package/dist/hooks/useCustomTypeMetadata.d.ts +12 -0
- package/dist/hooks/useCustomTypeMetadata.d.ts.map +1 -0
- package/dist/hooks/useCustomTypeMetadataList.d.ts +10 -0
- package/dist/hooks/useCustomTypeMetadataList.d.ts.map +1 -0
- package/dist/hooks/useDashboardsHub.d.ts +26 -0
- package/dist/hooks/useDashboardsHub.d.ts.map +1 -0
- package/dist/hooks/useDatasetsHub.d.ts +9 -0
- package/dist/hooks/useDatasetsHub.d.ts.map +1 -0
- package/dist/hooks/useDeleteCustomTypeMetadata.d.ts +8 -0
- package/dist/hooks/useDeleteCustomTypeMetadata.d.ts.map +1 -0
- package/dist/hooks/useExportConfigsHub.d.ts +19 -0
- package/dist/hooks/useExportConfigsHub.d.ts.map +1 -0
- package/dist/hooks/useExternalAppsAuthoring.d.ts +28 -0
- package/dist/hooks/useExternalAppsAuthoring.d.ts.map +1 -0
- package/dist/hooks/useGetAllTeams.d.ts +9 -0
- package/dist/hooks/useGetAllTeams.d.ts.map +1 -0
- package/dist/hooks/useGetFileById.d.ts +11 -0
- package/dist/hooks/useGetFileById.d.ts.map +1 -0
- package/dist/hooks/useHttpTriggersHub.d.ts +7 -0
- package/dist/hooks/useHttpTriggersHub.d.ts.map +1 -0
- package/dist/hooks/useIngestionAuthoring.d.ts +11 -0
- package/dist/hooks/useIngestionAuthoring.d.ts.map +1 -0
- package/dist/hooks/useInputTablesHub.d.ts +26 -0
- package/dist/hooks/useInputTablesHub.d.ts.map +1 -0
- package/dist/hooks/useProcessSheetsHub.d.ts +7 -0
- package/dist/hooks/useProcessSheetsHub.d.ts.map +1 -0
- package/dist/hooks/useProcessTriggersHub.d.ts +41 -0
- package/dist/hooks/useProcessTriggersHub.d.ts.map +1 -0
- package/dist/hooks/useRegisterCustomTypeMetadata.d.ts +9 -0
- package/dist/hooks/useRegisterCustomTypeMetadata.d.ts.map +1 -0
- package/dist/hooks/useTriggerWorkflow.d.ts +2 -0
- package/dist/hooks/useTriggerWorkflow.d.ts.map +1 -1
- package/dist/hooks/useVirtualDatasetsHub.d.ts +9 -0
- package/dist/hooks/useVirtualDatasetsHub.d.ts.map +1 -0
- package/dist/hooks/useWorkbooksHub.d.ts +7 -0
- package/dist/hooks/useWorkbooksHub.d.ts.map +1 -0
- package/dist/hooks/useWorkflowsHub.d.ts +9 -0
- package/dist/hooks/useWorkflowsHub.d.ts.map +1 -0
- package/dist/hooks/versioning/useCommitChanges.d.ts +5 -0
- package/dist/hooks/versioning/useCommitChanges.d.ts.map +1 -0
- package/dist/hooks/versioning/useCreateBranch.d.ts +5 -0
- package/dist/hooks/versioning/useCreateBranch.d.ts.map +1 -0
- package/dist/hooks/versioning/useListCommits.d.ts +9 -0
- package/dist/hooks/versioning/useListCommits.d.ts.map +1 -0
- package/dist/hooks/versioning/useListTags.d.ts +7 -0
- package/dist/hooks/versioning/useListTags.d.ts.map +1 -0
- package/dist/hooks/versioning/useMergeBranches.d.ts +5 -0
- package/dist/hooks/versioning/useMergeBranches.d.ts.map +1 -0
- package/dist/hooks/versioning/usePushBranch.d.ts +5 -0
- package/dist/hooks/versioning/usePushBranch.d.ts.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.es.js +1782 -1123
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,97 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
## A Comprehensive React Query Integration for Bluecopa
|
|
4
4
|
|
|
5
|
-
A React library
|
|
5
|
+
A React library of opinionated hooks that wrap [`@bluecopa/core`](https://www.npmjs.com/package/@bluecopa/core) with TanStack React Query — efficient data fetching, caching, and mutations against the Bluecopa platform, fully typed.
|
|
6
6
|
|
|
7
7
|
## Table of Contents
|
|
8
8
|
|
|
9
|
-
- [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- [
|
|
13
|
-
- [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- [`useUser(options?)`](#useuseroptions)
|
|
23
|
-
- [`useDataset(datasetId, options?)`](#usedatasetdatasetid-options)
|
|
24
|
-
- [`useDatasetSample(datasetId, options?)`](#usedatasetsampledatasetid-options)
|
|
25
|
-
- [`useMetric(metricId, options?)`](#usemetricmetricid-options)
|
|
26
|
-
- [`useInputTable(inputTableId, options?)`](#useinputtableinputtableid-options)
|
|
27
|
-
- [`useRows(tableId, options?)`](#userowstableid-options)
|
|
28
|
-
- [`useGetFileUrlByFileId(fileId, options?)`](#usegetfileurlbyfileidfileid-options)
|
|
29
|
-
- [`useGetFileByFolderIdAndName(folderId, name, options?)`](#usegetfilebyfolderidandnamefolderid-name-options)
|
|
30
|
-
- [`useGetPublishedWorkbookById(workbookId, options?)`](#usegetpublishedworkbookbyidworkbookid-options)
|
|
31
|
-
- [`useGetTableById(tableId, options?)`](#usegettablebyidtableid-options)
|
|
32
|
-
- [`useGetWorkbooksByType(workbookType, options?)`](#usegetworkbooksbytypeworkbooktype-options)
|
|
33
|
-
- [`useGetWorkflowInstanceStatusById(instanceId, options?)`](#usegetworkflowinstancestatusbyidinstanceid-options)
|
|
34
|
-
- [`useGetWorksheets(options?)`](#usegetworksheetsoptions)
|
|
35
|
-
- [`useGetWorksheetsByType(worksheetType, options?)`](#usegetworksheetsbytypeworksheettype-options)
|
|
36
|
-
- [`useRunDefinition(definitionId, options?)`](#userundefinitiondefinitionid-options)
|
|
37
|
-
- [`useRunPublishedDefinition(publishedDefinitionId, options?)`](#userunpublisheddefinitionpublisheddefinitionid-options)
|
|
38
|
-
- [`useRunSampleDefinition(sampleDefinitionId, options?)`](#userunsampledefinitionsampledefinitionid-options)
|
|
39
|
-
- [`useTriggerHttpWorkflow(workflowId, payload, options?)`](#usetriggerhttpworkflowworkflowid-payload-options)
|
|
40
|
-
- [`useTriggerWorkflow(workflowId, options?)`](#usetriggerworkflowworkflowid-options)
|
|
41
|
-
- [`useWorkbook(workbookId, options?)`](#useworkbookworkbookid-options)
|
|
42
|
-
- [`useWorkflow(workflowId, options?)`](#useworkflowworkflowid-options)
|
|
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), Workbook (mutations), and Workflow (extras) — see sections after `useWorksheet`._
|
|
45
|
-
- [Configuration](#configuration)
|
|
46
|
-
- [Default Query Configuration](#default-query-configuration)
|
|
47
|
-
- [Customizable Parameters](#customizable-parameters)
|
|
48
|
-
- [Advanced Usage](#advanced-usage)
|
|
49
|
-
- [Error Handling](#error-handling)
|
|
50
|
-
- [Manual Refetching](#manual-refetching)
|
|
51
|
-
- [Re-exports](#re-exports)
|
|
52
|
-
- [TypeScript Support](#typescript-support)
|
|
53
|
-
- [Development](#development)
|
|
9
|
+
- [Features](#features)
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Usage](#usage)
|
|
12
|
+
- [Query Provider Setup](#query-provider-setup)
|
|
13
|
+
- [Boilerplate Integration](#boilerplate-integration)
|
|
14
|
+
- [Hook Examples](#hook-examples)
|
|
15
|
+
- [Detailed Reference — Common Hooks](#detailed-reference--common-hooks)
|
|
16
|
+
- [Complete Hook Reference](#complete-hook-reference)
|
|
17
|
+
- [Configuration](#configuration)
|
|
18
|
+
- [Advanced Usage](#advanced-usage)
|
|
19
|
+
- [Re-exports](#re-exports)
|
|
20
|
+
- [TypeScript Support](#typescript-support)
|
|
21
|
+
- [Development](#development)
|
|
54
22
|
|
|
55
23
|
## Features
|
|
56
24
|
|
|
57
|
-
- ✅ First-class TypeScript
|
|
58
|
-
- 🔁
|
|
59
|
-
- 🛡
|
|
60
|
-
- ⚙
|
|
61
|
-
- 📦 Re-exports
|
|
62
|
-
-
|
|
63
|
-
- 🧩 Customizable query parameters (limit, caching, retries)
|
|
25
|
+
- ✅ First-class TypeScript with strict types
|
|
26
|
+
- 🔁 TanStack React Query v5 integration (queries, mutations, and headless controllers)
|
|
27
|
+
- 🛡 Consistent error handling — errors normalise to `{ message, status }`
|
|
28
|
+
- ⚙ Sensible default query configuration
|
|
29
|
+
- 📦 Re-exports core TanStack React Query utilities and devtools
|
|
30
|
+
- 🧩 Coverage across every Bluecopa domain: datasets, input tables, workbooks, worksheets, pipelines, recon (v1 + v2), solutions, versioning, inbox, process/process-tree, TCN, and the curated api/hub
|
|
64
31
|
|
|
65
32
|
## Installation
|
|
66
33
|
|
|
67
34
|
```bash
|
|
68
35
|
npm install @bluecopa/react
|
|
69
|
-
# or
|
|
36
|
+
# or
|
|
70
37
|
pnpm add @bluecopa/react
|
|
71
38
|
```
|
|
72
39
|
|
|
73
40
|
### Peer Dependencies
|
|
74
41
|
|
|
75
|
-
This package requires the following in your application:
|
|
76
|
-
|
|
77
42
|
```bash
|
|
78
43
|
npm install react@^18.0.0 react-dom@^18.0.0
|
|
79
44
|
```
|
|
80
45
|
|
|
46
|
+
Also install TanStack React Query if you set up the `QueryClient` yourself:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm install @tanstack/react-query
|
|
50
|
+
```
|
|
51
|
+
|
|
81
52
|
## Usage
|
|
82
53
|
|
|
83
54
|
### Query Provider Setup
|
|
84
55
|
|
|
85
|
-
Wrap your application with the React Query provider:
|
|
56
|
+
Wrap your application with the React Query provider and configure the core SDK once:
|
|
86
57
|
|
|
87
58
|
```tsx
|
|
88
59
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
60
|
+
import { copaSetConfig } from "@bluecopa/react";
|
|
61
|
+
|
|
62
|
+
copaSetConfig({
|
|
63
|
+
apiBaseUrl: "https://develop.bluecopa.com/api/v1",
|
|
64
|
+
workspaceId: "my-workspace-id",
|
|
65
|
+
accessToken: "my-access-token",
|
|
66
|
+
});
|
|
89
67
|
|
|
90
68
|
const queryClient = new QueryClient({
|
|
91
69
|
defaultOptions: {
|
|
92
|
-
queries: {
|
|
93
|
-
staleTime: 60 * 1000, // 1 minute
|
|
94
|
-
refetchOnWindowFocus: false,
|
|
95
|
-
},
|
|
70
|
+
queries: { staleTime: 60 * 1000, refetchOnWindowFocus: false },
|
|
96
71
|
},
|
|
97
72
|
});
|
|
98
73
|
|
|
@@ -100,15 +75,16 @@ function App() {
|
|
|
100
75
|
return (
|
|
101
76
|
<QueryClientProvider client={queryClient}>
|
|
102
77
|
<YourApp />
|
|
103
|
-
<ReactQueryDevtools initialIsOpen={false} />
|
|
104
78
|
</QueryClientProvider>
|
|
105
79
|
);
|
|
106
80
|
}
|
|
107
81
|
```
|
|
108
82
|
|
|
83
|
+
`copaSetConfig`, `copaGetConfig`, and the `reactQuery` / `ReactQueryDevtools` namespaces are re-exported from `@bluecopa/react` (see [Re-exports](#re-exports)).
|
|
84
|
+
|
|
109
85
|
### Boilerplate Integration
|
|
110
86
|
|
|
111
|
-
For projects
|
|
87
|
+
For projects generated by [`create-bluecopa-react-app`](https://www.npmjs.com/package/create-bluecopa-react-app), use a pre-configured `QueryProvider` that wires config from env vars:
|
|
112
88
|
|
|
113
89
|
```tsx
|
|
114
90
|
// src/providers/query-provider.tsx
|
|
@@ -126,10 +102,7 @@ export default function QueryProvider({
|
|
|
126
102
|
() =>
|
|
127
103
|
new QueryClient({
|
|
128
104
|
defaultOptions: {
|
|
129
|
-
queries: {
|
|
130
|
-
staleTime: 60 * 1000, // 1 minute
|
|
131
|
-
refetchOnWindowFocus: false,
|
|
132
|
-
},
|
|
105
|
+
queries: { staleTime: 60 * 1000, refetchOnWindowFocus: false },
|
|
133
106
|
},
|
|
134
107
|
}),
|
|
135
108
|
);
|
|
@@ -140,7 +113,6 @@ export default function QueryProvider({
|
|
|
140
113
|
const copaToken = import.meta.env.VITE_BLUECOPA_API_TOKEN
|
|
141
114
|
? atob(import.meta.env.VITE_BLUECOPA_API_TOKEN)
|
|
142
115
|
: "{}";
|
|
143
|
-
|
|
144
116
|
copaUser = JSON.parse(copaToken);
|
|
145
117
|
} catch (error) {
|
|
146
118
|
console.warn("Failed to parse VITE_BLUECOPA_API_TOKEN:", error);
|
|
@@ -164,1233 +136,492 @@ export default function QueryProvider({
|
|
|
164
136
|
}
|
|
165
137
|
```
|
|
166
138
|
|
|
167
|
-
**
|
|
168
|
-
|
|
169
|
-
| Variable | Description | Example |
|
|
170
|
-
| ---------------------------- | --------------------------------------------------- | ---------------------------------- |
|
|
171
|
-
| `VITE_BLUECOPA_API_URL` | Base URL for Bluecopa API | `https://develop.bluecopa.com` |
|
|
172
|
-
| `VITE_BLUECOPA_WORKSPACE_ID` | Your workspace identifier | `my-workspace-123` |
|
|
173
|
-
| `VITE_BLUECOPA_API_TOKEN` | Base64-encoded JSON string containing `accessToken` | `eyJhY2Nlc3NUb2tlbiI6IjEyMzQ1In0=` |
|
|
174
|
-
|
|
175
|
-
**Example `.env` file:**
|
|
176
|
-
|
|
177
|
-
```
|
|
178
|
-
VITE_BLUECOPA_API_URL=https://develop.bluecopa.com
|
|
179
|
-
VITE_BLUECOPA_WORKSPACE_ID=your-workspace-id
|
|
180
|
-
VITE_BLUECOPA_API_TOKEN=base64-encoded-json-here
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
Then wrap your application with this provider:
|
|
184
|
-
|
|
185
|
-
```tsx
|
|
186
|
-
import QueryProvider from "./providers/query-provider";
|
|
139
|
+
**Environment Variables:**
|
|
187
140
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
```
|
|
141
|
+
| Variable | Description | Example |
|
|
142
|
+
| ---------------------------- | --------------------------------------------------- | ------------------------------------- |
|
|
143
|
+
| `VITE_BLUECOPA_API_URL` | Base URL for the Bluecopa API (include `/api/v1`) | `https://develop.bluecopa.com/api/v1` |
|
|
144
|
+
| `VITE_BLUECOPA_WORKSPACE_ID` | Your workspace identifier | `my-workspace-123` |
|
|
145
|
+
| `VITE_BLUECOPA_API_TOKEN` | Base64-encoded JSON string containing `accessToken` | `eyJhY2Nlc3NUb2tlbiI6IjEyMzQ1In0=` |
|
|
196
146
|
|
|
197
|
-
|
|
147
|
+
> **Security:** any `VITE_*` variable is inlined into the browser bundle at build time, and Base64 is encoding, not encryption. `VITE_BLUECOPA_API_TOKEN` must be a scoped, non-secret client credential (least-privilege, with a rotation plan) — never a long-lived or privileged secret.
|
|
198
148
|
|
|
199
149
|
### Hook Examples
|
|
200
150
|
|
|
201
|
-
#### `useUser` - Fetch authenticated user
|
|
202
|
-
|
|
203
151
|
```tsx
|
|
204
152
|
import { useUser } from "@bluecopa/react";
|
|
205
153
|
|
|
206
154
|
function UserProfile() {
|
|
207
155
|
const { data, isLoading, error } = useUser({
|
|
208
|
-
staleTime: 5 * 60 * 1000,
|
|
156
|
+
staleTime: 5 * 60 * 1000,
|
|
209
157
|
retry: 2,
|
|
210
158
|
});
|
|
211
|
-
|
|
212
159
|
if (isLoading) return <div>Loading...</div>;
|
|
213
160
|
if (error) return <div>Error: {error.message}</div>;
|
|
214
|
-
|
|
215
161
|
return <div>Welcome, {data?.name}!</div>;
|
|
216
162
|
}
|
|
217
163
|
```
|
|
218
164
|
|
|
219
|
-
#### `useDataset` - Fetch dataset with query controls
|
|
220
|
-
|
|
221
|
-
```tsx
|
|
222
|
-
import { useDataset } from "@bluecopa/react";
|
|
223
|
-
|
|
224
|
-
function DatasetViewer({ datasetId }) {
|
|
225
|
-
const { data, isLoading } = useDataset(datasetId, {
|
|
226
|
-
limit: 500,
|
|
227
|
-
staleTime: 10 * 60 * 1000, // 10 minutes
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
if (isLoading) return <div>Loading dataset...</div>;
|
|
231
|
-
return (
|
|
232
|
-
<div>
|
|
233
|
-
{data?.name} ({data?.records?.length} records)
|
|
234
|
-
</div>
|
|
235
|
-
);
|
|
236
|
-
}
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
#### `useRows` - Fetch input table rows with Supabase-style filtering
|
|
240
|
-
|
|
241
165
|
```tsx
|
|
242
166
|
import { useRows } from "@bluecopa/react";
|
|
243
167
|
|
|
244
168
|
function TableRows({ tableId }) {
|
|
245
|
-
const { data, isLoading
|
|
169
|
+
const { data, isLoading } = useRows(tableId, {
|
|
246
170
|
status: "active",
|
|
247
171
|
price: "gte.100",
|
|
248
172
|
limit: 25,
|
|
249
173
|
offset: 0,
|
|
250
174
|
});
|
|
251
|
-
|
|
252
175
|
if (isLoading) return <div>Loading rows...</div>;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
return (
|
|
256
|
-
<div>
|
|
257
|
-
<div>Total: {data?.total_count ?? 0}</div>
|
|
258
|
-
{data?.data?.map((row) => (
|
|
259
|
-
<div key={row._copa_id}>{JSON.stringify(row)}</div>
|
|
260
|
-
))}
|
|
261
|
-
</div>
|
|
262
|
-
);
|
|
176
|
+
return <div>Total: {data?.total_count ?? 0}</div>;
|
|
263
177
|
}
|
|
264
178
|
```
|
|
265
179
|
|
|
266
|
-
📖
|
|
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
|
-
```
|
|
180
|
+
📖 For `useRows` filtering, pagination, and operator details, see [docs/useRows.md](./docs/useRows.md).
|
|
297
181
|
|
|
298
|
-
|
|
182
|
+
## Detailed Reference — Common Hooks
|
|
299
183
|
|
|
300
|
-
|
|
184
|
+
Query hooks return `{ data, isLoading, error, refetch, ... }` (TanStack `useQuery`). Mutation hooks return `{ mutate, mutateAsync, isPending, data, error, isError, isSuccess, reset }` (TanStack `useMutation`) and accept `UseMutationOptions` (`onSuccess`, `onError`, `onSettled`, `retry`, …).
|
|
301
185
|
|
|
302
186
|
### `useUser(options?)`
|
|
303
187
|
|
|
304
|
-
Fetches authenticated user
|
|
305
|
-
|
|
306
|
-
**Parameters:**
|
|
307
|
-
|
|
308
|
-
- `options` (optional): Query options extending TanStack React Query's `UseQueryOptions`
|
|
309
|
-
|
|
310
|
-
**Returns:**
|
|
311
|
-
|
|
312
|
-
- `data`: User object or `undefined`
|
|
313
|
-
- `isLoading`: Boolean indicating loading state
|
|
314
|
-
- `error`: Error object if request failed
|
|
315
|
-
- `refetch`: Function to manually trigger refetch
|
|
188
|
+
Fetches the authenticated user. `options` extends `UseQueryOptions`.
|
|
316
189
|
|
|
317
190
|
### `useDataset(datasetId, options?)`
|
|
318
191
|
|
|
319
|
-
Fetches dataset
|
|
320
|
-
|
|
321
|
-
**Parameters:**
|
|
322
|
-
|
|
323
|
-
- `datasetId`: ID of the dataset to fetch
|
|
324
|
-
- `options` (optional): Query options with:
|
|
325
|
-
- `limit`: Maximum records to fetch
|
|
326
|
-
- `staleTime`: Duration (ms) before data is considered stale
|
|
327
|
-
|
|
328
|
-
**Returns:**
|
|
329
|
-
|
|
330
|
-
- `data`: Dataset object containing name and records
|
|
331
|
-
- `isLoading`: Boolean indicating loading state
|
|
332
|
-
- `error`: Error object if request failed
|
|
333
|
-
- `refetch`: Function to manually trigger refetch
|
|
192
|
+
Fetches a dataset by id. `options` accepts `limit` and standard query options.
|
|
334
193
|
|
|
335
194
|
### `useDatasetSample(datasetId, options?)`
|
|
336
195
|
|
|
337
|
-
Fetches a representative sample of dataset
|
|
338
|
-
|
|
339
|
-
**Parameters:**
|
|
340
|
-
|
|
341
|
-
- `datasetId`: ID of the dataset
|
|
342
|
-
- `options` (optional): Query options with `enabled` flag
|
|
343
|
-
|
|
344
|
-
**Returns:**
|
|
345
|
-
|
|
346
|
-
- `data`: Object containing sample data
|
|
347
|
-
- `isLoading`: Boolean indicating loading state
|
|
348
|
-
- `refetch`: Function to manually trigger refetch
|
|
196
|
+
Fetches a representative sample of dataset rows. Supports `enabled`.
|
|
349
197
|
|
|
350
198
|
### `useMetric(metricId, options?)`
|
|
351
199
|
|
|
352
|
-
Fetches metric data by
|
|
353
|
-
|
|
354
|
-
**Parameters:**
|
|
355
|
-
|
|
356
|
-
- `metricId`: ID of the metric
|
|
357
|
-
- `options` (optional): Query options
|
|
358
|
-
|
|
359
|
-
**Returns:**
|
|
360
|
-
|
|
361
|
-
- `data`: Metric object with name and value
|
|
362
|
-
- `isLoading`: Boolean indicating loading state
|
|
363
|
-
- `error`: Error object if request failed
|
|
364
|
-
- `refetch`: Function to manually trigger refetch
|
|
200
|
+
Fetches computed metric data by id.
|
|
365
201
|
|
|
366
|
-
### `useInputTable(inputTableId, options?)`
|
|
202
|
+
### `useInputTable(inputTableId, inputTableViewId, options?)`
|
|
367
203
|
|
|
368
|
-
Fetches input table
|
|
369
|
-
|
|
370
|
-
**Parameters:**
|
|
371
|
-
|
|
372
|
-
- `inputTableId`: ID of the input table
|
|
373
|
-
- `options` (optional): Query options with `limitParams`:
|
|
374
|
-
- `limit`: Maximum rows to fetch
|
|
375
|
-
- `limitFrom`: Direction to apply limit from ('top' or 'bottom')
|
|
376
|
-
|
|
377
|
-
**Returns:**
|
|
378
|
-
|
|
379
|
-
- `data`: Input table object with rows
|
|
380
|
-
- `isLoading`: Boolean indicating loading state
|
|
381
|
-
- `error`: Error object if request failed
|
|
382
|
-
- `refetch`: Function to manually trigger refetch
|
|
204
|
+
Fetches an input table for a given view. `options` accepts `limitParams` (`limit`, `limitFrom: 'top' | 'bottom'`).
|
|
383
205
|
|
|
384
206
|
### `useRows(tableId, options?)`
|
|
385
207
|
|
|
386
|
-
Fetches
|
|
387
|
-
|
|
388
|
-
**Parameters:**
|
|
389
|
-
|
|
390
|
-
- `tableId`: ID of the input table (string | null | undefined)
|
|
391
|
-
- `options` (optional): Query options extending `GetRowsOptions` and `BaseQueryOptions`:
|
|
392
|
-
- `limit`: Maximum rows to fetch (1-10000)
|
|
393
|
-
- `offset`: Number of rows to skip
|
|
394
|
-
- `order`: Sort order ('asc' or 'desc')
|
|
395
|
-
- `order_by`: Column name to sort by
|
|
396
|
-
- Filter fields: Any column name with Supabase-style operator syntax (e.g., `status: 'active'`, `price: 'gte.100'`, `status: 'in.(active,pending)'`)
|
|
397
|
-
- `or`: Supabase/PostgREST group expression for OR conditions
|
|
398
|
-
- `and`: Supabase/PostgREST group expression for AND conditions
|
|
399
|
-
- React Query options: `enabled`, `staleTime`, `gcTime`, `retry`, `retryDelay`, `onSuccess`, `onError`
|
|
400
|
-
|
|
401
|
-
**Returns:**
|
|
402
|
-
|
|
403
|
-
- `data`: `GetRowsResponse` object containing:
|
|
404
|
-
- `data`: Array of row objects
|
|
405
|
-
- `count`: Number of rows in current page
|
|
406
|
-
- `total_count`: Total rows available
|
|
407
|
-
- `isLoading`: Boolean indicating loading state
|
|
408
|
-
- `error`: Error object if request failed
|
|
409
|
-
- `refetch`: Function to manually trigger refetch
|
|
410
|
-
|
|
411
|
-
**Example:**
|
|
412
|
-
|
|
413
|
-
```tsx
|
|
414
|
-
const { data, isLoading } = useRows("table-123", {
|
|
415
|
-
status: "active",
|
|
416
|
-
price: "gte.100",
|
|
417
|
-
limit: 25,
|
|
418
|
-
offset: 0,
|
|
419
|
-
});
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
📖 **For comprehensive documentation including all supported operators, filtering patterns, and advanced usage, see [docs/useRows.md](./docs/useRows.md)**
|
|
423
|
-
|
|
424
|
-
### `useGetFileUrlByFileId(fileId, options?)`
|
|
425
|
-
|
|
426
|
-
Fetches the URL for a file by its ID.
|
|
427
|
-
|
|
428
|
-
**Parameters:**
|
|
429
|
-
|
|
430
|
-
- `fileId`: ID of the file to fetch URL for
|
|
431
|
-
- `options` (optional): Query options extending TanStack React Query's `UseQueryOptions`
|
|
432
|
-
|
|
433
|
-
**Returns:**
|
|
434
|
-
|
|
435
|
-
- `data`: Object containing file URL
|
|
436
|
-
- `isLoading`: Boolean indicating loading state
|
|
437
|
-
- `error`: Error object if request failed
|
|
438
|
-
- `refetch`: Function to manually trigger refetch
|
|
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
|
-
|
|
457
|
-
### `useGetPublishedWorkbookById(workbookId, options?)`
|
|
458
|
-
|
|
459
|
-
Fetches published workbook details by ID.
|
|
460
|
-
|
|
461
|
-
**Parameters:**
|
|
462
|
-
|
|
463
|
-
- `workbookId`: ID of the published workbook
|
|
464
|
-
- `options` (optional): Query options
|
|
465
|
-
|
|
466
|
-
**Returns:**
|
|
467
|
-
|
|
468
|
-
- `data`: Published workbook object
|
|
469
|
-
- `isLoading`: Boolean indicating loading state
|
|
470
|
-
- `error`: Error object if request failed
|
|
471
|
-
- `refetch`: Function to manually trigger refetch
|
|
472
|
-
|
|
473
|
-
### `useGetTableById(tableId, options?)`
|
|
474
|
-
|
|
475
|
-
Fetches table metadata by ID.
|
|
476
|
-
|
|
477
|
-
**Parameters:**
|
|
478
|
-
|
|
479
|
-
- `tableId`: ID of the table
|
|
480
|
-
- `options` (optional): Query options
|
|
481
|
-
|
|
482
|
-
**Returns:**
|
|
483
|
-
|
|
484
|
-
- `data`: Table metadata object
|
|
485
|
-
- `isLoading`: Boolean indicating loading state
|
|
486
|
-
- `error`: Error object if request failed
|
|
487
|
-
- `refetch`: Function to manually trigger refetch
|
|
488
|
-
|
|
489
|
-
### `useGetWorkbooksByType(workbookType, options?)`
|
|
490
|
-
|
|
491
|
-
Fetches workbooks filtered by type.
|
|
492
|
-
|
|
493
|
-
**Parameters:**
|
|
494
|
-
|
|
495
|
-
- `workbookType`: Type of workbooks to fetch
|
|
496
|
-
- `options` (optional): Query options
|
|
497
|
-
|
|
498
|
-
**Returns:**
|
|
499
|
-
|
|
500
|
-
- `data`: Array of workbook objects
|
|
501
|
-
- `isLoading`: Boolean indicating loading state
|
|
502
|
-
- `error`: Error object if request failed
|
|
503
|
-
- `refetch`: Function to manually trigger refetch
|
|
504
|
-
|
|
505
|
-
### `useGetWorkflowInstanceStatusById(instanceId, options?)`
|
|
506
|
-
|
|
507
|
-
Fetches workflow instance status by ID.
|
|
508
|
-
|
|
509
|
-
**Parameters:**
|
|
510
|
-
|
|
511
|
-
- `instanceId`: ID of the workflow instance
|
|
512
|
-
- `options` (optional): Query options
|
|
513
|
-
|
|
514
|
-
**Returns:**
|
|
515
|
-
|
|
516
|
-
- `data`: Workflow status object
|
|
517
|
-
- `isLoading`: Boolean indicating loading state
|
|
518
|
-
- `error`: Error object if request failed
|
|
519
|
-
- `refetch`: Function to manually trigger refetch
|
|
520
|
-
|
|
521
|
-
### `useGetWorksheets(options?)`
|
|
522
|
-
|
|
523
|
-
Fetches all available worksheets.
|
|
524
|
-
|
|
525
|
-
**Parameters:**
|
|
526
|
-
|
|
527
|
-
- `options` (optional): Query options
|
|
528
|
-
|
|
529
|
-
**Returns:**
|
|
530
|
-
|
|
531
|
-
- `data`: Array of worksheet objects
|
|
532
|
-
- `isLoading`: Boolean indicating loading state
|
|
533
|
-
- `error`: Error object if request failed
|
|
534
|
-
- `refetch`: Function to manually trigger refetch
|
|
535
|
-
|
|
536
|
-
### `useGetWorksheetsByType(worksheetType, options?)`
|
|
537
|
-
|
|
538
|
-
Fetches worksheets filtered by type.
|
|
539
|
-
|
|
540
|
-
**Parameters:**
|
|
541
|
-
|
|
542
|
-
- `worksheetType`: Type of worksheets to fetch
|
|
543
|
-
- `options` (optional): Query options
|
|
544
|
-
|
|
545
|
-
**Returns:**
|
|
546
|
-
|
|
547
|
-
- `data`: Array of worksheet objects
|
|
548
|
-
- `isLoading`: Boolean indicating loading state
|
|
549
|
-
- `error`: Error object if request failed
|
|
550
|
-
- `refetch`: Function to manually trigger refetch
|
|
551
|
-
|
|
552
|
-
### `useRunDefinition(definitionId, options?)`
|
|
553
|
-
|
|
554
|
-
Executes a run definition.
|
|
555
|
-
|
|
556
|
-
**Parameters:**
|
|
557
|
-
|
|
558
|
-
- `definitionId`: ID of the run definition
|
|
559
|
-
- `options` (optional): Query options
|
|
560
|
-
|
|
561
|
-
**Returns:**
|
|
562
|
-
|
|
563
|
-
- `data`: Execution result
|
|
564
|
-
- `isLoading`: Boolean indicating loading state
|
|
565
|
-
- `error`: Error object if request failed
|
|
566
|
-
- `refetch`: Function to manually trigger refetch
|
|
567
|
-
|
|
568
|
-
### `useRunPublishedDefinition(publishedDefinitionId, options?)`
|
|
569
|
-
|
|
570
|
-
Executes a published run definition.
|
|
571
|
-
|
|
572
|
-
**Parameters:**
|
|
573
|
-
|
|
574
|
-
- `publishedDefinitionId`: ID of the published definition
|
|
575
|
-
- `options` (optional): Query options
|
|
576
|
-
|
|
577
|
-
**Returns:**
|
|
578
|
-
|
|
579
|
-
- `data`: Execution result
|
|
580
|
-
- `isLoading`: Boolean indicating loading state
|
|
581
|
-
- `error`: Error object if request failed
|
|
582
|
-
- `refetch`: Function to manually trigger refetch
|
|
583
|
-
|
|
584
|
-
### `useRunSampleDefinition(sampleDefinitionId, options?)`
|
|
585
|
-
|
|
586
|
-
Executes a sample run definition.
|
|
587
|
-
|
|
588
|
-
**Parameters:**
|
|
589
|
-
|
|
590
|
-
- `sampleDefinitionId`: ID of the sample definition
|
|
591
|
-
- `options` (optional): Query options
|
|
592
|
-
|
|
593
|
-
**Returns:**
|
|
594
|
-
|
|
595
|
-
- `data`: Sample execution result
|
|
596
|
-
- `isLoading`: Boolean indicating loading state
|
|
597
|
-
- `error`: Error object if request failed
|
|
598
|
-
- `refetch`: Function to manually trigger refetch
|
|
599
|
-
|
|
600
|
-
### `useTriggerHttpWorkflow(workflowId, payload, options?)`
|
|
601
|
-
|
|
602
|
-
Triggers an HTTP workflow execution.
|
|
603
|
-
|
|
604
|
-
**Parameters:**
|
|
605
|
-
|
|
606
|
-
- `workflowId`: ID of the workflow
|
|
607
|
-
- `payload`: Request payload
|
|
608
|
-
- `options` (optional): Query options
|
|
609
|
-
|
|
610
|
-
**Returns:**
|
|
611
|
-
|
|
612
|
-
- `data`: Workflow execution response
|
|
613
|
-
- `isLoading`: Boolean indicating loading state
|
|
614
|
-
- `error`: Error object if request failed
|
|
615
|
-
- `refetch`: Function to manually trigger refetch
|
|
616
|
-
|
|
617
|
-
### `useTriggerWorkflow(workflowId, options?)`
|
|
618
|
-
|
|
619
|
-
Triggers a workflow execution.
|
|
620
|
-
|
|
621
|
-
**Parameters:**
|
|
622
|
-
|
|
623
|
-
- `workflowId`: ID of the workflow
|
|
624
|
-
- `options` (optional): Query options
|
|
625
|
-
|
|
626
|
-
**Returns:**
|
|
627
|
-
|
|
628
|
-
- `data`: Workflow execution response
|
|
629
|
-
- `isLoading`: Boolean indicating loading state
|
|
630
|
-
- `error`: Error object if request failed
|
|
631
|
-
- `refetch`: Function to manually trigger refetch
|
|
632
|
-
|
|
633
|
-
### `useWorkbook(workbookId, options?)`
|
|
634
|
-
|
|
635
|
-
Fetches workbook details by ID.
|
|
636
|
-
|
|
637
|
-
**Parameters:**
|
|
638
|
-
|
|
639
|
-
- `workbookId`: ID of the workbook
|
|
640
|
-
- `options` (optional): Query options
|
|
641
|
-
|
|
642
|
-
**Returns:**
|
|
643
|
-
|
|
644
|
-
- `data`: Workbook object
|
|
645
|
-
- `isLoading`: Boolean indicating loading state
|
|
646
|
-
- `error`: Error object if request failed
|
|
647
|
-
- `refetch`: Function to manually trigger refetch
|
|
648
|
-
|
|
649
|
-
### `useWorkflow(workflowId, options?)`
|
|
650
|
-
|
|
651
|
-
Fetches workflow configuration by ID.
|
|
652
|
-
|
|
653
|
-
**Parameters:**
|
|
654
|
-
|
|
655
|
-
- `workflowId`: ID of the workflow
|
|
656
|
-
- `options` (optional): Query options
|
|
657
|
-
|
|
658
|
-
**Returns:**
|
|
659
|
-
|
|
660
|
-
- `data`: Workflow configuration object
|
|
661
|
-
- `isLoading`: Boolean indicating loading state
|
|
662
|
-
- `error`: Error object if request failed
|
|
663
|
-
- `refetch`: Function to manually trigger refetch
|
|
664
|
-
|
|
665
|
-
### `useWorksheet(worksheetId, options?)`
|
|
666
|
-
|
|
667
|
-
Fetches worksheet details by ID.
|
|
668
|
-
|
|
669
|
-
**Parameters:**
|
|
670
|
-
|
|
671
|
-
- `worksheetId`: ID of the worksheet
|
|
672
|
-
- `options` (optional): Query options
|
|
673
|
-
|
|
674
|
-
**Returns:**
|
|
675
|
-
|
|
676
|
-
- `data`: Worksheet object
|
|
677
|
-
- `isLoading`: Boolean indicating loading state
|
|
678
|
-
- `error`: Error object if request failed
|
|
679
|
-
- `refetch`: Function to manually trigger refetch
|
|
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.
|
|
208
|
+
Fetches input-table rows with Supabase/PostgREST-style filtering, paging, and sorting. `options` merges filter fields (e.g. `status: 'active'`, `price: 'gte.100'`, `status: 'in.(a,b)'`), `or`/`and` group expressions, `limit`, `offset`, `order`, `order_by`, and query options. Returns `{ data, count, total_count }`. See [docs/useRows.md](./docs/useRows.md).
|
|
827
209
|
|
|
828
|
-
|
|
210
|
+
### `useGetWorkbooksByType(type, options?)`
|
|
829
211
|
|
|
830
|
-
|
|
212
|
+
Lists workbooks of a given type.
|
|
831
213
|
|
|
832
|
-
|
|
214
|
+
### `useTriggerWorkflow(options?)` / `useTriggerHttpWorkflow(options?)`
|
|
833
215
|
|
|
834
|
-
|
|
216
|
+
Mutations that trigger a workflow (or HTTP-trigger workflow) run. Call `mutate(variables)`.
|
|
835
217
|
|
|
836
|
-
|
|
218
|
+
### `useSaveWorkbook(options?)` / `usePublishWorkbook(options?)`
|
|
837
219
|
|
|
838
|
-
|
|
220
|
+
Mutations to save a draft or publish a workbook.
|
|
839
221
|
|
|
840
|
-
|
|
841
|
-
- `options` (optional): Query options
|
|
222
|
+
## Complete Hook Reference
|
|
842
223
|
|
|
843
|
-
**
|
|
224
|
+
Every exported hook, grouped by domain. Legend: **query** = read (`useQuery`), **mutation** = write (`useMutation`), **controller** = composite/headless hook combining queries, mutations, and local state. Hooks suffixed with **(hub)** target the curated `/blui-api` surface.
|
|
844
225
|
|
|
845
|
-
|
|
226
|
+
### User & Teams
|
|
846
227
|
|
|
847
|
-
|
|
228
|
+
- `useUser(options?)` — query — current authenticated user.
|
|
229
|
+
- `useUserDetails(options?)` — query — alias of `useUser`.
|
|
230
|
+
- `useGetAllUsers(options?)` — query — all users in the workspace.
|
|
231
|
+
- `useGetAllTeams(options?)` — query — all teams in the workspace.
|
|
848
232
|
|
|
849
|
-
|
|
233
|
+
### Dataset
|
|
850
234
|
|
|
851
|
-
|
|
235
|
+
- `useDataset(datasetId, options?)` — query — a dataset by id.
|
|
236
|
+
- `useGetDatasets()` — query — all datasets.
|
|
237
|
+
- `useDatasetSample(datasetId, options?)` — query — a sample of dataset rows.
|
|
238
|
+
- `useGetVirtualDatasets()` — query — all virtual datasets.
|
|
852
239
|
|
|
853
|
-
|
|
240
|
+
### Datasets Hub
|
|
854
241
|
|
|
855
|
-
|
|
242
|
+
- `useDatasetSchema(datasetId, options?)` — query (hub) — a dataset's schema.
|
|
243
|
+
- `useSearchDatasets(query, options?)` — query (hub) — search datasets by text.
|
|
244
|
+
- `useDatasetStats(datasetId, columns?, options?)` — query (hub) — column statistics.
|
|
856
245
|
|
|
857
|
-
###
|
|
246
|
+
### Virtual Datasets Hub
|
|
858
247
|
|
|
859
|
-
|
|
248
|
+
- `useListVirtualDatasets(query?, options?)` — query (hub) — list virtual datasets.
|
|
249
|
+
- `useGetVirtualDataset(virtualDatasetId, options?)` — query (hub) — one virtual dataset.
|
|
250
|
+
- `useCreateVirtualDataset(options?)` — mutation (hub) — create a virtual dataset.
|
|
860
251
|
|
|
861
|
-
|
|
252
|
+
### Metric
|
|
862
253
|
|
|
863
|
-
- `
|
|
864
|
-
- `options` (optional): Query options
|
|
254
|
+
- `useMetric(metricId, options?)` — query — a metric by id.
|
|
865
255
|
|
|
866
|
-
|
|
256
|
+
### Input Table
|
|
867
257
|
|
|
868
|
-
|
|
258
|
+
- `useInputTable(inputTableId, inputTableViewId, options?)` — query — an input table for a view.
|
|
259
|
+
- `useGetInputTables()` — query — all input tables.
|
|
260
|
+
- `useGetTableById(tableId, options?)` — query — a table by id.
|
|
261
|
+
- `useRows(tableId, options?)` — query — rows for a table (filters/paging/sorting).
|
|
262
|
+
- `useInsertRow(options?)` — mutation — insert a row.
|
|
263
|
+
- `useUpdateRow(options?)` — mutation — update a row.
|
|
264
|
+
- `useDeleteRow(options?)` — mutation — delete a row.
|
|
869
265
|
|
|
870
|
-
###
|
|
266
|
+
### Input Tables Hub
|
|
871
267
|
|
|
872
|
-
|
|
268
|
+
- `useListInputTables(query?, options?)` — query (hub) — list input tables.
|
|
269
|
+
- `useGetInputTable(inputTableId, options?)` — query (hub) — one input table.
|
|
270
|
+
- `useInputTableSchema(ref, options?)` — query (hub) — an input table's schema.
|
|
271
|
+
- `useReadInputTableRows(ref, options?)` — query (hub) — read rows.
|
|
272
|
+
- `useInsertInputTableRows(ref, options?)` — mutation (hub) — bulk-insert rows.
|
|
273
|
+
- `useUpdateInputTableRows(ref, options?)` — mutation (hub) — bulk-update rows.
|
|
274
|
+
- `useDeleteInputTableRows(ref, options?)` — mutation (hub) — bulk-delete rows.
|
|
275
|
+
- `useCreateInputTable(options?)` — mutation (hub) — create an input table.
|
|
276
|
+
- `useDeleteInputTable(ref, options?)` — mutation (hub) — delete an input table.
|
|
873
277
|
|
|
874
|
-
|
|
278
|
+
### Workbook
|
|
875
279
|
|
|
876
|
-
- `
|
|
877
|
-
- `options`
|
|
280
|
+
- `useGetWorkbookDetails(workbookId, options?)` — query — full workbook details.
|
|
281
|
+
- `useGetWorkbooksByType(type, options?)` — query — workbooks of a type.
|
|
282
|
+
- `useGetPublishedWorkbookById(type, id, options?)` — query — a published workbook.
|
|
283
|
+
- `useSaveWorkbook(options?)` — mutation — save/update a workbook.
|
|
284
|
+
- `usePublishWorkbook(options?)` — mutation — publish a workbook.
|
|
285
|
+
- `useDeleteWorkbook(options?)` — mutation — delete a workbook.
|
|
286
|
+
- `useCreateWorkbook(options?)` — mutation — create a workbook.
|
|
878
287
|
|
|
879
|
-
|
|
288
|
+
### Workbooks Hub
|
|
880
289
|
|
|
881
|
-
|
|
290
|
+
- `useListWorkbooks(query?, options?)` — query (hub) — list workbooks.
|
|
291
|
+
- `useGetWorkbook(workbookId, options?)` — query (hub) — one workbook.
|
|
882
292
|
|
|
883
|
-
|
|
293
|
+
### Worksheet / Views
|
|
884
294
|
|
|
885
|
-
|
|
295
|
+
- `useGetWorksheets(worksheetIds, options?)` — query — worksheets by ids.
|
|
296
|
+
- `useGetWorksheetsByType(type, options?)` — query — worksheets of a type.
|
|
297
|
+
- `useGetViewById(viewId, options?)` — query — a view by id.
|
|
298
|
+
- `useGetViewsBySheetId(sheetId, options?)` — query — views for a sheet.
|
|
299
|
+
- `useGetRunsByViewId(viewId, options?)` — query — runs for a view.
|
|
300
|
+
- `useGetRunResultById(runId, options?)` — query — a run result by id.
|
|
886
301
|
|
|
887
|
-
|
|
888
|
-
- `formRevision`: Schema revision (string or number, null/undefined disables the query)
|
|
889
|
-
- `options` (optional): Query options
|
|
302
|
+
### Workflow
|
|
890
303
|
|
|
891
|
-
|
|
304
|
+
- `useTriggerWorkflow(options?)` — mutation — trigger a workflow run.
|
|
305
|
+
- `useTriggerHttpWorkflow(options?)` — mutation — trigger an HTTP-trigger workflow.
|
|
306
|
+
- `useGetWorkflowInstanceStatusById(options?)` — mutation — workflow instance status (request-based).
|
|
307
|
+
- `useGetAllHttpTriggers(options?)` — query — all HTTP triggers.
|
|
892
308
|
|
|
893
|
-
###
|
|
309
|
+
### Workflows Hub
|
|
894
310
|
|
|
895
|
-
|
|
311
|
+
- `useListWorkflows(query?, options?)` — query (hub) — list workflows.
|
|
312
|
+
- `useGetWorkflow(workflowId, options?)` — query (hub) — one workflow.
|
|
313
|
+
- `useSaveWorkflow(options?)` — mutation (hub) — save/update a workflow.
|
|
896
314
|
|
|
897
|
-
|
|
315
|
+
### HTTP Triggers Hub
|
|
898
316
|
|
|
899
|
-
- `
|
|
900
|
-
- `options` (
|
|
317
|
+
- `useListHttpTriggers(query?, options?)` — query (hub) — list HTTP triggers.
|
|
318
|
+
- `useGetHttpTrigger(triggerId, options?)` — query (hub) — one HTTP trigger.
|
|
901
319
|
|
|
902
|
-
|
|
320
|
+
### Definitions (Pipeline runs)
|
|
903
321
|
|
|
904
|
-
|
|
322
|
+
- `useRunDefinition(options?)` — mutation — run a definition.
|
|
323
|
+
- `useRunPublishedDefinition(options?)` — mutation — run a published definition.
|
|
324
|
+
- `useRunSampleDefinition(options?)` — mutation — run a definition against a sample.
|
|
905
325
|
|
|
906
|
-
|
|
326
|
+
### Recon (v1)
|
|
907
327
|
|
|
908
|
-
|
|
328
|
+
- `useRunRecon(options?)` — mutation — run a reconciliation.
|
|
329
|
+
- `useGetAllRecon(options?)` — query — all recon workflows.
|
|
909
330
|
|
|
910
|
-
|
|
331
|
+
### Recon V2
|
|
911
332
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
- `
|
|
923
|
-
- `options`
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
- `
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
- `options`
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
- `options`
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
- `options`
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
###
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
- `
|
|
998
|
-
- `
|
|
999
|
-
- `options`
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
- `sheetId
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
- `options`
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
- `options` (
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
- `options`
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
- `
|
|
1087
|
-
- `
|
|
1088
|
-
- `
|
|
1089
|
-
- `options`
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
- `
|
|
1100
|
-
- `options`
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
###
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
- `
|
|
1122
|
-
- `options` (
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
- `
|
|
1133
|
-
- `options` (
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
- `options`
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
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
|
-
_— Workbook hooks (mutations)_
|
|
1355
|
-
|
|
1356
|
-
### `useGetWorkbookDetails(workbookId, options?)`
|
|
1357
|
-
|
|
1358
|
-
Fetches workbook metadata/details.
|
|
1359
|
-
|
|
1360
|
-
**Parameters:**
|
|
1361
|
-
|
|
1362
|
-
- `workbookId`: Workbook id (null/undefined disables the query)
|
|
1363
|
-
- `options` (optional): Query options
|
|
1364
|
-
|
|
1365
|
-
**Returns:** Query result with the workbook details.
|
|
1366
|
-
|
|
1367
|
-
### `useSaveWorkbook(options?)`
|
|
1368
|
-
|
|
1369
|
-
Saves a workbook draft.
|
|
1370
|
-
|
|
1371
|
-
**Parameters:** `mutate(request: SaveWorkbookRequest)`.
|
|
1372
|
-
|
|
1373
|
-
**Returns:** Mutation result.
|
|
1374
|
-
|
|
1375
|
-
### `usePublishWorkbook(options?)`
|
|
1376
|
-
|
|
1377
|
-
Publishes a workbook.
|
|
1378
|
-
|
|
1379
|
-
**Parameters:** `mutate(request: PublishWorkbookRequest)`.
|
|
1380
|
-
|
|
1381
|
-
**Returns:** Mutation result.
|
|
1382
|
-
|
|
1383
|
-
_— Workflow hooks (extras)_
|
|
1384
|
-
|
|
1385
|
-
### `useGetAllHttpTriggers(options?)`
|
|
1386
|
-
|
|
1387
|
-
Lists all HTTP triggers.
|
|
1388
|
-
|
|
1389
|
-
**Parameters:**
|
|
1390
|
-
|
|
1391
|
-
- `options` (optional): Query options
|
|
1392
|
-
|
|
1393
|
-
**Returns:** Query result with `data: HttpTrigger[]`.
|
|
333
|
+
- `useCreateReconV2(options?)` — mutation — create a workflow.
|
|
334
|
+
- `useUpdateReconV2(options?)` — mutation — update a workflow.
|
|
335
|
+
- `useDeleteReconV2(options?)` — mutation — delete a workflow.
|
|
336
|
+
- `useRunReconV2(options?)` — mutation — run a workflow.
|
|
337
|
+
- `useGetAllReconV2(options?)` — query — all workflows.
|
|
338
|
+
- `useGetReconV2Runs(workflowId, options?)` — query — runs for a workflow.
|
|
339
|
+
- `useReconV2Templates(options?)` — query — template catalog.
|
|
340
|
+
- `useGetReconV2RunResult(runId, options?)` — query — a run's result.
|
|
341
|
+
- `useGetReconV2SmartResult(params, options?)` — query — smart-match results.
|
|
342
|
+
- `useStartReconV2Profile(options?)` — mutation — start a profiling job.
|
|
343
|
+
- `useGetReconV2ProfileResult(workflowId, side?, options?)` — query — profile results.
|
|
344
|
+
- `useStartReconV2Clean(options?)` — mutation — start a clean job.
|
|
345
|
+
- `useGetReconV2CleanResult(workflowId, side?, options?)` — query — clean results.
|
|
346
|
+
- `useGetReconV2Diff(runId, workflowId, prevRunId, options?)` — query — diff between runs.
|
|
347
|
+
- `useGetReconV2Explanation(runId, workflowId, options?)` — query — AI explanation for a run.
|
|
348
|
+
- `useReconV2RunStatus(runId, options?)` — controller — poll a run's status.
|
|
349
|
+
- `useGetReconV2Workflow(id, options?)` — query — a single workflow.
|
|
350
|
+
- `useReconV2List(filter?, options?)` — controller — list with filtering state.
|
|
351
|
+
- `useReconV2Detail(id, options?)` — controller — load/manage a workflow's detail.
|
|
352
|
+
- `useReconV2Editor()` — controller — create/update editor.
|
|
353
|
+
- `useReconV2RunController(workflowId, options?)` — controller — trigger + track a run.
|
|
354
|
+
- `useReconV2Results({ runId, workflowId, exceptionType, ruleFilter, orderBy })` — controller — fetch/filter run results.
|
|
355
|
+
|
|
356
|
+
### Statement
|
|
357
|
+
|
|
358
|
+
- `useGetStatementData(statementId, viewId?, runId?, options?)` — query — statement data.
|
|
359
|
+
- `useCreateStatementRun(options?)` — mutation — create a statement run.
|
|
360
|
+
|
|
361
|
+
### Chat
|
|
362
|
+
|
|
363
|
+
- `useCreateThread(options?)` — mutation — create a thread.
|
|
364
|
+
- `useGetCommentsByThreadId(threadId, options?)` — query — comments for a thread.
|
|
365
|
+
- `usePostComment(options?)` — mutation — post a comment.
|
|
366
|
+
- `useUpdateComment(options?)` — mutation — update a comment.
|
|
367
|
+
- `useDeleteComment(options?)` — mutation — delete a comment.
|
|
368
|
+
- `useSubscribeUser(options?)` — mutation — subscribe a user to a thread.
|
|
369
|
+
- `useUnsubscribeUser(options?)` — mutation — unsubscribe a user.
|
|
370
|
+
- `useCheckSubscriptionStatus(userId, threadId, options?)` — query — subscription status.
|
|
371
|
+
|
|
372
|
+
### Email Engine
|
|
373
|
+
|
|
374
|
+
- `useGetAllConversations(params?, options?)` — query — list conversations (paged).
|
|
375
|
+
- `useGetConversation(conversationId, options?)` — query — one conversation.
|
|
376
|
+
- `useCreateConversation(options?)` — mutation — create a conversation.
|
|
377
|
+
- `useReplyToConversation(options?)` — mutation — reply to a conversation.
|
|
378
|
+
- `useFilterMessagesBySenderId(params, options?)` — query — messages by sender id.
|
|
379
|
+
- `useSearchMessages(options?)` — mutation — search messages (request-based).
|
|
380
|
+
|
|
381
|
+
### Files
|
|
382
|
+
|
|
383
|
+
- `useFileUpload(options?)` — mutation — upload a file.
|
|
384
|
+
- `useFileDownload({ fileId, contentType, method })` — query — download a file.
|
|
385
|
+
- `useGetFileById(id, options?)` — query — a filebox file by id.
|
|
386
|
+
- `useGetFileByFolderIdAndName(folderId, name, options?)` — query — a file by folder + name.
|
|
387
|
+
- `useGetFileUrlByFileId(key, contentType, method, options?)` — query — presigned URL for a file.
|
|
388
|
+
|
|
389
|
+
### Forms
|
|
390
|
+
|
|
391
|
+
- `useGetFormSchema(formInstanceId, formRevision, options?)` — query — a form schema.
|
|
392
|
+
- `useGetFormData(formId, options?)` — query — submitted form data.
|
|
393
|
+
- `useGetFormById(formId, options?)` — query — a form by id.
|
|
394
|
+
- `useCreateOrUpdateForm(options?)` — mutation — create/update a form.
|
|
395
|
+
|
|
396
|
+
### Audit
|
|
397
|
+
|
|
398
|
+
- `useGetAuditLogs(options?)` — mutation — fetch audit logs (request-based).
|
|
399
|
+
- `useCreateAuditLog(options?)` — mutation — create an audit log entry.
|
|
400
|
+
|
|
401
|
+
### Task
|
|
402
|
+
|
|
403
|
+
- `useGetTaskDetails(taskId, options?)` — query — task details.
|
|
404
|
+
- `useMarkTaskDone(options?)` — mutation — mark a task done.
|
|
405
|
+
- `useReassignTask(options?)` — mutation — reassign a task.
|
|
406
|
+
|
|
407
|
+
### Templated Pipeline & Templates
|
|
408
|
+
|
|
409
|
+
- `useGetAllTemplatedPipelines(options?)` — query — all templated pipelines.
|
|
410
|
+
- `useRenderTemplate(options?)` — mutation — render a template.
|
|
411
|
+
|
|
412
|
+
### Process (triggers & schedules)
|
|
413
|
+
|
|
414
|
+
- `useGetTriggersBySheet(sheetId, options?)` — query — triggers for a sheet.
|
|
415
|
+
- `useRegisterProcessTrigger(options?)` — mutation — register a trigger.
|
|
416
|
+
- `useDeleteProcessTrigger(options?)` — mutation — delete a trigger.
|
|
417
|
+
- `usePauseSchedule(options?)` — mutation — pause a schedule.
|
|
418
|
+
- `useResumeSchedule(options?)` — mutation — resume a schedule.
|
|
419
|
+
- `useGetScheduleStatus(triggerId, scheduleName, options?)` — query — schedule status.
|
|
420
|
+
- `useExecuteNow(options?)` — mutation — execute a schedule immediately.
|
|
421
|
+
|
|
422
|
+
### Process Triggers Hub
|
|
423
|
+
|
|
424
|
+
- `useRegisterTrigger(options?)` — mutation (hub) — register a trigger.
|
|
425
|
+
- `useDeleteTrigger(options?)` — mutation (hub) — delete a trigger.
|
|
426
|
+
- `useExecuteTriggerNow(options?)` — mutation (hub) — execute a trigger now.
|
|
427
|
+
- `usePauseTrigger(options?)` — mutation (hub) — pause a trigger.
|
|
428
|
+
- `useResumeTrigger(options?)` — mutation (hub) — resume a trigger.
|
|
429
|
+
- `useSkipTrigger(options?)` — mutation (hub) — skip next execution.
|
|
430
|
+
- `useTriggerScheduleStatus(triggerId, options?)` — query (hub) — trigger schedule status.
|
|
431
|
+
- `useUpcomingSchedules(triggerId, options?)` — query (hub) — upcoming scheduled runs.
|
|
432
|
+
- `useTriggersBySheet(sheetId, options?)` — query (hub) — triggers for a sheet.
|
|
433
|
+
|
|
434
|
+
### Process Sheets Hub
|
|
435
|
+
|
|
436
|
+
- `useSheetRuns(sheetId, options?)` — query (hub) — runs for a process sheet.
|
|
437
|
+
- `useSheetRunStatus(sheetId, options?)` — query (hub) — a sheet's run status.
|
|
438
|
+
|
|
439
|
+
### Process Tree
|
|
440
|
+
|
|
441
|
+
- `useCreateOrUpdateProcessTreeTrigger(options?)` — mutation — create/update a trigger.
|
|
442
|
+
- `useExecuteProcessTreeTrigger(options?)` — mutation — execute a trigger.
|
|
443
|
+
- `useTerminateProcessTreePipelines(options?)` — mutation — terminate running pipelines.
|
|
444
|
+
- `useLogProcessTreeRun(options?)` — mutation — log a run.
|
|
445
|
+
- `useUpdateProcessTreeRunContext(options?)` — mutation — update a run's context.
|
|
446
|
+
- `useDeleteProcessTreeTrigger(options?)` — mutation — delete a trigger.
|
|
447
|
+
- `useGetProcessTreeTrigger(id, options?)` — query — a trigger by id.
|
|
448
|
+
- `useGetProcessTreeTriggersBySheetId(sheetId, options?)` — query — triggers for a sheet.
|
|
449
|
+
- `useGetProcessTreeRunsBySheetId(sheetId, options?)` — query — runs for a sheet.
|
|
450
|
+
- `useGetProcessTreeRunsBySheetIdPaginated(sheetId, query?, options?)` — query — runs for a sheet (paged).
|
|
451
|
+
- `useGetProcessTreeRunByInstanceId(instanceId, options?)` — query — a run by instance id.
|
|
452
|
+
|
|
453
|
+
### Custom Authorization
|
|
454
|
+
|
|
455
|
+
- `useCustomAuthzModel(options?)` — query — the custom authz model.
|
|
456
|
+
- `useRegisterCustomAuthzModel(options?)` — mutation — register a model.
|
|
457
|
+
- `useUpdateCustomObjectPermissions(options?)` — mutation — update object permissions.
|
|
458
|
+
- `useBulkUpdateCustomObjectPermissions(options?)` — mutation — bulk-update permissions.
|
|
459
|
+
- `useCheckCustomPermissions(options?)` — mutation — check permissions.
|
|
460
|
+
- `useBulkCheckCustomPermissions(options?)` — mutation — bulk-check permissions.
|
|
461
|
+
|
|
462
|
+
### Permissions
|
|
463
|
+
|
|
464
|
+
- `useDocumentPermissions(objectId, objectType, options?)` — query — permissions for a document/object.
|
|
465
|
+
|
|
466
|
+
### Inbox (v1)
|
|
467
|
+
|
|
468
|
+
- `useGetAllInboxItems(params?, options?)` — query — all inbox items (paged).
|
|
469
|
+
- `useMarkItemAsRead(options?)` — mutation — mark an item read.
|
|
470
|
+
- `useMarkItemAsUnread(options?)` — mutation — mark an item unread.
|
|
471
|
+
- `useCreateInboxItemPerUser(options?)` — mutation — create an item per user.
|
|
472
|
+
|
|
473
|
+
### Inbox V2 / TaskQueue
|
|
474
|
+
|
|
475
|
+
- `useListInboxTypes(options?)` — query — inbox item types.
|
|
476
|
+
- `useGetInboxType(id, options?)` — query — one item type.
|
|
477
|
+
- `useCreateInboxType(options?)` — mutation — create an item type.
|
|
478
|
+
- `useUpdateInboxType(options?)` — mutation — update an item type.
|
|
479
|
+
- `useDeleteInboxType(options?)` — mutation — delete an item type.
|
|
480
|
+
- `useListMyInboxItems(params?)` — query — the current user's items (paged).
|
|
481
|
+
- `useGetInboxItem(id, options?)` — query — one item.
|
|
482
|
+
- `useCreateInboxItem(options?)` — mutation — create items.
|
|
483
|
+
- `useUpdateInboxItem(options?)` — mutation — update an item.
|
|
484
|
+
- `useMarkInboxItemsRead(options?)` / `useMarkInboxItemsUnread(options?)` — mutation — mark items read/unread.
|
|
485
|
+
- `useSnoozeInboxItem(options?)` / `useDismissInboxItem(options?)` — mutation — snooze/dismiss.
|
|
486
|
+
- `useClaimInboxItem(options?)` / `useCompleteInboxItem(options?)` / `useReleaseInboxItem(options?)` — mutation — claim/complete/release.
|
|
487
|
+
- `useCancelInboxItem(options?)` / `useReassignInboxItem(options?)` — mutation — cancel/reassign.
|
|
488
|
+
- `useCompleteInboxItemsByKey(options?)` / `useCancelInboxItemsByKey(options?)` — mutation — complete/cancel by key.
|
|
489
|
+
|
|
490
|
+
### TCN (Telephony)
|
|
491
|
+
|
|
492
|
+
- `useTcnAuthUrl(options?)` — query — OAuth authorization URL.
|
|
493
|
+
- `useTcnExchangeCode(options?)` / `useTcnRefreshToken(options?)` — mutation — token exchange/refresh.
|
|
494
|
+
- `useTcnCurrentAgent(options?)` — mutation — current agent (token-based).
|
|
495
|
+
- `useTcnAgentSkills(options?)` — mutation — agent hunt-group skills.
|
|
496
|
+
- `useTcnCreateSession(options?)` / `useTcnKeepAlive(options?)` — mutation — session lifecycle.
|
|
497
|
+
- `useTcnAgentGetStatus(options?)` / `useTcnAgentSetReady(options?)` / `useTcnAgentPause(options?)` / `useTcnAgentDisconnect(options?)` — mutation — agent state.
|
|
498
|
+
- `useTcnHuntGroupSettings(options?)` — mutation — hunt-group settings.
|
|
499
|
+
- `useTcnConnectedParty(options?)` / `useTcnCallData(options?)` — mutation — connected party / call data.
|
|
500
|
+
- `useTcnAgentPutCallOnHold(options?)` / `useTcnAgentGetCallFromHold(options?)` — mutation — hold control.
|
|
501
|
+
- `useTcnDialManualPrepare(options?)` / `useTcnManualDialStart(options?)` / `useTcnProcessManualDial(options?)` / `useTcnFtpManualDialReport(options?)` — mutation — manual dialing.
|
|
502
|
+
|
|
503
|
+
### Databox
|
|
504
|
+
|
|
505
|
+
- `useGetDataboxFolder(folderId, options?)` — query — a databox folder.
|
|
506
|
+
- `useGetDataboxFolderFiles(folderId, options?)` — query — files in a folder.
|
|
507
|
+
- `useGetDataboxFolderDatasets(folderId, options?)` — query — datasets in a folder.
|
|
508
|
+
- `useGetDataboxFolderDuplicates(folderId, options?)` — query — duplicates in a folder.
|
|
509
|
+
- `useGetDatasetExceptions(datasetId, options?)` — query — exceptions for a dataset.
|
|
510
|
+
- `useGetDatasetDuplicates(datasetId, group?, options?)` — query — duplicates for a dataset.
|
|
511
|
+
- `useGetDataboxFolderSchema(folderId, options?)` — query — a folder's schema.
|
|
512
|
+
- `useGetDataboxSchemaHistory(folderId, options?)` — query — a folder's schema history.
|
|
513
|
+
- `useGetDataboxTrashFiles(folderId, options?)` — query — trashed files in a folder.
|
|
514
|
+
- `useGetDataboxFile(fileId, options?)` — query — a databox file.
|
|
515
|
+
- `useGetDataboxFileStatus(fileId, options?)` — query — a file's status.
|
|
516
|
+
- `useGetDataboxFileRuns(fileId, options?)` — query — runs for a file.
|
|
517
|
+
- `useGetDataboxFileDownloadUrl(fileId, options?)` — query — a file's download URL.
|
|
518
|
+
- `useDropFileToDatabox(options?)` — mutation — drop/upload a file into a folder.
|
|
519
|
+
- `useRunDataboxFolder(options?)` — mutation — run folder processing.
|
|
520
|
+
- `useUpdateDataboxFolderSchema(options?)` — mutation — update a folder's schema.
|
|
521
|
+
- `useTrashDataboxFiles(options?)` — mutation — move files to trash.
|
|
522
|
+
- `useRestoreDataboxFile(options?)` — mutation — restore a trashed file.
|
|
523
|
+
- `usePermanentDeleteDataboxFiles(options?)` — mutation — permanently delete files.
|
|
524
|
+
|
|
525
|
+
### Ingestion Authoring
|
|
526
|
+
|
|
527
|
+
- `useCreateDatabox(options?)` — mutation — create a databox.
|
|
528
|
+
- `useCreateFileboxFolder(options?)` — mutation — create a filebox folder.
|
|
529
|
+
- `useListDataboxes(options?)` — query — list databoxes.
|
|
530
|
+
- `useListFileboxFolders(options?)` — query — list filebox folders.
|
|
531
|
+
|
|
532
|
+
### Connections Authoring
|
|
533
|
+
|
|
534
|
+
- `useCreateSftpConnection(options?)` — mutation — create an SFTP connection.
|
|
535
|
+
- `useCreateEmailConnection(options?)` — mutation — create an email connection.
|
|
536
|
+
- `useCreateBlobConnection(options?)` — mutation — create a blob-storage connection.
|
|
537
|
+
- `useTestConnection(kind, id, options?)` — query — test a connection.
|
|
538
|
+
- `useListConnections(kind, options?)` — query — list connections of a kind.
|
|
539
|
+
|
|
540
|
+
### Export Configs Hub
|
|
541
|
+
|
|
542
|
+
- `useListExportConfigs(query?, options?)` — query (hub) — list export configs.
|
|
543
|
+
- `useGetExportConfig(configId, options?)` — query (hub) — one export config.
|
|
544
|
+
- `useCreateExportConfig(options?)` — mutation (hub) — create an export config.
|
|
545
|
+
- `useUpdateExportConfig(configId, options?)` — mutation (hub) — update an export config.
|
|
546
|
+
- `useRunExportConfig(configId, options?)` — mutation (hub) — run an export config.
|
|
547
|
+
|
|
548
|
+
### Dashboards Hub
|
|
549
|
+
|
|
550
|
+
- `useListDashboards(query?, options?)` — query (hub) — list dashboards.
|
|
551
|
+
- `useGetDashboard(dashboardId, options?)` — query (hub) — one dashboard.
|
|
552
|
+
- `useCreateDashboard(options?)` — mutation (hub) — create a dashboard.
|
|
553
|
+
- `useAddDashboardWidget(dashboardId, options?)` — mutation (hub) — add a widget.
|
|
554
|
+
- `useUpdateDashboardWidget(dashboardId, widgetId, options?)` — mutation (hub) — update a widget.
|
|
555
|
+
- `useRemoveDashboardWidget(dashboardId, widgetId, options?)` — mutation (hub) — remove a widget.
|
|
556
|
+
|
|
557
|
+
### External Apps Authoring
|
|
558
|
+
|
|
559
|
+
- `useCreateExternalApp(options?)` — mutation — create an external app.
|
|
560
|
+
- `useSetExternalAppEnv(workbookId, options?)` — mutation — set env variables.
|
|
561
|
+
- `useSetExternalAppSchemaMap(workbookId, options?)` — mutation — set schema mapping.
|
|
562
|
+
- `useSetExternalAppAccessControl(workbookId, options?)` — mutation — set access control.
|
|
563
|
+
- `useValidateExternalAppUrl(options?)` — mutation — validate an external app URL.
|
|
564
|
+
|
|
565
|
+
### Solutions
|
|
566
|
+
|
|
567
|
+
- `useSolutionList(options?)` — controller — list solutions.
|
|
568
|
+
- `useSolutionPicker()` — controller — solution/branch selection state.
|
|
569
|
+
- `useSetSolutionSeedData(solutionId, options?)` — mutation — set seed data.
|
|
570
|
+
- `useCreateSolution(options?)` — mutation — create a solution.
|
|
571
|
+
- `usePackagableComponents(options?)` — query — packagable components.
|
|
572
|
+
- `useAddSolutionObjects(solutionId, options?)` — mutation — add objects to a solution.
|
|
573
|
+
- `useValidateSolution(solutionId, options?)` — mutation — validate a solution package.
|
|
574
|
+
- `usePublishSolution(solutionId, options?)` — mutation — publish a solution.
|
|
575
|
+
- `usePublishJob(jobId?, options?)` — query — track a publish job's status (disabled until `jobId` is set).
|
|
576
|
+
|
|
577
|
+
### Versioning
|
|
578
|
+
|
|
579
|
+
- `useListBranches(solutionId?, branchType?, options?)` — query — list branches.
|
|
580
|
+
- `useListCommits(solutionId?, branch?, branchType?, options?)` — query — list commits.
|
|
581
|
+
- `useListTags(solutionId?, options?)` — query — list tags.
|
|
582
|
+
- `useCommitChanges(options?)` — mutation — commit changes.
|
|
583
|
+
- `useMergeBranches(options?)` — mutation — merge branches.
|
|
584
|
+
- `usePushBranch(options?)` — mutation — push a branch.
|
|
585
|
+
- `useCreateBranch(options?)` — mutation — create a branch.
|
|
586
|
+
|
|
587
|
+
### Pipeline
|
|
588
|
+
|
|
589
|
+
- `usePipelineList(filter?, options?)` — controller — list pipelines with filtering.
|
|
590
|
+
- `usePipelineRuns(pipelineId, options?)` — controller — runs for a pipeline.
|
|
591
|
+
- `useLastSuccessfulPipelineRun(pipelineId, options?)` — controller — the last successful run.
|
|
592
|
+
- `usePipelineRunDetail(pipelineId, runId, options?)` — controller — a run's detail.
|
|
593
|
+
- `usePipelineOverview(pipelineId?, options?)` — controller — pipeline overview.
|
|
594
|
+
- `usePipelineOutputSample(pipelineId?)` — controller — fetch/trigger an output sample.
|
|
595
|
+
- `useGetPipeline(pipelineId, options?)` — query — a pipeline.
|
|
596
|
+
- `useGetPipelineRunStatus(pipelineId, options?)` — query — a pipeline's run status.
|
|
597
|
+
- `useSavePipeline(options?)` — mutation — save a pipeline.
|
|
598
|
+
- `useRunPipeline(options?)` — mutation — run a pipeline.
|
|
599
|
+
|
|
600
|
+
### Working Paper
|
|
601
|
+
|
|
602
|
+
- `useWorkingPaperList(options?)` — controller — list working papers.
|
|
603
|
+
- `useWorkingPaper(workingPaperId, options?)` — controller — load a working paper.
|
|
604
|
+
- `useCreateWorkingPaper()` — mutation — create a working paper.
|
|
605
|
+
- `useWorkingPaperInputTableSheet(config, viewsOptions?, rowsOptions?)` — controller — input-table sheet within a working paper.
|
|
606
|
+
- `useFxDefinitionSheet(init?)` — controller — FX/formula definition sheet with local state.
|
|
607
|
+
|
|
608
|
+
### Period Management — Fiscal Calendars
|
|
609
|
+
|
|
610
|
+
- `useListFiscalCalendars(fiscalYear?, options?)` — query — list fiscal calendars.
|
|
611
|
+
- `useGetFiscalCalendar(id, options?)` — query — a fiscal calendar.
|
|
612
|
+
- `useCreateFiscalCalendar(options?)` — mutation — create a fiscal calendar.
|
|
613
|
+
- `useUpdateFiscalCalendar(options?)` — mutation — update a fiscal calendar.
|
|
614
|
+
- `useDeleteFiscalCalendar(options?)` — mutation — delete a fiscal calendar.
|
|
615
|
+
|
|
616
|
+
### Period Management — Holiday Calendars
|
|
617
|
+
|
|
618
|
+
- `useListHolidayCalendars(year?, options?)` — query — list holiday calendars.
|
|
619
|
+
- `useGetHolidayCalendar(id, options?)` — query — a holiday calendar.
|
|
620
|
+
- `useCreateHolidayCalendar(options?)` — mutation — create a holiday calendar.
|
|
621
|
+
- `useUpdateHolidayCalendar(options?)` — mutation — update a holiday calendar.
|
|
622
|
+
- `useDeleteHolidayCalendar(options?)` — mutation — delete a holiday calendar.
|
|
623
|
+
- `useListHolidays(id, options?)` — query — holidays in a calendar.
|
|
624
|
+
- `useImportHolidays(options?)` — mutation — import holidays into a calendar.
|
|
1394
625
|
|
|
1395
626
|
## Configuration
|
|
1396
627
|
|
|
@@ -1410,16 +641,15 @@ const queryClient = new QueryClient({
|
|
|
1410
641
|
|
|
1411
642
|
### Customizable Parameters
|
|
1412
643
|
|
|
1413
|
-
|
|
644
|
+
Query hooks accept the full TanStack React Query `UseQueryOptions` type. The most commonly used are a small subset of what's available:
|
|
1414
645
|
|
|
1415
646
|
```ts
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
onError?: (error: Error) => void; // Error callback
|
|
647
|
+
// Subset of UseQueryOptions — see TanStack Query docs for the complete list
|
|
648
|
+
interface CommonQueryOptions {
|
|
649
|
+
enabled?: boolean;
|
|
650
|
+
staleTime?: number;
|
|
651
|
+
gcTime?: number;
|
|
652
|
+
retry?: number | boolean;
|
|
1423
653
|
}
|
|
1424
654
|
```
|
|
1425
655
|
|
|
@@ -1427,77 +657,52 @@ interface QueryOptions {
|
|
|
1427
657
|
|
|
1428
658
|
### Error Handling
|
|
1429
659
|
|
|
660
|
+
Errors are normalised to `{ message, status }` by the core SDK:
|
|
661
|
+
|
|
1430
662
|
```tsx
|
|
1431
|
-
useUser(
|
|
1432
|
-
|
|
1433
|
-
console.error("User fetch failed:", error.message);
|
|
1434
|
-
// Custom error recovery logic
|
|
1435
|
-
},
|
|
1436
|
-
});
|
|
663
|
+
const { error } = useUser();
|
|
664
|
+
if (error) console.error(error.message);
|
|
1437
665
|
```
|
|
1438
666
|
|
|
1439
667
|
### Manual Refetching
|
|
1440
668
|
|
|
1441
669
|
```tsx
|
|
1442
670
|
function ManualRefetch() {
|
|
1443
|
-
const {
|
|
1444
|
-
|
|
1445
|
-
return (
|
|
1446
|
-
<div>
|
|
1447
|
-
<button onClick={() => refetch()}>Refresh</button>
|
|
1448
|
-
</div>
|
|
1449
|
-
);
|
|
671
|
+
const { refetch } = useUser();
|
|
672
|
+
return <button onClick={() => refetch()}>Refresh</button>;
|
|
1450
673
|
}
|
|
1451
674
|
```
|
|
1452
675
|
|
|
1453
676
|
## Re-exports
|
|
1454
677
|
|
|
1455
|
-
|
|
678
|
+
`@bluecopa/react` re-exports:
|
|
679
|
+
|
|
680
|
+
- `reactQuery` — the entire TanStack React Query API under one namespace (`reactQuery.useQuery`, `reactQuery.QueryClient`, `reactQuery.QueryClientProvider`, …).
|
|
681
|
+
- `ReactQueryDevtools` — the devtools component.
|
|
682
|
+
- Everything from [`@bluecopa/core`](https://www.npmjs.com/package/@bluecopa/core) — `copaSetConfig`, `copaGetConfig`, `copaApi`, `hubClient`, `copaInputTableDb`, `copaUtils`, and shared types.
|
|
1456
683
|
|
|
1457
684
|
```ts
|
|
1458
685
|
import {
|
|
1459
|
-
|
|
1460
|
-
useMutation,
|
|
1461
|
-
QueryClient,
|
|
1462
|
-
QueryClientProvider,
|
|
686
|
+
reactQuery, // namespaced TanStack React Query
|
|
1463
687
|
ReactQueryDevtools,
|
|
688
|
+
copaSetConfig, // from @bluecopa/core
|
|
689
|
+
copaGetConfig, // from @bluecopa/core
|
|
690
|
+
copaApi, // from @bluecopa/core
|
|
1464
691
|
} from "@bluecopa/react";
|
|
692
|
+
|
|
693
|
+
const { QueryClient, QueryClientProvider, useQuery } = reactQuery;
|
|
1465
694
|
```
|
|
1466
695
|
|
|
1467
696
|
## TypeScript Support
|
|
1468
697
|
|
|
1469
|
-
Fully typed
|
|
1470
|
-
|
|
1471
|
-
```ts
|
|
1472
|
-
import { User } from "@bluecopa/react";
|
|
1473
|
-
|
|
1474
|
-
interface CustomUser extends User {
|
|
1475
|
-
role: string;
|
|
1476
|
-
permissions: string[];
|
|
1477
|
-
}
|
|
1478
|
-
```
|
|
698
|
+
Fully typed. All hooks provide type inference and IntelliSense; shared types are exported from the package root.
|
|
1479
699
|
|
|
1480
700
|
## Development
|
|
1481
701
|
|
|
1482
702
|
```bash
|
|
1483
|
-
# Install dependencies
|
|
1484
703
|
pnpm install
|
|
1485
|
-
|
|
1486
|
-
#
|
|
1487
|
-
pnpm
|
|
1488
|
-
|
|
1489
|
-
# Run development server
|
|
1490
|
-
pnpm dev
|
|
1491
|
-
|
|
1492
|
-
# Run tests
|
|
1493
|
-
pnpm test
|
|
1494
|
-
|
|
1495
|
-
# Run tests in watch mode
|
|
1496
|
-
pnpm test:watch
|
|
1497
|
-
|
|
1498
|
-
# Lint code
|
|
1499
|
-
pnpm lint
|
|
1500
|
-
|
|
1501
|
-
# Format code
|
|
1502
|
-
pnpm format
|
|
704
|
+
pnpm build # Vite build (pnpm build:umd for the UMD bundle)
|
|
705
|
+
pnpm dev # watch build
|
|
706
|
+
pnpm test # Vitest
|
|
707
|
+
pnpm test:watch # Vitest watch
|
|
1503
708
|
```
|