update applications
This commit is contained in:
1 parent
1e837571e2
commit
5d28ab219f
7 files changed
+34
-10
No files matched your search
@@ -20,7 +20,7 @@ export interface ICredential {
|
||||
}
|
||||
|
||||
export interface IApplication {
|
||||
id?: string;
|
||||
id: string;
|
||||
api?: IApi;
|
||||
type?: IApplicationType;
|
||||
api_id?: string;
|
||||
|
||||
@@ -7,7 +7,7 @@ export interface IApplicationQuery {
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
type?: IApplicationType;
|
||||
api_id?: string;
|
||||
api_id?: string | string[];
|
||||
ordering?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ export interface IMidjourneyPreset {
|
||||
quality?: string;
|
||||
wired?: number;
|
||||
raw?: boolean;
|
||||
iw: number;
|
||||
iw?: number;
|
||||
translation?: boolean;
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ export interface IMidjourneyImagineRequest {
|
||||
action?: MidjourneyImagineAction;
|
||||
prompt?: string;
|
||||
image_id?: string;
|
||||
translation?: boolean;
|
||||
}
|
||||
|
||||
export interface IMidjourneyImagineResponse {
|
||||
|
||||
@@ -20,6 +20,23 @@ class MidjourneyOperator {
|
||||
);
|
||||
}
|
||||
|
||||
async tasks(ids: string[]): Promise<AxiosResponse<IMidjourneyImagineTask[]>> {
|
||||
return await axios.post(
|
||||
`/midjourney/tasks`,
|
||||
{
|
||||
action: 'retrieve_batch',
|
||||
ids: ids
|
||||
},
|
||||
{
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
baseURL: ENDPOINT_API
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
async imagine(
|
||||
data: IMidjourneyImagineRequest,
|
||||
options: {
|
||||
|
||||
@@ -6,7 +6,7 @@ export interface IApiUsageQuery {
|
||||
user_id?: string;
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
application_id?: string;
|
||||
application_id?: string | string[];
|
||||
ordering?: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user