openvibe-sdk/quest

Generated at from openvibe-contracts v0.193.1 and openvibe-sdk v0.48.0.

From types/quest.d.ts (server only). Declarations are shown verbatim.

interface AppQuestStep

openvibe-sdk/quest: OpenVibe.Quest for developer apps — quests on your own events (contracts 0.193.0).

export interface AppQuestStep { event_type: string; count: number; label: string }

interface AppQuestRequest

export interface AppQuestRequest {
    title: string;
    why?: string;
    steps: AppQuestStep[];
    badge: { name: string };
    url?: string;
    status?: 'active' | 'retired';
}

interface AppQuest

export interface AppQuest {
    id: string; slug: string; project_id: string; app: string; env: 'sandbox' | 'production';
    title: string; why: string | null; steps: AppQuestStep[]; badge: { id: string; name: string }; url: string | null;
    status: 'active' | 'retired'; created_at: string; updated_at: string; completions: number;
}

interface QuestClient

export interface QuestClient {
    appQuests: {
        define(slug: string, quest: AppQuestRequest, opts?: { signal?: AbortSignal }): Promise<AppQuest>;
        list(opts?: { signal?: AbortSignal }): Promise<{ project_id: string; max: number; quests: AppQuest[] }>;
        retire(slug: string, opts?: { signal?: AbortSignal }): Promise<AppQuest>;
    };
    eventType(projectId: string, name: string): string;
    projectKey(projectId: string): string;
}

export export function createQuestClient(client: { json(opts: Recor

export function createQuestClient(client: { json(opts: Record<string, unknown>): Promise<any> }, options?: { baseUrl?: string }): QuestClient;

export export function eventType(projectId: string, name: string):

export function eventType(projectId: string, name: string): string;

export export function projectKey(projectId: string): string;

export function projectKey(projectId: string): string;