convex-feedback 0.1.5 → 0.2.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/README.md +70 -27
- package/dist/.tsbuildinfo +1 -1
- package/dist/client/api.d.ts +76 -1
- package/dist/client/api.d.ts.map +1 -1
- package/dist/client/config.d.ts +1 -1
- package/dist/client/index.d.ts +9 -5
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +253 -8
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +4 -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 +293 -5
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/admin.d.ts +130 -0
- package/dist/component/admin.d.ts.map +1 -0
- package/dist/component/admin.js +125 -0
- package/dist/component/admin.js.map +1 -0
- package/dist/component/comments.d.ts +7 -5
- package/dist/component/comments.d.ts.map +1 -1
- package/dist/component/comments.js +3 -3
- package/dist/component/comments.js.map +1 -1
- package/dist/component/entries.d.ts +29 -18
- package/dist/component/entries.d.ts.map +1 -1
- package/dist/component/entries.js +27 -6
- package/dist/component/entries.js.map +1 -1
- package/dist/component/helpers.d.ts +3 -1
- package/dist/component/helpers.d.ts.map +1 -1
- package/dist/component/helpers.js +28 -0
- package/dist/component/helpers.js.map +1 -1
- package/dist/component/model.d.ts +140 -24
- package/dist/component/model.d.ts.map +1 -1
- package/dist/component/model.js +30 -1
- package/dist/component/model.js.map +1 -1
- package/dist/component/roadmap.d.ts +166 -0
- package/dist/component/roadmap.d.ts.map +1 -0
- package/dist/component/roadmap.js +534 -0
- package/dist/component/roadmap.js.map +1 -0
- package/dist/component/schema.d.ts +61 -5
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +48 -2
- package/dist/component/schema.js.map +1 -1
- package/dist/component/tags.d.ts +58 -0
- package/dist/component/tags.d.ts.map +1 -0
- package/dist/component/tags.js +216 -0
- package/dist/component/tags.js.map +1 -0
- package/dist/react/index.d.ts +169 -12
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +72 -1
- package/dist/react/index.js.map +1 -1
- package/dist/test.d.ts +61 -5
- package/dist/test.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/README.md +1 -1
- package/src/client/api.ts +176 -0
- package/src/client/config.ts +1 -1
- package/src/client/index.ts +330 -13
- package/src/component/README.md +1 -1
- package/src/component/_generated/api.ts +4 -0
- package/src/component/_generated/component.ts +371 -9
- package/src/component/admin.ts +180 -0
- package/src/component/comments.ts +3 -2
- package/src/component/entries.ts +29 -5
- package/src/component/helpers.ts +44 -1
- package/src/component/model.ts +65 -4
- package/src/component/roadmap.ts +627 -0
- package/src/component/schema.ts +51 -1
- package/src/react/README.md +2 -2
- package/src/react/index.ts +139 -4
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, EntrySort, EntryStatus, EntryStatusFilter } from "../component/model.js";
|
|
2
|
+
import type { CommentSort, EntryKind, EntryPriority, EntrySort, EntryStatus, EntryStatusFilter, RoadmapStatus } from "../component/model.js";
|
|
3
3
|
/**
|
|
4
4
|
* Client-side pagination defaults used by hooks created with
|
|
5
5
|
* `createFeedbackHooks`.
|
|
@@ -10,7 +10,8 @@ import type { CommentSort, EntryKind, EntrySort, EntryStatus, EntryStatusFilter
|
|
|
10
10
|
*/
|
|
11
11
|
export interface FeedbackHooksOptions {
|
|
12
12
|
/**
|
|
13
|
-
* Number of entries initially requested by
|
|
13
|
+
* Number of entries initially requested by entry-list hooks, including the
|
|
14
|
+
* public board, admin inbox, admin search, and roadmap attachments.
|
|
14
15
|
*
|
|
15
16
|
* @default 20
|
|
16
17
|
*/
|
|
@@ -28,6 +29,12 @@ export interface FeedbackHooksOptions {
|
|
|
28
29
|
* @default 10
|
|
29
30
|
*/
|
|
30
31
|
replyPageSize?: number;
|
|
32
|
+
/**
|
|
33
|
+
* Number of roadmap items initially requested by `useRoadmap`.
|
|
34
|
+
*
|
|
35
|
+
* @default 30
|
|
36
|
+
*/
|
|
37
|
+
roadmapPageSize?: number;
|
|
31
38
|
}
|
|
32
39
|
/**
|
|
33
40
|
* Arguments accepted by `useEntries`.
|
|
@@ -108,6 +115,14 @@ export interface SearchEntriesArgs {
|
|
|
108
115
|
*/
|
|
109
116
|
limit?: number;
|
|
110
117
|
}
|
|
118
|
+
export interface UseAdminEntriesArgs {
|
|
119
|
+
kinds?: readonly EntryKind[];
|
|
120
|
+
status?: EntryStatus;
|
|
121
|
+
priority?: EntryPriority;
|
|
122
|
+
}
|
|
123
|
+
export interface UseAdminSearchEntriesArgs extends UseAdminEntriesArgs {
|
|
124
|
+
searchQuery: string;
|
|
125
|
+
}
|
|
111
126
|
/**
|
|
112
127
|
* Arguments accepted by `useSimilarEntries`.
|
|
113
128
|
*/
|
|
@@ -159,6 +174,7 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
159
174
|
readonly entries: number;
|
|
160
175
|
readonly comments: number;
|
|
161
176
|
readonly replies: number;
|
|
177
|
+
readonly roadmap: number;
|
|
162
178
|
};
|
|
163
179
|
/**
|
|
164
180
|
* Returns a cursor-paginated, server-filtered entry list.
|
|
@@ -171,10 +187,10 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
171
187
|
} | undefined;
|
|
172
188
|
id: string;
|
|
173
189
|
creationTime: number;
|
|
190
|
+
title: string;
|
|
191
|
+
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
174
192
|
actorId: string;
|
|
175
193
|
kind: "feedback" | "feature_request" | "bug_report";
|
|
176
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
177
|
-
title: string;
|
|
178
194
|
body: string;
|
|
179
195
|
upvoteCount: number;
|
|
180
196
|
commentCount: number;
|
|
@@ -193,10 +209,10 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
193
209
|
} | undefined;
|
|
194
210
|
id: string;
|
|
195
211
|
creationTime: number;
|
|
212
|
+
title: string;
|
|
213
|
+
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
196
214
|
actorId: string;
|
|
197
215
|
kind: "feedback" | "feature_request" | "bug_report";
|
|
198
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
199
|
-
title: string;
|
|
200
216
|
body: string;
|
|
201
217
|
upvoteCount: number;
|
|
202
218
|
commentCount: number;
|
|
@@ -215,15 +231,148 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
215
231
|
} | undefined;
|
|
216
232
|
id: string;
|
|
217
233
|
creationTime: number;
|
|
234
|
+
title: string;
|
|
235
|
+
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
236
|
+
actorId: string;
|
|
237
|
+
kind: "feedback" | "feature_request" | "bug_report";
|
|
238
|
+
body: string;
|
|
239
|
+
upvoteCount: number;
|
|
240
|
+
commentCount: number;
|
|
241
|
+
viewerHasUpvoted: boolean;
|
|
242
|
+
}[] | undefined;
|
|
243
|
+
/** Returns whether the authenticated host actor is an admin. */
|
|
244
|
+
useIsAdmin(): boolean | undefined;
|
|
245
|
+
/** Returns whether the current request has an authenticated actor. */
|
|
246
|
+
useIsAuthenticated(): boolean | undefined;
|
|
247
|
+
/** Returns a cursor-paginated admin inbox with private triage relationships. */
|
|
248
|
+
useAdminEntries(args?: UseAdminEntriesArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").AdminListEntriesArgs, import("convex/server").PaginationResult<{
|
|
249
|
+
updatedAt?: number | undefined;
|
|
250
|
+
metadata?: {
|
|
251
|
+
standard?: Record<string, string | number | boolean> | undefined;
|
|
252
|
+
additional?: Record<string, string | number | boolean> | undefined;
|
|
253
|
+
} | undefined;
|
|
254
|
+
id: string;
|
|
255
|
+
creationTime: number;
|
|
256
|
+
title: string;
|
|
257
|
+
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
218
258
|
actorId: string;
|
|
219
259
|
kind: "feedback" | "feature_request" | "bug_report";
|
|
260
|
+
body: string;
|
|
261
|
+
upvoteCount: number;
|
|
262
|
+
commentCount: number;
|
|
263
|
+
viewerHasUpvoted: boolean;
|
|
264
|
+
priority?: "low" | "medium" | "high" | undefined;
|
|
265
|
+
roadmap?: {
|
|
266
|
+
description?: string | undefined;
|
|
267
|
+
id: string;
|
|
268
|
+
creationTime: number;
|
|
269
|
+
title: string;
|
|
270
|
+
status: "planned" | "in_progress" | "shipped";
|
|
271
|
+
position: number;
|
|
272
|
+
createdAt: number;
|
|
273
|
+
updatedAt: number;
|
|
274
|
+
feedbackCount: number;
|
|
275
|
+
} | undefined;
|
|
276
|
+
}>, string | undefined>>;
|
|
277
|
+
/** Returns one admin-enriched feedback entry. */
|
|
278
|
+
useAdminEntry(entryId: string | null | undefined): {
|
|
279
|
+
updatedAt?: number | undefined;
|
|
280
|
+
metadata?: {
|
|
281
|
+
standard?: Record<string, string | number | boolean> | undefined;
|
|
282
|
+
additional?: Record<string, string | number | boolean> | undefined;
|
|
283
|
+
} | undefined;
|
|
284
|
+
id: string;
|
|
285
|
+
creationTime: number;
|
|
286
|
+
title: string;
|
|
220
287
|
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
288
|
+
actorId: string;
|
|
289
|
+
kind: "feedback" | "feature_request" | "bug_report";
|
|
290
|
+
body: string;
|
|
291
|
+
upvoteCount: number;
|
|
292
|
+
commentCount: number;
|
|
293
|
+
viewerHasUpvoted: boolean;
|
|
294
|
+
priority?: "low" | "medium" | "high" | undefined;
|
|
295
|
+
roadmap?: {
|
|
296
|
+
description?: string | undefined;
|
|
297
|
+
id: string;
|
|
298
|
+
creationTime: number;
|
|
299
|
+
title: string;
|
|
300
|
+
status: "planned" | "in_progress" | "shipped";
|
|
301
|
+
position: number;
|
|
302
|
+
createdAt: number;
|
|
303
|
+
updatedAt: number;
|
|
304
|
+
feedbackCount: number;
|
|
305
|
+
} | undefined;
|
|
306
|
+
} | null | undefined;
|
|
307
|
+
/** Searches the admin inbox with triage filters. */
|
|
308
|
+
useAdminSearchEntries(args: UseAdminSearchEntriesArgs): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").AdminSearchEntriesArgs, import("convex/server").PaginationResult<{
|
|
309
|
+
updatedAt?: number | undefined;
|
|
310
|
+
metadata?: {
|
|
311
|
+
standard?: Record<string, string | number | boolean> | undefined;
|
|
312
|
+
additional?: Record<string, string | number | boolean> | undefined;
|
|
313
|
+
} | undefined;
|
|
314
|
+
id: string;
|
|
315
|
+
creationTime: number;
|
|
221
316
|
title: string;
|
|
317
|
+
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
318
|
+
actorId: string;
|
|
319
|
+
kind: "feedback" | "feature_request" | "bug_report";
|
|
222
320
|
body: string;
|
|
223
321
|
upvoteCount: number;
|
|
224
322
|
commentCount: number;
|
|
225
323
|
viewerHasUpvoted: boolean;
|
|
324
|
+
priority?: "low" | "medium" | "high" | undefined;
|
|
325
|
+
roadmap?: {
|
|
326
|
+
description?: string | undefined;
|
|
327
|
+
id: string;
|
|
328
|
+
creationTime: number;
|
|
329
|
+
title: string;
|
|
330
|
+
status: "planned" | "in_progress" | "shipped";
|
|
331
|
+
position: number;
|
|
332
|
+
createdAt: number;
|
|
333
|
+
updatedAt: number;
|
|
334
|
+
feedbackCount: number;
|
|
335
|
+
} | undefined;
|
|
336
|
+
}>, string | undefined>>;
|
|
337
|
+
useRoadmap(status?: RoadmapStatus): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListRoadmapArgs, import("convex/server").PaginationResult<{
|
|
338
|
+
description?: string | undefined;
|
|
339
|
+
id: string;
|
|
340
|
+
creationTime: number;
|
|
341
|
+
title: string;
|
|
342
|
+
status: "planned" | "in_progress" | "shipped";
|
|
343
|
+
position: number;
|
|
344
|
+
createdAt: number;
|
|
345
|
+
updatedAt: number;
|
|
346
|
+
feedbackCount: number;
|
|
347
|
+
}>, string | undefined>>;
|
|
348
|
+
useSearchRoadmap(searchQuery: string, limit?: number): {
|
|
349
|
+
description?: string | undefined;
|
|
350
|
+
id: string;
|
|
351
|
+
creationTime: number;
|
|
352
|
+
title: string;
|
|
353
|
+
status: "planned" | "in_progress" | "shipped";
|
|
354
|
+
position: number;
|
|
355
|
+
createdAt: number;
|
|
356
|
+
updatedAt: number;
|
|
357
|
+
feedbackCount: number;
|
|
226
358
|
}[] | undefined;
|
|
359
|
+
useRoadmapFeedback(roadmapId: string | null | undefined): import("convex/react").UsePaginatedQueryReturnType<import("convex/server").FunctionReference<"query", "public", import("../client/api.js").ListRoadmapFeedbackArgs, import("convex/server").PaginationResult<{
|
|
360
|
+
updatedAt?: number | undefined;
|
|
361
|
+
metadata?: {
|
|
362
|
+
standard?: Record<string, string | number | boolean> | undefined;
|
|
363
|
+
additional?: Record<string, string | number | boolean> | undefined;
|
|
364
|
+
} | undefined;
|
|
365
|
+
id: string;
|
|
366
|
+
creationTime: number;
|
|
367
|
+
title: string;
|
|
368
|
+
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
369
|
+
actorId: string;
|
|
370
|
+
kind: "feedback" | "feature_request" | "bug_report";
|
|
371
|
+
body: string;
|
|
372
|
+
upvoteCount: number;
|
|
373
|
+
commentCount: number;
|
|
374
|
+
viewerHasUpvoted: boolean;
|
|
375
|
+
}>, string | undefined>>;
|
|
227
376
|
/**
|
|
228
377
|
* Reactively finds exact and similar entries for a proposed draft.
|
|
229
378
|
*
|
|
@@ -241,10 +390,10 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
241
390
|
} | undefined;
|
|
242
391
|
id: string;
|
|
243
392
|
creationTime: number;
|
|
393
|
+
title: string;
|
|
394
|
+
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
244
395
|
actorId: string;
|
|
245
396
|
kind: "feedback" | "feature_request" | "bug_report";
|
|
246
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
247
|
-
title: string;
|
|
248
397
|
body: string;
|
|
249
398
|
upvoteCount: number;
|
|
250
399
|
commentCount: number;
|
|
@@ -258,10 +407,10 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
258
407
|
} | undefined;
|
|
259
408
|
id: string;
|
|
260
409
|
creationTime: number;
|
|
410
|
+
title: string;
|
|
411
|
+
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
261
412
|
actorId: string;
|
|
262
413
|
kind: "feedback" | "feature_request" | "bug_report";
|
|
263
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
264
|
-
title: string;
|
|
265
414
|
body: string;
|
|
266
415
|
upvoteCount: number;
|
|
267
416
|
commentCount: number;
|
|
@@ -291,6 +440,14 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
291
440
|
useUpdateEntry(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").UpdateEntryArgs, RateLimitResult | null, string | undefined>>;
|
|
292
441
|
/** Returns the bound status mutation. */
|
|
293
442
|
useSetEntryStatus(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").SetEntryStatusArgs, RateLimitResult | null, string | undefined>>;
|
|
443
|
+
useSetEntryPriority(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").SetEntryPriorityArgs, RateLimitResult | null, string | undefined>>;
|
|
444
|
+
useCreateRoadmap(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").CreateRoadmapArgs, string | RateLimitResult, string | undefined>>;
|
|
445
|
+
useCreateRoadmapForEntry(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").CreateRoadmapForEntryArgs, string | RateLimitResult, string | undefined>>;
|
|
446
|
+
useUpdateRoadmap(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").UpdateRoadmapArgs, RateLimitResult | null, string | undefined>>;
|
|
447
|
+
useDeleteRoadmap(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").DeleteRoadmapArgs, RateLimitResult | null, string | undefined>>;
|
|
448
|
+
useMoveRoadmapItem(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").MoveRoadmapArgs, number | RateLimitResult, string | undefined>>;
|
|
449
|
+
useAttachFeedbackToRoadmap(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").AttachFeedbackToRoadmapArgs, RateLimitResult | null, string | undefined>>;
|
|
450
|
+
useDetachFeedbackFromRoadmap(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").DetachFeedbackFromRoadmapArgs, RateLimitResult | null, string | undefined>>;
|
|
294
451
|
/** Returns the idempotent entry-upvote state mutation. */
|
|
295
452
|
useSetEntryUpvote(): import("convex/react").ReactMutation<import("convex/server").FunctionReference<"mutation", "public", import("../client/api.js").SetEntryUpvoteArgs, import("../client/api.js").SetEntryUpvoteResult | RateLimitResult, string | undefined>>;
|
|
296
453
|
/** Returns the create-comment/reply mutation. */
|
|
@@ -304,9 +461,9 @@ declare function createFeedbackHooksImplementation<RateLimitResult>(api: Feedbac
|
|
|
304
461
|
};
|
|
305
462
|
type CreatedFeedbackHooks<RateLimitResult> = ReturnType<typeof createFeedbackHooksImplementation<RateLimitResult>>;
|
|
306
463
|
/** Creates hooks for a feedback API whose rate limiters reject by throwing. */
|
|
307
|
-
export declare function createFeedbackHooks(api
|
|
464
|
+
export declare function createFeedbackHooks(api?: FeedbackPublicApi<string | undefined, never>, options?: FeedbackHooksOptions): CreatedFeedbackHooks<never>;
|
|
308
465
|
/** Creates hooks carrying a validated non-throwing rate-limit result. */
|
|
309
|
-
export declare function createFeedbackHooks<RateLimitResult>(api
|
|
466
|
+
export declare function createFeedbackHooks<RateLimitResult>(api?: FeedbackPublicApi<string | undefined, RateLimitResult>, options?: FeedbackHooksOptions): CreatedFeedbackHooks<RateLimitResult>;
|
|
310
467
|
/**
|
|
311
468
|
* Hook collection returned by `createFeedbackHooks`.
|
|
312
469
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"
|
|
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,EAEd,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,SAAS,SAAS,EAAE,CAAC;IAE7B,uCAAuC;IACvC,MAAM,CAAC,EAAE,WAAW,CAAC;IAErB,oDAAoD;IACpD,YAAY,CAAC,EAAE,iBAAiB,CAAC;IAEjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB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AAM,MAAM,aAAa,CAAC,eAAe,GAAG,KAAK,IAC/C,oBAAoB,CAAC,eAAe,CAAC,CAAC"}
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { usePaginatedQuery } from "convex-helpers/react";
|
|
3
3
|
import { useMutation, useQuery } from "convex/react";
|
|
4
|
+
import { anyApi } from "convex/server";
|
|
4
5
|
const emptySimilarEntriesResult = {
|
|
5
6
|
exact: [],
|
|
6
7
|
similar: [],
|
|
@@ -23,6 +24,7 @@ function createFeedbackHooksImplementation(api, options = {}) {
|
|
|
23
24
|
const entryPageSize = positivePageSize(options.entryPageSize, 20);
|
|
24
25
|
const commentPageSize = positivePageSize(options.commentPageSize, 20);
|
|
25
26
|
const replyPageSize = positivePageSize(options.replyPageSize, 10);
|
|
27
|
+
const roadmapPageSize = positivePageSize(options.roadmapPageSize, 30);
|
|
26
28
|
return {
|
|
27
29
|
/**
|
|
28
30
|
* Resolved client-side page sizes used by the generated hooks and useful
|
|
@@ -32,6 +34,7 @@ function createFeedbackHooksImplementation(api, options = {}) {
|
|
|
32
34
|
entries: entryPageSize,
|
|
33
35
|
comments: commentPageSize,
|
|
34
36
|
replies: replyPageSize,
|
|
37
|
+
roadmap: roadmapPageSize,
|
|
35
38
|
},
|
|
36
39
|
/**
|
|
37
40
|
* Returns a cursor-paginated, server-filtered entry list.
|
|
@@ -76,6 +79,50 @@ function createFeedbackHooksImplementation(api, options = {}) {
|
|
|
76
79
|
const result = useQuery(api.searchEntries, searchQuery.length === 0 ? "skip" : queryArgs);
|
|
77
80
|
return searchQuery.length === 0 ? [] : result;
|
|
78
81
|
},
|
|
82
|
+
/** Returns whether the authenticated host actor is an admin. */
|
|
83
|
+
useIsAdmin() {
|
|
84
|
+
return useQuery(api.isAdmin, {});
|
|
85
|
+
},
|
|
86
|
+
/** Returns whether the current request has an authenticated actor. */
|
|
87
|
+
useIsAuthenticated() {
|
|
88
|
+
return useQuery(api.isAuthenticated, {});
|
|
89
|
+
},
|
|
90
|
+
/** Returns a cursor-paginated admin inbox with private triage relationships. */
|
|
91
|
+
useAdminEntries(args = {}) {
|
|
92
|
+
return usePaginatedQuery(api.adminListEntries, {
|
|
93
|
+
...(args.kinds === undefined ? {} : { kinds: [...args.kinds] }),
|
|
94
|
+
...(args.status === undefined ? {} : { status: args.status }),
|
|
95
|
+
...(args.priority === undefined ? {} : { priority: args.priority }),
|
|
96
|
+
}, { initialNumItems: entryPageSize });
|
|
97
|
+
},
|
|
98
|
+
/** Returns one admin-enriched feedback entry. */
|
|
99
|
+
useAdminEntry(entryId) {
|
|
100
|
+
return useQuery(api.adminGetEntry, entryId === null || entryId === undefined ? "skip" : { entryId });
|
|
101
|
+
},
|
|
102
|
+
/** Searches the admin inbox with triage filters. */
|
|
103
|
+
useAdminSearchEntries(args) {
|
|
104
|
+
const searchQuery = args.searchQuery.trim();
|
|
105
|
+
return usePaginatedQuery(api.adminSearchEntries, searchQuery.length === 0
|
|
106
|
+
? "skip"
|
|
107
|
+
: {
|
|
108
|
+
searchQuery,
|
|
109
|
+
...(args.kinds === undefined ? {} : { kinds: [...args.kinds] }),
|
|
110
|
+
...(args.status === undefined ? {} : { status: args.status }),
|
|
111
|
+
...(args.priority === undefined
|
|
112
|
+
? {}
|
|
113
|
+
: { priority: args.priority }),
|
|
114
|
+
}, { initialNumItems: entryPageSize });
|
|
115
|
+
},
|
|
116
|
+
useRoadmap(status) {
|
|
117
|
+
return usePaginatedQuery(api.listRoadmap, status === undefined ? {} : { status }, { initialNumItems: roadmapPageSize });
|
|
118
|
+
},
|
|
119
|
+
useSearchRoadmap(searchQuery, limit = 10) {
|
|
120
|
+
const normalized = searchQuery.trim();
|
|
121
|
+
return useQuery(api.searchRoadmap, normalized.length === 0 ? "skip" : { searchQuery: normalized, limit });
|
|
122
|
+
},
|
|
123
|
+
useRoadmapFeedback(roadmapId) {
|
|
124
|
+
return usePaginatedQuery(api.listRoadmapFeedback, roadmapId === null || roadmapId === undefined ? "skip" : { roadmapId }, { initialNumItems: entryPageSize });
|
|
125
|
+
},
|
|
79
126
|
/**
|
|
80
127
|
* Reactively finds exact and similar entries for a proposed draft.
|
|
81
128
|
*
|
|
@@ -115,6 +162,30 @@ function createFeedbackHooksImplementation(api, options = {}) {
|
|
|
115
162
|
useSetEntryStatus() {
|
|
116
163
|
return useMutation(api.setEntryStatus);
|
|
117
164
|
},
|
|
165
|
+
useSetEntryPriority() {
|
|
166
|
+
return useMutation(api.setEntryPriority);
|
|
167
|
+
},
|
|
168
|
+
useCreateRoadmap() {
|
|
169
|
+
return useMutation(api.createRoadmap);
|
|
170
|
+
},
|
|
171
|
+
useCreateRoadmapForEntry() {
|
|
172
|
+
return useMutation(api.createRoadmapForEntry);
|
|
173
|
+
},
|
|
174
|
+
useUpdateRoadmap() {
|
|
175
|
+
return useMutation(api.updateRoadmap);
|
|
176
|
+
},
|
|
177
|
+
useDeleteRoadmap() {
|
|
178
|
+
return useMutation(api.deleteRoadmap);
|
|
179
|
+
},
|
|
180
|
+
useMoveRoadmapItem() {
|
|
181
|
+
return useMutation(api.moveRoadmapItem);
|
|
182
|
+
},
|
|
183
|
+
useAttachFeedbackToRoadmap() {
|
|
184
|
+
return useMutation(api.attachFeedbackToRoadmap);
|
|
185
|
+
},
|
|
186
|
+
useDetachFeedbackFromRoadmap() {
|
|
187
|
+
return useMutation(api.detachFeedbackFromRoadmap);
|
|
188
|
+
},
|
|
118
189
|
/** Returns the idempotent entry-upvote state mutation. */
|
|
119
190
|
useSetEntryUpvote() {
|
|
120
191
|
return useMutation(api.setEntryUpvote);
|
|
@@ -137,7 +208,7 @@ function createFeedbackHooksImplementation(api, options = {}) {
|
|
|
137
208
|
},
|
|
138
209
|
};
|
|
139
210
|
}
|
|
140
|
-
export function createFeedbackHooks(api, options = {}) {
|
|
211
|
+
export function createFeedbackHooks(api = anyApi.feedback, options = {}) {
|
|
141
212
|
return createFeedbackHooksImplementation(api, options);
|
|
142
213
|
}
|
|
143
214
|
//# sourceMappingURL=index.js.map
|
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;
|
|
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;AAgMvC,MAAM,yBAAyB,GAAyB;IACtD,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,SAAS,gBAAgB,CAAC,KAAyB,EAAE,QAAgB;IACnE,OAAO,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;QAChE,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,QAAQ,CAAC;AACf,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,iCAAiC,CACxC,GAA2D,EAC3D,UAAgC,EAAE;IAElC,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAClE,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IACtE,MAAM,aAAa,GAAG,gBAAgB,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAClE,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IAE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B,OAAO,WAAW,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QAChD,CAAC;QAED,gBAAgB;YACd,OAAO,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxC,CAAC;QAED,gBAAgB;YACd,OAAO,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxC,CAAC;QAED,kBAAkB;YAChB,OAAO,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAC1C,CAAC;QAED,0BAA0B;YACxB,OAAO,WAAW,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QAClD,CAAC;QAED,4BAA4B;YAC1B,OAAO,WAAW,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;QACpD,CAAC;QAED,0DAA0D;QAC1D,iBAAiB;YACf,OAAO,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QACzC,CAAC;QAED,iDAAiD;QACjD,gBAAgB;YACd,OAAO,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxC,CAAC;QAED,2CAA2C;QAC3C,gBAAgB;YACd,OAAO,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QACxC,CAAC;QAED,gDAAgD;QAChD,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
|
@@ -13,11 +13,13 @@ declare const _default: {
|
|
|
13
13
|
standard?: Record<string, string | number | boolean> | undefined;
|
|
14
14
|
additional?: Record<string, string | number | boolean> | undefined;
|
|
15
15
|
} | undefined;
|
|
16
|
+
priority?: "low" | "medium" | "high" | undefined;
|
|
16
17
|
statusFilter?: "open" | "closed" | undefined;
|
|
18
|
+
roadmapId?: import("convex/values").GenericId<"roadmap"> | undefined;
|
|
19
|
+
title: string;
|
|
20
|
+
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
17
21
|
actorId: string;
|
|
18
22
|
kind: "feedback" | "feature_request" | "bug_report";
|
|
19
|
-
status: "open" | "under_review" | "planned" | "in_progress" | "completed" | "closed";
|
|
20
|
-
title: string;
|
|
21
23
|
body: string;
|
|
22
24
|
upvoteCount: number;
|
|
23
25
|
commentCount: number;
|
|
@@ -42,7 +44,9 @@ declare const _default: {
|
|
|
42
44
|
standard: import("convex/values").VRecord<Record<string, string | number | boolean> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VUnion<string | number | boolean, [import("convex/values").VString<string, "required">, import("convex/values").VFloat64<number, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>, "optional", string>;
|
|
43
45
|
additional: import("convex/values").VRecord<Record<string, string | number | boolean> | undefined, import("convex/values").VString<string, "required">, import("convex/values").VUnion<string | number | boolean, [import("convex/values").VString<string, "required">, import("convex/values").VFloat64<number, "required">, import("convex/values").VBoolean<boolean, "required">], "required", never>, "optional", string>;
|
|
44
46
|
}, "optional", "standard" | "additional" | `standard.${string}` | `additional.${string}`>;
|
|
45
|
-
|
|
47
|
+
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
|
+
roadmapId: import("convex/values").VId<import("convex/values").GenericId<"roadmap"> | undefined, "optional">;
|
|
49
|
+
}, "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">, {
|
|
46
50
|
by_kind: ["kind", "_creationTime"];
|
|
47
51
|
by_status: ["status", "_creationTime"];
|
|
48
52
|
by_kind_status: ["kind", "status", "_creationTime"];
|
|
@@ -56,12 +60,64 @@ declare const _default: {
|
|
|
56
60
|
by_kind_status_filter_upvotes: ["kind", "statusFilter", "upvoteCount", "_creationTime"];
|
|
57
61
|
by_normalized_title: ["normalizedTitle", "_creationTime"];
|
|
58
62
|
by_kind_normalized_title: ["kind", "normalizedTitle", "_creationTime"];
|
|
63
|
+
by_priority: ["priority", "_creationTime"];
|
|
64
|
+
by_roadmap_id: ["roadmapId", "_creationTime"];
|
|
59
65
|
}, {
|
|
60
66
|
search: {
|
|
61
67
|
searchField: "searchText";
|
|
62
|
-
filterFields: "kind" | "
|
|
68
|
+
filterFields: "status" | "kind" | "priority" | "statusFilter";
|
|
63
69
|
};
|
|
64
70
|
}, {}>;
|
|
71
|
+
roadmap: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
72
|
+
description?: string | undefined;
|
|
73
|
+
deletingAt?: number | undefined;
|
|
74
|
+
rebalanceId?: string | undefined;
|
|
75
|
+
rebalanceRank?: number | undefined;
|
|
76
|
+
rebalancePosition?: number | undefined;
|
|
77
|
+
title: string;
|
|
78
|
+
status: "planned" | "in_progress" | "shipped";
|
|
79
|
+
position: number;
|
|
80
|
+
createdAt: number;
|
|
81
|
+
updatedAt: number;
|
|
82
|
+
feedbackCount: number;
|
|
83
|
+
}, {
|
|
84
|
+
title: import("convex/values").VString<string, "required">;
|
|
85
|
+
description: import("convex/values").VString<string | undefined, "optional">;
|
|
86
|
+
status: import("convex/values").VUnion<"planned" | "in_progress" | "shipped", [import("convex/values").VLiteral<"planned", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"shipped", "required">], "required", never>;
|
|
87
|
+
position: import("convex/values").VFloat64<number, "required">;
|
|
88
|
+
feedbackCount: import("convex/values").VFloat64<number, "required">;
|
|
89
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
90
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
91
|
+
deletingAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
92
|
+
rebalanceId: import("convex/values").VString<string | undefined, "optional">;
|
|
93
|
+
rebalanceRank: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
94
|
+
rebalancePosition: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
95
|
+
}, "required", "title" | "description" | "status" | "position" | "createdAt" | "updatedAt" | "feedbackCount" | "deletingAt" | "rebalanceId" | "rebalanceRank" | "rebalancePosition">, {
|
|
96
|
+
by_status_and_position: ["status", "position", "_creationTime"];
|
|
97
|
+
by_status_deleting_at_position: ["status", "deletingAt", "position", "_creationTime"];
|
|
98
|
+
by_deleting_at_and_position: ["deletingAt", "position", "_creationTime"];
|
|
99
|
+
by_status_rebalance_rank: ["status", "rebalanceId", "rebalanceRank", "_creationTime"];
|
|
100
|
+
by_status_deleting_at_rebalance_id_position: ["status", "deletingAt", "rebalanceId", "rebalancePosition", "_creationTime"];
|
|
101
|
+
by_position: ["position", "_creationTime"];
|
|
102
|
+
}, {
|
|
103
|
+
search_title: {
|
|
104
|
+
searchField: "title";
|
|
105
|
+
filterFields: "status" | "deletingAt";
|
|
106
|
+
};
|
|
107
|
+
}, {}>;
|
|
108
|
+
roadmapRebalances: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
109
|
+
visibleGeneration?: string | undefined;
|
|
110
|
+
activeGeneration?: string | undefined;
|
|
111
|
+
status: "planned" | "in_progress" | "shipped";
|
|
112
|
+
nextGeneration: number;
|
|
113
|
+
}, {
|
|
114
|
+
status: import("convex/values").VUnion<"planned" | "in_progress" | "shipped", [import("convex/values").VLiteral<"planned", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"shipped", "required">], "required", never>;
|
|
115
|
+
nextGeneration: import("convex/values").VFloat64<number, "required">;
|
|
116
|
+
visibleGeneration: import("convex/values").VString<string | undefined, "optional">;
|
|
117
|
+
activeGeneration: import("convex/values").VString<string | undefined, "optional">;
|
|
118
|
+
}, "required", "status" | "nextGeneration" | "visibleGeneration" | "activeGeneration">, {
|
|
119
|
+
by_status: ["status", "_creationTime"];
|
|
120
|
+
}, {}, {}>;
|
|
65
121
|
comments: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
66
122
|
updatedAt?: number | undefined;
|
|
67
123
|
parentCommentId?: import("convex/values").GenericId<"comments"> | undefined;
|
|
@@ -82,7 +138,7 @@ declare const _default: {
|
|
|
82
138
|
replyCount: import("convex/values").VFloat64<number, "required">;
|
|
83
139
|
updatedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
84
140
|
deletedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
85
|
-
}, "required", "
|
|
141
|
+
}, "required", "updatedAt" | "actorId" | "body" | "entryId" | "parentCommentId" | "depth" | "likeCount" | "replyCount" | "deletedAt">, {
|
|
86
142
|
by_entry_parent: ["entryId", "parentCommentId", "_creationTime"];
|
|
87
143
|
by_entry_parent_likes: ["entryId", "parentCommentId", "likeCount", "_creationTime"];
|
|
88
144
|
}, {}, {}>;
|
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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This layer is the supported server-side integration boundary between a host Convex app and the component.
|
|
4
4
|
|
|
5
5
|
- Construct the client with `createFeedback(...)` and the generated component reference.
|
|
6
|
-
- Resolve authentication and
|
|
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.
|