@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,56 @@
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
+ export const DocumentCheckoutResponsePropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the DocumentCheckoutResponse interface.
17
+ */
18
+ export function instanceOfDocumentCheckoutResponse(value) {
19
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
20
+ return false;
21
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
22
+ return false;
23
+ if (!('userId' in value) || value['userId'] === undefined)
24
+ return false;
25
+ if (!('acquiredAt' in value) || value['acquiredAt'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ export function DocumentCheckoutResponseFromJSON(json) {
30
+ return DocumentCheckoutResponseFromJSONTyped(json, false);
31
+ }
32
+ export function DocumentCheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'tenantId': json['tenant_id'],
38
+ 'pathPartId': json['path_part_id'],
39
+ 'userId': json['user_id'],
40
+ 'acquiredAt': (new Date(json['acquired_at'])),
41
+ };
42
+ }
43
+ export function DocumentCheckoutResponseToJSON(json) {
44
+ return DocumentCheckoutResponseToJSONTyped(json, false);
45
+ }
46
+ export function DocumentCheckoutResponseToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'tenant_id': value['tenantId'],
52
+ 'path_part_id': value['pathPartId'],
53
+ 'user_id': value['userId'],
54
+ 'acquired_at': value['acquiredAt'].toISOString(),
55
+ };
56
+ }
@@ -12,6 +12,7 @@
12
12
  import type { DocumentOrigin } from './DocumentOrigin';
13
13
  import type { TagResponse } from './TagResponse';
14
14
  import type { DocumentType } from './DocumentType';
15
+ import type { DocumentCheckoutResponse } from './DocumentCheckoutResponse';
15
16
  import type { DocumentVersionResponse } from './DocumentVersionResponse';
16
17
  /**
17
18
  * Document response model.
@@ -127,6 +128,12 @@ export interface DocumentResponse {
127
128
  * @memberof DocumentResponse
128
129
  */
129
130
  canWrite?: boolean | null;
131
+ /**
132
+ * Active write-lock state. Null when no checkout is held. Populated on detail endpoints (GET /v1/documents/{id}). Any tenant member with read access may observe this state.
133
+ * @type {DocumentCheckoutResponse}
134
+ * @memberof DocumentResponse
135
+ */
136
+ checkout?: DocumentCheckoutResponse | null;
130
137
  }
131
138
  /**
132
139
  * @export
@@ -14,6 +14,7 @@
14
14
  import { DocumentOriginFromJSON, DocumentOriginToJSON, } from './DocumentOrigin';
15
15
  import { TagResponseFromJSON, TagResponseToJSON, } from './TagResponse';
16
16
  import { DocumentTypeFromJSON, DocumentTypeToJSON, } from './DocumentType';
17
+ import { DocumentCheckoutResponseFromJSON, DocumentCheckoutResponseToJSON, } from './DocumentCheckoutResponse';
17
18
  import { DocumentVersionResponseFromJSON, DocumentVersionResponseToJSON, } from './DocumentVersionResponse';
18
19
  /**
19
20
  * @export
@@ -86,6 +87,7 @@ export function DocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
86
87
  'updatedAt': (new Date(json['updated_at'])),
87
88
  'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponseFromJSON)),
88
89
  'canWrite': json['can_write'] == null ? undefined : json['can_write'],
90
+ 'checkout': json['checkout'] == null ? undefined : DocumentCheckoutResponseFromJSON(json['checkout']),
89
91
  };
90
92
  }
91
93
  export function DocumentResponseToJSON(json) {
@@ -114,5 +116,6 @@ export function DocumentResponseToJSONTyped(value, ignoreDiscriminator = false)
114
116
  'updated_at': value['updatedAt'].toISOString(),
115
117
  'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponseToJSON)),
116
118
  'can_write': value['canWrite'],
119
+ 'checkout': DocumentCheckoutResponseToJSON(value['checkout']),
117
120
  };
118
121
  }
@@ -51,11 +51,11 @@ export interface DocumentVersionMetadata {
51
51
  */
52
52
  hash?: string | null;
53
53
  /**
54
- *
54
+ * Current state of the ingestion pipeline workflow
55
55
  * @type {PipelineState}
56
56
  * @memberof DocumentVersionMetadata
57
57
  */
58
- pipelineState?: PipelineState;
58
+ pipelineState?: PipelineState | null;
59
59
  /**
60
60
  * Total number of pages in the document
61
61
  * @type {number}
@@ -103,11 +103,11 @@ export interface DocumentVersionMetadata {
103
103
  [key: string]: any;
104
104
  }> | null;
105
105
  /**
106
- *
106
+ * Aggregate statistics for the document version (tokens, chunk counts, depth)
107
107
  * @type {InformationStatistics}
108
108
  * @memberof DocumentVersionMetadata
109
109
  */
110
- informationStatistics?: InformationStatistics;
110
+ informationStatistics?: InformationStatistics | null;
111
111
  /**
112
112
  * True once the conversion activity successfully consumed PAGE quota
113
113
  * @type {boolean}
@@ -67,7 +67,7 @@ export interface DocumentVersionMetadataUpdate {
67
67
  * @type {PipelineState}
68
68
  * @memberof DocumentVersionMetadataUpdate
69
69
  */
70
- pipelineState?: PipelineState;
70
+ pipelineState?: PipelineState | null;
71
71
  /**
72
72
  *
73
73
  * @type {number}
@@ -119,7 +119,7 @@ export interface DocumentVersionMetadataUpdate {
119
119
  * @type {InformationStatistics}
120
120
  * @memberof DocumentVersionMetadataUpdate
121
121
  */
122
- informationStatistics?: InformationStatistics;
122
+ informationStatistics?: InformationStatistics | null;
123
123
  /**
124
124
  *
125
125
  * @type {boolean}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface EditMemoryChunkRequest
16
+ */
17
+ export interface EditMemoryChunkRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof EditMemoryChunkRequest
22
+ */
23
+ body: string;
24
+ }
25
+ export declare const EditMemoryChunkRequestPropertyValidationAttributesMap: {
26
+ [property: string]: {
27
+ maxLength?: number;
28
+ minLength?: number;
29
+ pattern?: string;
30
+ maximum?: number;
31
+ exclusiveMaximum?: boolean;
32
+ minimum?: number;
33
+ exclusiveMinimum?: boolean;
34
+ multipleOf?: number;
35
+ maxItems?: number;
36
+ minItems?: number;
37
+ uniqueItems?: boolean;
38
+ };
39
+ };
40
+ /**
41
+ * Check if a given object implements the EditMemoryChunkRequest interface.
42
+ */
43
+ export declare function instanceOfEditMemoryChunkRequest(value: object): value is EditMemoryChunkRequest;
44
+ export declare function EditMemoryChunkRequestFromJSON(json: any): EditMemoryChunkRequest;
45
+ export declare function EditMemoryChunkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): EditMemoryChunkRequest;
46
+ export declare function EditMemoryChunkRequestToJSON(json: any): EditMemoryChunkRequest;
47
+ export declare function EditMemoryChunkRequestToJSONTyped(value?: EditMemoryChunkRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
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
+ export const EditMemoryChunkRequestPropertyValidationAttributesMap = {
15
+ body: {
16
+ maxLength: 16384,
17
+ minLength: 1,
18
+ },
19
+ };
20
+ /**
21
+ * Check if a given object implements the EditMemoryChunkRequest interface.
22
+ */
23
+ export function instanceOfEditMemoryChunkRequest(value) {
24
+ if (!('body' in value) || value['body'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function EditMemoryChunkRequestFromJSON(json) {
29
+ return EditMemoryChunkRequestFromJSONTyped(json, false);
30
+ }
31
+ export function EditMemoryChunkRequestFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'body': json['body'],
37
+ };
38
+ }
39
+ export function EditMemoryChunkRequestToJSON(json) {
40
+ return EditMemoryChunkRequestToJSONTyped(json, false);
41
+ }
42
+ export function EditMemoryChunkRequestToJSONTyped(value, ignoreDiscriminator = false) {
43
+ if (value == null) {
44
+ return value;
45
+ }
46
+ return {
47
+ 'body': value['body'],
48
+ };
49
+ }
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * One event row, anchored to a path_part subject.
14
+ *
15
+ * ``kind`` is namespaced ``domain.action`` (e.g. ``workflow.approval``,
16
+ * ``document.created``). ``payload`` is the domain-specific structured
17
+ * JSON associated with the event.
18
+ * @export
19
+ * @interface EventResponse
20
+ */
21
+ export interface EventResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof EventResponse
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof EventResponse
32
+ */
33
+ subjectPathPartId: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof EventResponse
38
+ */
39
+ kind: string;
40
+ /**
41
+ *
42
+ * @type {Date}
43
+ * @memberof EventResponse
44
+ */
45
+ ts: Date;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof EventResponse
50
+ */
51
+ actorUserId: string | null;
52
+ /**
53
+ *
54
+ * @type {{ [key: string]: any; }}
55
+ * @memberof EventResponse
56
+ */
57
+ payload: {
58
+ [key: string]: any;
59
+ };
60
+ }
61
+ export declare const EventResponsePropertyValidationAttributesMap: {
62
+ [property: string]: {
63
+ maxLength?: number;
64
+ minLength?: number;
65
+ pattern?: string;
66
+ maximum?: number;
67
+ exclusiveMaximum?: boolean;
68
+ minimum?: number;
69
+ exclusiveMinimum?: boolean;
70
+ multipleOf?: number;
71
+ maxItems?: number;
72
+ minItems?: number;
73
+ uniqueItems?: boolean;
74
+ };
75
+ };
76
+ /**
77
+ * Check if a given object implements the EventResponse interface.
78
+ */
79
+ export declare function instanceOfEventResponse(value: object): value is EventResponse;
80
+ export declare function EventResponseFromJSON(json: any): EventResponse;
81
+ export declare function EventResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventResponse;
82
+ export declare function EventResponseToJSON(json: any): EventResponse;
83
+ export declare function EventResponseToJSONTyped(value?: EventResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,64 @@
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
+ export const EventResponsePropertyValidationAttributesMap = {};
15
+ /**
16
+ * Check if a given object implements the EventResponse interface.
17
+ */
18
+ export function instanceOfEventResponse(value) {
19
+ if (!('id' in value) || value['id'] === undefined)
20
+ return false;
21
+ if (!('subjectPathPartId' in value) || value['subjectPathPartId'] === undefined)
22
+ return false;
23
+ if (!('kind' in value) || value['kind'] === undefined)
24
+ return false;
25
+ if (!('ts' in value) || value['ts'] === undefined)
26
+ return false;
27
+ if (!('actorUserId' in value) || value['actorUserId'] === undefined)
28
+ return false;
29
+ if (!('payload' in value) || value['payload'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ export function EventResponseFromJSON(json) {
34
+ return EventResponseFromJSONTyped(json, false);
35
+ }
36
+ export function EventResponseFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'id': json['id'],
42
+ 'subjectPathPartId': json['subject_path_part_id'],
43
+ 'kind': json['kind'],
44
+ 'ts': (new Date(json['ts'])),
45
+ 'actorUserId': json['actor_user_id'],
46
+ 'payload': json['payload'],
47
+ };
48
+ }
49
+ export function EventResponseToJSON(json) {
50
+ return EventResponseToJSONTyped(json, false);
51
+ }
52
+ export function EventResponseToJSONTyped(value, ignoreDiscriminator = false) {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+ 'id': value['id'],
58
+ 'subject_path_part_id': value['subjectPathPartId'],
59
+ 'kind': value['kind'],
60
+ 'ts': value['ts'].toISOString(),
61
+ 'actor_user_id': value['actorUserId'],
62
+ 'payload': value['payload'],
63
+ };
64
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { MemoryChunkResponse } from './MemoryChunkResponse';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ListMemoryChunksResponse
17
+ */
18
+ export interface ListMemoryChunksResponse {
19
+ /**
20
+ *
21
+ * @type {Array<MemoryChunkResponse>}
22
+ * @memberof ListMemoryChunksResponse
23
+ */
24
+ chunks: Array<MemoryChunkResponse>;
25
+ }
26
+ export declare const ListMemoryChunksResponsePropertyValidationAttributesMap: {
27
+ [property: string]: {
28
+ maxLength?: number;
29
+ minLength?: number;
30
+ pattern?: string;
31
+ maximum?: number;
32
+ exclusiveMaximum?: boolean;
33
+ minimum?: number;
34
+ exclusiveMinimum?: boolean;
35
+ multipleOf?: number;
36
+ maxItems?: number;
37
+ minItems?: number;
38
+ uniqueItems?: boolean;
39
+ };
40
+ };
41
+ /**
42
+ * Check if a given object implements the ListMemoryChunksResponse interface.
43
+ */
44
+ export declare function instanceOfListMemoryChunksResponse(value: object): value is ListMemoryChunksResponse;
45
+ export declare function ListMemoryChunksResponseFromJSON(json: any): ListMemoryChunksResponse;
46
+ export declare function ListMemoryChunksResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListMemoryChunksResponse;
47
+ export declare function ListMemoryChunksResponseToJSON(json: any): ListMemoryChunksResponse;
48
+ export declare function ListMemoryChunksResponseToJSONTyped(value?: ListMemoryChunksResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,45 @@
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
+ import { MemoryChunkResponseFromJSON, MemoryChunkResponseToJSON, } from './MemoryChunkResponse';
15
+ export const ListMemoryChunksResponsePropertyValidationAttributesMap = {};
16
+ /**
17
+ * Check if a given object implements the ListMemoryChunksResponse interface.
18
+ */
19
+ export function instanceOfListMemoryChunksResponse(value) {
20
+ if (!('chunks' in value) || value['chunks'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function ListMemoryChunksResponseFromJSON(json) {
25
+ return ListMemoryChunksResponseFromJSONTyped(json, false);
26
+ }
27
+ export function ListMemoryChunksResponseFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'chunks': (json['chunks'].map(MemoryChunkResponseFromJSON)),
33
+ };
34
+ }
35
+ export function ListMemoryChunksResponseToJSON(json) {
36
+ return ListMemoryChunksResponseToJSONTyped(json, false);
37
+ }
38
+ export function ListMemoryChunksResponseToJSONTyped(value, ignoreDiscriminator = false) {
39
+ if (value == null) {
40
+ return value;
41
+ }
42
+ return {
43
+ 'chunks': (value['chunks'].map(MemoryChunkResponseToJSON)),
44
+ };
45
+ }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { MemoryKind } from './MemoryKind';
13
+ /**
14
+ * Parsed view of one fenced chunk in MEMORY.md.
15
+ * @export
16
+ * @interface MemoryChunkResponse
17
+ */
18
+ export interface MemoryChunkResponse {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof MemoryChunkResponse
23
+ */
24
+ chunkId: string;
25
+ /**
26
+ *
27
+ * @type {MemoryKind}
28
+ * @memberof MemoryChunkResponse
29
+ */
30
+ kind: MemoryKind;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof MemoryChunkResponse
35
+ */
36
+ body: string;
37
+ }
38
+ export declare const MemoryChunkResponsePropertyValidationAttributesMap: {
39
+ [property: string]: {
40
+ maxLength?: number;
41
+ minLength?: number;
42
+ pattern?: string;
43
+ maximum?: number;
44
+ exclusiveMaximum?: boolean;
45
+ minimum?: number;
46
+ exclusiveMinimum?: boolean;
47
+ multipleOf?: number;
48
+ maxItems?: number;
49
+ minItems?: number;
50
+ uniqueItems?: boolean;
51
+ };
52
+ };
53
+ /**
54
+ * Check if a given object implements the MemoryChunkResponse interface.
55
+ */
56
+ export declare function instanceOfMemoryChunkResponse(value: object): value is MemoryChunkResponse;
57
+ export declare function MemoryChunkResponseFromJSON(json: any): MemoryChunkResponse;
58
+ export declare function MemoryChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemoryChunkResponse;
59
+ export declare function MemoryChunkResponseToJSON(json: any): MemoryChunkResponse;
60
+ export declare function MemoryChunkResponseToJSONTyped(value?: MemoryChunkResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,53 @@
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
+ import { MemoryKindFromJSON, MemoryKindToJSON, } from './MemoryKind';
15
+ export const MemoryChunkResponsePropertyValidationAttributesMap = {};
16
+ /**
17
+ * Check if a given object implements the MemoryChunkResponse interface.
18
+ */
19
+ export function instanceOfMemoryChunkResponse(value) {
20
+ if (!('chunkId' in value) || value['chunkId'] === undefined)
21
+ return false;
22
+ if (!('kind' in value) || value['kind'] === undefined)
23
+ return false;
24
+ if (!('body' in value) || value['body'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function MemoryChunkResponseFromJSON(json) {
29
+ return MemoryChunkResponseFromJSONTyped(json, false);
30
+ }
31
+ export function MemoryChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'chunkId': json['chunk_id'],
37
+ 'kind': MemoryKindFromJSON(json['kind']),
38
+ 'body': json['body'],
39
+ };
40
+ }
41
+ export function MemoryChunkResponseToJSON(json) {
42
+ return MemoryChunkResponseToJSONTyped(json, false);
43
+ }
44
+ export function MemoryChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
45
+ if (value == null) {
46
+ return value;
47
+ }
48
+ return {
49
+ 'chunk_id': value['chunkId'],
50
+ 'kind': MemoryKindToJSON(value['kind']),
51
+ 'body': value['body'],
52
+ };
53
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Category of a memory chunk inside a MEMORY.md document.
14
+ *
15
+ * Stored inside the chunk's HTML-comment fence as ``kind=<value>``.
16
+ * Not a Postgres enum — memory is file-backed, not table-backed.
17
+ * @export
18
+ */
19
+ export declare const MemoryKind: {
20
+ readonly Correction: "CORRECTION";
21
+ readonly Preference: "PREFERENCE";
22
+ readonly Example: "EXAMPLE";
23
+ };
24
+ export type MemoryKind = typeof MemoryKind[keyof typeof MemoryKind];
25
+ export declare function instanceOfMemoryKind(value: any): boolean;
26
+ export declare function MemoryKindFromJSON(json: any): MemoryKind;
27
+ export declare function MemoryKindFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemoryKind;
28
+ export declare function MemoryKindToJSON(value?: MemoryKind | null): any;
29
+ export declare function MemoryKindToJSONTyped(value: any, ignoreDiscriminator: boolean): MemoryKind;
@@ -0,0 +1,47 @@
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
+ * Category of a memory chunk inside a MEMORY.md document.
16
+ *
17
+ * Stored inside the chunk's HTML-comment fence as ``kind=<value>``.
18
+ * Not a Postgres enum — memory is file-backed, not table-backed.
19
+ * @export
20
+ */
21
+ export const MemoryKind = {
22
+ Correction: 'CORRECTION',
23
+ Preference: 'PREFERENCE',
24
+ Example: 'EXAMPLE'
25
+ };
26
+ export function instanceOfMemoryKind(value) {
27
+ for (const key in MemoryKind) {
28
+ if (Object.prototype.hasOwnProperty.call(MemoryKind, key)) {
29
+ if (MemoryKind[key] === value) {
30
+ return true;
31
+ }
32
+ }
33
+ }
34
+ return false;
35
+ }
36
+ export function MemoryKindFromJSON(json) {
37
+ return MemoryKindFromJSONTyped(json, false);
38
+ }
39
+ export function MemoryKindFromJSONTyped(json, ignoreDiscriminator) {
40
+ return json;
41
+ }
42
+ export function MemoryKindToJSON(value) {
43
+ return value;
44
+ }
45
+ export function MemoryKindToJSONTyped(value, ignoreDiscriminator) {
46
+ return value;
47
+ }