@alphayard/appkit
v1.4.1
Published
Reusable AppKit SDK client for Boundary and UniApps services
Readme
@alphayard/appkit
Reusable AppKit SDK client for mobile apps, web apps, and service-to-service integrations.
Features
- auth token storage helpers
- branding and Color Studio config helpers
- localization helpers
- identity endpoints
- CMS collection helpers
- file storage helpers
- communication helpers for email and SMS
- AI Studio helpers for published apps, flows, and agents
Install
npm install @alphayard/appkitUsage
import { AppKit } from '@alphayard/appkit';
const client = new AppKit({
clientId: 'client-id',
domain: 'https://your-appkit-domain.com',
baseURL: 'https://your-appkit-domain.com',
storage: 'memory',
});AI Studio
const { aiConfig, apps } = await client.ai.list();
const events = await client.ai.runFlow({
flowId: 'flow-id',
inputVariables: { message: 'Summarize my account' },
});
for await (const event of events) {
console.log(event.data);
}Color Studio
const colorConfig = await client.getColorStudioConfig();
const updated = await client.updateColorStudioConfig({
...colorConfig.branding,
tokens: {
...colorConfig.branding.tokens,
activeColorThemeId: 'core-theme',
},
});
console.log(updated.colorStudio.activeTheme);await client.updateColorStudioVariable({
key: 'chat.accent',
value: '#06B6D4',
});
await client.updateColorStudioGroup({
groupId: 'chat',
group: { name: 'Chat', description: 'Conversation colors.' },
});
await client.setActiveColorTheme({ themeId: 'core-theme', makeDefault: true });
await client.duplicateColorTheme({ themeId: 'core-theme', name: 'Spring Theme' });Color Studio writes go through the admin application API, so the SDK must be configured with appId and an admin-capable authenticated context.
