Replace streams json

This commit is contained in:
2024-09-06 17:26:32 +02:00
parent 5267ab2d37
commit 901de8c009
7 changed files with 247 additions and 53 deletions

View File

@@ -828,6 +828,34 @@ export const $SpeakerWords = {
title: "SpeakerWords",
} as const;
export const $Stream = {
properties: {
stream_id: {
type: "integer",
title: "Stream Id",
},
name: {
type: "string",
title: "Name",
},
},
type: "object",
required: ["stream_id", "name"],
title: "Stream",
} as const;
export const $Topic = {
properties: {
name: {
type: "string",
title: "Name",
},
},
type: "object",
required: ["name"],
title: "Topic",
} as const;
export const $TranscriptParticipant = {
properties: {
id: {

View File

@@ -61,6 +61,9 @@ import type {
V1TranscriptProcessData,
V1TranscriptProcessResponse,
V1UserMeResponse,
V1ZulipGetStreamsResponse,
V1ZulipGetTopicsData,
V1ZulipGetTopicsResponse,
} from "./types.gen";
export class DefaultService {
@@ -762,4 +765,40 @@ export class DefaultService {
url: "/v1/me",
});
}
/**
* Zulip Get Streams
* Get all Zulip streams.
* @returns Stream Successful Response
* @throws ApiError
*/
public v1ZulipGetStreams(): CancelablePromise<V1ZulipGetStreamsResponse> {
return this.httpRequest.request({
method: "GET",
url: "/v1/zulip/streams",
});
}
/**
* Zulip Get Topics
* Get all topics for a specific Zulip stream.
* @param data The data for the request.
* @param data.streamId
* @returns Topic Successful Response
* @throws ApiError
*/
public v1ZulipGetTopics(
data: V1ZulipGetTopicsData,
): CancelablePromise<V1ZulipGetTopicsResponse> {
return this.httpRequest.request({
method: "GET",
url: "/v1/zulip/streams/{stream_id}/topics",
path: {
stream_id: data.streamId,
},
errors: {
422: "Validation Error",
},
});
}
}

View File

@@ -168,6 +168,15 @@ export type SpeakerWords = {
words: Array<Word>;
};
export type Stream = {
stream_id: number;
name: string;
};
export type Topic = {
name: string;
};
export type TranscriptParticipant = {
id?: string;
speaker: number | null;
@@ -427,6 +436,14 @@ export type V1TranscriptProcessResponse = unknown;
export type V1UserMeResponse = UserInfo | null;
export type V1ZulipGetStreamsResponse = Array<Stream>;
export type V1ZulipGetTopicsData = {
streamId: number;
};
export type V1ZulipGetTopicsResponse = Array<Topic>;
export type $OpenApiTs = {
"/metrics": {
get: {
@@ -850,4 +867,29 @@ export type $OpenApiTs = {
};
};
};
"/v1/zulip/streams": {
get: {
res: {
/**
* Successful Response
*/
200: Array<Stream>;
};
};
};
"/v1/zulip/streams/{stream_id}/topics": {
get: {
req: V1ZulipGetTopicsData;
res: {
/**
* Successful Response
*/
200: Array<Topic>;
/**
* Validation Error
*/
422: HTTPValidationError;
};
};
};
};