@knowledge-stack/ksapi 1.5.0 → 1.7.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 (51) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/dist/apis/DocumentVersionsApi.d.ts +146 -0
  4. package/dist/apis/DocumentVersionsApi.js +168 -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/DocumentVersionsApi.d.ts +146 -0
  12. package/dist/esm/apis/DocumentVersionsApi.js +164 -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/CreateSectionRequest.d.ts +65 -0
  20. package/dist/esm/models/CreateSectionRequest.js +57 -0
  21. package/dist/esm/models/DocumentVersionResponse.d.ts +1 -1
  22. package/dist/esm/models/PaginatedResponseDocumentVersionResponse.d.ts +66 -0
  23. package/dist/esm/models/PaginatedResponseDocumentVersionResponse.js +70 -0
  24. package/dist/esm/models/SectionResponse.d.ts +101 -0
  25. package/dist/esm/models/SectionResponse.js +74 -0
  26. package/dist/esm/models/UpdateSectionRequest.d.ts +65 -0
  27. package/dist/esm/models/UpdateSectionRequest.js +53 -0
  28. package/dist/esm/models/index.d.ts +4 -0
  29. package/dist/esm/models/index.js +4 -0
  30. package/dist/models/CreateSectionRequest.d.ts +65 -0
  31. package/dist/models/CreateSectionRequest.js +65 -0
  32. package/dist/models/DocumentVersionResponse.d.ts +1 -1
  33. package/dist/models/PaginatedResponseDocumentVersionResponse.d.ts +66 -0
  34. package/dist/models/PaginatedResponseDocumentVersionResponse.js +78 -0
  35. package/dist/models/SectionResponse.d.ts +101 -0
  36. package/dist/models/SectionResponse.js +82 -0
  37. package/dist/models/UpdateSectionRequest.d.ts +65 -0
  38. package/dist/models/UpdateSectionRequest.js +61 -0
  39. package/dist/models/index.d.ts +4 -0
  40. package/dist/models/index.js +4 -0
  41. package/package.json +1 -1
  42. package/src/apis/DocumentVersionsApi.ts +303 -0
  43. package/src/apis/PathPartsApi.ts +64 -0
  44. package/src/apis/SectionsApi.ts +305 -0
  45. package/src/apis/index.ts +2 -0
  46. package/src/models/CreateSectionRequest.ts +112 -0
  47. package/src/models/DocumentVersionResponse.ts +1 -1
  48. package/src/models/PaginatedResponseDocumentVersionResponse.ts +130 -0
  49. package/src/models/SectionResponse.ts +161 -0
  50. package/src/models/UpdateSectionRequest.ts +110 -0
  51. package/src/models/index.ts +4 -0
@@ -0,0 +1,161 @@
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
+ * Section response model.
18
+ * @export
19
+ * @interface SectionResponse
20
+ */
21
+ export interface SectionResponse {
22
+ /**
23
+ * Section ID
24
+ * @type {string}
25
+ * @memberof SectionResponse
26
+ */
27
+ id: string;
28
+ /**
29
+ * PathPart ID
30
+ * @type {string}
31
+ * @memberof SectionResponse
32
+ */
33
+ pathPartId: string;
34
+ /**
35
+ * Section name
36
+ * @type {string}
37
+ * @memberof SectionResponse
38
+ */
39
+ name: string;
40
+ /**
41
+ * Page number in source document
42
+ * @type {number}
43
+ * @memberof SectionResponse
44
+ */
45
+ pageNumber?: number;
46
+ /**
47
+ * Parent PathPart ID
48
+ * @type {string}
49
+ * @memberof SectionResponse
50
+ */
51
+ parentId: string;
52
+ /**
53
+ * Previous sibling PathPart ID
54
+ * @type {string}
55
+ * @memberof SectionResponse
56
+ */
57
+ prevSiblingPathId?: string;
58
+ /**
59
+ * Next sibling PathPart ID
60
+ * @type {string}
61
+ * @memberof SectionResponse
62
+ */
63
+ nextSiblingId?: string;
64
+ /**
65
+ * Tenant ID
66
+ * @type {string}
67
+ * @memberof SectionResponse
68
+ */
69
+ tenantId: string;
70
+ /**
71
+ * Creation timestamp
72
+ * @type {Date}
73
+ * @memberof SectionResponse
74
+ */
75
+ createdAt: Date;
76
+ /**
77
+ * Last update timestamp
78
+ * @type {Date}
79
+ * @memberof SectionResponse
80
+ */
81
+ updatedAt: Date;
82
+ }
83
+
84
+ /**
85
+ * Check if a given object implements the SectionResponse interface.
86
+ */
87
+ export function instanceOfSectionResponse(value: object): value is SectionResponse {
88
+ if (!('id' in value) || value['id'] === undefined) return false;
89
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
90
+ if (!('name' in value) || value['name'] === undefined) return false;
91
+ if (!('parentId' in value) || value['parentId'] === undefined) return false;
92
+ if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
93
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
94
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
95
+ return true;
96
+ }
97
+
98
+ export function SectionResponseFromJSON(json: any): SectionResponse {
99
+ return SectionResponseFromJSONTyped(json, false);
100
+ }
101
+
102
+ export function SectionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SectionResponse {
103
+ if (json == null) {
104
+ return json;
105
+ }
106
+ return {
107
+
108
+ 'id': json['id'],
109
+ 'pathPartId': json['path_part_id'],
110
+ 'name': json['name'],
111
+ 'pageNumber': json['page_number'] == null ? undefined : json['page_number'],
112
+ 'parentId': json['parent_id'],
113
+ 'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
114
+ 'nextSiblingId': json['next_sibling_id'] == null ? undefined : json['next_sibling_id'],
115
+ 'tenantId': json['tenant_id'],
116
+ 'createdAt': (new Date(json['created_at'])),
117
+ 'updatedAt': (new Date(json['updated_at'])),
118
+ };
119
+ }
120
+
121
+ export function SectionResponseToJSON(json: any): SectionResponse {
122
+ return SectionResponseToJSONTyped(json, false);
123
+ }
124
+
125
+ export function SectionResponseToJSONTyped(value?: SectionResponse | null, ignoreDiscriminator: boolean = false): any {
126
+ if (value == null) {
127
+ return value;
128
+ }
129
+
130
+ return {
131
+
132
+ 'id': value['id'],
133
+ 'path_part_id': value['pathPartId'],
134
+ 'name': value['name'],
135
+ 'page_number': value['pageNumber'],
136
+ 'parent_id': value['parentId'],
137
+ 'prev_sibling_path_id': value['prevSiblingPathId'],
138
+ 'next_sibling_id': value['nextSiblingId'],
139
+ 'tenant_id': value['tenantId'],
140
+ 'created_at': value['createdAt'].toISOString(),
141
+ 'updated_at': value['updatedAt'].toISOString(),
142
+ };
143
+ }
144
+
145
+ export const SectionResponsePropertyValidationAttributesMap: {
146
+ [property: string]: {
147
+ maxLength?: number,
148
+ minLength?: number,
149
+ pattern?: string,
150
+ maximum?: number,
151
+ exclusiveMaximum?: boolean,
152
+ minimum?: number,
153
+ exclusiveMinimum?: boolean,
154
+ multipleOf?: number,
155
+ maxItems?: number,
156
+ minItems?: number,
157
+ uniqueItems?: boolean
158
+ }
159
+ } = {
160
+ }
161
+
@@ -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
+ * Request to update a section.
18
+ * @export
19
+ * @interface UpdateSectionRequest
20
+ */
21
+ export interface UpdateSectionRequest {
22
+ /**
23
+ * New section name (can contain any characters)
24
+ * @type {string}
25
+ * @memberof UpdateSectionRequest
26
+ */
27
+ name?: string;
28
+ /**
29
+ * New page number (must be > 0)
30
+ * @type {number}
31
+ * @memberof UpdateSectionRequest
32
+ */
33
+ pageNumber?: number;
34
+ /**
35
+ * Move after this sibling PathPart ID
36
+ * @type {string}
37
+ * @memberof UpdateSectionRequest
38
+ */
39
+ prevSiblingPathId?: string;
40
+ /**
41
+ * Set to true to move to head of sibling list. This is needed since prev_sibling_path_id = None means no update
42
+ * @type {boolean}
43
+ * @memberof UpdateSectionRequest
44
+ */
45
+ moveToHead?: boolean;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the UpdateSectionRequest interface.
50
+ */
51
+ export function instanceOfUpdateSectionRequest(value: object): value is UpdateSectionRequest {
52
+ return true;
53
+ }
54
+
55
+ export function UpdateSectionRequestFromJSON(json: any): UpdateSectionRequest {
56
+ return UpdateSectionRequestFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function UpdateSectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateSectionRequest {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'name': json['name'] == null ? undefined : json['name'],
66
+ 'pageNumber': json['page_number'] == null ? undefined : json['page_number'],
67
+ 'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
68
+ 'moveToHead': json['move_to_head'] == null ? undefined : json['move_to_head'],
69
+ };
70
+ }
71
+
72
+ export function UpdateSectionRequestToJSON(json: any): UpdateSectionRequest {
73
+ return UpdateSectionRequestToJSONTyped(json, false);
74
+ }
75
+
76
+ export function UpdateSectionRequestToJSONTyped(value?: UpdateSectionRequest | null, ignoreDiscriminator: boolean = false): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+
81
+ return {
82
+
83
+ 'name': value['name'],
84
+ 'page_number': value['pageNumber'],
85
+ 'prev_sibling_path_id': value['prevSiblingPathId'],
86
+ 'move_to_head': value['moveToHead'],
87
+ };
88
+ }
89
+
90
+ export const UpdateSectionRequestPropertyValidationAttributesMap: {
91
+ [property: string]: {
92
+ maxLength?: number,
93
+ minLength?: number,
94
+ pattern?: string,
95
+ maximum?: number,
96
+ exclusiveMaximum?: boolean,
97
+ minimum?: number,
98
+ exclusiveMinimum?: boolean,
99
+ multipleOf?: number,
100
+ maxItems?: number,
101
+ minItems?: number,
102
+ uniqueItems?: boolean
103
+ }
104
+ } = {
105
+ name: {
106
+ maxLength: 255,
107
+ minLength: 1,
108
+ },
109
+ }
110
+
@@ -3,6 +3,7 @@
3
3
  export * from './CreateDocumentRequest';
4
4
  export * from './CreateFolderRequest';
5
5
  export * from './CreatePasswordUserRequest';
6
+ export * from './CreateSectionRequest';
6
7
  export * from './CreateTenantRequest';
7
8
  export * from './DocumentOrigin';
8
9
  export * from './DocumentResponse';
@@ -19,6 +20,7 @@ export * from './InviteStatus';
19
20
  export * from './InviteUserRequest';
20
21
  export * from './OAuth2Config';
21
22
  export * from './PaginatedResponseDocumentResponse';
23
+ export * from './PaginatedResponseDocumentVersionResponse';
22
24
  export * from './PaginatedResponseFolderResponse';
23
25
  export * from './PaginatedResponseInviteResponse';
24
26
  export * from './PaginatedResponsePathPartResponse';
@@ -30,12 +32,14 @@ export * from './PasswordResetWithTokenRequest';
30
32
  export * from './PathOrder';
31
33
  export * from './PathPartResponse';
32
34
  export * from './RootResponse';
35
+ export * from './SectionResponse';
33
36
  export * from './SignInRequest';
34
37
  export * from './TenantResponse';
35
38
  export * from './TenantUserInTenantResponse';
36
39
  export * from './TenantUserRole';
37
40
  export * from './UpdateDocumentRequest';
38
41
  export * from './UpdateFolderRequest';
42
+ export * from './UpdateSectionRequest';
39
43
  export * from './UpdateTenantRequest';
40
44
  export * from './UpdateUserRequest';
41
45
  export * from './UserResponse';