Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- Update 9 @reserved → @connected for commands with frontend consumers: zclaw_status, zclaw_start, zclaw_stop, zclaw_restart, zclaw_doctor, viking_add_with_metadata, viking_store_with_summaries, trigger_execute, scheduled_task_create - Remove 10 dead SaaS client methods with zero callers: healthCheck, listDevices (saas-client.ts) getRelayTask, getUsage/relay (saas-relay.ts) listPrompts, getPrompt, listPromptVersions, getPromptVersion (saas-prompt.ts) getPlan, getUsage/billing (saas-billing.ts) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
741 B
TypeScript
23 lines
741 B
TypeScript
/**
|
|
* SaaS Prompt OTA Methods — Mixin
|
|
*
|
|
* Installs prompt OTA methods onto SaaSClient.prototype.
|
|
* Uses the same mixin pattern as gateway-api.ts.
|
|
*/
|
|
|
|
import type {
|
|
PromptCheckResult,
|
|
} from './saas-types';
|
|
|
|
export function installPromptMethods(ClientClass: { prototype: any }): void {
|
|
const proto = ClientClass.prototype;
|
|
|
|
/** Check for prompt updates (OTA) */
|
|
proto.checkPromptUpdates = async function (this: { request<T>(method: string, path: string, body?: unknown): Promise<T> }, deviceId: string, currentVersions: Record<string, number>): Promise<PromptCheckResult> {
|
|
return this.request<PromptCheckResult>('POST', '/api/v1/prompts/check', {
|
|
device_id: deviceId,
|
|
versions: currentVersions,
|
|
});
|
|
};
|
|
}
|