@ciridae/ui 1.2.0 → 1.2.1

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.
@@ -10,6 +10,13 @@ export type PlacedScreenshotPointer = FeedbackScreenshotPointer & {
10
10
  };
11
11
  /** The most pointers one screenshot takes. */
12
12
  export declare const MAX_SCREENSHOT_POINTERS = 7;
13
+ /**
14
+ * The page as a PNG object URL, captured once `enabled` turns on: undefined while it renders, null
15
+ * when it could not be. Portaled layers, such as the feedback sheet itself, are left out.
16
+ */
17
+ export declare function usePageScreenshot(enabled: boolean): string | null | undefined;
18
+ /** The screenshot as a file to upload with the feedback. */
19
+ export declare function screenshotFile(src: string): Promise<File>;
13
20
  /** The thumbnail beside "Include a screenshot", and the dialog it opens to annotate it. */
14
21
  export declare function FeedbackScreenshot({ src, pointers, onPointersChange, disabled, }: {
15
22
  src: string;
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /*
3
- * The feedback form's screenshot: a thumbnail that opens a dialog where clicking the image drops a
3
+ * The feedback form's screenshot: the page captured under the sheet, and a thumbnail that opens a dialog where clicking the image drops a
4
4
  * numbered pointer, each with a note. Pointers sit at fractions of the image's width and height,
5
5
  * so they land on the same spot at any size.
6
6
  */
7
7
  import { XIcon } from "@phosphor-icons/react";
8
- import { useRef, useState } from "react";
8
+ import { snapdom } from "@zumer/snapdom";
9
+ import { useEffect, useRef, useState } from "react";
9
10
  import { css } from "#primitives/css";
10
11
  import { IconButton } from "./button.js";
11
12
  import { Textarea } from "./form-controls.js";
@@ -118,6 +119,44 @@ const thumbnailCount = css({
118
119
  lineHeight: "tight",
119
120
  fontVariantNumeric: "tabular-nums",
120
121
  });
122
+ /**
123
+ * The page as a PNG object URL, captured once `enabled` turns on: undefined while it renders, null
124
+ * when it could not be. Portaled layers, such as the feedback sheet itself, are left out.
125
+ */
126
+ export function usePageScreenshot(enabled) {
127
+ const [src, setSrc] = useState();
128
+ useEffect(() => {
129
+ if (!enabled)
130
+ return;
131
+ let live = true;
132
+ let url;
133
+ snapdom(document.body, { exclude: ["[data-base-ui-portal]"], excludeMode: "remove" })
134
+ .then((capture) => capture.toBlob({ type: "png" }))
135
+ .then((blob) => {
136
+ url = URL.createObjectURL(blob);
137
+ if (live)
138
+ setSrc(url);
139
+ else
140
+ URL.revokeObjectURL(url);
141
+ })
142
+ .catch((error) => {
143
+ console.warn("Could not capture the page for feedback", error);
144
+ if (live)
145
+ setSrc(null);
146
+ });
147
+ return () => {
148
+ live = false;
149
+ if (url)
150
+ URL.revokeObjectURL(url);
151
+ };
152
+ }, [enabled]);
153
+ return src;
154
+ }
155
+ /** The screenshot as a file to upload with the feedback. */
156
+ export async function screenshotFile(src) {
157
+ const blob = await (await fetch(src)).blob();
158
+ return new File([blob], `screenshot.${blob.type.split("/")[1] ?? "png"}`, { type: blob.type });
159
+ }
121
160
  function placeAt(pointer) {
122
161
  return { left: `${pointer.x * 100}%`, top: `${pointer.y * 100}%` };
123
162
  }
@@ -10,7 +10,7 @@ export type FeedbackSheetValues = {
10
10
  includeScreenshot: boolean;
11
11
  /** Pointers on the screenshot, in order; empty when it is not included. */
12
12
  annotations: FeedbackScreenshotPointer[];
13
- /** Files to upload with the feedback, within `feedbackAttachmentLimits`. */
13
+ /** Files to upload with the feedback, the screenshot among them, within `feedbackAttachmentLimits`. */
14
14
  attachments: File[];
15
15
  };
16
16
  export type { FeedbackScreenshotPointer };
@@ -31,7 +31,10 @@ export type FeedbackLabels = CiridaeLabels["feedback"];
31
31
  export declare function formatFeedbackDescription({ whatHappened, annotations }: FeedbackSheetValues): string;
32
32
  export type FeedbackFormProps = {
33
33
  where: FeedbackWhere;
34
- /** The page as the person sees it, as an image or data URL, to include and annotate. */
34
+ /**
35
+ * The page as the person sees it, as a same-origin image, object or data URL, since it is
36
+ * fetched to upload; captured on open when left out.
37
+ */
35
38
  screenshot?: string;
36
39
  /** Sends the feedback; rejecting shows the failed state with the message kept for a retry. */
37
40
  onSubmit: (values: FeedbackSheetValues) => Promise<{
@@ -20,7 +20,7 @@ import { useCopy } from "./copyable-id.js";
20
20
  import { DateTime } from "./date-time.js";
21
21
  import { Drawer, DrawerBody, DrawerField, DrawerFooter, DrawerForm } from "./drawer.js";
22
22
  import { Dropzone, DropzoneFileList, DropzonePad } from "./dropzone.js";
23
- import { FeedbackScreenshot, } from "./feedback-screenshot.js";
23
+ import { FeedbackScreenshot, screenshotFile, usePageScreenshot, } from "./feedback-screenshot.js";
24
24
  import { FilterBar, matchesFilter } from "./filter-bar.js";
25
25
  import { Checkbox, Textarea } from "./form-controls.js";
26
26
  import { directional, icon, Spinner } from "./icon.js";
@@ -123,8 +123,6 @@ const screenshotPreview = css({
123
123
  borderRadius: "keycap",
124
124
  background: "bg.field",
125
125
  color: "fg.muted",
126
- fontSize: "code",
127
- fontWeight: "medium",
128
126
  });
129
127
  const sent = css({
130
128
  display: "flex",
@@ -283,6 +281,13 @@ export function FeedbackForm({ where: about, screenshot, onSubmit, errorDetail,
283
281
  const [sendState, setSendState] = useState({ status: "idle" });
284
282
  const messageErrorId = useId();
285
283
  const submitting = sendState.status === "submitting";
284
+ const captured = usePageScreenshot(screenshot === undefined);
285
+ const image = screenshot ?? captured;
286
+ // Sending waits for an included screenshot that is still capturing.
287
+ const capturing = includeScreenshot && image === undefined;
288
+ const { count, bytes } = feedbackAttachmentLimits;
289
+ // An included screenshot, captured or still capturing, takes one of the slots.
290
+ const fileSlots = count - (includeScreenshot && image !== null ? 1 : 0);
286
291
  const reset = () => {
287
292
  setKind("wrong");
288
293
  setWhatHappened("");
@@ -295,18 +300,17 @@ export function FeedbackForm({ where: about, screenshot, onSubmit, errorDetail,
295
300
  };
296
301
  // Keeps what fits the limits and names the first file or limit that did not.
297
302
  const addAttachments = (files) => {
298
- const { count, bytes } = feedbackAttachmentLimits;
299
303
  const empty = files.find((file) => file.size === 0);
300
304
  const oversize = files.find((file) => file.size > bytes);
301
305
  const fitting = files.filter((file) => file.size > 0 && file.size <= bytes);
302
- const added = fitting.slice(0, Math.max(0, count - attachments.length));
306
+ const added = fitting.slice(0, Math.max(0, fileSlots - attachments.length));
303
307
  setAttachments([...attachments, ...added]);
304
308
  setAttachmentError(oversize
305
309
  ? labels.fileTooLarge(oversize.name, formatFileSize(bytes))
306
310
  : empty
307
311
  ? labels.fileEmpty(empty.name)
308
312
  : added.length < fitting.length
309
- ? labels.tooManyFiles(count)
313
+ ? labels.tooManyFiles(fileSlots)
310
314
  : null);
311
315
  };
312
316
  const removeAttachment = (removed) => {
@@ -321,6 +325,21 @@ export function FeedbackForm({ where: about, screenshot, onSubmit, errorDetail,
321
325
  setValidation(null);
322
326
  setSendState({ status: "submitting" });
323
327
  try {
328
+ const screenshotUpload = includeScreenshot && image ? await screenshotFile(image) : null;
329
+ // Files added while the screenshot was off can leave it no slot, and a long page can
330
+ // capture over the size limit.
331
+ const limitError = !screenshotUpload
332
+ ? null
333
+ : screenshotUpload.size > bytes
334
+ ? labels.fileTooLarge(screenshotUpload.name, formatFileSize(bytes))
335
+ : attachments.length >= count
336
+ ? labels.tooManyFiles(count - 1)
337
+ : null;
338
+ if (limitError) {
339
+ setAttachmentError(limitError);
340
+ setSendState({ status: "idle" });
341
+ return;
342
+ }
324
343
  const { reference } = await onSubmit({
325
344
  kind,
326
345
  whatHappened: whatHappened.trim(),
@@ -328,7 +347,7 @@ export function FeedbackForm({ where: about, screenshot, onSubmit, errorDetail,
328
347
  annotations: includeScreenshot
329
348
  ? pointers.map((pointer) => ({ x: pointer.x, y: pointer.y, note: pointer.note.trim() }))
330
349
  : [],
331
- attachments,
350
+ attachments: screenshotUpload ? [...attachments, screenshotUpload] : attachments,
332
351
  });
333
352
  setSendState({ status: "sent", reference });
334
353
  }
@@ -343,7 +362,7 @@ export function FeedbackForm({ where: about, screenshot, onSubmit, errorDetail,
343
362
  return (_jsxs(DrawerForm, { noValidate: true, onSubmit: (event) => {
344
363
  event.preventDefault();
345
364
  void send();
346
- }, children: [_jsxs(Dropzone, { render: _jsx(DrawerBody, { className: body }), disabled: submitting, onFiles: addAttachments, children: [sendState.status === "error" && (_jsx(FailedNotice, { title: labels.sendFailed, children: errorDetail?.(sendState.error) })), _jsx(DrawerField, { label: labels.type, children: _jsx(Select, { label: labels.type, size: "medium", options: kindOptions(labels), value: kind, disabled: submitting, onValueChange: (value) => isFeedbackKind(value) && setKind(value) }) }), _jsx(DrawerField, { label: labels.where, children: _jsx("div", { className: where, children: whereContent }) }), _jsx(DrawerField, { label: labels.whatHappened, error: validation, children: _jsx(Textarea, { className: message, value: whatHappened, placeholder: labels.whatHappenedPlaceholder, "aria-invalid": validation ? true : undefined, "aria-describedby": validation ? messageErrorId : undefined, disabled: submitting, onChange: (event) => setWhatHappened(event.target.value) }) }), _jsxs("div", { className: screenshotRow, children: [_jsx(Checkbox, { checked: includeScreenshot, disabled: submitting, onCheckedChange: (checked) => setIncludeScreenshot(checked), children: _jsx("span", { className: screenshotCopy, children: labels.includeScreenshot }) }), screenshot ? (_jsx(FeedbackScreenshot, { src: screenshot, pointers: pointers, onPointersChange: setPointers, disabled: submitting || !includeScreenshot })) : (_jsx("span", { className: screenshotPreview, children: labels.preview }))] }), _jsxs(DrawerField, { label: labels.attachments, error: attachmentError, children: [_jsx(DropzoneFileList, { files: attachments, pending: submitting, disabled: submitting, onRemove: removeAttachment }), _jsx(DropzonePad, {})] })] }), _jsxs(DrawerFooter, { children: [_jsx(Button, { size: "medium", variant: "secondary", disabled: submitting, onClick: onClose, children: locale.common.cancel }), _jsx(Button, { type: "submit", size: "medium", loading: submitting, icon: sendState.status === "error" ? (_jsx(ArrowClockwiseIcon, { className: icon({ size: "small" }) })) : undefined, children: submitting
365
+ }, children: [_jsxs(Dropzone, { render: _jsx(DrawerBody, { className: body }), disabled: submitting, onFiles: addAttachments, children: [sendState.status === "error" && (_jsx(FailedNotice, { title: labels.sendFailed, children: errorDetail?.(sendState.error) })), _jsx(DrawerField, { label: labels.type, children: _jsx(Select, { label: labels.type, size: "medium", options: kindOptions(labels), value: kind, disabled: submitting, onValueChange: (value) => isFeedbackKind(value) && setKind(value) }) }), _jsx(DrawerField, { label: labels.where, children: _jsx("div", { className: where, children: whereContent }) }), _jsx(DrawerField, { label: labels.whatHappened, error: validation, children: _jsx(Textarea, { className: message, value: whatHappened, placeholder: labels.whatHappenedPlaceholder, "aria-invalid": validation ? true : undefined, "aria-describedby": validation ? messageErrorId : undefined, disabled: submitting, onChange: (event) => setWhatHappened(event.target.value) }) }), image !== null && (_jsxs("div", { className: screenshotRow, children: [_jsx(Checkbox, { checked: includeScreenshot, disabled: submitting, onCheckedChange: (checked) => setIncludeScreenshot(checked), children: _jsx("span", { className: screenshotCopy, children: labels.includeScreenshot }) }), image ? (_jsx(FeedbackScreenshot, { src: image, pointers: pointers, onPointersChange: setPointers, disabled: submitting || !includeScreenshot })) : (_jsx("span", { className: screenshotPreview, children: _jsx(Spinner, {}) }))] })), _jsxs(DrawerField, { label: labels.attachments, error: attachmentError, children: [_jsx(DropzoneFileList, { files: attachments, pending: submitting, disabled: submitting, onRemove: removeAttachment }), _jsx(DropzonePad, {})] })] }), _jsxs(DrawerFooter, { children: [_jsx(Button, { size: "medium", variant: "secondary", disabled: submitting, onClick: onClose, children: locale.common.cancel }), _jsx(Button, { type: "submit", size: "medium", disabled: capturing, loading: submitting, icon: sendState.status === "error" ? (_jsx(ArrowClockwiseIcon, { className: icon({ size: "small" }) })) : undefined, children: submitting
347
366
  ? labels.sending
348
367
  : sendState.status === "error"
349
368
  ? locale.common.tryAgain
@@ -196,7 +196,6 @@ export declare const englishLabels: {
196
196
  whatHappened: string;
197
197
  whatHappenedPlaceholder: string;
198
198
  includeScreenshot: string;
199
- preview: string;
200
199
  attachments: string;
201
200
  kindWrong: string;
202
201
  kindIdea: string;
@@ -169,7 +169,6 @@ export const englishLabels = {
169
169
  whatHappened: "What happened?",
170
170
  whatHappenedPlaceholder: "Tell us what happened",
171
171
  includeScreenshot: "Include a screenshot",
172
- preview: "Preview",
173
172
  attachments: "Attachments",
174
173
  kindWrong: "Something is wrong",
175
174
  kindIdea: "An idea",
@@ -32,15 +32,24 @@ class FeedbackClient {
32
32
  __classPrivateFieldSet(this, _FeedbackClient_getBearerToken, config.getBearerToken, "f");
33
33
  }
34
34
  async create(input, options) {
35
+ const pageUrl = input.pageUrl ?? globalThis.location?.href;
36
+ const page = pageUrl ? new URL(pageUrl) : undefined;
37
+ if (page) {
38
+ page.username = "";
39
+ page.password = "";
40
+ page.search = "";
41
+ page.hash = "";
42
+ }
43
+ const payload = { ...input, pageUrl: page?.toString() };
35
44
  let form;
36
45
  if (options?.files?.length) {
37
46
  form = new FormData();
38
- form.append("feedback", JSON.stringify(input));
47
+ form.append("feedback", JSON.stringify(payload));
39
48
  for (const file of options.files)
40
49
  form.append("files", file);
41
50
  }
42
51
  return __classPrivateFieldGet(this, _FeedbackClient_instances, "m", _FeedbackClient_request).call(this, "/", feedbackItemSchema, {
43
- body: form ? undefined : input,
52
+ body: form ? undefined : payload,
44
53
  form,
45
54
  headers: { "Idempotency-Key": options?.idempotencyKey ?? crypto.randomUUID() },
46
55
  method: "POST",
@@ -28,6 +28,7 @@ declare const feedbackCreateInputSchema: z.ZodObject<{
28
28
  just_me: "just_me";
29
29
  my_team: "my_team";
30
30
  }>>>;
31
+ pageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
31
32
  }, z.core.$strict>;
32
33
  declare const feedbackErrorResponseSchema: z.ZodObject<{
33
34
  detail: z.ZodObject<{
@@ -1 +1 @@
1
- export type { BodyCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPost, ClientOptions, CreateFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdMessagesPostData, CreateFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdMessagesPostError, CreateFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdMessagesPostErrors, CreateFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdMessagesPostResponse, CreateFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdMessagesPostResponses, CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostData, CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostError, CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostErrors, CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostResponse, CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostResponses, FeedbackAttachment, FeedbackCreateRequest, FeedbackErrorDetail, FeedbackErrorResponse, FeedbackItem, FeedbackListResponse, FeedbackMessage, FeedbackMessageAuthor, FeedbackMessageCreateRequest, FeedbackStatusEvent, FeedbackSummary, FeedbackUpdateRequest, GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetData, GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetError, GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetErrors, GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetResponse, GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetResponses, HttpErrorResponse, HttpValidationError, ListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetData, ListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetError, ListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetErrors, ListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetResponse, ListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetResponses, UpdateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdPatchData, UpdateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdPatchError, UpdateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdPatchErrors, UpdateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdPatchResponse, UpdateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdPatchResponses, ValidationError, WithdrawFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdWithdrawPostData, WithdrawFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdWithdrawPostError, WithdrawFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdWithdrawPostErrors, WithdrawFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdWithdrawPostResponse, WithdrawFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdWithdrawPostResponses } from './types.gen';
1
+ export type { BodyCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPost, ClientOptions, CreateFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdMessagesPostData, CreateFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdMessagesPostError, CreateFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdMessagesPostErrors, CreateFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdMessagesPostResponse, CreateFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdMessagesPostResponses, CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostData, CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostError, CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostErrors, CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostResponse, CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostResponses, CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostData, CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostError, CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostErrors, CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostResponse, CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostResponses, FeedbackAttachment, FeedbackCreateRequest, FeedbackErrorDetail, FeedbackErrorResponse, FeedbackItem, FeedbackListResponse, FeedbackMessage, FeedbackMessageAuthor, FeedbackMessageCreateRequest, FeedbackStatusEvent, FeedbackSummary, FeedbackUpdateRequest, GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetData, GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetError, GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetErrors, GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetResponse, GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetResponses, GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetData, GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetError, GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetErrors, GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetResponse, GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetResponses, HttpErrorResponse, HttpValidationError, ListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetData, ListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetError, ListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetErrors, ListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetResponse, ListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetResponses, ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetData, ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetError, ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetErrors, ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetResponse, ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetResponses, OperatorFeedbackItem, OperatorFeedbackListResponse, OperatorFeedbackStatusUpdateRequest, OperatorFeedbackSummary, UpdateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdPatchData, UpdateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdPatchError, UpdateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdPatchErrors, UpdateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdPatchResponse, UpdateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdPatchResponses, UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchData, UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchError, UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchErrors, UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchResponse, UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchResponses, ValidationError, WithdrawFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdWithdrawPostData, WithdrawFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdWithdrawPostError, WithdrawFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdWithdrawPostErrors, WithdrawFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdWithdrawPostResponse, WithdrawFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdWithdrawPostResponses } from './types.gen';
@@ -40,6 +40,10 @@ export type FeedbackCreateRequest = {
40
40
  * Affectedscope
41
41
  */
42
42
  affectedScope?: 'everyone' | 'just_me' | 'my_team' | 'unknown';
43
+ /**
44
+ * Pageurl
45
+ */
46
+ pageUrl?: string | null;
43
47
  };
44
48
  /**
45
49
  * FeedbackItem
@@ -149,19 +153,95 @@ export type FeedbackListResponse = {
149
153
  items: Array<FeedbackSummary>;
150
154
  };
151
155
  /**
152
- * FeedbackUpdateRequest
156
+ * OperatorFeedbackListResponse
153
157
  *
154
- * Editable reporter fields while feedback awaits triage.
158
+ * All feedback in the request's environment scope.
155
159
  */
156
- export type FeedbackUpdateRequest = {
160
+ export type OperatorFeedbackListResponse = {
161
+ /**
162
+ * Items
163
+ */
164
+ items: Array<OperatorFeedbackSummary>;
165
+ };
166
+ /**
167
+ * OperatorFeedbackItem
168
+ *
169
+ * Operator detail with epoch-millisecond times on the item and messages.
170
+ *
171
+ * Messages share ``FeedbackMessage`` so OpenAPI keeps one message schema.
172
+ */
173
+ export type OperatorFeedbackItem = {
174
+ /**
175
+ * Id
176
+ */
177
+ id: string;
157
178
  /**
158
179
  * Subject
159
180
  */
160
- subject?: string | null;
181
+ subject: string;
161
182
  /**
162
183
  * Description
163
184
  */
164
- description?: string | null;
185
+ description: string;
186
+ /**
187
+ * Type
188
+ */
189
+ type: 'bug' | 'feature' | 'general';
190
+ /**
191
+ * Urgency
192
+ */
193
+ urgency: 'normal' | 'emergency';
194
+ /**
195
+ * Status
196
+ */
197
+ status: 'received' | 'in_progress' | 'discussion_required' | 'completed' | 'no_action' | 'withdrawn';
198
+ /**
199
+ * Createdat
200
+ */
201
+ createdAt: string;
202
+ /**
203
+ * Updatedat
204
+ */
205
+ updatedAt: string;
206
+ /**
207
+ * Reporteremail
208
+ */
209
+ reporterEmail: string | null;
210
+ /**
211
+ * Canreply
212
+ */
213
+ canReply: boolean;
214
+ /**
215
+ * Messages
216
+ */
217
+ messages: Array<FeedbackMessage>;
218
+ /**
219
+ * Attachments
220
+ */
221
+ attachments?: Array<FeedbackAttachment>;
222
+ /**
223
+ * Createdat Epoch Milliseconds
224
+ *
225
+ * Unix timestamp in milliseconds.
226
+ */
227
+ createdAt_epoch_milliseconds: number;
228
+ /**
229
+ * Updatedat Epoch Milliseconds
230
+ *
231
+ * Unix timestamp in milliseconds.
232
+ */
233
+ updatedAt_epoch_milliseconds: number;
234
+ };
235
+ /**
236
+ * OperatorFeedbackStatusUpdateRequest
237
+ *
238
+ * Administrator-selected feedback workflow status.
239
+ */
240
+ export type OperatorFeedbackStatusUpdateRequest = {
241
+ /**
242
+ * Status
243
+ */
244
+ status: 'received' | 'in_progress' | 'discussion_required' | 'completed' | 'no_action';
165
245
  };
166
246
  /**
167
247
  * FeedbackMessageCreateRequest
@@ -208,6 +288,21 @@ export type FeedbackMessage = {
208
288
  */
209
289
  editedAt_epoch_milliseconds: number | null;
210
290
  };
291
+ /**
292
+ * FeedbackUpdateRequest
293
+ *
294
+ * Editable reporter fields while feedback awaits triage.
295
+ */
296
+ export type FeedbackUpdateRequest = {
297
+ /**
298
+ * Subject
299
+ */
300
+ subject?: string | null;
301
+ /**
302
+ * Description
303
+ */
304
+ description?: string | null;
305
+ };
211
306
  /**
212
307
  * HTTPErrorResponse
213
308
  *
@@ -376,6 +471,61 @@ export type FeedbackSummary = {
376
471
  */
377
472
  updatedAt_epoch_milliseconds: number;
378
473
  };
474
+ /**
475
+ * OperatorFeedbackSummary
476
+ *
477
+ * One operator-visible summary with epoch-millisecond times.
478
+ */
479
+ export type OperatorFeedbackSummary = {
480
+ /**
481
+ * Id
482
+ */
483
+ id: string;
484
+ /**
485
+ * Subject
486
+ */
487
+ subject: string;
488
+ /**
489
+ * Description
490
+ */
491
+ description: string;
492
+ /**
493
+ * Type
494
+ */
495
+ type: 'bug' | 'feature' | 'general';
496
+ /**
497
+ * Urgency
498
+ */
499
+ urgency: 'normal' | 'emergency';
500
+ /**
501
+ * Status
502
+ */
503
+ status: 'received' | 'in_progress' | 'discussion_required' | 'completed' | 'no_action' | 'withdrawn';
504
+ /**
505
+ * Createdat
506
+ */
507
+ createdAt: string;
508
+ /**
509
+ * Updatedat
510
+ */
511
+ updatedAt: string;
512
+ /**
513
+ * Reporteremail
514
+ */
515
+ reporterEmail: string | null;
516
+ /**
517
+ * Createdat Epoch Milliseconds
518
+ *
519
+ * Unix timestamp in milliseconds.
520
+ */
521
+ createdAt_epoch_milliseconds: number;
522
+ /**
523
+ * Updatedat Epoch Milliseconds
524
+ *
525
+ * Unix timestamp in milliseconds.
526
+ */
527
+ updatedAt_epoch_milliseconds: number;
528
+ };
379
529
  /**
380
530
  * FeedbackMessageAuthor
381
531
  *
@@ -507,6 +657,230 @@ export type CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPost
507
657
  201: FeedbackItem;
508
658
  };
509
659
  export type CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostResponse = CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostResponses[keyof CreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostResponses];
660
+ export type ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetData = {
661
+ body?: never;
662
+ path: {
663
+ /**
664
+ * Project Id
665
+ */
666
+ project_id: string;
667
+ /**
668
+ * Environment
669
+ */
670
+ environment: string;
671
+ };
672
+ query?: never;
673
+ url: '/v1/projects/{project_id}/environments/{environment}/feedback/operator';
674
+ };
675
+ export type ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetErrors = {
676
+ /**
677
+ * Unauthorized
678
+ */
679
+ 401: FeedbackErrorResponse;
680
+ /**
681
+ * Forbidden
682
+ */
683
+ 403: FeedbackErrorResponse;
684
+ /**
685
+ * Not Found
686
+ */
687
+ 404: FeedbackErrorResponse;
688
+ /**
689
+ * Conflict
690
+ */
691
+ 409: FeedbackErrorResponse;
692
+ /**
693
+ * Validation Error
694
+ */
695
+ 422: HttpValidationError;
696
+ /**
697
+ * Service Unavailable
698
+ */
699
+ 503: FeedbackErrorResponse;
700
+ /**
701
+ * Request failed.
702
+ */
703
+ default: HttpErrorResponse;
704
+ };
705
+ export type ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetError = ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetErrors[keyof ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetErrors];
706
+ export type ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetResponses = {
707
+ /**
708
+ * Successful Response
709
+ */
710
+ 200: OperatorFeedbackListResponse;
711
+ };
712
+ export type ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetResponse = ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetResponses[keyof ListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetResponses];
713
+ export type GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetData = {
714
+ body?: never;
715
+ path: {
716
+ /**
717
+ * Feedback Id
718
+ */
719
+ feedback_id: string;
720
+ /**
721
+ * Project Id
722
+ */
723
+ project_id: string;
724
+ /**
725
+ * Environment
726
+ */
727
+ environment: string;
728
+ };
729
+ query?: never;
730
+ url: '/v1/projects/{project_id}/environments/{environment}/feedback/operator/{feedback_id}';
731
+ };
732
+ export type GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetErrors = {
733
+ /**
734
+ * Unauthorized
735
+ */
736
+ 401: FeedbackErrorResponse;
737
+ /**
738
+ * Forbidden
739
+ */
740
+ 403: FeedbackErrorResponse;
741
+ /**
742
+ * Not Found
743
+ */
744
+ 404: FeedbackErrorResponse;
745
+ /**
746
+ * Conflict
747
+ */
748
+ 409: FeedbackErrorResponse;
749
+ /**
750
+ * Validation Error
751
+ */
752
+ 422: HttpValidationError;
753
+ /**
754
+ * Service Unavailable
755
+ */
756
+ 503: FeedbackErrorResponse;
757
+ /**
758
+ * Request failed.
759
+ */
760
+ default: HttpErrorResponse;
761
+ };
762
+ export type GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetError = GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetErrors[keyof GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetErrors];
763
+ export type GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetResponses = {
764
+ /**
765
+ * Successful Response
766
+ */
767
+ 200: OperatorFeedbackItem;
768
+ };
769
+ export type GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetResponse = GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetResponses[keyof GetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetResponses];
770
+ export type UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchData = {
771
+ body: OperatorFeedbackStatusUpdateRequest;
772
+ path: {
773
+ /**
774
+ * Feedback Id
775
+ */
776
+ feedback_id: string;
777
+ /**
778
+ * Project Id
779
+ */
780
+ project_id: string;
781
+ /**
782
+ * Environment
783
+ */
784
+ environment: string;
785
+ };
786
+ query?: never;
787
+ url: '/v1/projects/{project_id}/environments/{environment}/feedback/operator/{feedback_id}';
788
+ };
789
+ export type UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchErrors = {
790
+ /**
791
+ * Unauthorized
792
+ */
793
+ 401: FeedbackErrorResponse;
794
+ /**
795
+ * Forbidden
796
+ */
797
+ 403: FeedbackErrorResponse;
798
+ /**
799
+ * Not Found
800
+ */
801
+ 404: FeedbackErrorResponse;
802
+ /**
803
+ * Conflict
804
+ */
805
+ 409: FeedbackErrorResponse;
806
+ /**
807
+ * Validation Error
808
+ */
809
+ 422: HttpValidationError;
810
+ /**
811
+ * Service Unavailable
812
+ */
813
+ 503: FeedbackErrorResponse;
814
+ /**
815
+ * Request failed.
816
+ */
817
+ default: HttpErrorResponse;
818
+ };
819
+ export type UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchError = UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchErrors[keyof UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchErrors];
820
+ export type UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchResponses = {
821
+ /**
822
+ * Successful Response
823
+ */
824
+ 200: OperatorFeedbackItem;
825
+ };
826
+ export type UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchResponse = UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchResponses[keyof UpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchResponses];
827
+ export type CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostData = {
828
+ body: FeedbackMessageCreateRequest;
829
+ path: {
830
+ /**
831
+ * Feedback Id
832
+ */
833
+ feedback_id: string;
834
+ /**
835
+ * Project Id
836
+ */
837
+ project_id: string;
838
+ /**
839
+ * Environment
840
+ */
841
+ environment: string;
842
+ };
843
+ query?: never;
844
+ url: '/v1/projects/{project_id}/environments/{environment}/feedback/operator/{feedback_id}/messages';
845
+ };
846
+ export type CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostErrors = {
847
+ /**
848
+ * Unauthorized
849
+ */
850
+ 401: FeedbackErrorResponse;
851
+ /**
852
+ * Forbidden
853
+ */
854
+ 403: FeedbackErrorResponse;
855
+ /**
856
+ * Not Found
857
+ */
858
+ 404: FeedbackErrorResponse;
859
+ /**
860
+ * Conflict
861
+ */
862
+ 409: FeedbackErrorResponse;
863
+ /**
864
+ * Validation Error
865
+ */
866
+ 422: HttpValidationError;
867
+ /**
868
+ * Service Unavailable
869
+ */
870
+ 503: FeedbackErrorResponse;
871
+ /**
872
+ * Request failed.
873
+ */
874
+ default: HttpErrorResponse;
875
+ };
876
+ export type CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostError = CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostErrors[keyof CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostErrors];
877
+ export type CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostResponses = {
878
+ /**
879
+ * Successful Response
880
+ */
881
+ 201: FeedbackMessage;
882
+ };
883
+ export type CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostResponse = CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostResponses[keyof CreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostResponses];
510
884
  export type GetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetData = {
511
885
  body?: never;
512
886
  path: {
@@ -29,16 +29,22 @@ export declare const zFeedbackCreateRequest: z.ZodObject<{
29
29
  just_me: "just_me";
30
30
  my_team: "my_team";
31
31
  }>>>;
32
+ pageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
32
33
  }, z.core.$strict>;
33
34
  /**
34
- * FeedbackUpdateRequest
35
+ * OperatorFeedbackStatusUpdateRequest
35
36
  *
36
- * Editable reporter fields while feedback awaits triage.
37
+ * Administrator-selected feedback workflow status.
37
38
  */
38
- export declare const zFeedbackUpdateRequest: z.ZodObject<{
39
- subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
40
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
- }, z.core.$strict>;
39
+ export declare const zOperatorFeedbackStatusUpdateRequest: z.ZodObject<{
40
+ status: z.ZodEnum<{
41
+ received: "received";
42
+ in_progress: "in_progress";
43
+ discussion_required: "discussion_required";
44
+ completed: "completed";
45
+ no_action: "no_action";
46
+ }>;
47
+ }, z.core.$strip>;
42
48
  /**
43
49
  * FeedbackMessageCreateRequest
44
50
  *
@@ -47,6 +53,15 @@ export declare const zFeedbackUpdateRequest: z.ZodObject<{
47
53
  export declare const zFeedbackMessageCreateRequest: z.ZodObject<{
48
54
  body: z.ZodString;
49
55
  }, z.core.$strict>;
56
+ /**
57
+ * FeedbackUpdateRequest
58
+ *
59
+ * Editable reporter fields while feedback awaits triage.
60
+ */
61
+ export declare const zFeedbackUpdateRequest: z.ZodObject<{
62
+ subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
64
+ }, z.core.$strict>;
50
65
  /**
51
66
  * HTTPErrorResponse
52
67
  *
@@ -226,6 +241,72 @@ export declare const zFeedbackListResponse: z.ZodObject<{
226
241
  updatedAt_epoch_milliseconds: z.ZodInt;
227
242
  }, z.core.$strip>>;
228
243
  }, z.core.$strip>;
244
+ /**
245
+ * OperatorFeedbackSummary
246
+ *
247
+ * One operator-visible summary with epoch-millisecond times.
248
+ */
249
+ export declare const zOperatorFeedbackSummary: z.ZodObject<{
250
+ id: z.ZodUUID;
251
+ subject: z.ZodString;
252
+ description: z.ZodString;
253
+ type: z.ZodEnum<{
254
+ general: "general";
255
+ bug: "bug";
256
+ feature: "feature";
257
+ }>;
258
+ urgency: z.ZodEnum<{
259
+ normal: "normal";
260
+ emergency: "emergency";
261
+ }>;
262
+ status: z.ZodEnum<{
263
+ received: "received";
264
+ in_progress: "in_progress";
265
+ discussion_required: "discussion_required";
266
+ completed: "completed";
267
+ no_action: "no_action";
268
+ withdrawn: "withdrawn";
269
+ }>;
270
+ createdAt: z.ZodISODateTime;
271
+ updatedAt: z.ZodISODateTime;
272
+ reporterEmail: z.ZodNullable<z.ZodString>;
273
+ createdAt_epoch_milliseconds: z.ZodInt;
274
+ updatedAt_epoch_milliseconds: z.ZodInt;
275
+ }, z.core.$strip>;
276
+ /**
277
+ * OperatorFeedbackListResponse
278
+ *
279
+ * All feedback in the request's environment scope.
280
+ */
281
+ export declare const zOperatorFeedbackListResponse: z.ZodObject<{
282
+ items: z.ZodArray<z.ZodObject<{
283
+ id: z.ZodUUID;
284
+ subject: z.ZodString;
285
+ description: z.ZodString;
286
+ type: z.ZodEnum<{
287
+ general: "general";
288
+ bug: "bug";
289
+ feature: "feature";
290
+ }>;
291
+ urgency: z.ZodEnum<{
292
+ normal: "normal";
293
+ emergency: "emergency";
294
+ }>;
295
+ status: z.ZodEnum<{
296
+ received: "received";
297
+ in_progress: "in_progress";
298
+ discussion_required: "discussion_required";
299
+ completed: "completed";
300
+ no_action: "no_action";
301
+ withdrawn: "withdrawn";
302
+ }>;
303
+ createdAt: z.ZodISODateTime;
304
+ updatedAt: z.ZodISODateTime;
305
+ reporterEmail: z.ZodNullable<z.ZodString>;
306
+ createdAt_epoch_milliseconds: z.ZodInt;
307
+ updatedAt_epoch_milliseconds: z.ZodInt;
308
+ }, z.core.$strip>>;
309
+ }, z.core.$strip>;
229
310
  /**
230
311
  * FeedbackMessageAuthor
231
312
  *
@@ -332,6 +413,62 @@ export declare const zFeedbackItem: z.ZodObject<{
332
413
  url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
333
414
  }, z.core.$strip>>>>;
334
415
  }, z.core.$strip>;
416
+ /**
417
+ * OperatorFeedbackItem
418
+ *
419
+ * Operator detail with epoch-millisecond times on the item and messages.
420
+ *
421
+ * Messages share ``FeedbackMessage`` so OpenAPI keeps one message schema.
422
+ */
423
+ export declare const zOperatorFeedbackItem: z.ZodObject<{
424
+ id: z.ZodUUID;
425
+ subject: z.ZodString;
426
+ description: z.ZodString;
427
+ type: z.ZodEnum<{
428
+ general: "general";
429
+ bug: "bug";
430
+ feature: "feature";
431
+ }>;
432
+ urgency: z.ZodEnum<{
433
+ normal: "normal";
434
+ emergency: "emergency";
435
+ }>;
436
+ status: z.ZodEnum<{
437
+ received: "received";
438
+ in_progress: "in_progress";
439
+ discussion_required: "discussion_required";
440
+ completed: "completed";
441
+ no_action: "no_action";
442
+ withdrawn: "withdrawn";
443
+ }>;
444
+ createdAt: z.ZodISODateTime;
445
+ updatedAt: z.ZodISODateTime;
446
+ reporterEmail: z.ZodNullable<z.ZodString>;
447
+ canReply: z.ZodBoolean;
448
+ messages: z.ZodArray<z.ZodObject<{
449
+ id: z.ZodString;
450
+ author: z.ZodObject<{
451
+ role: z.ZodEnum<{
452
+ operator: "operator";
453
+ reporter: "reporter";
454
+ }>;
455
+ name: z.ZodString;
456
+ }, z.core.$strip>;
457
+ body: z.ZodString;
458
+ createdAt: z.ZodISODateTime;
459
+ editedAt: z.ZodNullable<z.ZodISODateTime>;
460
+ createdAt_epoch_milliseconds: z.ZodInt;
461
+ editedAt_epoch_milliseconds: z.ZodNullable<z.ZodInt>;
462
+ }, z.core.$strip>>;
463
+ attachments: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
464
+ id: z.ZodString;
465
+ name: z.ZodString;
466
+ size: z.ZodInt;
467
+ url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
468
+ }, z.core.$strip>>>>;
469
+ createdAt_epoch_milliseconds: z.ZodInt;
470
+ updatedAt_epoch_milliseconds: z.ZodInt;
471
+ }, z.core.$strip>;
335
472
  export declare const zListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetPath: z.ZodObject<{
336
473
  project_id: z.ZodString;
337
474
  environment: z.ZodString;
@@ -394,6 +531,7 @@ export declare const zCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFe
394
531
  just_me: "just_me";
395
532
  my_team: "my_team";
396
533
  }>>>;
534
+ pageUrl: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
397
535
  }, z.core.$strict>;
398
536
  export declare const zCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostHeaders: z.ZodObject<{
399
537
  'Idempotency-Key': z.ZodUUID;
@@ -475,6 +613,191 @@ export declare const zCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFe
475
613
  url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
476
614
  }, z.core.$strip>>>>;
477
615
  }, z.core.$strip>;
616
+ export declare const zListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetPath: z.ZodObject<{
617
+ project_id: z.ZodString;
618
+ environment: z.ZodString;
619
+ }, z.core.$strip>;
620
+ /**
621
+ * Successful Response
622
+ */
623
+ export declare const zListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetResponse: z.ZodObject<{
624
+ items: z.ZodArray<z.ZodObject<{
625
+ id: z.ZodUUID;
626
+ subject: z.ZodString;
627
+ description: z.ZodString;
628
+ type: z.ZodEnum<{
629
+ general: "general";
630
+ bug: "bug";
631
+ feature: "feature";
632
+ }>;
633
+ urgency: z.ZodEnum<{
634
+ normal: "normal";
635
+ emergency: "emergency";
636
+ }>;
637
+ status: z.ZodEnum<{
638
+ received: "received";
639
+ in_progress: "in_progress";
640
+ discussion_required: "discussion_required";
641
+ completed: "completed";
642
+ no_action: "no_action";
643
+ withdrawn: "withdrawn";
644
+ }>;
645
+ createdAt: z.ZodISODateTime;
646
+ updatedAt: z.ZodISODateTime;
647
+ reporterEmail: z.ZodNullable<z.ZodString>;
648
+ createdAt_epoch_milliseconds: z.ZodInt;
649
+ updatedAt_epoch_milliseconds: z.ZodInt;
650
+ }, z.core.$strip>>;
651
+ }, z.core.$strip>;
652
+ export declare const zGetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetPath: z.ZodObject<{
653
+ feedback_id: z.ZodUUID;
654
+ project_id: z.ZodString;
655
+ environment: z.ZodString;
656
+ }, z.core.$strip>;
657
+ /**
658
+ * Successful Response
659
+ */
660
+ export declare const zGetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetResponse: z.ZodObject<{
661
+ id: z.ZodUUID;
662
+ subject: z.ZodString;
663
+ description: z.ZodString;
664
+ type: z.ZodEnum<{
665
+ general: "general";
666
+ bug: "bug";
667
+ feature: "feature";
668
+ }>;
669
+ urgency: z.ZodEnum<{
670
+ normal: "normal";
671
+ emergency: "emergency";
672
+ }>;
673
+ status: z.ZodEnum<{
674
+ received: "received";
675
+ in_progress: "in_progress";
676
+ discussion_required: "discussion_required";
677
+ completed: "completed";
678
+ no_action: "no_action";
679
+ withdrawn: "withdrawn";
680
+ }>;
681
+ createdAt: z.ZodISODateTime;
682
+ updatedAt: z.ZodISODateTime;
683
+ reporterEmail: z.ZodNullable<z.ZodString>;
684
+ canReply: z.ZodBoolean;
685
+ messages: z.ZodArray<z.ZodObject<{
686
+ id: z.ZodString;
687
+ author: z.ZodObject<{
688
+ role: z.ZodEnum<{
689
+ operator: "operator";
690
+ reporter: "reporter";
691
+ }>;
692
+ name: z.ZodString;
693
+ }, z.core.$strip>;
694
+ body: z.ZodString;
695
+ createdAt: z.ZodISODateTime;
696
+ editedAt: z.ZodNullable<z.ZodISODateTime>;
697
+ createdAt_epoch_milliseconds: z.ZodInt;
698
+ editedAt_epoch_milliseconds: z.ZodNullable<z.ZodInt>;
699
+ }, z.core.$strip>>;
700
+ attachments: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
701
+ id: z.ZodString;
702
+ name: z.ZodString;
703
+ size: z.ZodInt;
704
+ url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
705
+ }, z.core.$strip>>>>;
706
+ createdAt_epoch_milliseconds: z.ZodInt;
707
+ updatedAt_epoch_milliseconds: z.ZodInt;
708
+ }, z.core.$strip>;
709
+ export declare const zUpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchBody: z.ZodObject<{
710
+ status: z.ZodEnum<{
711
+ received: "received";
712
+ in_progress: "in_progress";
713
+ discussion_required: "discussion_required";
714
+ completed: "completed";
715
+ no_action: "no_action";
716
+ }>;
717
+ }, z.core.$strip>;
718
+ export declare const zUpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchPath: z.ZodObject<{
719
+ feedback_id: z.ZodUUID;
720
+ project_id: z.ZodString;
721
+ environment: z.ZodString;
722
+ }, z.core.$strip>;
723
+ /**
724
+ * Successful Response
725
+ */
726
+ export declare const zUpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchResponse: z.ZodObject<{
727
+ id: z.ZodUUID;
728
+ subject: z.ZodString;
729
+ description: z.ZodString;
730
+ type: z.ZodEnum<{
731
+ general: "general";
732
+ bug: "bug";
733
+ feature: "feature";
734
+ }>;
735
+ urgency: z.ZodEnum<{
736
+ normal: "normal";
737
+ emergency: "emergency";
738
+ }>;
739
+ status: z.ZodEnum<{
740
+ received: "received";
741
+ in_progress: "in_progress";
742
+ discussion_required: "discussion_required";
743
+ completed: "completed";
744
+ no_action: "no_action";
745
+ withdrawn: "withdrawn";
746
+ }>;
747
+ createdAt: z.ZodISODateTime;
748
+ updatedAt: z.ZodISODateTime;
749
+ reporterEmail: z.ZodNullable<z.ZodString>;
750
+ canReply: z.ZodBoolean;
751
+ messages: z.ZodArray<z.ZodObject<{
752
+ id: z.ZodString;
753
+ author: z.ZodObject<{
754
+ role: z.ZodEnum<{
755
+ operator: "operator";
756
+ reporter: "reporter";
757
+ }>;
758
+ name: z.ZodString;
759
+ }, z.core.$strip>;
760
+ body: z.ZodString;
761
+ createdAt: z.ZodISODateTime;
762
+ editedAt: z.ZodNullable<z.ZodISODateTime>;
763
+ createdAt_epoch_milliseconds: z.ZodInt;
764
+ editedAt_epoch_milliseconds: z.ZodNullable<z.ZodInt>;
765
+ }, z.core.$strip>>;
766
+ attachments: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
767
+ id: z.ZodString;
768
+ name: z.ZodString;
769
+ size: z.ZodInt;
770
+ url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
771
+ }, z.core.$strip>>>>;
772
+ createdAt_epoch_milliseconds: z.ZodInt;
773
+ updatedAt_epoch_milliseconds: z.ZodInt;
774
+ }, z.core.$strip>;
775
+ export declare const zCreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostBody: z.ZodObject<{
776
+ body: z.ZodString;
777
+ }, z.core.$strict>;
778
+ export declare const zCreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostPath: z.ZodObject<{
779
+ feedback_id: z.ZodUUID;
780
+ project_id: z.ZodString;
781
+ environment: z.ZodString;
782
+ }, z.core.$strip>;
783
+ /**
784
+ * Successful Response
785
+ */
786
+ export declare const zCreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostResponse: z.ZodObject<{
787
+ id: z.ZodString;
788
+ author: z.ZodObject<{
789
+ role: z.ZodEnum<{
790
+ operator: "operator";
791
+ reporter: "reporter";
792
+ }>;
793
+ name: z.ZodString;
794
+ }, z.core.$strip>;
795
+ body: z.ZodString;
796
+ createdAt: z.ZodISODateTime;
797
+ editedAt: z.ZodNullable<z.ZodISODateTime>;
798
+ createdAt_epoch_milliseconds: z.ZodInt;
799
+ editedAt_epoch_milliseconds: z.ZodNullable<z.ZodInt>;
800
+ }, z.core.$strip>;
478
801
  export declare const zGetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetPath: z.ZodObject<{
479
802
  feedback_id: z.ZodUUID;
480
803
  project_id: z.ZodString;
@@ -26,17 +26,23 @@ export const zFeedbackCreateRequest = z.object({
26
26
  'just_me',
27
27
  'my_team',
28
28
  'unknown'
29
- ]).optional().default('unknown')
29
+ ]).optional().default('unknown'),
30
+ pageUrl: z.url().min(1).max(2083).nullish()
30
31
  }).strict();
31
32
  /**
32
- * FeedbackUpdateRequest
33
+ * OperatorFeedbackStatusUpdateRequest
33
34
  *
34
- * Editable reporter fields while feedback awaits triage.
35
+ * Administrator-selected feedback workflow status.
35
36
  */
36
- export const zFeedbackUpdateRequest = z.object({
37
- subject: z.string().min(1).max(120).nullish(),
38
- description: z.string().min(1).max(10000).nullish()
39
- }).strict();
37
+ export const zOperatorFeedbackStatusUpdateRequest = z.object({
38
+ status: z.enum([
39
+ 'received',
40
+ 'in_progress',
41
+ 'discussion_required',
42
+ 'completed',
43
+ 'no_action'
44
+ ])
45
+ });
40
46
  /**
41
47
  * FeedbackMessageCreateRequest
42
48
  *
@@ -45,6 +51,15 @@ export const zFeedbackUpdateRequest = z.object({
45
51
  export const zFeedbackMessageCreateRequest = z.object({
46
52
  body: z.string().min(1).max(10000)
47
53
  }).strict();
54
+ /**
55
+ * FeedbackUpdateRequest
56
+ *
57
+ * Editable reporter fields while feedback awaits triage.
58
+ */
59
+ export const zFeedbackUpdateRequest = z.object({
60
+ subject: z.string().min(1).max(120).nullish(),
61
+ description: z.string().min(1).max(10000).nullish()
62
+ }).strict();
48
63
  /**
49
64
  * HTTPErrorResponse
50
65
  *
@@ -169,6 +184,43 @@ export const zFeedbackSummary = z.object({
169
184
  export const zFeedbackListResponse = z.object({
170
185
  items: z.array(zFeedbackSummary)
171
186
  });
187
+ /**
188
+ * OperatorFeedbackSummary
189
+ *
190
+ * One operator-visible summary with epoch-millisecond times.
191
+ */
192
+ export const zOperatorFeedbackSummary = z.object({
193
+ id: z.uuid(),
194
+ subject: z.string(),
195
+ description: z.string(),
196
+ type: z.enum([
197
+ 'bug',
198
+ 'feature',
199
+ 'general'
200
+ ]),
201
+ urgency: z.enum(['normal', 'emergency']),
202
+ status: z.enum([
203
+ 'received',
204
+ 'in_progress',
205
+ 'discussion_required',
206
+ 'completed',
207
+ 'no_action',
208
+ 'withdrawn'
209
+ ]),
210
+ createdAt: z.iso.datetime(),
211
+ updatedAt: z.iso.datetime(),
212
+ reporterEmail: z.string().nullable(),
213
+ createdAt_epoch_milliseconds: z.int().min(-9223372036854775808, { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(9223372036854775807, { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),
214
+ updatedAt_epoch_milliseconds: z.int().min(-9223372036854775808, { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(9223372036854775807, { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })
215
+ });
216
+ /**
217
+ * OperatorFeedbackListResponse
218
+ *
219
+ * All feedback in the request's environment scope.
220
+ */
221
+ export const zOperatorFeedbackListResponse = z.object({
222
+ items: z.array(zOperatorFeedbackSummary)
223
+ });
172
224
  /**
173
225
  * FeedbackMessageAuthor
174
226
  *
@@ -232,6 +284,40 @@ export const zFeedbackItem = z.object({
232
284
  messages: z.array(zFeedbackMessage),
233
285
  attachments: z.array(zFeedbackAttachment).optional().default([])
234
286
  });
287
+ /**
288
+ * OperatorFeedbackItem
289
+ *
290
+ * Operator detail with epoch-millisecond times on the item and messages.
291
+ *
292
+ * Messages share ``FeedbackMessage`` so OpenAPI keeps one message schema.
293
+ */
294
+ export const zOperatorFeedbackItem = z.object({
295
+ id: z.uuid(),
296
+ subject: z.string(),
297
+ description: z.string(),
298
+ type: z.enum([
299
+ 'bug',
300
+ 'feature',
301
+ 'general'
302
+ ]),
303
+ urgency: z.enum(['normal', 'emergency']),
304
+ status: z.enum([
305
+ 'received',
306
+ 'in_progress',
307
+ 'discussion_required',
308
+ 'completed',
309
+ 'no_action',
310
+ 'withdrawn'
311
+ ]),
312
+ createdAt: z.iso.datetime(),
313
+ updatedAt: z.iso.datetime(),
314
+ reporterEmail: z.string().nullable(),
315
+ canReply: z.boolean(),
316
+ messages: z.array(zFeedbackMessage),
317
+ attachments: z.array(zFeedbackAttachment).optional().default([]),
318
+ createdAt_epoch_milliseconds: z.int().min(-9223372036854775808, { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(9223372036854775807, { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' }),
319
+ updatedAt_epoch_milliseconds: z.int().min(-9223372036854775808, { error: 'Invalid value: Expected int64 to be >= -9223372036854775808' }).max(9223372036854775807, { error: 'Invalid value: Expected int64 to be <= 9223372036854775807' })
320
+ });
235
321
  export const zListFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackGetPath = z.object({
236
322
  project_id: z.string().min(1).max(64),
237
323
  environment: z.string()
@@ -253,6 +339,43 @@ export const zCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPo
253
339
  * Successful Response
254
340
  */
255
341
  export const zCreateFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackPostResponse = zFeedbackItem;
342
+ export const zListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetPath = z.object({
343
+ project_id: z.string().min(1).max(64),
344
+ environment: z.string()
345
+ });
346
+ /**
347
+ * Successful Response
348
+ */
349
+ export const zListOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorGetResponse = zOperatorFeedbackListResponse;
350
+ export const zGetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetPath = z.object({
351
+ feedback_id: z.uuid(),
352
+ project_id: z.string().min(1).max(64),
353
+ environment: z.string()
354
+ });
355
+ /**
356
+ * Successful Response
357
+ */
358
+ export const zGetOperatorFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdGetResponse = zOperatorFeedbackItem;
359
+ export const zUpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchBody = zOperatorFeedbackStatusUpdateRequest;
360
+ export const zUpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchPath = z.object({
361
+ feedback_id: z.uuid(),
362
+ project_id: z.string().min(1).max(64),
363
+ environment: z.string()
364
+ });
365
+ /**
366
+ * Successful Response
367
+ */
368
+ export const zUpdateOperatorFeedbackStatusV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdPatchResponse = zOperatorFeedbackItem;
369
+ export const zCreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostBody = zFeedbackMessageCreateRequest;
370
+ export const zCreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostPath = z.object({
371
+ feedback_id: z.uuid(),
372
+ project_id: z.string().min(1).max(64),
373
+ environment: z.string()
374
+ });
375
+ /**
376
+ * Successful Response
377
+ */
378
+ export const zCreateOperatorFeedbackMessageV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackOperatorFeedbackIdMessagesPostResponse = zFeedbackMessage;
256
379
  export const zGetFeedbackV1ProjectsProjectIdEnvironmentsEnvironmentFeedbackFeedbackIdGetPath = z.object({
257
380
  feedback_id: z.uuid(),
258
381
  project_id: z.string().min(1).max(64),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ciridae/ui",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -551,6 +551,7 @@
551
551
  "@tanstack/react-pacer": "0.24.1",
552
552
  "@tanstack/react-table": "9.2.4",
553
553
  "@tanstack/react-virtual": "3.14.23",
554
+ "@zumer/snapdom": "3.3.7",
554
555
  "cmdk": "1.1.1",
555
556
  "skullet": "0.0.3",
556
557
  "sonner": "2.0.8",