Skip to content

Commit 3d6ed25

Browse files
docs(backend): clarify domain API documentation (#9741)
1 parent a982913 commit 3d6ed25

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

‎.changeset/two-aliens-build.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/backend': patch
3+
---
4+
5+
Clarify domain API documentation and deletion parameter names. The active domain cannot be deleted.

‎packages/backend/src/api/endpoints/DomainApi.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type AddDomainParams = {
1212
* The new domain name. For development instances, can contain the port, e.g., `myhostname:3000`. For production instances, must be a valid FQDN, e.g., `mysite.com`. Cannot contain protocol scheme.
1313
*/
1414
name: string;
15-
/** Whether the new domain is a satellite domain. Only `true` is accepted at the moment. */
15+
/** Whether the new domain is a satellite domain. */
1616
is_satellite: boolean;
1717
/** The proxy URL for the domain. Applicable only to production instances. */
1818
proxy_url?: string | null;
@@ -70,25 +70,25 @@ export class DomainAPI extends AbstractAPI {
7070
}
7171

7272
/**
73-
* Deletes a satellite domain for the instance. It is currently not possible to delete the instance's primary domain.
74-
* @param satelliteDomainId - The ID of the satellite domain to delete.
73+
* Deletes a domain for the instance. The active domain cannot be deleted.
74+
* @param domainId - The ID of the domain to delete.
7575
* @returns The [`DeletedObject`](https://clerk.com/docs/reference/backend/types/deleted-object).
7676
*/
77-
public async delete(satelliteDomainId: string) {
78-
return this.deleteDomain(satelliteDomainId);
77+
public async delete(domainId: string) {
78+
return this.deleteDomain(domainId);
7979
}
8080

8181
/**
82-
* Deletes a satellite domain for the instance.
83-
* @param satelliteDomainId - The ID of the satellite domain to delete.
82+
* Deletes a domain for the instance. The active domain cannot be deleted.
83+
* @param domainId - The ID of the domain to delete.
8484
* @returns The [`DeletedObject`](https://clerk.com/docs/reference/backend/types/deleted-object).
8585
* @deprecated Use `delete()` instead.
8686
*/
87-
public async deleteDomain(satelliteDomainId: string) {
88-
this.requireId(satelliteDomainId);
87+
public async deleteDomain(domainId: string) {
88+
this.requireId(domainId);
8989
return this.request<DeletedObject>({
9090
method: 'DELETE',
91-
path: joinPaths(basePath, satelliteDomainId),
91+
path: joinPaths(basePath, domainId),
9292
});
9393
}
9494
}

0 commit comments

Comments
 (0)