(
store: SqliteStore,
ctx: PluginContext,
input: { skillId: string; hubAddress?: string; userToken?: string },
)
| 104 | } |
| 105 | |
| 106 | export async function fetchHubSkillBundle( |
| 107 | store: SqliteStore, |
| 108 | ctx: PluginContext, |
| 109 | input: { skillId: string; hubAddress?: string; userToken?: string }, |
| 110 | ): Promise<SkillBundle & { skillId: string }> { |
| 111 | const client = await resolveHubClient(store, ctx, { hubAddress: input.hubAddress, userToken: input.userToken }); |
| 112 | return hubRequestJson(client.hubUrl, client.userToken, `/api/v1/hub/skills/${encodeURIComponent(input.skillId)}/bundle`, { |
| 113 | method: "GET", |
| 114 | }) as Promise<SkillBundle & { skillId: string }>; |
| 115 | } |
| 116 | |
| 117 | export function restoreSkillBundleFromHub( |
| 118 | store: SqliteStore, |
no test coverage detected