feat: central services heartbeat senden
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 26s
Build and Push Docker Images / build-frontend (push) Successful in 16s
Build and Push Docker Images / build-website (push) Successful in 16s
Build and Push Docker Images / build-central-services-api (push) Successful in 21s
Build and Push Docker Images / build-central-services-admin (push) Successful in 41s
Build and Push Docker Images / build-docs (push) Successful in 16s
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 26s
Build and Push Docker Images / build-frontend (push) Successful in 16s
Build and Push Docker Images / build-website (push) Successful in 16s
Build and Push Docker Images / build-central-services-api (push) Successful in 21s
Build and Push Docker Images / build-central-services-admin (push) Successful in 41s
Build and Push Docker Images / build-docs (push) Successful in 16s
This commit is contained in:
@@ -30,6 +30,12 @@ export type SendPushServerMessageInput = {
|
||||
data?: Record<string, unknown>
|
||||
}
|
||||
|
||||
export type CentralServicesHeartbeatInput = {
|
||||
fedeoVersion?: string
|
||||
baseUrl?: string
|
||||
capabilities?: string[]
|
||||
}
|
||||
|
||||
function configured() {
|
||||
return Boolean(secrets.PUSH_SERVER_URL && secrets.PUSH_SERVER_INSTANCE_ID && secrets.PUSH_SERVER_SECRET)
|
||||
}
|
||||
@@ -105,6 +111,15 @@ export const pushServerClient = {
|
||||
export const centralServicesClient = {
|
||||
configured,
|
||||
|
||||
heartbeat(input: CentralServicesHeartbeatInput) {
|
||||
return requestPushServer<{
|
||||
status: string
|
||||
instanceId: string
|
||||
payloadMode: string
|
||||
capabilities: string[]
|
||||
}>("POST", "/v1/instances/heartbeat", input)
|
||||
},
|
||||
|
||||
aiChatCompletions(payload: Record<string, unknown>) {
|
||||
return requestPushServer<any>("POST", "/v1/services/ai/chat-completions", payload)
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user