@framebreak/types 0.1.27 → 0.1.28
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 +312 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -281,6 +281,60 @@ interface NoteComment {
|
|
|
281
281
|
hidden?: boolean;
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
+
/**
|
|
285
|
+
* Payload for new community posts in the feed.
|
|
286
|
+
*/
|
|
287
|
+
interface CommunityFeedPayload {
|
|
288
|
+
type: "new_post";
|
|
289
|
+
post: {
|
|
290
|
+
id: string;
|
|
291
|
+
authorId: string;
|
|
292
|
+
authorName: string;
|
|
293
|
+
authorImage: string | null;
|
|
294
|
+
preview: string;
|
|
295
|
+
createdAt: string;
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Payload for thread events (new comments, reactions).
|
|
300
|
+
*/
|
|
301
|
+
interface CommunityThreadPayload {
|
|
302
|
+
type: "new_comment" | "comment_deleted" | "reaction_update";
|
|
303
|
+
threadId: string;
|
|
304
|
+
data: {
|
|
305
|
+
type: "new_comment";
|
|
306
|
+
comment: {
|
|
307
|
+
id: string;
|
|
308
|
+
authorId: string;
|
|
309
|
+
authorName: string;
|
|
310
|
+
authorImage: string | null;
|
|
311
|
+
preview: string;
|
|
312
|
+
parentId: string | null;
|
|
313
|
+
createdAt: string;
|
|
314
|
+
};
|
|
315
|
+
} | {
|
|
316
|
+
type: "comment_deleted";
|
|
317
|
+
commentId: string;
|
|
318
|
+
} | {
|
|
319
|
+
type: "reaction_update";
|
|
320
|
+
targetType: "post" | "comment";
|
|
321
|
+
targetId: string;
|
|
322
|
+
reactionType: string;
|
|
323
|
+
userId: string;
|
|
324
|
+
action: "added" | "removed";
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Payload for typing indicators.
|
|
329
|
+
*/
|
|
330
|
+
interface TypingPayload {
|
|
331
|
+
userId: string;
|
|
332
|
+
userName: string;
|
|
333
|
+
userImage: string | null;
|
|
334
|
+
isTyping: boolean;
|
|
335
|
+
timestamp: number;
|
|
336
|
+
}
|
|
337
|
+
|
|
284
338
|
interface CommentAuthor {
|
|
285
339
|
id: string;
|
|
286
340
|
name: string;
|
|
@@ -4713,6 +4767,264 @@ declare const v1Router: {
|
|
|
4713
4767
|
};
|
|
4714
4768
|
};
|
|
4715
4769
|
};
|
|
4770
|
+
/**
|
|
4771
|
+
* Real-time streams for community updates.
|
|
4772
|
+
* Uses SSE (Server-Sent Events) for live updates.
|
|
4773
|
+
*/
|
|
4774
|
+
streams: {
|
|
4775
|
+
/** Subscribe to new posts in the community feed */
|
|
4776
|
+
feed: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
|
|
4777
|
+
session: {
|
|
4778
|
+
id: string;
|
|
4779
|
+
createdAt: Date;
|
|
4780
|
+
updatedAt: Date;
|
|
4781
|
+
userId: string;
|
|
4782
|
+
expiresAt: Date;
|
|
4783
|
+
token: string;
|
|
4784
|
+
ipAddress?: string | null | undefined | undefined;
|
|
4785
|
+
userAgent?: string | null | undefined | undefined;
|
|
4786
|
+
impersonatedBy?: string | null | undefined;
|
|
4787
|
+
};
|
|
4788
|
+
user: {
|
|
4789
|
+
id: string;
|
|
4790
|
+
createdAt: Date;
|
|
4791
|
+
updatedAt: Date;
|
|
4792
|
+
email: string;
|
|
4793
|
+
emailVerified: boolean;
|
|
4794
|
+
name: string;
|
|
4795
|
+
image?: string | null | undefined | undefined;
|
|
4796
|
+
onboardingCompleted: boolean | null | undefined;
|
|
4797
|
+
linkedinVerified: boolean | null | undefined;
|
|
4798
|
+
linkedinVerifiedAt?: Date | null | undefined;
|
|
4799
|
+
linkedinId?: string | null | undefined;
|
|
4800
|
+
linkedinName?: string | null | undefined;
|
|
4801
|
+
banned: boolean | null | undefined;
|
|
4802
|
+
role?: string | null | undefined;
|
|
4803
|
+
banReason?: string | null | undefined;
|
|
4804
|
+
banExpires?: Date | null | undefined;
|
|
4805
|
+
username?: string | null | undefined;
|
|
4806
|
+
displayUsername?: string | null | undefined;
|
|
4807
|
+
};
|
|
4808
|
+
}>, _orpc_contract.Schema<unknown, unknown>, _orpc_contract.Schema<AsyncGenerator<CommunityFeedPayload, any, any>, AsyncGenerator<CommunityFeedPayload, any, any>>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
4809
|
+
readonly UNAUTHORIZED: {
|
|
4810
|
+
readonly message: "You must be logged in to access this resource";
|
|
4811
|
+
};
|
|
4812
|
+
readonly FORBIDDEN: {
|
|
4813
|
+
readonly message: "You do not have permission to access this resource";
|
|
4814
|
+
};
|
|
4815
|
+
readonly NOT_FOUND: {
|
|
4816
|
+
readonly message: "The requested resource was not found";
|
|
4817
|
+
};
|
|
4818
|
+
readonly BAD_REQUEST: {
|
|
4819
|
+
readonly message: "Invalid request";
|
|
4820
|
+
readonly data: zod.ZodOptional<zod.ZodObject<{
|
|
4821
|
+
issues: zod.ZodArray<zod.ZodObject<{
|
|
4822
|
+
code: zod.ZodString;
|
|
4823
|
+
path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
|
|
4824
|
+
message: zod.ZodString;
|
|
4825
|
+
}, better_auth.$loose>>;
|
|
4826
|
+
}, better_auth.$strip>>;
|
|
4827
|
+
};
|
|
4828
|
+
readonly CONFLICT: {
|
|
4829
|
+
readonly message: "The request conflicts with existing data";
|
|
4830
|
+
};
|
|
4831
|
+
readonly INTERNAL_SERVER_ERROR: {
|
|
4832
|
+
readonly message: "An internal server error occurred";
|
|
4833
|
+
};
|
|
4834
|
+
}>, Record<never, never>>;
|
|
4835
|
+
/** Subscribe to comments and reactions on a specific thread */
|
|
4836
|
+
thread: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
|
|
4837
|
+
session: {
|
|
4838
|
+
id: string;
|
|
4839
|
+
createdAt: Date;
|
|
4840
|
+
updatedAt: Date;
|
|
4841
|
+
userId: string;
|
|
4842
|
+
expiresAt: Date;
|
|
4843
|
+
token: string;
|
|
4844
|
+
ipAddress?: string | null | undefined | undefined;
|
|
4845
|
+
userAgent?: string | null | undefined | undefined;
|
|
4846
|
+
impersonatedBy?: string | null | undefined;
|
|
4847
|
+
};
|
|
4848
|
+
user: {
|
|
4849
|
+
id: string;
|
|
4850
|
+
createdAt: Date;
|
|
4851
|
+
updatedAt: Date;
|
|
4852
|
+
email: string;
|
|
4853
|
+
emailVerified: boolean;
|
|
4854
|
+
name: string;
|
|
4855
|
+
image?: string | null | undefined | undefined;
|
|
4856
|
+
onboardingCompleted: boolean | null | undefined;
|
|
4857
|
+
linkedinVerified: boolean | null | undefined;
|
|
4858
|
+
linkedinVerifiedAt?: Date | null | undefined;
|
|
4859
|
+
linkedinId?: string | null | undefined;
|
|
4860
|
+
linkedinName?: string | null | undefined;
|
|
4861
|
+
banned: boolean | null | undefined;
|
|
4862
|
+
role?: string | null | undefined;
|
|
4863
|
+
banReason?: string | null | undefined;
|
|
4864
|
+
banExpires?: Date | null | undefined;
|
|
4865
|
+
username?: string | null | undefined;
|
|
4866
|
+
displayUsername?: string | null | undefined;
|
|
4867
|
+
};
|
|
4868
|
+
}>, zod.ZodObject<{
|
|
4869
|
+
threadId: zod.ZodString;
|
|
4870
|
+
}, better_auth.$strip>, _orpc_contract.Schema<AsyncGenerator<CommunityThreadPayload, any, any>, AsyncGenerator<CommunityThreadPayload, any, any>>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
4871
|
+
readonly UNAUTHORIZED: {
|
|
4872
|
+
readonly message: "You must be logged in to access this resource";
|
|
4873
|
+
};
|
|
4874
|
+
readonly FORBIDDEN: {
|
|
4875
|
+
readonly message: "You do not have permission to access this resource";
|
|
4876
|
+
};
|
|
4877
|
+
readonly NOT_FOUND: {
|
|
4878
|
+
readonly message: "The requested resource was not found";
|
|
4879
|
+
};
|
|
4880
|
+
readonly BAD_REQUEST: {
|
|
4881
|
+
readonly message: "Invalid request";
|
|
4882
|
+
readonly data: zod.ZodOptional<zod.ZodObject<{
|
|
4883
|
+
issues: zod.ZodArray<zod.ZodObject<{
|
|
4884
|
+
code: zod.ZodString;
|
|
4885
|
+
path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
|
|
4886
|
+
message: zod.ZodString;
|
|
4887
|
+
}, better_auth.$loose>>;
|
|
4888
|
+
}, better_auth.$strip>>;
|
|
4889
|
+
};
|
|
4890
|
+
readonly CONFLICT: {
|
|
4891
|
+
readonly message: "The request conflicts with existing data";
|
|
4892
|
+
};
|
|
4893
|
+
readonly INTERNAL_SERVER_ERROR: {
|
|
4894
|
+
readonly message: "An internal server error occurred";
|
|
4895
|
+
};
|
|
4896
|
+
}>, Record<never, never>>;
|
|
4897
|
+
/** Typing indicators for a thread */
|
|
4898
|
+
typing: {
|
|
4899
|
+
publish: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
|
|
4900
|
+
session: {
|
|
4901
|
+
id: string;
|
|
4902
|
+
createdAt: Date;
|
|
4903
|
+
updatedAt: Date;
|
|
4904
|
+
userId: string;
|
|
4905
|
+
expiresAt: Date;
|
|
4906
|
+
token: string;
|
|
4907
|
+
ipAddress?: string | null | undefined | undefined;
|
|
4908
|
+
userAgent?: string | null | undefined | undefined;
|
|
4909
|
+
impersonatedBy?: string | null | undefined;
|
|
4910
|
+
};
|
|
4911
|
+
user: {
|
|
4912
|
+
id: string;
|
|
4913
|
+
createdAt: Date;
|
|
4914
|
+
updatedAt: Date;
|
|
4915
|
+
email: string;
|
|
4916
|
+
emailVerified: boolean;
|
|
4917
|
+
name: string;
|
|
4918
|
+
image?: string | null | undefined | undefined;
|
|
4919
|
+
onboardingCompleted: boolean | null | undefined;
|
|
4920
|
+
linkedinVerified: boolean | null | undefined;
|
|
4921
|
+
linkedinVerifiedAt?: Date | null | undefined;
|
|
4922
|
+
linkedinId?: string | null | undefined;
|
|
4923
|
+
linkedinName?: string | null | undefined;
|
|
4924
|
+
banned: boolean | null | undefined;
|
|
4925
|
+
role?: string | null | undefined;
|
|
4926
|
+
banReason?: string | null | undefined;
|
|
4927
|
+
banExpires?: Date | null | undefined;
|
|
4928
|
+
username?: string | null | undefined;
|
|
4929
|
+
displayUsername?: string | null | undefined;
|
|
4930
|
+
};
|
|
4931
|
+
}>, zod.ZodObject<{
|
|
4932
|
+
threadId: zod.ZodString;
|
|
4933
|
+
isTyping: zod.ZodBoolean;
|
|
4934
|
+
}, better_auth.$strip>, _orpc_contract.Schema<{
|
|
4935
|
+
published: boolean;
|
|
4936
|
+
}, {
|
|
4937
|
+
published: boolean;
|
|
4938
|
+
}>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
4939
|
+
readonly UNAUTHORIZED: {
|
|
4940
|
+
readonly message: "You must be logged in to access this resource";
|
|
4941
|
+
};
|
|
4942
|
+
readonly FORBIDDEN: {
|
|
4943
|
+
readonly message: "You do not have permission to access this resource";
|
|
4944
|
+
};
|
|
4945
|
+
readonly NOT_FOUND: {
|
|
4946
|
+
readonly message: "The requested resource was not found";
|
|
4947
|
+
};
|
|
4948
|
+
readonly BAD_REQUEST: {
|
|
4949
|
+
readonly message: "Invalid request";
|
|
4950
|
+
readonly data: zod.ZodOptional<zod.ZodObject<{
|
|
4951
|
+
issues: zod.ZodArray<zod.ZodObject<{
|
|
4952
|
+
code: zod.ZodString;
|
|
4953
|
+
path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
|
|
4954
|
+
message: zod.ZodString;
|
|
4955
|
+
}, better_auth.$loose>>;
|
|
4956
|
+
}, better_auth.$strip>>;
|
|
4957
|
+
};
|
|
4958
|
+
readonly CONFLICT: {
|
|
4959
|
+
readonly message: "The request conflicts with existing data";
|
|
4960
|
+
};
|
|
4961
|
+
readonly INTERNAL_SERVER_ERROR: {
|
|
4962
|
+
readonly message: "An internal server error occurred";
|
|
4963
|
+
};
|
|
4964
|
+
}>, Record<never, never>>;
|
|
4965
|
+
subscribe: _orpc_server.DecoratedProcedure<_orpc_server.MergedInitialContext<BaseContext & Record<never, never>, BaseContext & Record<never, never>, BaseContext>, _orpc_server.MergedCurrentContext<BaseContext, {
|
|
4966
|
+
session: {
|
|
4967
|
+
id: string;
|
|
4968
|
+
createdAt: Date;
|
|
4969
|
+
updatedAt: Date;
|
|
4970
|
+
userId: string;
|
|
4971
|
+
expiresAt: Date;
|
|
4972
|
+
token: string;
|
|
4973
|
+
ipAddress?: string | null | undefined | undefined;
|
|
4974
|
+
userAgent?: string | null | undefined | undefined;
|
|
4975
|
+
impersonatedBy?: string | null | undefined;
|
|
4976
|
+
};
|
|
4977
|
+
user: {
|
|
4978
|
+
id: string;
|
|
4979
|
+
createdAt: Date;
|
|
4980
|
+
updatedAt: Date;
|
|
4981
|
+
email: string;
|
|
4982
|
+
emailVerified: boolean;
|
|
4983
|
+
name: string;
|
|
4984
|
+
image?: string | null | undefined | undefined;
|
|
4985
|
+
onboardingCompleted: boolean | null | undefined;
|
|
4986
|
+
linkedinVerified: boolean | null | undefined;
|
|
4987
|
+
linkedinVerifiedAt?: Date | null | undefined;
|
|
4988
|
+
linkedinId?: string | null | undefined;
|
|
4989
|
+
linkedinName?: string | null | undefined;
|
|
4990
|
+
banned: boolean | null | undefined;
|
|
4991
|
+
role?: string | null | undefined;
|
|
4992
|
+
banReason?: string | null | undefined;
|
|
4993
|
+
banExpires?: Date | null | undefined;
|
|
4994
|
+
username?: string | null | undefined;
|
|
4995
|
+
displayUsername?: string | null | undefined;
|
|
4996
|
+
};
|
|
4997
|
+
}>, zod.ZodObject<{
|
|
4998
|
+
threadId: zod.ZodString;
|
|
4999
|
+
}, better_auth.$strip>, _orpc_contract.Schema<AsyncGenerator<TypingPayload, any, any>, AsyncGenerator<TypingPayload, any, any>>, _orpc_contract.MergedErrorMap<Record<never, never>, {
|
|
5000
|
+
readonly UNAUTHORIZED: {
|
|
5001
|
+
readonly message: "You must be logged in to access this resource";
|
|
5002
|
+
};
|
|
5003
|
+
readonly FORBIDDEN: {
|
|
5004
|
+
readonly message: "You do not have permission to access this resource";
|
|
5005
|
+
};
|
|
5006
|
+
readonly NOT_FOUND: {
|
|
5007
|
+
readonly message: "The requested resource was not found";
|
|
5008
|
+
};
|
|
5009
|
+
readonly BAD_REQUEST: {
|
|
5010
|
+
readonly message: "Invalid request";
|
|
5011
|
+
readonly data: zod.ZodOptional<zod.ZodObject<{
|
|
5012
|
+
issues: zod.ZodArray<zod.ZodObject<{
|
|
5013
|
+
code: zod.ZodString;
|
|
5014
|
+
path: zod.ZodArray<zod.ZodUnion<readonly [zod.ZodString, zod.ZodNumber]>>;
|
|
5015
|
+
message: zod.ZodString;
|
|
5016
|
+
}, better_auth.$loose>>;
|
|
5017
|
+
}, better_auth.$strip>>;
|
|
5018
|
+
};
|
|
5019
|
+
readonly CONFLICT: {
|
|
5020
|
+
readonly message: "The request conflicts with existing data";
|
|
5021
|
+
};
|
|
5022
|
+
readonly INTERNAL_SERVER_ERROR: {
|
|
5023
|
+
readonly message: "An internal server error occurred";
|
|
5024
|
+
};
|
|
5025
|
+
}>, Record<never, never>>;
|
|
5026
|
+
};
|
|
5027
|
+
};
|
|
4716
5028
|
};
|
|
4717
5029
|
/**
|
|
4718
5030
|
* Notes endpoints - short-form content from contributors.
|