@knowledge-stack/ksapi 1.57.0 → 1.59.0
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/.openapi-generator/FILES +12 -2
- package/README.md +16 -6
- package/dist/apis/FoldersApi.d.ts +63 -4
- package/dist/apis/FoldersApi.js +64 -3
- package/dist/apis/PathPartsApi.d.ts +45 -1
- package/dist/apis/PathPartsApi.js +44 -0
- package/dist/apis/SectionsApi.d.ts +44 -0
- package/dist/apis/SectionsApi.js +43 -0
- package/dist/apis/WorkflowsApi.d.ts +144 -59
- package/dist/apis/WorkflowsApi.js +131 -49
- package/dist/esm/apis/FoldersApi.d.ts +63 -4
- package/dist/esm/apis/FoldersApi.js +64 -3
- package/dist/esm/apis/PathPartsApi.d.ts +45 -1
- package/dist/esm/apis/PathPartsApi.js +45 -1
- package/dist/esm/apis/SectionsApi.d.ts +44 -0
- package/dist/esm/apis/SectionsApi.js +43 -0
- package/dist/esm/apis/WorkflowsApi.d.ts +144 -59
- package/dist/esm/apis/WorkflowsApi.js +132 -50
- package/dist/esm/models/AncestryResponse.d.ts +48 -0
- package/dist/esm/models/AncestryResponse.js +45 -0
- package/dist/esm/models/PathPartAncestorItem.d.ts +96 -0
- package/dist/esm/models/PathPartAncestorItem.js +77 -0
- package/dist/esm/models/SearchSortOrder.d.ts +26 -0
- package/dist/esm/models/SearchSortOrder.js +44 -0
- package/dist/esm/models/SearchablePartType.d.ts +25 -0
- package/dist/esm/models/SearchablePartType.js +43 -0
- package/dist/esm/models/TemporalWorkflowStatusResponse.d.ts +83 -0
- package/dist/esm/models/TemporalWorkflowStatusResponse.js +66 -0
- package/dist/esm/models/WorkflowActionResponse.d.ts +1 -1
- package/dist/esm/models/WorkflowCancelResponse.d.ts +53 -0
- package/dist/esm/models/WorkflowCancelResponse.js +48 -0
- package/dist/esm/models/index.d.ts +6 -1
- package/dist/esm/models/index.js +6 -1
- package/dist/models/AncestryResponse.d.ts +48 -0
- package/dist/models/AncestryResponse.js +53 -0
- package/dist/models/PathPartAncestorItem.d.ts +96 -0
- package/dist/models/PathPartAncestorItem.js +85 -0
- package/dist/models/SearchSortOrder.d.ts +26 -0
- package/dist/models/SearchSortOrder.js +52 -0
- package/dist/models/SearchablePartType.d.ts +25 -0
- package/dist/models/SearchablePartType.js +51 -0
- package/dist/models/TemporalWorkflowStatusResponse.d.ts +83 -0
- package/dist/models/TemporalWorkflowStatusResponse.js +74 -0
- package/dist/models/WorkflowActionResponse.d.ts +1 -1
- package/dist/models/WorkflowCancelResponse.d.ts +53 -0
- package/dist/models/WorkflowCancelResponse.js +56 -0
- package/dist/models/index.d.ts +6 -1
- package/dist/models/index.js +6 -1
- package/docs/AncestryResponse.md +35 -0
- package/docs/FoldersApi.md +94 -4
- package/docs/PathPartAncestorItem.md +51 -0
- package/docs/PathPartsApi.md +75 -0
- package/docs/{WorkflowAction.md → SearchSortOrder.md} +5 -5
- package/docs/SearchablePartType.md +33 -0
- package/docs/SectionsApi.md +75 -0
- package/docs/TemporalWorkflowStatusResponse.md +47 -0
- package/docs/WorkflowActionResponse.md +1 -1
- package/docs/WorkflowCancelResponse.md +37 -0
- package/docs/WorkflowsApi.md +183 -36
- package/package.json +1 -1
- package/src/apis/FoldersApi.ts +136 -7
- package/src/apis/PathPartsApi.ts +88 -0
- package/src/apis/SectionsApi.ts +81 -0
- package/src/apis/WorkflowsApi.ts +249 -90
- package/src/models/AncestryResponse.ts +91 -0
- package/src/models/PathPartAncestorItem.ts +165 -0
- package/src/models/SearchSortOrder.ts +54 -0
- package/src/models/SearchablePartType.ts +53 -0
- package/src/models/TemporalWorkflowStatusResponse.ts +136 -0
- package/src/models/WorkflowActionResponse.ts +1 -1
- package/src/models/WorkflowCancelResponse.ts +92 -0
- package/src/models/index.ts +6 -1
- package/dist/esm/models/WorkflowAction.d.ts +0 -25
- package/dist/esm/models/WorkflowAction.js +0 -43
- package/dist/models/WorkflowAction.d.ts +0 -25
- package/dist/models/WorkflowAction.js +0 -51
- package/src/models/WorkflowAction.ts +0 -53
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
# TemporalWorkflowStatusResponse
|
|
3
|
+
|
|
4
|
+
Generic Temporal workflow status — no DB interaction.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`workflowId` | string
|
|
11
|
+
`temporalStatus` | string
|
|
12
|
+
`workflowType` | string
|
|
13
|
+
`taskQueue` | string
|
|
14
|
+
`startTime` | Date
|
|
15
|
+
`closeTime` | Date
|
|
16
|
+
`runId` | string
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import type { TemporalWorkflowStatusResponse } from '@knowledge-stack/ksapi'
|
|
22
|
+
|
|
23
|
+
// TODO: Update the object below with actual values
|
|
24
|
+
const example = {
|
|
25
|
+
"workflowId": null,
|
|
26
|
+
"temporalStatus": null,
|
|
27
|
+
"workflowType": null,
|
|
28
|
+
"taskQueue": null,
|
|
29
|
+
"startTime": null,
|
|
30
|
+
"closeTime": null,
|
|
31
|
+
"runId": null,
|
|
32
|
+
} satisfies TemporalWorkflowStatusResponse
|
|
33
|
+
|
|
34
|
+
console.log(example)
|
|
35
|
+
|
|
36
|
+
// Convert the instance to a JSON string
|
|
37
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
38
|
+
console.log(exampleJSON)
|
|
39
|
+
|
|
40
|
+
// Parse the JSON string back to an object
|
|
41
|
+
const exampleParsed = JSON.parse(exampleJSON) as TemporalWorkflowStatusResponse
|
|
42
|
+
console.log(exampleParsed)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
46
|
+
|
|
47
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# WorkflowCancelResponse
|
|
3
|
+
|
|
4
|
+
Response for generic workflow cancellation.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`workflowId` | string
|
|
11
|
+
`message` | string
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { WorkflowCancelResponse } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"workflowId": null,
|
|
21
|
+
"message": null,
|
|
22
|
+
} satisfies WorkflowCancelResponse
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as WorkflowCancelResponse
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|
package/docs/WorkflowsApi.md
CHANGED
|
@@ -4,19 +4,21 @@ All URIs are relative to *http://localhost:8000*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
| [**
|
|
8
|
-
| [**
|
|
9
|
-
| [**
|
|
7
|
+
| [**cancelTemporalWorkflow**](WorkflowsApi.md#canceltemporalworkflow) | **DELETE** /v1/workflows/{workflow_id} | Cancel Temporal Workflow Handler |
|
|
8
|
+
| [**dvWorkflowRerun**](WorkflowsApi.md#dvworkflowrerun) | **POST** /v1/workflows/document_versions/{workflow_id} | Dv Workflow Rerun Handler |
|
|
9
|
+
| [**getDvWorkflow**](WorkflowsApi.md#getdvworkflow) | **GET** /v1/workflows/document_versions/{workflow_id} | Get Dv Workflow Handler |
|
|
10
|
+
| [**getTemporalWorkflowStatus**](WorkflowsApi.md#gettemporalworkflowstatus) | **GET** /v1/workflows/{workflow_id} | Get Temporal Workflow Status Handler |
|
|
11
|
+
| [**listDvWorkflows**](WorkflowsApi.md#listdvworkflows) | **GET** /v1/workflows/document_versions | List Dv Workflows Handler |
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
|
|
13
|
-
##
|
|
15
|
+
## cancelTemporalWorkflow
|
|
14
16
|
|
|
15
|
-
>
|
|
17
|
+
> WorkflowCancelResponse cancelTemporalWorkflow(workflowId, authorization, ksUat)
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
Cancel Temporal Workflow Handler
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
Cancel any Temporal workflow owned by the caller\'s tenant. No status guard — this is a thin Temporal wrapper. Cancelling an already-terminal workflow is a no-op on the Temporal side.
|
|
20
22
|
|
|
21
23
|
### Example
|
|
22
24
|
|
|
@@ -25,7 +27,7 @@ import {
|
|
|
25
27
|
Configuration,
|
|
26
28
|
WorkflowsApi,
|
|
27
29
|
} from '@knowledge-stack/ksapi';
|
|
28
|
-
import type {
|
|
30
|
+
import type { CancelTemporalWorkflowRequest } from '@knowledge-stack/ksapi';
|
|
29
31
|
|
|
30
32
|
async function example() {
|
|
31
33
|
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
@@ -38,10 +40,10 @@ async function example() {
|
|
|
38
40
|
authorization: authorization_example,
|
|
39
41
|
// string (optional)
|
|
40
42
|
ksUat: ksUat_example,
|
|
41
|
-
} satisfies
|
|
43
|
+
} satisfies CancelTemporalWorkflowRequest;
|
|
42
44
|
|
|
43
45
|
try {
|
|
44
|
-
const data = await api.
|
|
46
|
+
const data = await api.cancelTemporalWorkflow(body);
|
|
45
47
|
console.log(data);
|
|
46
48
|
} catch (error) {
|
|
47
49
|
console.error(error);
|
|
@@ -63,7 +65,7 @@ example().catch(console.error);
|
|
|
63
65
|
|
|
64
66
|
### Return type
|
|
65
67
|
|
|
66
|
-
[**
|
|
68
|
+
[**WorkflowCancelResponse**](WorkflowCancelResponse.md)
|
|
67
69
|
|
|
68
70
|
### Authorization
|
|
69
71
|
|
|
@@ -84,13 +86,13 @@ No authorization required
|
|
|
84
86
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
85
87
|
|
|
86
88
|
|
|
87
|
-
##
|
|
89
|
+
## dvWorkflowRerun
|
|
88
90
|
|
|
89
|
-
>
|
|
91
|
+
> WorkflowActionResponse dvWorkflowRerun(workflowId, authorization, ksUat)
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
Dv Workflow Rerun Handler
|
|
92
94
|
|
|
93
|
-
|
|
95
|
+
Rerun a workflow. USER role requires ``can_write`` on the document path.
|
|
94
96
|
|
|
95
97
|
### Example
|
|
96
98
|
|
|
@@ -99,25 +101,23 @@ import {
|
|
|
99
101
|
Configuration,
|
|
100
102
|
WorkflowsApi,
|
|
101
103
|
} from '@knowledge-stack/ksapi';
|
|
102
|
-
import type {
|
|
104
|
+
import type { DvWorkflowRerunRequest } from '@knowledge-stack/ksapi';
|
|
103
105
|
|
|
104
106
|
async function example() {
|
|
105
107
|
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
106
108
|
const api = new WorkflowsApi();
|
|
107
109
|
|
|
108
110
|
const body = {
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
// number | Number of items to skip (optional)
|
|
112
|
-
offset: 56,
|
|
111
|
+
// string
|
|
112
|
+
workflowId: workflowId_example,
|
|
113
113
|
// string (optional)
|
|
114
114
|
authorization: authorization_example,
|
|
115
115
|
// string (optional)
|
|
116
116
|
ksUat: ksUat_example,
|
|
117
|
-
} satisfies
|
|
117
|
+
} satisfies DvWorkflowRerunRequest;
|
|
118
118
|
|
|
119
119
|
try {
|
|
120
|
-
const data = await api.
|
|
120
|
+
const data = await api.dvWorkflowRerun(body);
|
|
121
121
|
console.log(data);
|
|
122
122
|
} catch (error) {
|
|
123
123
|
console.error(error);
|
|
@@ -133,14 +133,13 @@ example().catch(console.error);
|
|
|
133
133
|
|
|
134
134
|
| Name | Type | Description | Notes |
|
|
135
135
|
|------------- | ------------- | ------------- | -------------|
|
|
136
|
-
| **
|
|
137
|
-
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
136
|
+
| **workflowId** | `string` | | [Defaults to `undefined`] |
|
|
138
137
|
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
139
138
|
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
140
139
|
|
|
141
140
|
### Return type
|
|
142
141
|
|
|
143
|
-
[**
|
|
142
|
+
[**WorkflowActionResponse**](WorkflowActionResponse.md)
|
|
144
143
|
|
|
145
144
|
### Authorization
|
|
146
145
|
|
|
@@ -161,13 +160,13 @@ No authorization required
|
|
|
161
160
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
162
161
|
|
|
163
162
|
|
|
164
|
-
##
|
|
163
|
+
## getDvWorkflow
|
|
165
164
|
|
|
166
|
-
>
|
|
165
|
+
> WorkflowDetailResponse getDvWorkflow(workflowId, authorization, ksUat)
|
|
167
166
|
|
|
168
|
-
Workflow
|
|
167
|
+
Get Dv Workflow Handler
|
|
169
168
|
|
|
170
|
-
|
|
169
|
+
Get single workflow detail with live Temporal status.
|
|
171
170
|
|
|
172
171
|
### Example
|
|
173
172
|
|
|
@@ -176,7 +175,7 @@ import {
|
|
|
176
175
|
Configuration,
|
|
177
176
|
WorkflowsApi,
|
|
178
177
|
} from '@knowledge-stack/ksapi';
|
|
179
|
-
import type {
|
|
178
|
+
import type { GetDvWorkflowRequest } from '@knowledge-stack/ksapi';
|
|
180
179
|
|
|
181
180
|
async function example() {
|
|
182
181
|
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
@@ -185,16 +184,14 @@ async function example() {
|
|
|
185
184
|
const body = {
|
|
186
185
|
// string
|
|
187
186
|
workflowId: workflowId_example,
|
|
188
|
-
// WorkflowAction | Action to perform
|
|
189
|
-
action: ...,
|
|
190
187
|
// string (optional)
|
|
191
188
|
authorization: authorization_example,
|
|
192
189
|
// string (optional)
|
|
193
190
|
ksUat: ksUat_example,
|
|
194
|
-
} satisfies
|
|
191
|
+
} satisfies GetDvWorkflowRequest;
|
|
195
192
|
|
|
196
193
|
try {
|
|
197
|
-
const data = await api.
|
|
194
|
+
const data = await api.getDvWorkflow(body);
|
|
198
195
|
console.log(data);
|
|
199
196
|
} catch (error) {
|
|
200
197
|
console.error(error);
|
|
@@ -211,13 +208,163 @@ example().catch(console.error);
|
|
|
211
208
|
| Name | Type | Description | Notes |
|
|
212
209
|
|------------- | ------------- | ------------- | -------------|
|
|
213
210
|
| **workflowId** | `string` | | [Defaults to `undefined`] |
|
|
214
|
-
| **action** | `WorkflowAction` | Action to perform | [Defaults to `undefined`] [Enum: rerun, cancel] |
|
|
215
211
|
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
216
212
|
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
217
213
|
|
|
218
214
|
### Return type
|
|
219
215
|
|
|
220
|
-
[**
|
|
216
|
+
[**WorkflowDetailResponse**](WorkflowDetailResponse.md)
|
|
217
|
+
|
|
218
|
+
### Authorization
|
|
219
|
+
|
|
220
|
+
No authorization required
|
|
221
|
+
|
|
222
|
+
### HTTP request headers
|
|
223
|
+
|
|
224
|
+
- **Content-Type**: Not defined
|
|
225
|
+
- **Accept**: `application/json`
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
### HTTP response details
|
|
229
|
+
| Status code | Description | Response headers |
|
|
230
|
+
|-------------|-------------|------------------|
|
|
231
|
+
| **200** | Successful Response | - |
|
|
232
|
+
| **422** | Validation Error | - |
|
|
233
|
+
|
|
234
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
## getTemporalWorkflowStatus
|
|
238
|
+
|
|
239
|
+
> TemporalWorkflowStatusResponse getTemporalWorkflowStatus(workflowId, authorization, ksUat)
|
|
240
|
+
|
|
241
|
+
Get Temporal Workflow Status Handler
|
|
242
|
+
|
|
243
|
+
Get live Temporal status for any workflow owned by the caller\'s tenant.
|
|
244
|
+
|
|
245
|
+
### Example
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
import {
|
|
249
|
+
Configuration,
|
|
250
|
+
WorkflowsApi,
|
|
251
|
+
} from '@knowledge-stack/ksapi';
|
|
252
|
+
import type { GetTemporalWorkflowStatusRequest } from '@knowledge-stack/ksapi';
|
|
253
|
+
|
|
254
|
+
async function example() {
|
|
255
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
256
|
+
const api = new WorkflowsApi();
|
|
257
|
+
|
|
258
|
+
const body = {
|
|
259
|
+
// string
|
|
260
|
+
workflowId: workflowId_example,
|
|
261
|
+
// string (optional)
|
|
262
|
+
authorization: authorization_example,
|
|
263
|
+
// string (optional)
|
|
264
|
+
ksUat: ksUat_example,
|
|
265
|
+
} satisfies GetTemporalWorkflowStatusRequest;
|
|
266
|
+
|
|
267
|
+
try {
|
|
268
|
+
const data = await api.getTemporalWorkflowStatus(body);
|
|
269
|
+
console.log(data);
|
|
270
|
+
} catch (error) {
|
|
271
|
+
console.error(error);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Run the test
|
|
276
|
+
example().catch(console.error);
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Parameters
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
| Name | Type | Description | Notes |
|
|
283
|
+
|------------- | ------------- | ------------- | -------------|
|
|
284
|
+
| **workflowId** | `string` | | [Defaults to `undefined`] |
|
|
285
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
286
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
287
|
+
|
|
288
|
+
### Return type
|
|
289
|
+
|
|
290
|
+
[**TemporalWorkflowStatusResponse**](TemporalWorkflowStatusResponse.md)
|
|
291
|
+
|
|
292
|
+
### Authorization
|
|
293
|
+
|
|
294
|
+
No authorization required
|
|
295
|
+
|
|
296
|
+
### HTTP request headers
|
|
297
|
+
|
|
298
|
+
- **Content-Type**: Not defined
|
|
299
|
+
- **Accept**: `application/json`
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
### HTTP response details
|
|
303
|
+
| Status code | Description | Response headers |
|
|
304
|
+
|-------------|-------------|------------------|
|
|
305
|
+
| **200** | Successful Response | - |
|
|
306
|
+
| **422** | Validation Error | - |
|
|
307
|
+
|
|
308
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
## listDvWorkflows
|
|
312
|
+
|
|
313
|
+
> PaginatedResponseWorkflowSummaryResponse listDvWorkflows(limit, offset, authorization, ksUat)
|
|
314
|
+
|
|
315
|
+
List Dv Workflows Handler
|
|
316
|
+
|
|
317
|
+
List all workflows for the current tenant (paginated, DB-backed). ADMIN/OWNER see all workflows; USER sees only those under permitted paths.
|
|
318
|
+
|
|
319
|
+
### Example
|
|
320
|
+
|
|
321
|
+
```ts
|
|
322
|
+
import {
|
|
323
|
+
Configuration,
|
|
324
|
+
WorkflowsApi,
|
|
325
|
+
} from '@knowledge-stack/ksapi';
|
|
326
|
+
import type { ListDvWorkflowsRequest } from '@knowledge-stack/ksapi';
|
|
327
|
+
|
|
328
|
+
async function example() {
|
|
329
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
330
|
+
const api = new WorkflowsApi();
|
|
331
|
+
|
|
332
|
+
const body = {
|
|
333
|
+
// number | Number of items per page (optional)
|
|
334
|
+
limit: 56,
|
|
335
|
+
// number | Number of items to skip (optional)
|
|
336
|
+
offset: 56,
|
|
337
|
+
// string (optional)
|
|
338
|
+
authorization: authorization_example,
|
|
339
|
+
// string (optional)
|
|
340
|
+
ksUat: ksUat_example,
|
|
341
|
+
} satisfies ListDvWorkflowsRequest;
|
|
342
|
+
|
|
343
|
+
try {
|
|
344
|
+
const data = await api.listDvWorkflows(body);
|
|
345
|
+
console.log(data);
|
|
346
|
+
} catch (error) {
|
|
347
|
+
console.error(error);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// Run the test
|
|
352
|
+
example().catch(console.error);
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### Parameters
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
| Name | Type | Description | Notes |
|
|
359
|
+
|------------- | ------------- | ------------- | -------------|
|
|
360
|
+
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
361
|
+
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
362
|
+
| **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
363
|
+
| **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
364
|
+
|
|
365
|
+
### Return type
|
|
366
|
+
|
|
367
|
+
[**PaginatedResponseWorkflowSummaryResponse**](PaginatedResponseWorkflowSummaryResponse.md)
|
|
221
368
|
|
|
222
369
|
### Authorization
|
|
223
370
|
|
package/package.json
CHANGED
package/src/apis/FoldersApi.ts
CHANGED
|
@@ -23,6 +23,8 @@ import type {
|
|
|
23
23
|
PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator,
|
|
24
24
|
PaginatedResponseFolderResponse,
|
|
25
25
|
PathOrder,
|
|
26
|
+
SearchSortOrder,
|
|
27
|
+
SearchablePartType,
|
|
26
28
|
UpdateFolderRequest,
|
|
27
29
|
} from '../models/index';
|
|
28
30
|
import {
|
|
@@ -42,6 +44,10 @@ import {
|
|
|
42
44
|
PaginatedResponseFolderResponseToJSON,
|
|
43
45
|
PathOrderFromJSON,
|
|
44
46
|
PathOrderToJSON,
|
|
47
|
+
SearchSortOrderFromJSON,
|
|
48
|
+
SearchSortOrderToJSON,
|
|
49
|
+
SearchablePartTypeFromJSON,
|
|
50
|
+
SearchablePartTypeToJSON,
|
|
45
51
|
UpdateFolderRequestFromJSON,
|
|
46
52
|
UpdateFolderRequestToJSON,
|
|
47
53
|
} from '../models/index';
|
|
@@ -77,7 +83,6 @@ export interface ListFolderContentsRequest {
|
|
|
77
83
|
maxDepth?: number;
|
|
78
84
|
sortOrder?: PathOrder;
|
|
79
85
|
withTags?: boolean;
|
|
80
|
-
nameLike?: string | null;
|
|
81
86
|
limit?: number;
|
|
82
87
|
offset?: number;
|
|
83
88
|
authorization?: string | null;
|
|
@@ -94,6 +99,18 @@ export interface ListFoldersRequest {
|
|
|
94
99
|
ksUat?: string | null;
|
|
95
100
|
}
|
|
96
101
|
|
|
102
|
+
export interface SearchItemsRequest {
|
|
103
|
+
nameLike: string;
|
|
104
|
+
sortOrder?: SearchSortOrder;
|
|
105
|
+
partType?: SearchablePartType;
|
|
106
|
+
withTags?: boolean;
|
|
107
|
+
parentPathPartId?: string | null;
|
|
108
|
+
limit?: number;
|
|
109
|
+
offset?: number;
|
|
110
|
+
authorization?: string | null;
|
|
111
|
+
ksUat?: string | null;
|
|
112
|
+
}
|
|
113
|
+
|
|
97
114
|
export interface UpdateFolderOperationRequest {
|
|
98
115
|
folderId: string;
|
|
99
116
|
updateFolderRequest: UpdateFolderRequest;
|
|
@@ -230,7 +247,6 @@ export interface FoldersApiInterface {
|
|
|
230
247
|
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
231
248
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
232
249
|
* @param {boolean} [withTags] Include tag IDs for each item (default: false)
|
|
233
|
-
* @param {string} [nameLike] Case-insensitive partial name search filter
|
|
234
250
|
* @param {number} [limit] Number of items per page
|
|
235
251
|
* @param {number} [offset] Number of items to skip
|
|
236
252
|
* @param {string} [authorization]
|
|
@@ -247,7 +263,6 @@ export interface FoldersApiInterface {
|
|
|
247
263
|
* @param {number} [maxDepth] Maximum depth to traverse (1=direct children, default: 1)
|
|
248
264
|
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
249
265
|
* @param {boolean} [withTags] Include tag IDs for each item (default: false)
|
|
250
|
-
* @param {string} [nameLike] Case-insensitive partial name search filter
|
|
251
266
|
* @param {number} [limit] Number of items per page
|
|
252
267
|
* @param {number} [offset] Number of items to skip
|
|
253
268
|
* @param {string} [authorization]
|
|
@@ -300,6 +315,46 @@ export interface FoldersApiInterface {
|
|
|
300
315
|
*/
|
|
301
316
|
listFolders(requestParameters: ListFoldersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseFolderResponse>;
|
|
302
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Creates request options for searchItems without sending the request
|
|
320
|
+
* @param {string} nameLike Case-insensitive partial name search
|
|
321
|
+
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
|
|
322
|
+
* @param {SearchablePartType} [partType] Filter by item type (default: both folders and documents)
|
|
323
|
+
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
324
|
+
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
325
|
+
* @param {number} [limit] Number of items per page
|
|
326
|
+
* @param {number} [offset] Number of items to skip
|
|
327
|
+
* @param {string} [authorization]
|
|
328
|
+
* @param {string} [ksUat]
|
|
329
|
+
* @throws {RequiredError}
|
|
330
|
+
* @memberof FoldersApiInterface
|
|
331
|
+
*/
|
|
332
|
+
searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts>;
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Search for folders and documents by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
336
|
+
* @summary Search Items Handler
|
|
337
|
+
* @param {string} nameLike Case-insensitive partial name search
|
|
338
|
+
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: NAME)
|
|
339
|
+
* @param {SearchablePartType} [partType] Filter by item type (default: both folders and documents)
|
|
340
|
+
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
341
|
+
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
342
|
+
* @param {number} [limit] Number of items per page
|
|
343
|
+
* @param {number} [offset] Number of items to skip
|
|
344
|
+
* @param {string} [authorization]
|
|
345
|
+
* @param {string} [ksUat]
|
|
346
|
+
* @param {*} [options] Override http request option.
|
|
347
|
+
* @throws {RequiredError}
|
|
348
|
+
* @memberof FoldersApiInterface
|
|
349
|
+
*/
|
|
350
|
+
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator>>;
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* Search for folders and documents by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
354
|
+
* Search Items Handler
|
|
355
|
+
*/
|
|
356
|
+
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator>;
|
|
357
|
+
|
|
303
358
|
/**
|
|
304
359
|
* Creates request options for updateFolder without sending the request
|
|
305
360
|
* @param {string} folderId
|
|
@@ -582,10 +637,6 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
582
637
|
queryParameters['with_tags'] = requestParameters['withTags'];
|
|
583
638
|
}
|
|
584
639
|
|
|
585
|
-
if (requestParameters['nameLike'] != null) {
|
|
586
|
-
queryParameters['name_like'] = requestParameters['nameLike'];
|
|
587
|
-
}
|
|
588
|
-
|
|
589
640
|
if (requestParameters['limit'] != null) {
|
|
590
641
|
queryParameters['limit'] = requestParameters['limit'];
|
|
591
642
|
}
|
|
@@ -695,6 +746,84 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
695
746
|
return await response.value();
|
|
696
747
|
}
|
|
697
748
|
|
|
749
|
+
/**
|
|
750
|
+
* Creates request options for searchItems without sending the request
|
|
751
|
+
*/
|
|
752
|
+
async searchItemsRequestOpts(requestParameters: SearchItemsRequest): Promise<runtime.RequestOpts> {
|
|
753
|
+
if (requestParameters['nameLike'] == null) {
|
|
754
|
+
throw new runtime.RequiredError(
|
|
755
|
+
'nameLike',
|
|
756
|
+
'Required parameter "nameLike" was null or undefined when calling searchItems().'
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
const queryParameters: any = {};
|
|
761
|
+
|
|
762
|
+
if (requestParameters['nameLike'] != null) {
|
|
763
|
+
queryParameters['name_like'] = requestParameters['nameLike'];
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
if (requestParameters['sortOrder'] != null) {
|
|
767
|
+
queryParameters['sort_order'] = requestParameters['sortOrder'];
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
if (requestParameters['partType'] != null) {
|
|
771
|
+
queryParameters['part_type'] = requestParameters['partType'];
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
if (requestParameters['withTags'] != null) {
|
|
775
|
+
queryParameters['with_tags'] = requestParameters['withTags'];
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
if (requestParameters['parentPathPartId'] != null) {
|
|
779
|
+
queryParameters['parent_path_part_id'] = requestParameters['parentPathPartId'];
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
if (requestParameters['limit'] != null) {
|
|
783
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
if (requestParameters['offset'] != null) {
|
|
787
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
791
|
+
|
|
792
|
+
if (requestParameters['authorization'] != null) {
|
|
793
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
let urlPath = `/v1/folders/search`;
|
|
798
|
+
|
|
799
|
+
return {
|
|
800
|
+
path: urlPath,
|
|
801
|
+
method: 'GET',
|
|
802
|
+
headers: headerParameters,
|
|
803
|
+
query: queryParameters,
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Search for folders and documents by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
809
|
+
* Search Items Handler
|
|
810
|
+
*/
|
|
811
|
+
async searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator>> {
|
|
812
|
+
const requestOptions = await this.searchItemsRequestOpts(requestParameters);
|
|
813
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
814
|
+
|
|
815
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminatorFromJSON(jsonValue));
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Search for folders and documents by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
820
|
+
* Search Items Handler
|
|
821
|
+
*/
|
|
822
|
+
async searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator> {
|
|
823
|
+
const response = await this.searchItemsRaw(requestParameters, initOverrides);
|
|
824
|
+
return await response.value();
|
|
825
|
+
}
|
|
826
|
+
|
|
698
827
|
/**
|
|
699
828
|
* Creates request options for updateFolder without sending the request
|
|
700
829
|
*/
|