@suiyongsuiqi/sysq-sdk
v0.1.0
Published
Official TypeScript SDK for SYSQ mailbox automation.
Downloads
139
Readme
@suiyongsuiqi/sysq-sdk
Official TypeScript SDK for SYSQ mailbox automation.
Install
Install from npm:
npm i @suiyongsuiqi/sysq-sdkBuild from source:
git clone https://github.com/suiyongsuiqi/sysq-sdk.git
cd sysq-sdk
pnpm install
pnpm buildThis package is being bootstrapped as the shared core for:
sysq-cli- future reusable API access from other internal or public tools
Current Scope
The initial SDK surface focuses on the parts that are safe to share across runtimes:
- HTTP client core
- SYSQ error normalization
- mailbox resource APIs
- API key resource APIs
- shared request/response types
It intentionally does not include:
- React hooks
- browser stores
- Next.js integrations
- UI i18n helpers
Example
import { createSysqSdk } from '@suiyongsuiqi/sysq-sdk';
const sdk = createSysqSdk({
baseUrl: 'https://your-domain.com/api',
apiKey: process.env.SYSQ_API_KEY,
});
const mailboxes = await sdk.mail.fetchUserMailBoxes({ current: 1, size: 20 });
console.log(mailboxes.records);Notes:
- The SDK always sends
Tenant-Id: 000000, which matches the current SYSQ backend contract. - SYSQ server responses are keyed by
errorKey; response localization is handled by clients, not by passing a locale to the backend.
Scripts
pnpm install
pnpm build
pnpm typecheck