@knowledge-stack/ksapi 1.56.0 → 1.58.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 +14 -2
- package/README.md +14 -6
- package/dist/apis/DocumentVersionsApi.d.ts +8 -5
- package/dist/apis/DocumentVersionsApi.js +5 -2
- package/dist/apis/ThreadMessagesApi.d.ts +6 -6
- package/dist/apis/ThreadMessagesApi.js +2 -2
- package/dist/apis/WorkflowsApi.d.ts +144 -59
- package/dist/apis/WorkflowsApi.js +131 -49
- package/dist/esm/apis/DocumentVersionsApi.d.ts +8 -5
- package/dist/esm/apis/DocumentVersionsApi.js +5 -2
- package/dist/esm/apis/ThreadMessagesApi.d.ts +6 -6
- package/dist/esm/apis/ThreadMessagesApi.js +2 -2
- package/dist/esm/apis/WorkflowsApi.d.ts +144 -59
- package/dist/esm/apis/WorkflowsApi.js +132 -50
- package/dist/esm/models/CreateThreadMessageRequest.d.ts +6 -0
- package/dist/esm/models/CreateThreadMessageRequest.js +2 -0
- package/dist/esm/models/DocumentVersionContentTypeFilter.d.ts +25 -0
- package/dist/esm/models/DocumentVersionContentTypeFilter.js +43 -0
- package/dist/esm/models/EnrichedThreadMessageContent.d.ts +13 -0
- package/dist/esm/models/EnrichedThreadMessageContent.js +5 -0
- package/dist/esm/models/NonFilesystemReferenceType.d.ts +27 -0
- package/dist/esm/models/NonFilesystemReferenceType.js +45 -0
- package/dist/esm/models/ReferenceType.d.ts +34 -0
- package/dist/esm/models/ReferenceType.js +52 -0
- package/dist/esm/models/ResolvedReferenceInput.d.ts +70 -0
- package/dist/esm/models/ResolvedReferenceInput.js +55 -0
- package/dist/esm/models/ResolvedReferenceOutput.d.ts +69 -0
- package/dist/esm/models/ResolvedReferenceOutput.js +54 -0
- package/dist/esm/models/StepInput.d.ts +6 -0
- package/dist/esm/models/StepInput.js +4 -0
- package/dist/esm/models/StepKind.d.ts +1 -0
- package/dist/esm/models/StepKind.js +1 -0
- package/dist/esm/models/StepOutput.d.ts +6 -0
- package/dist/esm/models/StepOutput.js +4 -0
- package/dist/esm/models/TemporalWorkflowStatusResponse.d.ts +83 -0
- package/dist/esm/models/TemporalWorkflowStatusResponse.js +66 -0
- package/dist/esm/models/ThreadMessageContent.d.ts +13 -0
- package/dist/esm/models/ThreadMessageContent.js +5 -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 +7 -1
- package/dist/esm/models/index.js +7 -1
- package/dist/models/CreateThreadMessageRequest.d.ts +6 -0
- package/dist/models/CreateThreadMessageRequest.js +2 -0
- package/dist/models/DocumentVersionContentTypeFilter.d.ts +25 -0
- package/dist/models/DocumentVersionContentTypeFilter.js +51 -0
- package/dist/models/EnrichedThreadMessageContent.d.ts +13 -0
- package/dist/models/EnrichedThreadMessageContent.js +5 -0
- package/dist/models/NonFilesystemReferenceType.d.ts +27 -0
- package/dist/models/NonFilesystemReferenceType.js +53 -0
- package/dist/models/ReferenceType.d.ts +34 -0
- package/dist/models/ReferenceType.js +60 -0
- package/dist/models/ResolvedReferenceInput.d.ts +70 -0
- package/dist/models/ResolvedReferenceInput.js +63 -0
- package/dist/models/ResolvedReferenceOutput.d.ts +69 -0
- package/dist/models/ResolvedReferenceOutput.js +62 -0
- package/dist/models/StepInput.d.ts +6 -0
- package/dist/models/StepInput.js +4 -0
- package/dist/models/StepKind.d.ts +1 -0
- package/dist/models/StepKind.js +1 -0
- package/dist/models/StepOutput.d.ts +6 -0
- package/dist/models/StepOutput.js +4 -0
- package/dist/models/TemporalWorkflowStatusResponse.d.ts +83 -0
- package/dist/models/TemporalWorkflowStatusResponse.js +74 -0
- package/dist/models/ThreadMessageContent.d.ts +13 -0
- package/dist/models/ThreadMessageContent.js +5 -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 +7 -1
- package/dist/models/index.js +7 -1
- package/docs/CreateThreadMessageRequest.md +2 -0
- package/docs/DocumentVersionContentTypeFilter.md +33 -0
- package/docs/DocumentVersionsApi.md +5 -2
- package/docs/EnrichedThreadMessageContent.md +4 -0
- package/docs/NonFilesystemReferenceType.md +33 -0
- package/docs/{WorkflowAction.md → ReferenceType.md} +4 -5
- package/docs/ResolvedReferenceInput.md +41 -0
- package/docs/ResolvedReferenceOutput.md +41 -0
- package/docs/StepInput.md +2 -0
- package/docs/StepOutput.md +2 -0
- package/docs/TemporalWorkflowStatusResponse.md +47 -0
- package/docs/ThreadMessageContent.md +4 -0
- package/docs/ThreadMessagesApi.md +3 -3
- 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/DocumentVersionsApi.ts +14 -4
- package/src/apis/ThreadMessagesApi.ts +6 -6
- package/src/apis/WorkflowsApi.ts +249 -90
- package/src/models/CreateThreadMessageRequest.ts +8 -0
- package/src/models/DocumentVersionContentTypeFilter.ts +53 -0
- package/src/models/EnrichedThreadMessageContent.ts +23 -0
- package/src/models/NonFilesystemReferenceType.ts +55 -0
- package/src/models/ReferenceType.ts +62 -0
- package/src/models/ResolvedReferenceInput.ts +123 -0
- package/src/models/ResolvedReferenceOutput.ts +113 -0
- package/src/models/StepInput.ts +9 -0
- package/src/models/StepKind.ts +1 -0
- package/src/models/StepOutput.ts +9 -0
- package/src/models/TemporalWorkflowStatusResponse.ts +136 -0
- package/src/models/ThreadMessageContent.ts +23 -0
- package/src/models/WorkflowActionResponse.ts +1 -1
- package/src/models/WorkflowCancelResponse.ts +92 -0
- package/src/models/index.ts +7 -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
|
@@ -30,12 +30,12 @@ const index_1 = require("../models/index");
|
|
|
30
30
|
*/
|
|
31
31
|
class WorkflowsApi extends runtime.BaseAPI {
|
|
32
32
|
/**
|
|
33
|
-
* Creates request options for
|
|
33
|
+
* Creates request options for cancelTemporalWorkflow without sending the request
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
cancelTemporalWorkflowRequestOpts(requestParameters) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
37
|
if (requestParameters['workflowId'] == null) {
|
|
38
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling
|
|
38
|
+
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling cancelTemporalWorkflow().');
|
|
39
39
|
}
|
|
40
40
|
const queryParameters = {};
|
|
41
41
|
const headerParameters = {};
|
|
@@ -46,50 +46,92 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
46
46
|
urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
|
|
47
47
|
return {
|
|
48
48
|
path: urlPath,
|
|
49
|
-
method: '
|
|
49
|
+
method: 'DELETE',
|
|
50
50
|
headers: headerParameters,
|
|
51
51
|
query: queryParameters,
|
|
52
52
|
};
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
56
|
+
* 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.
|
|
57
|
+
* Cancel Temporal Workflow Handler
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
cancelTemporalWorkflowRaw(requestParameters, initOverrides) {
|
|
60
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const requestOptions = yield this.
|
|
61
|
+
const requestOptions = yield this.cancelTemporalWorkflowRequestOpts(requestParameters);
|
|
62
62
|
const response = yield this.request(requestOptions, initOverrides);
|
|
63
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
63
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowCancelResponseFromJSON)(jsonValue));
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
67
|
+
* 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.
|
|
68
|
+
* Cancel Temporal Workflow Handler
|
|
69
69
|
*/
|
|
70
|
-
|
|
70
|
+
cancelTemporalWorkflow(requestParameters, initOverrides) {
|
|
71
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
const response = yield this.
|
|
72
|
+
const response = yield this.cancelTemporalWorkflowRaw(requestParameters, initOverrides);
|
|
73
73
|
return yield response.value();
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
77
|
-
* Creates request options for
|
|
77
|
+
* Creates request options for dvWorkflowRerun without sending the request
|
|
78
78
|
*/
|
|
79
|
-
|
|
79
|
+
dvWorkflowRerunRequestOpts(requestParameters) {
|
|
80
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
if (requestParameters['workflowId'] == null) {
|
|
82
|
+
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling dvWorkflowRerun().');
|
|
83
|
+
}
|
|
81
84
|
const queryParameters = {};
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
const headerParameters = {};
|
|
86
|
+
if (requestParameters['authorization'] != null) {
|
|
87
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
84
88
|
}
|
|
85
|
-
|
|
86
|
-
|
|
89
|
+
let urlPath = `/v1/workflows/document_versions/{workflow_id}`;
|
|
90
|
+
urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
|
|
91
|
+
return {
|
|
92
|
+
path: urlPath,
|
|
93
|
+
method: 'POST',
|
|
94
|
+
headers: headerParameters,
|
|
95
|
+
query: queryParameters,
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Rerun a workflow. USER role requires ``can_write`` on the document path.
|
|
101
|
+
* Dv Workflow Rerun Handler
|
|
102
|
+
*/
|
|
103
|
+
dvWorkflowRerunRaw(requestParameters, initOverrides) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
105
|
+
const requestOptions = yield this.dvWorkflowRerunRequestOpts(requestParameters);
|
|
106
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
107
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowActionResponseFromJSON)(jsonValue));
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Rerun a workflow. USER role requires ``can_write`` on the document path.
|
|
112
|
+
* Dv Workflow Rerun Handler
|
|
113
|
+
*/
|
|
114
|
+
dvWorkflowRerun(requestParameters, initOverrides) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
const response = yield this.dvWorkflowRerunRaw(requestParameters, initOverrides);
|
|
117
|
+
return yield response.value();
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Creates request options for getDvWorkflow without sending the request
|
|
122
|
+
*/
|
|
123
|
+
getDvWorkflowRequestOpts(requestParameters) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
if (requestParameters['workflowId'] == null) {
|
|
126
|
+
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getDvWorkflow().');
|
|
87
127
|
}
|
|
128
|
+
const queryParameters = {};
|
|
88
129
|
const headerParameters = {};
|
|
89
130
|
if (requestParameters['authorization'] != null) {
|
|
90
131
|
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
91
132
|
}
|
|
92
|
-
let urlPath = `/v1/workflows`;
|
|
133
|
+
let urlPath = `/v1/workflows/document_versions/{workflow_id}`;
|
|
134
|
+
urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
|
|
93
135
|
return {
|
|
94
136
|
path: urlPath,
|
|
95
137
|
method: 'GET',
|
|
@@ -99,41 +141,35 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
99
141
|
});
|
|
100
142
|
}
|
|
101
143
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
144
|
+
* Get single workflow detail with live Temporal status.
|
|
145
|
+
* Get Dv Workflow Handler
|
|
104
146
|
*/
|
|
105
|
-
|
|
147
|
+
getDvWorkflowRaw(requestParameters, initOverrides) {
|
|
106
148
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
const requestOptions = yield this.
|
|
149
|
+
const requestOptions = yield this.getDvWorkflowRequestOpts(requestParameters);
|
|
108
150
|
const response = yield this.request(requestOptions, initOverrides);
|
|
109
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
151
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WorkflowDetailResponseFromJSON)(jsonValue));
|
|
110
152
|
});
|
|
111
153
|
}
|
|
112
154
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
155
|
+
* Get single workflow detail with live Temporal status.
|
|
156
|
+
* Get Dv Workflow Handler
|
|
115
157
|
*/
|
|
116
|
-
|
|
117
|
-
return __awaiter(this,
|
|
118
|
-
const response = yield this.
|
|
158
|
+
getDvWorkflow(requestParameters, initOverrides) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
const response = yield this.getDvWorkflowRaw(requestParameters, initOverrides);
|
|
119
161
|
return yield response.value();
|
|
120
162
|
});
|
|
121
163
|
}
|
|
122
164
|
/**
|
|
123
|
-
* Creates request options for
|
|
165
|
+
* Creates request options for getTemporalWorkflowStatus without sending the request
|
|
124
166
|
*/
|
|
125
|
-
|
|
167
|
+
getTemporalWorkflowStatusRequestOpts(requestParameters) {
|
|
126
168
|
return __awaiter(this, void 0, void 0, function* () {
|
|
127
169
|
if (requestParameters['workflowId'] == null) {
|
|
128
|
-
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling
|
|
129
|
-
}
|
|
130
|
-
if (requestParameters['action'] == null) {
|
|
131
|
-
throw new runtime.RequiredError('action', 'Required parameter "action" was null or undefined when calling workflowAction().');
|
|
170
|
+
throw new runtime.RequiredError('workflowId', 'Required parameter "workflowId" was null or undefined when calling getTemporalWorkflowStatus().');
|
|
132
171
|
}
|
|
133
172
|
const queryParameters = {};
|
|
134
|
-
if (requestParameters['action'] != null) {
|
|
135
|
-
queryParameters['action'] = requestParameters['action'];
|
|
136
|
-
}
|
|
137
173
|
const headerParameters = {};
|
|
138
174
|
if (requestParameters['authorization'] != null) {
|
|
139
175
|
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
@@ -142,30 +178,76 @@ class WorkflowsApi extends runtime.BaseAPI {
|
|
|
142
178
|
urlPath = urlPath.replace(`{${"workflow_id"}}`, encodeURIComponent(String(requestParameters['workflowId'])));
|
|
143
179
|
return {
|
|
144
180
|
path: urlPath,
|
|
145
|
-
method: '
|
|
181
|
+
method: 'GET',
|
|
146
182
|
headers: headerParameters,
|
|
147
183
|
query: queryParameters,
|
|
148
184
|
};
|
|
149
185
|
});
|
|
150
186
|
}
|
|
151
187
|
/**
|
|
152
|
-
*
|
|
153
|
-
* Workflow
|
|
188
|
+
* Get live Temporal status for any workflow owned by the caller\'s tenant.
|
|
189
|
+
* Get Temporal Workflow Status Handler
|
|
154
190
|
*/
|
|
155
|
-
|
|
191
|
+
getTemporalWorkflowStatusRaw(requestParameters, initOverrides) {
|
|
156
192
|
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
-
const requestOptions = yield this.
|
|
193
|
+
const requestOptions = yield this.getTemporalWorkflowStatusRequestOpts(requestParameters);
|
|
158
194
|
const response = yield this.request(requestOptions, initOverrides);
|
|
159
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
195
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TemporalWorkflowStatusResponseFromJSON)(jsonValue));
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Get live Temporal status for any workflow owned by the caller\'s tenant.
|
|
200
|
+
* Get Temporal Workflow Status Handler
|
|
201
|
+
*/
|
|
202
|
+
getTemporalWorkflowStatus(requestParameters, initOverrides) {
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
const response = yield this.getTemporalWorkflowStatusRaw(requestParameters, initOverrides);
|
|
205
|
+
return yield response.value();
|
|
160
206
|
});
|
|
161
207
|
}
|
|
162
208
|
/**
|
|
163
|
-
*
|
|
164
|
-
* Workflow Action Handler
|
|
209
|
+
* Creates request options for listDvWorkflows without sending the request
|
|
165
210
|
*/
|
|
166
|
-
|
|
211
|
+
listDvWorkflowsRequestOpts(requestParameters) {
|
|
167
212
|
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
-
const
|
|
213
|
+
const queryParameters = {};
|
|
214
|
+
if (requestParameters['limit'] != null) {
|
|
215
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
216
|
+
}
|
|
217
|
+
if (requestParameters['offset'] != null) {
|
|
218
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
219
|
+
}
|
|
220
|
+
const headerParameters = {};
|
|
221
|
+
if (requestParameters['authorization'] != null) {
|
|
222
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
223
|
+
}
|
|
224
|
+
let urlPath = `/v1/workflows/document_versions`;
|
|
225
|
+
return {
|
|
226
|
+
path: urlPath,
|
|
227
|
+
method: 'GET',
|
|
228
|
+
headers: headerParameters,
|
|
229
|
+
query: queryParameters,
|
|
230
|
+
};
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* List all workflows for the current tenant (paginated, DB-backed). ADMIN/OWNER see all workflows; USER sees only those under permitted paths.
|
|
235
|
+
* List Dv Workflows Handler
|
|
236
|
+
*/
|
|
237
|
+
listDvWorkflowsRaw(requestParameters, initOverrides) {
|
|
238
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
239
|
+
const requestOptions = yield this.listDvWorkflowsRequestOpts(requestParameters);
|
|
240
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
241
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedResponseWorkflowSummaryResponseFromJSON)(jsonValue));
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* List all workflows for the current tenant (paginated, DB-backed). ADMIN/OWNER see all workflows; USER sees only those under permitted paths.
|
|
246
|
+
* List Dv Workflows Handler
|
|
247
|
+
*/
|
|
248
|
+
listDvWorkflows() {
|
|
249
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
250
|
+
const response = yield this.listDvWorkflowsRaw(requestParameters, initOverrides);
|
|
169
251
|
return yield response.value();
|
|
170
252
|
});
|
|
171
253
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ClearVersionContentsResponse, DocumentVersionAction, DocumentVersionActionResponse, DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator, PaginatedResponseDocumentVersionResponse } from '../models/index';
|
|
13
|
+
import type { ClearVersionContentsResponse, DocumentVersionAction, DocumentVersionActionResponse, DocumentVersionContentTypeFilter, DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator, PaginatedResponseDocumentVersionResponse } from '../models/index';
|
|
14
14
|
export interface ClearDocumentVersionContentsRequest {
|
|
15
15
|
versionId: string;
|
|
16
16
|
authorization?: string | null;
|
|
@@ -40,6 +40,7 @@ export interface GetDocumentVersionRequest {
|
|
|
40
40
|
export interface GetDocumentVersionContentsRequest {
|
|
41
41
|
versionId: string;
|
|
42
42
|
sectionId?: string | null;
|
|
43
|
+
contentType?: DocumentVersionContentTypeFilter;
|
|
43
44
|
limit?: number;
|
|
44
45
|
offset?: number;
|
|
45
46
|
authorization?: string | null;
|
|
@@ -196,6 +197,7 @@ export interface DocumentVersionsApiInterface {
|
|
|
196
197
|
* Creates request options for getDocumentVersionContents without sending the request
|
|
197
198
|
* @param {string} versionId DocumentVersion ID
|
|
198
199
|
* @param {string} [sectionId] Optional section ID to scope traversal to a subtree
|
|
200
|
+
* @param {DocumentVersionContentTypeFilter} [contentType] Filter by content type: SECTION or CHUNK. Omit to return both types.
|
|
199
201
|
* @param {number} [limit] Number of items per page
|
|
200
202
|
* @param {number} [offset] Number of items to skip
|
|
201
203
|
* @param {string} [authorization]
|
|
@@ -205,10 +207,11 @@ export interface DocumentVersionsApiInterface {
|
|
|
205
207
|
*/
|
|
206
208
|
getDocumentVersionContentsRequestOpts(requestParameters: GetDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
|
|
207
209
|
/**
|
|
208
|
-
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
|
|
210
|
+
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\"). Use `content_type` to return only one type (e.g. `content_type=CHUNK` for chunk-only pagination where offset/limit apply only to chunks).
|
|
209
211
|
* @summary Get Document Version Contents Handler
|
|
210
212
|
* @param {string} versionId DocumentVersion ID
|
|
211
213
|
* @param {string} [sectionId] Optional section ID to scope traversal to a subtree
|
|
214
|
+
* @param {DocumentVersionContentTypeFilter} [contentType] Filter by content type: SECTION or CHUNK. Omit to return both types.
|
|
212
215
|
* @param {number} [limit] Number of items per page
|
|
213
216
|
* @param {number} [offset] Number of items to skip
|
|
214
217
|
* @param {string} [authorization]
|
|
@@ -219,7 +222,7 @@ export interface DocumentVersionsApiInterface {
|
|
|
219
222
|
*/
|
|
220
223
|
getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>>;
|
|
221
224
|
/**
|
|
222
|
-
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
|
|
225
|
+
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\"). Use `content_type` to return only one type (e.g. `content_type=CHUNK` for chunk-only pagination where offset/limit apply only to chunks).
|
|
223
226
|
* Get Document Version Contents Handler
|
|
224
227
|
*/
|
|
225
228
|
getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>;
|
|
@@ -359,12 +362,12 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
|
|
|
359
362
|
*/
|
|
360
363
|
getDocumentVersionContentsRequestOpts(requestParameters: GetDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
|
|
361
364
|
/**
|
|
362
|
-
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
|
|
365
|
+
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\"). Use `content_type` to return only one type (e.g. `content_type=CHUNK` for chunk-only pagination where offset/limit apply only to chunks).
|
|
363
366
|
* Get Document Version Contents Handler
|
|
364
367
|
*/
|
|
365
368
|
getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>>;
|
|
366
369
|
/**
|
|
367
|
-
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
|
|
370
|
+
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\"). Use `content_type` to return only one type (e.g. `content_type=CHUNK` for chunk-only pagination where offset/limit apply only to chunks).
|
|
368
371
|
* Get Document Version Contents Handler
|
|
369
372
|
*/
|
|
370
373
|
getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>;
|
|
@@ -263,6 +263,9 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
263
263
|
if (requestParameters['sectionId'] != null) {
|
|
264
264
|
queryParameters['section_id'] = requestParameters['sectionId'];
|
|
265
265
|
}
|
|
266
|
+
if (requestParameters['contentType'] != null) {
|
|
267
|
+
queryParameters['content_type'] = requestParameters['contentType'];
|
|
268
|
+
}
|
|
266
269
|
if (requestParameters['limit'] != null) {
|
|
267
270
|
queryParameters['limit'] = requestParameters['limit'];
|
|
268
271
|
}
|
|
@@ -284,7 +287,7 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
284
287
|
});
|
|
285
288
|
}
|
|
286
289
|
/**
|
|
287
|
-
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
|
|
290
|
+
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\"). Use `content_type` to return only one type (e.g. `content_type=CHUNK` for chunk-only pagination where offset/limit apply only to chunks).
|
|
288
291
|
* Get Document Version Contents Handler
|
|
289
292
|
*/
|
|
290
293
|
getDocumentVersionContentsRaw(requestParameters, initOverrides) {
|
|
@@ -295,7 +298,7 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
295
298
|
});
|
|
296
299
|
}
|
|
297
300
|
/**
|
|
298
|
-
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
|
|
301
|
+
* List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\"). Use `content_type` to return only one type (e.g. `content_type=CHUNK` for chunk-only pagination where offset/limit apply only to chunks).
|
|
299
302
|
* Get Document Version Contents Handler
|
|
300
303
|
*/
|
|
301
304
|
getDocumentVersionContents(requestParameters, initOverrides) {
|
|
@@ -100,7 +100,7 @@ export interface ThreadMessagesApiInterface {
|
|
|
100
100
|
* Creates request options for listThreadMessages without sending the request
|
|
101
101
|
* @param {string} threadId
|
|
102
102
|
* @param {Date} [before] Cursor for keyset pagination: only return messages with created_at < this value
|
|
103
|
-
* @param {boolean} [withDetails] Include execution steps in response (default
|
|
103
|
+
* @param {boolean} [withDetails] Include execution steps in response (default true)
|
|
104
104
|
* @param {number} [limit] Number of items per page
|
|
105
105
|
* @param {number} [offset] Number of items to skip
|
|
106
106
|
* @param {string} [authorization]
|
|
@@ -110,11 +110,11 @@ export interface ThreadMessagesApiInterface {
|
|
|
110
110
|
*/
|
|
111
111
|
listThreadMessagesRequestOpts(requestParameters: ListThreadMessagesRequest): Promise<runtime.RequestOpts>;
|
|
112
112
|
/**
|
|
113
|
-
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=
|
|
113
|
+
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=false` to exclude execution step data and reduce payload size.
|
|
114
114
|
* @summary List Thread Messages Handler
|
|
115
115
|
* @param {string} threadId
|
|
116
116
|
* @param {Date} [before] Cursor for keyset pagination: only return messages with created_at < this value
|
|
117
|
-
* @param {boolean} [withDetails] Include execution steps in response (default
|
|
117
|
+
* @param {boolean} [withDetails] Include execution steps in response (default true)
|
|
118
118
|
* @param {number} [limit] Number of items per page
|
|
119
119
|
* @param {number} [offset] Number of items to skip
|
|
120
120
|
* @param {string} [authorization]
|
|
@@ -125,7 +125,7 @@ export interface ThreadMessagesApiInterface {
|
|
|
125
125
|
*/
|
|
126
126
|
listThreadMessagesRaw(requestParameters: ListThreadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseThreadMessageResponse>>;
|
|
127
127
|
/**
|
|
128
|
-
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=
|
|
128
|
+
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=false` to exclude execution step data and reduce payload size.
|
|
129
129
|
* List Thread Messages Handler
|
|
130
130
|
*/
|
|
131
131
|
listThreadMessages(requestParameters: ListThreadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseThreadMessageResponse>;
|
|
@@ -167,12 +167,12 @@ export declare class ThreadMessagesApi extends runtime.BaseAPI implements Thread
|
|
|
167
167
|
*/
|
|
168
168
|
listThreadMessagesRequestOpts(requestParameters: ListThreadMessagesRequest): Promise<runtime.RequestOpts>;
|
|
169
169
|
/**
|
|
170
|
-
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=
|
|
170
|
+
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=false` to exclude execution step data and reduce payload size.
|
|
171
171
|
* List Thread Messages Handler
|
|
172
172
|
*/
|
|
173
173
|
listThreadMessagesRaw(requestParameters: ListThreadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseThreadMessageResponse>>;
|
|
174
174
|
/**
|
|
175
|
-
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=
|
|
175
|
+
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=false` to exclude execution step data and reduce payload size.
|
|
176
176
|
* List Thread Messages Handler
|
|
177
177
|
*/
|
|
178
178
|
listThreadMessages(requestParameters: ListThreadMessagesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseThreadMessageResponse>;
|
|
@@ -162,7 +162,7 @@ export class ThreadMessagesApi extends runtime.BaseAPI {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
/**
|
|
165
|
-
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=
|
|
165
|
+
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=false` to exclude execution step data and reduce payload size.
|
|
166
166
|
* List Thread Messages Handler
|
|
167
167
|
*/
|
|
168
168
|
listThreadMessagesRaw(requestParameters, initOverrides) {
|
|
@@ -173,7 +173,7 @@ export class ThreadMessagesApi extends runtime.BaseAPI {
|
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
|
-
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=
|
|
176
|
+
* List messages in a thread, ordered by created_at descending. Supports cursor-based pagination via `before` parameter and standard offset-based pagination via `limit`/`offset`. Use `with_details=false` to exclude execution step data and reduce payload size.
|
|
177
177
|
* List Thread Messages Handler
|
|
178
178
|
*/
|
|
179
179
|
listThreadMessages(requestParameters, initOverrides) {
|