@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,144 @@
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 * as runtime from '../runtime';
13
+ import type { CreateSectionRequest, SectionResponse, UpdateSectionRequest } from '../models/index';
14
+ export interface CreateSectionOperationRequest {
15
+ createSectionRequest: CreateSectionRequest;
16
+ ksUat?: string;
17
+ }
18
+ export interface DeleteSectionRequest {
19
+ sectionId: string;
20
+ ksUat?: string;
21
+ }
22
+ export interface GetSectionRequest {
23
+ sectionId: string;
24
+ ksUat?: string;
25
+ }
26
+ export interface UpdateSectionOperationRequest {
27
+ sectionId: string;
28
+ updateSectionRequest: UpdateSectionRequest;
29
+ ksUat?: string;
30
+ }
31
+ /**
32
+ * SectionsApi - interface
33
+ *
34
+ * @export
35
+ * @interface SectionsApiInterface
36
+ */
37
+ export interface SectionsApiInterface {
38
+ /**
39
+ * Create a new section. The section is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). If prev_sibling_path_id is provided, the section is inserted after that sibling; otherwise it is appended to the end of the sibling list.
40
+ * @summary Create Section Handler
41
+ * @param {CreateSectionRequest} createSectionRequest
42
+ * @param {string} [ksUat]
43
+ * @param {*} [options] Override http request option.
44
+ * @throws {RequiredError}
45
+ * @memberof SectionsApiInterface
46
+ */
47
+ createSectionRaw(requestParameters: CreateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>>;
48
+ /**
49
+ * Create a new section. The section is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). If prev_sibling_path_id is provided, the section is inserted after that sibling; otherwise it is appended to the end of the sibling list.
50
+ * Create Section Handler
51
+ */
52
+ createSection(requestParameters: CreateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
53
+ /**
54
+ * Delete a section and all its children. WARNING: This cascades to all child sections due to parent_id ON DELETE CASCADE.
55
+ * @summary Delete Section Handler
56
+ * @param {string} sectionId
57
+ * @param {string} [ksUat]
58
+ * @param {*} [options] Override http request option.
59
+ * @throws {RequiredError}
60
+ * @memberof SectionsApiInterface
61
+ */
62
+ deleteSectionRaw(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
63
+ /**
64
+ * Delete a section and all its children. WARNING: This cascades to all child sections due to parent_id ON DELETE CASCADE.
65
+ * Delete Section Handler
66
+ */
67
+ deleteSection(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
68
+ /**
69
+ * Get a section by its ID.
70
+ * @summary Get Section Handler
71
+ * @param {string} sectionId
72
+ * @param {string} [ksUat]
73
+ * @param {*} [options] Override http request option.
74
+ * @throws {RequiredError}
75
+ * @memberof SectionsApiInterface
76
+ */
77
+ getSectionRaw(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>>;
78
+ /**
79
+ * Get a section by its ID.
80
+ * Get Section Handler
81
+ */
82
+ getSection(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
83
+ /**
84
+ * Update a section. Can update name, page_number, and/or reorder within siblings. To move: provide prev_sibling_path_id OR move_to_head (not both). Moving is only allowed within the same document version. Note: Section names can contain any characters. The corresponding path_part.name will be automatically normalized by a database trigger.
85
+ * @summary Update Section Handler
86
+ * @param {string} sectionId
87
+ * @param {UpdateSectionRequest} updateSectionRequest
88
+ * @param {string} [ksUat]
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ * @memberof SectionsApiInterface
92
+ */
93
+ updateSectionRaw(requestParameters: UpdateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>>;
94
+ /**
95
+ * Update a section. Can update name, page_number, and/or reorder within siblings. To move: provide prev_sibling_path_id OR move_to_head (not both). Moving is only allowed within the same document version. Note: Section names can contain any characters. The corresponding path_part.name will be automatically normalized by a database trigger.
96
+ * Update Section Handler
97
+ */
98
+ updateSection(requestParameters: UpdateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
99
+ }
100
+ /**
101
+ *
102
+ */
103
+ export declare class SectionsApi extends runtime.BaseAPI implements SectionsApiInterface {
104
+ /**
105
+ * Create a new section. The section is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). If prev_sibling_path_id is provided, the section is inserted after that sibling; otherwise it is appended to the end of the sibling list.
106
+ * Create Section Handler
107
+ */
108
+ createSectionRaw(requestParameters: CreateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>>;
109
+ /**
110
+ * Create a new section. The section is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). If prev_sibling_path_id is provided, the section is inserted after that sibling; otherwise it is appended to the end of the sibling list.
111
+ * Create Section Handler
112
+ */
113
+ createSection(requestParameters: CreateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
114
+ /**
115
+ * Delete a section and all its children. WARNING: This cascades to all child sections due to parent_id ON DELETE CASCADE.
116
+ * Delete Section Handler
117
+ */
118
+ deleteSectionRaw(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
119
+ /**
120
+ * Delete a section and all its children. WARNING: This cascades to all child sections due to parent_id ON DELETE CASCADE.
121
+ * Delete Section Handler
122
+ */
123
+ deleteSection(requestParameters: DeleteSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
124
+ /**
125
+ * Get a section by its ID.
126
+ * Get Section Handler
127
+ */
128
+ getSectionRaw(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>>;
129
+ /**
130
+ * Get a section by its ID.
131
+ * Get Section Handler
132
+ */
133
+ getSection(requestParameters: GetSectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
134
+ /**
135
+ * Update a section. Can update name, page_number, and/or reorder within siblings. To move: provide prev_sibling_path_id OR move_to_head (not both). Moving is only allowed within the same document version. Note: Section names can contain any characters. The corresponding path_part.name will be automatically normalized by a database trigger.
136
+ * Update Section Handler
137
+ */
138
+ updateSectionRaw(requestParameters: UpdateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SectionResponse>>;
139
+ /**
140
+ * Update a section. Can update name, page_number, and/or reorder within siblings. To move: provide prev_sibling_path_id OR move_to_head (not both). Moving is only allowed within the same document version. Note: Section names can contain any characters. The corresponding path_part.name will be automatically normalized by a database trigger.
141
+ * Update Section Handler
142
+ */
143
+ updateSection(requestParameters: UpdateSectionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SectionResponse>;
144
+ }
@@ -0,0 +1,162 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime';
24
+ import { CreateSectionRequestToJSON, SectionResponseFromJSON, UpdateSectionRequestToJSON, } from '../models/index';
25
+ /**
26
+ *
27
+ */
28
+ export class SectionsApi extends runtime.BaseAPI {
29
+ /**
30
+ * Create a new section. The section is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). If prev_sibling_path_id is provided, the section is inserted after that sibling; otherwise it is appended to the end of the sibling list.
31
+ * Create Section Handler
32
+ */
33
+ createSectionRaw(requestParameters, initOverrides) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ if (requestParameters['createSectionRequest'] == null) {
36
+ throw new runtime.RequiredError('createSectionRequest', 'Required parameter "createSectionRequest" was null or undefined when calling createSection().');
37
+ }
38
+ const queryParameters = {};
39
+ const headerParameters = {};
40
+ headerParameters['Content-Type'] = 'application/json';
41
+ let urlPath = `/v1/sections`;
42
+ const response = yield this.request({
43
+ path: urlPath,
44
+ method: 'POST',
45
+ headers: headerParameters,
46
+ query: queryParameters,
47
+ body: CreateSectionRequestToJSON(requestParameters['createSectionRequest']),
48
+ }, initOverrides);
49
+ return new runtime.JSONApiResponse(response, (jsonValue) => SectionResponseFromJSON(jsonValue));
50
+ });
51
+ }
52
+ /**
53
+ * Create a new section. The section is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). If prev_sibling_path_id is provided, the section is inserted after that sibling; otherwise it is appended to the end of the sibling list.
54
+ * Create Section Handler
55
+ */
56
+ createSection(requestParameters, initOverrides) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ const response = yield this.createSectionRaw(requestParameters, initOverrides);
59
+ return yield response.value();
60
+ });
61
+ }
62
+ /**
63
+ * Delete a section and all its children. WARNING: This cascades to all child sections due to parent_id ON DELETE CASCADE.
64
+ * Delete Section Handler
65
+ */
66
+ deleteSectionRaw(requestParameters, initOverrides) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ if (requestParameters['sectionId'] == null) {
69
+ throw new runtime.RequiredError('sectionId', 'Required parameter "sectionId" was null or undefined when calling deleteSection().');
70
+ }
71
+ const queryParameters = {};
72
+ const headerParameters = {};
73
+ let urlPath = `/v1/sections/{section_id}`;
74
+ urlPath = urlPath.replace(`{${"section_id"}}`, encodeURIComponent(String(requestParameters['sectionId'])));
75
+ const response = yield this.request({
76
+ path: urlPath,
77
+ method: 'DELETE',
78
+ headers: headerParameters,
79
+ query: queryParameters,
80
+ }, initOverrides);
81
+ return new runtime.VoidApiResponse(response);
82
+ });
83
+ }
84
+ /**
85
+ * Delete a section and all its children. WARNING: This cascades to all child sections due to parent_id ON DELETE CASCADE.
86
+ * Delete Section Handler
87
+ */
88
+ deleteSection(requestParameters, initOverrides) {
89
+ return __awaiter(this, void 0, void 0, function* () {
90
+ yield this.deleteSectionRaw(requestParameters, initOverrides);
91
+ });
92
+ }
93
+ /**
94
+ * Get a section by its ID.
95
+ * Get Section Handler
96
+ */
97
+ getSectionRaw(requestParameters, initOverrides) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ if (requestParameters['sectionId'] == null) {
100
+ throw new runtime.RequiredError('sectionId', 'Required parameter "sectionId" was null or undefined when calling getSection().');
101
+ }
102
+ const queryParameters = {};
103
+ const headerParameters = {};
104
+ let urlPath = `/v1/sections/{section_id}`;
105
+ urlPath = urlPath.replace(`{${"section_id"}}`, encodeURIComponent(String(requestParameters['sectionId'])));
106
+ const response = yield this.request({
107
+ path: urlPath,
108
+ method: 'GET',
109
+ headers: headerParameters,
110
+ query: queryParameters,
111
+ }, initOverrides);
112
+ return new runtime.JSONApiResponse(response, (jsonValue) => SectionResponseFromJSON(jsonValue));
113
+ });
114
+ }
115
+ /**
116
+ * Get a section by its ID.
117
+ * Get Section Handler
118
+ */
119
+ getSection(requestParameters, initOverrides) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ const response = yield this.getSectionRaw(requestParameters, initOverrides);
122
+ return yield response.value();
123
+ });
124
+ }
125
+ /**
126
+ * Update a section. Can update name, page_number, and/or reorder within siblings. To move: provide prev_sibling_path_id OR move_to_head (not both). Moving is only allowed within the same document version. Note: Section names can contain any characters. The corresponding path_part.name will be automatically normalized by a database trigger.
127
+ * Update Section Handler
128
+ */
129
+ updateSectionRaw(requestParameters, initOverrides) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ if (requestParameters['sectionId'] == null) {
132
+ throw new runtime.RequiredError('sectionId', 'Required parameter "sectionId" was null or undefined when calling updateSection().');
133
+ }
134
+ if (requestParameters['updateSectionRequest'] == null) {
135
+ throw new runtime.RequiredError('updateSectionRequest', 'Required parameter "updateSectionRequest" was null or undefined when calling updateSection().');
136
+ }
137
+ const queryParameters = {};
138
+ const headerParameters = {};
139
+ headerParameters['Content-Type'] = 'application/json';
140
+ let urlPath = `/v1/sections/{section_id}`;
141
+ urlPath = urlPath.replace(`{${"section_id"}}`, encodeURIComponent(String(requestParameters['sectionId'])));
142
+ const response = yield this.request({
143
+ path: urlPath,
144
+ method: 'PATCH',
145
+ headers: headerParameters,
146
+ query: queryParameters,
147
+ body: UpdateSectionRequestToJSON(requestParameters['updateSectionRequest']),
148
+ }, initOverrides);
149
+ return new runtime.JSONApiResponse(response, (jsonValue) => SectionResponseFromJSON(jsonValue));
150
+ });
151
+ }
152
+ /**
153
+ * Update a section. Can update name, page_number, and/or reorder within siblings. To move: provide prev_sibling_path_id OR move_to_head (not both). Moving is only allowed within the same document version. Note: Section names can contain any characters. The corresponding path_part.name will be automatically normalized by a database trigger.
154
+ * Update Section Handler
155
+ */
156
+ updateSection(requestParameters, initOverrides) {
157
+ return __awaiter(this, void 0, void 0, function* () {
158
+ const response = yield this.updateSectionRaw(requestParameters, initOverrides);
159
+ return yield response.value();
160
+ });
161
+ }
162
+ }
@@ -1,8 +1,10 @@
1
1
  export * from './AuthApi';
2
2
  export * from './DefaultApi';
3
+ export * from './DocumentVersionsApi';
3
4
  export * from './DocumentsApi';
4
5
  export * from './FoldersApi';
5
6
  export * from './InvitesApi';
6
7
  export * from './PathPartsApi';
8
+ export * from './SectionsApi';
7
9
  export * from './TenantsApi';
8
10
  export * from './UsersApi';
@@ -2,9 +2,11 @@
2
2
  /* eslint-disable */
3
3
  export * from './AuthApi';
4
4
  export * from './DefaultApi';
5
+ export * from './DocumentVersionsApi';
5
6
  export * from './DocumentsApi';
6
7
  export * from './FoldersApi';
7
8
  export * from './InvitesApi';
8
9
  export * from './PathPartsApi';
10
+ export * from './SectionsApi';
9
11
  export * from './TenantsApi';
10
12
  export * from './UsersApi';
@@ -0,0 +1,65 @@
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
+ * Request to create a new section.
14
+ * @export
15
+ * @interface CreateSectionRequest
16
+ */
17
+ export interface CreateSectionRequest {
18
+ /**
19
+ * Section name (can contain any characters)
20
+ * @type {string}
21
+ * @memberof CreateSectionRequest
22
+ */
23
+ name: string;
24
+ /**
25
+ * Parent PathPart ID (must be DOCUMENT_VERSION or SECTION)
26
+ * @type {string}
27
+ * @memberof CreateSectionRequest
28
+ */
29
+ parentPathId: string;
30
+ /**
31
+ * Page number in source document (must be > 0)
32
+ * @type {number}
33
+ * @memberof CreateSectionRequest
34
+ */
35
+ pageNumber?: number;
36
+ /**
37
+ * PathPart ID to insert after (null = append to tail)
38
+ * @type {string}
39
+ * @memberof CreateSectionRequest
40
+ */
41
+ prevSiblingPathId?: string;
42
+ }
43
+ /**
44
+ * Check if a given object implements the CreateSectionRequest interface.
45
+ */
46
+ export declare function instanceOfCreateSectionRequest(value: object): value is CreateSectionRequest;
47
+ export declare function CreateSectionRequestFromJSON(json: any): CreateSectionRequest;
48
+ export declare function CreateSectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSectionRequest;
49
+ export declare function CreateSectionRequestToJSON(json: any): CreateSectionRequest;
50
+ export declare function CreateSectionRequestToJSONTyped(value?: CreateSectionRequest | null, ignoreDiscriminator?: boolean): any;
51
+ export declare const CreateSectionRequestPropertyValidationAttributesMap: {
52
+ [property: string]: {
53
+ maxLength?: number;
54
+ minLength?: number;
55
+ pattern?: string;
56
+ maximum?: number;
57
+ exclusiveMaximum?: boolean;
58
+ minimum?: number;
59
+ exclusiveMinimum?: boolean;
60
+ multipleOf?: number;
61
+ maxItems?: number;
62
+ minItems?: number;
63
+ uniqueItems?: boolean;
64
+ };
65
+ };
@@ -0,0 +1,57 @@
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
+ * Check if a given object implements the CreateSectionRequest interface.
16
+ */
17
+ export function instanceOfCreateSectionRequest(value) {
18
+ if (!('name' in value) || value['name'] === undefined)
19
+ return false;
20
+ if (!('parentPathId' in value) || value['parentPathId'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function CreateSectionRequestFromJSON(json) {
25
+ return CreateSectionRequestFromJSONTyped(json, false);
26
+ }
27
+ export function CreateSectionRequestFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'name': json['name'],
33
+ 'parentPathId': json['parent_path_id'],
34
+ 'pageNumber': json['page_number'] == null ? undefined : json['page_number'],
35
+ 'prevSiblingPathId': json['prev_sibling_path_id'] == null ? undefined : json['prev_sibling_path_id'],
36
+ };
37
+ }
38
+ export function CreateSectionRequestToJSON(json) {
39
+ return CreateSectionRequestToJSONTyped(json, false);
40
+ }
41
+ export function CreateSectionRequestToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'name': value['name'],
47
+ 'parent_path_id': value['parentPathId'],
48
+ 'page_number': value['pageNumber'],
49
+ 'prev_sibling_path_id': value['prevSiblingPathId'],
50
+ };
51
+ }
52
+ export const CreateSectionRequestPropertyValidationAttributesMap = {
53
+ name: {
54
+ maxLength: 255,
55
+ minLength: 1,
56
+ },
57
+ };
@@ -13,7 +13,7 @@
13
13
  * DocumentVersion response model.
14
14
  *
15
15
  * Shared schema for DocumentVersion responses, used by Document endpoints
16
- * and future DocumentVersion endpoints.
16
+ * and DocumentVersion endpoints.
17
17
  * @export
18
18
  * @interface DocumentVersionResponse
19
19
  */
@@ -0,0 +1,66 @@
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 { DocumentVersionResponse } from './DocumentVersionResponse';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PaginatedResponseDocumentVersionResponse
17
+ */
18
+ export interface PaginatedResponseDocumentVersionResponse {
19
+ /**
20
+ * List of items
21
+ * @type {Array<DocumentVersionResponse>}
22
+ * @memberof PaginatedResponseDocumentVersionResponse
23
+ */
24
+ items: Array<DocumentVersionResponse>;
25
+ /**
26
+ * Total number of items
27
+ * @type {number}
28
+ * @memberof PaginatedResponseDocumentVersionResponse
29
+ */
30
+ total: number;
31
+ /**
32
+ * Number of items per page
33
+ * @type {number}
34
+ * @memberof PaginatedResponseDocumentVersionResponse
35
+ */
36
+ limit: number;
37
+ /**
38
+ * Number of items to skip
39
+ * @type {number}
40
+ * @memberof PaginatedResponseDocumentVersionResponse
41
+ */
42
+ offset: number;
43
+ }
44
+ /**
45
+ * Check if a given object implements the PaginatedResponseDocumentVersionResponse interface.
46
+ */
47
+ export declare function instanceOfPaginatedResponseDocumentVersionResponse(value: object): value is PaginatedResponseDocumentVersionResponse;
48
+ export declare function PaginatedResponseDocumentVersionResponseFromJSON(json: any): PaginatedResponseDocumentVersionResponse;
49
+ export declare function PaginatedResponseDocumentVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseDocumentVersionResponse;
50
+ export declare function PaginatedResponseDocumentVersionResponseToJSON(json: any): PaginatedResponseDocumentVersionResponse;
51
+ export declare function PaginatedResponseDocumentVersionResponseToJSONTyped(value?: PaginatedResponseDocumentVersionResponse | null, ignoreDiscriminator?: boolean): any;
52
+ export declare const PaginatedResponseDocumentVersionResponsePropertyValidationAttributesMap: {
53
+ [property: string]: {
54
+ maxLength?: number;
55
+ minLength?: number;
56
+ pattern?: string;
57
+ maximum?: number;
58
+ exclusiveMaximum?: boolean;
59
+ minimum?: number;
60
+ exclusiveMinimum?: boolean;
61
+ multipleOf?: number;
62
+ maxItems?: number;
63
+ minItems?: number;
64
+ uniqueItems?: boolean;
65
+ };
66
+ };
@@ -0,0 +1,70 @@
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
+ import { DocumentVersionResponseFromJSON, DocumentVersionResponseToJSON, } from './DocumentVersionResponse';
15
+ /**
16
+ * Check if a given object implements the PaginatedResponseDocumentVersionResponse interface.
17
+ */
18
+ export function instanceOfPaginatedResponseDocumentVersionResponse(value) {
19
+ if (!('items' in value) || value['items'] === undefined)
20
+ return false;
21
+ if (!('total' in value) || value['total'] === undefined)
22
+ return false;
23
+ if (!('limit' in value) || value['limit'] === undefined)
24
+ return false;
25
+ if (!('offset' in value) || value['offset'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ export function PaginatedResponseDocumentVersionResponseFromJSON(json) {
30
+ return PaginatedResponseDocumentVersionResponseFromJSONTyped(json, false);
31
+ }
32
+ export function PaginatedResponseDocumentVersionResponseFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ 'items': (json['items'].map(DocumentVersionResponseFromJSON)),
38
+ 'total': json['total'],
39
+ 'limit': json['limit'],
40
+ 'offset': json['offset'],
41
+ };
42
+ }
43
+ export function PaginatedResponseDocumentVersionResponseToJSON(json) {
44
+ return PaginatedResponseDocumentVersionResponseToJSONTyped(json, false);
45
+ }
46
+ export function PaginatedResponseDocumentVersionResponseToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'items': (value['items'].map(DocumentVersionResponseToJSON)),
52
+ 'total': value['total'],
53
+ 'limit': value['limit'],
54
+ 'offset': value['offset'],
55
+ };
56
+ }
57
+ export const PaginatedResponseDocumentVersionResponsePropertyValidationAttributesMap = {
58
+ total: {
59
+ minimum: 0,
60
+ exclusiveMinimum: false,
61
+ },
62
+ limit: {
63
+ minimum: 1,
64
+ exclusiveMinimum: false,
65
+ },
66
+ offset: {
67
+ minimum: 0,
68
+ exclusiveMinimum: false,
69
+ },
70
+ };