@knowledge-stack/ksapi 1.144.0 → 1.145.1
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.
- package/.openapi-generator/FILES +2 -2
- package/README.md +3 -3
- package/dist/apis/SkillsApi.d.ts +11 -8
- package/dist/apis/SkillsApi.js +7 -4
- package/dist/esm/apis/SkillsApi.d.ts +11 -8
- package/dist/esm/apis/SkillsApi.js +7 -4
- package/dist/esm/models/CreateSkillRequest.d.ts +4 -4
- package/dist/esm/models/CreateSkillRequest.js +5 -5
- package/dist/esm/models/{SkillScriptFile.d.ts → SkillFile.d.ts} +33 -15
- package/dist/esm/models/{SkillScriptFile.js → SkillFile.js} +23 -14
- package/dist/esm/models/SkillResponse.d.ts +6 -6
- package/dist/esm/models/SkillResponse.js +5 -5
- package/dist/esm/models/UpdateSkillRequest.d.ts +4 -4
- package/dist/esm/models/UpdateSkillRequest.js +5 -5
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.js +1 -1
- package/dist/models/CreateSkillRequest.d.ts +4 -4
- package/dist/models/CreateSkillRequest.js +5 -5
- package/dist/models/{SkillScriptFile.d.ts → SkillFile.d.ts} +33 -15
- package/dist/models/{SkillScriptFile.js → SkillFile.js} +29 -20
- package/dist/models/SkillResponse.d.ts +6 -6
- package/dist/models/SkillResponse.js +5 -5
- package/dist/models/UpdateSkillRequest.d.ts +4 -4
- package/dist/models/UpdateSkillRequest.js +5 -5
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.js +1 -1
- package/docs/CreateSkillRequest.md +2 -2
- package/docs/FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md +4 -4
- package/docs/{SkillScriptFile.md → SkillFile.md} +9 -7
- package/docs/SkillResponse.md +4 -4
- package/docs/SkillsApi.md +6 -3
- package/docs/UpdateSkillRequest.md +2 -2
- package/package.json +1 -1
- package/src/apis/SkillsApi.ts +15 -8
- package/src/models/CreateSkillRequest.ts +13 -13
- package/src/models/{SkillScriptFile.ts → SkillFile.ts} +45 -22
- package/src/models/SkillResponse.ts +15 -15
- package/src/models/UpdateSkillRequest.ts +13 -13
- package/src/models/index.ts +1 -1
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { SkillFile } from './SkillFile';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
SkillFileFromJSON,
|
|
19
|
+
SkillFileFromJSONTyped,
|
|
20
|
+
SkillFileToJSON,
|
|
21
|
+
SkillFileToJSONTyped,
|
|
22
|
+
} from './SkillFile';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Author a skill from a SKILL.md bundle.
|
|
@@ -40,11 +40,11 @@ export interface CreateSkillRequest {
|
|
|
40
40
|
*/
|
|
41
41
|
skillMd: string;
|
|
42
42
|
/**
|
|
43
|
-
* Optional
|
|
44
|
-
* @type {Array<
|
|
43
|
+
* Optional bundle files at paths relative to the skill root (scripts/, references/, assets/, …). SKILL.md is supplied separately and must not be repeated here.
|
|
44
|
+
* @type {Array<SkillFile>}
|
|
45
45
|
* @memberof CreateSkillRequest
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
files?: Array<SkillFile>;
|
|
48
48
|
}
|
|
49
49
|
export const CreateSkillRequestPropertyValidationAttributesMap: {
|
|
50
50
|
[property: string]: {
|
|
@@ -64,8 +64,8 @@ export const CreateSkillRequestPropertyValidationAttributesMap: {
|
|
|
64
64
|
name: {
|
|
65
65
|
maxLength: 255,
|
|
66
66
|
},
|
|
67
|
-
|
|
68
|
-
maxItems:
|
|
67
|
+
files: {
|
|
68
|
+
maxItems: 2000,
|
|
69
69
|
uniqueItems: false,
|
|
70
70
|
},
|
|
71
71
|
}
|
|
@@ -92,7 +92,7 @@ export function CreateSkillRequestFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
92
92
|
|
|
93
93
|
'name': json['name'],
|
|
94
94
|
'skillMd': json['skill_md'],
|
|
95
|
-
'
|
|
95
|
+
'files': json['files'] == null ? undefined : ((json['files'] as Array<any>).map(SkillFileFromJSON)),
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -109,7 +109,7 @@ export function CreateSkillRequestToJSONTyped(value?: CreateSkillRequest | null,
|
|
|
109
109
|
|
|
110
110
|
'name': value['name'],
|
|
111
111
|
'skill_md': value['skillMd'],
|
|
112
|
-
'
|
|
112
|
+
'files': value['files'] == null ? undefined : ((value['files'] as Array<any>).map(SkillFileToJSON)),
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -14,25 +14,46 @@
|
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* One file in a skill bundle, at a path relative to the skill root.
|
|
18
|
+
*
|
|
19
|
+
* Skills carry arbitrary trees (``scripts/office/validate.py``,
|
|
20
|
+
* ``references/guide.md``, ``assets/logo.png``), so binary files are carried
|
|
21
|
+
* base64-encoded rather than excluded.
|
|
18
22
|
* @export
|
|
19
|
-
* @interface
|
|
23
|
+
* @interface SkillFile
|
|
20
24
|
*/
|
|
21
|
-
export interface
|
|
25
|
+
export interface SkillFile {
|
|
22
26
|
/**
|
|
23
|
-
*
|
|
27
|
+
* Path relative to the skill root, e.g. scripts/office/run.py
|
|
24
28
|
* @type {string}
|
|
25
|
-
* @memberof
|
|
29
|
+
* @memberof SkillFile
|
|
26
30
|
*/
|
|
27
|
-
|
|
31
|
+
path: string;
|
|
28
32
|
/**
|
|
29
|
-
*
|
|
33
|
+
* UTF-8 text, or base64-encoded bytes when encoding=base64.
|
|
30
34
|
* @type {string}
|
|
31
|
-
* @memberof
|
|
35
|
+
* @memberof SkillFile
|
|
32
36
|
*/
|
|
33
37
|
content: string;
|
|
38
|
+
/**
|
|
39
|
+
* How `content` is encoded.
|
|
40
|
+
* @type {SkillFileEncodingEnum}
|
|
41
|
+
* @memberof SkillFile
|
|
42
|
+
*/
|
|
43
|
+
encoding?: SkillFileEncodingEnum;
|
|
34
44
|
}
|
|
35
|
-
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @export
|
|
49
|
+
*/
|
|
50
|
+
export const SkillFileEncodingEnum = {
|
|
51
|
+
Utf8: 'utf-8',
|
|
52
|
+
Base64: 'base64'
|
|
53
|
+
} as const;
|
|
54
|
+
export type SkillFileEncodingEnum = typeof SkillFileEncodingEnum[keyof typeof SkillFileEncodingEnum];
|
|
55
|
+
|
|
56
|
+
export const SkillFilePropertyValidationAttributesMap: {
|
|
36
57
|
[property: string]: {
|
|
37
58
|
maxLength?: number,
|
|
38
59
|
minLength?: number,
|
|
@@ -47,49 +68,51 @@ export const SkillScriptFilePropertyValidationAttributesMap: {
|
|
|
47
68
|
uniqueItems?: boolean
|
|
48
69
|
}
|
|
49
70
|
} = {
|
|
50
|
-
|
|
51
|
-
maxLength:
|
|
71
|
+
path: {
|
|
72
|
+
maxLength: 1024,
|
|
52
73
|
},
|
|
53
74
|
}
|
|
54
75
|
|
|
55
76
|
|
|
56
77
|
/**
|
|
57
|
-
* Check if a given object implements the
|
|
78
|
+
* Check if a given object implements the SkillFile interface.
|
|
58
79
|
*/
|
|
59
|
-
export function
|
|
60
|
-
if (!('
|
|
80
|
+
export function instanceOfSkillFile(value: object): value is SkillFile {
|
|
81
|
+
if (!('path' in value) || value['path'] === undefined) return false;
|
|
61
82
|
if (!('content' in value) || value['content'] === undefined) return false;
|
|
62
83
|
return true;
|
|
63
84
|
}
|
|
64
85
|
|
|
65
|
-
export function
|
|
66
|
-
return
|
|
86
|
+
export function SkillFileFromJSON(json: any): SkillFile {
|
|
87
|
+
return SkillFileFromJSONTyped(json, false);
|
|
67
88
|
}
|
|
68
89
|
|
|
69
|
-
export function
|
|
90
|
+
export function SkillFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillFile {
|
|
70
91
|
if (json == null) {
|
|
71
92
|
return json;
|
|
72
93
|
}
|
|
73
94
|
return {
|
|
74
95
|
|
|
75
|
-
'
|
|
96
|
+
'path': json['path'],
|
|
76
97
|
'content': json['content'],
|
|
98
|
+
'encoding': json['encoding'] == null ? undefined : json['encoding'],
|
|
77
99
|
};
|
|
78
100
|
}
|
|
79
101
|
|
|
80
|
-
export function
|
|
81
|
-
return
|
|
102
|
+
export function SkillFileToJSON(json: any): SkillFile {
|
|
103
|
+
return SkillFileToJSONTyped(json, false);
|
|
82
104
|
}
|
|
83
105
|
|
|
84
|
-
export function
|
|
106
|
+
export function SkillFileToJSONTyped(value?: SkillFile | null, ignoreDiscriminator: boolean = false): any {
|
|
85
107
|
if (value == null) {
|
|
86
108
|
return value;
|
|
87
109
|
}
|
|
88
110
|
|
|
89
111
|
return {
|
|
90
112
|
|
|
91
|
-
'
|
|
113
|
+
'path': value['path'],
|
|
92
114
|
'content': value['content'],
|
|
115
|
+
'encoding': value['encoding'],
|
|
93
116
|
};
|
|
94
117
|
}
|
|
95
118
|
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
ItemPermissionsToJSON,
|
|
21
21
|
ItemPermissionsToJSONTyped,
|
|
22
22
|
} from './ItemPermissions';
|
|
23
|
-
import type {
|
|
23
|
+
import type { SkillFile } from './SkillFile';
|
|
24
24
|
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} from './
|
|
25
|
+
SkillFileFromJSON,
|
|
26
|
+
SkillFileFromJSONTyped,
|
|
27
|
+
SkillFileToJSON,
|
|
28
|
+
SkillFileToJSONTyped,
|
|
29
|
+
} from './SkillFile';
|
|
30
30
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
31
31
|
import {
|
|
32
32
|
PathPartApprovalStateFromJSON,
|
|
@@ -103,17 +103,17 @@ export interface SkillResponse {
|
|
|
103
103
|
*/
|
|
104
104
|
skillMd?: string | null;
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
106
|
+
* Bundle file paths relative to the skill root (SKILL.md excluded); populated on the detail read and on mutation responses, empty on list.
|
|
107
107
|
* @type {Array<string>}
|
|
108
108
|
* @memberof SkillResponse
|
|
109
109
|
*/
|
|
110
|
-
|
|
110
|
+
filePaths?: Array<string>;
|
|
111
111
|
/**
|
|
112
|
-
*
|
|
113
|
-
* @type {Array<
|
|
112
|
+
* Bundle files with their contents; populated only on the detail read (GET /skills/{id}), null on list. Lets the editor read the current file set so a PATCH can safely resubmit the whole set.
|
|
113
|
+
* @type {Array<SkillFile>}
|
|
114
114
|
* @memberof SkillResponse
|
|
115
115
|
*/
|
|
116
|
-
|
|
116
|
+
files?: Array<SkillFile> | null;
|
|
117
117
|
/**
|
|
118
118
|
* Whether the working copy differs from the active published version. Always present (incl. list responses) so the UI can flag a skill with an unpublished draft.
|
|
119
119
|
* @type {boolean}
|
|
@@ -215,8 +215,8 @@ export function SkillResponseFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
215
215
|
'name': json['name'],
|
|
216
216
|
'description': json['description'],
|
|
217
217
|
'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
|
|
218
|
-
'
|
|
219
|
-
'
|
|
218
|
+
'filePaths': json['file_paths'] == null ? undefined : json['file_paths'],
|
|
219
|
+
'files': json['files'] == null ? undefined : ((json['files'] as Array<any>).map(SkillFileFromJSON)),
|
|
220
220
|
'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
|
|
221
221
|
'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
|
|
222
222
|
'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
|
|
@@ -246,8 +246,8 @@ export function SkillResponseToJSONTyped(value?: SkillResponse | null, ignoreDis
|
|
|
246
246
|
'name': value['name'],
|
|
247
247
|
'description': value['description'],
|
|
248
248
|
'skill_md': value['skillMd'],
|
|
249
|
-
'
|
|
250
|
-
'
|
|
249
|
+
'file_paths': value['filePaths'],
|
|
250
|
+
'files': value['files'] == null ? undefined : ((value['files'] as Array<any>).map(SkillFileToJSON)),
|
|
251
251
|
'has_unpublished_changes': value['hasUnpublishedChanges'],
|
|
252
252
|
'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
|
|
253
253
|
'owner': UserInfoToJSON(value['owner']),
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { SkillFile } from './SkillFile';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
SkillFileFromJSON,
|
|
19
|
+
SkillFileFromJSONTyped,
|
|
20
|
+
SkillFileToJSON,
|
|
21
|
+
SkillFileToJSONTyped,
|
|
22
|
+
} from './SkillFile';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Edit working-copy files in place (does NOT cut a version).
|
|
@@ -34,11 +34,11 @@ export interface UpdateSkillRequest {
|
|
|
34
34
|
*/
|
|
35
35
|
skillMd?: string | null;
|
|
36
36
|
/**
|
|
37
|
-
* Replace the
|
|
38
|
-
* @type {Array<
|
|
37
|
+
* Replace the whole bundle below SKILL.md (add/overwrite/remove to match); null leaves the tree unchanged, [] removes every file.
|
|
38
|
+
* @type {Array<SkillFile>}
|
|
39
39
|
* @memberof UpdateSkillRequest
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
files?: Array<SkillFile> | null;
|
|
42
42
|
}
|
|
43
43
|
export const UpdateSkillRequestPropertyValidationAttributesMap: {
|
|
44
44
|
[property: string]: {
|
|
@@ -55,8 +55,8 @@ export const UpdateSkillRequestPropertyValidationAttributesMap: {
|
|
|
55
55
|
uniqueItems?: boolean
|
|
56
56
|
}
|
|
57
57
|
} = {
|
|
58
|
-
|
|
59
|
-
maxItems:
|
|
58
|
+
files: {
|
|
59
|
+
maxItems: 2000,
|
|
60
60
|
uniqueItems: false,
|
|
61
61
|
},
|
|
62
62
|
}
|
|
@@ -80,7 +80,7 @@ export function UpdateSkillRequestFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
80
80
|
return {
|
|
81
81
|
|
|
82
82
|
'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
|
|
83
|
-
'
|
|
83
|
+
'files': json['files'] == null ? undefined : ((json['files'] as Array<any>).map(SkillFileFromJSON)),
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -96,7 +96,7 @@ export function UpdateSkillRequestToJSONTyped(value?: UpdateSkillRequest | null,
|
|
|
96
96
|
return {
|
|
97
97
|
|
|
98
98
|
'skill_md': value['skillMd'],
|
|
99
|
-
'
|
|
99
|
+
'files': value['files'] == null ? undefined : ((value['files'] as Array<any>).map(SkillFileToJSON)),
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
|
package/src/models/index.ts
CHANGED
|
@@ -257,9 +257,9 @@ export * from './SetApprovalStateRequest';
|
|
|
257
257
|
export * from './SetWorkflowRunApprovalRequest';
|
|
258
258
|
export * from './SheetVisibilityChange';
|
|
259
259
|
export * from './SignInRequest';
|
|
260
|
+
export * from './SkillFile';
|
|
260
261
|
export * from './SkillOrder';
|
|
261
262
|
export * from './SkillResponse';
|
|
262
|
-
export * from './SkillScriptFile';
|
|
263
263
|
export * from './SkillSearchResult';
|
|
264
264
|
export * from './SkillVersionResponse';
|
|
265
265
|
export * from './SortDirection';
|