Skip to content

Conversation

@k1LoW
Copy link
Contributor

@k1LoW k1LoW commented Jan 21, 2026

Summary

Add TypeScript type definitions for IDP (Identity Provider) user management API (tailor.idp namespace).

Added types

  • ClientConfig - Client configuration with namespace
  • User - User object with id, name, disabled, createdAt, updatedAt
  • UserQuery - Query filter for users (by ids or names)
  • ListUsersOptions / ListUsersResponse - Pagination and filtering for user list
  • CreateUserInput / UpdateUserInput - Input types for user CRUD operations
  • SendPasswordResetEmailInput - Input for password reset email

Added Client methods

  • users(options?) - List users with optional filtering and pagination
  • user(userId) - Get a user by ID
  • createUser(input) - Create a new user
  • updateUser(input) - Update an existing user
  • deleteUser(userId) - Delete a user by ID
  • sendPasswordResetEmail(input) - Send a password reset email

Usage

const client = new tailor.idp.Client({ namespace: 'my-namespace' });

// List users
const { users, nextPageToken, totalCount } = await client.users({ first: 10 });

// Get a user
const user = await client.user('user-id');

// Create a user
const newUser = await client.createUser({ name: 'user@example.com', password: 'password' });

// Update a user
const updatedUser = await client.updateUser({ id: 'user-id', name: 'new@example.com' });

// Delete a user
await client.deleteUser('user-id');

// Send password reset email
await client.sendPasswordResetEmail({ userId: 'user-id', redirectUri: 'https://example.com/reset' });

@k1LoW k1LoW self-assigned this Jan 21, 2026
@k1LoW k1LoW added the enhancement New feature or request label Jan 21, 2026
@k1LoW k1LoW marked this pull request as ready for review January 22, 2026 01:20
@k1LoW k1LoW requested a review from a team as a code owner January 22, 2026 01:20
Copy link
Contributor

@toiroakr toiroakr left a comment

Choose a reason for hiding this comment

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

LGTM

@k1LoW k1LoW merged commit 84ce6ba into main Jan 22, 2026
6 checks passed
@k1LoW k1LoW deleted the add-idp-types branch January 22, 2026 01:36
@k1LoW
Copy link
Contributor Author

k1LoW commented Jan 22, 2026

Thank you!

@github-actions github-actions bot mentioned this pull request Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants