@framebreak/types 0.1.19 → 0.1.20
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/index.d.ts +36 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _orpc_server from '@orpc/server';
|
|
2
|
+
import { InferRouterOutputs, InferRouterInputs } from '@orpc/server';
|
|
2
3
|
import * as better_auth from 'better-auth';
|
|
3
4
|
import * as zod from 'zod';
|
|
4
5
|
import * as _orpc_contract from '@orpc/contract';
|
|
@@ -5497,4 +5498,38 @@ declare const v1Router: {
|
|
|
5497
5498
|
};
|
|
5498
5499
|
type V1Router = typeof v1Router;
|
|
5499
5500
|
|
|
5500
|
-
|
|
5501
|
+
/**
|
|
5502
|
+
* @framebreak/api-types
|
|
5503
|
+
*
|
|
5504
|
+
* Type definitions for the Framebreak API.
|
|
5505
|
+
* Use with @orpc/client to create a fully-typed API client.
|
|
5506
|
+
*
|
|
5507
|
+
* @example
|
|
5508
|
+
* ```ts
|
|
5509
|
+
* import type { V1Router, RouterOutputs, RouterInputs } from '@framebreak/api-types';
|
|
5510
|
+
* import { createORPCClient } from '@orpc/client';
|
|
5511
|
+
*
|
|
5512
|
+
* const client = createORPCClient<V1Router>(link);
|
|
5513
|
+
*
|
|
5514
|
+
* // Use inferred types
|
|
5515
|
+
* type Note = RouterOutputs['notes']['get']['data'];
|
|
5516
|
+
* type ListNotesInput = RouterInputs['notes']['list'];
|
|
5517
|
+
* ```
|
|
5518
|
+
*/
|
|
5519
|
+
|
|
5520
|
+
/**
|
|
5521
|
+
* Inferred output types for all routes.
|
|
5522
|
+
* @example
|
|
5523
|
+
* type Note = RouterOutputs['notes']['get']['data'];
|
|
5524
|
+
* type CommunityPost = RouterOutputs['community']['posts']['get']['data'];
|
|
5525
|
+
*/
|
|
5526
|
+
type RouterOutputs = InferRouterOutputs<V1Router>;
|
|
5527
|
+
/**
|
|
5528
|
+
* Inferred input types for all routes.
|
|
5529
|
+
* @example
|
|
5530
|
+
* type ListNotesInput = RouterInputs['notes']['list'];
|
|
5531
|
+
* type CreateNoteInput = RouterInputs['notes']['create'];
|
|
5532
|
+
*/
|
|
5533
|
+
type RouterInputs = InferRouterInputs<V1Router>;
|
|
5534
|
+
|
|
5535
|
+
export type { RouterInputs, RouterOutputs, V1Router };
|