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

Function normalizeAdminPaging

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

Source from the content-addressed store, hash-verified

636 * `datatype mismatch`.
637 */
638const normalizeAdminPaging = (
639 options: AdminListSubjectsOptions | undefined,
640): { readonly limit: number; readonly offset: number } => {
641 const requested = options?.limit ?? ADMIN_DEFAULT_PAGE_SIZE;
642 const limit = Math.min(Math.max(Math.floor(requested), 1), ADMIN_MAX_PAGE_SIZE);
643 const offset = Math.max(Math.floor(options?.offset ?? 0), 0);
644 return { limit, offset };
645};
646
647export interface ExecutorAdmin {
648 /** 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