Permanent room urls

This commit is contained in:
2024-08-16 22:26:00 +02:00
parent ad84e4626c
commit 55697e670d
20 changed files with 1001 additions and 31 deletions

View File

@@ -53,6 +53,18 @@ export const $CreateParticipant = {
title: "CreateParticipant",
} as const;
export const $CreateRoom = {
properties: {
name: {
type: "string",
title: "Name",
},
},
type: "object",
required: ["name"],
title: "CreateRoom",
} as const;
export const $CreateTranscript = {
properties: {
name: {
@@ -529,6 +541,62 @@ export const $Page_GetTranscript_ = {
title: "Page[GetTranscript]",
} as const;
export const $Page_Room_ = {
properties: {
items: {
items: {
$ref: "#/components/schemas/Room",
},
type: "array",
title: "Items",
},
total: {
type: "integer",
minimum: 0,
title: "Total",
},
page: {
anyOf: [
{
type: "integer",
minimum: 1,
},
{
type: "null",
},
],
title: "Page",
},
size: {
anyOf: [
{
type: "integer",
minimum: 1,
},
{
type: "null",
},
],
title: "Size",
},
pages: {
anyOf: [
{
type: "integer",
minimum: 0,
},
{
type: "null",
},
],
title: "Pages",
},
},
type: "object",
required: ["items", "total", "page", "size"],
title: "Page[Room]",
} as const;
export const $Participant = {
properties: {
id: {
@@ -556,6 +624,31 @@ export const $Participant = {
title: "Participant",
} as const;
export const $Room = {
properties: {
id: {
type: "string",
title: "Id",
},
name: {
type: "string",
title: "Name",
},
user_id: {
type: "string",
title: "User Id",
},
created_at: {
type: "string",
format: "date-time",
title: "Created At",
},
},
type: "object",
required: ["id", "name", "user_id", "created_at"],
title: "Room",
} as const;
export const $RtcOffer = {
properties: {
sdp: {

View File

@@ -6,6 +6,16 @@ import type {
MetricsResponse,
V1MeetingGetData,
V1MeetingGetResponse,
V1MeetingCreateData,
V1MeetingCreateResponse,
V1RoomsListData,
V1RoomsListResponse,
V1RoomsCreateData,
V1RoomsCreateResponse,
V1RoomsDeleteData,
V1RoomsDeleteResponse,
V1RoomsCreateMeetingData,
V1RoomsCreateMeetingResponse,
V1TranscriptsListData,
V1TranscriptsListResponse,
V1TranscriptsCreateData,
@@ -93,6 +103,117 @@ export class DefaultService {
});
}
/**
* Meeting Create
* @param data The data for the request.
* @param data.roomId
* @returns GetMeeting Successful Response
* @throws ApiError
*/
public v1MeetingCreate(
data: V1MeetingCreateData,
): CancelablePromise<V1MeetingCreateResponse> {
return this.httpRequest.request({
method: "POST",
url: "/v1/meetings/",
query: {
room_id: data.roomId,
},
errors: {
422: "Validation Error",
},
});
}
/**
* Rooms List
* @param data The data for the request.
* @param data.page Page number
* @param data.size Page size
* @returns Page_Room_ Successful Response
* @throws ApiError
*/
public v1RoomsList(
data: V1RoomsListData = {},
): CancelablePromise<V1RoomsListResponse> {
return this.httpRequest.request({
method: "GET",
url: "/v1/rooms",
query: {
page: data.page,
size: data.size,
},
errors: {
422: "Validation Error",
},
});
}
/**
* Rooms Create
* @param data The data for the request.
* @param data.requestBody
* @returns Room Successful Response
* @throws ApiError
*/
public v1RoomsCreate(
data: V1RoomsCreateData,
): CancelablePromise<V1RoomsCreateResponse> {
return this.httpRequest.request({
method: "POST",
url: "/v1/rooms",
body: data.requestBody,
mediaType: "application/json",
errors: {
422: "Validation Error",
},
});
}
/**
* Rooms Delete
* @param data The data for the request.
* @param data.roomId
* @returns DeletionStatus Successful Response
* @throws ApiError
*/
public v1RoomsDelete(
data: V1RoomsDeleteData,
): CancelablePromise<V1RoomsDeleteResponse> {
return this.httpRequest.request({
method: "DELETE",
url: "/v1/rooms/{room_id}",
path: {
room_id: data.roomId,
},
errors: {
422: "Validation Error",
},
});
}
/**
* Rooms Create Meeting
* @param data The data for the request.
* @param data.roomName
* @returns GetMeeting Successful Response
* @throws ApiError
*/
public v1RoomsCreateMeeting(
data: V1RoomsCreateMeetingData,
): CancelablePromise<V1RoomsCreateMeetingResponse> {
return this.httpRequest.request({
method: "POST",
url: "/v1/rooms/{room_name}/meeting",
path: {
room_name: data.roomName,
},
errors: {
422: "Validation Error",
},
});
}
/**
* Transcripts List
* @param data The data for the request.

View File

@@ -14,6 +14,10 @@ export type CreateParticipant = {
name: string;
};
export type CreateRoom = {
name: string;
};
export type CreateTranscript = {
name: string;
source_language?: string;
@@ -103,12 +107,27 @@ export type Page_GetTranscript_ = {
pages?: number | null;
};
export type Page_Room_ = {
items: Array<Room>;
total: number;
page: number | null;
size: number | null;
pages?: number | null;
};
export type Participant = {
id: string;
speaker: number | null;
name: string;
};
export type Room = {
id: string;
name: string;
user_id: string;
created_at: string;
};
export type RtcOffer = {
sdp: string;
type: string;
@@ -184,6 +203,43 @@ export type V1MeetingGetData = {
export type V1MeetingGetResponse = GetMeeting;
export type V1MeetingCreateData = {
roomId: string;
};
export type V1MeetingCreateResponse = GetMeeting;
export type V1RoomsListData = {
/**
* Page number
*/
page?: number;
/**
* Page size
*/
size?: number;
};
export type V1RoomsListResponse = Page_Room_;
export type V1RoomsCreateData = {
requestBody: CreateRoom;
};
export type V1RoomsCreateResponse = Room;
export type V1RoomsDeleteData = {
roomId: string;
};
export type V1RoomsDeleteResponse = DeletionStatus;
export type V1RoomsCreateMeetingData = {
roomName: string;
};
export type V1RoomsCreateMeetingResponse = GetMeeting;
export type V1TranscriptsListData = {
/**
* Page number
@@ -374,6 +430,79 @@ export type $OpenApiTs = {
};
};
};
"/v1/meetings/": {
post: {
req: V1MeetingCreateData;
res: {
/**
* Successful Response
*/
200: GetMeeting;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
"/v1/rooms": {
get: {
req: V1RoomsListData;
res: {
/**
* Successful Response
*/
200: Page_Room_;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
post: {
req: V1RoomsCreateData;
res: {
/**
* Successful Response
*/
200: Room;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
"/v1/rooms/{room_id}": {
delete: {
req: V1RoomsDeleteData;
res: {
/**
* Successful Response
*/
200: DeletionStatus;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
"/v1/rooms/{room_name}/meeting": {
post: {
req: V1RoomsCreateMeetingData;
res: {
/**
* Successful Response
*/
200: GetMeeting;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
"/v1/transcripts": {
get: {
req: V1TranscriptsListData;