@replyke/core 6.2.0-beta.4 → 7.0.0-beta.0
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/cjs/hooks/app-notifications/useAppNotificationsActions.js +15 -9
- package/dist/cjs/hooks/app-notifications/useAppNotificationsActions.js.map +1 -1
- package/dist/cjs/hooks/comments/useEntityComments.js +12 -14
- package/dist/cjs/hooks/comments/useEntityComments.js.map +1 -1
- package/dist/cjs/hooks/comments/useFetchManyComments.d.ts +2 -1
- package/dist/cjs/hooks/comments/useFetchManyComments.js.map +1 -1
- package/dist/cjs/hooks/comments/useProfileComments.js +12 -14
- package/dist/cjs/hooks/comments/useProfileComments.js.map +1 -1
- package/dist/cjs/hooks/comments/useReplies.js +6 -3
- package/dist/cjs/hooks/comments/useReplies.js.map +1 -1
- package/dist/cjs/hooks/entities/useCreateEntity.d.ts +1 -0
- package/dist/cjs/hooks/entities/useCreateEntity.js +3 -2
- package/dist/cjs/hooks/entities/useCreateEntity.js.map +1 -1
- package/dist/cjs/hooks/entities/useFetchEntity.d.ts +3 -2
- package/dist/cjs/hooks/entities/useFetchEntity.js +8 -3
- package/dist/cjs/hooks/entities/useFetchEntity.js.map +1 -1
- package/dist/cjs/hooks/entities/useFetchEntityByForeignId.d.ts +3 -2
- package/dist/cjs/hooks/entities/useFetchEntityByForeignId.js +17 -6
- package/dist/cjs/hooks/entities/useFetchEntityByForeignId.js.map +1 -1
- package/dist/cjs/hooks/entities/useFetchEntityByShortId.d.ts +3 -2
- package/dist/cjs/hooks/entities/useFetchEntityByShortId.js +17 -5
- package/dist/cjs/hooks/entities/useFetchEntityByShortId.js.map +1 -1
- package/dist/cjs/hooks/entities/useFetchManyEntities.d.ts +5 -2
- package/dist/cjs/hooks/entities/useFetchManyEntities.js +7 -0
- package/dist/cjs/hooks/entities/useFetchManyEntities.js.map +1 -1
- package/dist/cjs/hooks/relationships/connections/useFetchConnections.d.ts +3 -2
- package/dist/cjs/hooks/relationships/connections/useFetchConnections.js.map +1 -1
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsByUserId.d.ts +3 -2
- package/dist/cjs/hooks/relationships/connections/useFetchConnectionsByUserId.js.map +1 -1
- package/dist/cjs/hooks/relationships/connections/useFetchReceivedPendingConnections.d.ts +3 -2
- package/dist/cjs/hooks/relationships/connections/useFetchReceivedPendingConnections.js.map +1 -1
- package/dist/cjs/hooks/relationships/connections/useFetchSentPendingConnections.d.ts +3 -2
- package/dist/cjs/hooks/relationships/connections/useFetchSentPendingConnections.js.map +1 -1
- package/dist/cjs/hooks/relationships/follows/useFetchFollowers.d.ts +2 -12
- package/dist/cjs/hooks/relationships/follows/useFetchFollowers.js.map +1 -1
- package/dist/cjs/hooks/relationships/follows/useFetchFollowersByUserId.d.ts +2 -12
- package/dist/cjs/hooks/relationships/follows/useFetchFollowersByUserId.js.map +1 -1
- package/dist/cjs/hooks/relationships/follows/useFetchFollowing.d.ts +2 -12
- package/dist/cjs/hooks/relationships/follows/useFetchFollowing.js.map +1 -1
- package/dist/cjs/hooks/relationships/follows/useFetchFollowingByUserId.d.ts +2 -12
- package/dist/cjs/hooks/relationships/follows/useFetchFollowingByUserId.js.map +1 -1
- package/dist/cjs/hooks/reports/useFetchSpaceReports.d.ts +2 -1
- package/dist/cjs/hooks/reports/useFetchSpaceReports.js.map +1 -1
- package/dist/cjs/hooks/spaces/useFetchManySpaces.d.ts +2 -1
- package/dist/cjs/hooks/spaces/useFetchManySpaces.js.map +1 -1
- package/dist/cjs/hooks/spaces/useFetchMySpaces.js +1 -1
- package/dist/cjs/hooks/spaces/useFetchMySpaces.js.map +1 -1
- package/dist/cjs/hooks/spaces/useFetchSpaceChildren.d.ts +2 -1
- package/dist/cjs/hooks/spaces/useFetchSpaceChildren.js.map +1 -1
- package/dist/cjs/hooks/spaces/useFetchSpaceMembers.js +1 -1
- package/dist/cjs/hooks/spaces/useFetchSpaceMembers.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/IPaginatedResponse.d.ts +11 -0
- package/dist/cjs/interfaces/IPaginatedResponse.js +3 -0
- package/dist/cjs/interfaces/IPaginatedResponse.js.map +1 -0
- package/dist/cjs/interfaces/models/Entity.d.ts +6 -0
- package/dist/cjs/interfaces/models/Space.d.ts +2 -11
- package/dist/cjs/interfaces/models/SpaceMember.d.ts +1 -1
- package/dist/cjs/store/api/appNotificationsApi.d.ts +193 -192
- package/dist/cjs/store/api/appNotificationsApi.js +7 -7
- package/dist/cjs/store/api/appNotificationsApi.js.map +1 -1
- package/dist/cjs/store/api/entityListsApi.d.ts +3 -1
- package/dist/cjs/store/api/entityListsApi.js +4 -1
- package/dist/cjs/store/api/entityListsApi.js.map +1 -1
- package/dist/cjs/store/slices/appNotificationsSlice.d.ts +2 -0
- package/dist/cjs/store/slices/appNotificationsSlice.js +3 -5
- package/dist/cjs/store/slices/appNotificationsSlice.js.map +1 -1
- package/dist/cjs/store/slices/entityListsSlice.d.ts +326 -0
- package/dist/cjs/store/slices/entityListsSlice.js +4 -0
- package/dist/cjs/store/slices/entityListsSlice.js.map +1 -1
- package/dist/cjs/store/slices/listsSlice.d.ts +364 -0
- package/dist/esm/hooks/app-notifications/useAppNotificationsActions.js +15 -9
- package/dist/esm/hooks/app-notifications/useAppNotificationsActions.js.map +1 -1
- package/dist/esm/hooks/comments/useEntityComments.js +12 -14
- package/dist/esm/hooks/comments/useEntityComments.js.map +1 -1
- package/dist/esm/hooks/comments/useFetchManyComments.d.ts +2 -1
- package/dist/esm/hooks/comments/useFetchManyComments.js.map +1 -1
- package/dist/esm/hooks/comments/useProfileComments.js +12 -14
- package/dist/esm/hooks/comments/useProfileComments.js.map +1 -1
- package/dist/esm/hooks/comments/useReplies.js +6 -3
- package/dist/esm/hooks/comments/useReplies.js.map +1 -1
- package/dist/esm/hooks/entities/useCreateEntity.d.ts +1 -0
- package/dist/esm/hooks/entities/useCreateEntity.js +3 -2
- package/dist/esm/hooks/entities/useCreateEntity.js.map +1 -1
- package/dist/esm/hooks/entities/useFetchEntity.d.ts +3 -2
- package/dist/esm/hooks/entities/useFetchEntity.js +8 -3
- package/dist/esm/hooks/entities/useFetchEntity.js.map +1 -1
- package/dist/esm/hooks/entities/useFetchEntityByForeignId.d.ts +3 -2
- package/dist/esm/hooks/entities/useFetchEntityByForeignId.js +17 -6
- package/dist/esm/hooks/entities/useFetchEntityByForeignId.js.map +1 -1
- package/dist/esm/hooks/entities/useFetchEntityByShortId.d.ts +3 -2
- package/dist/esm/hooks/entities/useFetchEntityByShortId.js +17 -5
- package/dist/esm/hooks/entities/useFetchEntityByShortId.js.map +1 -1
- package/dist/esm/hooks/entities/useFetchManyEntities.d.ts +5 -2
- package/dist/esm/hooks/entities/useFetchManyEntities.js +7 -0
- package/dist/esm/hooks/entities/useFetchManyEntities.js.map +1 -1
- package/dist/esm/hooks/relationships/connections/useFetchConnections.d.ts +3 -2
- package/dist/esm/hooks/relationships/connections/useFetchConnections.js.map +1 -1
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsByUserId.d.ts +3 -2
- package/dist/esm/hooks/relationships/connections/useFetchConnectionsByUserId.js.map +1 -1
- package/dist/esm/hooks/relationships/connections/useFetchReceivedPendingConnections.d.ts +3 -2
- package/dist/esm/hooks/relationships/connections/useFetchReceivedPendingConnections.js.map +1 -1
- package/dist/esm/hooks/relationships/connections/useFetchSentPendingConnections.d.ts +3 -2
- package/dist/esm/hooks/relationships/connections/useFetchSentPendingConnections.js.map +1 -1
- package/dist/esm/hooks/relationships/follows/useFetchFollowers.d.ts +2 -12
- package/dist/esm/hooks/relationships/follows/useFetchFollowers.js.map +1 -1
- package/dist/esm/hooks/relationships/follows/useFetchFollowersByUserId.d.ts +2 -12
- package/dist/esm/hooks/relationships/follows/useFetchFollowersByUserId.js.map +1 -1
- package/dist/esm/hooks/relationships/follows/useFetchFollowing.d.ts +2 -12
- package/dist/esm/hooks/relationships/follows/useFetchFollowing.js.map +1 -1
- package/dist/esm/hooks/relationships/follows/useFetchFollowingByUserId.d.ts +2 -12
- package/dist/esm/hooks/relationships/follows/useFetchFollowingByUserId.js.map +1 -1
- package/dist/esm/hooks/reports/useFetchSpaceReports.d.ts +2 -1
- package/dist/esm/hooks/reports/useFetchSpaceReports.js.map +1 -1
- package/dist/esm/hooks/spaces/useFetchManySpaces.d.ts +2 -1
- package/dist/esm/hooks/spaces/useFetchManySpaces.js.map +1 -1
- package/dist/esm/hooks/spaces/useFetchMySpaces.js +1 -1
- package/dist/esm/hooks/spaces/useFetchMySpaces.js.map +1 -1
- package/dist/esm/hooks/spaces/useFetchSpaceChildren.d.ts +2 -1
- package/dist/esm/hooks/spaces/useFetchSpaceChildren.js.map +1 -1
- package/dist/esm/hooks/spaces/useFetchSpaceMembers.js +1 -1
- package/dist/esm/hooks/spaces/useFetchSpaceMembers.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/IPaginatedResponse.d.ts +11 -0
- package/dist/esm/interfaces/IPaginatedResponse.js +2 -0
- package/dist/esm/interfaces/IPaginatedResponse.js.map +1 -0
- package/dist/esm/interfaces/models/Entity.d.ts +6 -0
- package/dist/esm/interfaces/models/Space.d.ts +2 -11
- package/dist/esm/interfaces/models/SpaceMember.d.ts +1 -1
- package/dist/esm/store/api/appNotificationsApi.d.ts +193 -192
- package/dist/esm/store/api/appNotificationsApi.js +7 -7
- package/dist/esm/store/api/appNotificationsApi.js.map +1 -1
- package/dist/esm/store/api/entityListsApi.d.ts +3 -1
- package/dist/esm/store/api/entityListsApi.js +4 -1
- package/dist/esm/store/api/entityListsApi.js.map +1 -1
- package/dist/esm/store/slices/appNotificationsSlice.d.ts +2 -0
- package/dist/esm/store/slices/appNotificationsSlice.js +3 -5
- package/dist/esm/store/slices/appNotificationsSlice.js.map +1 -1
- package/dist/esm/store/slices/entityListsSlice.d.ts +326 -0
- package/dist/esm/store/slices/entityListsSlice.js +4 -0
- package/dist/esm/store/slices/entityListsSlice.js.map +1 -1
- package/dist/esm/store/slices/listsSlice.d.ts +364 -0
- package/package.json +1 -1
|
@@ -28,6 +28,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
28
28
|
shortId?: string | undefined;
|
|
29
29
|
projectId?: string | undefined;
|
|
30
30
|
sourceId?: string | null | undefined;
|
|
31
|
+
spaceId?: string | null | undefined;
|
|
32
|
+
space?: {
|
|
33
|
+
id: string;
|
|
34
|
+
projectId: string;
|
|
35
|
+
shortId: string;
|
|
36
|
+
slug: string | null;
|
|
37
|
+
name: string;
|
|
38
|
+
description: string | null;
|
|
39
|
+
avatar: string | null;
|
|
40
|
+
banner: string | null;
|
|
41
|
+
userId: string;
|
|
42
|
+
readingPermission: import("../..").ReadingPermission;
|
|
43
|
+
postingPermission: import("../..").PostingPermission;
|
|
44
|
+
requireJoinApproval: boolean;
|
|
45
|
+
parentSpaceId: string | null;
|
|
46
|
+
depth: number;
|
|
47
|
+
metadata: {
|
|
48
|
+
[x: string]: any;
|
|
49
|
+
};
|
|
50
|
+
createdAt: Date;
|
|
51
|
+
updatedAt: Date;
|
|
52
|
+
deletedAt: Date | null;
|
|
53
|
+
membersCount: number;
|
|
54
|
+
childSpacesCount: number;
|
|
55
|
+
isMember?: boolean | undefined;
|
|
56
|
+
} | null | undefined;
|
|
31
57
|
user?: {
|
|
32
58
|
id: string;
|
|
33
59
|
projectId: string;
|
|
@@ -129,6 +155,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
129
155
|
shortId?: string | undefined;
|
|
130
156
|
projectId?: string | undefined;
|
|
131
157
|
sourceId?: string | null | undefined;
|
|
158
|
+
spaceId?: string | null | undefined;
|
|
159
|
+
space?: {
|
|
160
|
+
id: string;
|
|
161
|
+
projectId: string;
|
|
162
|
+
shortId: string;
|
|
163
|
+
slug: string | null;
|
|
164
|
+
name: string;
|
|
165
|
+
description: string | null;
|
|
166
|
+
avatar: string | null;
|
|
167
|
+
banner: string | null;
|
|
168
|
+
userId: string;
|
|
169
|
+
readingPermission: import("../..").ReadingPermission;
|
|
170
|
+
postingPermission: import("../..").PostingPermission;
|
|
171
|
+
requireJoinApproval: boolean;
|
|
172
|
+
parentSpaceId: string | null;
|
|
173
|
+
depth: number;
|
|
174
|
+
metadata: {
|
|
175
|
+
[x: string]: any;
|
|
176
|
+
};
|
|
177
|
+
createdAt: Date;
|
|
178
|
+
updatedAt: Date;
|
|
179
|
+
deletedAt: Date | null;
|
|
180
|
+
membersCount: number;
|
|
181
|
+
childSpacesCount: number;
|
|
182
|
+
isMember?: boolean | undefined;
|
|
183
|
+
} | null | undefined;
|
|
132
184
|
user?: {
|
|
133
185
|
id: string;
|
|
134
186
|
projectId: string;
|
|
@@ -230,6 +282,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
230
282
|
shortId?: string | undefined;
|
|
231
283
|
projectId?: string | undefined;
|
|
232
284
|
sourceId?: string | null | undefined;
|
|
285
|
+
spaceId?: string | null | undefined;
|
|
286
|
+
space?: {
|
|
287
|
+
id: string;
|
|
288
|
+
projectId: string;
|
|
289
|
+
shortId: string;
|
|
290
|
+
slug: string | null;
|
|
291
|
+
name: string;
|
|
292
|
+
description: string | null;
|
|
293
|
+
avatar: string | null;
|
|
294
|
+
banner: string | null;
|
|
295
|
+
userId: string;
|
|
296
|
+
readingPermission: import("../..").ReadingPermission;
|
|
297
|
+
postingPermission: import("../..").PostingPermission;
|
|
298
|
+
requireJoinApproval: boolean;
|
|
299
|
+
parentSpaceId: string | null;
|
|
300
|
+
depth: number;
|
|
301
|
+
metadata: {
|
|
302
|
+
[x: string]: any;
|
|
303
|
+
};
|
|
304
|
+
createdAt: Date;
|
|
305
|
+
updatedAt: Date;
|
|
306
|
+
deletedAt: Date | null;
|
|
307
|
+
membersCount: number;
|
|
308
|
+
childSpacesCount: number;
|
|
309
|
+
isMember?: boolean | undefined;
|
|
310
|
+
} | null | undefined;
|
|
233
311
|
user?: {
|
|
234
312
|
id: string;
|
|
235
313
|
projectId: string;
|
|
@@ -331,6 +409,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
331
409
|
shortId?: string | undefined;
|
|
332
410
|
projectId?: string | undefined;
|
|
333
411
|
sourceId?: string | null | undefined;
|
|
412
|
+
spaceId?: string | null | undefined;
|
|
413
|
+
space?: {
|
|
414
|
+
id: string;
|
|
415
|
+
projectId: string;
|
|
416
|
+
shortId: string;
|
|
417
|
+
slug: string | null;
|
|
418
|
+
name: string;
|
|
419
|
+
description: string | null;
|
|
420
|
+
avatar: string | null;
|
|
421
|
+
banner: string | null;
|
|
422
|
+
userId: string;
|
|
423
|
+
readingPermission: import("../..").ReadingPermission;
|
|
424
|
+
postingPermission: import("../..").PostingPermission;
|
|
425
|
+
requireJoinApproval: boolean;
|
|
426
|
+
parentSpaceId: string | null;
|
|
427
|
+
depth: number;
|
|
428
|
+
metadata: {
|
|
429
|
+
[x: string]: any;
|
|
430
|
+
};
|
|
431
|
+
createdAt: Date;
|
|
432
|
+
updatedAt: Date;
|
|
433
|
+
deletedAt: Date | null;
|
|
434
|
+
membersCount: number;
|
|
435
|
+
childSpacesCount: number;
|
|
436
|
+
isMember?: boolean | undefined;
|
|
437
|
+
} | null | undefined;
|
|
334
438
|
user?: {
|
|
335
439
|
id: string;
|
|
336
440
|
projectId: string;
|
|
@@ -432,6 +536,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
432
536
|
shortId?: string | undefined;
|
|
433
537
|
projectId?: string | undefined;
|
|
434
538
|
sourceId?: string | null | undefined;
|
|
539
|
+
spaceId?: string | null | undefined;
|
|
540
|
+
space?: {
|
|
541
|
+
id: string;
|
|
542
|
+
projectId: string;
|
|
543
|
+
shortId: string;
|
|
544
|
+
slug: string | null;
|
|
545
|
+
name: string;
|
|
546
|
+
description: string | null;
|
|
547
|
+
avatar: string | null;
|
|
548
|
+
banner: string | null;
|
|
549
|
+
userId: string;
|
|
550
|
+
readingPermission: import("../..").ReadingPermission;
|
|
551
|
+
postingPermission: import("../..").PostingPermission;
|
|
552
|
+
requireJoinApproval: boolean;
|
|
553
|
+
parentSpaceId: string | null;
|
|
554
|
+
depth: number;
|
|
555
|
+
metadata: {
|
|
556
|
+
[x: string]: any;
|
|
557
|
+
};
|
|
558
|
+
createdAt: Date;
|
|
559
|
+
updatedAt: Date;
|
|
560
|
+
deletedAt: Date | null;
|
|
561
|
+
membersCount: number;
|
|
562
|
+
childSpacesCount: number;
|
|
563
|
+
isMember?: boolean | undefined;
|
|
564
|
+
} | null | undefined;
|
|
435
565
|
user?: {
|
|
436
566
|
id: string;
|
|
437
567
|
projectId: string;
|
|
@@ -533,6 +663,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
533
663
|
shortId?: string | undefined;
|
|
534
664
|
projectId?: string | undefined;
|
|
535
665
|
sourceId?: string | null | undefined;
|
|
666
|
+
spaceId?: string | null | undefined;
|
|
667
|
+
space?: {
|
|
668
|
+
id: string;
|
|
669
|
+
projectId: string;
|
|
670
|
+
shortId: string;
|
|
671
|
+
slug: string | null;
|
|
672
|
+
name: string;
|
|
673
|
+
description: string | null;
|
|
674
|
+
avatar: string | null;
|
|
675
|
+
banner: string | null;
|
|
676
|
+
userId: string;
|
|
677
|
+
readingPermission: import("../..").ReadingPermission;
|
|
678
|
+
postingPermission: import("../..").PostingPermission;
|
|
679
|
+
requireJoinApproval: boolean;
|
|
680
|
+
parentSpaceId: string | null;
|
|
681
|
+
depth: number;
|
|
682
|
+
metadata: {
|
|
683
|
+
[x: string]: any;
|
|
684
|
+
};
|
|
685
|
+
createdAt: Date;
|
|
686
|
+
updatedAt: Date;
|
|
687
|
+
deletedAt: Date | null;
|
|
688
|
+
membersCount: number;
|
|
689
|
+
childSpacesCount: number;
|
|
690
|
+
isMember?: boolean | undefined;
|
|
691
|
+
} | null | undefined;
|
|
536
692
|
user?: {
|
|
537
693
|
id: string;
|
|
538
694
|
projectId: string;
|
|
@@ -634,6 +790,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
634
790
|
shortId?: string | undefined;
|
|
635
791
|
projectId?: string | undefined;
|
|
636
792
|
sourceId?: string | null | undefined;
|
|
793
|
+
spaceId?: string | null | undefined;
|
|
794
|
+
space?: {
|
|
795
|
+
id: string;
|
|
796
|
+
projectId: string;
|
|
797
|
+
shortId: string;
|
|
798
|
+
slug: string | null;
|
|
799
|
+
name: string;
|
|
800
|
+
description: string | null;
|
|
801
|
+
avatar: string | null;
|
|
802
|
+
banner: string | null;
|
|
803
|
+
userId: string;
|
|
804
|
+
readingPermission: import("../..").ReadingPermission;
|
|
805
|
+
postingPermission: import("../..").PostingPermission;
|
|
806
|
+
requireJoinApproval: boolean;
|
|
807
|
+
parentSpaceId: string | null;
|
|
808
|
+
depth: number;
|
|
809
|
+
metadata: {
|
|
810
|
+
[x: string]: any;
|
|
811
|
+
};
|
|
812
|
+
createdAt: Date;
|
|
813
|
+
updatedAt: Date;
|
|
814
|
+
deletedAt: Date | null;
|
|
815
|
+
membersCount: number;
|
|
816
|
+
childSpacesCount: number;
|
|
817
|
+
isMember?: boolean | undefined;
|
|
818
|
+
} | null | undefined;
|
|
637
819
|
user?: {
|
|
638
820
|
id: string;
|
|
639
821
|
projectId: string;
|
|
@@ -738,6 +920,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
738
920
|
shortId?: string | undefined;
|
|
739
921
|
projectId?: string | undefined;
|
|
740
922
|
sourceId?: string | null | undefined;
|
|
923
|
+
spaceId?: string | null | undefined;
|
|
924
|
+
space?: {
|
|
925
|
+
id: string;
|
|
926
|
+
projectId: string;
|
|
927
|
+
shortId: string;
|
|
928
|
+
slug: string | null;
|
|
929
|
+
name: string;
|
|
930
|
+
description: string | null;
|
|
931
|
+
avatar: string | null;
|
|
932
|
+
banner: string | null;
|
|
933
|
+
userId: string;
|
|
934
|
+
readingPermission: import("../..").ReadingPermission;
|
|
935
|
+
postingPermission: import("../..").PostingPermission;
|
|
936
|
+
requireJoinApproval: boolean;
|
|
937
|
+
parentSpaceId: string | null;
|
|
938
|
+
depth: number;
|
|
939
|
+
metadata: {
|
|
940
|
+
[x: string]: any;
|
|
941
|
+
};
|
|
942
|
+
createdAt: Date;
|
|
943
|
+
updatedAt: Date;
|
|
944
|
+
deletedAt: Date | null;
|
|
945
|
+
membersCount: number;
|
|
946
|
+
childSpacesCount: number;
|
|
947
|
+
isMember?: boolean | undefined;
|
|
948
|
+
} | null | undefined;
|
|
741
949
|
user?: {
|
|
742
950
|
id: string;
|
|
743
951
|
projectId: string;
|
|
@@ -839,6 +1047,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
839
1047
|
shortId?: string | undefined;
|
|
840
1048
|
projectId?: string | undefined;
|
|
841
1049
|
sourceId?: string | null | undefined;
|
|
1050
|
+
spaceId?: string | null | undefined;
|
|
1051
|
+
space?: {
|
|
1052
|
+
id: string;
|
|
1053
|
+
projectId: string;
|
|
1054
|
+
shortId: string;
|
|
1055
|
+
slug: string | null;
|
|
1056
|
+
name: string;
|
|
1057
|
+
description: string | null;
|
|
1058
|
+
avatar: string | null;
|
|
1059
|
+
banner: string | null;
|
|
1060
|
+
userId: string;
|
|
1061
|
+
readingPermission: import("../..").ReadingPermission;
|
|
1062
|
+
postingPermission: import("../..").PostingPermission;
|
|
1063
|
+
requireJoinApproval: boolean;
|
|
1064
|
+
parentSpaceId: string | null;
|
|
1065
|
+
depth: number;
|
|
1066
|
+
metadata: {
|
|
1067
|
+
[x: string]: any;
|
|
1068
|
+
};
|
|
1069
|
+
createdAt: Date;
|
|
1070
|
+
updatedAt: Date;
|
|
1071
|
+
deletedAt: Date | null;
|
|
1072
|
+
membersCount: number;
|
|
1073
|
+
childSpacesCount: number;
|
|
1074
|
+
isMember?: boolean | undefined;
|
|
1075
|
+
} | null | undefined;
|
|
842
1076
|
user?: {
|
|
843
1077
|
id: string;
|
|
844
1078
|
projectId: string;
|
|
@@ -940,6 +1174,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
940
1174
|
shortId?: string | undefined;
|
|
941
1175
|
projectId?: string | undefined;
|
|
942
1176
|
sourceId?: string | null | undefined;
|
|
1177
|
+
spaceId?: string | null | undefined;
|
|
1178
|
+
space?: {
|
|
1179
|
+
id: string;
|
|
1180
|
+
projectId: string;
|
|
1181
|
+
shortId: string;
|
|
1182
|
+
slug: string | null;
|
|
1183
|
+
name: string;
|
|
1184
|
+
description: string | null;
|
|
1185
|
+
avatar: string | null;
|
|
1186
|
+
banner: string | null;
|
|
1187
|
+
userId: string;
|
|
1188
|
+
readingPermission: import("../..").ReadingPermission;
|
|
1189
|
+
postingPermission: import("../..").PostingPermission;
|
|
1190
|
+
requireJoinApproval: boolean;
|
|
1191
|
+
parentSpaceId: string | null;
|
|
1192
|
+
depth: number;
|
|
1193
|
+
metadata: {
|
|
1194
|
+
[x: string]: any;
|
|
1195
|
+
};
|
|
1196
|
+
createdAt: Date;
|
|
1197
|
+
updatedAt: Date;
|
|
1198
|
+
deletedAt: Date | null;
|
|
1199
|
+
membersCount: number;
|
|
1200
|
+
childSpacesCount: number;
|
|
1201
|
+
isMember?: boolean | undefined;
|
|
1202
|
+
} | null | undefined;
|
|
943
1203
|
user?: {
|
|
944
1204
|
id: string;
|
|
945
1205
|
projectId: string;
|
|
@@ -1041,6 +1301,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
1041
1301
|
shortId?: string | undefined;
|
|
1042
1302
|
projectId?: string | undefined;
|
|
1043
1303
|
sourceId?: string | null | undefined;
|
|
1304
|
+
spaceId?: string | null | undefined;
|
|
1305
|
+
space?: {
|
|
1306
|
+
id: string;
|
|
1307
|
+
projectId: string;
|
|
1308
|
+
shortId: string;
|
|
1309
|
+
slug: string | null;
|
|
1310
|
+
name: string;
|
|
1311
|
+
description: string | null;
|
|
1312
|
+
avatar: string | null;
|
|
1313
|
+
banner: string | null;
|
|
1314
|
+
userId: string;
|
|
1315
|
+
readingPermission: import("../..").ReadingPermission;
|
|
1316
|
+
postingPermission: import("../..").PostingPermission;
|
|
1317
|
+
requireJoinApproval: boolean;
|
|
1318
|
+
parentSpaceId: string | null;
|
|
1319
|
+
depth: number;
|
|
1320
|
+
metadata: {
|
|
1321
|
+
[x: string]: any;
|
|
1322
|
+
};
|
|
1323
|
+
createdAt: Date;
|
|
1324
|
+
updatedAt: Date;
|
|
1325
|
+
deletedAt: Date | null;
|
|
1326
|
+
membersCount: number;
|
|
1327
|
+
childSpacesCount: number;
|
|
1328
|
+
isMember?: boolean | undefined;
|
|
1329
|
+
} | null | undefined;
|
|
1044
1330
|
user?: {
|
|
1045
1331
|
id: string;
|
|
1046
1332
|
projectId: string;
|
|
@@ -1142,6 +1428,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
1142
1428
|
shortId?: string | undefined;
|
|
1143
1429
|
projectId?: string | undefined;
|
|
1144
1430
|
sourceId?: string | null | undefined;
|
|
1431
|
+
spaceId?: string | null | undefined;
|
|
1432
|
+
space?: {
|
|
1433
|
+
id: string;
|
|
1434
|
+
projectId: string;
|
|
1435
|
+
shortId: string;
|
|
1436
|
+
slug: string | null;
|
|
1437
|
+
name: string;
|
|
1438
|
+
description: string | null;
|
|
1439
|
+
avatar: string | null;
|
|
1440
|
+
banner: string | null;
|
|
1441
|
+
userId: string;
|
|
1442
|
+
readingPermission: import("../..").ReadingPermission;
|
|
1443
|
+
postingPermission: import("../..").PostingPermission;
|
|
1444
|
+
requireJoinApproval: boolean;
|
|
1445
|
+
parentSpaceId: string | null;
|
|
1446
|
+
depth: number;
|
|
1447
|
+
metadata: {
|
|
1448
|
+
[x: string]: any;
|
|
1449
|
+
};
|
|
1450
|
+
createdAt: Date;
|
|
1451
|
+
updatedAt: Date;
|
|
1452
|
+
deletedAt: Date | null;
|
|
1453
|
+
membersCount: number;
|
|
1454
|
+
childSpacesCount: number;
|
|
1455
|
+
isMember?: boolean | undefined;
|
|
1456
|
+
} | null | undefined;
|
|
1145
1457
|
user?: {
|
|
1146
1458
|
id: string;
|
|
1147
1459
|
projectId: string;
|
|
@@ -1246,6 +1558,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
1246
1558
|
shortId?: string | undefined;
|
|
1247
1559
|
projectId?: string | undefined;
|
|
1248
1560
|
sourceId?: string | null | undefined;
|
|
1561
|
+
spaceId?: string | null | undefined;
|
|
1562
|
+
space?: {
|
|
1563
|
+
id: string;
|
|
1564
|
+
projectId: string;
|
|
1565
|
+
shortId: string;
|
|
1566
|
+
slug: string | null;
|
|
1567
|
+
name: string;
|
|
1568
|
+
description: string | null;
|
|
1569
|
+
avatar: string | null;
|
|
1570
|
+
banner: string | null;
|
|
1571
|
+
userId: string;
|
|
1572
|
+
readingPermission: import("../..").ReadingPermission;
|
|
1573
|
+
postingPermission: import("../..").PostingPermission;
|
|
1574
|
+
requireJoinApproval: boolean;
|
|
1575
|
+
parentSpaceId: string | null;
|
|
1576
|
+
depth: number;
|
|
1577
|
+
metadata: {
|
|
1578
|
+
[x: string]: any;
|
|
1579
|
+
};
|
|
1580
|
+
createdAt: Date;
|
|
1581
|
+
updatedAt: Date;
|
|
1582
|
+
deletedAt: Date | null;
|
|
1583
|
+
membersCount: number;
|
|
1584
|
+
childSpacesCount: number;
|
|
1585
|
+
isMember?: boolean | undefined;
|
|
1586
|
+
} | null | undefined;
|
|
1249
1587
|
user?: {
|
|
1250
1588
|
id: string;
|
|
1251
1589
|
projectId: string;
|
|
@@ -1347,6 +1685,32 @@ export declare const listsSlice: import("@reduxjs/toolkit").Slice<ListsState, {
|
|
|
1347
1685
|
shortId?: string | undefined;
|
|
1348
1686
|
projectId?: string | undefined;
|
|
1349
1687
|
sourceId?: string | null | undefined;
|
|
1688
|
+
spaceId?: string | null | undefined;
|
|
1689
|
+
space?: {
|
|
1690
|
+
id: string;
|
|
1691
|
+
projectId: string;
|
|
1692
|
+
shortId: string;
|
|
1693
|
+
slug: string | null;
|
|
1694
|
+
name: string;
|
|
1695
|
+
description: string | null;
|
|
1696
|
+
avatar: string | null;
|
|
1697
|
+
banner: string | null;
|
|
1698
|
+
userId: string;
|
|
1699
|
+
readingPermission: import("../..").ReadingPermission;
|
|
1700
|
+
postingPermission: import("../..").PostingPermission;
|
|
1701
|
+
requireJoinApproval: boolean;
|
|
1702
|
+
parentSpaceId: string | null;
|
|
1703
|
+
depth: number;
|
|
1704
|
+
metadata: {
|
|
1705
|
+
[x: string]: any;
|
|
1706
|
+
};
|
|
1707
|
+
createdAt: Date;
|
|
1708
|
+
updatedAt: Date;
|
|
1709
|
+
deletedAt: Date | null;
|
|
1710
|
+
membersCount: number;
|
|
1711
|
+
childSpacesCount: number;
|
|
1712
|
+
isMember?: boolean | undefined;
|
|
1713
|
+
} | null | undefined;
|
|
1350
1714
|
user?: {
|
|
1351
1715
|
id: string;
|
|
1352
1716
|
projectId: string;
|
|
@@ -109,7 +109,7 @@ export function useAppNotificationsActions() {
|
|
|
109
109
|
}); }, [dispatch, projectId, user, markNotificationAsReadMutation]);
|
|
110
110
|
// Reset notifications action
|
|
111
111
|
var resetAppNotifications = useCallback(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
112
|
-
var
|
|
112
|
+
var response, notifications, pagination, completeNotifications, error_2;
|
|
113
113
|
return __generator(this, function (_a) {
|
|
114
114
|
switch (_a.label) {
|
|
115
115
|
case 0:
|
|
@@ -127,11 +127,13 @@ export function useAppNotificationsActions() {
|
|
|
127
127
|
limit: limit,
|
|
128
128
|
}).unwrap()];
|
|
129
129
|
case 2:
|
|
130
|
-
|
|
131
|
-
if (
|
|
132
|
-
|
|
130
|
+
response = _a.sent();
|
|
131
|
+
if (response) {
|
|
132
|
+
notifications = response.data, pagination = response.pagination;
|
|
133
|
+
completeNotifications = addNotificationsMessages(notifications, notificationTemplates);
|
|
133
134
|
dispatch(addNotifications({
|
|
134
135
|
notifications: completeNotifications,
|
|
136
|
+
hasMore: pagination.hasMore,
|
|
135
137
|
isFirstPage: true,
|
|
136
138
|
}));
|
|
137
139
|
}
|
|
@@ -153,7 +155,7 @@ export function useAppNotificationsActions() {
|
|
|
153
155
|
]);
|
|
154
156
|
// Fetch more notifications (internal action triggered by page changes)
|
|
155
157
|
var fetchMoreNotifications = useCallback(function (pageToFetch) { return __awaiter(_this, void 0, void 0, function () {
|
|
156
|
-
var
|
|
158
|
+
var response, notifications, pagination, completeNotifications, error_3;
|
|
157
159
|
return __generator(this, function (_a) {
|
|
158
160
|
switch (_a.label) {
|
|
159
161
|
case 0:
|
|
@@ -169,10 +171,14 @@ export function useAppNotificationsActions() {
|
|
|
169
171
|
limit: limit,
|
|
170
172
|
}).unwrap()];
|
|
171
173
|
case 2:
|
|
172
|
-
|
|
173
|
-
if (
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
response = _a.sent();
|
|
175
|
+
if (response) {
|
|
176
|
+
notifications = response.data, pagination = response.pagination;
|
|
177
|
+
completeNotifications = addNotificationsMessages(notifications, notificationTemplates);
|
|
178
|
+
dispatch(addNotifications({
|
|
179
|
+
notifications: completeNotifications,
|
|
180
|
+
hasMore: pagination.hasMore,
|
|
181
|
+
}));
|
|
176
182
|
}
|
|
177
183
|
return [3 /*break*/, 5];
|
|
178
184
|
case 3:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAppNotificationsActions.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotificationsActions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EACL,QAAQ,IAAI,cAAc,EAC1B,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,qCAAqC,EACrC,oCAAoC,GACrC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,wBAAwB,MAAM,wCAAwC,CAAC;AAC9E,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UAAU,0BAA0B;IAA1C,
|
|
1
|
+
{"version":3,"file":"useAppNotificationsActions.js","sourceRoot":"","sources":["../../../../src/hooks/app-notifications/useAppNotificationsActions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,EACL,QAAQ,IAAI,cAAc,EAC1B,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,qCAAqC,EACrC,oCAAoC,GACrC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,wBAAwB,MAAM,wCAAwC,CAAC;AAC9E,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC;;;GAGG;AACH,MAAM,UA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iter(_this, void 0, void 0, function () {
|
|
75
|
-
var newComments_1, err_1;
|
|
75
|
+
var response, newComments_1, pagination, err_1;
|
|
76
76
|
return __generator(this, function (_a) {
|
|
77
77
|
switch (_a.label) {
|
|
78
78
|
case 0:
|
|
@@ -95,13 +95,12 @@ function useEntityComments(props) {
|
|
|
95
95
|
limit: limit,
|
|
96
96
|
})];
|
|
97
97
|
case 2:
|
|
98
|
-
|
|
99
|
-
if (
|
|
98
|
+
response = _a.sent();
|
|
99
|
+
if (response) {
|
|
100
|
+
newComments_1 = response.data, pagination = response.pagination;
|
|
100
101
|
addCommentsToTree(newComments_1);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
setHasMoreState(false);
|
|
104
|
-
}
|
|
102
|
+
hasMore.current = pagination.hasMore;
|
|
103
|
+
setHasMoreState(pagination.hasMore);
|
|
105
104
|
}
|
|
106
105
|
return [3 /*break*/, 5];
|
|
107
106
|
case 3:
|
|
@@ -129,7 +128,7 @@ function useEntityComments(props) {
|
|
|
129
128
|
// useEffect to get a new batch of comments
|
|
130
129
|
useEffect(function () {
|
|
131
130
|
var loadMoreComments = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
132
|
-
var newComments_2, err_2;
|
|
131
|
+
var response, newComments_2, pagination, err_2;
|
|
133
132
|
return __generator(this, function (_a) {
|
|
134
133
|
switch (_a.label) {
|
|
135
134
|
case 0:
|
|
@@ -148,13 +147,12 @@ function useEntityComments(props) {
|
|
|
148
147
|
limit: limit,
|
|
149
148
|
})];
|
|
150
149
|
case 2:
|
|
151
|
-
|
|
152
|
-
if (
|
|
150
|
+
response = _a.sent();
|
|
151
|
+
if (response) {
|
|
152
|
+
newComments_2 = response.data, pagination = response.pagination;
|
|
153
153
|
addCommentsToTree(newComments_2);
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
setHasMoreState(false);
|
|
157
|
-
}
|
|
154
|
+
hasMore.current = pagination.hasMore;
|
|
155
|
+
setHasMoreState(pagination.hasMore);
|
|
158
156
|
}
|
|
159
157
|
return [3 /*break*/, 5];
|
|
160
158
|
case 3:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntityComments.js","sourceRoot":"","sources":["../../../../src/hooks/comments/useEntityComments.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,IAAI,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChG,OAAO,EAAE,qBAAqB,IAAI,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAwB5G,SAAS,iBAAiB,CACxB,KAA6B;IAD/B,
|
|
1
|
+
{"version":3,"file":"useEntityComments.js","sourceRoot":"","sources":["../../../../src/hooks/comments/useEntityComments.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,iBAAiB,IAAI,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAChG,OAAO,EAAE,qBAAqB,IAAI,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAwB5G,SAAS,iBAAiB,CACxB,KAA6B;IAD/B,iBAwJC;IArJS,IAAA,QAAQ,GAAwC,KAAK,SAA7C,EAAE,KAAsC,KAAK,MAAjC,EAAV,KAAK,mBAAG,EAAE,KAAA,EAAE,KAA0B,KAAK,cAAV,EAArB,aAAa,mB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AAK,QAAQ,WAAb,CAAc;4BACnD,iBAAiB,CAAC,aAAW,CAAC,CAAC;4BAC/B,OAAO,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;4BACrC,eAAe,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;wBACtC,CAAC;;;;wBAED,WAAW,CAAC,KAAG,EAAE,+BAA+B,CAAC,CAAC;;;wBAElD,OAAO,CAAC,OAAO,GAAG,KAAK,CAAC;wBACxB,eAAe,CAAC,KAAK,CAAC,CAAC;;;;;aAE1B,CAAC;QAEF,uCAAuC;QACvC,IAAI,IAAI,GAAG,CAAC,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YACpD,gBAAgB,EAAE,CAAC;QACrB,CAAC;IACH,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO;QACL,kBAAkB,oBAAA;QAClB,QAAQ,UAAA;QACR,WAAW,aAAA;QACX,OAAO,EAAE,YAAY,EAAE,sCAAsC;QAC7D,OAAO,EAAE,YAAY;QACrB,MAAM,QAAA;QACN,SAAS,WAAA;QACT,QAAQ,UAAA;QACR,iBAAiB,mBAAA;QACjB,qBAAqB,uBAAA;KACtB,CAAC;AACJ,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CommentsSortByOptions } from "../../interfaces/CommentsSortByOptions";
|
|
2
2
|
import { Comment } from "../../interfaces/models/Comment";
|
|
3
|
+
import { PaginatedResponse } from "../../interfaces/IPaginatedResponse";
|
|
3
4
|
declare function useFetchManyComments(): (props: {
|
|
4
5
|
entityId?: string | null | undefined;
|
|
5
6
|
userId?: string | null | undefined;
|
|
@@ -9,5 +10,5 @@ declare function useFetchManyComments(): (props: {
|
|
|
9
10
|
limit?: number;
|
|
10
11
|
includeEntity?: boolean;
|
|
11
12
|
sourceId?: string | null | undefined;
|
|
12
|
-
}) => Promise<Comment
|
|
13
|
+
}) => Promise<PaginatedResponse<Comment>>;
|
|
13
14
|
export default useFetchManyComments;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchManyComments.js","sourceRoot":"","sources":["../../../../src/hooks/comments/useFetchManyComments.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useFetchManyComments.js","sourceRoot":"","sources":["../../../../src/hooks/comments/useFetchManyComments.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAIpC,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,KAAK,MAAM,oBAAoB,CAAC;AAEvC,SAAS,oBAAoB;IAA7B,iBAiEC;IAhES,IAAA,SAAS,GAAK,UAAU,EAAE,UAAjB,CAAkB;IAEnC,IAAM,aAAa,GAAG,WAAW,CAC/B,UAAO,KASN;;;;;oBAEG,QAAQ,GAQN,KAAK,SARC,EACR,MAAM,GAOJ,KAAK,OAPD,EACN,QAAQ,GAMN,KAAK,SANC,EACR,MAAM,GAKJ,KAAK,OALD,EACN,IAAI,GAIF,KAAK,KAJH,EACJ,KAAK,GAGH,KAAK,MAHF,EACL,aAAa,GAEX,KAAK,cAFM,EACb,QAAQ,GACN,KAAK,SADC,CACA;oBAEV,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;oBACtD,CAAC;oBAED,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;wBAChB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;oBAC9C,CAAC;oBAED,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;oBACzD,CAAC;o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