-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
932e5c2
commit cdad239
Showing
17 changed files
with
852 additions
and
510 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
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
src/apis/agents | ||
src/apis/subscriptions |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// This file is auto-generated by @hey-api/openapi-ts | ||
export * from './schemas.gen'; | ||
export * from './services.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 |
---|---|---|
@@ -0,0 +1,172 @@ | ||
// This file is auto-generated by @hey-api/openapi-ts | ||
|
||
export const Body_update_agent__agent_id__putSchema = { | ||
properties: { | ||
secret: { | ||
type: 'string', | ||
title: 'Secret' | ||
}, | ||
code: { | ||
type: 'string', | ||
format: 'binary', | ||
title: 'Code' | ||
}, | ||
packages: { | ||
type: 'string', | ||
format: 'binary', | ||
title: 'Packages' | ||
} | ||
}, | ||
type: 'object', | ||
required: ['secret', 'code', 'packages'], | ||
title: 'Body_update_agent__agent_id__put' | ||
} as const; | ||
|
||
export const DeleteAgentBodySchema = { | ||
properties: { | ||
subscription_id: { | ||
type: 'string', | ||
title: 'Subscription Id' | ||
}, | ||
password: { | ||
type: 'string', | ||
title: 'Password' | ||
} | ||
}, | ||
type: 'object', | ||
required: ['subscription_id', 'password'], | ||
title: 'DeleteAgentBody' | ||
} as const; | ||
|
||
export const GetAgentResponseSchema = { | ||
properties: { | ||
id: { | ||
type: 'string', | ||
title: 'Id' | ||
}, | ||
vm_hash: { | ||
type: 'string', | ||
title: 'Vm Hash' | ||
}, | ||
last_update: { | ||
type: 'integer', | ||
title: 'Last Update' | ||
} | ||
}, | ||
type: 'object', | ||
required: ['id', 'last_update'], | ||
title: 'GetAgentResponse' | ||
} as const; | ||
|
||
export const GetAgentSecretResponseSchema = { | ||
properties: { | ||
secret: { | ||
type: 'string', | ||
title: 'Secret' | ||
} | ||
}, | ||
type: 'object', | ||
required: ['secret'], | ||
title: 'GetAgentSecretResponse' | ||
} as const; | ||
|
||
export const HTTPValidationErrorSchema = { | ||
properties: { | ||
detail: { | ||
items: { | ||
'$ref': '#/components/schemas/ValidationError' | ||
}, | ||
type: 'array', | ||
title: 'Detail' | ||
} | ||
}, | ||
type: 'object', | ||
title: 'HTTPValidationError' | ||
} as const; | ||
|
||
export const SetupAgentBodySchema = { | ||
properties: { | ||
subscription_id: { | ||
type: 'string', | ||
title: 'Subscription Id' | ||
}, | ||
password: { | ||
type: 'string', | ||
title: 'Password' | ||
}, | ||
account: { | ||
'$ref': '#/components/schemas/SubscriptionAccount' | ||
} | ||
}, | ||
type: 'object', | ||
required: ['subscription_id', 'password', 'account'], | ||
title: 'SetupAgentBody' | ||
} as const; | ||
|
||
export const SubscriptionAccountSchema = { | ||
properties: { | ||
address: { | ||
type: 'string', | ||
title: 'Address' | ||
}, | ||
chain: { | ||
'$ref': '#/components/schemas/SubscriptionChain' | ||
} | ||
}, | ||
type: 'object', | ||
required: ['address', 'chain'], | ||
title: 'SubscriptionAccount', | ||
example: { | ||
address: '0x0000000000000000000000000000000000000000', | ||
chain: 'base' | ||
} | ||
} as const; | ||
|
||
export const SubscriptionChainSchema = { | ||
type: 'string', | ||
enum: ['base', 'solana'], | ||
title: 'SubscriptionChain', | ||
description: 'An enumeration.' | ||
} as const; | ||
|
||
export const UpdateAgentResponseSchema = { | ||
properties: { | ||
vm_hash: { | ||
type: 'string', | ||
title: 'Vm Hash' | ||
} | ||
}, | ||
type: 'object', | ||
required: ['vm_hash'], | ||
title: 'UpdateAgentResponse' | ||
} as const; | ||
|
||
export const ValidationErrorSchema = { | ||
properties: { | ||
loc: { | ||
items: { | ||
anyOf: [ | ||
{ | ||
type: 'string' | ||
}, | ||
{ | ||
type: 'integer' | ||
} | ||
] | ||
}, | ||
type: 'array', | ||
title: 'Location' | ||
}, | ||
msg: { | ||
type: 'string', | ||
title: 'Message' | ||
}, | ||
type: { | ||
type: 'string', | ||
title: 'Error Type' | ||
} | ||
}, | ||
type: 'object', | ||
required: ['loc', 'msg', 'type'], | ||
title: 'ValidationError' | ||
} as const; |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// This file is auto-generated by @hey-api/openapi-ts | ||
|
||
import { createClient, createConfig, type Options, formDataBodySerializer } from '@hey-api/client-axios'; | ||
import type { SetupAgentPostData, SetupAgentPostError, SetupAgentPostResponse, DeleteAgentDeleteData, DeleteAgentDeleteError, DeleteAgentDeleteResponse, GetAgentPublicInfoAgentAgentIdGetData, GetAgentPublicInfoAgentAgentIdGetError, GetAgentPublicInfoAgentAgentIdGetResponse, UpdateAgentAgentIdPutData, UpdateAgentAgentIdPutError, UpdateAgentAgentIdPutResponse, GetAgentSecretAgentAgentIdSecretGetData, GetAgentSecretAgentAgentIdSecretGetError, GetAgentSecretAgentAgentIdSecretGetResponse } from './types.gen'; | ||
|
||
export const client = createClient(createConfig()); | ||
|
||
/** | ||
* Setup | ||
* Setup a new agent on subscription | ||
*/ | ||
export const setupAgentPost = <ThrowOnError extends boolean = false>(options: Options<SetupAgentPostData, ThrowOnError>) => { | ||
return (options?.client ?? client).post<SetupAgentPostResponse, SetupAgentPostError, ThrowOnError>({ | ||
...options, | ||
url: '/agent' | ||
}); | ||
}; | ||
|
||
/** | ||
* Delete | ||
* Remove an agent on subscription end | ||
*/ | ||
export const deleteAgentDelete = <ThrowOnError extends boolean = false>(options: Options<DeleteAgentDeleteData, ThrowOnError>) => { | ||
return (options?.client ?? client).delete<DeleteAgentDeleteResponse, DeleteAgentDeleteError, ThrowOnError>({ | ||
...options, | ||
url: '/agent' | ||
}); | ||
}; | ||
|
||
/** | ||
* Get Agent Public Info | ||
* Get an agent public information | ||
*/ | ||
export const getAgentPublicInfoAgentAgentIdGet = <ThrowOnError extends boolean = false>(options: Options<GetAgentPublicInfoAgentAgentIdGetData, ThrowOnError>) => { | ||
return (options?.client ?? client).get<GetAgentPublicInfoAgentAgentIdGetResponse, GetAgentPublicInfoAgentAgentIdGetError, ThrowOnError>({ | ||
...options, | ||
url: '/agent/{agent_id}' | ||
}); | ||
}; | ||
|
||
/** | ||
* Update | ||
* Deploy an agent or update it | ||
*/ | ||
export const updateAgentAgentIdPut = <ThrowOnError extends boolean = false>(options: Options<UpdateAgentAgentIdPutData, ThrowOnError>) => { | ||
return (options?.client ?? client).put<UpdateAgentAgentIdPutResponse, UpdateAgentAgentIdPutError, ThrowOnError>({ | ||
...options, | ||
...formDataBodySerializer, | ||
headers: { | ||
'Content-Type': null, | ||
...options?.headers | ||
}, | ||
url: '/agent/{agent_id}' | ||
}); | ||
}; | ||
|
||
/** | ||
* Get Agent Secret | ||
* Get an agent secret | ||
*/ | ||
export const getAgentSecretAgentAgentIdSecretGet = <ThrowOnError extends boolean = false>(options: Options<GetAgentSecretAgentAgentIdSecretGetData, ThrowOnError>) => { | ||
return (options?.client ?? client).get<GetAgentSecretAgentAgentIdSecretGetResponse, GetAgentSecretAgentAgentIdSecretGetError, ThrowOnError>({ | ||
...options, | ||
url: '/agent/{agent_id}/secret' | ||
}); | ||
}; |
Oops, something went wrong.