MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / normalizeAdminPaging

Function normalizeAdminPaging

packages/core/sdk/src/executor.ts:641–648  ·  view source on GitHub ↗
(
  options: AdminListSubjectsOptions | undefined,
)

Source from the content-addressed store, hash-verified

639 * `datatype mismatch`.
640 */
641const normalizeAdminPaging = (
642 options: AdminListSubjectsOptions | undefined,
643): { readonly limit: number; readonly offset: number } => {
644 const requested = options?.limit ?? ADMIN_DEFAULT_PAGE_SIZE;
645 const limit = Math.min(Math.max(Math.floor(requested), 1), ADMIN_MAX_PAGE_SIZE);
646 const offset = Math.max(Math.floor(options?.offset ?? 0), 0);
647 return { limit, offset };
648};
649
650export interface ExecutorAdmin {
651 /** One page of subjects under the tenant, oldest first (stable: ties break on

Callers 1

listSubjectsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected