@knowledge-stack/ksapi 1.7.0 → 1.9.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 (103) hide show
  1. package/.openapi-generator/FILES +14 -0
  2. package/README.md +2 -2
  3. package/dist/apis/ChunksApi.d.ts +175 -0
  4. package/dist/apis/ChunksApi.js +203 -0
  5. package/dist/apis/DocumentVersionsApi.d.ts +36 -1
  6. package/dist/apis/DocumentVersionsApi.js +41 -0
  7. package/dist/apis/FoldersApi.d.ts +38 -1
  8. package/dist/apis/FoldersApi.js +44 -0
  9. package/dist/apis/PathPartsApi.d.ts +4 -6
  10. package/dist/apis/PathPartsApi.js +2 -5
  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 +175 -0
  14. package/dist/esm/apis/ChunksApi.js +199 -0
  15. package/dist/esm/apis/DocumentVersionsApi.d.ts +36 -1
  16. package/dist/esm/apis/DocumentVersionsApi.js +42 -1
  17. package/dist/esm/apis/FoldersApi.d.ts +38 -1
  18. package/dist/esm/apis/FoldersApi.js +45 -1
  19. package/dist/esm/apis/PathPartsApi.d.ts +4 -6
  20. package/dist/esm/apis/PathPartsApi.js +2 -5
  21. package/dist/esm/apis/index.d.ts +1 -0
  22. package/dist/esm/apis/index.js +1 -0
  23. package/dist/esm/models/ChunkMetadataInput.d.ts +48 -0
  24. package/dist/esm/models/ChunkMetadataInput.js +43 -0
  25. package/dist/esm/models/ChunkMetadataOutput.d.ts +48 -0
  26. package/dist/esm/models/ChunkMetadataOutput.js +43 -0
  27. package/dist/esm/models/ChunkResponse.d.ts +115 -0
  28. package/dist/esm/models/ChunkResponse.js +86 -0
  29. package/dist/esm/models/ChunkType.d.ts +27 -0
  30. package/dist/esm/models/ChunkType.js +45 -0
  31. package/dist/esm/models/CreateChunkRequest.d.ts +73 -0
  32. package/dist/esm/models/CreateChunkRequest.js +64 -0
  33. package/dist/esm/models/DocumentContentPathPart.d.ts +119 -0
  34. package/dist/esm/models/DocumentContentPathPart.js +83 -0
  35. package/dist/esm/models/FolderDocumentResponse.d.ts +138 -0
  36. package/dist/esm/models/FolderDocumentResponse.js +88 -0
  37. package/dist/esm/models/PaginatedResponseDocumentContentPathPart.d.ts +66 -0
  38. package/dist/esm/models/PaginatedResponseDocumentContentPathPart.js +70 -0
  39. package/dist/esm/models/PaginatedResponseFolderDocumentResponse.d.ts +66 -0
  40. package/dist/esm/models/PaginatedResponseFolderDocumentResponse.js +70 -0
  41. package/dist/esm/models/PasswordResetWithTokenRequest.d.ts +2 -8
  42. package/dist/esm/models/PasswordResetWithTokenRequest.js +3 -7
  43. package/dist/esm/models/Polygon.d.ts +65 -0
  44. package/dist/esm/models/Polygon.js +56 -0
  45. package/dist/esm/models/PolygonReference.d.ts +54 -0
  46. package/dist/esm/models/PolygonReference.js +49 -0
  47. package/dist/esm/models/UpdateChunkContentRequest.d.ts +54 -0
  48. package/dist/esm/models/UpdateChunkContentRequest.js +51 -0
  49. package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +48 -0
  50. package/dist/esm/models/UpdateChunkMetadataRequest.js +45 -0
  51. package/dist/esm/models/index.d.ts +13 -0
  52. package/dist/esm/models/index.js +13 -0
  53. package/dist/models/ChunkMetadataInput.d.ts +48 -0
  54. package/dist/models/ChunkMetadataInput.js +51 -0
  55. package/dist/models/ChunkMetadataOutput.d.ts +48 -0
  56. package/dist/models/ChunkMetadataOutput.js +51 -0
  57. package/dist/models/ChunkResponse.d.ts +115 -0
  58. package/dist/models/ChunkResponse.js +94 -0
  59. package/dist/models/ChunkType.d.ts +27 -0
  60. package/dist/models/ChunkType.js +53 -0
  61. package/dist/models/CreateChunkRequest.d.ts +73 -0
  62. package/dist/models/CreateChunkRequest.js +72 -0
  63. package/dist/models/DocumentContentPathPart.d.ts +119 -0
  64. package/dist/models/DocumentContentPathPart.js +91 -0
  65. package/dist/models/FolderDocumentResponse.d.ts +138 -0
  66. package/dist/models/FolderDocumentResponse.js +96 -0
  67. package/dist/models/PaginatedResponseDocumentContentPathPart.d.ts +66 -0
  68. package/dist/models/PaginatedResponseDocumentContentPathPart.js +78 -0
  69. package/dist/models/PaginatedResponseFolderDocumentResponse.d.ts +66 -0
  70. package/dist/models/PaginatedResponseFolderDocumentResponse.js +78 -0
  71. package/dist/models/PasswordResetWithTokenRequest.d.ts +2 -8
  72. package/dist/models/PasswordResetWithTokenRequest.js +3 -7
  73. package/dist/models/Polygon.d.ts +65 -0
  74. package/dist/models/Polygon.js +64 -0
  75. package/dist/models/PolygonReference.d.ts +54 -0
  76. package/dist/models/PolygonReference.js +57 -0
  77. package/dist/models/UpdateChunkContentRequest.d.ts +54 -0
  78. package/dist/models/UpdateChunkContentRequest.js +59 -0
  79. package/dist/models/UpdateChunkMetadataRequest.d.ts +48 -0
  80. package/dist/models/UpdateChunkMetadataRequest.js +53 -0
  81. package/dist/models/index.d.ts +13 -0
  82. package/dist/models/index.js +13 -0
  83. package/package.json +1 -1
  84. package/src/apis/ChunksApi.ts +381 -0
  85. package/src/apis/DocumentVersionsApi.ts +82 -0
  86. package/src/apis/FoldersApi.ts +88 -0
  87. package/src/apis/PathPartsApi.ts +4 -10
  88. package/src/apis/index.ts +1 -0
  89. package/src/models/ChunkMetadataInput.ts +90 -0
  90. package/src/models/ChunkMetadataOutput.ts +90 -0
  91. package/src/models/ChunkResponse.ts +197 -0
  92. package/src/models/ChunkType.ts +55 -0
  93. package/src/models/CreateChunkRequest.ts +138 -0
  94. package/src/models/DocumentContentPathPart.ts +205 -0
  95. package/src/models/FolderDocumentResponse.ts +234 -0
  96. package/src/models/PaginatedResponseDocumentContentPathPart.ts +130 -0
  97. package/src/models/PaginatedResponseFolderDocumentResponse.ts +130 -0
  98. package/src/models/PasswordResetWithTokenRequest.ts +5 -14
  99. package/src/models/Polygon.ts +110 -0
  100. package/src/models/PolygonReference.ts +100 -0
  101. package/src/models/UpdateChunkContentRequest.ts +104 -0
  102. package/src/models/UpdateChunkMetadataRequest.ts +91 -0
  103. package/src/models/index.ts +13 -0
@@ -0,0 +1,130 @@
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 { DocumentContentPathPart } from './DocumentContentPathPart';
17
+ import {
18
+ DocumentContentPathPartFromJSON,
19
+ DocumentContentPathPartFromJSONTyped,
20
+ DocumentContentPathPartToJSON,
21
+ DocumentContentPathPartToJSONTyped,
22
+ } from './DocumentContentPathPart';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PaginatedResponseDocumentContentPathPart
28
+ */
29
+ export interface PaginatedResponseDocumentContentPathPart {
30
+ /**
31
+ * List of items
32
+ * @type {Array<DocumentContentPathPart>}
33
+ * @memberof PaginatedResponseDocumentContentPathPart
34
+ */
35
+ items: Array<DocumentContentPathPart>;
36
+ /**
37
+ * Total number of items
38
+ * @type {number}
39
+ * @memberof PaginatedResponseDocumentContentPathPart
40
+ */
41
+ total: number;
42
+ /**
43
+ * Number of items per page
44
+ * @type {number}
45
+ * @memberof PaginatedResponseDocumentContentPathPart
46
+ */
47
+ limit: number;
48
+ /**
49
+ * Number of items to skip
50
+ * @type {number}
51
+ * @memberof PaginatedResponseDocumentContentPathPart
52
+ */
53
+ offset: number;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the PaginatedResponseDocumentContentPathPart interface.
58
+ */
59
+ export function instanceOfPaginatedResponseDocumentContentPathPart(value: object): value is PaginatedResponseDocumentContentPathPart {
60
+ if (!('items' in value) || value['items'] === undefined) return false;
61
+ if (!('total' in value) || value['total'] === undefined) return false;
62
+ if (!('limit' in value) || value['limit'] === undefined) return false;
63
+ if (!('offset' in value) || value['offset'] === undefined) return false;
64
+ return true;
65
+ }
66
+
67
+ export function PaginatedResponseDocumentContentPathPartFromJSON(json: any): PaginatedResponseDocumentContentPathPart {
68
+ return PaginatedResponseDocumentContentPathPartFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function PaginatedResponseDocumentContentPathPartFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseDocumentContentPathPart {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'items': ((json['items'] as Array<any>).map(DocumentContentPathPartFromJSON)),
78
+ 'total': json['total'],
79
+ 'limit': json['limit'],
80
+ 'offset': json['offset'],
81
+ };
82
+ }
83
+
84
+ export function PaginatedResponseDocumentContentPathPartToJSON(json: any): PaginatedResponseDocumentContentPathPart {
85
+ return PaginatedResponseDocumentContentPathPartToJSONTyped(json, false);
86
+ }
87
+
88
+ export function PaginatedResponseDocumentContentPathPartToJSONTyped(value?: PaginatedResponseDocumentContentPathPart | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'items': ((value['items'] as Array<any>).map(DocumentContentPathPartToJSON)),
96
+ 'total': value['total'],
97
+ 'limit': value['limit'],
98
+ 'offset': value['offset'],
99
+ };
100
+ }
101
+
102
+ export const PaginatedResponseDocumentContentPathPartPropertyValidationAttributesMap: {
103
+ [property: string]: {
104
+ maxLength?: number,
105
+ minLength?: number,
106
+ pattern?: string,
107
+ maximum?: number,
108
+ exclusiveMaximum?: boolean,
109
+ minimum?: number,
110
+ exclusiveMinimum?: boolean,
111
+ multipleOf?: number,
112
+ maxItems?: number,
113
+ minItems?: number,
114
+ uniqueItems?: boolean
115
+ }
116
+ } = {
117
+ total: {
118
+ minimum: 0,
119
+ exclusiveMinimum: false,
120
+ },
121
+ limit: {
122
+ minimum: 1,
123
+ exclusiveMinimum: false,
124
+ },
125
+ offset: {
126
+ minimum: 0,
127
+ exclusiveMinimum: false,
128
+ },
129
+ }
130
+
@@ -0,0 +1,130 @@
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 { FolderDocumentResponse } from './FolderDocumentResponse';
17
+ import {
18
+ FolderDocumentResponseFromJSON,
19
+ FolderDocumentResponseFromJSONTyped,
20
+ FolderDocumentResponseToJSON,
21
+ FolderDocumentResponseToJSONTyped,
22
+ } from './FolderDocumentResponse';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PaginatedResponseFolderDocumentResponse
28
+ */
29
+ export interface PaginatedResponseFolderDocumentResponse {
30
+ /**
31
+ * List of items
32
+ * @type {Array<FolderDocumentResponse>}
33
+ * @memberof PaginatedResponseFolderDocumentResponse
34
+ */
35
+ items: Array<FolderDocumentResponse>;
36
+ /**
37
+ * Total number of items
38
+ * @type {number}
39
+ * @memberof PaginatedResponseFolderDocumentResponse
40
+ */
41
+ total: number;
42
+ /**
43
+ * Number of items per page
44
+ * @type {number}
45
+ * @memberof PaginatedResponseFolderDocumentResponse
46
+ */
47
+ limit: number;
48
+ /**
49
+ * Number of items to skip
50
+ * @type {number}
51
+ * @memberof PaginatedResponseFolderDocumentResponse
52
+ */
53
+ offset: number;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the PaginatedResponseFolderDocumentResponse interface.
58
+ */
59
+ export function instanceOfPaginatedResponseFolderDocumentResponse(value: object): value is PaginatedResponseFolderDocumentResponse {
60
+ if (!('items' in value) || value['items'] === undefined) return false;
61
+ if (!('total' in value) || value['total'] === undefined) return false;
62
+ if (!('limit' in value) || value['limit'] === undefined) return false;
63
+ if (!('offset' in value) || value['offset'] === undefined) return false;
64
+ return true;
65
+ }
66
+
67
+ export function PaginatedResponseFolderDocumentResponseFromJSON(json: any): PaginatedResponseFolderDocumentResponse {
68
+ return PaginatedResponseFolderDocumentResponseFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function PaginatedResponseFolderDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseFolderDocumentResponse {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'items': ((json['items'] as Array<any>).map(FolderDocumentResponseFromJSON)),
78
+ 'total': json['total'],
79
+ 'limit': json['limit'],
80
+ 'offset': json['offset'],
81
+ };
82
+ }
83
+
84
+ export function PaginatedResponseFolderDocumentResponseToJSON(json: any): PaginatedResponseFolderDocumentResponse {
85
+ return PaginatedResponseFolderDocumentResponseToJSONTyped(json, false);
86
+ }
87
+
88
+ export function PaginatedResponseFolderDocumentResponseToJSONTyped(value?: PaginatedResponseFolderDocumentResponse | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'items': ((value['items'] as Array<any>).map(FolderDocumentResponseToJSON)),
96
+ 'total': value['total'],
97
+ 'limit': value['limit'],
98
+ 'offset': value['offset'],
99
+ };
100
+ }
101
+
102
+ export const PaginatedResponseFolderDocumentResponsePropertyValidationAttributesMap: {
103
+ [property: string]: {
104
+ maxLength?: number,
105
+ minLength?: number,
106
+ pattern?: string,
107
+ maximum?: number,
108
+ exclusiveMaximum?: boolean,
109
+ minimum?: number,
110
+ exclusiveMinimum?: boolean,
111
+ multipleOf?: number,
112
+ maxItems?: number,
113
+ minItems?: number,
114
+ uniqueItems?: boolean
115
+ }
116
+ } = {
117
+ total: {
118
+ minimum: 0,
119
+ exclusiveMinimum: false,
120
+ },
121
+ limit: {
122
+ minimum: 1,
123
+ exclusiveMinimum: false,
124
+ },
125
+ offset: {
126
+ minimum: 0,
127
+ exclusiveMinimum: false,
128
+ },
129
+ }
130
+
@@ -20,32 +20,25 @@ import { mapValues } from '../runtime';
20
20
  */
21
21
  export interface PasswordResetWithTokenRequest {
22
22
  /**
23
- * Old password
23
+ * Email verification token
24
24
  * @type {string}
25
25
  * @memberof PasswordResetWithTokenRequest
26
26
  */
27
- oldPassword: string;
27
+ emailToken: string;
28
28
  /**
29
29
  * New password
30
30
  * @type {string}
31
31
  * @memberof PasswordResetWithTokenRequest
32
32
  */
33
33
  newPassword: string;
34
- /**
35
- * Email verification token
36
- * @type {string}
37
- * @memberof PasswordResetWithTokenRequest
38
- */
39
- emailToken: string;
40
34
  }
41
35
 
42
36
  /**
43
37
  * Check if a given object implements the PasswordResetWithTokenRequest interface.
44
38
  */
45
39
  export function instanceOfPasswordResetWithTokenRequest(value: object): value is PasswordResetWithTokenRequest {
46
- if (!('oldPassword' in value) || value['oldPassword'] === undefined) return false;
47
- if (!('newPassword' in value) || value['newPassword'] === undefined) return false;
48
40
  if (!('emailToken' in value) || value['emailToken'] === undefined) return false;
41
+ if (!('newPassword' in value) || value['newPassword'] === undefined) return false;
49
42
  return true;
50
43
  }
51
44
 
@@ -59,9 +52,8 @@ export function PasswordResetWithTokenRequestFromJSONTyped(json: any, ignoreDisc
59
52
  }
60
53
  return {
61
54
 
62
- 'oldPassword': json['old_password'],
63
- 'newPassword': json['new_password'],
64
55
  'emailToken': json['email_token'],
56
+ 'newPassword': json['new_password'],
65
57
  };
66
58
  }
67
59
 
@@ -76,9 +68,8 @@ export function PasswordResetWithTokenRequestToJSONTyped(value?: PasswordResetWi
76
68
 
77
69
  return {
78
70
 
79
- 'old_password': value['oldPassword'],
80
- 'new_password': value['newPassword'],
81
71
  'email_token': value['emailToken'],
72
+ 'new_password': value['newPassword'],
82
73
  };
83
74
  }
84
75
 
@@ -0,0 +1,110 @@
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
+ /**
17
+ * Bounding box polygon.
18
+ * @export
19
+ * @interface Polygon
20
+ */
21
+ export interface Polygon {
22
+ /**
23
+ * The x-coordinate of the top-left corner of the bounding box.
24
+ * @type {number}
25
+ * @memberof Polygon
26
+ */
27
+ x: number;
28
+ /**
29
+ * The y-coordinate of the top-left corner of the bounding box.
30
+ * @type {number}
31
+ * @memberof Polygon
32
+ */
33
+ y: number;
34
+ /**
35
+ * The width of the bounding box.
36
+ * @type {number}
37
+ * @memberof Polygon
38
+ */
39
+ width: number;
40
+ /**
41
+ * The height of the bounding box.
42
+ * @type {number}
43
+ * @memberof Polygon
44
+ */
45
+ height: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the Polygon interface.
50
+ */
51
+ export function instanceOfPolygon(value: object): value is Polygon {
52
+ if (!('x' in value) || value['x'] === undefined) return false;
53
+ if (!('y' in value) || value['y'] === undefined) return false;
54
+ if (!('width' in value) || value['width'] === undefined) return false;
55
+ if (!('height' in value) || value['height'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function PolygonFromJSON(json: any): Polygon {
60
+ return PolygonFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function PolygonFromJSONTyped(json: any, ignoreDiscriminator: boolean): Polygon {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'x': json['x'],
70
+ 'y': json['y'],
71
+ 'width': json['width'],
72
+ 'height': json['height'],
73
+ };
74
+ }
75
+
76
+ export function PolygonToJSON(json: any): Polygon {
77
+ return PolygonToJSONTyped(json, false);
78
+ }
79
+
80
+ export function PolygonToJSONTyped(value?: Polygon | null, ignoreDiscriminator: boolean = false): any {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+
85
+ return {
86
+
87
+ 'x': value['x'],
88
+ 'y': value['y'],
89
+ 'width': value['width'],
90
+ 'height': value['height'],
91
+ };
92
+ }
93
+
94
+ export const PolygonPropertyValidationAttributesMap: {
95
+ [property: string]: {
96
+ maxLength?: number,
97
+ minLength?: number,
98
+ pattern?: string,
99
+ maximum?: number,
100
+ exclusiveMaximum?: boolean,
101
+ minimum?: number,
102
+ exclusiveMinimum?: boolean,
103
+ multipleOf?: number,
104
+ maxItems?: number,
105
+ minItems?: number,
106
+ uniqueItems?: boolean
107
+ }
108
+ } = {
109
+ }
110
+
@@ -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
+ import { mapValues } from '../runtime';
16
+ import type { Polygon } from './Polygon';
17
+ import {
18
+ PolygonFromJSON,
19
+ PolygonFromJSONTyped,
20
+ PolygonToJSON,
21
+ PolygonToJSONTyped,
22
+ } from './Polygon';
23
+
24
+ /**
25
+ * Reference to a polygon on a specific page.
26
+ * @export
27
+ * @interface PolygonReference
28
+ */
29
+ export interface PolygonReference {
30
+ /**
31
+ * The page number of the source document where the polygon is located.
32
+ * @type {number}
33
+ * @memberof PolygonReference
34
+ */
35
+ page: number;
36
+ /**
37
+ * The bounding box of the polygon.
38
+ * @type {Polygon}
39
+ * @memberof PolygonReference
40
+ */
41
+ polygon: Polygon;
42
+ }
43
+
44
+ /**
45
+ * Check if a given object implements the PolygonReference interface.
46
+ */
47
+ export function instanceOfPolygonReference(value: object): value is PolygonReference {
48
+ if (!('page' in value) || value['page'] === undefined) return false;
49
+ if (!('polygon' in value) || value['polygon'] === undefined) return false;
50
+ return true;
51
+ }
52
+
53
+ export function PolygonReferenceFromJSON(json: any): PolygonReference {
54
+ return PolygonReferenceFromJSONTyped(json, false);
55
+ }
56
+
57
+ export function PolygonReferenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): PolygonReference {
58
+ if (json == null) {
59
+ return json;
60
+ }
61
+ return {
62
+
63
+ 'page': json['page'],
64
+ 'polygon': PolygonFromJSON(json['polygon']),
65
+ };
66
+ }
67
+
68
+ export function PolygonReferenceToJSON(json: any): PolygonReference {
69
+ return PolygonReferenceToJSONTyped(json, false);
70
+ }
71
+
72
+ export function PolygonReferenceToJSONTyped(value?: PolygonReference | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'page': value['page'],
80
+ 'polygon': PolygonToJSON(value['polygon']),
81
+ };
82
+ }
83
+
84
+ export const PolygonReferencePropertyValidationAttributesMap: {
85
+ [property: string]: {
86
+ maxLength?: number,
87
+ minLength?: number,
88
+ pattern?: string,
89
+ maximum?: number,
90
+ exclusiveMaximum?: boolean,
91
+ minimum?: number,
92
+ exclusiveMinimum?: boolean,
93
+ multipleOf?: number,
94
+ maxItems?: number,
95
+ minItems?: number,
96
+ uniqueItems?: boolean
97
+ }
98
+ } = {
99
+ }
100
+
@@ -0,0 +1,104 @@
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 { ChunkType } from './ChunkType';
17
+ import {
18
+ ChunkTypeFromJSON,
19
+ ChunkTypeFromJSONTyped,
20
+ ChunkTypeToJSON,
21
+ ChunkTypeToJSONTyped,
22
+ } from './ChunkType';
23
+
24
+ /**
25
+ * Request to update chunk content (creates new content row).
26
+ * @export
27
+ * @interface UpdateChunkContentRequest
28
+ */
29
+ export interface UpdateChunkContentRequest {
30
+ /**
31
+ * New chunk text content
32
+ * @type {string}
33
+ * @memberof UpdateChunkContentRequest
34
+ */
35
+ content: string;
36
+ /**
37
+ * New chunk type (null = keep existing type)
38
+ * @type {ChunkType}
39
+ * @memberof UpdateChunkContentRequest
40
+ */
41
+ chunkType?: ChunkType;
42
+ }
43
+
44
+
45
+
46
+ /**
47
+ * Check if a given object implements the UpdateChunkContentRequest interface.
48
+ */
49
+ export function instanceOfUpdateChunkContentRequest(value: object): value is UpdateChunkContentRequest {
50
+ if (!('content' in value) || value['content'] === undefined) return false;
51
+ return true;
52
+ }
53
+
54
+ export function UpdateChunkContentRequestFromJSON(json: any): UpdateChunkContentRequest {
55
+ return UpdateChunkContentRequestFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function UpdateChunkContentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateChunkContentRequest {
59
+ if (json == null) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'content': json['content'],
65
+ 'chunkType': json['chunk_type'] == null ? undefined : ChunkTypeFromJSON(json['chunk_type']),
66
+ };
67
+ }
68
+
69
+ export function UpdateChunkContentRequestToJSON(json: any): UpdateChunkContentRequest {
70
+ return UpdateChunkContentRequestToJSONTyped(json, false);
71
+ }
72
+
73
+ export function UpdateChunkContentRequestToJSONTyped(value?: UpdateChunkContentRequest | null, ignoreDiscriminator: boolean = false): any {
74
+ if (value == null) {
75
+ return value;
76
+ }
77
+
78
+ return {
79
+
80
+ 'content': value['content'],
81
+ 'chunk_type': ChunkTypeToJSON(value['chunkType']),
82
+ };
83
+ }
84
+
85
+ export const UpdateChunkContentRequestPropertyValidationAttributesMap: {
86
+ [property: string]: {
87
+ maxLength?: number,
88
+ minLength?: number,
89
+ pattern?: string,
90
+ maximum?: number,
91
+ exclusiveMaximum?: boolean,
92
+ minimum?: number,
93
+ exclusiveMinimum?: boolean,
94
+ multipleOf?: number,
95
+ maxItems?: number,
96
+ minItems?: number,
97
+ uniqueItems?: boolean
98
+ }
99
+ } = {
100
+ content: {
101
+ minLength: 1,
102
+ },
103
+ }
104
+