@knowledge-stack/ksapi 1.83.0 → 1.84.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 +18 -0
- package/README.md +17 -2
- package/dist/apis/PathPartsApi.d.ts +110 -1
- package/dist/apis/PathPartsApi.js +111 -0
- package/dist/apis/WorkflowMemoryApi.d.ts +249 -0
- package/dist/apis/WorkflowMemoryApi.js +299 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/PathPartsApi.d.ts +110 -1
- package/dist/esm/apis/PathPartsApi.js +112 -1
- package/dist/esm/apis/WorkflowMemoryApi.d.ts +249 -0
- package/dist/esm/apis/WorkflowMemoryApi.js +262 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/AppendEventRequest.d.ts +62 -0
- package/dist/esm/models/AppendEventRequest.js +51 -0
- package/dist/esm/models/AppendMemoryChunkRequest.d.ts +54 -0
- package/dist/esm/models/AppendMemoryChunkRequest.js +52 -0
- package/dist/esm/models/ChunkBulkResponse.d.ts +4 -4
- package/dist/esm/models/ChunkContentItem.d.ts +2 -2
- package/dist/esm/models/ChunkResponse.d.ts +4 -4
- package/dist/esm/models/CreateThreadMessageRequest.d.ts +2 -2
- package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +1 -1
- package/dist/esm/models/DocumentVersionMetadata.d.ts +4 -4
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +2 -2
- package/dist/esm/models/EditMemoryChunkRequest.d.ts +47 -0
- package/dist/esm/models/EditMemoryChunkRequest.js +49 -0
- package/dist/esm/models/EventResponse.d.ts +83 -0
- package/dist/esm/models/EventResponse.js +64 -0
- package/dist/esm/models/ListMemoryChunksResponse.d.ts +48 -0
- package/dist/esm/models/ListMemoryChunksResponse.js +45 -0
- package/dist/esm/models/MemoryChunkResponse.d.ts +60 -0
- package/dist/esm/models/MemoryChunkResponse.js +53 -0
- package/dist/esm/models/MemoryKind.d.ts +29 -0
- package/dist/esm/models/MemoryKind.js +47 -0
- package/dist/esm/models/PaginatedResponseEventResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseEventResponse.js +70 -0
- package/dist/esm/models/ScoredChunkResponse.d.ts +4 -4
- package/dist/esm/models/SectionSystemMetadata.d.ts +1 -1
- package/dist/esm/models/TenantSettingsUpdate.d.ts +2 -2
- package/dist/esm/models/ThreadMessageDetailsInput.d.ts +2 -2
- package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +2 -2
- package/dist/esm/models/ThreadMessageResponse.d.ts +2 -2
- package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +2 -2
- package/dist/esm/models/UpdateTenantRequest.d.ts +4 -4
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +1 -1
- package/dist/esm/models/WorkflowDefinitionResponse.d.ts +1 -1
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +1 -1
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/AppendEventRequest.d.ts +62 -0
- package/dist/models/AppendEventRequest.js +59 -0
- package/dist/models/AppendMemoryChunkRequest.d.ts +54 -0
- package/dist/models/AppendMemoryChunkRequest.js +60 -0
- package/dist/models/ChunkBulkResponse.d.ts +4 -4
- package/dist/models/ChunkContentItem.d.ts +2 -2
- package/dist/models/ChunkResponse.d.ts +4 -4
- package/dist/models/CreateThreadMessageRequest.d.ts +2 -2
- package/dist/models/CreateWorkflowDefinitionRequest.d.ts +1 -1
- package/dist/models/DocumentVersionMetadata.d.ts +4 -4
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +2 -2
- package/dist/models/EditMemoryChunkRequest.d.ts +47 -0
- package/dist/models/EditMemoryChunkRequest.js +57 -0
- package/dist/models/EventResponse.d.ts +83 -0
- package/dist/models/EventResponse.js +72 -0
- package/dist/models/ListMemoryChunksResponse.d.ts +48 -0
- package/dist/models/ListMemoryChunksResponse.js +53 -0
- package/dist/models/MemoryChunkResponse.d.ts +60 -0
- package/dist/models/MemoryChunkResponse.js +61 -0
- package/dist/models/MemoryKind.d.ts +29 -0
- package/dist/models/MemoryKind.js +55 -0
- package/dist/models/PaginatedResponseEventResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseEventResponse.js +78 -0
- package/dist/models/ScoredChunkResponse.d.ts +4 -4
- package/dist/models/SectionSystemMetadata.d.ts +1 -1
- package/dist/models/TenantSettingsUpdate.d.ts +2 -2
- package/dist/models/ThreadMessageDetailsInput.d.ts +2 -2
- package/dist/models/ThreadMessageDetailsOutput.d.ts +2 -2
- package/dist/models/ThreadMessageResponse.d.ts +2 -2
- package/dist/models/UpdateChunkMetadataRequest.d.ts +2 -2
- package/dist/models/UpdateTenantRequest.d.ts +4 -4
- package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +1 -1
- package/dist/models/WorkflowDefinitionResponse.d.ts +1 -1
- package/dist/models/WorkflowRunSnapshot.d.ts +1 -1
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/docs/AppendEventRequest.md +37 -0
- package/docs/AppendMemoryChunkRequest.md +36 -0
- package/docs/EditMemoryChunkRequest.md +34 -0
- package/docs/EventResponse.md +45 -0
- package/docs/ListMemoryChunksResponse.md +34 -0
- package/docs/MemoryChunkResponse.md +39 -0
- package/docs/MemoryKind.md +33 -0
- package/docs/PaginatedResponseEventResponse.md +40 -0
- package/docs/PathPartsApi.md +171 -0
- package/docs/WorkflowMemoryApi.md +390 -0
- package/package.json +1 -1
- package/src/apis/PathPartsApi.ts +234 -0
- package/src/apis/WorkflowMemoryApi.ts +522 -0
- package/src/apis/index.ts +1 -0
- package/src/models/AppendEventRequest.ts +102 -0
- package/src/models/AppendMemoryChunkRequest.ts +105 -0
- package/src/models/ChunkBulkResponse.ts +4 -4
- package/src/models/ChunkContentItem.ts +2 -2
- package/src/models/ChunkResponse.ts +4 -4
- package/src/models/CreateThreadMessageRequest.ts +2 -2
- package/src/models/CreateWorkflowDefinitionRequest.ts +1 -1
- package/src/models/DocumentVersionMetadata.ts +4 -4
- package/src/models/DocumentVersionMetadataUpdate.ts +2 -2
- package/src/models/EditMemoryChunkRequest.ts +87 -0
- package/src/models/EventResponse.ts +132 -0
- package/src/models/ListMemoryChunksResponse.ts +91 -0
- package/src/models/MemoryChunkResponse.ts +111 -0
- package/src/models/MemoryKind.ts +57 -0
- package/src/models/PaginatedResponseEventResponse.ts +130 -0
- package/src/models/ScoredChunkResponse.ts +4 -4
- package/src/models/SectionSystemMetadata.ts +1 -1
- package/src/models/TenantSettingsUpdate.ts +2 -2
- package/src/models/ThreadMessageDetailsInput.ts +2 -2
- package/src/models/ThreadMessageDetailsOutput.ts +2 -2
- package/src/models/ThreadMessageResponse.ts +2 -2
- package/src/models/UpdateChunkMetadataRequest.ts +2 -2
- package/src/models/UpdateTenantRequest.ts +4 -4
- package/src/models/UpdateWorkflowDefinitionRequest.ts +1 -1
- package/src/models/WorkflowDefinitionResponse.ts +1 -1
- package/src/models/WorkflowRunSnapshot.ts +1 -1
- package/src/models/index.ts +8 -0
package/src/apis/PathPartsApi.ts
CHANGED
|
@@ -16,8 +16,11 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
AncestryResponse,
|
|
19
|
+
AppendEventRequest,
|
|
19
20
|
BulkTagRequest,
|
|
21
|
+
EventResponse,
|
|
20
22
|
HTTPValidationError,
|
|
23
|
+
PaginatedResponseEventResponse,
|
|
21
24
|
PaginatedResponsePathPartResponse,
|
|
22
25
|
PathOrder,
|
|
23
26
|
PathPartResponse,
|
|
@@ -27,10 +30,16 @@ import type {
|
|
|
27
30
|
import {
|
|
28
31
|
AncestryResponseFromJSON,
|
|
29
32
|
AncestryResponseToJSON,
|
|
33
|
+
AppendEventRequestFromJSON,
|
|
34
|
+
AppendEventRequestToJSON,
|
|
30
35
|
BulkTagRequestFromJSON,
|
|
31
36
|
BulkTagRequestToJSON,
|
|
37
|
+
EventResponseFromJSON,
|
|
38
|
+
EventResponseToJSON,
|
|
32
39
|
HTTPValidationErrorFromJSON,
|
|
33
40
|
HTTPValidationErrorToJSON,
|
|
41
|
+
PaginatedResponseEventResponseFromJSON,
|
|
42
|
+
PaginatedResponseEventResponseToJSON,
|
|
34
43
|
PaginatedResponsePathPartResponseFromJSON,
|
|
35
44
|
PaginatedResponsePathPartResponseToJSON,
|
|
36
45
|
PathOrderFromJSON,
|
|
@@ -43,6 +52,13 @@ import {
|
|
|
43
52
|
SubtreeChunksResponseToJSON,
|
|
44
53
|
} from '../models/index';
|
|
45
54
|
|
|
55
|
+
export interface AppendPathPartEventRequest {
|
|
56
|
+
pathPartId: string;
|
|
57
|
+
appendEventRequest: AppendEventRequest;
|
|
58
|
+
authorization?: string | null;
|
|
59
|
+
ksUat?: string | null;
|
|
60
|
+
}
|
|
61
|
+
|
|
46
62
|
export interface BulkRemovePathPartTagsRequest {
|
|
47
63
|
pathPartId: string;
|
|
48
64
|
bulkTagRequest: BulkTagRequest;
|
|
@@ -75,6 +91,18 @@ export interface GetPathPartTagsRequest {
|
|
|
75
91
|
ksUat?: string | null;
|
|
76
92
|
}
|
|
77
93
|
|
|
94
|
+
export interface ListPathPartEventsRequest {
|
|
95
|
+
pathPartId: string;
|
|
96
|
+
kind?: string | null;
|
|
97
|
+
since?: Date | null;
|
|
98
|
+
until?: Date | null;
|
|
99
|
+
recursive?: boolean;
|
|
100
|
+
limit?: number;
|
|
101
|
+
offset?: number;
|
|
102
|
+
authorization?: string | null;
|
|
103
|
+
ksUat?: string | null;
|
|
104
|
+
}
|
|
105
|
+
|
|
78
106
|
export interface ListPathPartsRequest {
|
|
79
107
|
parentPathId?: string | null;
|
|
80
108
|
maxDepth?: number;
|
|
@@ -99,6 +127,36 @@ export interface SetPathPartTagsRequest {
|
|
|
99
127
|
* @interface PathPartsApiInterface
|
|
100
128
|
*/
|
|
101
129
|
export interface PathPartsApiInterface {
|
|
130
|
+
/**
|
|
131
|
+
* Creates request options for appendPathPartEvent without sending the request
|
|
132
|
+
* @param {string} pathPartId
|
|
133
|
+
* @param {AppendEventRequest} appendEventRequest
|
|
134
|
+
* @param {string} [authorization]
|
|
135
|
+
* @param {string} [ksUat]
|
|
136
|
+
* @throws {RequiredError}
|
|
137
|
+
* @memberof PathPartsApiInterface
|
|
138
|
+
*/
|
|
139
|
+
appendPathPartEventRequestOpts(requestParameters: AppendPathPartEventRequest): Promise<runtime.RequestOpts>;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Record an event for a subject path_part from the frontend. Auth: caller must hold ``can_write`` on the subject\'s materialized_path (OWNER/ADMIN bypass). Server stamps ``actor_user_id`` from the caller\'s identity — callers cannot impersonate other users on the audit trail. ``kind`` is free-form text but reserved server namespaces (``workflow.``, ``document.``, ``folder.``, ``permission.``, ``connector.``, ``query.``, ``auth.``, ``tenant.``) are rejected at 422 so clients cannot forge server-emitted audit events. Clients should namespace under ``client.*``. ``payload`` is capped at 64KB encoded JSON.
|
|
143
|
+
* @summary Append Path Part Event Handler
|
|
144
|
+
* @param {string} pathPartId
|
|
145
|
+
* @param {AppendEventRequest} appendEventRequest
|
|
146
|
+
* @param {string} [authorization]
|
|
147
|
+
* @param {string} [ksUat]
|
|
148
|
+
* @param {*} [options] Override http request option.
|
|
149
|
+
* @throws {RequiredError}
|
|
150
|
+
* @memberof PathPartsApiInterface
|
|
151
|
+
*/
|
|
152
|
+
appendPathPartEventRaw(requestParameters: AppendPathPartEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventResponse>>;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Record an event for a subject path_part from the frontend. Auth: caller must hold ``can_write`` on the subject\'s materialized_path (OWNER/ADMIN bypass). Server stamps ``actor_user_id`` from the caller\'s identity — callers cannot impersonate other users on the audit trail. ``kind`` is free-form text but reserved server namespaces (``workflow.``, ``document.``, ``folder.``, ``permission.``, ``connector.``, ``query.``, ``auth.``, ``tenant.``) are rejected at 422 so clients cannot forge server-emitted audit events. Clients should namespace under ``client.*``. ``payload`` is capped at 64KB encoded JSON.
|
|
156
|
+
* Append Path Part Event Handler
|
|
157
|
+
*/
|
|
158
|
+
appendPathPartEvent(requestParameters: AppendPathPartEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventResponse>;
|
|
159
|
+
|
|
102
160
|
/**
|
|
103
161
|
* Creates request options for bulkRemovePathPartTags without sending the request
|
|
104
162
|
* @param {string} pathPartId
|
|
@@ -243,6 +301,46 @@ export interface PathPartsApiInterface {
|
|
|
243
301
|
*/
|
|
244
302
|
getPathPartTags(requestParameters: GetPathPartTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PathPartTagsResponse>;
|
|
245
303
|
|
|
304
|
+
/**
|
|
305
|
+
* Creates request options for listPathPartEvents without sending the request
|
|
306
|
+
* @param {string} pathPartId
|
|
307
|
+
* @param {string} [kind] Filter to a single event kind
|
|
308
|
+
* @param {Date} [since] Only events at or after this timestamp
|
|
309
|
+
* @param {Date} [until] Only events strictly before this timestamp
|
|
310
|
+
* @param {boolean} [recursive] Include events from descendant path_parts as well as the subject itself
|
|
311
|
+
* @param {number} [limit] Number of items per page
|
|
312
|
+
* @param {number} [offset] Number of items to skip
|
|
313
|
+
* @param {string} [authorization]
|
|
314
|
+
* @param {string} [ksUat]
|
|
315
|
+
* @throws {RequiredError}
|
|
316
|
+
* @memberof PathPartsApiInterface
|
|
317
|
+
*/
|
|
318
|
+
listPathPartEventsRequestOpts(requestParameters: ListPathPartEventsRequest): Promise<runtime.RequestOpts>;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* List events anchored to a specific path_part subject. Subject permission is enforced via the existing ``PathPermissionService`` — caller must have ``can_read`` on the subject\'s materialized_path (OWNER/ADMIN bypass). Events are ordered newest-first by ``ts`` and paginated. When ``recursive=True``, events on any descendant of the subject are included — useful for \"all events under this folder\" or \"all events under this workflow definition\".
|
|
322
|
+
* @summary List Path Part Events Handler
|
|
323
|
+
* @param {string} pathPartId
|
|
324
|
+
* @param {string} [kind] Filter to a single event kind
|
|
325
|
+
* @param {Date} [since] Only events at or after this timestamp
|
|
326
|
+
* @param {Date} [until] Only events strictly before this timestamp
|
|
327
|
+
* @param {boolean} [recursive] Include events from descendant path_parts as well as the subject itself
|
|
328
|
+
* @param {number} [limit] Number of items per page
|
|
329
|
+
* @param {number} [offset] Number of items to skip
|
|
330
|
+
* @param {string} [authorization]
|
|
331
|
+
* @param {string} [ksUat]
|
|
332
|
+
* @param {*} [options] Override http request option.
|
|
333
|
+
* @throws {RequiredError}
|
|
334
|
+
* @memberof PathPartsApiInterface
|
|
335
|
+
*/
|
|
336
|
+
listPathPartEventsRaw(requestParameters: ListPathPartEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseEventResponse>>;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* List events anchored to a specific path_part subject. Subject permission is enforced via the existing ``PathPermissionService`` — caller must have ``can_read`` on the subject\'s materialized_path (OWNER/ADMIN bypass). Events are ordered newest-first by ``ts`` and paginated. When ``recursive=True``, events on any descendant of the subject are included — useful for \"all events under this folder\" or \"all events under this workflow definition\".
|
|
340
|
+
* List Path Part Events Handler
|
|
341
|
+
*/
|
|
342
|
+
listPathPartEvents(requestParameters: ListPathPartEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseEventResponse>;
|
|
343
|
+
|
|
246
344
|
/**
|
|
247
345
|
* Creates request options for listPathParts without sending the request
|
|
248
346
|
* @param {string} [parentPathId] Parent PathPart ID (defaults to root)
|
|
@@ -316,6 +414,67 @@ export interface PathPartsApiInterface {
|
|
|
316
414
|
*/
|
|
317
415
|
export class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterface {
|
|
318
416
|
|
|
417
|
+
/**
|
|
418
|
+
* Creates request options for appendPathPartEvent without sending the request
|
|
419
|
+
*/
|
|
420
|
+
async appendPathPartEventRequestOpts(requestParameters: AppendPathPartEventRequest): Promise<runtime.RequestOpts> {
|
|
421
|
+
if (requestParameters['pathPartId'] == null) {
|
|
422
|
+
throw new runtime.RequiredError(
|
|
423
|
+
'pathPartId',
|
|
424
|
+
'Required parameter "pathPartId" was null or undefined when calling appendPathPartEvent().'
|
|
425
|
+
);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
if (requestParameters['appendEventRequest'] == null) {
|
|
429
|
+
throw new runtime.RequiredError(
|
|
430
|
+
'appendEventRequest',
|
|
431
|
+
'Required parameter "appendEventRequest" was null or undefined when calling appendPathPartEvent().'
|
|
432
|
+
);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
const queryParameters: any = {};
|
|
436
|
+
|
|
437
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
438
|
+
|
|
439
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
440
|
+
|
|
441
|
+
if (requestParameters['authorization'] != null) {
|
|
442
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
let urlPath = `/v1/path-parts/{path_part_id}/events`;
|
|
447
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
448
|
+
|
|
449
|
+
return {
|
|
450
|
+
path: urlPath,
|
|
451
|
+
method: 'POST',
|
|
452
|
+
headers: headerParameters,
|
|
453
|
+
query: queryParameters,
|
|
454
|
+
body: AppendEventRequestToJSON(requestParameters['appendEventRequest']),
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Record an event for a subject path_part from the frontend. Auth: caller must hold ``can_write`` on the subject\'s materialized_path (OWNER/ADMIN bypass). Server stamps ``actor_user_id`` from the caller\'s identity — callers cannot impersonate other users on the audit trail. ``kind`` is free-form text but reserved server namespaces (``workflow.``, ``document.``, ``folder.``, ``permission.``, ``connector.``, ``query.``, ``auth.``, ``tenant.``) are rejected at 422 so clients cannot forge server-emitted audit events. Clients should namespace under ``client.*``. ``payload`` is capped at 64KB encoded JSON.
|
|
460
|
+
* Append Path Part Event Handler
|
|
461
|
+
*/
|
|
462
|
+
async appendPathPartEventRaw(requestParameters: AppendPathPartEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<EventResponse>> {
|
|
463
|
+
const requestOptions = await this.appendPathPartEventRequestOpts(requestParameters);
|
|
464
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
465
|
+
|
|
466
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => EventResponseFromJSON(jsonValue));
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* Record an event for a subject path_part from the frontend. Auth: caller must hold ``can_write`` on the subject\'s materialized_path (OWNER/ADMIN bypass). Server stamps ``actor_user_id`` from the caller\'s identity — callers cannot impersonate other users on the audit trail. ``kind`` is free-form text but reserved server namespaces (``workflow.``, ``document.``, ``folder.``, ``permission.``, ``connector.``, ``query.``, ``auth.``, ``tenant.``) are rejected at 422 so clients cannot forge server-emitted audit events. Clients should namespace under ``client.*``. ``payload`` is capped at 64KB encoded JSON.
|
|
471
|
+
* Append Path Part Event Handler
|
|
472
|
+
*/
|
|
473
|
+
async appendPathPartEvent(requestParameters: AppendPathPartEventRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<EventResponse> {
|
|
474
|
+
const response = await this.appendPathPartEventRaw(requestParameters, initOverrides);
|
|
475
|
+
return await response.value();
|
|
476
|
+
}
|
|
477
|
+
|
|
319
478
|
/**
|
|
320
479
|
* Creates request options for bulkRemovePathPartTags without sending the request
|
|
321
480
|
*/
|
|
@@ -585,6 +744,81 @@ export class PathPartsApi extends runtime.BaseAPI implements PathPartsApiInterfa
|
|
|
585
744
|
return await response.value();
|
|
586
745
|
}
|
|
587
746
|
|
|
747
|
+
/**
|
|
748
|
+
* Creates request options for listPathPartEvents without sending the request
|
|
749
|
+
*/
|
|
750
|
+
async listPathPartEventsRequestOpts(requestParameters: ListPathPartEventsRequest): Promise<runtime.RequestOpts> {
|
|
751
|
+
if (requestParameters['pathPartId'] == null) {
|
|
752
|
+
throw new runtime.RequiredError(
|
|
753
|
+
'pathPartId',
|
|
754
|
+
'Required parameter "pathPartId" was null or undefined when calling listPathPartEvents().'
|
|
755
|
+
);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
const queryParameters: any = {};
|
|
759
|
+
|
|
760
|
+
if (requestParameters['kind'] != null) {
|
|
761
|
+
queryParameters['kind'] = requestParameters['kind'];
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
if (requestParameters['since'] != null) {
|
|
765
|
+
queryParameters['since'] = (requestParameters['since'] as any).toISOString();
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
if (requestParameters['until'] != null) {
|
|
769
|
+
queryParameters['until'] = (requestParameters['until'] as any).toISOString();
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
if (requestParameters['recursive'] != null) {
|
|
773
|
+
queryParameters['recursive'] = requestParameters['recursive'];
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
if (requestParameters['limit'] != null) {
|
|
777
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
if (requestParameters['offset'] != null) {
|
|
781
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
785
|
+
|
|
786
|
+
if (requestParameters['authorization'] != null) {
|
|
787
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
let urlPath = `/v1/path-parts/{path_part_id}/events`;
|
|
792
|
+
urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
|
|
793
|
+
|
|
794
|
+
return {
|
|
795
|
+
path: urlPath,
|
|
796
|
+
method: 'GET',
|
|
797
|
+
headers: headerParameters,
|
|
798
|
+
query: queryParameters,
|
|
799
|
+
};
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* List events anchored to a specific path_part subject. Subject permission is enforced via the existing ``PathPermissionService`` — caller must have ``can_read`` on the subject\'s materialized_path (OWNER/ADMIN bypass). Events are ordered newest-first by ``ts`` and paginated. When ``recursive=True``, events on any descendant of the subject are included — useful for \"all events under this folder\" or \"all events under this workflow definition\".
|
|
804
|
+
* List Path Part Events Handler
|
|
805
|
+
*/
|
|
806
|
+
async listPathPartEventsRaw(requestParameters: ListPathPartEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseEventResponse>> {
|
|
807
|
+
const requestOptions = await this.listPathPartEventsRequestOpts(requestParameters);
|
|
808
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
809
|
+
|
|
810
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResponseEventResponseFromJSON(jsonValue));
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* List events anchored to a specific path_part subject. Subject permission is enforced via the existing ``PathPermissionService`` — caller must have ``can_read`` on the subject\'s materialized_path (OWNER/ADMIN bypass). Events are ordered newest-first by ``ts`` and paginated. When ``recursive=True``, events on any descendant of the subject are included — useful for \"all events under this folder\" or \"all events under this workflow definition\".
|
|
815
|
+
* List Path Part Events Handler
|
|
816
|
+
*/
|
|
817
|
+
async listPathPartEvents(requestParameters: ListPathPartEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseEventResponse> {
|
|
818
|
+
const response = await this.listPathPartEventsRaw(requestParameters, initOverrides);
|
|
819
|
+
return await response.value();
|
|
820
|
+
}
|
|
821
|
+
|
|
588
822
|
/**
|
|
589
823
|
* Creates request options for listPathParts without sending the request
|
|
590
824
|
*/
|