feat: add server link sharing

This commit is contained in:
Dax Raad 2026-07-08 18:41:08 -04:00
commit 7698a5e6ac
25 changed files with 1586 additions and 1194 deletions

View file

@ -362,6 +362,8 @@ import type {
V2QuestionRequestListResponses,
V2ReferenceListErrors,
V2ReferenceListResponses,
V2ServerGetErrors,
V2ServerGetResponses,
V2SessionActiveErrors,
V2SessionActiveResponses,
V2SessionBackgroundErrors,
@ -5113,6 +5115,20 @@ export class Health extends HeyApiClient {
}
}
export class Server extends HeyApiClient {
/**
* Get server information
*
* Return the URLs that can be used to connect to this server.
*/
public get<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) {
return (options?.client ?? this.client).get<V2ServerGetResponses, V2ServerGetErrors, ThrowOnError>({
url: "/api/server",
...options,
})
}
}
export class Location extends HeyApiClient {
/**
* Get location
@ -8259,6 +8275,11 @@ export class V2 extends HeyApiClient {
return (this._health ??= new Health({ client: this.client }))
}
private _server?: Server
get server(): Server {
return (this._server ??= new Server({ client: this.client }))
}
private _location?: Location
get location(): Location {
return (this._location ??= new Location({ client: this.client }))

View file

@ -15154,6 +15154,37 @@ export type V2HealthGetResponses = {
export type V2HealthGetResponse = V2HealthGetResponses[keyof V2HealthGetResponses]
export type V2ServerGetData = {
body?: never
path?: never
query?: never
url: "/api/server"
}
export type V2ServerGetErrors = {
/**
* InvalidRequestError
*/
400: InvalidRequestErrorV2
/**
* UnauthorizedError
*/
401: UnauthorizedError
}
export type V2ServerGetError = V2ServerGetErrors[keyof V2ServerGetErrors]
export type V2ServerGetResponses = {
/**
* Success
*/
200: {
urls: Array<string>
}
}
export type V2ServerGetResponse = V2ServerGetResponses[keyof V2ServerGetResponses]
export type V2LocationGetData = {
body?: never
path?: never