@knowledge-stack/ksapi 1.11.2 → 1.12.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 (43) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +2 -2
  3. package/dist/apis/TagsApi.d.ts +237 -0
  4. package/dist/apis/TagsApi.js +272 -0
  5. package/dist/apis/index.d.ts +1 -0
  6. package/dist/apis/index.js +1 -0
  7. package/dist/esm/apis/TagsApi.d.ts +237 -0
  8. package/dist/esm/apis/TagsApi.js +268 -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/CreateTagRequest.d.ts +59 -0
  12. package/dist/esm/models/CreateTagRequest.js +61 -0
  13. package/dist/esm/models/PaginatedResponseTagResponse.d.ts +66 -0
  14. package/dist/esm/models/PaginatedResponseTagResponse.js +70 -0
  15. package/dist/esm/models/TagPathPartRequest.d.ts +47 -0
  16. package/dist/esm/models/TagPathPartRequest.js +44 -0
  17. package/dist/esm/models/TagResponse.d.ts +83 -0
  18. package/dist/esm/models/TagResponse.js +66 -0
  19. package/dist/esm/models/UpdateTagRequest.d.ts +59 -0
  20. package/dist/esm/models/UpdateTagRequest.js +59 -0
  21. package/dist/esm/models/index.d.ts +5 -0
  22. package/dist/esm/models/index.js +5 -0
  23. package/dist/models/CreateTagRequest.d.ts +59 -0
  24. package/dist/models/CreateTagRequest.js +69 -0
  25. package/dist/models/PaginatedResponseTagResponse.d.ts +66 -0
  26. package/dist/models/PaginatedResponseTagResponse.js +78 -0
  27. package/dist/models/TagPathPartRequest.d.ts +47 -0
  28. package/dist/models/TagPathPartRequest.js +52 -0
  29. package/dist/models/TagResponse.d.ts +83 -0
  30. package/dist/models/TagResponse.js +74 -0
  31. package/dist/models/UpdateTagRequest.d.ts +59 -0
  32. package/dist/models/UpdateTagRequest.js +67 -0
  33. package/dist/models/index.d.ts +5 -0
  34. package/dist/models/index.js +5 -0
  35. package/package.json +1 -1
  36. package/src/apis/TagsApi.ts +517 -0
  37. package/src/apis/index.ts +1 -0
  38. package/src/models/CreateTagRequest.ts +111 -0
  39. package/src/models/PaginatedResponseTagResponse.ts +130 -0
  40. package/src/models/TagPathPartRequest.ts +83 -0
  41. package/src/models/TagResponse.ts +136 -0
  42. package/src/models/UpdateTagRequest.ts +110 -0
  43. package/src/models/index.ts +5 -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 { TagResponse } from './TagResponse';
17
+ import {
18
+ TagResponseFromJSON,
19
+ TagResponseFromJSONTyped,
20
+ TagResponseToJSON,
21
+ TagResponseToJSONTyped,
22
+ } from './TagResponse';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PaginatedResponseTagResponse
28
+ */
29
+ export interface PaginatedResponseTagResponse {
30
+ /**
31
+ * List of items
32
+ * @type {Array<TagResponse>}
33
+ * @memberof PaginatedResponseTagResponse
34
+ */
35
+ items: Array<TagResponse>;
36
+ /**
37
+ * Total number of items
38
+ * @type {number}
39
+ * @memberof PaginatedResponseTagResponse
40
+ */
41
+ total: number;
42
+ /**
43
+ * Number of items per page
44
+ * @type {number}
45
+ * @memberof PaginatedResponseTagResponse
46
+ */
47
+ limit: number;
48
+ /**
49
+ * Number of items to skip
50
+ * @type {number}
51
+ * @memberof PaginatedResponseTagResponse
52
+ */
53
+ offset: number;
54
+ }
55
+
56
+ /**
57
+ * Check if a given object implements the PaginatedResponseTagResponse interface.
58
+ */
59
+ export function instanceOfPaginatedResponseTagResponse(value: object): value is PaginatedResponseTagResponse {
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 PaginatedResponseTagResponseFromJSON(json: any): PaginatedResponseTagResponse {
68
+ return PaginatedResponseTagResponseFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function PaginatedResponseTagResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseTagResponse {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'items': ((json['items'] as Array<any>).map(TagResponseFromJSON)),
78
+ 'total': json['total'],
79
+ 'limit': json['limit'],
80
+ 'offset': json['offset'],
81
+ };
82
+ }
83
+
84
+ export function PaginatedResponseTagResponseToJSON(json: any): PaginatedResponseTagResponse {
85
+ return PaginatedResponseTagResponseToJSONTyped(json, false);
86
+ }
87
+
88
+ export function PaginatedResponseTagResponseToJSONTyped(value?: PaginatedResponseTagResponse | 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(TagResponseToJSON)),
96
+ 'total': value['total'],
97
+ 'limit': value['limit'],
98
+ 'offset': value['offset'],
99
+ };
100
+ }
101
+
102
+ export const PaginatedResponseTagResponsePropertyValidationAttributesMap: {
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,83 @@
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 attach/detach a tag to/from a path part.
18
+ * @export
19
+ * @interface TagPathPartRequest
20
+ */
21
+ export interface TagPathPartRequest {
22
+ /**
23
+ * PathPart ID to attach the tag to
24
+ * @type {string}
25
+ * @memberof TagPathPartRequest
26
+ */
27
+ pathPartId: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the TagPathPartRequest interface.
32
+ */
33
+ export function instanceOfTagPathPartRequest(value: object): value is TagPathPartRequest {
34
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function TagPathPartRequestFromJSON(json: any): TagPathPartRequest {
39
+ return TagPathPartRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function TagPathPartRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): TagPathPartRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'pathPartId': json['path_part_id'],
49
+ };
50
+ }
51
+
52
+ export function TagPathPartRequestToJSON(json: any): TagPathPartRequest {
53
+ return TagPathPartRequestToJSONTyped(json, false);
54
+ }
55
+
56
+ export function TagPathPartRequestToJSONTyped(value?: TagPathPartRequest | null, ignoreDiscriminator: boolean = false): any {
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+
61
+ return {
62
+
63
+ 'path_part_id': value['pathPartId'],
64
+ };
65
+ }
66
+
67
+ export const TagPathPartRequestPropertyValidationAttributesMap: {
68
+ [property: string]: {
69
+ maxLength?: number,
70
+ minLength?: number,
71
+ pattern?: string,
72
+ maximum?: number,
73
+ exclusiveMaximum?: boolean,
74
+ minimum?: number,
75
+ exclusiveMinimum?: boolean,
76
+ multipleOf?: number,
77
+ maxItems?: number,
78
+ minItems?: number,
79
+ uniqueItems?: boolean
80
+ }
81
+ } = {
82
+ }
83
+
@@ -0,0 +1,136 @@
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
+ * Tag response model.
18
+ * @export
19
+ * @interface TagResponse
20
+ */
21
+ export interface TagResponse {
22
+ /**
23
+ * Tag ID
24
+ * @type {string}
25
+ * @memberof TagResponse
26
+ */
27
+ id: string;
28
+ /**
29
+ * Tag name
30
+ * @type {string}
31
+ * @memberof TagResponse
32
+ */
33
+ name: string;
34
+ /**
35
+ * Tag color hex
36
+ * @type {string}
37
+ * @memberof TagResponse
38
+ */
39
+ color: string;
40
+ /**
41
+ * Tag description
42
+ * @type {string}
43
+ * @memberof TagResponse
44
+ */
45
+ description?: string;
46
+ /**
47
+ * Tenant ID
48
+ * @type {string}
49
+ * @memberof TagResponse
50
+ */
51
+ tenantId: string;
52
+ /**
53
+ * Creation timestamp
54
+ * @type {Date}
55
+ * @memberof TagResponse
56
+ */
57
+ createdAt: Date;
58
+ /**
59
+ * Last update timestamp
60
+ * @type {Date}
61
+ * @memberof TagResponse
62
+ */
63
+ updatedAt: Date;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the TagResponse interface.
68
+ */
69
+ export function instanceOfTagResponse(value: object): value is TagResponse {
70
+ if (!('id' in value) || value['id'] === undefined) return false;
71
+ if (!('name' in value) || value['name'] === undefined) return false;
72
+ if (!('color' in value) || value['color'] === undefined) return false;
73
+ if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
74
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
75
+ if (!('updatedAt' in value) || value['updatedAt'] === undefined) return false;
76
+ return true;
77
+ }
78
+
79
+ export function TagResponseFromJSON(json: any): TagResponse {
80
+ return TagResponseFromJSONTyped(json, false);
81
+ }
82
+
83
+ export function TagResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TagResponse {
84
+ if (json == null) {
85
+ return json;
86
+ }
87
+ return {
88
+
89
+ 'id': json['id'],
90
+ 'name': json['name'],
91
+ 'color': json['color'],
92
+ 'description': json['description'] == null ? undefined : json['description'],
93
+ 'tenantId': json['tenant_id'],
94
+ 'createdAt': (new Date(json['created_at'])),
95
+ 'updatedAt': (new Date(json['updated_at'])),
96
+ };
97
+ }
98
+
99
+ export function TagResponseToJSON(json: any): TagResponse {
100
+ return TagResponseToJSONTyped(json, false);
101
+ }
102
+
103
+ export function TagResponseToJSONTyped(value?: TagResponse | null, ignoreDiscriminator: boolean = false): any {
104
+ if (value == null) {
105
+ return value;
106
+ }
107
+
108
+ return {
109
+
110
+ 'id': value['id'],
111
+ 'name': value['name'],
112
+ 'color': value['color'],
113
+ 'description': value['description'],
114
+ 'tenant_id': value['tenantId'],
115
+ 'created_at': value['createdAt'].toISOString(),
116
+ 'updated_at': value['updatedAt'].toISOString(),
117
+ };
118
+ }
119
+
120
+ export const TagResponsePropertyValidationAttributesMap: {
121
+ [property: string]: {
122
+ maxLength?: number,
123
+ minLength?: number,
124
+ pattern?: string,
125
+ maximum?: number,
126
+ exclusiveMaximum?: boolean,
127
+ minimum?: number,
128
+ exclusiveMinimum?: boolean,
129
+ multipleOf?: number,
130
+ maxItems?: number,
131
+ minItems?: number,
132
+ uniqueItems?: boolean
133
+ }
134
+ } = {
135
+ }
136
+
@@ -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 tag.
18
+ * @export
19
+ * @interface UpdateTagRequest
20
+ */
21
+ export interface UpdateTagRequest {
22
+ /**
23
+ * New tag name
24
+ * @type {string}
25
+ * @memberof UpdateTagRequest
26
+ */
27
+ name?: string;
28
+ /**
29
+ * New tag color as 6-character hex string
30
+ * @type {string}
31
+ * @memberof UpdateTagRequest
32
+ */
33
+ color?: string;
34
+ /**
35
+ * New tag description (empty string to clear)
36
+ * @type {string}
37
+ * @memberof UpdateTagRequest
38
+ */
39
+ description?: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the UpdateTagRequest interface.
44
+ */
45
+ export function instanceOfUpdateTagRequest(value: object): value is UpdateTagRequest {
46
+ return true;
47
+ }
48
+
49
+ export function UpdateTagRequestFromJSON(json: any): UpdateTagRequest {
50
+ return UpdateTagRequestFromJSONTyped(json, false);
51
+ }
52
+
53
+ export function UpdateTagRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateTagRequest {
54
+ if (json == null) {
55
+ return json;
56
+ }
57
+ return {
58
+
59
+ 'name': json['name'] == null ? undefined : json['name'],
60
+ 'color': json['color'] == null ? undefined : json['color'],
61
+ 'description': json['description'] == null ? undefined : json['description'],
62
+ };
63
+ }
64
+
65
+ export function UpdateTagRequestToJSON(json: any): UpdateTagRequest {
66
+ return UpdateTagRequestToJSONTyped(json, false);
67
+ }
68
+
69
+ export function UpdateTagRequestToJSONTyped(value?: UpdateTagRequest | null, ignoreDiscriminator: boolean = false): any {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+
74
+ return {
75
+
76
+ 'name': value['name'],
77
+ 'color': value['color'],
78
+ 'description': value['description'],
79
+ };
80
+ }
81
+
82
+ export const UpdateTagRequestPropertyValidationAttributesMap: {
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: 100,
99
+ minLength: 1,
100
+ },
101
+ color: {
102
+ maxLength: 6,
103
+ minLength: 6,
104
+ pattern: '/^[0-9A-Fa-f]{6}$/',
105
+ },
106
+ description: {
107
+ maxLength: 500,
108
+ },
109
+ }
110
+
@@ -11,6 +11,7 @@ export * from './CreateDocumentRequest';
11
11
  export * from './CreateFolderRequest';
12
12
  export * from './CreatePasswordUserRequest';
13
13
  export * from './CreateSectionRequest';
14
+ export * from './CreateTagRequest';
14
15
  export * from './CreateTenantRequest';
15
16
  export * from './CreateThreadMessageRequest';
16
17
  export * from './CreateThreadRequest';
@@ -41,6 +42,7 @@ export * from './PaginatedResponseFolderDocumentResponse';
41
42
  export * from './PaginatedResponseFolderResponse';
42
43
  export * from './PaginatedResponseInviteResponse';
43
44
  export * from './PaginatedResponsePathPartResponse';
45
+ export * from './PaginatedResponseTagResponse';
44
46
  export * from './PaginatedResponseTenantResponse';
45
47
  export * from './PaginatedResponseTenantUserInTenantResponse';
46
48
  export * from './PaginatedResponseThreadMessageResponse';
@@ -55,6 +57,8 @@ export * from './PolygonReference';
55
57
  export * from './RootResponse';
56
58
  export * from './SectionResponse';
57
59
  export * from './SignInRequest';
60
+ export * from './TagPathPartRequest';
61
+ export * from './TagResponse';
58
62
  export * from './TenantResponse';
59
63
  export * from './TenantUserInTenantResponse';
60
64
  export * from './TenantUserRole';
@@ -65,6 +69,7 @@ export * from './UpdateChunkMetadataRequest';
65
69
  export * from './UpdateDocumentRequest';
66
70
  export * from './UpdateFolderRequest';
67
71
  export * from './UpdateSectionRequest';
72
+ export * from './UpdateTagRequest';
68
73
  export * from './UpdateTenantRequest';
69
74
  export * from './UpdateThreadRequest';
70
75
  export * from './UpdateUserRequest';