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/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FeedbackPublicApi } from "../client/api.js";
|
|
2
|
-
import type { CommentSort, EntryKind, EntryPriority, EntrySort, EntryStatus, EntryStatusFilter, RoadmapStatus } from "../component/model.js";
|
|
2
|
+
import type { CommentSort, EntryKind, EntryPriority, EntrySort, EntryStatus, EntryStatusFilter, RoadmapItem, RoadmapStatus, SimilarEntriesResult } from "../component/model.js";
|
|
3
3
|
/**
|
|
4
4
|
* Client-side pagination defaults used by hooks created with
|
|
5
5
|
* `createFeedbackHooks`.
|
|
@@ -118,6 +118,7 @@ export interface SearchEntriesArgs {
|
|
|
118
118
|
export interface UseAdminEntriesArgs {
|
|
119
119
|
kinds?: readonly EntryKind[];
|
|
120
120
|
status?: EntryStatus;
|
|
121
|
+
statusFilter?: EntryStatusFilter;
|
|
121
122
|
priority?: EntryPriority;
|
|
122
123
|
}
|
|
123
124
|
export interface UseAdminSearchEntriesArgs extends UseAdminEntriesArgs {
|
|
@@ -179,207 +180,43 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
179
180
|
/**
|
|
180
181
|
* Returns a cursor-paginated, server-filtered entry list.
|
|
181
182
|
*/
|
|
182
|
-
useEntries(args?: UseEntriesArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListEntriesArgs, import("convex/server").PaginationResult<
|
|
183
|
-
updatedAt?: number | undefined;
|
|
184
|
-
viewerIsAuthor?: boolean | undefined;
|
|
185
|
-
metadata?: {
|
|
186
|
-
standard?: Record<string, string | number | boolean> | undefined;
|
|
187
|
-
additional?: Record<string, string | number | boolean> | undefined;
|
|
188
|
-
} | undefined;
|
|
189
|
-
id: string;
|
|
190
|
-
creationTime: number;
|
|
191
|
-
title: string;
|
|
192
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
193
|
-
actorId: string;
|
|
194
|
-
kind: "feedback" | "feature_request" | "bug_report";
|
|
195
|
-
body: string;
|
|
196
|
-
upvoteCount: number;
|
|
197
|
-
commentCount: number;
|
|
198
|
-
viewerHasUpvoted: boolean;
|
|
199
|
-
}>, string | undefined>>;
|
|
183
|
+
useEntries(args?: UseEntriesArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListEntriesArgs, import("convex/server").PaginationResult<import("../component/model.js").FeedbackEntry>, string | undefined>>;
|
|
200
184
|
/**
|
|
201
185
|
* Reactively retrieves one entry.
|
|
202
186
|
*
|
|
203
187
|
* Passing `null` or `undefined` skips the query.
|
|
204
188
|
*/
|
|
205
|
-
useEntry(entryId: string | null | undefined):
|
|
206
|
-
updatedAt?: number | undefined;
|
|
207
|
-
viewerIsAuthor?: boolean | undefined;
|
|
208
|
-
metadata?: {
|
|
209
|
-
standard?: Record<string, string | number | boolean> | undefined;
|
|
210
|
-
additional?: Record<string, string | number | boolean> | undefined;
|
|
211
|
-
} | undefined;
|
|
212
|
-
id: string;
|
|
213
|
-
creationTime: number;
|
|
214
|
-
title: string;
|
|
215
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
216
|
-
actorId: string;
|
|
217
|
-
kind: "feedback" | "feature_request" | "bug_report";
|
|
218
|
-
body: string;
|
|
219
|
-
upvoteCount: number;
|
|
220
|
-
commentCount: number;
|
|
221
|
-
viewerHasUpvoted: boolean;
|
|
222
|
-
} | null | undefined;
|
|
189
|
+
useEntry(entryId: string | null | undefined): import("../component/model.js").FeedbackEntry | null | undefined;
|
|
223
190
|
/**
|
|
224
191
|
* Performs reactive full-text entry search.
|
|
225
192
|
*
|
|
226
193
|
* An empty/whitespace-only query returns `[]` without running Convex.
|
|
227
194
|
*/
|
|
228
|
-
useSearchEntries(args: SearchEntriesArgs):
|
|
229
|
-
updatedAt?: number | undefined;
|
|
230
|
-
viewerIsAuthor?: boolean | undefined;
|
|
231
|
-
metadata?: {
|
|
232
|
-
standard?: Record<string, string | number | boolean> | undefined;
|
|
233
|
-
additional?: Record<string, string | number | boolean> | undefined;
|
|
234
|
-
} | undefined;
|
|
235
|
-
id: string;
|
|
236
|
-
creationTime: number;
|
|
237
|
-
title: string;
|
|
238
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
239
|
-
actorId: string;
|
|
240
|
-
kind: "feedback" | "feature_request" | "bug_report";
|
|
241
|
-
body: string;
|
|
242
|
-
upvoteCount: number;
|
|
243
|
-
commentCount: number;
|
|
244
|
-
viewerHasUpvoted: boolean;
|
|
245
|
-
}[] | undefined;
|
|
195
|
+
useSearchEntries(args: SearchEntriesArgs): import("../component/model.js").FeedbackEntry[] | undefined;
|
|
246
196
|
/** Returns whether the authenticated host actor is an admin. */
|
|
247
197
|
useIsAdmin(): boolean | undefined;
|
|
248
198
|
/** Returns whether the current request has an authenticated actor. */
|
|
249
199
|
useIsAuthenticated(): boolean | undefined;
|
|
250
200
|
/** Returns a cursor-paginated admin inbox with private triage relationships. */
|
|
251
|
-
useAdminEntries(args?: UseAdminEntriesArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").AdminListEntriesArgs, import("convex/server").PaginationResult<
|
|
252
|
-
updatedAt?: number | undefined;
|
|
253
|
-
viewerIsAuthor?: boolean | undefined;
|
|
254
|
-
metadata?: {
|
|
255
|
-
standard?: Record<string, string | number | boolean> | undefined;
|
|
256
|
-
additional?: Record<string, string | number | boolean> | undefined;
|
|
257
|
-
} | undefined;
|
|
258
|
-
id: string;
|
|
259
|
-
creationTime: number;
|
|
260
|
-
title: string;
|
|
261
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
262
|
-
actorId: string;
|
|
263
|
-
kind: "feedback" | "feature_request" | "bug_report";
|
|
264
|
-
body: string;
|
|
265
|
-
upvoteCount: number;
|
|
266
|
-
commentCount: number;
|
|
267
|
-
viewerHasUpvoted: boolean;
|
|
268
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
269
|
-
roadmap?: {
|
|
270
|
-
description?: string | undefined;
|
|
271
|
-
id: string;
|
|
272
|
-
creationTime: number;
|
|
273
|
-
title: string;
|
|
274
|
-
status: "planned" | "in_progress" | "shipped";
|
|
275
|
-
position: number;
|
|
276
|
-
createdAt: number;
|
|
277
|
-
updatedAt: number;
|
|
278
|
-
feedbackCount: number;
|
|
279
|
-
} | undefined;
|
|
280
|
-
}>, string | undefined>>;
|
|
201
|
+
useAdminEntries(args?: UseAdminEntriesArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").AdminListEntriesArgs, import("convex/server").PaginationResult<import("../component/model.js").AdminFeedbackEntry>, string | undefined>>;
|
|
281
202
|
/** Returns one admin-enriched feedback entry. */
|
|
282
|
-
useAdminEntry(entryId: string | null | undefined):
|
|
283
|
-
updatedAt?: number | undefined;
|
|
284
|
-
viewerIsAuthor?: boolean | undefined;
|
|
285
|
-
metadata?: {
|
|
286
|
-
standard?: Record<string, string | number | boolean> | undefined;
|
|
287
|
-
additional?: Record<string, string | number | boolean> | undefined;
|
|
288
|
-
} | undefined;
|
|
289
|
-
id: string;
|
|
290
|
-
creationTime: number;
|
|
291
|
-
title: string;
|
|
292
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
293
|
-
actorId: string;
|
|
294
|
-
kind: "feedback" | "feature_request" | "bug_report";
|
|
295
|
-
body: string;
|
|
296
|
-
upvoteCount: number;
|
|
297
|
-
commentCount: number;
|
|
298
|
-
viewerHasUpvoted: boolean;
|
|
299
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
300
|
-
roadmap?: {
|
|
301
|
-
description?: string | undefined;
|
|
302
|
-
id: string;
|
|
303
|
-
creationTime: number;
|
|
304
|
-
title: string;
|
|
305
|
-
status: "planned" | "in_progress" | "shipped";
|
|
306
|
-
position: number;
|
|
307
|
-
createdAt: number;
|
|
308
|
-
updatedAt: number;
|
|
309
|
-
feedbackCount: number;
|
|
310
|
-
} | undefined;
|
|
311
|
-
} | null | undefined;
|
|
203
|
+
useAdminEntry(entryId: string | null | undefined): import("../component/model.js").AdminFeedbackEntry | null | undefined;
|
|
312
204
|
/** Searches the admin inbox with triage filters. */
|
|
313
|
-
useAdminSearchEntries(args: UseAdminSearchEntriesArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").AdminSearchEntriesArgs, import("convex/server").PaginationResult<
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
commentCount: number;
|
|
329
|
-
viewerHasUpvoted: boolean;
|
|
330
|
-
priority?: "low" | "medium" | "high" | undefined;
|
|
331
|
-
roadmap?: {
|
|
332
|
-
description?: string | undefined;
|
|
333
|
-
id: string;
|
|
334
|
-
creationTime: number;
|
|
335
|
-
title: string;
|
|
336
|
-
status: "planned" | "in_progress" | "shipped";
|
|
337
|
-
position: number;
|
|
338
|
-
createdAt: number;
|
|
339
|
-
updatedAt: number;
|
|
340
|
-
feedbackCount: number;
|
|
341
|
-
} | undefined;
|
|
342
|
-
}>, string | undefined>>;
|
|
343
|
-
useRoadmap(status?: RoadmapStatus): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListRoadmapArgs, import("convex/server").PaginationResult<{
|
|
344
|
-
description?: string | undefined;
|
|
345
|
-
id: string;
|
|
346
|
-
creationTime: number;
|
|
347
|
-
title: string;
|
|
348
|
-
status: "planned" | "in_progress" | "shipped";
|
|
349
|
-
position: number;
|
|
350
|
-
createdAt: number;
|
|
351
|
-
updatedAt: number;
|
|
352
|
-
feedbackCount: number;
|
|
353
|
-
}>, string | undefined>>;
|
|
354
|
-
useSearchRoadmap(searchQuery: string, limit?: number): {
|
|
355
|
-
description?: string | undefined;
|
|
356
|
-
id: string;
|
|
357
|
-
creationTime: number;
|
|
358
|
-
title: string;
|
|
359
|
-
status: "planned" | "in_progress" | "shipped";
|
|
360
|
-
position: number;
|
|
361
|
-
createdAt: number;
|
|
362
|
-
updatedAt: number;
|
|
363
|
-
feedbackCount: number;
|
|
364
|
-
}[] | undefined;
|
|
365
|
-
useRoadmapFeedback(roadmapId: string | null | undefined): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListRoadmapFeedbackArgs, import("convex/server").PaginationResult<{
|
|
366
|
-
updatedAt?: number | undefined;
|
|
367
|
-
viewerIsAuthor?: boolean | undefined;
|
|
368
|
-
metadata?: {
|
|
369
|
-
standard?: Record<string, string | number | boolean> | undefined;
|
|
370
|
-
additional?: Record<string, string | number | boolean> | undefined;
|
|
371
|
-
} | undefined;
|
|
372
|
-
id: string;
|
|
373
|
-
creationTime: number;
|
|
374
|
-
title: string;
|
|
375
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
376
|
-
actorId: string;
|
|
377
|
-
kind: "feedback" | "feature_request" | "bug_report";
|
|
378
|
-
body: string;
|
|
379
|
-
upvoteCount: number;
|
|
380
|
-
commentCount: number;
|
|
381
|
-
viewerHasUpvoted: boolean;
|
|
382
|
-
}>, string | undefined>>;
|
|
205
|
+
useAdminSearchEntries(args: UseAdminSearchEntriesArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").AdminSearchEntriesArgs, import("convex/server").PaginationResult<import("../component/model.js").AdminFeedbackEntry>, string | undefined>>;
|
|
206
|
+
/**
|
|
207
|
+
* An unfiltered roadmap is composed from one stream per status so a
|
|
208
|
+
* rebalance cannot mix live and replacement positions in the UI.
|
|
209
|
+
*/
|
|
210
|
+
useRoadmap(status?: RoadmapStatus): {
|
|
211
|
+
results: RoadmapItem[];
|
|
212
|
+
status: "Exhausted" | "LoadingFirstPage" | "CanLoadMore" | "LoadingMore";
|
|
213
|
+
isLoading: boolean;
|
|
214
|
+
loadMore: (numItems: number) => void;
|
|
215
|
+
};
|
|
216
|
+
/** Reactively retrieves one roadmap item independently of the list page. */
|
|
217
|
+
useRoadmapItem(roadmapId: string | null | undefined): RoadmapItem | null | undefined;
|
|
218
|
+
useSearchRoadmap(searchQuery: string, limit?: number): RoadmapItem[] | undefined;
|
|
219
|
+
useRoadmapFeedback(roadmapId: string | null | undefined): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListRoadmapFeedbackArgs, import("convex/server").PaginationResult<import("../component/model.js").FeedbackEntry>, string | undefined>>;
|
|
383
220
|
/**
|
|
384
221
|
* Reactively finds exact and similar entries for a proposed draft.
|
|
385
222
|
*
|
|
@@ -388,65 +225,16 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
388
225
|
* `limit` is forwarded to the server unchanged. The server applies the
|
|
389
226
|
* combined exact-first limit semantics documented by `SimilarEntriesArgs`.
|
|
390
227
|
*/
|
|
391
|
-
useSimilarEntries(args: SimilarEntriesArgs):
|
|
392
|
-
exact: {
|
|
393
|
-
updatedAt?: number | undefined;
|
|
394
|
-
viewerIsAuthor?: boolean | undefined;
|
|
395
|
-
metadata?: {
|
|
396
|
-
standard?: Record<string, string | number | boolean> | undefined;
|
|
397
|
-
additional?: Record<string, string | number | boolean> | undefined;
|
|
398
|
-
} | undefined;
|
|
399
|
-
id: string;
|
|
400
|
-
creationTime: number;
|
|
401
|
-
title: string;
|
|
402
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
403
|
-
actorId: string;
|
|
404
|
-
kind: "feedback" | "feature_request" | "bug_report";
|
|
405
|
-
body: string;
|
|
406
|
-
upvoteCount: number;
|
|
407
|
-
commentCount: number;
|
|
408
|
-
viewerHasUpvoted: boolean;
|
|
409
|
-
}[];
|
|
410
|
-
similar: {
|
|
411
|
-
updatedAt?: number | undefined;
|
|
412
|
-
viewerIsAuthor?: boolean | undefined;
|
|
413
|
-
metadata?: {
|
|
414
|
-
standard?: Record<string, string | number | boolean> | undefined;
|
|
415
|
-
additional?: Record<string, string | number | boolean> | undefined;
|
|
416
|
-
} | undefined;
|
|
417
|
-
id: string;
|
|
418
|
-
creationTime: number;
|
|
419
|
-
title: string;
|
|
420
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
421
|
-
actorId: string;
|
|
422
|
-
kind: "feedback" | "feature_request" | "bug_report";
|
|
423
|
-
body: string;
|
|
424
|
-
upvoteCount: number;
|
|
425
|
-
commentCount: number;
|
|
426
|
-
viewerHasUpvoted: boolean;
|
|
427
|
-
}[];
|
|
428
|
-
} | undefined;
|
|
228
|
+
useSimilarEntries(args: SimilarEntriesArgs): SimilarEntriesResult | undefined;
|
|
429
229
|
/**
|
|
430
230
|
* Returns one independently paginated level of comments.
|
|
431
231
|
*/
|
|
432
|
-
useComments(args: UseCommentsArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListCommentsArgs, import("convex/server").PaginationResult<
|
|
433
|
-
updatedAt?: number | undefined;
|
|
434
|
-
parentCommentId?: string | undefined;
|
|
435
|
-
deletedAt?: number | undefined;
|
|
436
|
-
id: string;
|
|
437
|
-
creationTime: number;
|
|
438
|
-
actorId: string;
|
|
439
|
-
body: string | null;
|
|
440
|
-
entryId: string;
|
|
441
|
-
depth: number;
|
|
442
|
-
likeCount: number;
|
|
443
|
-
replyCount: number;
|
|
444
|
-
viewerHasLiked: boolean;
|
|
445
|
-
}>, string | undefined>>;
|
|
232
|
+
useComments(args: UseCommentsArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListCommentsArgs, import("convex/server").PaginationResult<import("../component/model.js").FeedbackComment>, string | undefined>>;
|
|
446
233
|
/** Returns the bound create-entry mutation. */
|
|
447
234
|
useCreateEntry(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").CreateEntryArgs, string | RateLimitResult, string | undefined>>;
|
|
448
235
|
/** Returns the bound update-entry mutation. */
|
|
449
236
|
useUpdateEntry(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").UpdateEntryArgs, RateLimitResult | null, string | undefined>>;
|
|
237
|
+
useDeleteEntry(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").DeleteEntryArgs, RateLimitResult | null, string | undefined>>;
|
|
450
238
|
/** Returns the bound status mutation. */
|
|
451
239
|
useSetEntryStatus(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").SetEntryStatusArgs, RateLimitResult | null, string | undefined>>;
|
|
452
240
|
useSetEntryPriority(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").SetEntryPriorityArgs, RateLimitResult | null, string | undefined>>;
|
|
@@ -463,7 +251,7 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
463
251
|
useCreateComment(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").CreateCommentArgs, string | RateLimitResult, string | undefined>>;
|
|
464
252
|
/** Returns the update-comment mutation. */
|
|
465
253
|
useUpdateComment(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").UpdateCommentArgs, RateLimitResult | null, string | undefined>>;
|
|
466
|
-
/** Returns the
|
|
254
|
+
/** Returns the permanent comment-subtree deletion mutation. */
|
|
467
255
|
useDeleteComment(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").DeleteCommentArgs, RateLimitResult | null, string | undefined>>;
|
|
468
256
|
/** Returns the idempotent comment-like state mutation. */
|
|
469
257
|
useSetCommentLike(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").SetCommentLikeArgs, import("../client/api.js").SetCommentLikeResult | RateLimitResult, string | undefined>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.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yCAAyC;;;;;;;;;;IAqCzC,0DAA0D;;IAK1D,iDAAiD;;IAKjD,2CAA2C;;IAK3C,+DAA+D;;IAK/D,0DAA0D;;EAK7D;AAED,KAAK,oBAAoB,CAAC,eAAe,IAAI,UAAU,CACrD,OAAO,iCAAiC,CAAC,eAAe,CAAC,CAC1D,CAAC;AAEF,+EAA+E;AAC/E,wBAAgB,mBAAmB,CACjC,GAAG,CAAC,EAAE,iBAAiB,CAAC,MAAM,GAAG,SAAS,EAAE,KAAK,CAAC,EAClD,OAAO,CAAC,EAAE,oBAAoB,GAC7B,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAE/B,yEAAyE;AACzE,wBAAgB,mBAAmB,CAAC,eAAe,EACjD,GAAG,CAAC,EAAE,iBAAiB,CAAC,MAAM,GAAG,SAAS,EAAE,eAAe,CAAC,EAC5D,OAAO,CAAC,EAAE,oBAAoB,GAC7B,oBAAoB,CAAC,eAAe,CAAC,CAAC;AAezC;;;;;;;;GAQG;AACH,MAAM,MAAM,aAAa,CAAC,eAAe,GAAG,KAAK,IAC/C,oBAAoB,CAAC,eAAe,CAAC,CAAC"}
|
package/dist/react/index.js
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
import { usePaginatedQuery } from "convex-helpers/react";
|
|
3
3
|
import { useMutation, useQuery } from "convex/react";
|
|
4
4
|
import { anyApi } from "convex/server";
|
|
5
|
+
function compareRoadmapItemsByPosition(left, right) {
|
|
6
|
+
if (left.position !== right.position)
|
|
7
|
+
return left.position - right.position;
|
|
8
|
+
if (left.creationTime !== right.creationTime) {
|
|
9
|
+
return left.creationTime - right.creationTime;
|
|
10
|
+
}
|
|
11
|
+
return left.id.localeCompare(right.id);
|
|
12
|
+
}
|
|
5
13
|
const emptySimilarEntriesResult = {
|
|
6
14
|
exact: [],
|
|
7
15
|
similar: [],
|
|
@@ -92,6 +100,9 @@ function createFeedbackHooksImplementation(api, options = {}) {
|
|
|
92
100
|
return usePaginatedQuery(api.adminListEntries, {
|
|
93
101
|
...(args.kinds === undefined ? {} : { kinds: [...args.kinds] }),
|
|
94
102
|
...(args.status === undefined ? {} : { status: args.status }),
|
|
103
|
+
...(args.statusFilter === undefined
|
|
104
|
+
? {}
|
|
105
|
+
: { statusFilter: args.statusFilter }),
|
|
95
106
|
...(args.priority === undefined ? {} : { priority: args.priority }),
|
|
96
107
|
}, { initialNumItems: entryPageSize });
|
|
97
108
|
},
|
|
@@ -108,13 +119,62 @@ function createFeedbackHooksImplementation(api, options = {}) {
|
|
|
108
119
|
searchQuery,
|
|
109
120
|
...(args.kinds === undefined ? {} : { kinds: [...args.kinds] }),
|
|
110
121
|
...(args.status === undefined ? {} : { status: args.status }),
|
|
122
|
+
...(args.statusFilter === undefined
|
|
123
|
+
? {}
|
|
124
|
+
: { statusFilter: args.statusFilter }),
|
|
111
125
|
...(args.priority === undefined
|
|
112
126
|
? {}
|
|
113
127
|
: { priority: args.priority }),
|
|
114
128
|
}, { initialNumItems: entryPageSize });
|
|
115
129
|
},
|
|
130
|
+
/**
|
|
131
|
+
* An unfiltered roadmap is composed from one stream per status so a
|
|
132
|
+
* rebalance cannot mix live and replacement positions in the UI.
|
|
133
|
+
*/
|
|
116
134
|
useRoadmap(status) {
|
|
117
|
-
|
|
135
|
+
const planned = usePaginatedQuery(api.listRoadmap, status === undefined || status === "planned"
|
|
136
|
+
? { status: "planned" }
|
|
137
|
+
: "skip", { initialNumItems: roadmapPageSize });
|
|
138
|
+
const inProgress = usePaginatedQuery(api.listRoadmap, status === undefined || status === "in_progress"
|
|
139
|
+
? { status: "in_progress" }
|
|
140
|
+
: "skip", { initialNumItems: roadmapPageSize });
|
|
141
|
+
const shipped = usePaginatedQuery(api.listRoadmap, status === undefined || status === "shipped"
|
|
142
|
+
? { status: "shipped" }
|
|
143
|
+
: "skip", { initialNumItems: roadmapPageSize });
|
|
144
|
+
if (status === "planned")
|
|
145
|
+
return planned;
|
|
146
|
+
if (status === "in_progress")
|
|
147
|
+
return inProgress;
|
|
148
|
+
if (status === "shipped")
|
|
149
|
+
return shipped;
|
|
150
|
+
const roadmaps = [planned, inProgress, shipped];
|
|
151
|
+
const loadingFirstPage = roadmaps.some((roadmap) => roadmap.status === "LoadingFirstPage");
|
|
152
|
+
const loadingMore = roadmaps.some((roadmap) => roadmap.status === "LoadingMore");
|
|
153
|
+
const canLoadMore = roadmaps.some((roadmap) => roadmap.status === "CanLoadMore");
|
|
154
|
+
return {
|
|
155
|
+
results: roadmaps
|
|
156
|
+
.flatMap((roadmap) => roadmap.results)
|
|
157
|
+
.sort(compareRoadmapItemsByPosition),
|
|
158
|
+
status: loadingFirstPage
|
|
159
|
+
? "LoadingFirstPage"
|
|
160
|
+
: loadingMore
|
|
161
|
+
? "LoadingMore"
|
|
162
|
+
: canLoadMore
|
|
163
|
+
? "CanLoadMore"
|
|
164
|
+
: "Exhausted",
|
|
165
|
+
isLoading: loadingFirstPage || loadingMore,
|
|
166
|
+
loadMore: (numItems) => {
|
|
167
|
+
for (const roadmap of roadmaps) {
|
|
168
|
+
if (roadmap.status === "CanLoadMore") {
|
|
169
|
+
roadmap.loadMore(numItems);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
/** Reactively retrieves one roadmap item independently of the list page. */
|
|
176
|
+
useRoadmapItem(roadmapId) {
|
|
177
|
+
return useQuery(api.getRoadmapItem, roadmapId === null || roadmapId === undefined ? "skip" : { roadmapId });
|
|
118
178
|
},
|
|
119
179
|
useSearchRoadmap(searchQuery, limit = 10) {
|
|
120
180
|
const normalized = searchQuery.trim();
|
|
@@ -158,6 +218,9 @@ function createFeedbackHooksImplementation(api, options = {}) {
|
|
|
158
218
|
useUpdateEntry() {
|
|
159
219
|
return useMutation(api.updateEntry);
|
|
160
220
|
},
|
|
221
|
+
useDeleteEntry() {
|
|
222
|
+
return useMutation(api.deleteEntry);
|
|
223
|
+
},
|
|
161
224
|
/** Returns the bound status mutation. */
|
|
162
225
|
useSetEntryStatus() {
|
|
163
226
|
return useMutation(api.setEntryStatus);
|
|
@@ -198,7 +261,7 @@ function createFeedbackHooksImplementation(api, options = {}) {
|
|
|
198
261
|
useUpdateComment() {
|
|
199
262
|
return useMutation(api.updateComment);
|
|
200
263
|
},
|
|
201
|
-
/** Returns the
|
|
264
|
+
/** Returns the permanent comment-subtree deletion mutation. */
|
|
202
265
|
useDeleteComment() {
|
|
203
266
|
return useMutation(api.deleteComment);
|
|
204
267
|
},
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAevC,SAAS,6BAA6B,CACpC,IAAiB,EACjB,KAAkB;IAElB,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAC5E,IAAI,IAAI,CAAC,YAAY,KAAK,KAAK,CAAC,YAAY,EAAE,CAAC;QAC7C,OAAO,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IAChD,CAAC;IACD,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,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;QAED,2CAA2C;QAC3C,gBAAgB;YACd,OAAO,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxC,CAAC;QAED,+DAA+D;QAC/D,gBAAgB;YACd,OAAO,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxC,CAAC;QAED,0DAA0D;QAC1D,iBAAiB;YACf,OAAO,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACzC,CAAC;KACF,CAAC;AACJ,CAAC;AAkBD,MAAM,UAAU,mBAAmB,CACjC,MAGI,MAAM,CAAC,QAGV,EACD,UAAgC,EAAE;IAElC,OAAO,iCAAiC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC"}
|
package/dist/test.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare const _default: {
|
|
|
16
16
|
priority?: "low" | "medium" | "high" | undefined;
|
|
17
17
|
statusFilter?: "open" | "closed" | undefined;
|
|
18
18
|
roadmapId?: import("convex/values").GenericId<"roadmap"> | undefined;
|
|
19
|
+
deletingAt?: number | undefined;
|
|
19
20
|
title: string;
|
|
20
21
|
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
21
22
|
actorId: string;
|
|
@@ -46,7 +47,9 @@ declare const _default: {
|
|
|
46
47
|
}, "optional", "standard" | "additional" | `standard.${string}` | `additional.${string}`>;
|
|
47
48
|
priority: import("convex/values").VUnion<"low" | "medium" | "high" | undefined, [import("convex/values").VLiteral<"low", "required">, import("convex/values").VLiteral<"medium", "required">, import("convex/values").VLiteral<"high", "required">], "optional", never>;
|
|
48
49
|
roadmapId: import("convex/values").VId<import("convex/values").GenericId<"roadmap"> | undefined, "optional">;
|
|
49
|
-
|
|
50
|
+
deletingAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
51
|
+
}, "required", "title" | "status" | "updatedAt" | "actorId" | "kind" | "body" | "upvoteCount" | "commentCount" | "metadata" | "metadata.standard" | "metadata.additional" | `metadata.standard.${string}` | `metadata.additional.${string}` | "priority" | "statusFilter" | "normalizedTitle" | "searchText" | "roadmapId" | "deletingAt">, {
|
|
52
|
+
by_actor: ["actorId", "_creationTime"];
|
|
50
53
|
by_kind: ["kind", "_creationTime"];
|
|
51
54
|
by_status: ["status", "_creationTime"];
|
|
52
55
|
by_kind_status: ["kind", "status", "_creationTime"];
|
|
@@ -65,7 +68,7 @@ declare const _default: {
|
|
|
65
68
|
}, {
|
|
66
69
|
search: {
|
|
67
70
|
searchField: "searchText";
|
|
68
|
-
filterFields: "status" | "kind" | "priority" | "statusFilter";
|
|
71
|
+
filterFields: "status" | "kind" | "priority" | "statusFilter" | "deletingAt";
|
|
69
72
|
};
|
|
70
73
|
}, {}>;
|
|
71
74
|
roadmap: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
@@ -121,7 +124,10 @@ declare const _default: {
|
|
|
121
124
|
comments: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
122
125
|
updatedAt?: number | undefined;
|
|
123
126
|
parentCommentId?: import("convex/values").GenericId<"comments"> | undefined;
|
|
127
|
+
deletingAt?: number | undefined;
|
|
124
128
|
deletedAt?: number | undefined;
|
|
129
|
+
legacyCleanupAt?: number | undefined;
|
|
130
|
+
deletionRootId?: import("convex/values").GenericId<"comments"> | undefined;
|
|
125
131
|
actorId: string;
|
|
126
132
|
body: string;
|
|
127
133
|
entryId: import("convex/values").GenericId<"entries">;
|
|
@@ -138,21 +144,33 @@ declare const _default: {
|
|
|
138
144
|
replyCount: import("convex/values").VFloat64<number, "required">;
|
|
139
145
|
updatedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
140
146
|
deletedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
141
|
-
|
|
147
|
+
legacyCleanupAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
148
|
+
deletingAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
149
|
+
deletionRootId: import("convex/values").VId<import("convex/values").GenericId<"comments"> | undefined, "optional">;
|
|
150
|
+
}, "required", "updatedAt" | "actorId" | "body" | "entryId" | "parentCommentId" | "depth" | "likeCount" | "replyCount" | "deletingAt" | "deletedAt" | "legacyCleanupAt" | "deletionRootId">, {
|
|
151
|
+
by_actor: ["actorId", "_creationTime"];
|
|
142
152
|
by_entry_parent: ["entryId", "parentCommentId", "_creationTime"];
|
|
143
|
-
|
|
153
|
+
by_entry_parent_deleting: ["entryId", "parentCommentId", "deletingAt", "deletedAt", "_creationTime"];
|
|
154
|
+
by_entry_parent_deleting_likes: ["entryId", "parentCommentId", "deletingAt", "deletedAt", "likeCount", "_creationTime"];
|
|
155
|
+
by_deleted_at: ["deletedAt", "_creationTime"];
|
|
156
|
+
by_legacy_cleanup: ["legacyCleanupAt", "_creationTime"];
|
|
157
|
+
by_entry_deletion_root: ["entryId", "deletionRootId", "_creationTime"];
|
|
144
158
|
}, {}, {}>;
|
|
145
159
|
reactions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
146
160
|
entryId?: import("convex/values").GenericId<"entries"> | undefined;
|
|
161
|
+
legacyCleanupAt?: number | undefined;
|
|
147
162
|
commentId?: import("convex/values").GenericId<"comments"> | undefined;
|
|
148
163
|
actorId: string;
|
|
149
164
|
}, {
|
|
150
165
|
actorId: import("convex/values").VString<string, "required">;
|
|
151
166
|
entryId: import("convex/values").VId<import("convex/values").GenericId<"entries"> | undefined, "optional">;
|
|
152
167
|
commentId: import("convex/values").VId<import("convex/values").GenericId<"comments"> | undefined, "optional">;
|
|
153
|
-
|
|
168
|
+
legacyCleanupAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
169
|
+
}, "required", "actorId" | "entryId" | "legacyCleanupAt" | "commentId">, {
|
|
170
|
+
by_actor: ["actorId", "_creationTime"];
|
|
154
171
|
by_entry_actor: ["entryId", "actorId", "_creationTime"];
|
|
155
172
|
by_comment_actor: ["commentId", "actorId", "_creationTime"];
|
|
173
|
+
by_legacy_cleanup: ["legacyCleanupAt", "_creationTime"];
|
|
156
174
|
}, {}, {}>;
|
|
157
175
|
}, true>;
|
|
158
176
|
modules: Record<string, () => Promise<unknown>>;
|
package/dist/test.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAErE,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C,QAAA,MAAM,OAAO,wCAA0C,CAAC;AAExD,wBAAgB,QAAQ,CACtB,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,EAC1D,IAAI,SAAa,GAChB,IAAI,CAEN;AAED,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAErE,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C,QAAA,MAAM,OAAO,wCAA0C,CAAC;AAExD,wBAAgB,QAAQ,CACtB,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,EAC1D,IAAI,SAAa,GAChB,IAAI,CAEN;AAED,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAC3B,wBAA6C"}
|
package/package.json
CHANGED
package/src/client/README.md
CHANGED
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
This layer is the supported server-side integration boundary between a host Convex app and the component.
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Expose the host API with `exposeFeedbackApi(...)` and the generated component reference.
|
|
6
6
|
- Resolve authentication and admin authorization in the host app. Components do not own host authentication.
|
|
7
7
|
- Keep `actor.id` stable. It is the identity used for authorship, entry upvotes, and comment likes.
|
|
8
8
|
- Configuration is static code configuration; there is no configuration table.
|
|
9
9
|
- Call the returned methods from host queries/mutations instead of exposing component internals directly.
|
|
10
|
+
- Use `listUserEntries`, `listUserComments`, and `listUserReactions` for authenticated actor activity. Their public arguments contain only pagination options; the actor is always resolved by the configured host callback.
|
|
10
11
|
|
|
11
12
|
Do not add user/profile persistence here. Display profiles belong to the host application.
|
|
13
|
+
|
|
14
|
+
Lifecycle callbacks are configured on `exposeFeedbackApi` in the host app, not
|
|
15
|
+
on the component client. See the canonical [lifecycle callback reference](../../README.md#lifecycle-callbacks)
|
|
16
|
+
for ordering, rejection behavior, transaction semantics, and reaction events.
|