@knowledge-stack/ksapi 1.6.0 → 1.8.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 (93) 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/PathPartsApi.d.ts +30 -1
  6. package/dist/apis/PathPartsApi.js +32 -0
  7. package/dist/apis/SectionsApi.d.ts +144 -0
  8. package/dist/apis/SectionsApi.js +166 -0
  9. package/dist/apis/index.d.ts +2 -0
  10. package/dist/apis/index.js +2 -0
  11. package/dist/esm/apis/ChunksApi.d.ts +175 -0
  12. package/dist/esm/apis/ChunksApi.js +199 -0
  13. package/dist/esm/apis/PathPartsApi.d.ts +30 -1
  14. package/dist/esm/apis/PathPartsApi.js +33 -1
  15. package/dist/esm/apis/SectionsApi.d.ts +144 -0
  16. package/dist/esm/apis/SectionsApi.js +162 -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/ChunkMetadataInput.d.ts +48 -0
  20. package/dist/esm/models/ChunkMetadataInput.js +43 -0
  21. package/dist/esm/models/ChunkMetadataOutput.d.ts +48 -0
  22. package/dist/esm/models/ChunkMetadataOutput.js +43 -0
  23. package/dist/esm/models/ChunkResponse.d.ts +115 -0
  24. package/dist/esm/models/ChunkResponse.js +86 -0
  25. package/dist/esm/models/ChunkType.d.ts +27 -0
  26. package/dist/esm/models/ChunkType.js +45 -0
  27. package/dist/esm/models/CreateChunkRequest.d.ts +73 -0
  28. package/dist/esm/models/CreateChunkRequest.js +64 -0
  29. package/dist/esm/models/CreateSectionRequest.d.ts +65 -0
  30. package/dist/esm/models/CreateSectionRequest.js +57 -0
  31. package/dist/esm/models/PasswordResetWithTokenRequest.d.ts +2 -8
  32. package/dist/esm/models/PasswordResetWithTokenRequest.js +3 -7
  33. package/dist/esm/models/Polygon.d.ts +65 -0
  34. package/dist/esm/models/Polygon.js +56 -0
  35. package/dist/esm/models/PolygonReference.d.ts +54 -0
  36. package/dist/esm/models/PolygonReference.js +49 -0
  37. package/dist/esm/models/SectionResponse.d.ts +101 -0
  38. package/dist/esm/models/SectionResponse.js +74 -0
  39. package/dist/esm/models/UpdateChunkContentRequest.d.ts +54 -0
  40. package/dist/esm/models/UpdateChunkContentRequest.js +51 -0
  41. package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +48 -0
  42. package/dist/esm/models/UpdateChunkMetadataRequest.js +45 -0
  43. package/dist/esm/models/UpdateSectionRequest.d.ts +65 -0
  44. package/dist/esm/models/UpdateSectionRequest.js +53 -0
  45. package/dist/esm/models/index.d.ts +12 -0
  46. package/dist/esm/models/index.js +12 -0
  47. package/dist/models/ChunkMetadataInput.d.ts +48 -0
  48. package/dist/models/ChunkMetadataInput.js +51 -0
  49. package/dist/models/ChunkMetadataOutput.d.ts +48 -0
  50. package/dist/models/ChunkMetadataOutput.js +51 -0
  51. package/dist/models/ChunkResponse.d.ts +115 -0
  52. package/dist/models/ChunkResponse.js +94 -0
  53. package/dist/models/ChunkType.d.ts +27 -0
  54. package/dist/models/ChunkType.js +53 -0
  55. package/dist/models/CreateChunkRequest.d.ts +73 -0
  56. package/dist/models/CreateChunkRequest.js +72 -0
  57. package/dist/models/CreateSectionRequest.d.ts +65 -0
  58. package/dist/models/CreateSectionRequest.js +65 -0
  59. package/dist/models/PasswordResetWithTokenRequest.d.ts +2 -8
  60. package/dist/models/PasswordResetWithTokenRequest.js +3 -7
  61. package/dist/models/Polygon.d.ts +65 -0
  62. package/dist/models/Polygon.js +64 -0
  63. package/dist/models/PolygonReference.d.ts +54 -0
  64. package/dist/models/PolygonReference.js +57 -0
  65. package/dist/models/SectionResponse.d.ts +101 -0
  66. package/dist/models/SectionResponse.js +82 -0
  67. package/dist/models/UpdateChunkContentRequest.d.ts +54 -0
  68. package/dist/models/UpdateChunkContentRequest.js +59 -0
  69. package/dist/models/UpdateChunkMetadataRequest.d.ts +48 -0
  70. package/dist/models/UpdateChunkMetadataRequest.js +53 -0
  71. package/dist/models/UpdateSectionRequest.d.ts +65 -0
  72. package/dist/models/UpdateSectionRequest.js +61 -0
  73. package/dist/models/index.d.ts +12 -0
  74. package/dist/models/index.js +12 -0
  75. package/package.json +1 -1
  76. package/src/apis/ChunksApi.ts +381 -0
  77. package/src/apis/PathPartsApi.ts +64 -0
  78. package/src/apis/SectionsApi.ts +305 -0
  79. package/src/apis/index.ts +2 -0
  80. package/src/models/ChunkMetadataInput.ts +90 -0
  81. package/src/models/ChunkMetadataOutput.ts +90 -0
  82. package/src/models/ChunkResponse.ts +197 -0
  83. package/src/models/ChunkType.ts +55 -0
  84. package/src/models/CreateChunkRequest.ts +138 -0
  85. package/src/models/CreateSectionRequest.ts +112 -0
  86. package/src/models/PasswordResetWithTokenRequest.ts +5 -14
  87. package/src/models/Polygon.ts +110 -0
  88. package/src/models/PolygonReference.ts +100 -0
  89. package/src/models/SectionResponse.ts +161 -0
  90. package/src/models/UpdateChunkContentRequest.ts +104 -0
  91. package/src/models/UpdateChunkMetadataRequest.ts +91 -0
  92. package/src/models/UpdateSectionRequest.ts +110 -0
  93. package/src/models/index.ts +12 -0
@@ -0,0 +1,55 @@
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
+ /**
17
+ * Type of chunk content.
18
+ * @export
19
+ */
20
+ export const ChunkType = {
21
+ Text: 'TEXT',
22
+ Table: 'TABLE',
23
+ Image: 'IMAGE',
24
+ Unknown: 'UNKNOWN'
25
+ } as const;
26
+ export type ChunkType = typeof ChunkType[keyof typeof ChunkType];
27
+
28
+
29
+ export function instanceOfChunkType(value: any): boolean {
30
+ for (const key in ChunkType) {
31
+ if (Object.prototype.hasOwnProperty.call(ChunkType, key)) {
32
+ if (ChunkType[key as keyof typeof ChunkType] === value) {
33
+ return true;
34
+ }
35
+ }
36
+ }
37
+ return false;
38
+ }
39
+
40
+ export function ChunkTypeFromJSON(json: any): ChunkType {
41
+ return ChunkTypeFromJSONTyped(json, false);
42
+ }
43
+
44
+ export function ChunkTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkType {
45
+ return json as ChunkType;
46
+ }
47
+
48
+ export function ChunkTypeToJSON(value?: ChunkType | null): any {
49
+ return value as any;
50
+ }
51
+
52
+ export function ChunkTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): ChunkType {
53
+ return value as ChunkType;
54
+ }
55
+
@@ -0,0 +1,138 @@
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 { ChunkMetadataInput } from './ChunkMetadataInput';
17
+ import {
18
+ ChunkMetadataInputFromJSON,
19
+ ChunkMetadataInputFromJSONTyped,
20
+ ChunkMetadataInputToJSON,
21
+ ChunkMetadataInputToJSONTyped,
22
+ } from './ChunkMetadataInput';
23
+ import type { ChunkType } from './ChunkType';
24
+ import {
25
+ ChunkTypeFromJSON,
26
+ ChunkTypeFromJSONTyped,
27
+ ChunkTypeToJSON,
28
+ ChunkTypeToJSONTyped,
29
+ } from './ChunkType';
30
+
31
+ /**
32
+ * Request to create a new chunk.
33
+ * @export
34
+ * @interface CreateChunkRequest
35
+ */
36
+ export interface CreateChunkRequest {
37
+ /**
38
+ * Parent PathPart ID (must be DOCUMENT_VERSION or SECTION)
39
+ * @type {string}
40
+ * @memberof CreateChunkRequest
41
+ */
42
+ parentPathId: string;
43
+ /**
44
+ * Chunk text content
45
+ * @type {string}
46
+ * @memberof CreateChunkRequest
47
+ */
48
+ content: string;
49
+ /**
50
+ * Type of chunk content (TEXT, TABLE, IMAGE, UNKNOWN)
51
+ * @type {ChunkType}
52
+ * @memberof CreateChunkRequest
53
+ */
54
+ chunkType: ChunkType;
55
+ /**
56
+ * Chunk metadata as JSON (title, description, etc.)
57
+ * @type {ChunkMetadataInput}
58
+ * @memberof CreateChunkRequest
59
+ */
60
+ chunkMetadata: ChunkMetadataInput;
61
+ /**
62
+ * PathPart ID to insert after (null = append to tail)
63
+ * @type {string}
64
+ * @memberof CreateChunkRequest
65
+ */
66
+ prevSiblingPathId?: string;
67
+ }
68
+
69
+
70
+
71
+ /**
72
+ * Check if a given object implements the CreateChunkRequest interface.
73
+ */
74
+ export function instanceOfCreateChunkRequest(value: object): value is CreateChunkRequest {
75
+ if (!('parentPathId' in value) || value['parentPathId'] === undefined) return false;
76
+ if (!('content' in value) || value['content'] === undefined) return false;
77
+ if (!('chunkType' in value) || value['chunkType'] === undefined) return false;
78
+ if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined) return false;
79
+ return true;
80
+ }
81
+
82
+ export function CreateChunkRequestFromJSON(json: any): CreateChunkRequest {
83
+ return CreateChunkRequestFromJSONTyped(json, false);
84
+ }
85
+
86
+ export function CreateChunkRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateChunkRequest {
87
+ if (json == null) {
88
+ return json;
89
+ }
90
+ return {
91
+
92
+ 'parentPathId': json['parent_path_id'],
93
+ 'content': json['content'],
94
+ 'chunkType': ChunkTypeFromJSON(json['chunk_type']),
95
+ 'chunkMetadata': ChunkMetadataInputFromJSON(json['chunk_metadata']),
96
+ 'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
97
+ };
98
+ }
99
+
100
+ export function CreateChunkRequestToJSON(json: any): CreateChunkRequest {
101
+ return CreateChunkRequestToJSONTyped(json, false);
102
+ }
103
+
104
+ export function CreateChunkRequestToJSONTyped(value?: CreateChunkRequest | null, ignoreDiscriminator: boolean = false): any {
105
+ if (value == null) {
106
+ return value;
107
+ }
108
+
109
+ return {
110
+
111
+ 'parent_path_id': value['parentPathId'],
112
+ 'content': value['content'],
113
+ 'chunk_type': ChunkTypeToJSON(value['chunkType']),
114
+ 'chunk_metadata': ChunkMetadataInputToJSON(value['chunkMetadata']),
115
+ 'prev_sibling_path_id': value['prevSiblingPathId'],
116
+ };
117
+ }
118
+
119
+ export const CreateChunkRequestPropertyValidationAttributesMap: {
120
+ [property: string]: {
121
+ maxLength?: number,
122
+ minLength?: number,
123
+ pattern?: string,
124
+ maximum?: number,
125
+ exclusiveMaximum?: boolean,
126
+ minimum?: number,
127
+ exclusiveMinimum?: boolean,
128
+ multipleOf?: number,
129
+ maxItems?: number,
130
+ minItems?: number,
131
+ uniqueItems?: boolean
132
+ }
133
+ } = {
134
+ content: {
135
+ minLength: 1,
136
+ },
137
+ }
138
+
@@ -0,0 +1,112 @@
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
+ * Request to create a new section.
18
+ * @export
19
+ * @interface CreateSectionRequest
20
+ */
21
+ export interface CreateSectionRequest {
22
+ /**
23
+ * Section name (can contain any characters)
24
+ * @type {string}
25
+ * @memberof CreateSectionRequest
26
+ */
27
+ name: string;
28
+ /**
29
+ * Parent PathPart ID (must be DOCUMENT_VERSION or SECTION)
30
+ * @type {string}
31
+ * @memberof CreateSectionRequest
32
+ */
33
+ parentPathId: string;
34
+ /**
35
+ * Page number in source document (must be > 0)
36
+ * @type {number}
37
+ * @memberof CreateSectionRequest
38
+ */
39
+ pageNumber?: number;
40
+ /**
41
+ * PathPart ID to insert after (null = append to tail)
42
+ * @type {string}
43
+ * @memberof CreateSectionRequest
44
+ */
45
+ prevSiblingPathId?: string;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the CreateSectionRequest interface.
50
+ */
51
+ export function instanceOfCreateSectionRequest(value: object): value is CreateSectionRequest {
52
+ if (!('name' in value) || value['name'] === undefined) return false;
53
+ if (!('parentPathId' in value) || value['parentPathId'] === undefined) return false;
54
+ return true;
55
+ }
56
+
57
+ export function CreateSectionRequestFromJSON(json: any): CreateSectionRequest {
58
+ return CreateSectionRequestFromJSONTyped(json, false);
59
+ }
60
+
61
+ export function CreateSectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSectionRequest {
62
+ if (json == null) {
63
+ return json;
64
+ }
65
+ return {
66
+
67
+ 'name': json['name'],
68
+ 'parentPathId': json['parent_path_id'],
69
+ 'pageNumber': json['page_number'] == null ? undefined : json['page_number'],
70
+ 'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
71
+ };
72
+ }
73
+
74
+ export function CreateSectionRequestToJSON(json: any): CreateSectionRequest {
75
+ return CreateSectionRequestToJSONTyped(json, false);
76
+ }
77
+
78
+ export function CreateSectionRequestToJSONTyped(value?: CreateSectionRequest | null, ignoreDiscriminator: boolean = false): any {
79
+ if (value == null) {
80
+ return value;
81
+ }
82
+
83
+ return {
84
+
85
+ 'name': value['name'],
86
+ 'parent_path_id': value['parentPathId'],
87
+ 'page_number': value['pageNumber'],
88
+ 'prev_sibling_path_id': value['prevSiblingPathId'],
89
+ };
90
+ }
91
+
92
+ export const CreateSectionRequestPropertyValidationAttributesMap: {
93
+ [property: string]: {
94
+ maxLength?: number,
95
+ minLength?: number,
96
+ pattern?: string,
97
+ maximum?: number,
98
+ exclusiveMaximum?: boolean,
99
+ minimum?: number,
100
+ exclusiveMinimum?: boolean,
101
+ multipleOf?: number,
102
+ maxItems?: number,
103
+ minItems?: number,
104
+ uniqueItems?: boolean
105
+ }
106
+ } = {
107
+ name: {
108
+ maxLength: 255,
109
+ minLength: 1,
110
+ },
111
+ }
112
+
@@ -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
+