@qoretechnologies/reqraft 0.10.13-pr.74.gccefa54 → 0.10.13
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/.claude/CLAUDE.md +8 -11
- package/dist/components/form/engine/FormEngine.d.ts +1 -1
- package/dist/helpers/common.d.ts +0 -5
- package/dist/helpers/common.d.ts.map +1 -1
- package/dist/helpers/common.js +1 -20
- package/dist/helpers/common.js.map +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -7
- package/dist/index.js.map +1 -1
- package/dist/providers/StorageProvider.d.ts +13 -0
- package/dist/providers/StorageProvider.d.ts.map +1 -1
- package/dist/providers/StorageProvider.js +29 -5
- package/dist/providers/StorageProvider.js.map +1 -1
- package/package.json +3 -3
- package/src/helpers/common.ts +0 -19
- package/src/hooks/useStorage/useStorage.stories.tsx +52 -0
- package/src/index.tsx +0 -5
- package/src/providers/StorageProvider.tsx +30 -4
- package/dist/components/composer/Composer.d.ts +0 -108
- package/dist/components/composer/Composer.d.ts.map +0 -1
- package/dist/components/composer/Composer.js +0 -238
- package/dist/components/composer/Composer.js.map +0 -1
- package/dist/components/composer/helpers.d.ts +0 -21
- package/dist/components/composer/helpers.d.ts.map +0 -1
- package/dist/components/composer/helpers.js +0 -75
- package/dist/components/composer/helpers.js.map +0 -1
- package/dist/components/composer/index.d.ts +0 -3
- package/dist/components/composer/index.d.ts.map +0 -1
- package/dist/components/composer/index.js +0 -19
- package/dist/components/composer/index.js.map +0 -1
- package/dist/components/imageLightbox/ImageLightbox.d.ts +0 -17
- package/dist/components/imageLightbox/ImageLightbox.d.ts.map +0 -1
- package/dist/components/imageLightbox/ImageLightbox.js +0 -129
- package/dist/components/imageLightbox/ImageLightbox.js.map +0 -1
- package/dist/components/imageLightbox/index.d.ts +0 -2
- package/dist/components/imageLightbox/index.d.ts.map +0 -1
- package/dist/components/imageLightbox/index.js +0 -18
- package/dist/components/imageLightbox/index.js.map +0 -1
- package/dist/components/supportTicket/AttachmentChips.d.ts +0 -10
- package/dist/components/supportTicket/AttachmentChips.d.ts.map +0 -1
- package/dist/components/supportTicket/AttachmentChips.js +0 -119
- package/dist/components/supportTicket/AttachmentChips.js.map +0 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts +0 -35
- package/dist/components/supportTicket/InterfaceReferenceTags.d.ts.map +0 -1
- package/dist/components/supportTicket/InterfaceReferenceTags.js +0 -31
- package/dist/components/supportTicket/InterfaceReferenceTags.js.map +0 -1
- package/dist/components/supportTicket/ReferencePicker.d.ts +0 -41
- package/dist/components/supportTicket/ReferencePicker.d.ts.map +0 -1
- package/dist/components/supportTicket/ReferencePicker.js +0 -86
- package/dist/components/supportTicket/ReferencePicker.js.map +0 -1
- package/dist/components/supportTicket/TicketHeader.d.ts +0 -86
- package/dist/components/supportTicket/TicketHeader.d.ts.map +0 -1
- package/dist/components/supportTicket/TicketHeader.js +0 -149
- package/dist/components/supportTicket/TicketHeader.js.map +0 -1
- package/dist/components/supportTicket/TicketMetaTags.d.ts +0 -32
- package/dist/components/supportTicket/TicketMetaTags.d.ts.map +0 -1
- package/dist/components/supportTicket/TicketMetaTags.js +0 -21
- package/dist/components/supportTicket/TicketMetaTags.js.map +0 -1
- package/dist/components/supportTicket/TicketReplyBox.d.ts +0 -63
- package/dist/components/supportTicket/TicketReplyBox.d.ts.map +0 -1
- package/dist/components/supportTicket/TicketReplyBox.js +0 -115
- package/dist/components/supportTicket/TicketReplyBox.js.map +0 -1
- package/dist/components/supportTicket/fileToAttachment.d.ts +0 -9
- package/dist/components/supportTicket/fileToAttachment.d.ts.map +0 -1
- package/dist/components/supportTicket/fileToAttachment.js +0 -28
- package/dist/components/supportTicket/fileToAttachment.js.map +0 -1
- package/dist/components/supportTicket/index.d.ts +0 -9
- package/dist/components/supportTicket/index.d.ts.map +0 -1
- package/dist/components/supportTicket/index.js +0 -25
- package/dist/components/supportTicket/index.js.map +0 -1
- package/dist/components/supportTicket/meta.d.ts +0 -63
- package/dist/components/supportTicket/meta.d.ts.map +0 -1
- package/dist/components/supportTicket/meta.js +0 -79
- package/dist/components/supportTicket/meta.js.map +0 -1
- package/dist/components/ticketReferences/TicketReferences.d.ts +0 -52
- package/dist/components/ticketReferences/TicketReferences.d.ts.map +0 -1
- package/dist/components/ticketReferences/TicketReferences.js +0 -453
- package/dist/components/ticketReferences/TicketReferences.js.map +0 -1
- package/dist/components/ticketReferences/index.d.ts +0 -3
- package/dist/components/ticketReferences/index.d.ts.map +0 -1
- package/dist/components/ticketReferences/index.js +0 -6
- package/dist/components/ticketReferences/index.js.map +0 -1
- package/dist/components/ticketThread/TicketThread.d.ts +0 -52
- package/dist/components/ticketThread/TicketThread.d.ts.map +0 -1
- package/dist/components/ticketThread/TicketThread.js +0 -248
- package/dist/components/ticketThread/TicketThread.js.map +0 -1
- package/dist/components/ticketThread/index.d.ts +0 -3
- package/dist/components/ticketThread/index.d.ts.map +0 -1
- package/dist/components/ticketThread/index.js +0 -7
- package/dist/components/ticketThread/index.js.map +0 -1
- package/dist/helpers/scrollbar.d.ts +0 -2
- package/dist/helpers/scrollbar.d.ts.map +0 -1
- package/dist/helpers/scrollbar.js +0 -25
- package/dist/helpers/scrollbar.js.map +0 -1
- package/src/components/composer/Composer.stories.tsx +0 -238
- package/src/components/composer/Composer.tsx +0 -545
- package/src/components/composer/helpers.ts +0 -74
- package/src/components/composer/index.ts +0 -2
- package/src/components/imageLightbox/ImageLightbox.stories.tsx +0 -156
- package/src/components/imageLightbox/ImageLightbox.tsx +0 -169
- package/src/components/imageLightbox/index.ts +0 -1
- package/src/components/supportTicket/AttachmentChips.stories.tsx +0 -122
- package/src/components/supportTicket/AttachmentChips.tsx +0 -142
- package/src/components/supportTicket/InterfaceReferenceTags.stories.tsx +0 -134
- package/src/components/supportTicket/InterfaceReferenceTags.tsx +0 -85
- package/src/components/supportTicket/ReferencePicker.stories.tsx +0 -296
- package/src/components/supportTicket/ReferencePicker.tsx +0 -237
- package/src/components/supportTicket/TicketConversation.stories.tsx +0 -122
- package/src/components/supportTicket/TicketHeader.stories.tsx +0 -183
- package/src/components/supportTicket/TicketHeader.tsx +0 -247
- package/src/components/supportTicket/TicketMetaTags.stories.tsx +0 -103
- package/src/components/supportTicket/TicketMetaTags.tsx +0 -85
- package/src/components/supportTicket/TicketReplyBox.stories.tsx +0 -355
- package/src/components/supportTicket/TicketReplyBox.tsx +0 -146
- package/src/components/supportTicket/fileToAttachment.ts +0 -24
- package/src/components/supportTicket/index.ts +0 -8
- package/src/components/supportTicket/meta.ts +0 -145
- package/src/components/ticketReferences/TicketReferences.stories.tsx +0 -301
- package/src/components/ticketReferences/TicketReferences.tsx +0 -899
- package/src/components/ticketReferences/index.ts +0 -2
- package/src/components/ticketThread/TicketThread.stories.tsx +0 -751
- package/src/components/ticketThread/TicketThread.tsx +0 -650
- package/src/components/ticketThread/index.ts +0 -6
- package/src/helpers/scrollbar.ts +0 -32
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { TReqoreIntent } from '@qoretechnologies/reqore/dist/constants/theme';
|
|
2
|
-
import { IReqoreIconName } from '@qoretechnologies/reqore/dist/types/icons';
|
|
3
|
-
export type TTicketStatus = 'new' | 'open' | 'awaiting_customer' | 'resolved' | 'closed';
|
|
4
|
-
export type TTicketPriority = 'low' | 'normal' | 'high' | 'urgent';
|
|
5
|
-
export type TTicketCategory = 'bug' | 'question' | 'billing' | 'feature' | 'other';
|
|
6
|
-
export type TTicketAuditAction = 'replied' | 'noted' | 'status_changed' | 'assigned' | 'updated';
|
|
7
|
-
/** A message author. Staff identities are masked from the customer by the backend. */
|
|
8
|
-
export type TTicketMessageAuthor = 'customer' | 'staff' | 'system';
|
|
9
|
-
/** Which side "you" sit on — decides self-alignment and audience-specific labels. */
|
|
10
|
-
export type TTicketViewerRole = 'customer' | 'staff';
|
|
11
|
-
export interface ITicketEnumMeta {
|
|
12
|
-
label: string;
|
|
13
|
-
intent: TReqoreIntent;
|
|
14
|
-
icon: IReqoreIconName;
|
|
15
|
-
/** Audience-specific label for the customer view; falls back to `label` (the
|
|
16
|
-
* staff / neutral wording). Only a few values differ by audience. */
|
|
17
|
-
customerLabel?: string;
|
|
18
|
-
}
|
|
19
|
-
export declare const TICKET_STATUS_META: Record<TTicketStatus, ITicketEnumMeta>;
|
|
20
|
-
export declare const TICKET_PRIORITY_META: Record<TTicketPriority, ITicketEnumMeta>;
|
|
21
|
-
export declare const TICKET_CATEGORY_META: Record<TTicketCategory, ITicketEnumMeta>;
|
|
22
|
-
/** Staff-only audit trail vocabulary (used by the admin-portal staff surface).
|
|
23
|
-
* These are exactly the actions the backend writes (qorus-api
|
|
24
|
-
* `QorusSaasTicketStore::insertAudit`): a public reply, an internal note, a
|
|
25
|
-
* status change, an assignment, or `updated` (a priority/category change). */
|
|
26
|
-
export declare const TICKET_AUDIT_ACTION_META: Record<TTicketAuditAction, ITicketEnumMeta>;
|
|
27
|
-
/** The status label for a given viewer — the customer sees "Awaiting your reply"
|
|
28
|
-
* where staff see "Awaiting customer"; all other values are audience-neutral. */
|
|
29
|
-
export declare const ticketStatusLabel: (status: TTicketStatus, viewerRole?: TTicketViewerRole) => string;
|
|
30
|
-
/** A reply may be sent while a ticket is in any state except `closed`. */
|
|
31
|
-
export declare const REPLYABLE_STATUSES: TTicketStatus[];
|
|
32
|
-
/** Whether a ticket can still be replied to (closed ⇒ no). */
|
|
33
|
-
export declare const isTicketReplyable: (status: TTicketStatus) => boolean;
|
|
34
|
-
/** A file to upload with a ticket or reply — raw bytes as base64, inline on the
|
|
35
|
-
* create/reply payload (the SaaS plane has no separate multipart upload). */
|
|
36
|
-
export interface IAttachmentUpload {
|
|
37
|
-
filename: string;
|
|
38
|
-
content_type: string;
|
|
39
|
-
/** base64-encoded file content */
|
|
40
|
-
content: string;
|
|
41
|
-
}
|
|
42
|
-
/** A reference to a Qorus interface on the subscriber's instance, stored as a
|
|
43
|
-
* `{kind, name}` snapshot (the interface itself lives on the instance, not the
|
|
44
|
-
* SaaS plane). Attaches to a ticket (at creation) or a message (in a reply). */
|
|
45
|
-
export interface IInterfaceReference {
|
|
46
|
-
/** interface type: workflow / service / job / fsm / qog / connection / ... */
|
|
47
|
-
interface_kind: string;
|
|
48
|
-
/** interface name (may include a version) */
|
|
49
|
-
interface_name: string;
|
|
50
|
-
/** server-assigned reference UUID (present on read, absent when submitting) */
|
|
51
|
-
reference_id?: string;
|
|
52
|
-
/** For an app-triggered interface (a qog): the triggering app's name. A viewer
|
|
53
|
-
* with the app catalogue (the customer's IDE) resolves it to the app's logo the
|
|
54
|
-
* same way the qogs list does — see `resolveInterfaceImage` on the tags. */
|
|
55
|
-
trigger_app?: string;
|
|
56
|
-
/** A pre-resolved logo/image (data-URI or URL) for the chip, e.g. the trigger
|
|
57
|
-
* app's logo. Travels with the reference so a viewer without the app catalogue
|
|
58
|
-
* (staff triage, the Qonsole card) still shows it. */
|
|
59
|
-
logo?: string;
|
|
60
|
-
}
|
|
61
|
-
/** Default per-kind icon for a referenced interface, with a generic fallback. */
|
|
62
|
-
export declare const defaultInterfaceIcon: (kind: string) => IReqoreIconName;
|
|
63
|
-
//# sourceMappingURL=meta.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/components/supportTicket/meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAW5E,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,mBAAmB,GAAG,UAAU,GAAG,QAAQ,CAAC;AACzF,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AACnE,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AACnF,MAAM,M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MAAM,CAAC;IACvB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;iFAE6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;2DAEuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAsBD,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,SAAU,MAAM,KAAG,eACJ,CAAC"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.defaultInterfaceIcon = exports.isTicketReplyable = exports.REPLYABLE_STATUSES = exports.ticketStatusLabel = exports.TICKET_AUDIT_ACTION_META = exports.TICKET_CATEGORY_META = exports.TICKET_PRIORITY_META = exports.TICKET_STATUS_META = void 0;
|
|
4
|
-
exports.TICKET_STATUS_META = {
|
|
5
|
-
new: { label: 'New', intent: 'info', icon: 'SparklingLine' },
|
|
6
|
-
open: { label: 'Open', intent: 'pending', icon: 'Chat3Line' },
|
|
7
|
-
awaiting_customer: {
|
|
8
|
-
label: 'Awaiting customer',
|
|
9
|
-
customerLabel: 'Awaiting your reply',
|
|
10
|
-
intent: 'warning',
|
|
11
|
-
icon: 'UserReceivedLine',
|
|
12
|
-
},
|
|
13
|
-
resolved: { label: 'Resolved', intent: 'success', icon: 'CheckLine' },
|
|
14
|
-
closed: { label: 'Closed', intent: 'muted', icon: 'CloseCircleLine' },
|
|
15
|
-
};
|
|
16
|
-
exports.TICKET_PRIORITY_META = {
|
|
17
|
-
low: { label: 'Low', intent: 'muted', icon: 'ArrowDownLine' },
|
|
18
|
-
normal: { label: 'Normal', intent: 'info', icon: 'SubtractLine' },
|
|
19
|
-
high: { label: 'High', intent: 'warning', icon: 'ArrowUpLine' },
|
|
20
|
-
urgent: { label: 'Urgent', intent: 'danger', icon: 'AlarmWarningLine' },
|
|
21
|
-
};
|
|
22
|
-
exports.TICKET_CATEGORY_META = {
|
|
23
|
-
bug: { label: 'Bug', intent: 'danger', icon: 'BugLine' },
|
|
24
|
-
question: { label: 'Question', intent: 'info', icon: 'QuestionLine' },
|
|
25
|
-
billing: { label: 'Billing', intent: 'warning', icon: 'BankCardLine' },
|
|
26
|
-
feature: { label: 'Feature request', intent: 'success', icon: 'LightbulbLine' },
|
|
27
|
-
other: { label: 'Other', intent: 'muted', icon: 'MoreLine' },
|
|
28
|
-
};
|
|
29
|
-
/** Staff-only audit trail vocabulary (used by the admin-portal staff surface).
|
|
30
|
-
* These are exactly the actions the backend writes (qorus-api
|
|
31
|
-
* `QorusSaasTicketStore::insertAudit`): a public reply, an internal note, a
|
|
32
|
-
* status change, an assignment, or `updated` (a priority/category change). */
|
|
33
|
-
exports.TICKET_AUDIT_ACTION_META = {
|
|
34
|
-
replied: { label: 'Replied', intent: 'success', icon: 'ReplyLine' },
|
|
35
|
-
noted: { label: 'Internal note', intent: 'info', icon: 'StickyNoteLine' },
|
|
36
|
-
status_changed: { label: 'Status changed', intent: 'warning', icon: 'ExchangeLine' },
|
|
37
|
-
assigned: { label: 'Assigned', intent: 'pending', icon: 'UserFollowLine' },
|
|
38
|
-
updated: { label: 'Updated', intent: 'muted', icon: 'Edit2Line' },
|
|
39
|
-
};
|
|
40
|
-
/** The status label for a given viewer — the customer sees "Awaiting your reply"
|
|
41
|
-
* where staff see "Awaiting customer"; all other values are audience-neutral. */
|
|
42
|
-
var ticketStatusLabel = function (status, viewerRole) {
|
|
43
|
-
var meta = exports.TICKET_STATUS_META[status];
|
|
44
|
-
return viewerRole === 'customer' && meta.customerLabel ? meta.customerLabel : meta.label;
|
|
45
|
-
};
|
|
46
|
-
exports.ticketStatusLabel = ticketStatusLabel;
|
|
47
|
-
/** A reply may be sent while a ticket is in any state except `closed`. */
|
|
48
|
-
exports.REPLYABLE_STATUSES = [
|
|
49
|
-
'new',
|
|
50
|
-
'open',
|
|
51
|
-
'awaiting_customer',
|
|
52
|
-
'resolved',
|
|
53
|
-
];
|
|
54
|
-
/** Whether a ticket can still be replied to (closed ⇒ no). */
|
|
55
|
-
var isTicketReplyable = function (status) { return status !== 'closed'; };
|
|
56
|
-
exports.isTicketReplyable = isTicketReplyable;
|
|
57
|
-
// Built-in per-kind icons for referenced interfaces, kept in step with the
|
|
58
|
-
// qorus-ide interface vocabulary. Used when a consumer doesn't pass its own
|
|
59
|
-
// `resolveInterfaceIcon`, so the staff view and the Qonsole renderer show the
|
|
60
|
-
// same chips as the customer view without each re-declaring the mapping.
|
|
61
|
-
var DEFAULT_INTERFACE_ICONS = {
|
|
62
|
-
workflow: 'GitBranchLine',
|
|
63
|
-
service: 'ServerLine',
|
|
64
|
-
job: 'CalendarLine',
|
|
65
|
-
fsm: 'DashboardLine',
|
|
66
|
-
// qog fallback glyph (used only when there's no trigger-app logo to show)
|
|
67
|
-
qog: 'FlowChart',
|
|
68
|
-
connection: 'Plug2Line',
|
|
69
|
-
mapper: 'MindMap',
|
|
70
|
-
class: 'CodeSLine',
|
|
71
|
-
'value-map': 'BringToFront',
|
|
72
|
-
'ai-collection': 'FileMarkedLine',
|
|
73
|
-
'ai-endpoint': 'RobotLine',
|
|
74
|
-
'ai-guardrail': 'ShieldLine',
|
|
75
|
-
};
|
|
76
|
-
/** Default per-kind icon for a referenced interface, with a generic fallback. */
|
|
77
|
-
var defaultInterfaceIcon = function (kind) { var _a; return (_a = DEFAULT_INTERFACE_ICONS[kind]) !== null && _a !== void 0 ? _a : 'CodeBoxLine'; };
|
|
78
|
-
exports.defaultInterfaceIcon = defaultInterfaceIcon;
|
|
79
|
-
//# sourceMappingURL=meta.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../../src/components/supportTicket/meta.ts"],"names":[],"mappings":";;;AAgCa,QAAA,kBAAkB,GAA2C;IACxE,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE;IAC5D,IAAI,EAAE,EAAE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A2D;AA+BzF,2EAA2E;AAC3E,4EAA4E;AAC5E,8EAA8E;AAC9E,yEAAyE;AACzE,IAAM,uBAAuB,GAAoC;IAC/D,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE,YAAY;IACrB,GAAG,EAAE,cAAc;IACnB,GAAG,EAAE,eAAe;IACpB,0EAA0E;IAC1E,GAAG,EAAE,WAAW;IAChB,UAAU,EAAE,WAAW;IACvB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,cAAc;IAC3B,eAAe,EAAE,gBAAgB;IACjC,aAAa,EAAE,WAAW;IAC1B,cAAc,EAAE,YAAY;CAC7B,CAAC;AAEF,iFAAiF;AAC1E,IAAM,oBAAoB,GAAG,UAAC,IAAY,YAC/C,OAAA,MAAA,uBAAuB,CAAC,IAAI,CAAC,mCAAI,aAAa,CAAA,EAAA,CAAC;AADpC,QAAA,oBAAoB,wBACgB"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { IReqoreIconName } from '@qoretechnologies/reqore/dist/types/icons';
|
|
2
|
-
import { IInterfaceReference, TTicketViewerRole } from '../supportTicket/meta';
|
|
3
|
-
import type { ITicketThreadAttachment, ITicketThreadMessage } from '../ticketThread/TicketThread';
|
|
4
|
-
/** Attachment metadata as returned by the list endpoint — carries the provenance
|
|
5
|
-
* (uploader + timestamp + source message) the message-embedded metadata omits. */
|
|
6
|
-
export interface ITicketReferenceAttachment extends ITicketThreadAttachment {
|
|
7
|
-
/** the reply this file was attached to; null/absent = ticket-level */
|
|
8
|
-
message_id?: string | null;
|
|
9
|
-
/** the uploader, resolved + masked like the thread's message author (a staff
|
|
10
|
-
* uploader reads as "Qorus Support" on the customer plane, never the raw identity) */
|
|
11
|
-
uploaded_by?: string;
|
|
12
|
-
/** the kind of party that uploaded the file — lets the viewer label it */
|
|
13
|
-
uploader_type?: 'customer' | 'staff';
|
|
14
|
-
/** ISO timestamp the file was attached */
|
|
15
|
-
created?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ITicketReferencesProps {
|
|
18
|
-
/** ticket-level interface references (from `ticket.referenced_interfaces`) */
|
|
19
|
-
references?: IInterfaceReference[];
|
|
20
|
-
/** the thread — source of message-level references and, as a fallback, attachments */
|
|
21
|
-
messages?: ITicketThreadMessage[];
|
|
22
|
-
/** the ticket's attachments from the list endpoint; preferred over the message-embedded
|
|
23
|
-
* ones because it carries provenance and any ticket-level files. Falls back to `messages`. */
|
|
24
|
-
attachments?: ITicketReferenceAttachment[];
|
|
25
|
-
viewerRole?: TTicketViewerRole;
|
|
26
|
-
/** fetch an attachment's bytes as an object URL, for inline image preview + the lightbox.
|
|
27
|
-
* Omitted ⇒ screenshots show as download tiles instead of thumbnails. */
|
|
28
|
-
fetchAttachmentUrl?: (attachmentId: string) => Promise<string>;
|
|
29
|
-
/** trigger a browser download of an attachment */
|
|
30
|
-
onDownloadAttachment?: (attachmentId: string, filename: string) => void;
|
|
31
|
-
/** open a referenced interface; reference chips are static (informational) when omitted */
|
|
32
|
-
onInterfaceClick?: (reference: IInterfaceReference) => void;
|
|
33
|
-
/** Reveal the message a reference or file came from, in the conversation.
|
|
34
|
-
* Omitted ⇒ the action is not offered. It is also omitted per-row for anything filed
|
|
35
|
-
* against the ticket itself rather than a reply, which has no message to reveal. */
|
|
36
|
-
onShowInChat?: (messageId: string) => void;
|
|
37
|
-
/** resolve a per-kind icon for a referenced interface (the IDE passes its own vocabulary) */
|
|
38
|
-
resolveInterfaceIcon?: (kind: string) => IReqoreIconName;
|
|
39
|
-
loading?: boolean;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* A reference plus where it was cited.
|
|
43
|
-
*
|
|
44
|
-
* `message_id` is absent for a ticket-level reference — those are filed against the
|
|
45
|
-
* ticket itself (`message_id IS NULL` server-side), so there is no message to reveal
|
|
46
|
-
* and "show in chat" must not be offered for them.
|
|
47
|
-
*/
|
|
48
|
-
export interface IResolvedInterfaceReference extends IInterfaceReference {
|
|
49
|
-
message_id?: string;
|
|
50
|
-
}
|
|
51
|
-
export declare const TicketReferences: ({ references, messages, attachments, viewerRole, fetchAttachmentUrl, onDownloadAttachment, onInterfaceClick, onShowInChat, resolveInterfaceIcon, loading, }: ITicketReferencesProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
//# sourceMappingURL=TicketReferences.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TicketReferences.d.ts","sourceRoot":"","sources":["../../../src/components/ticketReferences/TicketReferences.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAS5E,OAAO,EAEL,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAelG;mFACmF;AACnF,MAAM,WAAW,0BAA2B,SAAQ,uBAAuB;IACzE,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;2FACuF;IACvF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACrC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,8EAA8E;IAC9E,UAAU,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACnC,sFAAsF;IACtF,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAClC;mGAC+F;IAC/F,WAAW,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAC3C,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B;8EAC0E;IAC1E,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/D,kDAAkD;IAClD,oBAAoB,CAAC,EAAE,CAAC,YAAY,E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