@winwinmbs/portal-api
v1.0.0
Published
Business API client for WINWIN Portal (files, email, workflow, user, etc.)
Downloads
19
Readme
@winwinmbs/portal-api
Business API client for WINWIN Portal. Decoupled from authentication — accepts a getToken callback from any auth source.
Install
pnpm add @winwinmbs/portal-apiUsage with @winwinmbs/portal-auth
import { AuthClient } from '@winwinmbs/portal-auth';
import { PortalApiClient } from '@winwinmbs/portal-api';
const auth = new AuthClient({ apiUrl, mode: 'sso', portalUrl, appId });
const api = new PortalApiClient({
apiUrl,
getToken: () => auth.getAccessToken(),
});
await api.files.upload(/* ... */);
await api.workflow.list();Available API modules
email, eventLog, files, health, line, organization, otp, permission, permissionCategory, role, systemConfig, todo, user, webhook, workflow
