@knowledge-stack/ksapi 1.144.0 → 1.145.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.
- 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
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { SkillFile } from './SkillFile';
|
|
13
13
|
/**
|
|
14
14
|
* Author a skill from a SKILL.md bundle.
|
|
15
15
|
* @export
|
|
@@ -29,11 +29,11 @@ export interface CreateSkillRequest {
|
|
|
29
29
|
*/
|
|
30
30
|
skillMd: string;
|
|
31
31
|
/**
|
|
32
|
-
* Optional
|
|
33
|
-
* @type {Array<
|
|
32
|
+
* Optional bundle files at paths relative to the skill root (scripts/, references/, assets/, …). SKILL.md is supplied separately and must not be repeated here.
|
|
33
|
+
* @type {Array<SkillFile>}
|
|
34
34
|
* @memberof CreateSkillRequest
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
files?: Array<SkillFile>;
|
|
37
37
|
}
|
|
38
38
|
export declare const CreateSkillRequestPropertyValidationAttributesMap: {
|
|
39
39
|
[property: string]: {
|
|
@@ -19,13 +19,13 @@ exports.CreateSkillRequestFromJSON = CreateSkillRequestFromJSON;
|
|
|
19
19
|
exports.CreateSkillRequestFromJSONTyped = CreateSkillRequestFromJSONTyped;
|
|
20
20
|
exports.CreateSkillRequestToJSON = CreateSkillRequestToJSON;
|
|
21
21
|
exports.CreateSkillRequestToJSONTyped = CreateSkillRequestToJSONTyped;
|
|
22
|
-
const
|
|
22
|
+
const SkillFile_1 = require("./SkillFile");
|
|
23
23
|
exports.CreateSkillRequestPropertyValidationAttributesMap = {
|
|
24
24
|
name: {
|
|
25
25
|
maxLength: 255,
|
|
26
26
|
},
|
|
27
|
-
|
|
28
|
-
maxItems:
|
|
27
|
+
files: {
|
|
28
|
+
maxItems: 2000,
|
|
29
29
|
uniqueItems: false,
|
|
30
30
|
},
|
|
31
31
|
};
|
|
@@ -49,7 +49,7 @@ function CreateSkillRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
49
49
|
return {
|
|
50
50
|
'name': json['name'],
|
|
51
51
|
'skillMd': json['skill_md'],
|
|
52
|
-
'
|
|
52
|
+
'files': json['files'] == null ? undefined : (json['files'].map(SkillFile_1.SkillFileFromJSON)),
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
function CreateSkillRequestToJSON(json) {
|
|
@@ -62,6 +62,6 @@ function CreateSkillRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
62
62
|
return {
|
|
63
63
|
'name': value['name'],
|
|
64
64
|
'skill_md': value['skillMd'],
|
|
65
|
-
'
|
|
65
|
+
'files': value['files'] == null ? undefined : (value['files'].map(SkillFile_1.SkillFileToJSON)),
|
|
66
66
|
};
|
|
67
67
|
}
|
|
@@ -10,25 +10,43 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* One file in a skill bundle, at a path relative to the skill root.
|
|
14
|
+
*
|
|
15
|
+
* Skills carry arbitrary trees (``scripts/office/validate.py``,
|
|
16
|
+
* ``references/guide.md``, ``assets/logo.png``), so binary files are carried
|
|
17
|
+
* base64-encoded rather than excluded.
|
|
14
18
|
* @export
|
|
15
|
-
* @interface
|
|
19
|
+
* @interface SkillFile
|
|
16
20
|
*/
|
|
17
|
-
export interface
|
|
21
|
+
export interface SkillFile {
|
|
18
22
|
/**
|
|
19
|
-
*
|
|
23
|
+
* Path relative to the skill root, e.g. scripts/office/run.py
|
|
20
24
|
* @type {string}
|
|
21
|
-
* @memberof
|
|
25
|
+
* @memberof SkillFile
|
|
22
26
|
*/
|
|
23
|
-
|
|
27
|
+
path: string;
|
|
24
28
|
/**
|
|
25
|
-
*
|
|
29
|
+
* UTF-8 text, or base64-encoded bytes when encoding=base64.
|
|
26
30
|
* @type {string}
|
|
27
|
-
* @memberof
|
|
31
|
+
* @memberof SkillFile
|
|
28
32
|
*/
|
|
29
33
|
content: string;
|
|
34
|
+
/**
|
|
35
|
+
* How `content` is encoded.
|
|
36
|
+
* @type {SkillFileEncodingEnum}
|
|
37
|
+
* @memberof SkillFile
|
|
38
|
+
*/
|
|
39
|
+
encoding?: SkillFileEncodingEnum;
|
|
30
40
|
}
|
|
31
|
-
|
|
41
|
+
/**
|
|
42
|
+
* @export
|
|
43
|
+
*/
|
|
44
|
+
export declare const SkillFileEncodingEnum: {
|
|
45
|
+
readonly Utf8: 'utf-8';
|
|
46
|
+
readonly Base64: 'base64';
|
|
47
|
+
};
|
|
48
|
+
export type SkillFileEncodingEnum = typeof SkillFileEncodingEnum[keyof typeof SkillFileEncodingEnum];
|
|
49
|
+
export declare const SkillFilePropertyValidationAttributesMap: {
|
|
32
50
|
[property: string]: {
|
|
33
51
|
maxLength?: number;
|
|
34
52
|
minLength?: number;
|
|
@@ -44,10 +62,10 @@ export declare const SkillScriptFilePropertyValidationAttributesMap: {
|
|
|
44
62
|
};
|
|
45
63
|
};
|
|
46
64
|
/**
|
|
47
|
-
* Check if a given object implements the
|
|
65
|
+
* Check if a given object implements the SkillFile interface.
|
|
48
66
|
*/
|
|
49
|
-
export declare function
|
|
50
|
-
export declare function
|
|
51
|
-
export declare function
|
|
52
|
-
export declare function
|
|
53
|
-
export declare function
|
|
67
|
+
export declare function instanceOfSkillFile(value: object): value is SkillFile;
|
|
68
|
+
export declare function SkillFileFromJSON(json: any): SkillFile;
|
|
69
|
+
export declare function SkillFileFromJSONTyped(json: any, ignoreDiscriminator: boolean): SkillFile;
|
|
70
|
+
export declare function SkillFileToJSON(json: any): SkillFile;
|
|
71
|
+
export declare function SkillFileToJSONTyped(value?: SkillFile | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -13,48 +13,57 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
exports.SkillFilePropertyValidationAttributesMap = exports.SkillFileEncodingEnum = void 0;
|
|
17
|
+
exports.instanceOfSkillFile = instanceOfSkillFile;
|
|
18
|
+
exports.SkillFileFromJSON = SkillFileFromJSON;
|
|
19
|
+
exports.SkillFileFromJSONTyped = SkillFileFromJSONTyped;
|
|
20
|
+
exports.SkillFileToJSON = SkillFileToJSON;
|
|
21
|
+
exports.SkillFileToJSONTyped = SkillFileToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.SkillFileEncodingEnum = {
|
|
26
|
+
Utf8: 'utf-8',
|
|
27
|
+
Base64: 'base64'
|
|
28
|
+
};
|
|
29
|
+
exports.SkillFilePropertyValidationAttributesMap = {
|
|
30
|
+
path: {
|
|
31
|
+
maxLength: 1024,
|
|
25
32
|
},
|
|
26
33
|
};
|
|
27
34
|
/**
|
|
28
|
-
* Check if a given object implements the
|
|
35
|
+
* Check if a given object implements the SkillFile interface.
|
|
29
36
|
*/
|
|
30
|
-
function
|
|
31
|
-
if (!('
|
|
37
|
+
function instanceOfSkillFile(value) {
|
|
38
|
+
if (!('path' in value) || value['path'] === undefined)
|
|
32
39
|
return false;
|
|
33
40
|
if (!('content' in value) || value['content'] === undefined)
|
|
34
41
|
return false;
|
|
35
42
|
return true;
|
|
36
43
|
}
|
|
37
|
-
function
|
|
38
|
-
return
|
|
44
|
+
function SkillFileFromJSON(json) {
|
|
45
|
+
return SkillFileFromJSONTyped(json, false);
|
|
39
46
|
}
|
|
40
|
-
function
|
|
47
|
+
function SkillFileFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
48
|
if (json == null) {
|
|
42
49
|
return json;
|
|
43
50
|
}
|
|
44
51
|
return {
|
|
45
|
-
'
|
|
52
|
+
'path': json['path'],
|
|
46
53
|
'content': json['content'],
|
|
54
|
+
'encoding': json['encoding'] == null ? undefined : json['encoding'],
|
|
47
55
|
};
|
|
48
56
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
57
|
+
function SkillFileToJSON(json) {
|
|
58
|
+
return SkillFileToJSONTyped(json, false);
|
|
51
59
|
}
|
|
52
|
-
function
|
|
60
|
+
function SkillFileToJSONTyped(value, ignoreDiscriminator = false) {
|
|
53
61
|
if (value == null) {
|
|
54
62
|
return value;
|
|
55
63
|
}
|
|
56
64
|
return {
|
|
57
|
-
'
|
|
65
|
+
'path': value['path'],
|
|
58
66
|
'content': value['content'],
|
|
67
|
+
'encoding': value['encoding'],
|
|
59
68
|
};
|
|
60
69
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ItemPermissions } from './ItemPermissions';
|
|
13
|
-
import type {
|
|
13
|
+
import type { SkillFile } from './SkillFile';
|
|
14
14
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
15
15
|
import type { UserInfo } from './UserInfo';
|
|
16
16
|
/**
|
|
@@ -74,17 +74,17 @@ export interface SkillResponse {
|
|
|
74
74
|
*/
|
|
75
75
|
skillMd?: string | null;
|
|
76
76
|
/**
|
|
77
|
-
*
|
|
77
|
+
* Bundle file paths relative to the skill root (SKILL.md excluded); populated on the detail read and on mutation responses, empty on list.
|
|
78
78
|
* @type {Array<string>}
|
|
79
79
|
* @memberof SkillResponse
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
filePaths?: Array<string>;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
84
|
-
* @type {Array<
|
|
83
|
+
* 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.
|
|
84
|
+
* @type {Array<SkillFile>}
|
|
85
85
|
* @memberof SkillResponse
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
files?: Array<SkillFile> | null;
|
|
88
88
|
/**
|
|
89
89
|
* 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.
|
|
90
90
|
* @type {boolean}
|
|
@@ -20,7 +20,7 @@ exports.SkillResponseFromJSONTyped = SkillResponseFromJSONTyped;
|
|
|
20
20
|
exports.SkillResponseToJSON = SkillResponseToJSON;
|
|
21
21
|
exports.SkillResponseToJSONTyped = SkillResponseToJSONTyped;
|
|
22
22
|
const ItemPermissions_1 = require("./ItemPermissions");
|
|
23
|
-
const
|
|
23
|
+
const SkillFile_1 = require("./SkillFile");
|
|
24
24
|
const PathPartApprovalState_1 = require("./PathPartApprovalState");
|
|
25
25
|
const UserInfo_1 = require("./UserInfo");
|
|
26
26
|
/**
|
|
@@ -73,8 +73,8 @@ function SkillResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
73
73
|
'name': json['name'],
|
|
74
74
|
'description': json['description'],
|
|
75
75
|
'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
|
|
76
|
-
'
|
|
77
|
-
'
|
|
76
|
+
'filePaths': json['file_paths'] == null ? undefined : json['file_paths'],
|
|
77
|
+
'files': json['files'] == null ? undefined : (json['files'].map(SkillFile_1.SkillFileFromJSON)),
|
|
78
78
|
'hasUnpublishedChanges': json['has_unpublished_changes'] == null ? undefined : json['has_unpublished_changes'],
|
|
79
79
|
'approvalState': (0, PathPartApprovalState_1.PathPartApprovalStateFromJSON)(json['approval_state']),
|
|
80
80
|
'owner': json['owner'] == null ? undefined : (0, UserInfo_1.UserInfoFromJSON)(json['owner']),
|
|
@@ -100,8 +100,8 @@ function SkillResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
100
100
|
'name': value['name'],
|
|
101
101
|
'description': value['description'],
|
|
102
102
|
'skill_md': value['skillMd'],
|
|
103
|
-
'
|
|
104
|
-
'
|
|
103
|
+
'file_paths': value['filePaths'],
|
|
104
|
+
'files': value['files'] == null ? undefined : (value['files'].map(SkillFile_1.SkillFileToJSON)),
|
|
105
105
|
'has_unpublished_changes': value['hasUnpublishedChanges'],
|
|
106
106
|
'approval_state': (0, PathPartApprovalState_1.PathPartApprovalStateToJSON)(value['approvalState']),
|
|
107
107
|
'owner': (0, UserInfo_1.UserInfoToJSON)(value['owner']),
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { SkillFile } from './SkillFile';
|
|
13
13
|
/**
|
|
14
14
|
* Edit working-copy files in place (does NOT cut a version).
|
|
15
15
|
* @export
|
|
@@ -23,11 +23,11 @@ export interface UpdateSkillRequest {
|
|
|
23
23
|
*/
|
|
24
24
|
skillMd?: string | null;
|
|
25
25
|
/**
|
|
26
|
-
* Replace the
|
|
27
|
-
* @type {Array<
|
|
26
|
+
* Replace the whole bundle below SKILL.md (add/overwrite/remove to match); null leaves the tree unchanged, [] removes every file.
|
|
27
|
+
* @type {Array<SkillFile>}
|
|
28
28
|
* @memberof UpdateSkillRequest
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
files?: Array<SkillFile> | null;
|
|
31
31
|
}
|
|
32
32
|
export declare const UpdateSkillRequestPropertyValidationAttributesMap: {
|
|
33
33
|
[property: string]: {
|
|
@@ -19,10 +19,10 @@ exports.UpdateSkillRequestFromJSON = UpdateSkillRequestFromJSON;
|
|
|
19
19
|
exports.UpdateSkillRequestFromJSONTyped = UpdateSkillRequestFromJSONTyped;
|
|
20
20
|
exports.UpdateSkillRequestToJSON = UpdateSkillRequestToJSON;
|
|
21
21
|
exports.UpdateSkillRequestToJSONTyped = UpdateSkillRequestToJSONTyped;
|
|
22
|
-
const
|
|
22
|
+
const SkillFile_1 = require("./SkillFile");
|
|
23
23
|
exports.UpdateSkillRequestPropertyValidationAttributesMap = {
|
|
24
|
-
|
|
25
|
-
maxItems:
|
|
24
|
+
files: {
|
|
25
|
+
maxItems: 2000,
|
|
26
26
|
uniqueItems: false,
|
|
27
27
|
},
|
|
28
28
|
};
|
|
@@ -41,7 +41,7 @@ function UpdateSkillRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
41
|
}
|
|
42
42
|
return {
|
|
43
43
|
'skillMd': json['skill_md'] == null ? undefined : json['skill_md'],
|
|
44
|
-
'
|
|
44
|
+
'files': json['files'] == null ? undefined : (json['files'].map(SkillFile_1.SkillFileFromJSON)),
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
47
|
function UpdateSkillRequestToJSON(json) {
|
|
@@ -53,6 +53,6 @@ function UpdateSkillRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
53
53
|
}
|
|
54
54
|
return {
|
|
55
55
|
'skill_md': value['skillMd'],
|
|
56
|
-
'
|
|
56
|
+
'files': value['files'] == null ? undefined : (value['files'].map(SkillFile_1.SkillFileToJSON)),
|
|
57
57
|
};
|
|
58
58
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -255,9 +255,9 @@ export * from './SetApprovalStateRequest';
|
|
|
255
255
|
export * from './SetWorkflowRunApprovalRequest';
|
|
256
256
|
export * from './SheetVisibilityChange';
|
|
257
257
|
export * from './SignInRequest';
|
|
258
|
+
export * from './SkillFile';
|
|
258
259
|
export * from './SkillOrder';
|
|
259
260
|
export * from './SkillResponse';
|
|
260
|
-
export * from './SkillScriptFile';
|
|
261
261
|
export * from './SkillSearchResult';
|
|
262
262
|
export * from './SkillVersionResponse';
|
|
263
263
|
export * from './SortDirection';
|
package/dist/models/index.js
CHANGED
|
@@ -273,9 +273,9 @@ __exportStar(require("./SetApprovalStateRequest"), exports);
|
|
|
273
273
|
__exportStar(require("./SetWorkflowRunApprovalRequest"), exports);
|
|
274
274
|
__exportStar(require("./SheetVisibilityChange"), exports);
|
|
275
275
|
__exportStar(require("./SignInRequest"), exports);
|
|
276
|
+
__exportStar(require("./SkillFile"), exports);
|
|
276
277
|
__exportStar(require("./SkillOrder"), exports);
|
|
277
278
|
__exportStar(require("./SkillResponse"), exports);
|
|
278
|
-
__exportStar(require("./SkillScriptFile"), exports);
|
|
279
279
|
__exportStar(require("./SkillSearchResult"), exports);
|
|
280
280
|
__exportStar(require("./SkillVersionResponse"), exports);
|
|
281
281
|
__exportStar(require("./SortDirection"), exports);
|
|
@@ -9,7 +9,7 @@ Name | Type
|
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`name` | string
|
|
11
11
|
`skillMd` | string
|
|
12
|
-
`
|
|
12
|
+
`files` | [Array<SkillFile>](SkillFile.md)
|
|
13
13
|
|
|
14
14
|
## Example
|
|
15
15
|
|
|
@@ -20,7 +20,7 @@ import type { CreateSkillRequest } from '@knowledge-stack/ksapi'
|
|
|
20
20
|
const example = {
|
|
21
21
|
"name": null,
|
|
22
22
|
"skillMd": null,
|
|
23
|
-
"
|
|
23
|
+
"files": null,
|
|
24
24
|
} satisfies CreateSkillRequest
|
|
25
25
|
|
|
26
26
|
console.log(example)
|
|
@@ -65,8 +65,8 @@ Name | Type
|
|
|
65
65
|
`disclaimerAcceptedAt` | Date
|
|
66
66
|
`disclaimerAcceptedBy` | string
|
|
67
67
|
`skillMd` | string
|
|
68
|
-
`
|
|
69
|
-
`
|
|
68
|
+
`filePaths` | Array<string>
|
|
69
|
+
`files` | [Array<SkillFile>](SkillFile.md)
|
|
70
70
|
`hasUnpublishedChanges` | boolean
|
|
71
71
|
|
|
72
72
|
## Example
|
|
@@ -135,8 +135,8 @@ const example = {
|
|
|
135
135
|
"disclaimerAcceptedAt": null,
|
|
136
136
|
"disclaimerAcceptedBy": null,
|
|
137
137
|
"skillMd": null,
|
|
138
|
-
"
|
|
139
|
-
"
|
|
138
|
+
"filePaths": null,
|
|
139
|
+
"files": null,
|
|
140
140
|
"hasUnpublishedChanges": null,
|
|
141
141
|
} satisfies FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR
|
|
142
142
|
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
|
|
2
|
-
#
|
|
2
|
+
# SkillFile
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
One file in a skill bundle, at a path relative to the skill root. Skills carry arbitrary trees (``scripts/office/validate.py``, ``references/guide.md``, ``assets/logo.png``), so binary files are carried base64-encoded rather than excluded.
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
|
-
`
|
|
10
|
+
`path` | string
|
|
11
11
|
`content` | string
|
|
12
|
+
`encoding` | string
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
15
16
|
```typescript
|
|
16
|
-
import type {
|
|
17
|
+
import type { SkillFile } from '@knowledge-stack/ksapi'
|
|
17
18
|
|
|
18
19
|
// TODO: Update the object below with actual values
|
|
19
20
|
const example = {
|
|
20
|
-
"
|
|
21
|
+
"path": null,
|
|
21
22
|
"content": null,
|
|
22
|
-
|
|
23
|
+
"encoding": null,
|
|
24
|
+
} satisfies SkillFile
|
|
23
25
|
|
|
24
26
|
console.log(example)
|
|
25
27
|
|
|
@@ -28,7 +30,7 @@ const exampleJSON: string = JSON.stringify(example)
|
|
|
28
30
|
console.log(exampleJSON)
|
|
29
31
|
|
|
30
32
|
// Parse the JSON string back to an object
|
|
31
|
-
const exampleParsed = JSON.parse(exampleJSON) as
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as SkillFile
|
|
32
34
|
console.log(exampleParsed)
|
|
33
35
|
```
|
|
34
36
|
|
package/docs/SkillResponse.md
CHANGED
|
@@ -16,8 +16,8 @@ Name | Type
|
|
|
16
16
|
`name` | string
|
|
17
17
|
`description` | string
|
|
18
18
|
`skillMd` | string
|
|
19
|
-
`
|
|
20
|
-
`
|
|
19
|
+
`filePaths` | Array<string>
|
|
20
|
+
`files` | [Array<SkillFile>](SkillFile.md)
|
|
21
21
|
`hasUnpublishedChanges` | boolean
|
|
22
22
|
`approvalState` | [PathPartApprovalState](PathPartApprovalState.md)
|
|
23
23
|
`owner` | [UserInfo](UserInfo.md)
|
|
@@ -41,8 +41,8 @@ const example = {
|
|
|
41
41
|
"name": null,
|
|
42
42
|
"description": null,
|
|
43
43
|
"skillMd": null,
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"filePaths": null,
|
|
45
|
+
"files": null,
|
|
46
46
|
"hasUnpublishedChanges": null,
|
|
47
47
|
"approvalState": null,
|
|
48
48
|
"owner": null,
|
package/docs/SkillsApi.md
CHANGED
|
@@ -554,11 +554,11 @@ example().catch(console.error);
|
|
|
554
554
|
|
|
555
555
|
## getSkill
|
|
556
556
|
|
|
557
|
-
> SkillResponse getSkill(skillId)
|
|
557
|
+
> SkillResponse getSkill(skillId, includeFileContents)
|
|
558
558
|
|
|
559
559
|
Get Skill Handler
|
|
560
560
|
|
|
561
|
-
Skill detail: SKILL.md,
|
|
561
|
+
Skill detail: SKILL.md, file paths (+ contents on request), perms.
|
|
562
562
|
|
|
563
563
|
### Example
|
|
564
564
|
|
|
@@ -582,6 +582,8 @@ async function example() {
|
|
|
582
582
|
const body = {
|
|
583
583
|
// string
|
|
584
584
|
skillId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
585
|
+
// boolean | Include every bundle file\'s contents (base64 for binary). Off by default — the editor opts in; a large skill\'s contents can be many MB and one S3 read per file. (optional)
|
|
586
|
+
includeFileContents: true,
|
|
585
587
|
} satisfies GetSkillRequest;
|
|
586
588
|
|
|
587
589
|
try {
|
|
@@ -602,6 +604,7 @@ example().catch(console.error);
|
|
|
602
604
|
| Name | Type | Description | Notes |
|
|
603
605
|
|------------- | ------------- | ------------- | -------------|
|
|
604
606
|
| **skillId** | `string` | | [Defaults to `undefined`] |
|
|
607
|
+
| **includeFileContents** | `boolean` | Include every bundle file\'s contents (base64 for binary). Off by default — the editor opts in; a large skill\'s contents can be many MB and one S3 read per file. | [Optional] [Defaults to `false`] |
|
|
605
608
|
|
|
606
609
|
### Return type
|
|
607
610
|
|
|
@@ -633,7 +636,7 @@ example().catch(console.error);
|
|
|
633
636
|
|
|
634
637
|
Import Skill Handler
|
|
635
638
|
|
|
636
|
-
Create a skill
|
|
639
|
+
Create a skill from an uploaded ZIP or tarball (works across tenants).
|
|
637
640
|
|
|
638
641
|
### Example
|
|
639
642
|
|
|
@@ -8,7 +8,7 @@ Edit working-copy files in place (does NOT cut a version).
|
|
|
8
8
|
Name | Type
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`skillMd` | string
|
|
11
|
-
`
|
|
11
|
+
`files` | [Array<SkillFile>](SkillFile.md)
|
|
12
12
|
|
|
13
13
|
## Example
|
|
14
14
|
|
|
@@ -18,7 +18,7 @@ import type { UpdateSkillRequest } from '@knowledge-stack/ksapi'
|
|
|
18
18
|
// TODO: Update the object below with actual values
|
|
19
19
|
const example = {
|
|
20
20
|
"skillMd": null,
|
|
21
|
-
"
|
|
21
|
+
"files": null,
|
|
22
22
|
} satisfies UpdateSkillRequest
|
|
23
23
|
|
|
24
24
|
console.log(example)
|
package/package.json
CHANGED
package/src/apis/SkillsApi.ts
CHANGED
|
@@ -87,6 +87,7 @@ export interface ExportSkillRequest {
|
|
|
87
87
|
|
|
88
88
|
export interface GetSkillRequest {
|
|
89
89
|
skillId: string;
|
|
90
|
+
includeFileContents?: boolean;
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
export interface ImportSkillRequest {
|
|
@@ -300,15 +301,17 @@ export interface SkillsApiInterface {
|
|
|
300
301
|
/**
|
|
301
302
|
* Creates request options for getSkill without sending the request
|
|
302
303
|
* @param {string} skillId
|
|
304
|
+
* @param {boolean} [includeFileContents] Include every bundle file\'s contents (base64 for binary). Off by default — the editor opts in; a large skill\'s contents can be many MB and one S3 read per file.
|
|
303
305
|
* @throws {RequiredError}
|
|
304
306
|
* @memberof SkillsApiInterface
|
|
305
307
|
*/
|
|
306
308
|
getSkillRequestOpts(requestParameters: GetSkillRequest): Promise<runtime.RequestOpts>;
|
|
307
309
|
|
|
308
310
|
/**
|
|
309
|
-
* Skill detail: SKILL.md,
|
|
311
|
+
* Skill detail: SKILL.md, file paths (+ contents on request), perms.
|
|
310
312
|
* @summary Get Skill Handler
|
|
311
313
|
* @param {string} skillId
|
|
314
|
+
* @param {boolean} [includeFileContents] Include every bundle file\'s contents (base64 for binary). Off by default — the editor opts in; a large skill\'s contents can be many MB and one S3 read per file.
|
|
312
315
|
* @param {*} [options] Override http request option.
|
|
313
316
|
* @throws {RequiredError}
|
|
314
317
|
* @memberof SkillsApiInterface
|
|
@@ -316,7 +319,7 @@ export interface SkillsApiInterface {
|
|
|
316
319
|
getSkillRaw(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillResponse>>;
|
|
317
320
|
|
|
318
321
|
/**
|
|
319
|
-
* Skill detail: SKILL.md,
|
|
322
|
+
* Skill detail: SKILL.md, file paths (+ contents on request), perms.
|
|
320
323
|
* Get Skill Handler
|
|
321
324
|
*/
|
|
322
325
|
getSkill(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillResponse>;
|
|
@@ -330,7 +333,7 @@ export interface SkillsApiInterface {
|
|
|
330
333
|
importSkillRequestOpts(requestParameters: ImportSkillRequest): Promise<runtime.RequestOpts>;
|
|
331
334
|
|
|
332
335
|
/**
|
|
333
|
-
* Create a skill
|
|
336
|
+
* Create a skill from an uploaded ZIP or tarball (works across tenants).
|
|
334
337
|
* @summary Import Skill Handler
|
|
335
338
|
* @param {Blob} file
|
|
336
339
|
* @param {*} [options] Override http request option.
|
|
@@ -340,7 +343,7 @@ export interface SkillsApiInterface {
|
|
|
340
343
|
importSkillRaw(requestParameters: ImportSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillResponse>>;
|
|
341
344
|
|
|
342
345
|
/**
|
|
343
|
-
* Create a skill
|
|
346
|
+
* Create a skill from an uploaded ZIP or tarball (works across tenants).
|
|
344
347
|
* Import Skill Handler
|
|
345
348
|
*/
|
|
346
349
|
importSkill(requestParameters: ImportSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillResponse>;
|
|
@@ -902,6 +905,10 @@ export class SkillsApi extends runtime.BaseAPI implements SkillsApiInterface {
|
|
|
902
905
|
|
|
903
906
|
const queryParameters: any = {};
|
|
904
907
|
|
|
908
|
+
if (requestParameters['includeFileContents'] != null) {
|
|
909
|
+
queryParameters['include_file_contents'] = requestParameters['includeFileContents'];
|
|
910
|
+
}
|
|
911
|
+
|
|
905
912
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
906
913
|
|
|
907
914
|
if (this.configuration && this.configuration.accessToken) {
|
|
@@ -925,7 +932,7 @@ export class SkillsApi extends runtime.BaseAPI implements SkillsApiInterface {
|
|
|
925
932
|
}
|
|
926
933
|
|
|
927
934
|
/**
|
|
928
|
-
* Skill detail: SKILL.md,
|
|
935
|
+
* Skill detail: SKILL.md, file paths (+ contents on request), perms.
|
|
929
936
|
* Get Skill Handler
|
|
930
937
|
*/
|
|
931
938
|
async getSkillRaw(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillResponse>> {
|
|
@@ -936,7 +943,7 @@ export class SkillsApi extends runtime.BaseAPI implements SkillsApiInterface {
|
|
|
936
943
|
}
|
|
937
944
|
|
|
938
945
|
/**
|
|
939
|
-
* Skill detail: SKILL.md,
|
|
946
|
+
* Skill detail: SKILL.md, file paths (+ contents on request), perms.
|
|
940
947
|
* Get Skill Handler
|
|
941
948
|
*/
|
|
942
949
|
async getSkill(requestParameters: GetSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillResponse> {
|
|
@@ -1000,7 +1007,7 @@ export class SkillsApi extends runtime.BaseAPI implements SkillsApiInterface {
|
|
|
1000
1007
|
}
|
|
1001
1008
|
|
|
1002
1009
|
/**
|
|
1003
|
-
* Create a skill
|
|
1010
|
+
* Create a skill from an uploaded ZIP or tarball (works across tenants).
|
|
1004
1011
|
* Import Skill Handler
|
|
1005
1012
|
*/
|
|
1006
1013
|
async importSkillRaw(requestParameters: ImportSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SkillResponse>> {
|
|
@@ -1011,7 +1018,7 @@ export class SkillsApi extends runtime.BaseAPI implements SkillsApiInterface {
|
|
|
1011
1018
|
}
|
|
1012
1019
|
|
|
1013
1020
|
/**
|
|
1014
|
-
* Create a skill
|
|
1021
|
+
* Create a skill from an uploaded ZIP or tarball (works across tenants).
|
|
1015
1022
|
* Import Skill Handler
|
|
1016
1023
|
*/
|
|
1017
1024
|
async importSkill(requestParameters: ImportSkillRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SkillResponse> {
|