SDK Reference
@proveanything/smartlinks
Namespaces
userAppData
Functions for userAppData operations
getConfig
Get user's config blob for an app. This is a single JSON object stored per user+app. typescript const config = await userAppData.getConfig('allergy-tracker'); // Returns: { allergies: ['peanuts'], notifications: true }
getConfig(appId: string) → Promise<any>setConfig
Set user's config blob for an app. typescript await userAppData.setConfig('allergy-tracker', { allergies: ['peanuts', 'shellfish'], notifications: true });
setConfig(appId: string, config: any) → Promise<any>deleteConfig
Delete user's config blob for an app. typescript await userAppData.deleteConfig('allergy-tracker');
deleteConfig(appId: string) → Promise<void>list
List all user's data items for an app. Returns an array of objects, each with an id field. typescript const beds = await userAppData.list('garden-planner'); // Returns: [{ id: 'bed-1', name: 'Vegetables', ... }, { id: 'bed-2', ... }]
list(appId: string) → Promise<any[]>get
Get a specific user data item by ID. typescript const bed = await userAppData.get('garden-planner', 'bed-1'); // Returns: { id: 'bed-1', name: 'Vegetable Bed', plants: [...] }
get(appId: string, itemId: string) → Promise<any>set
Create or update a user data item. The item object must include an id field. typescript await userAppData.set('garden-planner', { id: 'bed-1', name: 'Vegetable Bed', plants: ['tomatoes', 'peppers'], location: { x: 10, y: 20 } });
set(appId: string, item: any) → Promise<any>remove
Delete a user data item by ID. typescript await userAppData.remove('garden-planner', 'bed-1');
remove(appId: string, itemId: string) → Promise<void>