better-call 1.0.20 → 1.0.21
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/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/index.cjs +2 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/dist/node.d.cts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/{router-BDQGRZdc.d.cts → router-DCy0wnVr.d.cts} +0 -45
- package/dist/{router-BDQGRZdc.d.ts → router-DCy0wnVr.d.ts} +0 -45
- package/package.json +1 -1
package/dist/node.d.cts
CHANGED
package/dist/node.d.ts
CHANGED
|
@@ -1084,7 +1084,6 @@ type EndpointContext<Path extends string, Options extends EndpointOptions, Conte
|
|
|
1084
1084
|
code?: string;
|
|
1085
1085
|
} & Record<string, any>, headers?: HeadersInit) => APIError;
|
|
1086
1086
|
};
|
|
1087
|
-
declare const originalHandlerSymbol: unique symbol;
|
|
1088
1087
|
declare const createEndpoint: {
|
|
1089
1088
|
<Path extends string, Options extends EndpointOptions, R extends Promise<any>>(path: Path, options: Options, handler: (context: EndpointContext<Path, Options>) => R): {
|
|
1090
1089
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(...inputCtx: HasRequiredKeys<InputContext<Path, Options>> extends true ? [InputContext<Path, Options> & {
|
|
@@ -1470,47 +1469,36 @@ declare const createEndpoint: {
|
|
|
1470
1469
|
wrap<T_10>(fn: (context: EndpointContext<Path, Options>, original: (context: EndpointContext<Path, Options>) => Promise<Promise<T_9>>) => T_10): /*elided*/ any;
|
|
1471
1470
|
options: Options;
|
|
1472
1471
|
path: Path;
|
|
1473
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_9>;
|
|
1474
1472
|
};
|
|
1475
1473
|
options: Options;
|
|
1476
1474
|
path: Path;
|
|
1477
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_8>;
|
|
1478
1475
|
};
|
|
1479
1476
|
options: Options;
|
|
1480
1477
|
path: Path;
|
|
1481
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_7>;
|
|
1482
1478
|
};
|
|
1483
1479
|
options: Options;
|
|
1484
1480
|
path: Path;
|
|
1485
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_6>;
|
|
1486
1481
|
};
|
|
1487
1482
|
options: Options;
|
|
1488
1483
|
path: Path;
|
|
1489
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_5>;
|
|
1490
1484
|
};
|
|
1491
1485
|
options: Options;
|
|
1492
1486
|
path: Path;
|
|
1493
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_4>;
|
|
1494
1487
|
};
|
|
1495
1488
|
options: Options;
|
|
1496
1489
|
path: Path;
|
|
1497
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_3>;
|
|
1498
1490
|
};
|
|
1499
1491
|
options: Options;
|
|
1500
1492
|
path: Path;
|
|
1501
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_2>;
|
|
1502
1493
|
};
|
|
1503
1494
|
options: Options;
|
|
1504
1495
|
path: Path;
|
|
1505
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_1>;
|
|
1506
1496
|
};
|
|
1507
1497
|
options: Options;
|
|
1508
1498
|
path: Path;
|
|
1509
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T>;
|
|
1510
1499
|
};
|
|
1511
1500
|
options: Options;
|
|
1512
1501
|
path: Path;
|
|
1513
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => R;
|
|
1514
1502
|
};
|
|
1515
1503
|
create<E extends {
|
|
1516
1504
|
use?: Middleware[];
|
|
@@ -2652,89 +2640,56 @@ declare const createEndpoint: {
|
|
|
2652
2640
|
use: any[];
|
|
2653
2641
|
};
|
|
2654
2642
|
path: Path;
|
|
2655
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2656
|
-
use: any[];
|
|
2657
|
-
}, {}>) => Promise<T_9>;
|
|
2658
2643
|
};
|
|
2659
2644
|
options: Opts & {
|
|
2660
2645
|
use: any[];
|
|
2661
2646
|
};
|
|
2662
2647
|
path: Path;
|
|
2663
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2664
|
-
use: any[];
|
|
2665
|
-
}, {}>) => Promise<T_8>;
|
|
2666
2648
|
};
|
|
2667
2649
|
options: Opts & {
|
|
2668
2650
|
use: any[];
|
|
2669
2651
|
};
|
|
2670
2652
|
path: Path;
|
|
2671
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2672
|
-
use: any[];
|
|
2673
|
-
}, {}>) => Promise<T_7>;
|
|
2674
2653
|
};
|
|
2675
2654
|
options: Opts & {
|
|
2676
2655
|
use: any[];
|
|
2677
2656
|
};
|
|
2678
2657
|
path: Path;
|
|
2679
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2680
|
-
use: any[];
|
|
2681
|
-
}, {}>) => Promise<T_6>;
|
|
2682
2658
|
};
|
|
2683
2659
|
options: Opts & {
|
|
2684
2660
|
use: any[];
|
|
2685
2661
|
};
|
|
2686
2662
|
path: Path;
|
|
2687
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2688
|
-
use: any[];
|
|
2689
|
-
}, {}>) => Promise<T_5>;
|
|
2690
2663
|
};
|
|
2691
2664
|
options: Opts & {
|
|
2692
2665
|
use: any[];
|
|
2693
2666
|
};
|
|
2694
2667
|
path: Path;
|
|
2695
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2696
|
-
use: any[];
|
|
2697
|
-
}, {}>) => Promise<T_4>;
|
|
2698
2668
|
};
|
|
2699
2669
|
options: Opts & {
|
|
2700
2670
|
use: any[];
|
|
2701
2671
|
};
|
|
2702
2672
|
path: Path;
|
|
2703
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2704
|
-
use: any[];
|
|
2705
|
-
}, {}>) => Promise<T_3>;
|
|
2706
2673
|
};
|
|
2707
2674
|
options: Opts & {
|
|
2708
2675
|
use: any[];
|
|
2709
2676
|
};
|
|
2710
2677
|
path: Path;
|
|
2711
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2712
|
-
use: any[];
|
|
2713
|
-
}, {}>) => Promise<T_2>;
|
|
2714
2678
|
};
|
|
2715
2679
|
options: Opts & {
|
|
2716
2680
|
use: any[];
|
|
2717
2681
|
};
|
|
2718
2682
|
path: Path;
|
|
2719
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2720
|
-
use: any[];
|
|
2721
|
-
}, {}>) => Promise<T_1>;
|
|
2722
2683
|
};
|
|
2723
2684
|
options: Opts & {
|
|
2724
2685
|
use: any[];
|
|
2725
2686
|
};
|
|
2726
2687
|
path: Path;
|
|
2727
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2728
|
-
use: any[];
|
|
2729
|
-
}, {}>) => Promise<T>;
|
|
2730
2688
|
};
|
|
2731
2689
|
options: Opts & {
|
|
2732
2690
|
use: any[];
|
|
2733
2691
|
};
|
|
2734
2692
|
path: Path;
|
|
2735
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2736
|
-
use: any[];
|
|
2737
|
-
}, {}>) => R;
|
|
2738
2693
|
};
|
|
2739
2694
|
};
|
|
2740
2695
|
type Endpoint<Path extends string = string, Options extends EndpointOptions = EndpointOptions, Handler extends (inputCtx: any) => Promise<any> = (inputCtx: any) => Promise<any>> = Handler & {
|
|
@@ -1084,7 +1084,6 @@ type EndpointContext<Path extends string, Options extends EndpointOptions, Conte
|
|
|
1084
1084
|
code?: string;
|
|
1085
1085
|
} & Record<string, any>, headers?: HeadersInit) => APIError;
|
|
1086
1086
|
};
|
|
1087
|
-
declare const originalHandlerSymbol: unique symbol;
|
|
1088
1087
|
declare const createEndpoint: {
|
|
1089
1088
|
<Path extends string, Options extends EndpointOptions, R extends Promise<any>>(path: Path, options: Options, handler: (context: EndpointContext<Path, Options>) => R): {
|
|
1090
1089
|
<AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(...inputCtx: HasRequiredKeys<InputContext<Path, Options>> extends true ? [InputContext<Path, Options> & {
|
|
@@ -1470,47 +1469,36 @@ declare const createEndpoint: {
|
|
|
1470
1469
|
wrap<T_10>(fn: (context: EndpointContext<Path, Options>, original: (context: EndpointContext<Path, Options>) => Promise<Promise<T_9>>) => T_10): /*elided*/ any;
|
|
1471
1470
|
options: Options;
|
|
1472
1471
|
path: Path;
|
|
1473
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_9>;
|
|
1474
1472
|
};
|
|
1475
1473
|
options: Options;
|
|
1476
1474
|
path: Path;
|
|
1477
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_8>;
|
|
1478
1475
|
};
|
|
1479
1476
|
options: Options;
|
|
1480
1477
|
path: Path;
|
|
1481
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_7>;
|
|
1482
1478
|
};
|
|
1483
1479
|
options: Options;
|
|
1484
1480
|
path: Path;
|
|
1485
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_6>;
|
|
1486
1481
|
};
|
|
1487
1482
|
options: Options;
|
|
1488
1483
|
path: Path;
|
|
1489
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_5>;
|
|
1490
1484
|
};
|
|
1491
1485
|
options: Options;
|
|
1492
1486
|
path: Path;
|
|
1493
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_4>;
|
|
1494
1487
|
};
|
|
1495
1488
|
options: Options;
|
|
1496
1489
|
path: Path;
|
|
1497
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_3>;
|
|
1498
1490
|
};
|
|
1499
1491
|
options: Options;
|
|
1500
1492
|
path: Path;
|
|
1501
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_2>;
|
|
1502
1493
|
};
|
|
1503
1494
|
options: Options;
|
|
1504
1495
|
path: Path;
|
|
1505
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T_1>;
|
|
1506
1496
|
};
|
|
1507
1497
|
options: Options;
|
|
1508
1498
|
path: Path;
|
|
1509
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => Promise<T>;
|
|
1510
1499
|
};
|
|
1511
1500
|
options: Options;
|
|
1512
1501
|
path: Path;
|
|
1513
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Options>) => R;
|
|
1514
1502
|
};
|
|
1515
1503
|
create<E extends {
|
|
1516
1504
|
use?: Middleware[];
|
|
@@ -2652,89 +2640,56 @@ declare const createEndpoint: {
|
|
|
2652
2640
|
use: any[];
|
|
2653
2641
|
};
|
|
2654
2642
|
path: Path;
|
|
2655
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2656
|
-
use: any[];
|
|
2657
|
-
}, {}>) => Promise<T_9>;
|
|
2658
2643
|
};
|
|
2659
2644
|
options: Opts & {
|
|
2660
2645
|
use: any[];
|
|
2661
2646
|
};
|
|
2662
2647
|
path: Path;
|
|
2663
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2664
|
-
use: any[];
|
|
2665
|
-
}, {}>) => Promise<T_8>;
|
|
2666
2648
|
};
|
|
2667
2649
|
options: Opts & {
|
|
2668
2650
|
use: any[];
|
|
2669
2651
|
};
|
|
2670
2652
|
path: Path;
|
|
2671
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2672
|
-
use: any[];
|
|
2673
|
-
}, {}>) => Promise<T_7>;
|
|
2674
2653
|
};
|
|
2675
2654
|
options: Opts & {
|
|
2676
2655
|
use: any[];
|
|
2677
2656
|
};
|
|
2678
2657
|
path: Path;
|
|
2679
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2680
|
-
use: any[];
|
|
2681
|
-
}, {}>) => Promise<T_6>;
|
|
2682
2658
|
};
|
|
2683
2659
|
options: Opts & {
|
|
2684
2660
|
use: any[];
|
|
2685
2661
|
};
|
|
2686
2662
|
path: Path;
|
|
2687
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2688
|
-
use: any[];
|
|
2689
|
-
}, {}>) => Promise<T_5>;
|
|
2690
2663
|
};
|
|
2691
2664
|
options: Opts & {
|
|
2692
2665
|
use: any[];
|
|
2693
2666
|
};
|
|
2694
2667
|
path: Path;
|
|
2695
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2696
|
-
use: any[];
|
|
2697
|
-
}, {}>) => Promise<T_4>;
|
|
2698
2668
|
};
|
|
2699
2669
|
options: Opts & {
|
|
2700
2670
|
use: any[];
|
|
2701
2671
|
};
|
|
2702
2672
|
path: Path;
|
|
2703
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2704
|
-
use: any[];
|
|
2705
|
-
}, {}>) => Promise<T_3>;
|
|
2706
2673
|
};
|
|
2707
2674
|
options: Opts & {
|
|
2708
2675
|
use: any[];
|
|
2709
2676
|
};
|
|
2710
2677
|
path: Path;
|
|
2711
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2712
|
-
use: any[];
|
|
2713
|
-
}, {}>) => Promise<T_2>;
|
|
2714
2678
|
};
|
|
2715
2679
|
options: Opts & {
|
|
2716
2680
|
use: any[];
|
|
2717
2681
|
};
|
|
2718
2682
|
path: Path;
|
|
2719
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2720
|
-
use: any[];
|
|
2721
|
-
}, {}>) => Promise<T_1>;
|
|
2722
2683
|
};
|
|
2723
2684
|
options: Opts & {
|
|
2724
2685
|
use: any[];
|
|
2725
2686
|
};
|
|
2726
2687
|
path: Path;
|
|
2727
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2728
|
-
use: any[];
|
|
2729
|
-
}, {}>) => Promise<T>;
|
|
2730
2688
|
};
|
|
2731
2689
|
options: Opts & {
|
|
2732
2690
|
use: any[];
|
|
2733
2691
|
};
|
|
2734
2692
|
path: Path;
|
|
2735
|
-
[originalHandlerSymbol]: (context: EndpointContext<Path, Opts & {
|
|
2736
|
-
use: any[];
|
|
2737
|
-
}, {}>) => R;
|
|
2738
2693
|
};
|
|
2739
2694
|
};
|
|
2740
2695
|
type Endpoint<Path extends string = string, Options extends EndpointOptions = EndpointOptions, Handler extends (inputCtx: any) => Promise<any> = (inputCtx: any) => Promise<any>> = Handler & {
|