Commit 2fe689f
feat: user feedback reports (#74)
* Add postFeedback API for user feedback submission
Adds postFeedback method using the 3-step presigned URL upload flow
(getCrashUploadUrl -> PUT to S3 -> commitS3CrashUpload) with crashTypeId=36.
Creates feedback.json with title and description, zips it using a minimal
inline ZIP implementation with CRC-32, and uploads via the presigned URL flow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Replace inline ZIP implementation with jszip library
Use jszip instead of hand-rolled ZIP/CRC-32 code for creating the
feedback.json zip archive in postFeedback.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Replace jszip with fflate for lighter zip creation
fflate is tree-shakeable (~3KB gzipped) vs jszip (~45KB).
Only zipSync and strToU8 are imported.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add attachments support to postFeedback (e.g. screenshots)
Adds BugSplatAttachment type and attachments option to
BugSplatFeedbackOptions. Attachments are included in the zip
alongside feedback.json. Named BugSplatAttachment (not
BugSplatFeedbackAttachment) so it can be reused for other
report types in the future.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add postFeedback and attachments documentation to README
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix no-explicit-any lint error in postFeedback by using validateResponseBody type guard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* BREAKING: Unify crash and feedback uploads via presigned URL flow
Migrate post() from direct /post/js/ to the presigned URL upload flow,
add attributes and attachments as first-class options, remove
additionalFormDataParams and FormDataParam, and unify response types
to match the commitS3CrashUpload endpoint shape.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix no-explicit-any lint error in test file
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Scope type suppression to private field mock only
Use @ts-expect-error on the single _formData assignment instead of
typing the whole bugsplat variable as any.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update validateResponseBody tests for new response shape
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Use javascriptCallStack.txt instead of crash.json in zip
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Make infoUrl optional in response validation
The server doesn't always return infoUrl in the commit response,
causing validateResponseBody to incorrectly reject valid responses.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix unused variable lint error in post method
The description variable was already resolved inside _upload, making the
one in post redundant.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent bbaabc9 commit 2fe689f
11 files changed
Lines changed: 501 additions & 413 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
109 | 134 | | |
110 | 135 | | |
111 | 136 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
| |||
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
70 | | - | |
71 | | - | |
72 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 42 | | |
48 | 43 | | |
49 | 44 | | |
50 | 45 | | |
51 | 46 | | |
52 | 47 | | |
53 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
59 | 98 | | |
60 | 99 | | |
61 | 100 | | |
| |||
76 | 115 | | |
77 | 116 | | |
78 | 117 | | |
79 | | - | |
| 118 | + | |
80 | 119 | | |
81 | 120 | | |
82 | 121 | | |
| |||
0 commit comments