@apolitical/component-library 1.13.4-beta.3 → 1.13.4

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.
@@ -1 +0,0 @@
1
- export { default as RepliesFeed } from './replies-to-replies-feed';
@@ -1,35 +0,0 @@
1
- /// <reference types="react" />
2
- import { IReply } from '../../getstream';
3
- interface Props {
4
- basePath: string;
5
- parentId: string;
6
- replyParentId: string;
7
- activityId: string;
8
- replyCount: number;
9
- replies: IReply[] | undefined;
10
- isMember: boolean;
11
- functions: {
12
- create: ({ activityId, replyId, content, }: {
13
- activityId?: string;
14
- replyId?: string;
15
- content: string;
16
- }) => Promise<void>;
17
- edit: ({ parentId, replyId, content, }: {
18
- parentId: string;
19
- replyId: string;
20
- content: {
21
- body: string;
22
- };
23
- }) => Promise<void>;
24
- like: ({ replyId }: {
25
- replyId: string;
26
- }) => Promise<void>;
27
- unlike: ({ replyId }: {
28
- replyId: string;
29
- }) => Promise<void>;
30
- join: () => Promise<void>;
31
- leave: () => Promise<void>;
32
- };
33
- }
34
- declare const RepliesToRepliesFeed: React.FC<Props>;
35
- export default RepliesToRepliesFeed;
@@ -1,134 +0,0 @@
1
- import { QueryClient, QueryKey } from '@tanstack/query-core';
2
- import { IActivity, ILike, IReply } from '../../getstream';
3
- import { IUserContext } from '../../../context';
4
- interface buildAddReplyToReplyHandlersProps {
5
- queryClient: QueryClient;
6
- queryKey: QueryKey;
7
- mutationFn: (content: {
8
- body: string;
9
- }) => Promise<void>;
10
- }
11
- export declare const buildAddReplyToReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildAddReplyToReplyHandlersProps) => {
12
- mutationFn: (content: {
13
- body: string;
14
- }) => Promise<void>;
15
- onMutate: () => Promise<void>;
16
- onSuccess: (data: IReply) => {
17
- previousActivity: IActivity | undefined;
18
- };
19
- onError: (_err: {
20
- [key: string]: string;
21
- }, _changedActivity: {
22
- activityId: string;
23
- }, context: {
24
- previousActivity: IActivity;
25
- }) => void;
26
- onSettled: () => void;
27
- };
28
- interface buildEditReplyToReplyHandlersProps {
29
- queryClient: QueryClient;
30
- queryKey: QueryKey;
31
- mutationFn: ({ parentId, replyId, content, }: {
32
- parentId: string;
33
- replyId: string;
34
- content: {
35
- body: string;
36
- };
37
- }) => Promise<void>;
38
- }
39
- export declare const buildEditReplyToReplyHanders: ({ queryClient, queryKey, mutationFn, }: buildEditReplyToReplyHandlersProps) => {
40
- mutationFn: ({ parentId, replyId, content, }: {
41
- parentId: string;
42
- replyId: string;
43
- content: {
44
- body: string;
45
- };
46
- }) => Promise<void>;
47
- onError: (_err: {
48
- [key: string]: string;
49
- }, _changedActivity: {
50
- activityId: string;
51
- }, context: {
52
- previousActivity: IActivity;
53
- }) => void;
54
- onMutate: ({ replyInfo, content: { body }, }: {
55
- replyInfo: {
56
- parentId: string;
57
- replySlug: string;
58
- replyParentId: string;
59
- };
60
- content: {
61
- body: string;
62
- };
63
- }) => Promise<{
64
- previousActivity: IActivity;
65
- } | undefined>;
66
- };
67
- interface buildLikeReplyHandlersProps {
68
- queryClient: QueryClient;
69
- queryKey: QueryKey;
70
- mutationFn: ({ replyId, replyParentId, }: {
71
- replyId: string;
72
- replyParentId?: string;
73
- }) => Promise<void>;
74
- }
75
- export declare const buildLikeReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildLikeReplyHandlersProps) => {
76
- mutationFn: ({ replyId, replyParentId, }: {
77
- replyId: string;
78
- replyParentId?: string | undefined;
79
- }) => Promise<void>;
80
- onMutate: ({ replyId, replyParentId, }: {
81
- replyId: string;
82
- replyParentId?: string | undefined;
83
- }) => Promise<{
84
- previousActivity: IActivity | undefined;
85
- }>;
86
- onError: (_err: {
87
- [key: string]: string;
88
- }, _newActivity: {
89
- activityId: string;
90
- }, context: {
91
- previousActivity: IActivity;
92
- }) => void;
93
- onSuccess: (data: ILike, variables: {
94
- replyId: string;
95
- replyParentId?: string;
96
- }) => {
97
- previousActivity: IActivity | undefined;
98
- };
99
- };
100
- interface buildUnlikeReplyHandlersProps {
101
- queryClient: QueryClient;
102
- queryKey: QueryKey;
103
- user: IUserContext | null;
104
- mutationFn: ({ replyId, replyParentId, }: {
105
- replyId: string;
106
- replyParentId?: string;
107
- }) => Promise<void>;
108
- }
109
- export declare const buildUnlikeReplyHandlers: ({ queryClient, queryKey, mutationFn, user, }: buildUnlikeReplyHandlersProps) => {
110
- mutationFn: ({ replyId, replyParentId, }: {
111
- replyId: string;
112
- replyParentId?: string | undefined;
113
- }) => Promise<void>;
114
- onMutate: ({ replyId, replyParentId, }: {
115
- replyId: string;
116
- replyParentId?: string | undefined;
117
- }) => Promise<{
118
- previousActivity: IActivity | undefined;
119
- }>;
120
- onError: (_err: {
121
- [key: string]: string;
122
- }, _newActivity: {
123
- activityId: string;
124
- }, context: {
125
- previousActivity: IActivity;
126
- }) => void;
127
- onSuccess: (_data: ILike, variables: {
128
- replyId: string;
129
- replyParentId?: string;
130
- }) => {
131
- previousActivity: IActivity | undefined;
132
- };
133
- };
134
- export {};