Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tmilewski
Copy link
Member

Description

Adds domain endpoints to the Backend API client.

  import { createClerkClient } from '@clerk/backend';

  const clerkClient = createClerkClient(...);
  await clerkClient.domains.list();
  await clerkClient.domains.add({...});
  await clerkClient.domains.update({...});
  await clerkClient.domains.delete('satelliteDomainId');

ECO-581

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@tmilewski tmilewski self-assigned this Apr 14, 2025
@vercel
Copy link

vercel bot commented Apr 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
clerk-js-sandbox ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 14, 2025 5:03pm

@changeset-bot
Copy link

changeset-bot bot commented Apr 14, 2025

🦋 Changeset detected

Latest commit: 39fa471

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@clerk/backend Minor
@clerk/agent-toolkit Patch
@clerk/astro Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/remix Patch
@clerk/tanstack-react-start Patch
@clerk/testing Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tmilewski tmilewski changed the title feat(backend): Add domain endpoints to the Backend API client feat(backend): Add Domain endpoints to the Backend API client Apr 14, 2025
@jacekradko jacekradko requested a review from Copilot April 15, 2025 00:12
Copy link
Contributor

Copilot AI left a comment

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 introduces domain endpoints to the Backend API client, expanding the resource support to include domain management and its associated CNAME targets.

  • Added new JSON types (DomainJSON and CnameTargetJSON) and corresponding resource classes (Domain and CnameTarget).
  • Updated the API factory and endpoints to include the new domains resource along with deprecation handling for deleteDomain.

Reviewed Changes

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

Show a summary per file
File Description
packages/backend/src/index.ts Added DomainJSON and CnameTargetJSON types
packages/backend/src/api/resources/index.ts Exported new CnameTarget and Domain resources
packages/backend/src/api/resources/JSON.ts Introduced DomainJSON and CnameTargetJSON interfaces
packages/backend/src/api/resources/Domain.ts Created a new Domain class with a fromJSON factory
packages/backend/src/api/resources/Deserializer.ts Added Domain resource deserialization
packages/backend/src/api/resources/CnameTarget.ts Created a new CnameTarget class with a static fromJSON
packages/backend/src/api/factory.ts Integrated domains into the Backend API client factory
packages/backend/src/api/endpoints/DomainApi.ts Implemented endpoints (list, add, update, delete) for domains
.changeset/many-carpets-rush.md Documented the addition of domain endpoints

@tmilewski tmilewski merged commit efb5d8c into main Apr 15, 2025
33 checks passed
@tmilewski tmilewski deleted the tm/eco-581-domains branch April 15, 2025 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants