convex-feedback 0.2.0-beta.8 → 0.2.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/README.md +398 -7
- package/dist/.tsbuildinfo +1 -1
- package/dist/client/api.d.ts +49 -9
- package/dist/client/api.d.ts.map +1 -1
- package/dist/client/config.d.ts +1 -3
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js.map +1 -1
- package/dist/client/index.d.ts +707 -15
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +243 -12
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +2 -0
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +222 -4
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/admin.d.ts +5 -90
- package/dist/component/admin.d.ts.map +1 -1
- package/dist/component/admin.js +59 -29
- package/dist/component/admin.js.map +1 -1
- package/dist/component/comments.d.ts +107 -15
- package/dist/component/comments.d.ts.map +1 -1
- package/dist/component/comments.js +342 -28
- package/dist/component/comments.js.map +1 -1
- package/dist/component/crons.d.ts.map +1 -1
- package/dist/component/crons.js +4 -0
- package/dist/component/crons.js.map +1 -1
- package/dist/component/entries.d.ts +119 -91
- package/dist/component/entries.d.ts.map +1 -1
- package/dist/component/entries.js +348 -29
- package/dist/component/entries.js.map +1 -1
- package/dist/component/helpers.d.ts +32 -1
- package/dist/component/helpers.d.ts.map +1 -1
- package/dist/component/helpers.js +121 -4
- package/dist/component/helpers.js.map +1 -1
- package/dist/component/migrations.d.ts +24 -0
- package/dist/component/migrations.d.ts.map +1 -1
- package/dist/component/migrations.js +318 -0
- package/dist/component/migrations.js.map +1 -1
- package/dist/component/model.d.ts +455 -120
- package/dist/component/model.d.ts.map +1 -1
- package/dist/component/model.js +70 -2
- package/dist/component/model.js.map +1 -1
- package/dist/component/reactions.d.ts +37 -0
- package/dist/component/reactions.d.ts.map +1 -0
- package/dist/component/reactions.js +52 -0
- package/dist/component/reactions.js.map +1 -0
- package/dist/component/roadmap.d.ts +10 -46
- package/dist/component/roadmap.d.ts.map +1 -1
- package/dist/component/roadmap.js +239 -21
- package/dist/component/roadmap.js.map +1 -1
- package/dist/component/schema.d.ts +33 -5
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +40 -4
- package/dist/component/schema.js.map +1 -1
- package/dist/react/index.d.ts +26 -238
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +65 -2
- package/dist/react/index.js.map +1 -1
- package/dist/test.d.ts +23 -5
- package/dist/test.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/README.md +6 -1
- package/src/client/api.ts +89 -7
- package/src/client/config.ts +1 -3
- package/src/client/index.ts +1237 -34
- package/src/component/README.md +32 -4
- package/src/component/_generated/api.ts +2 -0
- package/src/component/_generated/component.ts +290 -8
- package/src/component/admin.ts +88 -30
- package/src/component/comments.ts +405 -26
- package/src/component/crons.ts +10 -0
- package/src/component/entries.ts +388 -27
- package/src/component/helpers.ts +163 -4
- package/src/component/migrations.ts +415 -0
- package/src/component/model.ts +381 -117
- package/src/component/reactions.ts +60 -0
- package/src/component/roadmap.ts +357 -35
- package/src/component/schema.ts +40 -4
- package/src/react/README.md +5 -0
- package/src/react/index.ts +90 -3
package/src/client/api.ts
CHANGED
|
@@ -11,7 +11,10 @@ import type {
|
|
|
11
11
|
EntryStatus,
|
|
12
12
|
EntryStatusFilter,
|
|
13
13
|
FeedbackComment,
|
|
14
|
+
FeedbackActivityComment,
|
|
15
|
+
FeedbackActivityEntry,
|
|
14
16
|
FeedbackEntry,
|
|
17
|
+
FeedbackReaction,
|
|
15
18
|
FeedbackMetadata,
|
|
16
19
|
AdminFeedbackEntry,
|
|
17
20
|
EntryPriority,
|
|
@@ -56,6 +59,12 @@ export type ListEntriesArgs = {
|
|
|
56
59
|
sort?: EntrySort;
|
|
57
60
|
};
|
|
58
61
|
|
|
62
|
+
/** Arguments for cursor-paginated entries created by the current actor. */
|
|
63
|
+
export type ListUserEntriesArgs = {
|
|
64
|
+
/** Convex cursor-pagination options. */
|
|
65
|
+
paginationOpts: PaginationOptions;
|
|
66
|
+
};
|
|
67
|
+
|
|
59
68
|
/**
|
|
60
69
|
* Arguments for retrieving one entry.
|
|
61
70
|
*/
|
|
@@ -168,6 +177,17 @@ export type UpdateEntryArgs = {
|
|
|
168
177
|
body: string;
|
|
169
178
|
};
|
|
170
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Arguments for permanently deleting an entry as an administrator.
|
|
182
|
+
*
|
|
183
|
+
* Deletion hides the entry immediately and finishes dependent-document
|
|
184
|
+
* cleanup in bounded scheduled batches before the entry is hard-deleted.
|
|
185
|
+
*/
|
|
186
|
+
export type DeleteEntryArgs = {
|
|
187
|
+
/** Entry to delete. */
|
|
188
|
+
entryId: string;
|
|
189
|
+
};
|
|
190
|
+
|
|
171
191
|
/**
|
|
172
192
|
* Arguments for changing an entry workflow status.
|
|
173
193
|
*/
|
|
@@ -184,6 +204,7 @@ export type AdminListEntriesArgs = {
|
|
|
184
204
|
paginationOpts: PaginationOptions;
|
|
185
205
|
kinds?: EntryKind[];
|
|
186
206
|
status?: EntryStatus;
|
|
207
|
+
statusFilter?: EntryStatusFilter;
|
|
187
208
|
priority?: EntryPriority;
|
|
188
209
|
};
|
|
189
210
|
|
|
@@ -201,6 +222,10 @@ export type ListRoadmapArgs = {
|
|
|
201
222
|
paginationOpts: PaginationOptions;
|
|
202
223
|
status?: RoadmapStatus;
|
|
203
224
|
};
|
|
225
|
+
export type GetRoadmapItemArgs = {
|
|
226
|
+
/** Identifier returned by the component for the requested roadmap item. */
|
|
227
|
+
roadmapId: string;
|
|
228
|
+
};
|
|
204
229
|
export type SearchRoadmapArgs = { searchQuery: string; limit?: number };
|
|
205
230
|
export type CreateRoadmapArgs = {
|
|
206
231
|
title: string;
|
|
@@ -289,6 +314,18 @@ export type ListCommentsArgs = {
|
|
|
289
314
|
sort?: CommentSort;
|
|
290
315
|
};
|
|
291
316
|
|
|
317
|
+
/** Arguments for cursor-paginated comments created by the current actor. */
|
|
318
|
+
export type ListUserCommentsArgs = {
|
|
319
|
+
/** Convex cursor-pagination options. */
|
|
320
|
+
paginationOpts: PaginationOptions;
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
/** Arguments for cursor-paginated reactions created by the current actor. */
|
|
324
|
+
export type ListUserReactionsArgs = {
|
|
325
|
+
/** Convex cursor-pagination options. */
|
|
326
|
+
paginationOpts: PaginationOptions;
|
|
327
|
+
};
|
|
328
|
+
|
|
292
329
|
/**
|
|
293
330
|
* Arguments for creating a top-level comment or reply.
|
|
294
331
|
*/
|
|
@@ -318,11 +355,9 @@ export type UpdateCommentArgs = {
|
|
|
318
355
|
body: string;
|
|
319
356
|
};
|
|
320
357
|
|
|
321
|
-
/**
|
|
322
|
-
* Arguments for soft-deleting a comment.
|
|
323
|
-
*/
|
|
358
|
+
/** Arguments for permanently deleting a comment and its descendants. */
|
|
324
359
|
export type DeleteCommentArgs = {
|
|
325
|
-
/** Comment to
|
|
360
|
+
/** Comment subtree to delete. */
|
|
326
361
|
commentId: string;
|
|
327
362
|
};
|
|
328
363
|
|
|
@@ -364,10 +399,13 @@ export type SetCommentLikeResult = {
|
|
|
364
399
|
* @typeParam RateLimitResult A validated rejection value returned by mutations
|
|
365
400
|
* when non-throwing rate limiting is configured. The default `never` preserves
|
|
366
401
|
* the original success-only mutation results.
|
|
402
|
+
* @typeParam CallbackRejectionResult A validated rejection value returned only
|
|
403
|
+
* by create mutations when callback return mode is configured.
|
|
367
404
|
*/
|
|
368
405
|
export interface FeedbackPublicApi<
|
|
369
406
|
Name extends string | undefined = string | undefined,
|
|
370
407
|
RateLimitResult = never,
|
|
408
|
+
CallbackRejectionResult = never,
|
|
371
409
|
> {
|
|
372
410
|
/** Returns whether the host actor has admin permissions. */
|
|
373
411
|
isAdmin: FunctionReference<
|
|
@@ -396,6 +434,15 @@ export interface FeedbackPublicApi<
|
|
|
396
434
|
Name
|
|
397
435
|
>;
|
|
398
436
|
|
|
437
|
+
/** Returns entries created by the authenticated actor. */
|
|
438
|
+
listUserEntries: FunctionReference<
|
|
439
|
+
"query",
|
|
440
|
+
"public",
|
|
441
|
+
ListUserEntriesArgs,
|
|
442
|
+
PaginationResult<FeedbackActivityEntry>,
|
|
443
|
+
Name
|
|
444
|
+
>;
|
|
445
|
+
|
|
399
446
|
/** Returns one entry or `null` when it does not exist. */
|
|
400
447
|
getEntry: FunctionReference<
|
|
401
448
|
"query",
|
|
@@ -428,7 +475,7 @@ export interface FeedbackPublicApi<
|
|
|
428
475
|
"mutation",
|
|
429
476
|
"public",
|
|
430
477
|
CreateEntryArgs,
|
|
431
|
-
string | RateLimitResult,
|
|
478
|
+
string | RateLimitResult | CallbackRejectionResult,
|
|
432
479
|
Name
|
|
433
480
|
>;
|
|
434
481
|
|
|
@@ -441,6 +488,15 @@ export interface FeedbackPublicApi<
|
|
|
441
488
|
Name
|
|
442
489
|
>;
|
|
443
490
|
|
|
491
|
+
/** Starts permanent entry deletion; cleanup runs in bounded background batches. */
|
|
492
|
+
deleteEntry: FunctionReference<
|
|
493
|
+
"mutation",
|
|
494
|
+
"public",
|
|
495
|
+
DeleteEntryArgs,
|
|
496
|
+
null | RateLimitResult,
|
|
497
|
+
Name
|
|
498
|
+
>;
|
|
499
|
+
|
|
444
500
|
/** Changes entry status, or returns a configured rate-limit rejection. */
|
|
445
501
|
setEntryStatus: FunctionReference<
|
|
446
502
|
"mutation",
|
|
@@ -486,6 +542,14 @@ export interface FeedbackPublicApi<
|
|
|
486
542
|
PaginationResult<RoadmapItem>,
|
|
487
543
|
Name
|
|
488
544
|
>;
|
|
545
|
+
/** Returns one roadmap item or `null` when it does not exist. */
|
|
546
|
+
getRoadmapItem: FunctionReference<
|
|
547
|
+
"query",
|
|
548
|
+
"public",
|
|
549
|
+
GetRoadmapItemArgs,
|
|
550
|
+
RoadmapItem | null,
|
|
551
|
+
Name
|
|
552
|
+
>;
|
|
489
553
|
searchRoadmap: FunctionReference<
|
|
490
554
|
"query",
|
|
491
555
|
"public",
|
|
@@ -568,12 +632,30 @@ export interface FeedbackPublicApi<
|
|
|
568
632
|
Name
|
|
569
633
|
>;
|
|
570
634
|
|
|
635
|
+
/** Returns comments created by the authenticated actor. */
|
|
636
|
+
listUserComments: FunctionReference<
|
|
637
|
+
"query",
|
|
638
|
+
"public",
|
|
639
|
+
ListUserCommentsArgs,
|
|
640
|
+
PaginationResult<FeedbackActivityComment>,
|
|
641
|
+
Name
|
|
642
|
+
>;
|
|
643
|
+
|
|
644
|
+
/** Returns reactions created by the authenticated actor. */
|
|
645
|
+
listUserReactions: FunctionReference<
|
|
646
|
+
"query",
|
|
647
|
+
"public",
|
|
648
|
+
ListUserReactionsArgs,
|
|
649
|
+
PaginationResult<FeedbackReaction>,
|
|
650
|
+
Name
|
|
651
|
+
>;
|
|
652
|
+
|
|
571
653
|
/** Creates a comment/reply, returning its ID or a rate-limit rejection. */
|
|
572
654
|
createComment: FunctionReference<
|
|
573
655
|
"mutation",
|
|
574
656
|
"public",
|
|
575
657
|
CreateCommentArgs,
|
|
576
|
-
string | RateLimitResult,
|
|
658
|
+
string | RateLimitResult | CallbackRejectionResult,
|
|
577
659
|
Name
|
|
578
660
|
>;
|
|
579
661
|
|
|
@@ -586,7 +668,7 @@ export interface FeedbackPublicApi<
|
|
|
586
668
|
Name
|
|
587
669
|
>;
|
|
588
670
|
|
|
589
|
-
/**
|
|
671
|
+
/** Permanently deletes a comment subtree, or returns a configured rate-limit rejection. */
|
|
590
672
|
deleteComment: FunctionReference<
|
|
591
673
|
"mutation",
|
|
592
674
|
"public",
|
package/src/client/config.ts
CHANGED
|
@@ -86,9 +86,7 @@ export interface FeedbackCommentsConfig {
|
|
|
86
86
|
editableByAuthor: boolean;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
* Whether comment authors may
|
|
90
|
-
*
|
|
91
|
-
* Deletion preserves the document so nested replies retain their structure.
|
|
89
|
+
* Whether comment authors may permanently delete their own comments.
|
|
92
90
|
*
|
|
93
91
|
* @default true
|
|
94
92
|
*/
|