@myapihq/sdk 2.13.0 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/feedback.d.ts +63 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/feedback.d.ts
CHANGED
|
@@ -2,6 +2,32 @@ import type { Exposes } from './exposes';
|
|
|
2
2
|
export declare const EXPOSES: Exposes;
|
|
3
3
|
export type FeedbackKind = 'bug' | 'issue' | 'suggestion';
|
|
4
4
|
export type FeedbackStatus = 'open' | 'resolved';
|
|
5
|
+
/** Never carries a field's VALUE. `filled` says an input had one; the widget
|
|
6
|
+
* deliberately does not collect what it was, and neither should any display. */
|
|
7
|
+
export interface FeedbackTargetContext {
|
|
8
|
+
tag?: string;
|
|
9
|
+
text?: string;
|
|
10
|
+
role?: string;
|
|
11
|
+
aria_label?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
href?: string;
|
|
16
|
+
section?: string;
|
|
17
|
+
landmark?: string;
|
|
18
|
+
feedback_id?: string;
|
|
19
|
+
filled?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
ignored?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface FeedbackTraceEvent {
|
|
24
|
+
/** Milliseconds since that page loaded (performance.now), NOT a timestamp.
|
|
25
|
+
* Only meaningful as a delta between events in the same trace — rendering
|
|
26
|
+
* it as a time of day would be wrong. */
|
|
27
|
+
t: number;
|
|
28
|
+
kind: 'click' | 'route' | 'error' | 'console' | 'request';
|
|
29
|
+
detail: string;
|
|
30
|
+
}
|
|
5
31
|
export interface FeedbackItem {
|
|
6
32
|
id: string;
|
|
7
33
|
org_id: string;
|
|
@@ -11,8 +37,33 @@ export interface FeedbackItem {
|
|
|
11
37
|
page_url?: string;
|
|
12
38
|
route?: string;
|
|
13
39
|
target_selector?: string;
|
|
14
|
-
target_region?:
|
|
15
|
-
|
|
40
|
+
target_region?: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
w: number;
|
|
44
|
+
h: number;
|
|
45
|
+
};
|
|
46
|
+
viewport?: {
|
|
47
|
+
w: number;
|
|
48
|
+
h: number;
|
|
49
|
+
};
|
|
50
|
+
/** What the person was pointing AT, as opposed to where it sits in the DOM.
|
|
51
|
+
* A selector says `div#install > button.save`; this says the button read
|
|
52
|
+
* "Save settings" and sat under the heading "Install". The union form
|
|
53
|
+
* carries one entry per element when a dragged region covered several. */
|
|
54
|
+
target_context?: FeedbackTargetContext | {
|
|
55
|
+
region: FeedbackTargetContext[];
|
|
56
|
+
};
|
|
57
|
+
/** The last events before the report — oldest first, up to 40. */
|
|
58
|
+
trace?: FeedbackTraceEvent[];
|
|
59
|
+
/** Caller's own id for the person, if the widget was told one. */
|
|
60
|
+
end_user_ref?: string;
|
|
61
|
+
/** Signed link to the screenshot, good for about an hour from the response.
|
|
62
|
+
* Sign-on-read, so it is not stable — do not persist it, re-list instead. */
|
|
63
|
+
screenshot_url?: string;
|
|
64
|
+
/** Present INSTEAD of screenshot_url when signing failed. A picture exists;
|
|
65
|
+
* the link could not be made. Distinct from having no screenshot at all. */
|
|
66
|
+
screenshot_asset_id?: string;
|
|
16
67
|
created_at: string;
|
|
17
68
|
resolved_at?: string;
|
|
18
69
|
}
|
|
@@ -49,8 +100,16 @@ export interface CreateFeedbackInput {
|
|
|
49
100
|
page_url?: string;
|
|
50
101
|
route?: string;
|
|
51
102
|
target_selector?: string;
|
|
52
|
-
target_region?:
|
|
53
|
-
|
|
103
|
+
target_region?: {
|
|
104
|
+
x: number;
|
|
105
|
+
y: number;
|
|
106
|
+
w: number;
|
|
107
|
+
h: number;
|
|
108
|
+
};
|
|
109
|
+
viewport?: {
|
|
110
|
+
w: number;
|
|
111
|
+
h: number;
|
|
112
|
+
};
|
|
54
113
|
}
|
|
55
114
|
export declare function createFeedback(apiKey: string, orgId: string, input: CreateFeedbackInput): Promise<FeedbackItem>;
|
|
56
115
|
export declare function resolveFeedback(apiKey: string, orgId: string, id: string): Promise<void>;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "2.
|
|
1
|
+
export declare const SDK_VERSION = "2.15.0";
|
package/dist/version.js
CHANGED
|
@@ -8,4 +8,4 @@ exports.SDK_VERSION = void 0;
|
|
|
8
8
|
// Why a constant and not a package.json read: the SDK runs inside edge
|
|
9
9
|
// functions (Cloudflare Workers), so it must not import node:fs. A literal
|
|
10
10
|
// is the only version source that works in every runtime we ship to.
|
|
11
|
-
exports.SDK_VERSION = '2.
|
|
11
|
+
exports.SDK_VERSION = '2.15.0';
|