update applications

This commit is contained in:
AceDataCloud committed 2023-11-05 00:03:42 +08:00
1 parent 1e837571e2
commit 5d28ab219f
7 files changed
+34 -10

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@ export interface ICredential {
}
export interface IApplication {
id?: string;
id: string;
api?: IApi;
type?: IApplicationType;
api_id?: string;
+1 -1
View File
@@ -7,7 +7,7 @@ export interface IApplicationQuery {
offset?: number;
limit?: number;
type?: IApplicationType;
api_id?: string;
api_id?: string | string[];
ordering?: string;
}
+2 -1
View File
@@ -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 {
+17
View File
@@ -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: {
+1 -1
View File
@@ -6,7 +6,7 @@ export interface IApiUsageQuery {
user_id?: string;
offset?: number;
limit?: number;
application_id?: string;
application_id?: string | string[];
ordering?: string;
}