refactor(core): derive catalog availability from integrations (#32272)
This commit is contained in:
parent
4810df0a71
commit
0cf3ee4406
29 changed files with 622 additions and 509 deletions
|
|
@ -5812,10 +5812,24 @@ export class Credential extends HeyApiClient {
|
|||
public remove<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
credentialID: string
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
) {
|
||||
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "credentialID" }] }])
|
||||
const params = buildClientParams(
|
||||
[parameters],
|
||||
[
|
||||
{
|
||||
args: [
|
||||
{ in: "path", key: "credentialID" },
|
||||
{ in: "query", key: "location" },
|
||||
],
|
||||
},
|
||||
],
|
||||
)
|
||||
return (options?.client ?? this.client).delete<V2CredentialRemoveResponses, V2CredentialRemoveErrors, ThrowOnError>(
|
||||
{
|
||||
url: "/api/credential/{credentialID}",
|
||||
|
|
@ -5833,6 +5847,10 @@ export class Credential extends HeyApiClient {
|
|||
public update<ThrowOnError extends boolean = false>(
|
||||
parameters: {
|
||||
credentialID: string
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
label?: string
|
||||
},
|
||||
options?: Options<never, ThrowOnError>,
|
||||
|
|
@ -5843,6 +5861,7 @@ export class Credential extends HeyApiClient {
|
|||
{
|
||||
args: [
|
||||
{ in: "path", key: "credentialID" },
|
||||
{ in: "query", key: "location" },
|
||||
{ in: "body", key: "label" },
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ export type ClientOptions = {
|
|||
export type Event =
|
||||
| EventModelsDevRefreshed
|
||||
| EventPluginAdded
|
||||
| EventCatalogModelUpdated
|
||||
| EventIntegrationUpdated
|
||||
| EventCatalogUpdated
|
||||
| EventSessionCreated
|
||||
| EventSessionUpdated
|
||||
| EventSessionDeleted
|
||||
|
|
@ -52,7 +53,6 @@ export type Event =
|
|||
| EventInstallationUpdated
|
||||
| EventInstallationUpdateAvailable
|
||||
| EventFileEdited
|
||||
| EventIntegrationUpdated
|
||||
| EventPermissionV2Asked
|
||||
| EventPermissionV2Replied
|
||||
| EventReferenceUpdated
|
||||
|
|
@ -746,9 +746,16 @@ export type GlobalEvent = {
|
|||
}
|
||||
| {
|
||||
id: string
|
||||
type: "catalog.model.updated"
|
||||
type: "integration.updated"
|
||||
properties: {
|
||||
model: ModelV2Info
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "catalog.updated"
|
||||
properties: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
| {
|
||||
|
|
@ -1257,13 +1264,6 @@ export type GlobalEvent = {
|
|||
file: string
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "integration.updated"
|
||||
properties: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "permission.v2.asked"
|
||||
|
|
@ -2836,102 +2836,6 @@ export type MoveSessionDestination = {
|
|||
directory: string
|
||||
}
|
||||
|
||||
export type ModelV2Info = {
|
||||
id: string
|
||||
providerID: string
|
||||
family?: string
|
||||
name: string
|
||||
api:
|
||||
| {
|
||||
id: string
|
||||
type: "aisdk"
|
||||
package: string
|
||||
url?: string
|
||||
settings?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "native"
|
||||
url?: string
|
||||
settings: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
capabilities: {
|
||||
tools: boolean
|
||||
input: Array<string>
|
||||
output: Array<string>
|
||||
}
|
||||
request: {
|
||||
headers: {
|
||||
[key: string]: string
|
||||
}
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
generation?: {
|
||||
maxTokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
temperature?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
topP?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
topK?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
presencePenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
seed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
stop?: Array<string>
|
||||
}
|
||||
options?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
variant?: string
|
||||
}
|
||||
variants: Array<{
|
||||
id: string
|
||||
headers: {
|
||||
[key: string]: string
|
||||
}
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
generation?: {
|
||||
maxTokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
temperature?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
topP?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
topK?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
presencePenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
seed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
stop?: Array<string>
|
||||
}
|
||||
options?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}>
|
||||
time: {
|
||||
released: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
}
|
||||
cost: Array<{
|
||||
tier?: {
|
||||
type: "context"
|
||||
size: number
|
||||
}
|
||||
input: number
|
||||
output: number
|
||||
cache: {
|
||||
read: number
|
||||
write: number
|
||||
}
|
||||
}>
|
||||
status: "alpha" | "beta" | "deprecated" | "active"
|
||||
enabled: boolean
|
||||
limit: {
|
||||
context: number
|
||||
input?: number
|
||||
output: number
|
||||
}
|
||||
}
|
||||
|
||||
export type LocationRef = {
|
||||
directory: string
|
||||
workspaceID?: string
|
||||
|
|
@ -4022,26 +3926,106 @@ export type SessionMessage =
|
|||
| SessionMessageAssistant
|
||||
| SessionMessageCompaction
|
||||
|
||||
export type ProviderV2Info = {
|
||||
export type ModelV2Info = {
|
||||
id: string
|
||||
providerID: string
|
||||
family?: string
|
||||
name: string
|
||||
enabled:
|
||||
| false
|
||||
api:
|
||||
| {
|
||||
via: "env"
|
||||
name: string
|
||||
}
|
||||
| {
|
||||
via: "credential"
|
||||
credentialID: string
|
||||
}
|
||||
| {
|
||||
via: "custom"
|
||||
data: {
|
||||
id: string
|
||||
type: "aisdk"
|
||||
package: string
|
||||
url?: string
|
||||
settings?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
env: Array<string>
|
||||
| {
|
||||
id: string
|
||||
type: "native"
|
||||
url?: string
|
||||
settings: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
capabilities: {
|
||||
tools: boolean
|
||||
input: Array<string>
|
||||
output: Array<string>
|
||||
}
|
||||
request: {
|
||||
headers: {
|
||||
[key: string]: string
|
||||
}
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
generation?: {
|
||||
maxTokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
temperature?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
topP?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
topK?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
presencePenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
seed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
stop?: Array<string>
|
||||
}
|
||||
options?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
variant?: string
|
||||
}
|
||||
variants: Array<{
|
||||
id: string
|
||||
headers: {
|
||||
[key: string]: string
|
||||
}
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
generation?: {
|
||||
maxTokens?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
temperature?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
topP?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
topK?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
presencePenalty?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
seed?: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
stop?: Array<string>
|
||||
}
|
||||
options?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}>
|
||||
time: {
|
||||
released: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
|
||||
}
|
||||
cost: Array<{
|
||||
tier?: {
|
||||
type: "context"
|
||||
size: number
|
||||
}
|
||||
input: number
|
||||
output: number
|
||||
cache: {
|
||||
read: number
|
||||
write: number
|
||||
}
|
||||
}>
|
||||
status: "alpha" | "beta" | "deprecated" | "active"
|
||||
enabled: boolean
|
||||
limit: {
|
||||
context: number
|
||||
input?: number
|
||||
output: number
|
||||
}
|
||||
}
|
||||
|
||||
export type ProviderV2Info = {
|
||||
id: string
|
||||
name: string
|
||||
disabled?: boolean
|
||||
api:
|
||||
| {
|
||||
type: "aisdk"
|
||||
|
|
@ -4248,107 +4232,19 @@ export type EventPluginAdded = {
|
|||
}
|
||||
}
|
||||
|
||||
export type ModelV2Info1 = {
|
||||
export type EventIntegrationUpdated = {
|
||||
id: string
|
||||
providerID: string
|
||||
family?: string
|
||||
name: string
|
||||
api:
|
||||
| {
|
||||
id: string
|
||||
type: "aisdk"
|
||||
package: string
|
||||
url?: string
|
||||
settings?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
| {
|
||||
id: string
|
||||
type: "native"
|
||||
url?: string
|
||||
settings: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
capabilities: {
|
||||
tools: boolean
|
||||
input: Array<string>
|
||||
output: Array<string>
|
||||
}
|
||||
request: {
|
||||
headers: {
|
||||
[key: string]: string
|
||||
}
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
generation?: {
|
||||
maxTokens?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
temperature?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
topP?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
topK?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
presencePenalty?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
seed?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
stop?: Array<string>
|
||||
}
|
||||
options?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
variant?: string
|
||||
}
|
||||
variants: Array<{
|
||||
id: string
|
||||
headers: {
|
||||
[key: string]: string
|
||||
}
|
||||
body: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
generation?: {
|
||||
maxTokens?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
temperature?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
topP?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
topK?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
frequencyPenalty?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
presencePenalty?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
seed?: number | "NaN" | "Infinity" | "-Infinity"
|
||||
stop?: Array<string>
|
||||
}
|
||||
options?: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}>
|
||||
time: {
|
||||
released: number | "NaN" | "Infinity" | "-Infinity"
|
||||
}
|
||||
cost: Array<{
|
||||
tier?: {
|
||||
type: "context"
|
||||
size: number
|
||||
}
|
||||
input: number
|
||||
output: number
|
||||
cache: {
|
||||
read: number
|
||||
write: number
|
||||
}
|
||||
}>
|
||||
status: "alpha" | "beta" | "deprecated" | "active"
|
||||
enabled: boolean
|
||||
limit: {
|
||||
context: number
|
||||
input?: number
|
||||
output: number
|
||||
type: "integration.updated"
|
||||
properties: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type EventCatalogModelUpdated = {
|
||||
export type EventCatalogUpdated = {
|
||||
id: string
|
||||
type: "catalog.model.updated"
|
||||
type: "catalog.updated"
|
||||
properties: {
|
||||
model: ModelV2Info1
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4902,14 +4798,6 @@ export type EventFileEdited = {
|
|||
}
|
||||
}
|
||||
|
||||
export type EventIntegrationUpdated = {
|
||||
id: string
|
||||
type: "integration.updated"
|
||||
properties: {
|
||||
[key: string]: unknown
|
||||
}
|
||||
}
|
||||
|
||||
export type EventPermissionV2Asked = {
|
||||
id: string
|
||||
type: "permission.v2.asked"
|
||||
|
|
@ -10251,7 +10139,12 @@ export type V2CredentialRemoveData = {
|
|||
path: {
|
||||
credentialID: string
|
||||
}
|
||||
query?: never
|
||||
query?: {
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/credential/{credentialID}"
|
||||
}
|
||||
|
||||
|
|
@ -10284,7 +10177,12 @@ export type V2CredentialUpdateData = {
|
|||
path: {
|
||||
credentialID: string
|
||||
}
|
||||
query?: never
|
||||
query?: {
|
||||
location?: {
|
||||
directory?: string
|
||||
workspace?: string
|
||||
}
|
||||
}
|
||||
url: "/api/credential/{credentialID}"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue