@apolitical/component-library 1.17.2-rc.3 → 1.18.0-4247.39

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 (96) hide show
  1. package/discussion/components/thread/thread.d.ts +2 -2
  2. package/discussion/feeds/activities-feed/cache/cache.helper.d.ts +5 -0
  3. package/discussion/feeds/activities-feed/cache/cache.interface.d.ts +13 -0
  4. package/discussion/feeds/activities-feed/cache/hooks/create/create.hook.d.ts +7 -0
  5. package/discussion/feeds/activities-feed/cache/hooks/edit/edit.hook.d.ts +8 -0
  6. package/discussion/feeds/activities-feed/cache/hooks/like/like.hook.d.ts +3 -2
  7. package/discussion/feeds/activities-feed/cache/hooks/list/list.hook.d.ts +2 -2
  8. package/discussion/feeds/activities-feed/cache/hooks/remove/remove.hook.d.ts +7 -0
  9. package/discussion/feeds/activities-feed/cache/hooks/unlike/unlike.hook.d.ts +4 -3
  10. package/discussion/feeds/activities-feed/cache/index.d.ts +2 -3
  11. package/discussion/feeds/activities-feed/cache/mocks/cache.mock.d.ts +24 -0
  12. package/discussion/feeds/activities-feed/cache/mocks/index.d.ts +0 -4
  13. package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +57 -0
  14. package/discussion/feeds/activities-feed/mocks/index.d.ts +1 -0
  15. package/discussion/feeds/replies-feed/cache/cache.helper.d.ts +16 -0
  16. package/discussion/feeds/replies-feed/cache/cache.interface.d.ts +13 -0
  17. package/discussion/feeds/replies-feed/cache/hooks/create/create.hook.d.ts +9 -0
  18. package/discussion/feeds/replies-feed/cache/hooks/create/index.d.ts +1 -0
  19. package/discussion/feeds/replies-feed/cache/hooks/edit/edit.hook.d.ts +8 -0
  20. package/discussion/feeds/replies-feed/cache/hooks/edit/index.d.ts +1 -0
  21. package/discussion/feeds/replies-feed/cache/hooks/feed/index.d.ts +1 -0
  22. package/discussion/feeds/replies-feed/cache/hooks/index.d.ts +7 -0
  23. package/discussion/feeds/replies-feed/cache/hooks/like/index.d.ts +1 -0
  24. package/discussion/feeds/replies-feed/cache/hooks/like/like.hook.d.ts +8 -0
  25. package/discussion/feeds/replies-feed/cache/hooks/list/index.d.ts +1 -0
  26. package/discussion/feeds/replies-feed/cache/hooks/list/list.hook.d.ts +14 -0
  27. package/discussion/feeds/replies-feed/cache/hooks/remove/index.d.ts +1 -0
  28. package/discussion/feeds/replies-feed/cache/hooks/remove/remove.hook.d.ts +7 -0
  29. package/discussion/feeds/replies-feed/cache/hooks/unlike/index.d.ts +1 -0
  30. package/discussion/feeds/replies-feed/cache/hooks/unlike/unlike.hook.d.ts +8 -0
  31. package/discussion/feeds/replies-feed/cache/index.d.ts +3 -0
  32. package/discussion/feeds/replies-feed/cache/mocks/cache.mock.d.ts +24 -0
  33. package/discussion/feeds/replies-feed/cache/mocks/index.d.ts +1 -0
  34. package/discussion/feeds/replies-feed/index.d.ts +2 -0
  35. package/discussion/feeds/replies-feed/mocks/index.d.ts +1 -0
  36. package/discussion/feeds/replies-feed/mocks/replies-feed.mock.d.ts +101 -0
  37. package/discussion/feeds/replies-feed/nested-replies-feed/index.d.ts +1 -0
  38. package/discussion/feeds/replies-feed/nested-replies-feed/mocks/index.d.ts +1 -0
  39. package/discussion/feeds/replies-feed/nested-replies-feed/mocks/nested-replies-feed.mock.d.ts +26 -0
  40. package/discussion/feeds/replies-feed/nested-replies-feed/nested-replies-feed.d.ts +12 -0
  41. package/discussion/feeds/replies-feed/replies-feed.d.ts +2 -24
  42. package/discussion/sections/activity-section/activity-section.d.ts +7 -37
  43. package/discussion/sections/activity-section/cache/cache.interface.d.ts +5 -0
  44. package/discussion/sections/activity-section/cache/hooks/edit/edit.hook.d.ts +7 -0
  45. package/discussion/sections/activity-section/cache/hooks/edit/index.d.ts +1 -0
  46. package/discussion/sections/activity-section/cache/hooks/index.d.ts +5 -0
  47. package/discussion/sections/activity-section/cache/hooks/like/index.d.ts +1 -0
  48. package/discussion/sections/activity-section/cache/hooks/like/like.hook.d.ts +8 -0
  49. package/discussion/sections/activity-section/cache/hooks/read/index.d.ts +1 -0
  50. package/discussion/sections/activity-section/cache/hooks/read/read.hook.d.ts +12 -0
  51. package/discussion/sections/activity-section/cache/hooks/section/index.d.ts +1 -0
  52. package/discussion/sections/activity-section/cache/hooks/unlike/index.d.ts +1 -0
  53. package/discussion/sections/activity-section/cache/hooks/unlike/unlike.hook.d.ts +8 -0
  54. package/discussion/sections/activity-section/cache/index.d.ts +2 -0
  55. package/discussion/sections/activity-section/cache/mocks/cache.mock.d.ts +4 -0
  56. package/discussion/sections/activity-section/cache/mocks/index.d.ts +1 -0
  57. package/discussion/sections/activity-section/mocks/activity-section.mock.d.ts +37 -0
  58. package/discussion/sections/activity-section/mocks/index.d.ts +2 -0
  59. package/discussion/shared/constants.d.ts +3 -0
  60. package/discussion/shared/handlers/error.handler.d.ts +2 -0
  61. package/discussion/shared/handlers/mutate.handler.d.ts +2 -0
  62. package/discussion/shared/helpers/activity.helper.d.ts +28 -0
  63. package/discussion/{feeds/activities-feed/cache → shared}/helpers/index.d.ts +1 -1
  64. package/discussion/shared/helpers/reaction.helper.d.ts +28 -0
  65. package/discussion/shared/helpers/reply.helper.d.ts +33 -0
  66. package/discussion/shared/helpers/user.helper.d.ts +10 -0
  67. package/discussion/shared/index.d.ts +5 -0
  68. package/discussion/shared/interfaces/activity.interface.d.ts +4 -0
  69. package/discussion/shared/interfaces/context.interface.d.ts +14 -0
  70. package/discussion/shared/interfaces/index.d.ts +4 -0
  71. package/discussion/shared/interfaces/reaction.interface.d.ts +3 -0
  72. package/discussion/shared/interfaces/user.interface.d.ts +9 -0
  73. package/discussion/shared/mocks/index.d.ts +4 -0
  74. package/discussion/shared/mocks/reply.mock.d.ts +80 -0
  75. package/index.js +15 -15
  76. package/index.mjs +3754 -3157
  77. package/layout/page-layout/components/header/header.data.d.ts +33 -29
  78. package/package.json +1 -1
  79. package/discussion/feeds/activities-feed/activities-feed.mock.d.ts +0 -318
  80. package/discussion/feeds/activities-feed/cache/handlers/error.handler.d.ts +0 -2
  81. package/discussion/feeds/activities-feed/cache/handlers/mutate.handler.d.ts +0 -2
  82. package/discussion/feeds/activities-feed/cache/interfaces/cache.interface.d.ts +0 -15
  83. package/discussion/feeds/activities-feed/cache/interfaces/index.d.ts +0 -3
  84. package/discussion/feeds/activities-feed/cache/interfaces/mutation.interface.d.ts +0 -12
  85. package/discussion/feeds/activities-feed/cache/interfaces/query.interface.d.ts +0 -5
  86. package/discussion/feeds/replies-feed/replies-feed.handlers.d.ts +0 -147
  87. package/discussion/feeds/replies-feed/replies-feed.mock.d.ts +0 -2
  88. package/discussion/feeds/replies-to-replies-feed/index.d.ts +0 -1
  89. package/discussion/feeds/replies-to-replies-feed/replies-to-replies-feed.d.ts +0 -38
  90. package/discussion/feeds/replies-to-replies-feed/replies-to-replies-feed.handlers.d.ts +0 -161
  91. package/discussion/sections/activity-section/activity-section.handlers.d.ts +0 -84
  92. package/discussion/sections/activity-section/activity.mock.d.ts +0 -2
  93. /package/discussion/{feeds/activities-feed/cache → shared}/handlers/index.d.ts +0 -0
  94. /package/discussion/{feeds/activities-feed/cache → shared}/mocks/activity.mock.d.ts +0 -0
  95. /package/discussion/{feeds/activities-feed/cache → shared}/mocks/reaction.mock.d.ts +0 -0
  96. /package/discussion/{feeds/activities-feed/cache → shared}/mocks/user.mock.d.ts +0 -0
@@ -9,27 +9,31 @@ declare namespace _default {
9
9
  let order_1: string[];
10
10
  export { order_1 as order };
11
11
  export let menuId: string;
12
- export let explore: {
13
- order: string[];
14
- events: {
15
- href: string;
16
- className: string;
17
- };
18
- courses: {
19
- href: string;
20
- gtmType: string;
21
- className: string;
22
- };
23
- 'q-and-a': {
24
- href: string;
25
- className: string;
26
- };
27
- articles: {
28
- href: string;
29
- gtmType: string;
30
- className: string;
31
- };
32
- };
12
+ export namespace explore {
13
+ let order_2: string[];
14
+ export { order_2 as order };
15
+ export namespace events {
16
+ let href_1: string;
17
+ export { href_1 as href };
18
+ export let className: string;
19
+ }
20
+ export namespace courses {
21
+ let href_2: string;
22
+ export { href_2 as href };
23
+ let gtmType_1: string;
24
+ export { gtmType_1 as gtmType };
25
+ let className_1: string;
26
+ export { className_1 as className };
27
+ }
28
+ export namespace articles {
29
+ let href_3: string;
30
+ export { href_3 as href };
31
+ let gtmType_2: string;
32
+ export { gtmType_2 as gtmType };
33
+ let className_2: string;
34
+ export { className_2 as className };
35
+ }
36
+ }
33
37
  let topics_1: {
34
38
  order: string[];
35
39
  className: string;
@@ -73,8 +77,8 @@ declare namespace _default {
73
77
  export { topics_1 as topics };
74
78
  }
75
79
  namespace partners {
76
- let href_1: string;
77
- export { href_1 as href };
80
+ let href_4: string;
81
+ export { href_4 as href };
78
82
  export let onlyShow: string;
79
83
  }
80
84
  let account: {
@@ -94,15 +98,15 @@ declare namespace _default {
94
98
  };
95
99
  };
96
100
  namespace buttons {
97
- let order_2: string[];
98
- export { order_2 as order };
101
+ let order_3: string[];
102
+ export { order_3 as order };
99
103
  export namespace login {
100
- let href_2: string;
101
- export { href_2 as href };
104
+ let href_5: string;
105
+ export { href_5 as href };
102
106
  }
103
107
  export namespace signup {
104
- let href_3: string;
105
- export { href_3 as href };
108
+ let href_6: string;
109
+ export { href_6 as href };
106
110
  export namespace props {
107
111
  let variant: string;
108
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "1.17.2-rc.3",
3
+ "version": "1.18.0-4247.39",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -1,318 +0,0 @@
1
- export declare const activitiesFeedMock: ({
2
- actor: {
3
- created_at: string;
4
- updated_at: string;
5
- id: string;
6
- data: {
7
- jobTitle: string;
8
- name: string;
9
- organization: string;
10
- thumbnail: null;
11
- };
12
- };
13
- content: string;
14
- feed_id: string;
15
- foreign_id: string;
16
- id: string;
17
- latest_reactions: {
18
- like: {
19
- created_at: string;
20
- updated_at: string;
21
- id: string;
22
- user_id: string;
23
- user: {
24
- created_at: string;
25
- updated_at: string;
26
- id: string;
27
- data: {
28
- name: string;
29
- };
30
- };
31
- kind: string;
32
- activity_id: string;
33
- data: {};
34
- parent: string;
35
- latest_children: {};
36
- children_counts: {};
37
- }[];
38
- reply: {
39
- created_at: string;
40
- updated_at: string;
41
- id: string;
42
- user_id: string;
43
- user: {
44
- created_at: string;
45
- updated_at: string;
46
- id: string;
47
- data: {
48
- name: string;
49
- };
50
- };
51
- kind: string;
52
- activity_id: string;
53
- data: {
54
- content: {
55
- text: string;
56
- };
57
- };
58
- parent: string;
59
- latest_children: {};
60
- children_counts: {};
61
- }[];
62
- };
63
- latest_reactions_extra: {
64
- like: {
65
- next: string;
66
- };
67
- reply: {
68
- next: string;
69
- };
70
- };
71
- object: string;
72
- origin: null;
73
- own_reactions: {
74
- like: {
75
- created_at: string;
76
- updated_at: string;
77
- id: string;
78
- user_id: string;
79
- user: {
80
- created_at: string;
81
- updated_at: string;
82
- id: string;
83
- data: {
84
- name: string;
85
- };
86
- };
87
- kind: string;
88
- activity_id: string;
89
- data: {};
90
- parent: string;
91
- latest_children: {};
92
- children_counts: {};
93
- }[];
94
- reply: {
95
- created_at: string;
96
- updated_at: string;
97
- id: string;
98
- user_id: string;
99
- user: {
100
- created_at: string;
101
- updated_at: string;
102
- id: string;
103
- data: {
104
- name: string;
105
- };
106
- };
107
- kind: string;
108
- activity_id: string;
109
- data: {
110
- content: {
111
- text: string;
112
- };
113
- };
114
- parent: string;
115
- latest_children: {};
116
- children_counts: {};
117
- }[];
118
- };
119
- reaction_counts: {
120
- like: number;
121
- reply: number;
122
- };
123
- target: string;
124
- time: string;
125
- verb: string;
126
- } | {
127
- actor: {
128
- created_at: string;
129
- updated_at: string;
130
- id: string;
131
- data: {
132
- name: string;
133
- jobTitle?: undefined;
134
- organization?: undefined;
135
- thumbnail?: undefined;
136
- };
137
- };
138
- content: string;
139
- feed_id: string;
140
- foreign_id: string;
141
- id: string;
142
- latest_reactions: {
143
- like: {
144
- created_at: string;
145
- updated_at: string;
146
- id: string;
147
- user_id: string;
148
- user: {
149
- created_at: string;
150
- updated_at: string;
151
- id: string;
152
- data: {
153
- jobTitle: string;
154
- name: string;
155
- organization: string;
156
- thumbnail: string;
157
- };
158
- };
159
- kind: string;
160
- activity_id: string;
161
- data: {};
162
- parent: string;
163
- latest_children: {};
164
- children_counts: {};
165
- }[];
166
- reply?: undefined;
167
- };
168
- latest_reactions_extra: {
169
- like: {
170
- next: string;
171
- };
172
- reply?: undefined;
173
- };
174
- object: string;
175
- origin: null;
176
- own_reactions: {
177
- like?: undefined;
178
- reply?: undefined;
179
- };
180
- reaction_counts: {
181
- like: number;
182
- reply?: undefined;
183
- };
184
- target: string;
185
- time: string;
186
- verb: string;
187
- } | {
188
- actor: {
189
- created_at: string;
190
- updated_at: string;
191
- id: string;
192
- data: {
193
- jobTitle: string;
194
- name: string;
195
- organization: string;
196
- thumbnail: string;
197
- };
198
- };
199
- content: string;
200
- feed_id: string;
201
- foreign_id: string;
202
- id: string;
203
- latest_reactions: {
204
- like: ({
205
- created_at: string;
206
- updated_at: string;
207
- id: string;
208
- user_id: string;
209
- user: {
210
- created_at: string;
211
- updated_at: string;
212
- id: string;
213
- data: {
214
- jobTitle: string;
215
- name: string;
216
- organization: string;
217
- thumbnail: null;
218
- };
219
- };
220
- kind: string;
221
- activity_id: string;
222
- data: {};
223
- parent: string;
224
- latest_children: {};
225
- children_counts: {};
226
- } | {
227
- created_at: string;
228
- updated_at: string;
229
- id: string;
230
- user_id: string;
231
- user: {
232
- created_at: string;
233
- updated_at: string;
234
- id: string;
235
- data: {
236
- name: string;
237
- jobTitle?: undefined;
238
- organization?: undefined;
239
- thumbnail?: undefined;
240
- };
241
- };
242
- kind: string;
243
- activity_id: string;
244
- data: {};
245
- parent: string;
246
- latest_children: {};
247
- children_counts: {};
248
- } | {
249
- created_at: string;
250
- updated_at: string;
251
- id: string;
252
- user_id: string;
253
- user: {
254
- created_at: string;
255
- updated_at: string;
256
- id: string;
257
- data: {
258
- jobTitle: string;
259
- name: string;
260
- organization: string;
261
- thumbnail: string;
262
- };
263
- };
264
- kind: string;
265
- activity_id: string;
266
- data: {};
267
- parent: string;
268
- latest_children: {};
269
- children_counts: {};
270
- })[];
271
- reply: {
272
- created_at: string;
273
- updated_at: string;
274
- id: string;
275
- user_id: string;
276
- user: {
277
- created_at: string;
278
- updated_at: string;
279
- id: string;
280
- data: {
281
- jobTitle: string;
282
- name: string;
283
- organization: string;
284
- thumbnail: string;
285
- };
286
- };
287
- kind: string;
288
- activity_id: string;
289
- data: {
290
- content: string;
291
- };
292
- parent: string;
293
- latest_children: {};
294
- children_counts: {};
295
- }[];
296
- };
297
- latest_reactions_extra: {
298
- like: {
299
- next: string;
300
- };
301
- reply: {
302
- next: string;
303
- };
304
- };
305
- object: string;
306
- origin: null;
307
- own_reactions: {
308
- like?: undefined;
309
- reply?: undefined;
310
- };
311
- reaction_counts: {
312
- like: number;
313
- reply: number;
314
- };
315
- target: string;
316
- time: string;
317
- verb: string;
318
- })[];
@@ -1,2 +0,0 @@
1
- import type { ICache, IQueryContext } from '../interfaces';
2
- export declare function buildErrorHandler({ queryClient, queryKey }: IQueryContext): (_1: Error, _2: unknown, cache?: ICache) => void;
@@ -1,2 +0,0 @@
1
- import type { ICache, IQueryContext } from '../interfaces';
2
- export declare function buildMutateHandler({ queryClient, queryKey }: IQueryContext): (fn: (_: ICache) => ICache) => Promise<ICache>;
@@ -1,15 +0,0 @@
1
- import { InfiniteData } from '@tanstack/query-core';
2
- import type { EnrichedReaction, EnrichedUser, FeedAPIResponse, FlatActivityEnriched } from 'getstream';
3
- export type ICache = InfiniteData<ICachePage, string>;
4
- export type ICachePage = ExtendedFeedAPIResponse;
5
- export type ICacheItems = ICacheItem[];
6
- export type ICacheItem = ExtendedFlatActivityEnriched;
7
- export type ICacheSubitem = EnrichedReaction;
8
- export type ICacheUser = EnrichedUser;
9
- interface ExtendedFlatActivityEnriched extends FlatActivityEnriched {
10
- content: string;
11
- }
12
- interface ExtendedFeedAPIResponse extends FeedAPIResponse {
13
- results: ExtendedFlatActivityEnriched[];
14
- }
15
- export {};
@@ -1,3 +0,0 @@
1
- export * from './cache.interface';
2
- export * from './mutation.interface';
3
- export * from './query.interface';
@@ -1,12 +0,0 @@
1
- import type { IUserContext } from '../../../../../context';
2
- import type { IQueryContext, ICache } from '.';
3
- export interface IMutationContext extends IQueryContext {
4
- mutationHandlers: {
5
- mutate: (callback: (cache: ICache) => ICache) => Promise<ICache>;
6
- error: (error: Error, variables: unknown, cache?: ICache) => void;
7
- };
8
- user: IUserContext;
9
- }
10
- export interface IMutationProps extends IMutationContext {
11
- mutationFn: (_: any) => Promise<any>;
12
- }
@@ -1,5 +0,0 @@
1
- import { QueryClient, QueryKey } from '@tanstack/react-query';
2
- export interface IQueryContext {
3
- queryClient: QueryClient;
4
- queryKey: QueryKey;
5
- }
@@ -1,147 +0,0 @@
1
- import { QueryClient, QueryKey } from '@tanstack/query-core';
2
- import { IActivity, ILike, IReply } from '../../getstream';
3
- import { IUserContext } from '../../..';
4
- interface buildAddReplyHandlersProps {
5
- queryClient: QueryClient;
6
- queryKey: QueryKey;
7
- mutationFn: (content: {
8
- body: string;
9
- }) => Promise<void>;
10
- }
11
- export declare const buildAddReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildAddReplyHandlersProps) => {
12
- mutationFn: (content: {
13
- body: string;
14
- }) => Promise<void>;
15
- onMutate: () => Promise<void>;
16
- onError: (_err: {
17
- [key: string]: string;
18
- }, _newActivity: {
19
- activityId: string;
20
- }, context: {
21
- previousActivity: IActivity;
22
- }) => void;
23
- onSuccess: (data: IReply) => {
24
- previousActivity: IActivity;
25
- } | undefined;
26
- onSettled: () => void;
27
- };
28
- interface buildEditReplyHandlersProps {
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 buildEditReplyHanders: ({ queryClient, queryKey, mutationFn, }: buildEditReplyHandlersProps) => {
40
- mutationFn: ({ parentId, replyId, content, }: {
41
- parentId: string;
42
- replyId: string;
43
- content: {
44
- body: string;
45
- };
46
- }) => Promise<void>;
47
- onMutate: ({ replyInfo, content: { body }, }: {
48
- replyInfo: {
49
- parentId: string;
50
- replySlug: string;
51
- };
52
- content: {
53
- body: string;
54
- };
55
- }) => Promise<{
56
- previousActivity: IActivity;
57
- } | undefined>;
58
- onError: (_err: {
59
- [key: string]: string;
60
- }, _changedActivity: {
61
- activityId: string;
62
- }, context: {
63
- previousActivity: IActivity;
64
- }) => void;
65
- };
66
- interface buildRemoveReplyHandlersProps {
67
- queryClient: QueryClient;
68
- queryKey: QueryKey;
69
- mutationFn: ({ replyId }: {
70
- replyId: string;
71
- }) => Promise<void>;
72
- }
73
- export declare const buildRemoveReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildRemoveReplyHandlersProps) => {
74
- mutationFn: ({ replyId }: {
75
- replyId: string;
76
- }) => Promise<void>;
77
- onMutate: ({ replyId }: {
78
- replyId: string;
79
- }) => Promise<{
80
- previousActivity: IActivity;
81
- } | undefined>;
82
- onError: (_err: {
83
- [key: string]: string;
84
- }, _newActivity: {
85
- activityId: string;
86
- }, context: {
87
- previousActivity: IActivity;
88
- }) => void;
89
- };
90
- interface buildLikeReplyHandlersProps {
91
- queryClient: QueryClient;
92
- queryKey: QueryKey;
93
- mutationFn: ({ replyId }: {
94
- replyId: string;
95
- }) => Promise<void>;
96
- }
97
- export declare const buildLikeReplyHandlers: ({ queryClient, queryKey, mutationFn, }: buildLikeReplyHandlersProps) => {
98
- mutationFn: ({ replyId }: {
99
- replyId: string;
100
- }) => Promise<void>;
101
- onMutate: ({ replyId }: {
102
- replyId: string;
103
- }) => Promise<{
104
- previousActivity: IActivity | undefined;
105
- }>;
106
- onError: (_err: {
107
- [key: string]: string;
108
- }, _newActivity: {
109
- activityId: string;
110
- }, context: {
111
- previousActivity: IActivity;
112
- }) => void;
113
- onSuccess: (data: ILike) => {
114
- previousActivity: IActivity | undefined;
115
- };
116
- };
117
- interface buildUnlikeReplyHandlersProps {
118
- queryClient: QueryClient;
119
- queryKey: QueryKey;
120
- user: IUserContext;
121
- mutationFn: ({ replyId }: {
122
- replyId: string;
123
- }) => Promise<void>;
124
- }
125
- export declare const buildUnlikeReplyHandlers: ({ queryClient, queryKey, user, mutationFn, }: buildUnlikeReplyHandlersProps) => {
126
- mutationFn: ({ replyId }: {
127
- replyId: string;
128
- }) => Promise<void>;
129
- onMutate: ({ replyId }: {
130
- replyId: string;
131
- }) => Promise<{
132
- previousActivity: IActivity;
133
- } | undefined>;
134
- onError: (_err: {
135
- [key: string]: string;
136
- }, _newActivity: {
137
- activityId: string;
138
- }, context: {
139
- previousActivity: IActivity;
140
- }) => void;
141
- onSuccess: (data: ILike, { replyId }: {
142
- replyId: string;
143
- }) => {
144
- previousActivity: IActivity;
145
- } | undefined;
146
- };
147
- export {};
@@ -1,2 +0,0 @@
1
- import { IReply } from '../../getstream';
2
- export declare const repliesFeedMock: IReply[];
@@ -1 +0,0 @@
1
- export { default as RepliesFeed } from './replies-to-replies-feed';
@@ -1,38 +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
- remove: ({ replyId }: {
25
- replyId: string;
26
- }) => Promise<void>;
27
- like: ({ replyId }: {
28
- replyId: string;
29
- }) => Promise<void>;
30
- unlike: ({ replyId }: {
31
- replyId: string;
32
- }) => Promise<void>;
33
- join: () => Promise<void>;
34
- leave: () => Promise<void>;
35
- };
36
- }
37
- declare const RepliesToRepliesFeed: React.FC<Props>;
38
- export default RepliesToRepliesFeed;