mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-13 13:22:57 +00:00
revised types for voice designer endpoints
This commit is contained in:
1 parent
bff249a4fa
commit
8d26a6a0d6
4 files changed
+34
-31
No files matched your search
@@ -1,13 +1,13 @@
|
||||
import { GrabEndpoint } from "../GrabEndpoint"
|
||||
|
||||
interface CreateVoiceRequest {
|
||||
// args
|
||||
example_token: String;
|
||||
uuid_idempotency_token: string,
|
||||
voice_dataset_token: string,
|
||||
}
|
||||
|
||||
interface CreateVoiceResponse {
|
||||
// args
|
||||
name: string,
|
||||
success: boolean,
|
||||
inference_job_token: string,
|
||||
}
|
||||
|
||||
const CreateVoice = GrabEndpoint<string, CreateVoiceRequest, CreateVoiceResponse>({
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
import { GrabEndpoint } from "../GrabEndpoint"
|
||||
|
||||
interface CreateVoiceRequest {
|
||||
// args
|
||||
example_token: String;
|
||||
interface DreateVoiceRequest {
|
||||
set_delete: boolean,
|
||||
as_mod: boolean
|
||||
},
|
||||
|
||||
interface DreateVoiceResponse {
|
||||
success: boolean
|
||||
}
|
||||
|
||||
interface CreateVoiceResponse {
|
||||
// args
|
||||
name: string,
|
||||
}
|
||||
|
||||
const DeleteVoice = GrabEndpoint<string, CreateVoiceRequest, CreateVoiceResponse>({
|
||||
method: "POST",
|
||||
routingFunction: (voiceToken: string) => `${ voiceToken }/delete`,
|
||||
const DeleteVoice = GrabEndpoint<string, DreateVoiceRequest, DreateVoiceResponse>({
|
||||
method: "POST",
|
||||
routingFunction: (voiceToken: string) => `${ voiceToken }/delete`,
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
import { GrabEndpoint } from "../GrabEndpoint"
|
||||
|
||||
interface CreateVoiceRequest {
|
||||
// args
|
||||
example_token: String;
|
||||
interface ListVoiceRequest {}
|
||||
|
||||
interface ListVoiceResponse {
|
||||
voice_token: string,
|
||||
title: string,
|
||||
creator_set_visibility: string,
|
||||
ietf_language_tag: string,
|
||||
ietf_primary_language_subtag: string,
|
||||
creator_user_token: string,
|
||||
creator_username: string,
|
||||
created_at: Date,
|
||||
updated_at: Date,
|
||||
}
|
||||
|
||||
interface CreateVoiceResponse {
|
||||
// args
|
||||
name: string,
|
||||
}
|
||||
|
||||
const List = GrabEndpoint<string, CreateVoiceRequest, CreateVoiceResponse>({
|
||||
const List = GrabEndpoint<string, ListVoiceRequest, ListVoiceResponse>({
|
||||
method: "GET",
|
||||
routingFunction: (userToken: string) => `user/${ userToken }/list`,
|
||||
});
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { GrabEndpoint } from "../GrabEndpoint"
|
||||
|
||||
interface CreateVoiceRequest {
|
||||
// args
|
||||
example_token: String;
|
||||
interface UpdateVoiceRequest {
|
||||
title: string,
|
||||
creator_set_visibility: string,
|
||||
ietf_language_tag: string,
|
||||
}
|
||||
|
||||
interface CreateVoiceResponse {
|
||||
// args
|
||||
name: string,
|
||||
interface UpdateVoiceResponse {
|
||||
success: boolean,
|
||||
}
|
||||
|
||||
const UpdateVoice = GrabEndpoint<string, CreateVoiceRequest, CreateVoiceResponse>({
|
||||
const UpdateVoice = GrabEndpoint<string, UpdateVoiceRequest, UpdateVoiceResponse>({
|
||||
method: "PATCH",
|
||||
routingFunction: (voiceToken: string) => `${ voiceToken }/update`,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user