feat(asyncapi): generate ts types according asyncapi

This commit is contained in:
Edouard Vanbelle
2026-09-10 21:33:24 +02:00
parent c4b859c37f
commit 1d280c161c
33 changed files with 4944 additions and 116 deletions
@@ -0,0 +1,9 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface FileCreatedData {
actor: string;
file_id: string;
name: string;
parent_id: string;
}
export type { FileCreatedData as default };
@@ -0,0 +1,8 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface FileDeletedData {
actor: string;
file_id: string;
parent_id: string;
}
export type { FileDeletedData as default };
@@ -0,0 +1,10 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface FileMovedData {
actor: string;
file_id: string;
from: string;
name: string;
to: string;
}
export type { FileMovedData as default };
@@ -0,0 +1,10 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface FileRenamedData {
actor: string;
file_id: string;
new_name: string;
old_name: string;
parent_id: string;
}
export type { FileRenamedData as default };
@@ -0,0 +1,4 @@
import type RtSuccessResponseBody from './RtSuccessResponseBody';
import type RtErrorResponseBody from './RtErrorResponseBody';
type Folder = RtSuccessResponseBody | RtErrorResponseBody;
export type { Folder as default };
@@ -0,0 +1,9 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface FolderCreatedData {
actor: string;
folder_id: string;
name: string;
parent_id: string;
}
export type { FolderCreatedData as default };
@@ -0,0 +1,8 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface FolderDeletedData {
actor: string;
folder_id: string;
parent_id: string;
}
export type { FolderDeletedData as default };
@@ -0,0 +1,10 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface FolderMovedData {
actor: string;
folder_id: string;
from: string;
name: string;
to: string;
}
export type { FolderMovedData as default };
@@ -0,0 +1,10 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface FolderRenamedData {
actor: string;
folder_id: string;
new_name: string;
old_name: string;
parent_id: string;
}
export type { FolderRenamedData as default };
@@ -0,0 +1,14 @@
enum RtErrorCode {
MINUS_32001 = -32001,
MINUS_32002 = -32002,
MINUS_32003 = -32003,
MINUS_32004 = -32004,
MINUS_32005 = -32005,
MINUS_32006 = -32006,
MINUS_32007 = -32007,
MINUS_32603 = -32603,
MINUS_32600 = -32600,
MINUS_32601 = -32601,
MINUS_32602 = -32602
}
export type { RtErrorCode as default };
@@ -0,0 +1,14 @@
enum RtErrorMessage {
NO_READ = 'no_read',
NO_SHARE = 'no_share',
NO_COMMENT = 'no_comment',
TOPIC_FORBIDDEN = 'topic_forbidden',
SUB_LIMIT = 'sub_limit',
RATE_LIMITED = 'rate_limited',
NO_EDIT = 'no_edit',
INTERNAL_ERROR = 'internal_error',
INVALID_REQUEST = 'invalid_request',
METHOD_NOT_FOUND = 'method_not_found',
INVALID_PARAMS = 'invalid_params'
}
export type { RtErrorMessage as default };
@@ -0,0 +1,10 @@
import type RtErrorCode from './RtErrorCode';
import type RtErrorMessage from './RtErrorMessage';
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtErrorObject {
code: RtErrorCode;
data?: unknown;
message: RtErrorMessage;
}
export type { RtErrorObject as default };
@@ -0,0 +1,9 @@
import type RtErrorObject from './RtErrorObject';
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtErrorResponseBody {
error: RtErrorObject;
id: string | null | number | null | null;
jsonrpc: '2.0';
}
export type { RtErrorResponseBody as default };
@@ -0,0 +1,11 @@
enum RtEventKind {
FILE_CREATED = 'file_created',
FILE_RENAMED = 'file_renamed',
FILE_MOVED = 'file_moved',
FILE_DELETED = 'file_deleted',
FOLDER_CREATED = 'folder_created',
FOLDER_RENAMED = 'folder_renamed',
FOLDER_MOVED = 'folder_moved',
FOLDER_DELETED = 'folder_deleted'
}
export type { RtEventKind as default };
@@ -0,0 +1,25 @@
import type FileCreatedData from './FileCreatedData';
import type FileRenamedData from './FileRenamedData';
import type FileMovedData from './FileMovedData';
import type FileDeletedData from './FileDeletedData';
import type FolderCreatedData from './FolderCreatedData';
import type FolderRenamedData from './FolderRenamedData';
import type FolderMovedData from './FolderMovedData';
import type FolderDeletedData from './FolderDeletedData';
import type RtEventKind from './RtEventKind';
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtEventParams {
data:
| FileCreatedData
| FileRenamedData
| FileMovedData
| FileDeletedData
| FolderCreatedData
| FolderRenamedData
| FolderMovedData
| FolderDeletedData;
event: RtEventKind;
topic: string;
}
export type { RtEventParams as default };
@@ -0,0 +1,9 @@
import type RtEventParams from './RtEventParams';
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtFolderEventBody {
jsonrpc: '2.0';
method: 'rt.event';
params: RtEventParams;
}
export type { RtFolderEventBody as default };
@@ -0,0 +1,8 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtPingRequestBody {
id: string | null | number | null | null;
jsonrpc: '2.0';
method: 'rt.ping';
}
export type { RtPingRequestBody as default };
@@ -0,0 +1,9 @@
import type RtPongResult from './RtPongResult';
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtPongResponseBody {
id: string | null | number | null | null;
jsonrpc: '2.0';
result: RtPongResult;
}
export type { RtPongResponseBody as default };
@@ -0,0 +1,6 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtPongResult {
pong: boolean;
}
export type { RtPongResult as default };
@@ -0,0 +1,9 @@
import type RtRevokedParams from './RtRevokedParams';
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtRevokedBody {
jsonrpc: '2.0';
method: 'rt.revoked';
params: RtRevokedParams;
}
export type { RtRevokedBody as default };
@@ -0,0 +1,8 @@
import type RtRevokedReason from './RtRevokedReason';
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtRevokedParams {
reason: RtRevokedReason;
topic: string;
}
export type { RtRevokedParams as default };
@@ -0,0 +1,7 @@
enum RtRevokedReason {
GRANT_REVOKED = 'grant_revoked',
RESOURCE_DELETED = 'resource_deleted',
GROUP_MEMBERSHIP_LOST = 'group_membership_lost',
ADMIN_KICK = 'admin_kick'
}
export type { RtRevokedReason as default };
@@ -0,0 +1,6 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtSubscribeParams {
topic: string;
}
export type { RtSubscribeParams as default };
@@ -0,0 +1,10 @@
import type RtSubscribeParams from './RtSubscribeParams';
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtSubscribeRequestBody {
id: string | null | number | null | null;
jsonrpc: '2.0';
method: 'rt.subscribe';
params?: RtSubscribeParams;
}
export type { RtSubscribeRequestBody as default };
@@ -0,0 +1,8 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtSuccessResponseBody {
id: string | null | number | null | null;
jsonrpc: '2.0';
result: unknown;
}
export type { RtSuccessResponseBody as default };
@@ -0,0 +1,6 @@
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtUnsubscribeParams {
topic: string;
}
export type { RtUnsubscribeParams as default };
@@ -0,0 +1,10 @@
import type RtUnsubscribeParams from './RtUnsubscribeParams';
// AUTO-GENERATED — do not edit by hand.
// Regenerate with `just asyncapi-ts`.
interface RtUnsubscribeRequestBody {
id: string | null | number | null | null;
jsonrpc: '2.0';
method: 'rt.unsubscribe';
params?: RtUnsubscribeParams;
}
export type { RtUnsubscribeRequestBody as default };