@framebreak/types 0.1.19 → 0.1.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +719 -6
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,9 +1,27 @@
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';
5
6
  import { LoggerContext } from '@orpc/experimental-pino';
6
7
 
8
+ /**
9
+ * Kit (ConvertKit) broadcast utilities for importing articles.
10
+ * Used by both the admin UI and CLI import scripts.
11
+ */
12
+ interface KitBroadcast {
13
+ id: number;
14
+ subject: string;
15
+ preview_text: string | null;
16
+ content: string | null;
17
+ published_at: string | null;
18
+ thumbnail_url: string | null;
19
+ }
20
+ interface ResolvedLink {
21
+ original: string;
22
+ resolved: string;
23
+ }
24
+
7
25
  /**
8
26
  * Base context that accepts headers for authentication.
9
27
  * This is the foundation for all ORPC procedures.
@@ -44,17 +62,27 @@ interface CommentAuthor {
44
62
  image: string | null;
45
63
  linkedinVerified?: boolean | null;
46
64
  }
65
+ interface CommentLink {
66
+ url: string;
67
+ title: string | null;
68
+ description: string | null;
69
+ image: string | null;
70
+ favicon: string | null;
71
+ siteName: string | null;
72
+ }
47
73
  interface Comment {
48
74
  id: string;
49
75
  postId: string;
50
76
  parentId: string | null;
51
77
  content: string;
78
+ link: CommentLink | null;
52
79
  createdAt: Date;
53
80
  updatedAt: Date;
54
81
  author: CommentAuthor;
55
82
  likesCount: number;
56
83
  isLiked: boolean;
57
84
  replies?: Comment[];
85
+ totalReplies?: number;
58
86
  hidden?: boolean;
59
87
  }
60
88
  interface CommunityPostLink {
@@ -87,6 +115,15 @@ interface CommunityComment {
87
115
  hidden?: boolean;
88
116
  }
89
117
 
118
+ interface OgData {
119
+ url: string;
120
+ title: string | null;
121
+ description: string | null;
122
+ image: string | null;
123
+ favicon: string | null;
124
+ siteName: string | null;
125
+ }
126
+
90
127
  /**
91
128
  * V1 Router - First version of the API.
92
129
  */
@@ -124,6 +161,85 @@ declare const v1Router: {
124
161
  readonly message: "An internal server error occurred";
125
162
  };
126
163
  }>, Record<never, never>>;
164
+ og: {
165
+ fetch: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
166
+ session: {
167
+ id: string;
168
+ createdAt: Date;
169
+ updatedAt: Date;
170
+ userId: string;
171
+ expiresAt: Date;
172
+ token: string;
173
+ ipAddress?: string | null | undefined | undefined;
174
+ userAgent?: string | null | undefined | undefined;
175
+ impersonatedBy?: string | null | undefined;
176
+ };
177
+ user: {
178
+ id: string;
179
+ createdAt: Date;
180
+ updatedAt: Date;
181
+ email: string;
182
+ emailVerified: boolean;
183
+ name: string;
184
+ image?: string | null | undefined | undefined;
185
+ onboardingCompleted: boolean | null | undefined;
186
+ linkedinVerified: boolean | null | undefined;
187
+ linkedinVerifiedAt?: Date | null | undefined;
188
+ linkedinId?: string | null | undefined;
189
+ linkedinName?: string | null | undefined;
190
+ banned: boolean | null | undefined;
191
+ role?: string | null | undefined;
192
+ banReason?: string | null | undefined;
193
+ banExpires?: Date | null | undefined;
194
+ username?: string | null | undefined;
195
+ displayUsername?: string | null | undefined;
196
+ };
197
+ }>, zod.ZodObject<{
198
+ url: zod.ZodString;
199
+ }, better_auth.$strip>, _orpc_contract.Schema<{
200
+ success: false;
201
+ error: string;
202
+ data?: undefined;
203
+ } | {
204
+ success: true;
205
+ data: OgData;
206
+ error?: undefined;
207
+ }, {
208
+ success: false;
209
+ error: string;
210
+ data?: undefined;
211
+ } | {
212
+ success: true;
213
+ data: OgData;
214
+ error?: undefined;
215
+ }>, _orpc_contract.MergedErrorMap<Record<never, never>, {
216
+ readonly UNAUTHORIZED: {
217
+ readonly message: "You must be logged in to access this resource";
218
+ };
219
+ readonly FORBIDDEN: {
220
+ readonly message: "You do not have permission to access this resource";
221
+ };
222
+ readonly NOT_FOUND: {
223
+ readonly message: "The requested resource was not found";
224
+ };
225
+ readonly BAD_REQUEST: {
226
+ readonly message: "Invalid request";
227
+ readonly data: zod.ZodOptional<zod.ZodObject<{
228
+ issues: zod.ZodArray<zod.ZodObject<{
229
+ code: zod.ZodString;
230
+ path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
231
+ message: zod.ZodString;
232
+ }, better_auth.$loose>>;
233
+ }, better_auth.$strip>>;
234
+ };
235
+ readonly CONFLICT: {
236
+ readonly message: "The request conflicts with existing data";
237
+ };
238
+ readonly INTERNAL_SERVER_ERROR: {
239
+ readonly message: "An internal server error occurred";
240
+ };
241
+ }>, Record<never, never>>;
242
+ };
127
243
  user: {
128
244
  me: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
129
245
  session: {
@@ -1386,10 +1502,38 @@ declare const v1Router: {
1386
1502
  }>, zod.ZodObject<{
1387
1503
  postId: zod.ZodString;
1388
1504
  }, better_auth.$strip>, _orpc_contract.Schema<{
1389
- data: Comment[];
1505
+ data: {
1506
+ replies: Comment[];
1507
+ totalReplies: number;
1508
+ id: string;
1509
+ postId: string;
1510
+ parentId: string | null;
1511
+ content: string;
1512
+ link: CommentLink | null;
1513
+ createdAt: Date;
1514
+ updatedAt: Date;
1515
+ author: CommentAuthor;
1516
+ likesCount: number;
1517
+ isLiked: boolean;
1518
+ hidden?: boolean;
1519
+ }[];
1390
1520
  count: number;
1391
1521
  }, {
1392
- data: Comment[];
1522
+ data: {
1523
+ replies: Comment[];
1524
+ totalReplies: number;
1525
+ id: string;
1526
+ postId: string;
1527
+ parentId: string | null;
1528
+ content: string;
1529
+ link: CommentLink | null;
1530
+ createdAt: Date;
1531
+ updatedAt: Date;
1532
+ author: CommentAuthor;
1533
+ likesCount: number;
1534
+ isLiked: boolean;
1535
+ hidden?: boolean;
1536
+ }[];
1393
1537
  count: number;
1394
1538
  }>, _orpc_contract.MergedErrorMap<Record<never, never>, {
1395
1539
  readonly UNAUTHORIZED: {
@@ -1418,6 +1562,77 @@ declare const v1Router: {
1418
1562
  readonly message: "An internal server error occurred";
1419
1563
  };
1420
1564
  }>, Record<never, never>>;
1565
+ listReplies: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
1566
+ session: {
1567
+ id: string;
1568
+ createdAt: Date;
1569
+ updatedAt: Date;
1570
+ userId: string;
1571
+ expiresAt: Date;
1572
+ token: string;
1573
+ ipAddress?: string | null | undefined | undefined;
1574
+ userAgent?: string | null | undefined | undefined;
1575
+ impersonatedBy?: string | null | undefined;
1576
+ };
1577
+ user: {
1578
+ id: string;
1579
+ createdAt: Date;
1580
+ updatedAt: Date;
1581
+ email: string;
1582
+ emailVerified: boolean;
1583
+ name: string;
1584
+ image?: string | null | undefined | undefined;
1585
+ onboardingCompleted: boolean | null | undefined;
1586
+ linkedinVerified: boolean | null | undefined;
1587
+ linkedinVerifiedAt?: Date | null | undefined;
1588
+ linkedinId?: string | null | undefined;
1589
+ linkedinName?: string | null | undefined;
1590
+ banned: boolean | null | undefined;
1591
+ role?: string | null | undefined;
1592
+ banReason?: string | null | undefined;
1593
+ banExpires?: Date | null | undefined;
1594
+ username?: string | null | undefined;
1595
+ displayUsername?: string | null | undefined;
1596
+ };
1597
+ }>, zod.ZodObject<{
1598
+ parentCommentId: zod.ZodString;
1599
+ cursor: zod.ZodOptional<zod.ZodString>;
1600
+ limit: zod.ZodDefault<zod.ZodNumber>;
1601
+ }, better_auth.$strip>, _orpc_contract.Schema<{
1602
+ data: Comment[];
1603
+ nextCursor: string | null;
1604
+ hasMore: boolean;
1605
+ }, {
1606
+ data: Comment[];
1607
+ nextCursor: string | null;
1608
+ hasMore: boolean;
1609
+ }>, _orpc_contract.MergedErrorMap<Record<never, never>, {
1610
+ readonly UNAUTHORIZED: {
1611
+ readonly message: "You must be logged in to access this resource";
1612
+ };
1613
+ readonly FORBIDDEN: {
1614
+ readonly message: "You do not have permission to access this resource";
1615
+ };
1616
+ readonly NOT_FOUND: {
1617
+ readonly message: "The requested resource was not found";
1618
+ };
1619
+ readonly BAD_REQUEST: {
1620
+ readonly message: "Invalid request";
1621
+ readonly data: zod.ZodOptional<zod.ZodObject<{
1622
+ issues: zod.ZodArray<zod.ZodObject<{
1623
+ code: zod.ZodString;
1624
+ path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
1625
+ message: zod.ZodString;
1626
+ }, better_auth.$loose>>;
1627
+ }, better_auth.$strip>>;
1628
+ };
1629
+ readonly CONFLICT: {
1630
+ readonly message: "The request conflicts with existing data";
1631
+ };
1632
+ readonly INTERNAL_SERVER_ERROR: {
1633
+ readonly message: "An internal server error occurred";
1634
+ };
1635
+ }>, Record<never, never>>;
1421
1636
  create: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
1422
1637
  session: {
1423
1638
  id: string;
@@ -1454,6 +1669,7 @@ declare const v1Router: {
1454
1669
  postId: zod.ZodString;
1455
1670
  parentCommentId: zod.ZodOptional<zod.ZodString>;
1456
1671
  content: zod.ZodString;
1672
+ linkUrl: zod.ZodOptional<zod.ZodString>;
1457
1673
  }, better_auth.$strip>, _orpc_contract.Schema<{
1458
1674
  data: Comment;
1459
1675
  }, {
@@ -5493,8 +5709,505 @@ declare const v1Router: {
5493
5709
  };
5494
5710
  }>, Record<never, never>>;
5495
5711
  };
5496
- };
5497
- };
5498
- type V1Router = typeof v1Router;
5712
+ broadcasts: {
5713
+ list: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
5714
+ session: {
5715
+ id: string;
5716
+ createdAt: Date;
5717
+ updatedAt: Date;
5718
+ userId: string;
5719
+ expiresAt: Date;
5720
+ token: string;
5721
+ ipAddress?: string | null | undefined | undefined;
5722
+ userAgent?: string | null | undefined | undefined;
5723
+ impersonatedBy?: string | null | undefined;
5724
+ };
5725
+ user: {
5726
+ id: string;
5727
+ createdAt: Date;
5728
+ updatedAt: Date;
5729
+ email: string;
5730
+ emailVerified: boolean;
5731
+ name: string;
5732
+ image?: string | null | undefined | undefined;
5733
+ onboardingCompleted: boolean | null | undefined;
5734
+ linkedinVerified: boolean | null | undefined;
5735
+ linkedinVerifiedAt?: Date | null | undefined;
5736
+ linkedinId?: string | null | undefined;
5737
+ linkedinName?: string | null | undefined;
5738
+ banned: boolean | null | undefined;
5739
+ role?: string | null | undefined;
5740
+ banReason?: string | null | undefined;
5741
+ banExpires?: Date | null | undefined;
5742
+ username?: string | null | undefined;
5743
+ displayUsername?: string | null | undefined;
5744
+ };
5745
+ }>, zod.ZodObject<{
5746
+ search: zod.ZodOptional<zod.ZodString>;
5747
+ page: zod.ZodDefault<zod.ZodNumber>;
5748
+ pageSize: zod.ZodDefault<zod.ZodNumber>;
5749
+ }, better_auth.$strip>, _orpc_contract.Schema<{
5750
+ data: {
5751
+ id: number;
5752
+ subject: string;
5753
+ previewText: string | null;
5754
+ publishedAt: string | null;
5755
+ thumbnailUrl: string | null;
5756
+ status: "exists" | "new";
5757
+ matchType: "exact" | "normalized" | "thumbnail" | null;
5758
+ existingPostId: string | null;
5759
+ existingPostSlug: string | null;
5760
+ existingPostTitle: string | null;
5761
+ }[];
5762
+ pagination: {
5763
+ page: number;
5764
+ pageSize: number;
5765
+ total: number;
5766
+ totalPages: number;
5767
+ };
5768
+ }, {
5769
+ data: {
5770
+ id: number;
5771
+ subject: string;
5772
+ previewText: string | null;
5773
+ publishedAt: string | null;
5774
+ thumbnailUrl: string | null;
5775
+ status: "exists" | "new";
5776
+ matchType: "exact" | "normalized" | "thumbnail" | null;
5777
+ existingPostId: string | null;
5778
+ existingPostSlug: string | null;
5779
+ existingPostTitle: string | null;
5780
+ }[];
5781
+ pagination: {
5782
+ page: number;
5783
+ pageSize: number;
5784
+ total: number;
5785
+ totalPages: number;
5786
+ };
5787
+ }>, _orpc_contract.MergedErrorMap<Record<never, never>, {
5788
+ readonly UNAUTHORIZED: {
5789
+ readonly message: "You must be logged in to access this resource";
5790
+ };
5791
+ readonly FORBIDDEN: {
5792
+ readonly message: "You do not have permission to access this resource";
5793
+ };
5794
+ readonly NOT_FOUND: {
5795
+ readonly message: "The requested resource was not found";
5796
+ };
5797
+ readonly BAD_REQUEST: {
5798
+ readonly message: "Invalid request";
5799
+ readonly data: zod.ZodOptional<zod.ZodObject<{
5800
+ issues: zod.ZodArray<zod.ZodObject<{
5801
+ code: zod.ZodString;
5802
+ path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
5803
+ message: zod.ZodString;
5804
+ }, better_auth.$loose>>;
5805
+ }, better_auth.$strip>>;
5806
+ };
5807
+ readonly CONFLICT: {
5808
+ readonly message: "The request conflicts with existing data";
5809
+ };
5810
+ readonly INTERNAL_SERVER_ERROR: {
5811
+ readonly message: "An internal server error occurred";
5812
+ };
5813
+ }>, Record<never, never>>;
5814
+ preview: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
5815
+ session: {
5816
+ id: string;
5817
+ createdAt: Date;
5818
+ updatedAt: Date;
5819
+ userId: string;
5820
+ expiresAt: Date;
5821
+ token: string;
5822
+ ipAddress?: string | null | undefined | undefined;
5823
+ userAgent?: string | null | undefined | undefined;
5824
+ impersonatedBy?: string | null | undefined;
5825
+ };
5826
+ user: {
5827
+ id: string;
5828
+ createdAt: Date;
5829
+ updatedAt: Date;
5830
+ email: string;
5831
+ emailVerified: boolean;
5832
+ name: string;
5833
+ image?: string | null | undefined | undefined;
5834
+ onboardingCompleted: boolean | null | undefined;
5835
+ linkedinVerified: boolean | null | undefined;
5836
+ linkedinVerifiedAt?: Date | null | undefined;
5837
+ linkedinId?: string | null | undefined;
5838
+ linkedinName?: string | null | undefined;
5839
+ banned: boolean | null | undefined;
5840
+ role?: string | null | undefined;
5841
+ banReason?: string | null | undefined;
5842
+ banExpires?: Date | null | undefined;
5843
+ username?: string | null | undefined;
5844
+ displayUsername?: string | null | undefined;
5845
+ };
5846
+ }>, zod.ZodObject<{
5847
+ broadcastId: zod.ZodNumber;
5848
+ }, better_auth.$strip>, _orpc_contract.Schema<{
5849
+ data: {
5850
+ existingPost: {
5851
+ id: string;
5852
+ title: string | null;
5853
+ slug: string | null;
5854
+ articleContent: string | null;
5855
+ thumbnailUrl: string | null;
5856
+ updatedAt: Date;
5857
+ } | null;
5858
+ matchType: "exact" | "normalized" | "thumbnail" | null;
5859
+ broadcast: KitBroadcast;
5860
+ slug: string;
5861
+ imageUrl: string | null;
5862
+ articleContent: string | null;
5863
+ excerpt: string | null;
5864
+ wordCount: number;
5865
+ readingTime: number;
5866
+ publishedAt: string;
5867
+ linkResolution: {
5868
+ resolved: number;
5869
+ links: ResolvedLink[];
5870
+ };
5871
+ };
5872
+ }, {
5873
+ data: {
5874
+ existingPost: {
5875
+ id: string;
5876
+ title: string | null;
5877
+ slug: string | null;
5878
+ articleContent: string | null;
5879
+ thumbnailUrl: string | null;
5880
+ updatedAt: Date;
5881
+ } | null;
5882
+ matchType: "exact" | "normalized" | "thumbnail" | null;
5883
+ broadcast: KitBroadcast;
5884
+ slug: string;
5885
+ imageUrl: string | null;
5886
+ articleContent: string | null;
5887
+ excerpt: string | null;
5888
+ wordCount: number;
5889
+ readingTime: number;
5890
+ publishedAt: string;
5891
+ linkResolution: {
5892
+ resolved: number;
5893
+ links: ResolvedLink[];
5894
+ };
5895
+ };
5896
+ }>, _orpc_contract.MergedErrorMap<Record<never, never>, {
5897
+ readonly UNAUTHORIZED: {
5898
+ readonly message: "You must be logged in to access this resource";
5899
+ };
5900
+ readonly FORBIDDEN: {
5901
+ readonly message: "You do not have permission to access this resource";
5902
+ };
5903
+ readonly NOT_FOUND: {
5904
+ readonly message: "The requested resource was not found";
5905
+ };
5906
+ readonly BAD_REQUEST: {
5907
+ readonly message: "Invalid request";
5908
+ readonly data: zod.ZodOptional<zod.ZodObject<{
5909
+ issues: zod.ZodArray<zod.ZodObject<{
5910
+ code: zod.ZodString;
5911
+ path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
5912
+ message: zod.ZodString;
5913
+ }, better_auth.$loose>>;
5914
+ }, better_auth.$strip>>;
5915
+ };
5916
+ readonly CONFLICT: {
5917
+ readonly message: "The request conflicts with existing data";
5918
+ };
5919
+ readonly INTERNAL_SERVER_ERROR: {
5920
+ readonly message: "An internal server error occurred";
5921
+ };
5922
+ }>, Record<never, never>>;
5923
+ import: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
5924
+ session: {
5925
+ id: string;
5926
+ createdAt: Date;
5927
+ updatedAt: Date;
5928
+ userId: string;
5929
+ expiresAt: Date;
5930
+ token: string;
5931
+ ipAddress?: string | null | undefined | undefined;
5932
+ userAgent?: string | null | undefined | undefined;
5933
+ impersonatedBy?: string | null | undefined;
5934
+ };
5935
+ user: {
5936
+ id: string;
5937
+ createdAt: Date;
5938
+ updatedAt: Date;
5939
+ email: string;
5940
+ emailVerified: boolean;
5941
+ name: string;
5942
+ image?: string | null | undefined | undefined;
5943
+ onboardingCompleted: boolean | null | undefined;
5944
+ linkedinVerified: boolean | null | undefined;
5945
+ linkedinVerifiedAt?: Date | null | undefined;
5946
+ linkedinId?: string | null | undefined;
5947
+ linkedinName?: string | null | undefined;
5948
+ banned: boolean | null | undefined;
5949
+ role?: string | null | undefined;
5950
+ banReason?: string | null | undefined;
5951
+ banExpires?: Date | null | undefined;
5952
+ username?: string | null | undefined;
5953
+ displayUsername?: string | null | undefined;
5954
+ };
5955
+ }>, zod.ZodObject<{
5956
+ broadcastId: zod.ZodNumber;
5957
+ }, better_auth.$strip>, _orpc_contract.Schema<{
5958
+ data: {
5959
+ success: boolean;
5960
+ postId: string;
5961
+ slug: string | null;
5962
+ linksResolved: number;
5963
+ };
5964
+ }, {
5965
+ data: {
5966
+ success: boolean;
5967
+ postId: string;
5968
+ slug: string | null;
5969
+ linksResolved: number;
5970
+ };
5971
+ }>, _orpc_contract.MergedErrorMap<Record<never, never>, {
5972
+ readonly UNAUTHORIZED: {
5973
+ readonly message: "You must be logged in to access this resource";
5974
+ };
5975
+ readonly FORBIDDEN: {
5976
+ readonly message: "You do not have permission to access this resource";
5977
+ };
5978
+ readonly NOT_FOUND: {
5979
+ readonly message: "The requested resource was not found";
5980
+ };
5981
+ readonly BAD_REQUEST: {
5982
+ readonly message: "Invalid request";
5983
+ readonly data: zod.ZodOptional<zod.ZodObject<{
5984
+ issues: zod.ZodArray<zod.ZodObject<{
5985
+ code: zod.ZodString;
5986
+ path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
5987
+ message: zod.ZodString;
5988
+ }, better_auth.$loose>>;
5989
+ }, better_auth.$strip>>;
5990
+ };
5991
+ readonly CONFLICT: {
5992
+ readonly message: "The request conflicts with existing data";
5993
+ };
5994
+ readonly INTERNAL_SERVER_ERROR: {
5995
+ readonly message: "An internal server error occurred";
5996
+ };
5997
+ }>, Record<never, never>>;
5998
+ update: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
5999
+ session: {
6000
+ id: string;
6001
+ createdAt: Date;
6002
+ updatedAt: Date;
6003
+ userId: string;
6004
+ expiresAt: Date;
6005
+ token: string;
6006
+ ipAddress?: string | null | undefined | undefined;
6007
+ userAgent?: string | null | undefined | undefined;
6008
+ impersonatedBy?: string | null | undefined;
6009
+ };
6010
+ user: {
6011
+ id: string;
6012
+ createdAt: Date;
6013
+ updatedAt: Date;
6014
+ email: string;
6015
+ emailVerified: boolean;
6016
+ name: string;
6017
+ image?: string | null | undefined | undefined;
6018
+ onboardingCompleted: boolean | null | undefined;
6019
+ linkedinVerified: boolean | null | undefined;
6020
+ linkedinVerifiedAt?: Date | null | undefined;
6021
+ linkedinId?: string | null | undefined;
6022
+ linkedinName?: string | null | undefined;
6023
+ banned: boolean | null | undefined;
6024
+ role?: string | null | undefined;
6025
+ banReason?: string | null | undefined;
6026
+ banExpires?: Date | null | undefined;
6027
+ username?: string | null | undefined;
6028
+ displayUsername?: string | null | undefined;
6029
+ };
6030
+ }>, zod.ZodObject<{
6031
+ broadcastId: zod.ZodNumber;
6032
+ postId: zod.ZodString;
6033
+ }, better_auth.$strip>, _orpc_contract.Schema<{
6034
+ data: {
6035
+ success: boolean;
6036
+ postId: string;
6037
+ linksResolved: number;
6038
+ };
6039
+ }, {
6040
+ data: {
6041
+ success: boolean;
6042
+ postId: string;
6043
+ linksResolved: number;
6044
+ };
6045
+ }>, _orpc_contract.MergedErrorMap<Record<never, never>, {
6046
+ readonly UNAUTHORIZED: {
6047
+ readonly message: "You must be logged in to access this resource";
6048
+ };
6049
+ readonly FORBIDDEN: {
6050
+ readonly message: "You do not have permission to access this resource";
6051
+ };
6052
+ readonly NOT_FOUND: {
6053
+ readonly message: "The requested resource was not found";
6054
+ };
6055
+ readonly BAD_REQUEST: {
6056
+ readonly message: "Invalid request";
6057
+ readonly data: zod.ZodOptional<zod.ZodObject<{
6058
+ issues: zod.ZodArray<zod.ZodObject<{
6059
+ code: zod.ZodString;
6060
+ path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
6061
+ message: zod.ZodString;
6062
+ }, better_auth.$loose>>;
6063
+ }, better_auth.$strip>>;
6064
+ };
6065
+ readonly CONFLICT: {
6066
+ readonly message: "The request conflicts with existing data";
6067
+ };
6068
+ readonly INTERNAL_SERVER_ERROR: {
6069
+ readonly message: "An internal server error occurred";
6070
+ };
6071
+ }>, Record<never, never>>;
6072
+ };
6073
+ };
6074
+ /**
6075
+ * Development-only endpoints - returns 404 in production.
6076
+ * Used for dev tools and debugging.
6077
+ */
6078
+ dev: {
6079
+ posts: {
6080
+ get: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, Record<never, never>>, zod.ZodObject<{
6081
+ id: zod.ZodString;
6082
+ }, better_auth.$strip>, _orpc_contract.Schema<{
6083
+ data: {
6084
+ id: string;
6085
+ title: string | null;
6086
+ subheading: string | null;
6087
+ content: string;
6088
+ articleContent: string | null;
6089
+ };
6090
+ }, {
6091
+ data: {
6092
+ id: string;
6093
+ title: string | null;
6094
+ subheading: string | null;
6095
+ content: string;
6096
+ articleContent: string | null;
6097
+ };
6098
+ }>, _orpc_contract.MergedErrorMap<Record<never, never>, {
6099
+ readonly UNAUTHORIZED: {
6100
+ readonly message: "You must be logged in to access this resource";
6101
+ };
6102
+ readonly FORBIDDEN: {
6103
+ readonly message: "You do not have permission to access this resource";
6104
+ };
6105
+ readonly NOT_FOUND: {
6106
+ readonly message: "The requested resource was not found";
6107
+ };
6108
+ readonly BAD_REQUEST: {
6109
+ readonly message: "Invalid request";
6110
+ readonly data: zod.ZodOptional<zod.ZodObject<{
6111
+ issues: zod.ZodArray<zod.ZodObject<{
6112
+ code: zod.ZodString;
6113
+ path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
6114
+ message: zod.ZodString;
6115
+ }, better_auth.$loose>>;
6116
+ }, better_auth.$strip>>;
6117
+ };
6118
+ readonly CONFLICT: {
6119
+ readonly message: "The request conflicts with existing data";
6120
+ };
6121
+ readonly INTERNAL_SERVER_ERROR: {
6122
+ readonly message: "An internal server error occurred";
6123
+ };
6124
+ }>, Record<never, never>>;
6125
+ update: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, Record<never, never>>, zod.ZodObject<{
6126
+ id: zod.ZodString;
6127
+ title: zod.ZodOptional<zod.ZodString>;
6128
+ subheading: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
6129
+ content: zod.ZodOptional<zod.ZodString>;
6130
+ articleContent: zod.ZodOptional<zod.ZodNullable<zod.ZodString>>;
6131
+ }, better_auth.$strip>, _orpc_contract.Schema<{
6132
+ data: {
6133
+ id: string;
6134
+ title: string | null;
6135
+ subheading: string | null;
6136
+ content: string;
6137
+ articleContent: string | null;
6138
+ };
6139
+ }, {
6140
+ data: {
6141
+ id: string;
6142
+ title: string | null;
6143
+ subheading: string | null;
6144
+ content: string;
6145
+ articleContent: string | null;
6146
+ };
6147
+ }>, _orpc_contract.MergedErrorMap<Record<never, never>, {
6148
+ readonly UNAUTHORIZED: {
6149
+ readonly message: "You must be logged in to access this resource";
6150
+ };
6151
+ readonly FORBIDDEN: {
6152
+ readonly message: "You do not have permission to access this resource";
6153
+ };
6154
+ readonly NOT_FOUND: {
6155
+ readonly message: "The requested resource was not found";
6156
+ };
6157
+ readonly BAD_REQUEST: {
6158
+ readonly message: "Invalid request";
6159
+ readonly data: zod.ZodOptional<zod.ZodObject<{
6160
+ issues: zod.ZodArray<zod.ZodObject<{
6161
+ code: zod.ZodString;
6162
+ path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
6163
+ message: zod.ZodString;
6164
+ }, better_auth.$loose>>;
6165
+ }, better_auth.$strip>>;
6166
+ };
6167
+ readonly CONFLICT: {
6168
+ readonly message: "The request conflicts with existing data";
6169
+ };
6170
+ readonly INTERNAL_SERVER_ERROR: {
6171
+ readonly message: "An internal server error occurred";
6172
+ };
6173
+ }>, Record<never, never>>;
6174
+ };
6175
+ };
6176
+ };
6177
+ type V1Router = typeof v1Router;
6178
+
6179
+ /**
6180
+ * @framebreak/api-types
6181
+ *
6182
+ * Type definitions for the Framebreak API.
6183
+ * Use with @orpc/client to create a fully-typed API client.
6184
+ *
6185
+ * @example
6186
+ * ```ts
6187
+ * import type { V1Router, RouterOutputs, RouterInputs } from '@framebreak/api-types';
6188
+ * import { createORPCClient } from '@orpc/client';
6189
+ *
6190
+ * const client = createORPCClient<V1Router>(link);
6191
+ *
6192
+ * // Use inferred types
6193
+ * type Note = RouterOutputs['notes']['get']['data'];
6194
+ * type ListNotesInput = RouterInputs['notes']['list'];
6195
+ * ```
6196
+ */
6197
+
6198
+ /**
6199
+ * Inferred output types for all routes.
6200
+ * @example
6201
+ * type Note = RouterOutputs['notes']['get']['data'];
6202
+ * type CommunityPost = RouterOutputs['community']['posts']['get']['data'];
6203
+ */
6204
+ type RouterOutputs = InferRouterOutputs<V1Router>;
6205
+ /**
6206
+ * Inferred input types for all routes.
6207
+ * @example
6208
+ * type ListNotesInput = RouterInputs['notes']['list'];
6209
+ * type CreateNoteInput = RouterInputs['notes']['create'];
6210
+ */
6211
+ type RouterInputs = InferRouterInputs<V1Router>;
5499
6212
 
5500
- export type { V1Router };
6213
+ export type { RouterInputs, RouterOutputs, V1Router };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@framebreak/types",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
4
  "description": "Type definitions for the Framebreak API",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",