@absolutejs/voice 0.0.5 → 0.0.6
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/plugin.d.ts +9 -2
- package/package.json +1 -1
package/dist/plugin.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
|
-
import type { VoicePluginConfig, VoiceSessionRecord } from './types';
|
|
3
|
-
|
|
2
|
+
import type { VoicePluginConfig, VoiceRouteConfig, VoiceSessionRecord } from './types';
|
|
3
|
+
type InferVoiceResult<TOnTurn extends (...args: any) => any> = Exclude<Awaited<ReturnType<TOnTurn>>, void> extends {
|
|
4
|
+
result?: infer TResult;
|
|
5
|
+
} ? TResult : unknown;
|
|
6
|
+
type VoiceOnTurnHandler<TContext, TSession extends VoiceSessionRecord> = VoiceRouteConfig<TContext, TSession, unknown>['onTurn'];
|
|
7
|
+
export declare const voice: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TOnTurn extends VoiceOnTurnHandler<TContext, TSession> = VoiceOnTurnHandler<TContext, TSession>>(config: Omit<VoicePluginConfig<TContext, TSession, InferVoiceResult<TOnTurn>>, "onTurn"> & {
|
|
8
|
+
onTurn: TOnTurn;
|
|
9
|
+
}) => Elysia<"", {
|
|
4
10
|
decorator: {};
|
|
5
11
|
store: {};
|
|
6
12
|
derive: {};
|
|
@@ -66,3 +72,4 @@ export declare const voice: <TContext = unknown, TSession extends VoiceSessionRe
|
|
|
66
72
|
standaloneSchema: {};
|
|
67
73
|
response: {};
|
|
68
74
|
}>;
|
|
75
|
+
export {};
|