Type-safe SDK generated from TypeSpec / OpenAPI.
⚠️ This package is auto-generated.
Do not edit source files manually.
pnpm add @nycu-sdc/core-system-sdk
# or
npm install @nycu-sdc/core-system-sdk
import { getUsers } from "@nycu-sdc/core-system-sdk";
const users = await getUsers();
All APIs are fully typed based on the OpenAPI schema.
This SDK only provides transport-level functions. You are expected to integrate it with React Query in your app.
import { useQuery } from "@tanstack/react-query";
import { getUsers } from "@nycu-sdc/core-system-sdk";
export function useUsers() {
return useQuery({
queryKey: ["users"],
queryFn: getUsers
});
}
All functions throw on non-OK responses.
try {
await getUsers();
} catch (err) {
// handle error
}
If you need to change API behavior, update the TypeSpec definitions instead.
Versions follow semantic versioning based on API schema changes.
Breaking API changes will result in a major version bump.
Apache-2.0. See LICENSE for details.