@suiteportal/client-runtime
v0.2.3
Published
Prisma-like query and mutation runtime for SuitePortal NetSuite ORM
Maintainers
Readme
@suiteportal/client-runtime
Prisma-like query runtime for NetSuite. Provides findMany, findFirst, count, and raw SuiteQL execution with a fluent, type-safe API.
Install
npm install @suiteportal/client-runtimeUsage
import { createClient } from './.suiteportal/client';
const ns = await createClient(config);
const customers = await ns.customer.findMany({
where: { balance: { gt: 1000 }, isInactive: { equals: false } },
select: { companyName: true, email: true, balance: true },
orderBy: { balance: 'desc' },
take: 50,
});
const order = await ns.salesorder.findFirst({
where: { entity: { equals: 42 } },
});
const total = await ns.customer.count({
where: { isInactive: { equals: false } },
});Features
- Prisma-like
findMany,findFirst,countAPI wherefilters:equals,not,gt,gte,lt,lte,in,contains,startsWithselectfield projectionorderBysorting withasc/desctake/skippagination$queryRawescape hatch for raw SuiteQL- ES Proxy-based dynamic record access
Documentation
Full docs at suiteportal.dev
License
MIT
