feat(core, react): add schemas, i18n, and checkpoint pagination hook#159
Open
rax7389 wants to merge 3 commits intofeat/mm-invitations-ui-primitivesfrom
Open
feat(core, react): add schemas, i18n, and checkpoint pagination hook#159rax7389 wants to merge 3 commits intofeat/mm-invitations-ui-primitivesfrom
rax7389 wants to merge 3 commits intofeat/mm-invitations-ui-primitivesfrom
Conversation
d32ea46 to
a3edf1e
Compare
4cd1add to
f543326
Compare
a3edf1e to
038ed92
Compare
f543326 to
41ed260
Compare
038ed92 to
27b3080
Compare
a6cfe0d to
2b6461e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Summary: Adds Zod validation schemas, i18n translations, config types, and a reusable checkpoint pagination hook for the organization member management invitations feature. This is the foundational layer that all subsequent PRs build upon.
Why: The invitation feature requires well-defined schemas and translations before building UI components and hooks. Separating these into their own PR keeps the review focused. React types that depend on
MemberInvitationfrom@auth0/myorganization-jsare in PR 3.What:
i18n Translations (core)
Added
member_managementtranslation keys in bothen-US.jsonandja.jsoncovering all invitation flows — table columns, actions, create/revoke/details modals, success/error messages.{ "member_management": { "invitation": { "table": { "columns": { "email": "Email", "status": "Status", ... } }, "actions": { "view_details": "View Details", "revoke": "Revoke Invitation", ... }, "create": { "title": "Invite Member", "email_label": "Email Address", ... }, "revoke": { "title": "Revoke Invitation", "description": "Are you sure...?", ... } } } }Zod Schemas (core)
invitation-create-schema.ts— Factory functioncreateInvitationCreateSchema()with customizable email regex, error messages, and max email limit (default 10).invitation-schema.ts— Zod schemas forinvitationSchema,invitationListResponseSchema,createInvitationSchema, andrevokeInvitationSchema.member-schema.ts— Zod schemas formemberSchema,memberListResponseSchema, andremoveMemberSchema.Schema Tests (core)
invitation-create-schema.test.ts— comprehensive test suite covering valid/invalid emails, custom regex, custom error messages, andmaxEmailsconfiguration.Config Types (react)
config-types.ts— AddedallowedRolesto config interface.Shared Hook (react)
use-checkpoint-pagination.ts— Reusable hook for cursor/checkpoint-based pagination with token stack management for navigating back through pages.use-checkpoint-pagination.test.ts— Test suite for the pagination hook covering token stack management, page navigation, and edge cases.Exports
packages/core/src/schemas/my-organization/index.tswith new schema exportsReferences
Part of the member management invitations feature.
Testing
invitation-create-schema.test.ts,use-checkpoint-pagination.test.ts)Checklist