spaps-issue-reporting-react 0.5.0 → 0.6.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/CHANGELOG.md +10 -0
- package/README.md +90 -3
- package/dist/VoiceCapture-WX7J6BWQ.mjs +255 -0
- package/dist/index.d.mts +9 -138
- package/dist/index.d.ts +9 -138
- package/dist/index.js +970 -424
- package/dist/index.mjs +220 -224
- package/dist/screenshot-capture.d.mts +19 -0
- package/dist/screenshot-capture.d.ts +19 -0
- package/dist/screenshot-capture.js +315 -0
- package/dist/screenshot-capture.mjs +276 -0
- package/dist/types-D9U13O2X.d.mts +174 -0
- package/dist/types-D9U13O2X.d.ts +174 -0
- package/package.json +24 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,143 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
export { CreateIssueReportRequest, CreateReporterMessageRequest, IssueReport, IssueReportAttachmentOut, IssueReportListResult, IssueReportMessage, IssueReportScope, IssueReportStatus, IssueReportStatusResult, ListIssueReportMessagesResponse, ReplyIssueReportRequest, UpdateIssueReportRequest } from 'spaps-types';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { F as FloatingIssueReportButtonProps, R as ReportableInput, I as IssueReportingPageConfigProps, a as IssueReportingProviderProps, b as IssueReportingCopy, c as IssueHistoryFilter, d as IssueReportingCreateMode, e as IssueReportingVoiceConfig, f as IssueReportingScreenshotCaptureConfig } from './types-D9U13O2X.js';
|
|
5
|
+
export { g as IssueReportingClient, h as IssueReportingScreenshotCaptureContext, i as IssueReportingScreenshotCaptureFailureBehavior, j as IssueReportingScreenshotCaptureRect, k as IssueReportingScreenshotCaptureScope, l as IssueReportingScreenshotCaptureTiming, m as IssueReportingScreenshotImageType, n as ReportableTargetDescriptor } from './types-D9U13O2X.js';
|
|
7
6
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
8
7
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
echoCancellation?: boolean;
|
|
13
|
-
noiseSuppression?: boolean;
|
|
14
|
-
autoGainControl?: boolean;
|
|
15
|
-
channelCount?: number;
|
|
16
|
-
}
|
|
17
|
-
interface IssueReportingVoiceConfig {
|
|
18
|
-
provider?: IssueReportingVoiceProvider;
|
|
19
|
-
modelId?: string;
|
|
20
|
-
requireMicrophonePermission?: boolean;
|
|
21
|
-
microphone?: IssueReportingVoiceMicrophoneConfig;
|
|
22
|
-
}
|
|
23
|
-
interface IssueReportingClient {
|
|
24
|
-
issueReporting: {
|
|
25
|
-
getStatus: (params?: {
|
|
26
|
-
scope?: IssueReportScope;
|
|
27
|
-
}) => Promise<IssueReportStatusResult>;
|
|
28
|
-
list: (params?: {
|
|
29
|
-
status?: IssueReportStatus;
|
|
30
|
-
limit?: number;
|
|
31
|
-
offset?: number;
|
|
32
|
-
scope?: IssueReportScope;
|
|
33
|
-
}) => Promise<IssueReportListResult>;
|
|
34
|
-
get: (issueReportId: string) => Promise<IssueReport>;
|
|
35
|
-
create: (payload: CreateIssueReportRequest) => Promise<IssueReport>;
|
|
36
|
-
update: (issueReportId: string, payload: UpdateIssueReportRequest) => Promise<IssueReport>;
|
|
37
|
-
reply: (issueReportId: string, payload: ReplyIssueReportRequest) => Promise<IssueReport>;
|
|
38
|
-
createVoiceToken?: () => Promise<IssueReportingVoiceTokenResult>;
|
|
39
|
-
uploadAttachment?: (file: Blob, options?: {
|
|
40
|
-
filename?: string;
|
|
41
|
-
}) => Promise<IssueReportAttachmentOut>;
|
|
42
|
-
listMessages?: (issueReportId: string) => Promise<ListIssueReportMessagesResponse>;
|
|
43
|
-
submitMessage?: (issueReportId: string, payload: CreateReporterMessageRequest) => Promise<IssueReportMessage>;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
interface ReportableTargetDescriptor {
|
|
47
|
-
componentKey: string;
|
|
48
|
-
componentLabel?: string;
|
|
49
|
-
surfaceRef?: string | null;
|
|
50
|
-
metadata?: Record<string, unknown>;
|
|
51
|
-
}
|
|
52
|
-
type ReportableInput = string | ReportableTargetDescriptor;
|
|
53
|
-
type IssueReportingCreateMode = "general_page" | "surface_required" | "surface_preferred";
|
|
54
|
-
type IssueHistoryFilter = "all" | "unresolved" | "resolved";
|
|
55
|
-
interface IssueReportingCopy {
|
|
56
|
-
entryAriaLabel: string;
|
|
57
|
-
popoverTitle: string;
|
|
58
|
-
reportNewAction: string;
|
|
59
|
-
reportPageAction: string;
|
|
60
|
-
reportSpecificAction: string;
|
|
61
|
-
filtersAll: string;
|
|
62
|
-
filtersUnresolved: string;
|
|
63
|
-
filtersResolved: string;
|
|
64
|
-
historyHelpText: string;
|
|
65
|
-
historyLoading: string;
|
|
66
|
-
historyLoadFailed: string;
|
|
67
|
-
statusLoadFailed: string;
|
|
68
|
-
emptyAll: string;
|
|
69
|
-
emptyUnresolved: string;
|
|
70
|
-
emptyResolved: string;
|
|
71
|
-
scopeLabel: string;
|
|
72
|
-
scopeMine: string;
|
|
73
|
-
scopeTenant: string;
|
|
74
|
-
reportModeTitle: string;
|
|
75
|
-
reportModeDescription: string;
|
|
76
|
-
reportModeCancelAction: string;
|
|
77
|
-
generalPageTargetLabel: string;
|
|
78
|
-
surfaceRequiredDescription: string;
|
|
79
|
-
specificSectionUnavailableDescription: string;
|
|
80
|
-
createTitlePrefix: string;
|
|
81
|
-
editTitlePrefix: string;
|
|
82
|
-
replyTitlePrefix: string;
|
|
83
|
-
createDescriptionPrefix: string;
|
|
84
|
-
editDescription: string;
|
|
85
|
-
replyDescription: string;
|
|
86
|
-
notePlaceholder: string;
|
|
87
|
-
noteMinimumSuffix: string;
|
|
88
|
-
keyboardShortcutHint: string;
|
|
89
|
-
originalIssueLabel: string;
|
|
90
|
-
cancelAction: string;
|
|
91
|
-
submitAction: string;
|
|
92
|
-
submittingAction: string;
|
|
93
|
-
editAction: string;
|
|
94
|
-
replyAction: string;
|
|
95
|
-
hydrateLoading: string;
|
|
96
|
-
hydrateFailed: string;
|
|
97
|
-
retryAction: string;
|
|
98
|
-
originHumanLabel: string;
|
|
99
|
-
originMachineLabel: string;
|
|
100
|
-
machineOriginFallback: string;
|
|
101
|
-
threadTitle: string;
|
|
102
|
-
threadDescription: string;
|
|
103
|
-
threadLoading: string;
|
|
104
|
-
threadLoadFailed: string;
|
|
105
|
-
threadEmpty: string;
|
|
106
|
-
threadNeedsResponseBadge: string;
|
|
107
|
-
threadAuthorOperator: string;
|
|
108
|
-
threadAuthorReporter: string;
|
|
109
|
-
threadKindClarificationRequest: string;
|
|
110
|
-
threadKindReporterResponse: string;
|
|
111
|
-
threadKindFinalResponse: string;
|
|
112
|
-
threadResponsePlaceholder: string;
|
|
113
|
-
threadResponseLabel: string;
|
|
114
|
-
threadResponseSubmitAction: string;
|
|
115
|
-
threadResponseSubmittingAction: string;
|
|
116
|
-
threadResponseConflict: string;
|
|
117
|
-
threadResponseFailed: string;
|
|
118
|
-
}
|
|
119
|
-
interface IssueReportingProviderProps {
|
|
120
|
-
client: IssueReportingClient;
|
|
121
|
-
isEligible: boolean;
|
|
122
|
-
reporterRoleHint?: string;
|
|
123
|
-
principalId?: string | null;
|
|
124
|
-
getPageUrl?: () => string;
|
|
125
|
-
defaultScope?: IssueReportScope;
|
|
126
|
-
allowTenantScope?: boolean;
|
|
127
|
-
defaultCreateMode?: IssueReportingCreateMode;
|
|
128
|
-
inputModes?: IssueReportingInputMode[];
|
|
129
|
-
defaultInputMode?: IssueReportingInputMode;
|
|
130
|
-
voice?: IssueReportingVoiceConfig;
|
|
131
|
-
copy?: Partial<IssueReportingCopy>;
|
|
132
|
-
children: ReactNode;
|
|
133
|
-
}
|
|
134
|
-
interface FloatingIssueReportButtonProps {
|
|
135
|
-
className?: string;
|
|
136
|
-
positionClassName?: string;
|
|
137
|
-
}
|
|
138
|
-
interface IssueReportingPageConfigProps {
|
|
139
|
-
createMode: IssueReportingCreateMode;
|
|
140
|
-
}
|
|
8
|
+
import * as spaps_types from 'spaps-types';
|
|
9
|
+
import { IssueReport, IssueReportStatus, IssueReportScope, IssueReportMessage, IssueReportingInputMode, ListIssueReportMessagesResponse } from 'spaps-types';
|
|
10
|
+
export { CreateIssueReportRequest, CreateReporterMessageRequest, IssueReport, IssueReportAttachmentOut, IssueReportListResult, IssueReportMessage, IssueReportScope, IssueReportStatus, IssueReportStatusResult, ListIssueReportMessagesResponse, ReplyIssueReportRequest, UpdateIssueReportRequest } from 'spaps-types';
|
|
141
11
|
|
|
142
12
|
declare function IssueReportMessageThread({ issueReportId, }: {
|
|
143
13
|
issueReportId: string;
|
|
@@ -196,6 +66,7 @@ type IssueReportingContextValue = {
|
|
|
196
66
|
voice: Required<Pick<IssueReportingVoiceConfig, "provider" | "modelId" | "requireMicrophonePermission">> & {
|
|
197
67
|
microphone?: IssueReportingVoiceConfig["microphone"];
|
|
198
68
|
};
|
|
69
|
+
screenshotCapture: IssueReportingScreenshotCaptureConfig | undefined;
|
|
199
70
|
needsResponseIssueIds: string[];
|
|
200
71
|
setNeedsResponse: (issueReportId: string, needsResponse: boolean) => void;
|
|
201
72
|
};
|
|
@@ -459,7 +330,7 @@ declare function useIssueReportingMessageMutation(issueReportId: string | null):
|
|
|
459
330
|
body: string;
|
|
460
331
|
idempotency_key?: string;
|
|
461
332
|
}, unknown>;
|
|
462
|
-
declare function IssueReportingProvider({ client, isEligible, reporterRoleHint, principalId, getPageUrl, defaultScope, allowTenantScope, defaultCreateMode, inputModes, defaultInputMode, voice, copy, children, }: IssueReportingProviderProps): react_jsx_runtime.JSX.Element;
|
|
333
|
+
declare function IssueReportingProvider({ client, isEligible, reporterRoleHint, principalId, getPageUrl, defaultScope, allowTenantScope, defaultCreateMode, inputModes, defaultInputMode, voice, screenshotCapture, copy, children, }: IssueReportingProviderProps): react_jsx_runtime.JSX.Element;
|
|
463
334
|
|
|
464
335
|
interface ReportModeContextValue {
|
|
465
336
|
isReportMode: boolean;
|
|
@@ -472,4 +343,4 @@ interface ReportModeContextValue {
|
|
|
472
343
|
declare const ReportModeContext: React.Context<ReportModeContextValue | null>;
|
|
473
344
|
declare function useReportMode(): ReportModeContextValue | null;
|
|
474
345
|
|
|
475
|
-
export { FloatingIssueReportButton,
|
|
346
|
+
export { FloatingIssueReportButton, FloatingIssueReportButtonProps, IssueHistoryFilter, IssueReportMessageThread, IssueReportingCopy, IssueReportingCreateMode, IssueReportingPageConfig, IssueReportingPageConfigProps, IssueReportingProvider, IssueReportingProviderProps, IssueReportingScreenshotCaptureConfig, ReportModeContext, type ReportModeContextValue, ReportableInput, ReportableSection, defaultIssueReportingCopy, filterIssueReports, getEntryPointClassName, getEntryPointState, getIssueNoteLengthMessage, getIssueStatusBadgeLabel, getIssueStatusClassName, isClosedIssueStatus, isOpenIssueStatus, isReporterMessageConflict, issueReportingKeys, selectReporterVisibleMessages, useIssueReporting, useIssueReportingHistory, useIssueReportingMessageMutation, useIssueReportingMessages, useIssueReportingMutations, useIssueReportingStatus, useReportMode };
|