Skip to content

Fix TypeScript errors in SCIM and RLS helper functions - #242

Merged
hotlong merged 3 commits into
copilot/restructure-website-docsfrom
copilot/review-job-action-step
Jan 26, 2026
Merged

hotlong merged 3 commits into
copilot/restructure-website-docsfrom
copilot/review-job-action-step

Conversation

Copilot AI commented Jan 26, 2026 •

Copy link
Copy Markdown
Contributor

TypeScript compilation errors in src/auth/scim.zod.ts and src/permission/rls.zod.ts blocking CI builds.

Changes

RLS Helpers: Added explicit priority: 0 to factory functions

  • Zod .default(0) doesn't make the field optional in z.infer<> types
  • Affects: ownerPolicy, tenantPolicy, rolePolicy, allowAllPolicy

SCIM Helper: Type assertion for generic Resources field

  • Changed resources to resources as Array<SCIMResource | Record<string, any>>
  • Generic T[] requires explicit cast to satisfy union type constraint
// Before: TS2741 - Property 'priority' is missing
ownerPolicy: (object: string): RowLevelSecurityPolicy => ({
  name: `${object}_owner_access`,
  // ...
  enabled: true,
}),

// After
ownerPolicy: (object: string): RowLevelSecurityPolicy => ({
  name: `${object}_owner_access`,
  // ...
  enabled: true,
  priority: 0,
}),
Original prompt

引用: https://github.com/objectstack-ai/spec/actions/runs/21363404121/job/61488478743#step:8:1


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel

vercel Bot commented Jan 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
spec Ready Ready Preview, Comment Jan 26, 2026 3:55pm

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Review job action step details Fix TypeScript errors in SCIM and RLS helper functions Jan 26, 2026
Copilot AI requested a review from hotlong January 26, 2026 15:56
@hotlong
hotlong marked this pull request as ready for review January 26, 2026 16:00
Copilot AI review requested due to automatic review settings January 26, 2026 16:00
@hotlong
hotlong merged commit 313dae9 into copilot/restructure-website-docs Jan 26, 2026
6 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes TypeScript compilation errors in the RLS (Row-Level Security) and SCIM helper factory functions that were blocking CI builds.

Changes:

  • Added explicit priority: 0 to four RLS factory functions (ownerPolicy, tenantPolicy, rolePolicy, allowAllPolicy)
  • Added type assertion for generic Resources field in SCIM listResponse helper
  • Generated JSON schema files and documentation for RLS and SCIM types

Reviewed changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/spec/src/permission/rls.zod.ts Fixed TypeScript errors by adding explicit priority: 0 to all four RLS helper factory functions
packages/spec/src/auth/scim.zod.ts Fixed TypeScript error by casting generic resources parameter to union type constraint
packages/spec/json-schema/permission/*.json Generated JSON schemas for RLS types (RowLevelSecurityPolicy, RLSConfig, RLSUserContext, RLSOperation, RLSEvaluationResult)
packages/spec/json-schema/auth/*.json Generated JSON schemas for SCIM types (SCIMUser, SCIMGroup, SCIMListResponse, SCIMError, and related sub-types)
content/docs/references/permission/rls/*.mdx Generated documentation pages for RLS schema references
content/docs/references/auth/scim/*.mdx Generated documentation pages for SCIM schema references
content/docs/references/permission/meta.json Added RLS to permission protocol documentation navigation
content/docs/references/auth/meta.json Added SCIM to auth protocol documentation navigation

This branch was successfully deployed

1 active deployment
Preview — 69748305 Deployed Jan 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants