@knowledge-stack/ksapi 1.4.0 → 1.5.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 (53) hide show
  1. package/.openapi-generator/FILES +8 -0
  2. package/README.md +2 -2
  3. package/dist/apis/DocumentsApi.d.ts +179 -0
  4. package/dist/apis/DocumentsApi.js +206 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/DocumentsApi.d.ts +179 -0
  8. package/dist/esm/apis/DocumentsApi.js +202 -0
  9. package/dist/esm/apis/index.d.ts +1 -0
  10. package/dist/esm/apis/index.js +1 -0
  11. package/dist/esm/models/CreateDocumentRequest.d.ts +67 -0
  12. package/dist/esm/models/CreateDocumentRequest.js +63 -0
  13. package/dist/esm/models/DocumentOrigin.d.ts +25 -0
  14. package/dist/esm/models/DocumentOrigin.js +43 -0
  15. package/dist/esm/models/DocumentResponse.d.ts +110 -0
  16. package/dist/esm/models/DocumentResponse.js +87 -0
  17. package/dist/esm/models/DocumentType.d.ts +25 -0
  18. package/dist/esm/models/DocumentType.js +43 -0
  19. package/dist/esm/models/DocumentVersionResponse.d.ts +92 -0
  20. package/dist/esm/models/DocumentVersionResponse.js +72 -0
  21. package/dist/esm/models/PaginatedResponseDocumentResponse.d.ts +66 -0
  22. package/dist/esm/models/PaginatedResponseDocumentResponse.js +70 -0
  23. package/dist/esm/models/UpdateDocumentRequest.d.ts +59 -0
  24. package/dist/esm/models/UpdateDocumentRequest.js +51 -0
  25. package/dist/esm/models/index.d.ts +7 -0
  26. package/dist/esm/models/index.js +7 -0
  27. package/dist/models/CreateDocumentRequest.d.ts +67 -0
  28. package/dist/models/CreateDocumentRequest.js +71 -0
  29. package/dist/models/DocumentOrigin.d.ts +25 -0
  30. package/dist/models/DocumentOrigin.js +51 -0
  31. package/dist/models/DocumentResponse.d.ts +110 -0
  32. package/dist/models/DocumentResponse.js +95 -0
  33. package/dist/models/DocumentType.d.ts +25 -0
  34. package/dist/models/DocumentType.js +51 -0
  35. package/dist/models/DocumentVersionResponse.d.ts +92 -0
  36. package/dist/models/DocumentVersionResponse.js +80 -0
  37. package/dist/models/PaginatedResponseDocumentResponse.d.ts +66 -0
  38. package/dist/models/PaginatedResponseDocumentResponse.js +78 -0
  39. package/dist/models/UpdateDocumentRequest.d.ts +59 -0
  40. package/dist/models/UpdateDocumentRequest.js +59 -0
  41. package/dist/models/index.d.ts +7 -0
  42. package/dist/models/index.js +7 -0
  43. package/package.json +1 -1
  44. package/src/apis/DocumentsApi.ts +386 -0
  45. package/src/apis/index.ts +1 -0
  46. package/src/models/CreateDocumentRequest.ts +131 -0
  47. package/src/models/DocumentOrigin.ts +53 -0
  48. package/src/models/DocumentResponse.ts +197 -0
  49. package/src/models/DocumentType.ts +53 -0
  50. package/src/models/DocumentVersionResponse.ts +149 -0
  51. package/src/models/PaginatedResponseDocumentResponse.ts +130 -0
  52. package/src/models/UpdateDocumentRequest.ts +102 -0
  53. package/src/models/index.ts +7 -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 { DocumentResponse } from './DocumentResponse';
17
+ import {
18
+ DocumentResponseFromJSON,
19
+ DocumentResponseFromJSONTyped,
20
+ DocumentResponseToJSON,
21
+ DocumentResponseToJSONTyped,
22
+ } from './DocumentResponse';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PaginatedResponseDocumentResponse
28
+ */
29
+ export interface PaginatedResponseDocumentResponse {
30
+ /**
31
+ * List of items
32
+ * @type {Array<DocumentResponse>}
33
+ * @memberof PaginatedResponseDocumentResponse
34
+ */
35
+ items: Array<DocumentResponse>;
36
+ /**
37
+ * Total number of items
38
+ * @type {number}
39
+ * @memberof PaginatedResponseDocumentResponse
40
+ */
41
+ total: number;
42
+ /**
43
+ * Number of items per page
44
+ * @type {number}
45
+ * @memberof PaginatedResponseDocumentResponse
46
+ */
47
+ limit: number;
48
+ /**
49
+ * Number of items to skip
50
+ * @type {number}
51
+ * @memberof PaginatedResponseDocumentResponse
52
+ */
53
+ offset: number;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the PaginatedResponseDocumentResponse interface.
58
+ */
59
+ export function instanceOfPaginatedResponseDocumentResponse(value: object): value is PaginatedResponseDocumentResponse {
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 PaginatedResponseDocumentResponseFromJSON(json: any): PaginatedResponseDocumentResponse {
68
+ return PaginatedResponseDocumentResponseFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function PaginatedResponseDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseDocumentResponse {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'items': ((json['items'] as Array<any>).map(DocumentResponseFromJSON)),
78
+ 'total': json['total'],
79
+ 'limit': json['limit'],
80
+ 'offset': json['offset'],
81
+ };
82
+ }
83
+
84
+ export function PaginatedResponseDocumentResponseToJSON(json: any): PaginatedResponseDocumentResponse {
85
+ return PaginatedResponseDocumentResponseToJSONTyped(json, false);
86
+ }
87
+
88
+ export function PaginatedResponseDocumentResponseToJSONTyped(value?: PaginatedResponseDocumentResponse | 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(DocumentResponseToJSON)),
96
+ 'total': value['total'],
97
+ 'limit': value['limit'],
98
+ 'offset': value['offset'],
99
+ };
100
+ }
101
+
102
+ export const PaginatedResponseDocumentResponsePropertyValidationAttributesMap: {
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,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
+ /**
17
+ * Request to update a document (rename, move, and/or change active version).
18
+ * @export
19
+ * @interface UpdateDocumentRequest
20
+ */
21
+ export interface UpdateDocumentRequest {
22
+ /**
23
+ * New document name
24
+ * @type {string}
25
+ * @memberof UpdateDocumentRequest
26
+ */
27
+ name?: string;
28
+ /**
29
+ * New parent folder PathPart ID (for move)
30
+ * @type {string}
31
+ * @memberof UpdateDocumentRequest
32
+ */
33
+ parentId?: string;
34
+ /**
35
+ * New active version ID
36
+ * @type {string}
37
+ * @memberof UpdateDocumentRequest
38
+ */
39
+ activeVersionId?: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the UpdateDocumentRequest interface.
44
+ */
45
+ export function instanceOfUpdateDocumentRequest(value: object): value is UpdateDocumentRequest {
46
+ return true;
47
+ }
48
+
49
+ export function UpdateDocumentRequestFromJSON(json: any): UpdateDocumentRequest {
50
+ return UpdateDocumentRequestFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function UpdateDocumentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateDocumentRequest {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'name': json['name'] == null ? undefined : json['name'],
60
+ 'parentId': json['parent_id'] == null ? undefined : json['parent_id'],
61
+ 'activeVersionId': json['active_version_id'] == null ? undefined : json['active_version_id'],
62
+ };
63
+ }
64
+
65
+ export function UpdateDocumentRequestToJSON(json: any): UpdateDocumentRequest {
66
+ return UpdateDocumentRequestToJSONTyped(json, false);
67
+ }
68
+
69
+ export function UpdateDocumentRequestToJSONTyped(value?: UpdateDocumentRequest | null, ignoreDiscriminator: boolean = false): any {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+
74
+ return {
75
+
76
+ 'name': value['name'],
77
+ 'parent_id': value['parentId'],
78
+ 'active_version_id': value['activeVersionId'],
79
+ };
80
+ }
81
+
82
+ export const UpdateDocumentRequestPropertyValidationAttributesMap: {
83
+ [property: string]: {
84
+ maxLength?: number,
85
+ minLength?: number,
86
+ pattern?: string,
87
+ maximum?: number,
88
+ exclusiveMaximum?: boolean,
89
+ minimum?: number,
90
+ exclusiveMinimum?: boolean,
91
+ multipleOf?: number,
92
+ maxItems?: number,
93
+ minItems?: number,
94
+ uniqueItems?: boolean
95
+ }
96
+ } = {
97
+ name: {
98
+ maxLength: 255,
99
+ minLength: 1,
100
+ },
101
+ }
102
+
@@ -1,8 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export * from './CreateDocumentRequest';
3
4
  export * from './CreateFolderRequest';
4
5
  export * from './CreatePasswordUserRequest';
5
6
  export * from './CreateTenantRequest';
7
+ export * from './DocumentOrigin';
8
+ export * from './DocumentResponse';
9
+ export * from './DocumentType';
10
+ export * from './DocumentVersionResponse';
6
11
  export * from './EmailSentResponse';
7
12
  export * from './EmailVerificationRequest';
8
13
  export * from './FolderResponse';
@@ -13,6 +18,7 @@ export * from './InviteResponse';
13
18
  export * from './InviteStatus';
14
19
  export * from './InviteUserRequest';
15
20
  export * from './OAuth2Config';
21
+ export * from './PaginatedResponseDocumentResponse';
16
22
  export * from './PaginatedResponseFolderResponse';
17
23
  export * from './PaginatedResponseInviteResponse';
18
24
  export * from './PaginatedResponsePathPartResponse';
@@ -28,6 +34,7 @@ export * from './SignInRequest';
28
34
  export * from './TenantResponse';
29
35
  export * from './TenantUserInTenantResponse';
30
36
  export * from './TenantUserRole';
37
+ export * from './UpdateDocumentRequest';
31
38
  export * from './UpdateFolderRequest';
32
39
  export * from './UpdateTenantRequest';
33
40
  export * from './UpdateUserRequest';