@knowledge-stack/ksapi 1.12.0 → 1.14.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 (123) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/README.md +2 -2
  3. package/dist/apis/ChunksApi.d.ts +30 -1
  4. package/dist/apis/ChunksApi.js +34 -1
  5. package/dist/apis/TagsApi.d.ts +20 -20
  6. package/dist/apis/TagsApi.js +10 -10
  7. package/dist/apis/ThreadsApi.d.ts +4 -4
  8. package/dist/apis/ThreadsApi.js +2 -2
  9. package/dist/apis/UserPermissionsApi.d.ts +154 -0
  10. package/dist/apis/UserPermissionsApi.js +192 -0
  11. package/dist/apis/index.d.ts +1 -0
  12. package/dist/apis/index.js +1 -0
  13. package/dist/esm/apis/ChunksApi.d.ts +30 -1
  14. package/dist/esm/apis/ChunksApi.js +35 -2
  15. package/dist/esm/apis/TagsApi.d.ts +20 -20
  16. package/dist/esm/apis/TagsApi.js +10 -10
  17. package/dist/esm/apis/ThreadsApi.d.ts +4 -4
  18. package/dist/esm/apis/ThreadsApi.js +2 -2
  19. package/dist/esm/apis/UserPermissionsApi.d.ts +154 -0
  20. package/dist/esm/apis/UserPermissionsApi.js +188 -0
  21. package/dist/esm/apis/index.d.ts +1 -0
  22. package/dist/esm/apis/index.js +1 -0
  23. package/dist/esm/models/ChunkResponse.d.ts +6 -0
  24. package/dist/esm/models/ChunkResponse.js +4 -0
  25. package/dist/esm/models/ChunkSearchRequest.d.ts +89 -0
  26. package/dist/esm/models/ChunkSearchRequest.js +69 -0
  27. package/dist/esm/models/CreatePermissionRequest.d.ts +66 -0
  28. package/dist/esm/models/CreatePermissionRequest.js +57 -0
  29. package/dist/esm/models/DocumentContentPathPart.d.ts +6 -0
  30. package/dist/esm/models/DocumentContentPathPart.js +4 -0
  31. package/dist/esm/models/DocumentResponse.d.ts +6 -0
  32. package/dist/esm/models/DocumentResponse.js +4 -0
  33. package/dist/esm/models/DocumentVersionResponse.d.ts +6 -0
  34. package/dist/esm/models/DocumentVersionResponse.js +4 -0
  35. package/dist/esm/models/EmbeddingModel.d.ts +24 -0
  36. package/dist/esm/models/EmbeddingModel.js +42 -0
  37. package/dist/esm/models/FolderDocumentResponse.d.ts +6 -0
  38. package/dist/esm/models/FolderDocumentResponse.js +4 -0
  39. package/dist/esm/models/FolderResponse.d.ts +6 -0
  40. package/dist/esm/models/FolderResponse.js +4 -0
  41. package/dist/esm/models/PaginatedResponsePermissionResponse.d.ts +66 -0
  42. package/dist/esm/models/PaginatedResponsePermissionResponse.js +70 -0
  43. package/dist/esm/models/PathPartResponse.d.ts +6 -0
  44. package/dist/esm/models/PathPartResponse.js +4 -0
  45. package/dist/esm/models/PermissionCapability.d.ts +25 -0
  46. package/dist/esm/models/PermissionCapability.js +43 -0
  47. package/dist/esm/models/PermissionResponse.d.ts +84 -0
  48. package/dist/esm/models/PermissionResponse.js +69 -0
  49. package/dist/esm/models/ScoredChunkResponse.d.ts +127 -0
  50. package/dist/esm/models/ScoredChunkResponse.js +94 -0
  51. package/dist/esm/models/SectionResponse.d.ts +6 -0
  52. package/dist/esm/models/SectionResponse.js +4 -0
  53. package/dist/esm/models/ThreadMessageResponse.d.ts +6 -0
  54. package/dist/esm/models/ThreadMessageResponse.js +4 -0
  55. package/dist/esm/models/ThreadResponse.d.ts +6 -0
  56. package/dist/esm/models/ThreadResponse.js +4 -0
  57. package/dist/esm/models/UpdatePermissionRequest.d.ts +54 -0
  58. package/dist/esm/models/UpdatePermissionRequest.js +45 -0
  59. package/dist/esm/models/index.d.ts +8 -0
  60. package/dist/esm/models/index.js +8 -0
  61. package/dist/models/ChunkResponse.d.ts +6 -0
  62. package/dist/models/ChunkResponse.js +4 -0
  63. package/dist/models/ChunkSearchRequest.d.ts +89 -0
  64. package/dist/models/ChunkSearchRequest.js +77 -0
  65. package/dist/models/CreatePermissionRequest.d.ts +66 -0
  66. package/dist/models/CreatePermissionRequest.js +65 -0
  67. package/dist/models/DocumentContentPathPart.d.ts +6 -0
  68. package/dist/models/DocumentContentPathPart.js +4 -0
  69. package/dist/models/DocumentResponse.d.ts +6 -0
  70. package/dist/models/DocumentResponse.js +4 -0
  71. package/dist/models/DocumentVersionResponse.d.ts +6 -0
  72. package/dist/models/DocumentVersionResponse.js +4 -0
  73. package/dist/models/EmbeddingModel.d.ts +24 -0
  74. package/dist/models/EmbeddingModel.js +50 -0
  75. package/dist/models/FolderDocumentResponse.d.ts +6 -0
  76. package/dist/models/FolderDocumentResponse.js +4 -0
  77. package/dist/models/FolderResponse.d.ts +6 -0
  78. package/dist/models/FolderResponse.js +4 -0
  79. package/dist/models/PaginatedResponsePermissionResponse.d.ts +66 -0
  80. package/dist/models/PaginatedResponsePermissionResponse.js +78 -0
  81. package/dist/models/PathPartResponse.d.ts +6 -0
  82. package/dist/models/PathPartResponse.js +4 -0
  83. package/dist/models/PermissionCapability.d.ts +25 -0
  84. package/dist/models/PermissionCapability.js +51 -0
  85. package/dist/models/PermissionResponse.d.ts +84 -0
  86. package/dist/models/PermissionResponse.js +77 -0
  87. package/dist/models/ScoredChunkResponse.d.ts +127 -0
  88. package/dist/models/ScoredChunkResponse.js +102 -0
  89. package/dist/models/SectionResponse.d.ts +6 -0
  90. package/dist/models/SectionResponse.js +4 -0
  91. package/dist/models/ThreadMessageResponse.d.ts +6 -0
  92. package/dist/models/ThreadMessageResponse.js +4 -0
  93. package/dist/models/ThreadResponse.d.ts +6 -0
  94. package/dist/models/ThreadResponse.js +4 -0
  95. package/dist/models/UpdatePermissionRequest.d.ts +54 -0
  96. package/dist/models/UpdatePermissionRequest.js +53 -0
  97. package/dist/models/index.d.ts +8 -0
  98. package/dist/models/index.js +8 -0
  99. package/package.json +1 -1
  100. package/src/apis/ChunksApi.ts +70 -1
  101. package/src/apis/TagsApi.ts +20 -20
  102. package/src/apis/ThreadsApi.ts +4 -4
  103. package/src/apis/UserPermissionsApi.ts +362 -0
  104. package/src/apis/index.ts +1 -0
  105. package/src/models/ChunkResponse.ts +9 -0
  106. package/src/models/ChunkSearchRequest.ts +160 -0
  107. package/src/models/CreatePermissionRequest.ts +120 -0
  108. package/src/models/DocumentContentPathPart.ts +9 -0
  109. package/src/models/DocumentResponse.ts +9 -0
  110. package/src/models/DocumentVersionResponse.ts +9 -0
  111. package/src/models/EmbeddingModel.ts +52 -0
  112. package/src/models/FolderDocumentResponse.ts +9 -0
  113. package/src/models/FolderResponse.ts +9 -0
  114. package/src/models/PaginatedResponsePermissionResponse.ts +130 -0
  115. package/src/models/PathPartResponse.ts +9 -0
  116. package/src/models/PermissionCapability.ts +53 -0
  117. package/src/models/PermissionResponse.ts +147 -0
  118. package/src/models/ScoredChunkResponse.ts +215 -0
  119. package/src/models/SectionResponse.ts +9 -0
  120. package/src/models/ThreadMessageResponse.ts +9 -0
  121. package/src/models/ThreadResponse.ts +9 -0
  122. package/src/models/UpdatePermissionRequest.ts +100 -0
  123. package/src/models/index.ts +8 -0
@@ -0,0 +1,25 @@
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
+ * Permission capability.
14
+ * @export
15
+ */
16
+ export declare const PermissionCapability: {
17
+ readonly ReadOnly: "READ_ONLY";
18
+ readonly ReadWrite: "READ_WRITE";
19
+ };
20
+ export type PermissionCapability = typeof PermissionCapability[keyof typeof PermissionCapability];
21
+ export declare function instanceOfPermissionCapability(value: any): boolean;
22
+ export declare function PermissionCapabilityFromJSON(json: any): PermissionCapability;
23
+ export declare function PermissionCapabilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): PermissionCapability;
24
+ export declare function PermissionCapabilityToJSON(value?: PermissionCapability | null): any;
25
+ export declare function PermissionCapabilityToJSONTyped(value: any, ignoreDiscriminator: boolean): PermissionCapability;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PermissionCapability = void 0;
17
+ exports.instanceOfPermissionCapability = instanceOfPermissionCapability;
18
+ exports.PermissionCapabilityFromJSON = PermissionCapabilityFromJSON;
19
+ exports.PermissionCapabilityFromJSONTyped = PermissionCapabilityFromJSONTyped;
20
+ exports.PermissionCapabilityToJSON = PermissionCapabilityToJSON;
21
+ exports.PermissionCapabilityToJSONTyped = PermissionCapabilityToJSONTyped;
22
+ /**
23
+ * Permission capability.
24
+ * @export
25
+ */
26
+ exports.PermissionCapability = {
27
+ ReadOnly: 'READ_ONLY',
28
+ ReadWrite: 'READ_WRITE'
29
+ };
30
+ function instanceOfPermissionCapability(value) {
31
+ for (const key in exports.PermissionCapability) {
32
+ if (Object.prototype.hasOwnProperty.call(exports.PermissionCapability, key)) {
33
+ if (exports.PermissionCapability[key] === value) {
34
+ return true;
35
+ }
36
+ }
37
+ }
38
+ return false;
39
+ }
40
+ function PermissionCapabilityFromJSON(json) {
41
+ return PermissionCapabilityFromJSONTyped(json, false);
42
+ }
43
+ function PermissionCapabilityFromJSONTyped(json, ignoreDiscriminator) {
44
+ return json;
45
+ }
46
+ function PermissionCapabilityToJSON(value) {
47
+ return value;
48
+ }
49
+ function PermissionCapabilityToJSONTyped(value, ignoreDiscriminator) {
50
+ return value;
51
+ }
@@ -0,0 +1,84 @@
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 { PermissionCapability } from './PermissionCapability';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PermissionResponse
17
+ */
18
+ export interface PermissionResponse {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof PermissionResponse
23
+ */
24
+ id: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof PermissionResponse
29
+ */
30
+ tenantId: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof PermissionResponse
35
+ */
36
+ userId: string;
37
+ /**
38
+ *
39
+ * @type {string}
40
+ * @memberof PermissionResponse
41
+ */
42
+ path: string;
43
+ /**
44
+ *
45
+ * @type {PermissionCapability}
46
+ * @memberof PermissionResponse
47
+ */
48
+ capability: PermissionCapability;
49
+ /**
50
+ *
51
+ * @type {Date}
52
+ * @memberof PermissionResponse
53
+ */
54
+ createdAt: Date;
55
+ /**
56
+ *
57
+ * @type {Date}
58
+ * @memberof PermissionResponse
59
+ */
60
+ updatedAt: Date;
61
+ }
62
+ /**
63
+ * Check if a given object implements the PermissionResponse interface.
64
+ */
65
+ export declare function instanceOfPermissionResponse(value: object): value is PermissionResponse;
66
+ export declare function PermissionResponseFromJSON(json: any): PermissionResponse;
67
+ export declare function PermissionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PermissionResponse;
68
+ export declare function PermissionResponseToJSON(json: any): PermissionResponse;
69
+ export declare function PermissionResponseToJSONTyped(value?: PermissionResponse | null, ignoreDiscriminator?: boolean): any;
70
+ export declare const PermissionResponsePropertyValidationAttributesMap: {
71
+ [property: string]: {
72
+ maxLength?: number;
73
+ minLength?: number;
74
+ pattern?: string;
75
+ maximum?: number;
76
+ exclusiveMaximum?: boolean;
77
+ minimum?: number;
78
+ exclusiveMinimum?: boolean;
79
+ multipleOf?: number;
80
+ maxItems?: number;
81
+ minItems?: number;
82
+ uniqueItems?: boolean;
83
+ };
84
+ };
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PermissionResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfPermissionResponse = instanceOfPermissionResponse;
18
+ exports.PermissionResponseFromJSON = PermissionResponseFromJSON;
19
+ exports.PermissionResponseFromJSONTyped = PermissionResponseFromJSONTyped;
20
+ exports.PermissionResponseToJSON = PermissionResponseToJSON;
21
+ exports.PermissionResponseToJSONTyped = PermissionResponseToJSONTyped;
22
+ const PermissionCapability_1 = require("./PermissionCapability");
23
+ /**
24
+ * Check if a given object implements the PermissionResponse interface.
25
+ */
26
+ function instanceOfPermissionResponse(value) {
27
+ if (!('id' in value) || value['id'] === undefined)
28
+ return false;
29
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
30
+ return false;
31
+ if (!('userId' in value) || value['userId'] === undefined)
32
+ return false;
33
+ if (!('path' in value) || value['path'] === undefined)
34
+ return false;
35
+ if (!('capability' in value) || value['capability'] === undefined)
36
+ return false;
37
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
38
+ return false;
39
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
40
+ return false;
41
+ return true;
42
+ }
43
+ function PermissionResponseFromJSON(json) {
44
+ return PermissionResponseFromJSONTyped(json, false);
45
+ }
46
+ function PermissionResponseFromJSONTyped(json, ignoreDiscriminator) {
47
+ if (json == null) {
48
+ return json;
49
+ }
50
+ return {
51
+ 'id': json['id'],
52
+ 'tenantId': json['tenant_id'],
53
+ 'userId': json['user_id'],
54
+ 'path': json['path'],
55
+ 'capability': (0, PermissionCapability_1.PermissionCapabilityFromJSON)(json['capability']),
56
+ 'createdAt': (new Date(json['created_at'])),
57
+ 'updatedAt': (new Date(json['updated_at'])),
58
+ };
59
+ }
60
+ function PermissionResponseToJSON(json) {
61
+ return PermissionResponseToJSONTyped(json, false);
62
+ }
63
+ function PermissionResponseToJSONTyped(value, ignoreDiscriminator = false) {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+ return {
68
+ 'id': value['id'],
69
+ 'tenant_id': value['tenantId'],
70
+ 'user_id': value['userId'],
71
+ 'path': value['path'],
72
+ 'capability': (0, PermissionCapability_1.PermissionCapabilityToJSON)(value['capability']),
73
+ 'created_at': value['createdAt'].toISOString(),
74
+ 'updated_at': value['updatedAt'].toISOString(),
75
+ };
76
+ }
77
+ exports.PermissionResponsePropertyValidationAttributesMap = {};
@@ -0,0 +1,127 @@
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 { ChunkMetadataOutput } from './ChunkMetadataOutput';
13
+ import type { ChunkType } from './ChunkType';
14
+ /**
15
+ * Chunk response with similarity score.
16
+ * @export
17
+ * @interface ScoredChunkResponse
18
+ */
19
+ export interface ScoredChunkResponse {
20
+ /**
21
+ * Chunk ID
22
+ * @type {string}
23
+ * @memberof ScoredChunkResponse
24
+ */
25
+ id: string;
26
+ /**
27
+ * PathPart ID
28
+ * @type {string}
29
+ * @memberof ScoredChunkResponse
30
+ */
31
+ pathPartId: string;
32
+ /**
33
+ * ChunkContent ID
34
+ * @type {string}
35
+ * @memberof ScoredChunkResponse
36
+ */
37
+ contentId: string;
38
+ /**
39
+ * Chunk text content
40
+ * @type {string}
41
+ * @memberof ScoredChunkResponse
42
+ */
43
+ content: string;
44
+ /**
45
+ * Type of chunk content
46
+ * @type {ChunkType}
47
+ * @memberof ScoredChunkResponse
48
+ */
49
+ chunkType: ChunkType;
50
+ /**
51
+ * Chunk metadata
52
+ * @type {ChunkMetadataOutput}
53
+ * @memberof ScoredChunkResponse
54
+ */
55
+ chunkMetadata: ChunkMetadataOutput;
56
+ /**
57
+ * Parent PathPart ID
58
+ * @type {string}
59
+ * @memberof ScoredChunkResponse
60
+ */
61
+ parentId: string;
62
+ /**
63
+ * Previous sibling PathPart ID
64
+ * @type {string}
65
+ * @memberof ScoredChunkResponse
66
+ */
67
+ prevSiblingPathId?: string;
68
+ /**
69
+ * Next sibling PathPart ID
70
+ * @type {string}
71
+ * @memberof ScoredChunkResponse
72
+ */
73
+ nextSiblingId?: string;
74
+ /**
75
+ * Full materialized path from root
76
+ * @type {string}
77
+ * @memberof ScoredChunkResponse
78
+ */
79
+ materializedPath: string;
80
+ /**
81
+ * Tenant ID
82
+ * @type {string}
83
+ * @memberof ScoredChunkResponse
84
+ */
85
+ tenantId: string;
86
+ /**
87
+ * Creation timestamp
88
+ * @type {Date}
89
+ * @memberof ScoredChunkResponse
90
+ */
91
+ createdAt: Date;
92
+ /**
93
+ * Last update timestamp
94
+ * @type {Date}
95
+ * @memberof ScoredChunkResponse
96
+ */
97
+ updatedAt: Date;
98
+ /**
99
+ * Cosine similarity score (1 - cosine_distance)
100
+ * @type {number}
101
+ * @memberof ScoredChunkResponse
102
+ */
103
+ score: number;
104
+ }
105
+ /**
106
+ * Check if a given object implements the ScoredChunkResponse interface.
107
+ */
108
+ export declare function instanceOfScoredChunkResponse(value: object): value is ScoredChunkResponse;
109
+ export declare function ScoredChunkResponseFromJSON(json: any): ScoredChunkResponse;
110
+ export declare function ScoredChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScoredChunkResponse;
111
+ export declare function ScoredChunkResponseToJSON(json: any): ScoredChunkResponse;
112
+ export declare function ScoredChunkResponseToJSONTyped(value?: ScoredChunkResponse | null, ignoreDiscriminator?: boolean): any;
113
+ export declare const ScoredChunkResponsePropertyValidationAttributesMap: {
114
+ [property: string]: {
115
+ maxLength?: number;
116
+ minLength?: number;
117
+ pattern?: string;
118
+ maximum?: number;
119
+ exclusiveMaximum?: boolean;
120
+ minimum?: number;
121
+ exclusiveMinimum?: boolean;
122
+ multipleOf?: number;
123
+ maxItems?: number;
124
+ minItems?: number;
125
+ uniqueItems?: boolean;
126
+ };
127
+ };
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.ScoredChunkResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfScoredChunkResponse = instanceOfScoredChunkResponse;
18
+ exports.ScoredChunkResponseFromJSON = ScoredChunkResponseFromJSON;
19
+ exports.ScoredChunkResponseFromJSONTyped = ScoredChunkResponseFromJSONTyped;
20
+ exports.ScoredChunkResponseToJSON = ScoredChunkResponseToJSON;
21
+ exports.ScoredChunkResponseToJSONTyped = ScoredChunkResponseToJSONTyped;
22
+ const ChunkMetadataOutput_1 = require("./ChunkMetadataOutput");
23
+ const ChunkType_1 = require("./ChunkType");
24
+ /**
25
+ * Check if a given object implements the ScoredChunkResponse interface.
26
+ */
27
+ function instanceOfScoredChunkResponse(value) {
28
+ if (!('id' in value) || value['id'] === undefined)
29
+ return false;
30
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined)
31
+ return false;
32
+ if (!('contentId' in value) || value['contentId'] === undefined)
33
+ return false;
34
+ if (!('content' in value) || value['content'] === undefined)
35
+ return false;
36
+ if (!('chunkType' in value) || value['chunkType'] === undefined)
37
+ return false;
38
+ if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined)
39
+ return false;
40
+ if (!('parentId' in value) || value['parentId'] === undefined)
41
+ return false;
42
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
43
+ return false;
44
+ if (!('tenantId' in value) || value['tenantId'] === undefined)
45
+ return false;
46
+ if (!('createdAt' in value) || value['createdAt'] === undefined)
47
+ return false;
48
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined)
49
+ return false;
50
+ if (!('score' in value) || value['score'] === undefined)
51
+ return false;
52
+ return true;
53
+ }
54
+ function ScoredChunkResponseFromJSON(json) {
55
+ return ScoredChunkResponseFromJSONTyped(json, false);
56
+ }
57
+ function ScoredChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+ 'id': json['id'],
63
+ 'pathPartId': json['path_part_id'],
64
+ 'contentId': json['content_id'],
65
+ 'content': json['content'],
66
+ 'chunkType': (0, ChunkType_1.ChunkTypeFromJSON)(json['chunk_type']),
67
+ 'chunkMetadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputFromJSON)(json['chunk_metadata']),
68
+ 'parentId': json['parent_id'],
69
+ 'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
70
+ 'nextSiblingId': json['next_sibling_id'] == null ? undefined : json['next_sibling_id'],
71
+ 'materializedPath': json['materialized_path'],
72
+ 'tenantId': json['tenant_id'],
73
+ 'createdAt': (new Date(json['created_at'])),
74
+ 'updatedAt': (new Date(json['updated_at'])),
75
+ 'score': json['score'],
76
+ };
77
+ }
78
+ function ScoredChunkResponseToJSON(json) {
79
+ return ScoredChunkResponseToJSONTyped(json, false);
80
+ }
81
+ function ScoredChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
82
+ if (value == null) {
83
+ return value;
84
+ }
85
+ return {
86
+ 'id': value['id'],
87
+ 'path_part_id': value['pathPartId'],
88
+ 'content_id': value['contentId'],
89
+ 'content': value['content'],
90
+ 'chunk_type': (0, ChunkType_1.ChunkTypeToJSON)(value['chunkType']),
91
+ 'chunk_metadata': (0, ChunkMetadataOutput_1.ChunkMetadataOutputToJSON)(value['chunkMetadata']),
92
+ 'parent_id': value['parentId'],
93
+ 'prev_sibling_path_id': value['prevSiblingPathId'],
94
+ 'next_sibling_id': value['nextSiblingId'],
95
+ 'materialized_path': value['materializedPath'],
96
+ 'tenant_id': value['tenantId'],
97
+ 'created_at': value['createdAt'].toISOString(),
98
+ 'updated_at': value['updatedAt'].toISOString(),
99
+ 'score': value['score'],
100
+ };
101
+ }
102
+ exports.ScoredChunkResponsePropertyValidationAttributesMap = {};
@@ -57,6 +57,12 @@ export interface SectionResponse {
57
57
  * @memberof SectionResponse
58
58
  */
59
59
  nextSiblingId?: string;
60
+ /**
61
+ * Full materialized path from root
62
+ * @type {string}
63
+ * @memberof SectionResponse
64
+ */
65
+ materializedPath: string;
60
66
  /**
61
67
  * Tenant ID
62
68
  * @type {string}
@@ -31,6 +31,8 @@ function instanceOfSectionResponse(value) {
31
31
  return false;
32
32
  if (!('parentId' in value) || value['parentId'] === undefined)
33
33
  return false;
34
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
35
+ return false;
34
36
  if (!('tenantId' in value) || value['tenantId'] === undefined)
35
37
  return false;
36
38
  if (!('createdAt' in value) || value['createdAt'] === undefined)
@@ -54,6 +56,7 @@ function SectionResponseFromJSONTyped(json, ignoreDiscriminator) {
54
56
  'parentId': json['parent_id'],
55
57
  'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
56
58
  'nextSiblingId': json['next_sibling_id'] == null ? undefined : json['next_sibling_id'],
59
+ 'materializedPath': json['materialized_path'],
57
60
  'tenantId': json['tenant_id'],
58
61
  'createdAt': (new Date(json['created_at'])),
59
62
  'updatedAt': (new Date(json['updated_at'])),
@@ -74,6 +77,7 @@ function SectionResponseToJSONTyped(value, ignoreDiscriminator = false) {
74
77
  'parent_id': value['parentId'],
75
78
  'prev_sibling_path_id': value['prevSiblingPathId'],
76
79
  'next_sibling_id': value['nextSiblingId'],
80
+ 'materialized_path': value['materializedPath'],
77
81
  'tenant_id': value['tenantId'],
78
82
  'created_at': value['createdAt'].toISOString(),
79
83
  'updated_at': value['updatedAt'].toISOString(),
@@ -52,6 +52,12 @@ export interface ThreadMessageResponse {
52
52
  * @memberof ThreadMessageResponse
53
53
  */
54
54
  parentId: string;
55
+ /**
56
+ * Full materialized path from root
57
+ * @type {string}
58
+ * @memberof ThreadMessageResponse
59
+ */
60
+ materializedPath: string;
55
61
  /**
56
62
  * Tenant ID
57
63
  * @type {string}
@@ -36,6 +36,8 @@ function instanceOfThreadMessageResponse(value) {
36
36
  return false;
37
37
  if (!('parentId' in value) || value['parentId'] === undefined)
38
38
  return false;
39
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
40
+ return false;
39
41
  if (!('tenantId' in value) || value['tenantId'] === undefined)
40
42
  return false;
41
43
  if (!('createdAt' in value) || value['createdAt'] === undefined)
@@ -58,6 +60,7 @@ function ThreadMessageResponseFromJSONTyped(json, ignoreDiscriminator) {
58
60
  'role': (0, MessageRole_1.MessageRoleFromJSON)(json['role']),
59
61
  'content': json['content'],
60
62
  'parentId': json['parent_id'],
63
+ 'materializedPath': json['materialized_path'],
61
64
  'tenantId': json['tenant_id'],
62
65
  'createdAt': (new Date(json['created_at'])),
63
66
  'updatedAt': (new Date(json['updated_at'])),
@@ -77,6 +80,7 @@ function ThreadMessageResponseToJSONTyped(value, ignoreDiscriminator = false) {
77
80
  'role': (0, MessageRole_1.MessageRoleToJSON)(value['role']),
78
81
  'content': value['content'],
79
82
  'parent_id': value['parentId'],
83
+ 'materialized_path': value['materializedPath'],
80
84
  'tenant_id': value['tenantId'],
81
85
  'created_at': value['createdAt'].toISOString(),
82
86
  'updated_at': value['updatedAt'].toISOString(),
@@ -39,6 +39,12 @@ export interface ThreadResponse {
39
39
  * @memberof ThreadResponse
40
40
  */
41
41
  parentThreadId?: string;
42
+ /**
43
+ * Full materialized path from root
44
+ * @type {string}
45
+ * @memberof ThreadResponse
46
+ */
47
+ materializedPath: string;
42
48
  /**
43
49
  * Tenant ID
44
50
  * @type {string}
@@ -29,6 +29,8 @@ function instanceOfThreadResponse(value) {
29
29
  return false;
30
30
  if (!('title' in value) || value['title'] === undefined)
31
31
  return false;
32
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined)
33
+ return false;
32
34
  if (!('tenantId' in value) || value['tenantId'] === undefined)
33
35
  return false;
34
36
  if (!('createdAt' in value) || value['createdAt'] === undefined)
@@ -49,6 +51,7 @@ function ThreadResponseFromJSONTyped(json, ignoreDiscriminator) {
49
51
  'pathPartId': json['path_part_id'],
50
52
  'title': json['title'],
51
53
  'parentThreadId': json['parent_thread_id'] == null ? undefined : json['parent_thread_id'],
54
+ 'materializedPath': json['materialized_path'],
52
55
  'tenantId': json['tenant_id'],
53
56
  'createdAt': (new Date(json['created_at'])),
54
57
  'updatedAt': (new Date(json['updated_at'])),
@@ -66,6 +69,7 @@ function ThreadResponseToJSONTyped(value, ignoreDiscriminator = false) {
66
69
  'path_part_id': value['pathPartId'],
67
70
  'title': value['title'],
68
71
  'parent_thread_id': value['parentThreadId'],
72
+ 'materialized_path': value['materializedPath'],
69
73
  'tenant_id': value['tenantId'],
70
74
  'created_at': value['createdAt'].toISOString(),
71
75
  'updated_at': value['updatedAt'].toISOString(),
@@ -0,0 +1,54 @@
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 { PermissionCapability } from './PermissionCapability';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface UpdatePermissionRequest
17
+ */
18
+ export interface UpdatePermissionRequest {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof UpdatePermissionRequest
23
+ */
24
+ path?: string;
25
+ /**
26
+ *
27
+ * @type {PermissionCapability}
28
+ * @memberof UpdatePermissionRequest
29
+ */
30
+ capability?: PermissionCapability;
31
+ }
32
+ /**
33
+ * Check if a given object implements the UpdatePermissionRequest interface.
34
+ */
35
+ export declare function instanceOfUpdatePermissionRequest(value: object): value is UpdatePermissionRequest;
36
+ export declare function UpdatePermissionRequestFromJSON(json: any): UpdatePermissionRequest;
37
+ export declare function UpdatePermissionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdatePermissionRequest;
38
+ export declare function UpdatePermissionRequestToJSON(json: any): UpdatePermissionRequest;
39
+ export declare function UpdatePermissionRequestToJSONTyped(value?: UpdatePermissionRequest | null, ignoreDiscriminator?: boolean): any;
40
+ export declare const UpdatePermissionRequestPropertyValidationAttributesMap: {
41
+ [property: string]: {
42
+ maxLength?: number;
43
+ minLength?: number;
44
+ pattern?: string;
45
+ maximum?: number;
46
+ exclusiveMaximum?: boolean;
47
+ minimum?: number;
48
+ exclusiveMinimum?: boolean;
49
+ multipleOf?: number;
50
+ maxItems?: number;
51
+ minItems?: number;
52
+ uniqueItems?: boolean;
53
+ };
54
+ };