@knowledge-stack/ksapi 1.51.0 → 1.52.1

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 (49) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +4 -2
  3. package/dist/apis/ChunksApi.d.ts +4 -4
  4. package/dist/apis/ChunksApi.js +2 -2
  5. package/dist/apis/FeaturesApi.d.ts +59 -0
  6. package/dist/apis/FeaturesApi.js +70 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/apis/ChunksApi.d.ts +4 -4
  10. package/dist/esm/apis/ChunksApi.js +2 -2
  11. package/dist/esm/apis/FeaturesApi.d.ts +59 -0
  12. package/dist/esm/apis/FeaturesApi.js +66 -0
  13. package/dist/esm/apis/index.d.ts +1 -0
  14. package/dist/esm/apis/index.js +1 -0
  15. package/dist/esm/models/FeaturesResponse.d.ts +54 -0
  16. package/dist/esm/models/FeaturesResponse.js +49 -0
  17. package/dist/esm/models/UpdateChunkContentRequest.d.ts +0 -7
  18. package/dist/esm/models/UpdateChunkContentRequest.js +0 -3
  19. package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +20 -2
  20. package/dist/esm/models/UpdateChunkMetadataRequest.js +7 -3
  21. package/dist/esm/models/UpdateSectionRequest.d.ts +6 -0
  22. package/dist/esm/models/UpdateSectionRequest.js +2 -0
  23. package/dist/esm/models/index.d.ts +1 -0
  24. package/dist/esm/models/index.js +1 -0
  25. package/dist/models/FeaturesResponse.d.ts +54 -0
  26. package/dist/models/FeaturesResponse.js +57 -0
  27. package/dist/models/UpdateChunkContentRequest.d.ts +0 -7
  28. package/dist/models/UpdateChunkContentRequest.js +0 -3
  29. package/dist/models/UpdateChunkMetadataRequest.d.ts +20 -2
  30. package/dist/models/UpdateChunkMetadataRequest.js +7 -3
  31. package/dist/models/UpdateSectionRequest.d.ts +6 -0
  32. package/dist/models/UpdateSectionRequest.js +2 -0
  33. package/dist/models/index.d.ts +1 -0
  34. package/dist/models/index.js +1 -0
  35. package/docs/ChunksApi.md +1 -1
  36. package/docs/FeaturesApi.md +68 -0
  37. package/docs/FeaturesResponse.md +36 -0
  38. package/docs/UpdateChunkContentRequest.md +0 -2
  39. package/docs/UpdateChunkMetadataRequest.md +7 -1
  40. package/docs/UpdateSectionRequest.md +2 -0
  41. package/package.json +1 -1
  42. package/src/apis/ChunksApi.ts +4 -4
  43. package/src/apis/FeaturesApi.ts +100 -0
  44. package/src/apis/index.ts +1 -0
  45. package/src/models/FeaturesResponse.ts +102 -0
  46. package/src/models/UpdateChunkContentRequest.ts +0 -18
  47. package/src/models/UpdateChunkMetadataRequest.ts +27 -4
  48. package/src/models/UpdateSectionRequest.ts +8 -0
  49. package/src/models/index.ts +1 -0
@@ -0,0 +1,100 @@
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
+ FeaturesResponse,
19
+ } from '../models/index';
20
+ import {
21
+ FeaturesResponseFromJSON,
22
+ FeaturesResponseToJSON,
23
+ } from '../models/index';
24
+
25
+ /**
26
+ * FeaturesApi - interface
27
+ *
28
+ * @export
29
+ * @interface FeaturesApiInterface
30
+ */
31
+ export interface FeaturesApiInterface {
32
+ /**
33
+ * Creates request options for getFeatures without sending the request
34
+ * @throws {RequiredError}
35
+ * @memberof FeaturesApiInterface
36
+ */
37
+ getFeaturesRequestOpts(): Promise<runtime.RequestOpts>;
38
+
39
+ /**
40
+ * Return public feature flags for the frontend.
41
+ * @summary Get Features Handler
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ * @memberof FeaturesApiInterface
45
+ */
46
+ getFeaturesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FeaturesResponse>>;
47
+
48
+ /**
49
+ * Return public feature flags for the frontend.
50
+ * Get Features Handler
51
+ */
52
+ getFeatures(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FeaturesResponse>;
53
+
54
+ }
55
+
56
+ /**
57
+ *
58
+ */
59
+ export class FeaturesApi extends runtime.BaseAPI implements FeaturesApiInterface {
60
+
61
+ /**
62
+ * Creates request options for getFeatures without sending the request
63
+ */
64
+ async getFeaturesRequestOpts(): Promise<runtime.RequestOpts> {
65
+ const queryParameters: any = {};
66
+
67
+ const headerParameters: runtime.HTTPHeaders = {};
68
+
69
+
70
+ let urlPath = `/v1/features`;
71
+
72
+ return {
73
+ path: urlPath,
74
+ method: 'GET',
75
+ headers: headerParameters,
76
+ query: queryParameters,
77
+ };
78
+ }
79
+
80
+ /**
81
+ * Return public feature flags for the frontend.
82
+ * Get Features Handler
83
+ */
84
+ async getFeaturesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FeaturesResponse>> {
85
+ const requestOptions = await this.getFeaturesRequestOpts();
86
+ const response = await this.request(requestOptions, initOverrides);
87
+
88
+ return new runtime.JSONApiResponse(response, (jsonValue) => FeaturesResponseFromJSON(jsonValue));
89
+ }
90
+
91
+ /**
92
+ * Return public feature flags for the frontend.
93
+ * Get Features Handler
94
+ */
95
+ async getFeatures(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FeaturesResponse> {
96
+ const response = await this.getFeaturesRaw(initOverrides);
97
+ return await response.value();
98
+ }
99
+
100
+ }
package/src/apis/index.ts CHANGED
@@ -7,6 +7,7 @@ export * from './ChunksApi';
7
7
  export * from './DefaultApi';
8
8
  export * from './DocumentVersionsApi';
9
9
  export * from './DocumentsApi';
10
+ export * from './FeaturesApi';
10
11
  export * from './FoldersApi';
11
12
  export * from './InvitesApi';
12
13
  export * from './PathPartsApi';
@@ -0,0 +1,102 @@
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
+ import { mapValues } from '../runtime';
16
+ import type { SupportedLanguage } from './SupportedLanguage';
17
+ import {
18
+ SupportedLanguageFromJSON,
19
+ SupportedLanguageFromJSONTyped,
20
+ SupportedLanguageToJSON,
21
+ SupportedLanguageToJSONTyped,
22
+ } from './SupportedLanguage';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface FeaturesResponse
28
+ */
29
+ export interface FeaturesResponse {
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof FeaturesResponse
34
+ */
35
+ googleLoginEnabled: boolean;
36
+ /**
37
+ *
38
+ * @type {SupportedLanguage}
39
+ * @memberof FeaturesResponse
40
+ */
41
+ defaultFrontendLanguage: SupportedLanguage;
42
+ }
43
+
44
+
45
+
46
+ /**
47
+ * Check if a given object implements the FeaturesResponse interface.
48
+ */
49
+ export function instanceOfFeaturesResponse(value: object): value is FeaturesResponse {
50
+ if (!('googleLoginEnabled' in value) || value['googleLoginEnabled'] === undefined) return false;
51
+ if (!('defaultFrontendLanguage' in value) || value['defaultFrontendLanguage'] === undefined) return false;
52
+ return true;
53
+ }
54
+
55
+ export function FeaturesResponseFromJSON(json: any): FeaturesResponse {
56
+ return FeaturesResponseFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function FeaturesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeaturesResponse {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'googleLoginEnabled': json['google_login_enabled'],
66
+ 'defaultFrontendLanguage': SupportedLanguageFromJSON(json['default_frontend_language']),
67
+ };
68
+ }
69
+
70
+ export function FeaturesResponseToJSON(json: any): FeaturesResponse {
71
+ return FeaturesResponseToJSONTyped(json, false);
72
+ }
73
+
74
+ export function FeaturesResponseToJSONTyped(value?: FeaturesResponse | null, ignoreDiscriminator: boolean = false): any {
75
+ if (value == null) {
76
+ return value;
77
+ }
78
+
79
+ return {
80
+
81
+ 'google_login_enabled': value['googleLoginEnabled'],
82
+ 'default_frontend_language': SupportedLanguageToJSON(value['defaultFrontendLanguage']),
83
+ };
84
+ }
85
+
86
+ export const FeaturesResponsePropertyValidationAttributesMap: {
87
+ [property: string]: {
88
+ maxLength?: number,
89
+ minLength?: number,
90
+ pattern?: string,
91
+ maximum?: number,
92
+ exclusiveMaximum?: boolean,
93
+ minimum?: number,
94
+ exclusiveMinimum?: boolean,
95
+ multipleOf?: number,
96
+ maxItems?: number,
97
+ minItems?: number,
98
+ uniqueItems?: boolean
99
+ }
100
+ } = {
101
+ }
102
+
@@ -13,14 +13,6 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { ChunkType } from './ChunkType';
17
- import {
18
- ChunkTypeFromJSON,
19
- ChunkTypeFromJSONTyped,
20
- ChunkTypeToJSON,
21
- ChunkTypeToJSONTyped,
22
- } from './ChunkType';
23
-
24
16
  /**
25
17
  * Request to update chunk content (creates new content row).
26
18
  * @export
@@ -33,16 +25,8 @@ export interface UpdateChunkContentRequest {
33
25
  * @memberof UpdateChunkContentRequest
34
26
  */
35
27
  content: string;
36
- /**
37
- *
38
- * @type {ChunkType}
39
- * @memberof UpdateChunkContentRequest
40
- */
41
- chunkType?: ChunkType;
42
28
  }
43
29
 
44
-
45
-
46
30
  /**
47
31
  * Check if a given object implements the UpdateChunkContentRequest interface.
48
32
  */
@@ -62,7 +46,6 @@ export function UpdateChunkContentRequestFromJSONTyped(json: any, ignoreDiscrimi
62
46
  return {
63
47
 
64
48
  'content': json['content'],
65
- 'chunkType': json['chunk_type'] == null ? undefined : ChunkTypeFromJSON(json['chunk_type']),
66
49
  };
67
50
  }
68
51
 
@@ -78,7 +61,6 @@ export function UpdateChunkContentRequestToJSONTyped(value?: UpdateChunkContentR
78
61
  return {
79
62
 
80
63
  'content': value['content'],
81
- 'chunk_type': ChunkTypeToJSON(value['chunkType']),
82
64
  };
83
65
  }
84
66
 
@@ -22,7 +22,7 @@ import {
22
22
  } from './ChunkMetadataInput';
23
23
 
24
24
  /**
25
- * Request to update chunk metadata (merge).
25
+ * Request to update chunk metadata and/or move the chunk.
26
26
  * @export
27
27
  * @interface UpdateChunkMetadataRequest
28
28
  */
@@ -32,14 +32,31 @@ export interface UpdateChunkMetadataRequest {
32
32
  * @type {ChunkMetadataInput}
33
33
  * @memberof UpdateChunkMetadataRequest
34
34
  */
35
- chunkMetadata: ChunkMetadataInput;
35
+ chunkMetadata?: ChunkMetadataInput;
36
+ /**
37
+ * Reparent to this PathPart ID (must be DOCUMENT_VERSION or SECTION in the same document version)
38
+ * @type {string}
39
+ * @memberof UpdateChunkMetadataRequest
40
+ */
41
+ parentPathPartId?: string | null;
42
+ /**
43
+ * Move after this sibling PathPart ID (within new or current parent)
44
+ * @type {string}
45
+ * @memberof UpdateChunkMetadataRequest
46
+ */
47
+ prevSiblingPathId?: string | null;
48
+ /**
49
+ * Set to true to move to head of sibling list
50
+ * @type {boolean}
51
+ * @memberof UpdateChunkMetadataRequest
52
+ */
53
+ moveToHead?: boolean;
36
54
  }
37
55
 
38
56
  /**
39
57
  * Check if a given object implements the UpdateChunkMetadataRequest interface.
40
58
  */
41
59
  export function instanceOfUpdateChunkMetadataRequest(value: object): value is UpdateChunkMetadataRequest {
42
- if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined) return false;
43
60
  return true;
44
61
  }
45
62
 
@@ -53,7 +70,10 @@ export function UpdateChunkMetadataRequestFromJSONTyped(json: any, ignoreDiscrim
53
70
  }
54
71
  return {
55
72
 
56
- 'chunkMetadata': ChunkMetadataInputFromJSON(json['chunk_metadata']),
73
+ 'chunkMetadata': json['chunk_metadata'] == null ? undefined : ChunkMetadataInputFromJSON(json['chunk_metadata']),
74
+ 'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
75
+ 'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
76
+ 'moveToHead': json['move_to_head'] == null ? undefined : json['move_to_head'],
57
77
  };
58
78
  }
59
79
 
@@ -69,6 +89,9 @@ export function UpdateChunkMetadataRequestToJSONTyped(value?: UpdateChunkMetadat
69
89
  return {
70
90
 
71
91
  'chunk_metadata': ChunkMetadataInputToJSON(value['chunkMetadata']),
92
+ 'parent_path_part_id': value['parentPathPartId'],
93
+ 'prev_sibling_path_id': value['prevSiblingPathId'],
94
+ 'move_to_head': value['moveToHead'],
72
95
  };
73
96
  }
74
97
 
@@ -43,6 +43,12 @@ export interface UpdateSectionRequest {
43
43
  * @memberof UpdateSectionRequest
44
44
  */
45
45
  moveToHead?: boolean;
46
+ /**
47
+ * Reparent to this PathPart ID (must be DOCUMENT_VERSION or SECTION in the same document version)
48
+ * @type {string}
49
+ * @memberof UpdateSectionRequest
50
+ */
51
+ parentPathPartId?: string | null;
46
52
  }
47
53
 
48
54
  /**
@@ -66,6 +72,7 @@ export function UpdateSectionRequestFromJSONTyped(json: any, ignoreDiscriminator
66
72
  'pageNumber': json['page_number'] == null ? undefined : json['page_number'],
67
73
  'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
68
74
  'moveToHead': json['move_to_head'] == null ? undefined : json['move_to_head'],
75
+ 'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
69
76
  };
70
77
  }
71
78
 
@@ -84,6 +91,7 @@ export function UpdateSectionRequestToJSONTyped(value?: UpdateSectionRequest | n
84
91
  'page_number': value['pageNumber'],
85
92
  'prev_sibling_path_id': value['prevSiblingPathId'],
86
93
  'move_to_head': value['moveToHead'],
94
+ 'parent_path_part_id': value['parentPathPartId'],
87
95
  };
88
96
  }
89
97
 
@@ -40,6 +40,7 @@ export * from './EmailSentResponse';
40
40
  export * from './EmailVerificationRequest';
41
41
  export * from './EnrichedCitation';
42
42
  export * from './EnrichedThreadMessageContent';
43
+ export * from './FeaturesResponse';
43
44
  export * from './FolderAction';
44
45
  export * from './FolderActionResponse';
45
46
  export * from './FolderResponse';