theragist-ts 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/call/message.d.ts +179 -0
- package/dist/call/message.js +2206 -0
- package/dist/call/service.d.ts +129 -0
- package/dist/call/service.js +477 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +163 -135
- package/package.json +1 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "pb";
|
|
3
|
+
export interface InitiateCallRequest {
|
|
4
|
+
/** video, audio */
|
|
5
|
+
callType: string;
|
|
6
|
+
/** therapy_session, direct_call, group_call */
|
|
7
|
+
roomType: string;
|
|
8
|
+
/** required for therapy_session */
|
|
9
|
+
liveSessionId: string;
|
|
10
|
+
/** required for group_call */
|
|
11
|
+
groupId: string;
|
|
12
|
+
/** required for direct_call */
|
|
13
|
+
inviteeId: string;
|
|
14
|
+
recordingEnabled: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface InitiateCallResponse {
|
|
17
|
+
room: CallRoom | undefined;
|
|
18
|
+
token: string;
|
|
19
|
+
livekitUrl: string;
|
|
20
|
+
}
|
|
21
|
+
export interface JoinCallRequest {
|
|
22
|
+
roomId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface JoinCallResponse {
|
|
25
|
+
room: CallRoom | undefined;
|
|
26
|
+
token: string;
|
|
27
|
+
livekitUrl: string;
|
|
28
|
+
}
|
|
29
|
+
export interface LeaveCallRequest {
|
|
30
|
+
roomId: string;
|
|
31
|
+
}
|
|
32
|
+
export interface LeaveCallResponse {
|
|
33
|
+
success: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface EndCallRequest {
|
|
36
|
+
roomId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface EndCallResponse {
|
|
39
|
+
room: CallRoom | undefined;
|
|
40
|
+
}
|
|
41
|
+
export interface GetCallTokenRequest {
|
|
42
|
+
roomId: string;
|
|
43
|
+
}
|
|
44
|
+
export interface GetCallTokenResponse {
|
|
45
|
+
token: string;
|
|
46
|
+
livekitUrl: string;
|
|
47
|
+
expiresAt: number;
|
|
48
|
+
}
|
|
49
|
+
export interface GetCallStatusRequest {
|
|
50
|
+
roomId: string;
|
|
51
|
+
}
|
|
52
|
+
export interface GetCallStatusResponse {
|
|
53
|
+
room: CallRoom | undefined;
|
|
54
|
+
participants: CallParticipant[];
|
|
55
|
+
}
|
|
56
|
+
export interface RespondToInvitationRequest {
|
|
57
|
+
invitationId: string;
|
|
58
|
+
accept: boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface RespondToInvitationResponse {
|
|
61
|
+
room: CallRoom | undefined;
|
|
62
|
+
token: string;
|
|
63
|
+
livekitUrl: string;
|
|
64
|
+
}
|
|
65
|
+
export interface ListPendingInvitationsRequest {
|
|
66
|
+
}
|
|
67
|
+
export interface ListPendingInvitationsResponse {
|
|
68
|
+
invitations: CallInvitation[];
|
|
69
|
+
}
|
|
70
|
+
export interface ListActiveCallsRequest {
|
|
71
|
+
}
|
|
72
|
+
export interface ListActiveCallsResponse {
|
|
73
|
+
rooms: CallRoom[];
|
|
74
|
+
}
|
|
75
|
+
export interface GetCallHistoryRequest {
|
|
76
|
+
page: number;
|
|
77
|
+
pageSize: number;
|
|
78
|
+
}
|
|
79
|
+
export interface GetCallHistoryResponse {
|
|
80
|
+
calls: CallHistoryItem[];
|
|
81
|
+
total: number;
|
|
82
|
+
}
|
|
83
|
+
export interface CallRoom {
|
|
84
|
+
id: string;
|
|
85
|
+
roomName: string;
|
|
86
|
+
roomType: string;
|
|
87
|
+
callType: string;
|
|
88
|
+
liveSessionId: string;
|
|
89
|
+
groupId: string;
|
|
90
|
+
createdBy: string;
|
|
91
|
+
status: string;
|
|
92
|
+
startedAt: string;
|
|
93
|
+
endedAt: string;
|
|
94
|
+
durationSeconds: number;
|
|
95
|
+
maxParticipants: number;
|
|
96
|
+
recordingEnabled: boolean;
|
|
97
|
+
recordingUrl: string;
|
|
98
|
+
activeParticipants: number;
|
|
99
|
+
createdAt: string;
|
|
100
|
+
}
|
|
101
|
+
export interface CallParticipant {
|
|
102
|
+
id: string;
|
|
103
|
+
roomId: string;
|
|
104
|
+
userId: string;
|
|
105
|
+
fullName: string;
|
|
106
|
+
avatarUrl: string;
|
|
107
|
+
userRole: string;
|
|
108
|
+
participantRole: string;
|
|
109
|
+
status: string;
|
|
110
|
+
joinedAt: string;
|
|
111
|
+
leftAt: string;
|
|
112
|
+
durationSeconds: number;
|
|
113
|
+
connectionQuality: string;
|
|
114
|
+
isMuted: boolean;
|
|
115
|
+
isVideoOff: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface CallInvitation {
|
|
118
|
+
id: string;
|
|
119
|
+
roomId: string;
|
|
120
|
+
roomName: string;
|
|
121
|
+
roomType: string;
|
|
122
|
+
callType: string;
|
|
123
|
+
inviterId: string;
|
|
124
|
+
inviterName: string;
|
|
125
|
+
inviterAvatar: string;
|
|
126
|
+
status: string;
|
|
127
|
+
expiresAt: string;
|
|
128
|
+
createdAt: string;
|
|
129
|
+
}
|
|
130
|
+
export interface CallHistoryItem {
|
|
131
|
+
room: CallRoom | undefined;
|
|
132
|
+
participantRole: string;
|
|
133
|
+
joinedAt: string;
|
|
134
|
+
leftAt: string;
|
|
135
|
+
participantDuration: number;
|
|
136
|
+
}
|
|
137
|
+
export declare const InitiateCallRequest: MessageFns<InitiateCallRequest>;
|
|
138
|
+
export declare const InitiateCallResponse: MessageFns<InitiateCallResponse>;
|
|
139
|
+
export declare const JoinCallRequest: MessageFns<JoinCallRequest>;
|
|
140
|
+
export declare const JoinCallResponse: MessageFns<JoinCallResponse>;
|
|
141
|
+
export declare const LeaveCallRequest: MessageFns<LeaveCallRequest>;
|
|
142
|
+
export declare const LeaveCallResponse: MessageFns<LeaveCallResponse>;
|
|
143
|
+
export declare const EndCallRequest: MessageFns<EndCallRequest>;
|
|
144
|
+
export declare const EndCallResponse: MessageFns<EndCallResponse>;
|
|
145
|
+
export declare const GetCallTokenRequest: MessageFns<GetCallTokenRequest>;
|
|
146
|
+
export declare const GetCallTokenResponse: MessageFns<GetCallTokenResponse>;
|
|
147
|
+
export declare const GetCallStatusRequest: MessageFns<GetCallStatusRequest>;
|
|
148
|
+
export declare const GetCallStatusResponse: MessageFns<GetCallStatusResponse>;
|
|
149
|
+
export declare const RespondToInvitationRequest: MessageFns<RespondToInvitationRequest>;
|
|
150
|
+
export declare const RespondToInvitationResponse: MessageFns<RespondToInvitationResponse>;
|
|
151
|
+
export declare const ListPendingInvitationsRequest: MessageFns<ListPendingInvitationsRequest>;
|
|
152
|
+
export declare const ListPendingInvitationsResponse: MessageFns<ListPendingInvitationsResponse>;
|
|
153
|
+
export declare const ListActiveCallsRequest: MessageFns<ListActiveCallsRequest>;
|
|
154
|
+
export declare const ListActiveCallsResponse: MessageFns<ListActiveCallsResponse>;
|
|
155
|
+
export declare const GetCallHistoryRequest: MessageFns<GetCallHistoryRequest>;
|
|
156
|
+
export declare const GetCallHistoryResponse: MessageFns<GetCallHistoryResponse>;
|
|
157
|
+
export declare const CallRoom: MessageFns<CallRoom>;
|
|
158
|
+
export declare const CallParticipant: MessageFns<CallParticipant>;
|
|
159
|
+
export declare const CallInvitation: MessageFns<CallInvitation>;
|
|
160
|
+
export declare const CallHistoryItem: MessageFns<CallHistoryItem>;
|
|
161
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
162
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
163
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
164
|
+
} : Partial<T>;
|
|
165
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
166
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
167
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
168
|
+
} & {
|
|
169
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
170
|
+
};
|
|
171
|
+
export interface MessageFns<T> {
|
|
172
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
173
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
174
|
+
fromJSON(object: any): T;
|
|
175
|
+
toJSON(message: T): unknown;
|
|
176
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
177
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
178
|
+
}
|
|
179
|
+
export {};
|