@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.
Files changed (2) hide show
  1. package/dist/plugin.d.ts +9 -2
  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
- export declare const voice: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown>(config: VoicePluginConfig<TContext, TSession, TResult>) => Elysia<"", {
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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",