@knowledge-stack/ksapi 1.83.0 → 1.85.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.
Files changed (146) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/README.md +21 -2
  3. package/dist/apis/DocumentCheckoutApi.d.ts +158 -0
  4. package/dist/apis/DocumentCheckoutApi.js +197 -0
  5. package/dist/apis/PathPartsApi.d.ts +110 -1
  6. package/dist/apis/PathPartsApi.js +111 -0
  7. package/dist/apis/WorkflowMemoryApi.d.ts +249 -0
  8. package/dist/apis/WorkflowMemoryApi.js +299 -0
  9. package/dist/apis/index.d.ts +2 -0
  10. package/dist/apis/index.js +2 -0
  11. package/dist/esm/apis/DocumentCheckoutApi.d.ts +158 -0
  12. package/dist/esm/apis/DocumentCheckoutApi.js +160 -0
  13. package/dist/esm/apis/PathPartsApi.d.ts +110 -1
  14. package/dist/esm/apis/PathPartsApi.js +112 -1
  15. package/dist/esm/apis/WorkflowMemoryApi.d.ts +249 -0
  16. package/dist/esm/apis/WorkflowMemoryApi.js +262 -0
  17. package/dist/esm/apis/index.d.ts +2 -0
  18. package/dist/esm/apis/index.js +2 -0
  19. package/dist/esm/models/AppendEventRequest.d.ts +62 -0
  20. package/dist/esm/models/AppendEventRequest.js +51 -0
  21. package/dist/esm/models/AppendMemoryChunkRequest.d.ts +54 -0
  22. package/dist/esm/models/AppendMemoryChunkRequest.js +52 -0
  23. package/dist/esm/models/ChunkBulkResponse.d.ts +4 -4
  24. package/dist/esm/models/ChunkContentItem.d.ts +2 -2
  25. package/dist/esm/models/ChunkResponse.d.ts +4 -4
  26. package/dist/esm/models/CreateThreadMessageRequest.d.ts +2 -2
  27. package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +1 -1
  28. package/dist/esm/models/DocumentCheckoutResponse.d.ts +65 -0
  29. package/dist/esm/models/DocumentCheckoutResponse.js +56 -0
  30. package/dist/esm/models/DocumentResponse.d.ts +7 -0
  31. package/dist/esm/models/DocumentResponse.js +3 -0
  32. package/dist/esm/models/DocumentVersionMetadata.d.ts +4 -4
  33. package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +2 -2
  34. package/dist/esm/models/EditMemoryChunkRequest.d.ts +47 -0
  35. package/dist/esm/models/EditMemoryChunkRequest.js +49 -0
  36. package/dist/esm/models/EventResponse.d.ts +83 -0
  37. package/dist/esm/models/EventResponse.js +64 -0
  38. package/dist/esm/models/ListMemoryChunksResponse.d.ts +48 -0
  39. package/dist/esm/models/ListMemoryChunksResponse.js +45 -0
  40. package/dist/esm/models/MemoryChunkResponse.d.ts +60 -0
  41. package/dist/esm/models/MemoryChunkResponse.js +53 -0
  42. package/dist/esm/models/MemoryKind.d.ts +29 -0
  43. package/dist/esm/models/MemoryKind.js +47 -0
  44. package/dist/esm/models/PaginatedResponseEventResponse.d.ts +66 -0
  45. package/dist/esm/models/PaginatedResponseEventResponse.js +70 -0
  46. package/dist/esm/models/ScoredChunkResponse.d.ts +4 -4
  47. package/dist/esm/models/SectionSystemMetadata.d.ts +1 -1
  48. package/dist/esm/models/TenantSettingsUpdate.d.ts +2 -2
  49. package/dist/esm/models/ThreadMessageDetailsInput.d.ts +2 -2
  50. package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +2 -2
  51. package/dist/esm/models/ThreadMessageResponse.d.ts +2 -2
  52. package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +2 -2
  53. package/dist/esm/models/UpdateTenantRequest.d.ts +4 -4
  54. package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +1 -1
  55. package/dist/esm/models/WorkflowDefinitionResponse.d.ts +1 -1
  56. package/dist/esm/models/WorkflowRunSnapshot.d.ts +1 -1
  57. package/dist/esm/models/index.d.ts +9 -0
  58. package/dist/esm/models/index.js +9 -0
  59. package/dist/models/AppendEventRequest.d.ts +62 -0
  60. package/dist/models/AppendEventRequest.js +59 -0
  61. package/dist/models/AppendMemoryChunkRequest.d.ts +54 -0
  62. package/dist/models/AppendMemoryChunkRequest.js +60 -0
  63. package/dist/models/ChunkBulkResponse.d.ts +4 -4
  64. package/dist/models/ChunkContentItem.d.ts +2 -2
  65. package/dist/models/ChunkResponse.d.ts +4 -4
  66. package/dist/models/CreateThreadMessageRequest.d.ts +2 -2
  67. package/dist/models/CreateWorkflowDefinitionRequest.d.ts +1 -1
  68. package/dist/models/DocumentCheckoutResponse.d.ts +65 -0
  69. package/dist/models/DocumentCheckoutResponse.js +64 -0
  70. package/dist/models/DocumentResponse.d.ts +7 -0
  71. package/dist/models/DocumentResponse.js +3 -0
  72. package/dist/models/DocumentVersionMetadata.d.ts +4 -4
  73. package/dist/models/DocumentVersionMetadataUpdate.d.ts +2 -2
  74. package/dist/models/EditMemoryChunkRequest.d.ts +47 -0
  75. package/dist/models/EditMemoryChunkRequest.js +57 -0
  76. package/dist/models/EventResponse.d.ts +83 -0
  77. package/dist/models/EventResponse.js +72 -0
  78. package/dist/models/ListMemoryChunksResponse.d.ts +48 -0
  79. package/dist/models/ListMemoryChunksResponse.js +53 -0
  80. package/dist/models/MemoryChunkResponse.d.ts +60 -0
  81. package/dist/models/MemoryChunkResponse.js +61 -0
  82. package/dist/models/MemoryKind.d.ts +29 -0
  83. package/dist/models/MemoryKind.js +55 -0
  84. package/dist/models/PaginatedResponseEventResponse.d.ts +66 -0
  85. package/dist/models/PaginatedResponseEventResponse.js +78 -0
  86. package/dist/models/ScoredChunkResponse.d.ts +4 -4
  87. package/dist/models/SectionSystemMetadata.d.ts +1 -1
  88. package/dist/models/TenantSettingsUpdate.d.ts +2 -2
  89. package/dist/models/ThreadMessageDetailsInput.d.ts +2 -2
  90. package/dist/models/ThreadMessageDetailsOutput.d.ts +2 -2
  91. package/dist/models/ThreadMessageResponse.d.ts +2 -2
  92. package/dist/models/UpdateChunkMetadataRequest.d.ts +2 -2
  93. package/dist/models/UpdateTenantRequest.d.ts +4 -4
  94. package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +1 -1
  95. package/dist/models/WorkflowDefinitionResponse.d.ts +1 -1
  96. package/dist/models/WorkflowRunSnapshot.d.ts +1 -1
  97. package/dist/models/index.d.ts +9 -0
  98. package/dist/models/index.js +9 -0
  99. package/docs/AppendEventRequest.md +37 -0
  100. package/docs/AppendMemoryChunkRequest.md +36 -0
  101. package/docs/DocumentCheckoutApi.md +233 -0
  102. package/docs/DocumentCheckoutResponse.md +41 -0
  103. package/docs/DocumentResponse.md +2 -0
  104. package/docs/EditMemoryChunkRequest.md +34 -0
  105. package/docs/EventResponse.md +45 -0
  106. package/docs/FolderResponseOrDocumentResponse.md +2 -0
  107. package/docs/ListMemoryChunksResponse.md +34 -0
  108. package/docs/MemoryChunkResponse.md +39 -0
  109. package/docs/MemoryKind.md +33 -0
  110. package/docs/PaginatedResponseEventResponse.md +40 -0
  111. package/docs/PathPartsApi.md +171 -0
  112. package/docs/WorkflowMemoryApi.md +390 -0
  113. package/package.json +1 -1
  114. package/src/apis/DocumentCheckoutApi.ts +296 -0
  115. package/src/apis/PathPartsApi.ts +234 -0
  116. package/src/apis/WorkflowMemoryApi.ts +522 -0
  117. package/src/apis/index.ts +2 -0
  118. package/src/models/AppendEventRequest.ts +102 -0
  119. package/src/models/AppendMemoryChunkRequest.ts +105 -0
  120. package/src/models/ChunkBulkResponse.ts +4 -4
  121. package/src/models/ChunkContentItem.ts +2 -2
  122. package/src/models/ChunkResponse.ts +4 -4
  123. package/src/models/CreateThreadMessageRequest.ts +2 -2
  124. package/src/models/CreateWorkflowDefinitionRequest.ts +1 -1
  125. package/src/models/DocumentCheckoutResponse.ts +110 -0
  126. package/src/models/DocumentResponse.ts +15 -0
  127. package/src/models/DocumentVersionMetadata.ts +4 -4
  128. package/src/models/DocumentVersionMetadataUpdate.ts +2 -2
  129. package/src/models/EditMemoryChunkRequest.ts +87 -0
  130. package/src/models/EventResponse.ts +132 -0
  131. package/src/models/ListMemoryChunksResponse.ts +91 -0
  132. package/src/models/MemoryChunkResponse.ts +111 -0
  133. package/src/models/MemoryKind.ts +57 -0
  134. package/src/models/PaginatedResponseEventResponse.ts +130 -0
  135. package/src/models/ScoredChunkResponse.ts +4 -4
  136. package/src/models/SectionSystemMetadata.ts +1 -1
  137. package/src/models/TenantSettingsUpdate.ts +2 -2
  138. package/src/models/ThreadMessageDetailsInput.ts +2 -2
  139. package/src/models/ThreadMessageDetailsOutput.ts +2 -2
  140. package/src/models/ThreadMessageResponse.ts +2 -2
  141. package/src/models/UpdateChunkMetadataRequest.ts +2 -2
  142. package/src/models/UpdateTenantRequest.ts +4 -4
  143. package/src/models/UpdateWorkflowDefinitionRequest.ts +1 -1
  144. package/src/models/WorkflowDefinitionResponse.ts +1 -1
  145. package/src/models/WorkflowRunSnapshot.ts +1 -1
  146. package/src/models/index.ts +9 -0
@@ -0,0 +1,296 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ DocumentCheckoutResponse,
19
+ HTTPValidationError,
20
+ } from '../models/index';
21
+ import {
22
+ DocumentCheckoutResponseFromJSON,
23
+ DocumentCheckoutResponseToJSON,
24
+ HTTPValidationErrorFromJSON,
25
+ HTTPValidationErrorToJSON,
26
+ } from '../models/index';
27
+
28
+ export interface AcquireDocumentCheckoutRequest {
29
+ pathPartId: string;
30
+ authorization?: string | null;
31
+ ksUat?: string | null;
32
+ }
33
+
34
+ export interface GetDocumentCheckoutRequest {
35
+ pathPartId: string;
36
+ authorization?: string | null;
37
+ ksUat?: string | null;
38
+ }
39
+
40
+ export interface ReleaseDocumentCheckoutRequest {
41
+ pathPartId: string;
42
+ authorization?: string | null;
43
+ ksUat?: string | null;
44
+ }
45
+
46
+ /**
47
+ * DocumentCheckoutApi - interface
48
+ *
49
+ * @export
50
+ * @interface DocumentCheckoutApiInterface
51
+ */
52
+ export interface DocumentCheckoutApiInterface {
53
+ /**
54
+ * Creates request options for acquireDocumentCheckout without sending the request
55
+ * @param {string} pathPartId Document\'s PathPart ID
56
+ * @param {string} [authorization]
57
+ * @param {string} [ksUat]
58
+ * @throws {RequiredError}
59
+ * @memberof DocumentCheckoutApiInterface
60
+ */
61
+ acquireDocumentCheckoutRequestOpts(requestParameters: AcquireDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
62
+
63
+ /**
64
+ * Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
65
+ * @summary Acquire Document Checkout Handler
66
+ * @param {string} pathPartId Document\&#39;s PathPart ID
67
+ * @param {string} [authorization]
68
+ * @param {string} [ksUat]
69
+ * @param {*} [options] Override http request option.
70
+ * @throws {RequiredError}
71
+ * @memberof DocumentCheckoutApiInterface
72
+ */
73
+ acquireDocumentCheckoutRaw(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
74
+
75
+ /**
76
+ * Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
77
+ * Acquire Document Checkout Handler
78
+ */
79
+ acquireDocumentCheckout(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
80
+
81
+ /**
82
+ * Creates request options for getDocumentCheckout without sending the request
83
+ * @param {string} pathPartId Document\&#39;s PathPart ID
84
+ * @param {string} [authorization]
85
+ * @param {string} [ksUat]
86
+ * @throws {RequiredError}
87
+ * @memberof DocumentCheckoutApiInterface
88
+ */
89
+ getDocumentCheckoutRequestOpts(requestParameters: GetDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
90
+
91
+ /**
92
+ * Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
93
+ * @summary Get Document Checkout Handler
94
+ * @param {string} pathPartId Document\&#39;s PathPart ID
95
+ * @param {string} [authorization]
96
+ * @param {string} [ksUat]
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ * @memberof DocumentCheckoutApiInterface
100
+ */
101
+ getDocumentCheckoutRaw(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>>;
102
+
103
+ /**
104
+ * Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
105
+ * Get Document Checkout Handler
106
+ */
107
+ getDocumentCheckout(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse>;
108
+
109
+ /**
110
+ * Creates request options for releaseDocumentCheckout without sending the request
111
+ * @param {string} pathPartId Document\&#39;s PathPart ID
112
+ * @param {string} [authorization]
113
+ * @param {string} [ksUat]
114
+ * @throws {RequiredError}
115
+ * @memberof DocumentCheckoutApiInterface
116
+ */
117
+ releaseDocumentCheckoutRequestOpts(requestParameters: ReleaseDocumentCheckoutRequest): Promise<runtime.RequestOpts>;
118
+
119
+ /**
120
+ * Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
121
+ * @summary Release Document Checkout Handler
122
+ * @param {string} pathPartId Document\&#39;s PathPart ID
123
+ * @param {string} [authorization]
124
+ * @param {string} [ksUat]
125
+ * @param {*} [options] Override http request option.
126
+ * @throws {RequiredError}
127
+ * @memberof DocumentCheckoutApiInterface
128
+ */
129
+ releaseDocumentCheckoutRaw(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
130
+
131
+ /**
132
+ * Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
133
+ * Release Document Checkout Handler
134
+ */
135
+ releaseDocumentCheckout(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
136
+
137
+ }
138
+
139
+ /**
140
+ *
141
+ */
142
+ export class DocumentCheckoutApi extends runtime.BaseAPI implements DocumentCheckoutApiInterface {
143
+
144
+ /**
145
+ * Creates request options for acquireDocumentCheckout without sending the request
146
+ */
147
+ async acquireDocumentCheckoutRequestOpts(requestParameters: AcquireDocumentCheckoutRequest): Promise<runtime.RequestOpts> {
148
+ if (requestParameters['pathPartId'] == null) {
149
+ throw new runtime.RequiredError(
150
+ 'pathPartId',
151
+ 'Required parameter "pathPartId" was null or undefined when calling acquireDocumentCheckout().'
152
+ );
153
+ }
154
+
155
+ const queryParameters: any = {};
156
+
157
+ const headerParameters: runtime.HTTPHeaders = {};
158
+
159
+ if (requestParameters['authorization'] != null) {
160
+ headerParameters['authorization'] = String(requestParameters['authorization']);
161
+ }
162
+
163
+
164
+ let urlPath = `/v1/documents/{path_part_id}/checkout`;
165
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
166
+
167
+ return {
168
+ path: urlPath,
169
+ method: 'POST',
170
+ headers: headerParameters,
171
+ query: queryParameters,
172
+ };
173
+ }
174
+
175
+ /**
176
+ * Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
177
+ * Acquire Document Checkout Handler
178
+ */
179
+ async acquireDocumentCheckoutRaw(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>> {
180
+ const requestOptions = await this.acquireDocumentCheckoutRequestOpts(requestParameters);
181
+ const response = await this.request(requestOptions, initOverrides);
182
+
183
+ return new runtime.JSONApiResponse(response, (jsonValue) => DocumentCheckoutResponseFromJSON(jsonValue));
184
+ }
185
+
186
+ /**
187
+ * Acquire a write lock on the document. If the caller already holds the lock, re-acquire refreshes ``acquired_at``; the response is 200 in both cases. If another user holds the lock, returns 409. Locks have no TTL — they persist until released by the holder.
188
+ * Acquire Document Checkout Handler
189
+ */
190
+ async acquireDocumentCheckout(requestParameters: AcquireDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse> {
191
+ const response = await this.acquireDocumentCheckoutRaw(requestParameters, initOverrides);
192
+ return await response.value();
193
+ }
194
+
195
+ /**
196
+ * Creates request options for getDocumentCheckout without sending the request
197
+ */
198
+ async getDocumentCheckoutRequestOpts(requestParameters: GetDocumentCheckoutRequest): Promise<runtime.RequestOpts> {
199
+ if (requestParameters['pathPartId'] == null) {
200
+ throw new runtime.RequiredError(
201
+ 'pathPartId',
202
+ 'Required parameter "pathPartId" was null or undefined when calling getDocumentCheckout().'
203
+ );
204
+ }
205
+
206
+ const queryParameters: any = {};
207
+
208
+ const headerParameters: runtime.HTTPHeaders = {};
209
+
210
+ if (requestParameters['authorization'] != null) {
211
+ headerParameters['authorization'] = String(requestParameters['authorization']);
212
+ }
213
+
214
+
215
+ let urlPath = `/v1/documents/{path_part_id}/checkout`;
216
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
217
+
218
+ return {
219
+ path: urlPath,
220
+ method: 'GET',
221
+ headers: headerParameters,
222
+ query: queryParameters,
223
+ };
224
+ }
225
+
226
+ /**
227
+ * Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
228
+ * Get Document Checkout Handler
229
+ */
230
+ async getDocumentCheckoutRaw(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DocumentCheckoutResponse>> {
231
+ const requestOptions = await this.getDocumentCheckoutRequestOpts(requestParameters);
232
+ const response = await this.request(requestOptions, initOverrides);
233
+
234
+ return new runtime.JSONApiResponse(response, (jsonValue) => DocumentCheckoutResponseFromJSON(jsonValue));
235
+ }
236
+
237
+ /**
238
+ * Get the active checkout for the document. 404 if no active checkout exists. The holder can always GET their own lock regardless of current path permissions (parallel to the release holder-bypass).
239
+ * Get Document Checkout Handler
240
+ */
241
+ async getDocumentCheckout(requestParameters: GetDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentCheckoutResponse> {
242
+ const response = await this.getDocumentCheckoutRaw(requestParameters, initOverrides);
243
+ return await response.value();
244
+ }
245
+
246
+ /**
247
+ * Creates request options for releaseDocumentCheckout without sending the request
248
+ */
249
+ async releaseDocumentCheckoutRequestOpts(requestParameters: ReleaseDocumentCheckoutRequest): Promise<runtime.RequestOpts> {
250
+ if (requestParameters['pathPartId'] == null) {
251
+ throw new runtime.RequiredError(
252
+ 'pathPartId',
253
+ 'Required parameter "pathPartId" was null or undefined when calling releaseDocumentCheckout().'
254
+ );
255
+ }
256
+
257
+ const queryParameters: any = {};
258
+
259
+ const headerParameters: runtime.HTTPHeaders = {};
260
+
261
+ if (requestParameters['authorization'] != null) {
262
+ headerParameters['authorization'] = String(requestParameters['authorization']);
263
+ }
264
+
265
+
266
+ let urlPath = `/v1/documents/{path_part_id}/checkout`;
267
+ urlPath = urlPath.replace(`{${"path_part_id"}}`, encodeURIComponent(String(requestParameters['pathPartId'])));
268
+
269
+ return {
270
+ path: urlPath,
271
+ method: 'DELETE',
272
+ headers: headerParameters,
273
+ query: queryParameters,
274
+ };
275
+ }
276
+
277
+ /**
278
+ * Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
279
+ * Release Document Checkout Handler
280
+ */
281
+ async releaseDocumentCheckoutRaw(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
282
+ const requestOptions = await this.releaseDocumentCheckoutRequestOpts(requestParameters);
283
+ const response = await this.request(requestOptions, initOverrides);
284
+
285
+ return new runtime.VoidApiResponse(response);
286
+ }
287
+
288
+ /**
289
+ * Release the write lock on the document. Only the holder may release the lock; others receive 403. The holder can always release regardless of current path permissions (in case a folder move relocated the doc to a path the holder can no longer write to).
290
+ * Release Document Checkout Handler
291
+ */
292
+ async releaseDocumentCheckout(requestParameters: ReleaseDocumentCheckoutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
293
+ await this.releaseDocumentCheckoutRaw(requestParameters, initOverrides);
294
+ }
295
+
296
+ }
@@ -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
  */