更新 lib/api.js
This commit is contained in:
parent
318b4a0254
commit
d998236583
16
lib/api.js
16
lib/api.js
|
|
@ -195,6 +195,22 @@ export class CloudClient {
|
|||
storageStatus() {
|
||||
return this.request('GET', '/storage/status');
|
||||
}
|
||||
/** List the cloud skill center inventory (memory token). */
|
||||
listSkills() {
|
||||
return this.request('GET', '/skills');
|
||||
}
|
||||
/** Fetch one skill bundle with hashed, base64-carried files (memory token). */
|
||||
skillBundle(name) {
|
||||
return this.request('GET', `/skills/${encodeURIComponent(name)}/bundle`);
|
||||
}
|
||||
/** Create one skill in the center; `expected_revision` must be 0 (memory token). */
|
||||
createSkill(body) {
|
||||
return this.request('POST', '/skills', body);
|
||||
}
|
||||
/** Replace one skill's files/description at an expected revision (memory token). */
|
||||
updateSkill(name, body) {
|
||||
return this.request('PATCH', `/skills/${encodeURIComponent(name)}`, body);
|
||||
}
|
||||
/**
|
||||
* One call against the dashboard auth surface (`/api/auth/*`).
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue