File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626- [ Users] ( #users )
2727- [ Trip] ( #trip )
2828- [ Telemetry] ( #telemetry )
29+ - [ Custom Domains] ( #custom-domains )
2930
3031# Auth
3132
@@ -4466,3 +4467,41 @@ await client.organizations.checkSlugName('danang');
44664467` ` `
44674468
44684469</details>
4470+
4471+ ---
4472+
4473+ # Custom Domains
4474+
4475+ ## Overview
4476+
4477+ The ` CustomDomain ` class provides methods for managing and resolving custom domains.
4478+
4479+ ## Methods
4480+
4481+ <details>
4482+ <summary><strong>resolve</strong></summary>
4483+
4484+ Resolve a custom domain to obtain organization details.
4485+
4486+ **Signature:**
4487+
4488+ ` ` ` typescript
4489+ resolve (host : string , options ? : Core .RequestOptions ): Core .APIPromise <ResolveResponse >
4490+ ` ` `
4491+
4492+ **Parameters:**
4493+
4494+ - ` host ` _(string)_: The host name of the custom domain to resolve.
4495+ - ` options ` _(Core.RequestOptions)_: Additional request options.
4496+
4497+ **Returns:** ` Promise <ResolveResponse >`
4498+
4499+ **Example:**
4500+
4501+ ` ` ` typescript
4502+ const response = await client .customDomains .resolve (' custom.example.com' );
4503+ console .log (response .org_slug );
4504+ console .log (response .org_name );
4505+ ```
4506+
4507+ </details >
Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ export class SpaceDFSDK extends Core.APIClient {
150150 trip : API . Trip = new API . Trip ( this ) ;
151151 organizations : API . Organizations = new API . Organizations ( this ) ;
152152 telemetry : API . Telemetry = new API . Telemetry ( this ) ;
153+ customDomains : API . CustomDomain = new API . CustomDomain ( this ) ;
153154
154155 protected override defaultQuery ( ) : Core . DefaultQuery | undefined {
155156 return this . _options . defaultQuery ;
Original file line number Diff line number Diff line change 1+ import { APIResource } from '../../resource' ;
2+ import * as Core from '../../core' ;
3+
4+ export class CustomDomain extends APIResource {
5+ resolve ( host : string , options ?: Core . RequestOptions ) : Core . APIPromise < ResolveResponse > {
6+ return this . _client . get ( `/custom-domains/resolve?host=${ host } ` , {
7+ ...options ,
8+ } ) ;
9+ }
10+ }
11+
12+ interface ResolveResponse {
13+ org_slug : string ;
14+ org_name : string ;
15+ }
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ export * from './console/index';
1010export * from './device/index' ;
1111export * from './organizations/index' ;
1212export * from './telemetry/index' ;
13+ export * from './custom-domains/index' ;
You can’t perform that action at this time.
0 commit comments