-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(api): update generated types (#74)
- Loading branch information
Showing
3 changed files
with
47 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// This file is auto-generated by @hey-api/openapi-ts | ||
export * from "./sdk.gen"; | ||
export * from "./types.gen"; | ||
export * from './sdk.gen'; | ||
export * from './types.gen'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,39 @@ | ||
// This file is auto-generated by @hey-api/openapi-ts | ||
|
||
import { | ||
createClient, | ||
createConfig, | ||
type OptionsLegacyParser, | ||
} from "@hey-api/client-fetch"; | ||
import type { | ||
GetMessagesDashboardMessagesGetError, | ||
GetMessagesDashboardMessagesGetResponse, | ||
GetAlertsDashboardAlertsGetError, | ||
GetAlertsDashboardAlertsGetResponse, | ||
StreamSseDashboardAlertsNotificationGetError, | ||
StreamSseDashboardAlertsNotificationGetResponse, | ||
} from "./types.gen"; | ||
import { createClient, createConfig, type OptionsLegacyParser } from '@hey-api/client-fetch'; | ||
import type { GetMessagesDashboardMessagesGetError, GetMessagesDashboardMessagesGetResponse, GetAlertsDashboardAlertsGetError, GetAlertsDashboardAlertsGetResponse, StreamSseDashboardAlertsNotificationGetError, StreamSseDashboardAlertsNotificationGetResponse } from './types.gen'; | ||
|
||
export const client = createClient(createConfig()); | ||
|
||
/** | ||
* Get Messages | ||
* Get all the messages from the database and return them as a list of conversations. | ||
*/ | ||
export const getMessagesDashboardMessagesGet = < | ||
ThrowOnError extends boolean = false, | ||
>( | ||
options?: OptionsLegacyParser<unknown, ThrowOnError>, | ||
) => { | ||
return (options?.client ?? client).get< | ||
GetMessagesDashboardMessagesGetResponse, | ||
GetMessagesDashboardMessagesGetError, | ||
ThrowOnError | ||
>({ | ||
...options, | ||
url: "/dashboard/messages", | ||
}); | ||
export const getMessagesDashboardMessagesGet = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => { | ||
return (options?.client ?? client).get<GetMessagesDashboardMessagesGetResponse, GetMessagesDashboardMessagesGetError, ThrowOnError>({ | ||
...options, | ||
url: '/dashboard/messages' | ||
}); | ||
}; | ||
|
||
/** | ||
* Get Alerts | ||
* Get all the messages from the database and return them as a list of conversations. | ||
*/ | ||
export const getAlertsDashboardAlertsGet = < | ||
ThrowOnError extends boolean = false, | ||
>( | ||
options?: OptionsLegacyParser<unknown, ThrowOnError>, | ||
) => { | ||
return (options?.client ?? client).get< | ||
GetAlertsDashboardAlertsGetResponse, | ||
GetAlertsDashboardAlertsGetError, | ||
ThrowOnError | ||
>({ | ||
...options, | ||
url: "/dashboard/alerts", | ||
}); | ||
export const getAlertsDashboardAlertsGet = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => { | ||
return (options?.client ?? client).get<GetAlertsDashboardAlertsGetResponse, GetAlertsDashboardAlertsGetError, ThrowOnError>({ | ||
...options, | ||
url: '/dashboard/alerts' | ||
}); | ||
}; | ||
|
||
/** | ||
* Stream Sse | ||
* Send alerts event | ||
*/ | ||
export const streamSseDashboardAlertsNotificationGet = < | ||
ThrowOnError extends boolean = false, | ||
>( | ||
options?: OptionsLegacyParser<unknown, ThrowOnError>, | ||
) => { | ||
return (options?.client ?? client).get< | ||
StreamSseDashboardAlertsNotificationGetResponse, | ||
StreamSseDashboardAlertsNotificationGetError, | ||
ThrowOnError | ||
>({ | ||
...options, | ||
url: "/dashboard/alerts_notification", | ||
}); | ||
}; | ||
export const streamSseDashboardAlertsNotificationGet = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => { | ||
return (options?.client ?? client).get<StreamSseDashboardAlertsNotificationGetResponse, StreamSseDashboardAlertsNotificationGetError, ThrowOnError>({ | ||
...options, | ||
url: '/dashboard/alerts_notification' | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters