@webority/support-react 0.148.0 → 0.150.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.
Files changed (46) hide show
  1. package/README.md +0 -6
  2. package/dist/guidance.json +1 -1
  3. package/dist/support-react.js +1 -1
  4. package/dist/types/ReportIssue.d.ts +23 -24
  5. package/dist/types/ReportIssue.meta.d.ts +2 -54
  6. package/dist/types/SupportCenter.d.ts +17 -18
  7. package/dist/types/SupportCenter.meta.d.ts +2 -58
  8. package/dist/types/SupportContact.d.ts +4 -6
  9. package/dist/types/SupportContact.meta.d.ts +2 -25
  10. package/dist/types/SupportProvider.d.ts +16 -16
  11. package/dist/types/agent/SupportAgentProvider.d.ts +14 -12
  12. package/dist/types/agent/SupportAgentTicket.d.ts +6 -7
  13. package/dist/types/agent/SupportQueue.d.ts +18 -18
  14. package/dist/types/agent/SupportQueue.meta.d.ts +1 -1
  15. package/dist/types/agent/client.d.ts +213 -83
  16. package/dist/types/agent/context.d.ts +36 -65
  17. package/dist/types/agent/labels.d.ts +80 -79
  18. package/dist/types/client.d.ts +242 -167
  19. package/dist/types/components/AttachmentField.d.ts +5 -11
  20. package/dist/types/components/AttachmentThumb.d.ts +6 -12
  21. package/dist/types/components/MessageThread.d.ts +6 -13
  22. package/dist/types/components/NewTicketModal.d.ts +12 -16
  23. package/dist/types/components/RatingPanel.d.ts +13 -14
  24. package/dist/types/components/ReplyBox.d.ts +11 -11
  25. package/dist/types/components/SuggestedAnswers.d.ts +6 -9
  26. package/dist/types/components/SupportTime.d.ts +8 -10
  27. package/dist/types/components/TicketDetail.d.ts +11 -12
  28. package/dist/types/components/TicketForm.d.ts +31 -39
  29. package/dist/types/components/TicketList.d.ts +31 -25
  30. package/dist/types/context.d.ts +30 -49
  31. package/dist/types/helpCentre/HelpArticle.d.ts +11 -9
  32. package/dist/types/helpCentre/HelpArticle.meta.d.ts +2 -34
  33. package/dist/types/helpCentre/HelpCentre.d.ts +11 -9
  34. package/dist/types/helpCentre/HelpCentre.meta.d.ts +2 -33
  35. package/dist/types/helpCentre/client.d.ts +25 -59
  36. package/dist/types/helpCentre/labels.d.ts +19 -19
  37. package/dist/types/helpCentre/useHelpCentre.d.ts +8 -20
  38. package/dist/types/index.d.ts +18 -15
  39. package/dist/types/labels.d.ts +8 -8
  40. package/dist/types/lib/errors.d.ts +4 -4
  41. package/dist/types/lib/files.d.ts +43 -31
  42. package/dist/types/lib/status.d.ts +8 -3
  43. package/dist/types/lib/subject.d.ts +3 -3
  44. package/dist/types/lib/url.d.ts +4 -4
  45. package/dist/types/lib/useDebouncedValue.d.ts +3 -3
  46. package/package.json +9 -8
@@ -1,11 +1,9 @@
1
+ export interface SupportContactProps {
2
+ className?: string;
3
+ }
1
4
  /**
2
5
  * How to reach support on one line: the name, the email address with a copy button, the phone
3
6
  * number as a call link and the hours. A field the product has not set is left out; with none
4
7
  * set, only the heading renders.
5
- *
6
- * @param {object} props
7
- * @param {string} [props.className]
8
8
  */
9
- export default function SupportContact({ className }: {
10
- className?: string;
11
- }): import("react").JSX.Element | null;
9
+ export default function SupportContact({ className }: SupportContactProps): import("react").JSX.Element | null;
@@ -1,25 +1,2 @@
1
- export declare const meta: {
2
- readonly name: "SupportContact";
3
- readonly marker: null;
4
- readonly platforms: readonly ["web"];
5
- readonly acceptsChildren: false;
6
- readonly props: {
7
- readonly className: {
8
- readonly type: "string";
9
- readonly description: "Extra classes on the contact section.";
10
- };
11
- };
12
- readonly omit: readonly [];
13
- readonly examples: readonly [{
14
- readonly id: "SupportContact";
15
- readonly title: "Default";
16
- readonly props: {};
17
- }];
18
- readonly usage: {
19
- readonly when: readonly ["A page or footer shows how to reach support.", "It shows the email address with a copy button, the phone number as a call link and the opening hours on one line.", "A field the product has not set is left out, and nothing renders when none is set."];
20
- readonly whenNot: readonly [];
21
- readonly do: readonly [];
22
- readonly dont: readonly [];
23
- readonly a11y: readonly ["The section is labelled Contact followed by the support name, or Contact support when no name is set.", "The email address is a mailto link and the phone number a call link.", "The copy button for the email address is labelled Copy email."];
24
- };
25
- };
1
+ import { type ComponentMeta } from "@webority/canvas-kit/meta";
2
+ export declare const meta: ComponentMeta;
@@ -1,19 +1,19 @@
1
- /**
2
- * Makes a support client available to every support component and hook below it.
3
- *
4
- * @param {object} props
5
- * @param {import('./client.js').SupportClient} props.client From `createSupportClient(http)`.
6
- * @param {string} [props.timeZone="Asia/Kolkata"] IANA zone every ticket and message time is shown in.
7
- * @param {(iso: string) => import('react').ReactNode} [props.renderTime] Draws every ticket and message time instead of the built-in date and time. When set, the ticket's "Times are shown in" note is left out, because the product's own rendering decides the zone.
8
- * @param {Record<string, string>} [props.statusTones] Tone per ticket status for the status pills, over the built-in tones, for example { Open: 'success' }.
9
- * @param {Record<string, Record<string, string>>} [props.labels] Replaces any built-in English text. Keyed by scope (supportCenter, reportIssue, supportChat, supportContact, ticketList, ticketDetail, ticketForm, newTicketModal, replyBox, ratingPanel, messageThread, suggestedAnswers, attachmentThumb, chatStatusBar, chatTranscript, waitingNotice, chatSession, shared), then by key. Give only the keys you change.
10
- * @param {import('react').ReactNode} props.children
11
- */
12
- export default function SupportProvider({ client, timeZone, renderTime, statusTones, labels, children }: {
13
- client: import('./client.js').SupportClient;
1
+ import { type ReactNode } from "react";
2
+ import type { SupportClient } from "./client.ts";
3
+ export interface SupportProviderProps {
4
+ /** From `createSupportClient(http)`. */
5
+ client: SupportClient;
6
+ /** IANA zone every ticket and message time is shown in. */
14
7
  timeZone?: string;
15
- renderTime?: (iso: string) => import('react').ReactNode;
8
+ /** Draws every ticket and message time instead of the built-in date and time. When set, the ticket's "Times are shown in" note is left out, because the product's own rendering decides the zone. */
9
+ renderTime?: (iso: string) => ReactNode;
10
+ /** Tone per ticket status for the status pills, over the built-in tones, for example { Open: 'success' }. */
16
11
  statusTones?: Record<string, string>;
12
+ /** Replaces any built-in English text. Keyed by scope (supportCenter, reportIssue, supportChat, supportContact, ticketList, ticketDetail, ticketForm, newTicketModal, replyBox, ratingPanel, messageThread, suggestedAnswers, attachmentThumb, chatStatusBar, chatTranscript, waitingNotice, chatSession, shared), then by key. Give only the keys you change. */
17
13
  labels?: Record<string, Record<string, string>>;
18
- children: import('react').ReactNode;
19
- }): import("react").JSX.Element;
14
+ children: ReactNode;
15
+ }
16
+ /**
17
+ * Makes a support client available to every support component and hook below it.
18
+ */
19
+ export default function SupportProvider({ client, timeZone, renderTime, statusTones, labels, children, }: SupportProviderProps): ReactNode;
@@ -1,17 +1,19 @@
1
+ import { type ReactElement, type ReactNode } from "react";
2
+ import type { SupportAgentClient } from "./client.ts";
1
3
  /**
2
4
  * Makes an agent support client available to the agent queue, ticket and hooks below it.
3
- *
4
- * @param {object} props
5
- * @param {import('./client.js').SupportAgentClient} props.client From `createSupportAgentClient(http)`.
6
- * @param {string} [props.timeZone="Asia/Kolkata"] IANA zone every ticket and message time is shown in.
7
- * @param {(iso: string) => import('react').ReactNode} [props.renderTime] Draws every ticket and message time instead of the built-in date and time.
8
- * @param {Record<string, Record<string, string>>} [props.labels] Replaces any built-in English text. Keyed by scope (supportQueue, agentTicket), then by key. Give only the keys you change.
9
- * @param {import('react').ReactNode} props.children
10
5
  */
11
- export default function SupportAgentProvider({ client, timeZone, renderTime, labels, children }: {
12
- client: import('./client.js').SupportAgentClient;
6
+ export interface SupportAgentProviderProps {
7
+ /** From `createSupportAgentClient(http)`. */
8
+ client: SupportAgentClient;
9
+ /** IANA zone every ticket and message time is shown in. Defaults to "Asia/Kolkata". */
13
10
  timeZone?: string;
14
- renderTime?: (iso: string) => import('react').ReactNode;
11
+ /** Draws every ticket and message time instead of the built-in date and time. */
12
+ renderTime?: (iso: string) => ReactNode;
13
+ /** Tone per ticket status for the status pills, over the built-in tones, for example { Open: 'success' }. */
14
+ statusTones?: Record<string, string>;
15
+ /** Replaces any built-in English text. Keyed by scope (supportQueue, agentTicket), then by key. Give only the keys you change. */
15
16
  labels?: Record<string, Record<string, string>>;
16
- children: import('react').ReactNode;
17
- }): import("react").JSX.Element;
17
+ children: ReactNode;
18
+ }
19
+ export default function SupportAgentProvider({ client, timeZone, renderTime, statusTones, labels, children, }: SupportAgentProviderProps): ReactElement;
@@ -1,15 +1,14 @@
1
+ import { type ReactElement } from "react";
1
2
  /**
2
3
  * One ticket for a support agent: its facts, the conversation with internal notes marked, a reply
3
4
  * or internal note, and the controls to change its status, priority, category and assignee.
4
5
  * Every write sends the ticket's current version; a 409 keeps the reply text and asks for a reload.
5
- *
6
- * @param {object} props
7
- * @param {string} props.ticketId
8
- * @param {() => void} props.onBack Return to the queue.
9
- * @param {Record<string, string>} [props.labels] Overrides the built-in English for this screen.
10
6
  */
11
- export default function SupportAgentTicket({ ticketId, onBack, labels }: {
7
+ export interface SupportAgentTicketProps {
12
8
  ticketId: string;
9
+ /** Return to the queue. */
13
10
  onBack: () => void;
11
+ /** Overrides the built-in English for this screen. */
14
12
  labels?: Record<string, string>;
15
- }): import("react").JSX.Element;
13
+ }
14
+ export default function SupportAgentTicket({ ticketId, onBack, labels }: SupportAgentTicketProps): ReactElement;
@@ -1,25 +1,25 @@
1
- /**
2
- * The support agent's queue: a counts strip, filters, search and one page of tickets. Every
3
- * filter, the search and the paging go to the server; this only shows what it is given. A plain
4
- * click on a ticket number opens it in place through `onOpenTicket`; a modified click keeps the
5
- * link's own behaviour, and `getTicketHref` gives each number a real address. With no
6
- * `getTicketHref` the number is a button that calls `onOpenTicket`; with neither it is plain text.
7
- *
8
- * @param {object} props
9
- * @param {(id: string) => void} [props.onOpenTicket]
10
- * @param {(id: string) => string} [props.getTicketHref]
11
- * @param {string} [props.status] The status filter's value, when the product drives it.
12
- * @param {(status: string) => void} [props.onStatusChange] Called with the status the agent picks.
13
- * @param {string} [props.defaultStatus="all"] The status to start on when `status` is not passed.
14
- * @param {string} [props.queue] The queue key to list; every queue when left out.
15
- * @param {number} [props.pageSize=10]
16
- */
17
- export default function SupportQueue({ onOpenTicket, getTicketHref, status: statusProp, onStatusChange, defaultStatus, queue, pageSize: initialPageSize, }: {
1
+ import { type ReactElement } from "react";
2
+ export interface SupportQueueProps {
3
+ /** Called with a ticket's id when a row opens it in place. Left out, the ticket number is a link only. */
18
4
  onOpenTicket?: (id: string) => void;
5
+ /** Called with a ticket's id and returns the address of its page, so each ticket number is a real link. */
19
6
  getTicketHref?: (id: string) => string;
7
+ /** The status filter's value, when the product drives it. */
20
8
  status?: string;
9
+ /** Called with the status the agent picks, for a product that drives the status filter. */
21
10
  onStatusChange?: (status: string) => void;
11
+ /** The status to start on when `status` is not passed. */
22
12
  defaultStatus?: string;
13
+ /** The queue key to list; every queue when left out. */
23
14
  queue?: string;
15
+ /** Tickets per page, 25 when left out. The server pages the list; the table never holds more than one page. */
24
16
  pageSize?: number;
25
- }): import("react").JSX.Element;
17
+ }
18
+ /**
19
+ * The support agent's queue: a counts strip, filters, search and one page of tickets. Every
20
+ * filter, the search and the paging go to the server; this only shows what it is given. A plain
21
+ * click on a ticket number opens it in place through `onOpenTicket`; a modified click keeps the
22
+ * link's own behaviour, and `getTicketHref` gives each number a real address. With no
23
+ * `getTicketHref` the number is a button that calls `onOpenTicket`; with neither it is plain text.
24
+ */
25
+ export default function SupportQueue({ onOpenTicket, getTicketHref, status: statusProp, onStatusChange, defaultStatus, queue, pageSize: initialPageSize, }: SupportQueueProps): ReactElement;
@@ -31,7 +31,7 @@ export declare const meta: {
31
31
  };
32
32
  readonly pageSize: {
33
33
  readonly type: "number";
34
- readonly default: 10;
34
+ readonly default: 25;
35
35
  readonly description: "Tickets per page. The server pages the list; the table never holds more than one page.";
36
36
  };
37
37
  };
@@ -1,11 +1,199 @@
1
- export type AgentTicketListQuery = {
2
- /**
3
- * Open, InProgress, WaitingOnCustomer, Resolved, Closed or Cancelled.
4
- */
1
+ import { type SupportHttp } from "../client.ts";
2
+ export declare const AGENT_TICKET_STATUSES: readonly ["Open", "InProgress", "WaitingOnCustomer", "Resolved", "Closed", "Cancelled"];
3
+ export type AgentTicketStatus = (typeof AGENT_TICKET_STATUSES)[number];
4
+ export declare const AGENT_TICKET_PRIORITIES: readonly ["Low", "Normal", "High", "Urgent"];
5
+ export type AgentTicketPriority = (typeof AGENT_TICKET_PRIORITIES)[number];
6
+ /** Whether a picked value is one of the ticket statuses the server accepts. */
7
+ export declare function isAgentTicketStatus(value: unknown): value is AgentTicketStatus;
8
+ /** Whether a picked value is one of the ticket priorities the server accepts. */
9
+ export declare function isAgentTicketPriority(value: unknown): value is AgentTicketPriority;
10
+ export type AgentFieldSource = "Default" | "Customer" | "Triage" | "Agent";
11
+ export type AgentScreenRecommendation = "Pass" | "Review" | "Block" | "Skip";
12
+ export type AgentSatisfaction = "Satisfied" | "Unsatisfied";
13
+ export type AgentMessageAuthorKind = "Customer" | "Agent" | "System" | "Assistant";
14
+ export type AgentMessageChannel = "Portal" | "Email" | "Chat" | "Team";
15
+ export type AgentAttachmentKind = "Screenshot" | "File";
16
+ export interface AgentAttachment {
17
+ id: string;
18
+ fileName: string;
19
+ contentType: string;
20
+ sizeBytes: number;
21
+ kind: AgentAttachmentKind;
22
+ }
23
+ export interface AgentMessage {
24
+ id: string;
25
+ authorKind: AgentMessageAuthorKind;
26
+ authorName: string | null;
27
+ body: string;
28
+ isInternal: boolean;
29
+ channel: AgentMessageChannel | null;
30
+ createdDateTimeUtc: string;
31
+ attachments: readonly AgentAttachment[];
32
+ screenRecommendation?: AgentScreenRecommendation;
33
+ escalationJudgedDateTimeUtc?: string;
34
+ }
35
+ export interface AgentTicketLink {
36
+ id: string;
37
+ number: string;
38
+ subject: string;
39
+ }
40
+ export interface AgentTicket {
41
+ id: string;
42
+ number: string;
43
+ realm: string | null;
44
+ accountId: number | null;
45
+ category: string;
46
+ categorySource: AgentFieldSource | null;
47
+ subject: string;
48
+ status: AgentTicketStatus;
49
+ statusLabel: string;
50
+ priority: AgentTicketPriority | null;
51
+ prioritySource: AgentFieldSource | null;
52
+ reporterName: string;
53
+ reporterEmail: string | null;
54
+ assignedAgentUserId: number | null;
55
+ assignedAgentName: string | null;
56
+ replyDueDateTimeUtc: string | null;
57
+ isOverdue: boolean;
58
+ resolutionDueDateTimeUtc: string | null;
59
+ isResolutionOverdue: boolean;
60
+ pageUrl: string | null;
61
+ userAgent: string | null;
62
+ appVersion: string | null;
63
+ chatConversationReference: string | null;
64
+ satisfaction: AgentSatisfaction | null;
65
+ satisfactionComment: string | null;
66
+ canReopen: boolean;
67
+ canRate: boolean;
68
+ canCancel: boolean;
69
+ createdDateTimeUtc: string;
70
+ updatedDateTimeUtc: string;
71
+ resolvedDateTimeUtc: string | null;
72
+ closedDateTimeUtc: string | null;
73
+ messages: readonly AgentMessage[];
74
+ /** The stamp an agent's next write sends back. */
75
+ version: string | null;
76
+ subjectKind: string | null;
77
+ subjectReference: string | null;
78
+ subjectScreenRecommendation?: AgentScreenRecommendation;
79
+ serviceLevel?: string;
80
+ dueClockPausedDateTimeUtc?: string;
81
+ queue: string | null;
82
+ escalatedDateTimeUtc?: string;
83
+ mergedInto?: AgentTicketLink;
84
+ mergedTickets?: readonly AgentTicketLink[];
85
+ raisedDateTimeUtc?: string;
86
+ accountName?: string;
87
+ reporterPlace?: string;
88
+ }
89
+ export interface AgentTicketQueueItem {
90
+ id: string;
91
+ number: string;
92
+ realm: string;
93
+ accountId: number;
94
+ accountName: string | null;
95
+ reporterName: string;
96
+ reporterEmail: string | null;
97
+ category: string;
98
+ subject: string;
99
+ status: AgentTicketStatus;
100
+ statusLabel: string;
101
+ priority: AgentTicketPriority;
102
+ priorityLabel: string;
103
+ assignedAgentName: string | null;
104
+ replyDueDateTimeUtc: string | null;
105
+ isOverdue: boolean;
106
+ resolutionDueDateTimeUtc: string | null;
107
+ isResolutionOverdue: boolean;
108
+ awaitingAgent: boolean;
109
+ createdDateTimeUtc: string;
110
+ updatedDateTimeUtc: string;
111
+ subjectScreenRecommendation?: AgentScreenRecommendation;
112
+ descriptionScreenRecommendation?: AgentScreenRecommendation;
113
+ accountUrl?: string;
114
+ serviceLevel: string;
115
+ dueClockPausedDateTimeUtc?: string;
116
+ assignedAgentUserId: number | null;
117
+ }
118
+ export interface AgentPage<T> {
119
+ items: T[];
120
+ page: number;
121
+ pageSize: number;
122
+ totalCount: number;
123
+ totalPages: number;
124
+ }
125
+ export type AgentTicketPage = AgentPage<AgentTicketQueueItem>;
126
+ export interface AgentQueueCounts {
127
+ open: number;
128
+ inProgress: number;
129
+ waitingOnCustomer: number;
130
+ resolved: number;
131
+ closed: number;
132
+ unassigned: number;
133
+ overdue: number;
134
+ awaitingAgent: number;
135
+ }
136
+ export interface AgentUser {
137
+ userId: number;
138
+ name: string;
139
+ email: string | null;
140
+ queues: readonly string[] | null;
141
+ }
142
+ export interface AgentLabelledValue {
143
+ value: string;
144
+ label: string;
145
+ }
146
+ export interface AgentQueueView {
147
+ key: string;
148
+ label: string;
149
+ ticketNumberPrefix: string;
150
+ categories: readonly string[];
151
+ }
152
+ export interface AgentSavedReply {
153
+ title: string;
154
+ body: string;
155
+ }
156
+ export interface AgentSettings {
157
+ queues: readonly AgentQueueView[];
158
+ priorities: readonly AgentLabelledValue[];
159
+ statuses: readonly AgentLabelledValue[];
160
+ savedReplies: readonly AgentSavedReply[];
161
+ realmLabels: Readonly<Record<string, string>>;
162
+ maxAttachmentBytes: number;
163
+ maxAttachmentsPerMessage: number;
164
+ allowedContentTypes: string[];
165
+ bodyMaxLength: number;
166
+ }
167
+ export interface AgentReplyInput {
168
+ version: string;
169
+ body: string;
170
+ isInternal?: boolean;
171
+ files?: Blob[];
172
+ }
173
+ export interface AgentStatusChange {
174
+ version: string;
175
+ status: AgentTicketStatus;
176
+ }
177
+ export interface AgentPriorityChange {
178
+ version: string;
179
+ priority: AgentTicketPriority;
180
+ }
181
+ export interface AgentCategoryChange {
182
+ version: string;
183
+ category: string;
184
+ }
185
+ export interface AgentAssignment {
186
+ version: string;
187
+ agentUserId: number | null;
188
+ }
189
+ /**
190
+ * Every key the list endpoint accepts is passed through as given;
191
+ * a key left undefined, null or blank is left out.
192
+ */
193
+ export interface AgentTicketListQuery {
194
+ /** Open, InProgress, WaitingOnCustomer, Resolved, Closed or Cancelled. */
5
195
  status?: string;
6
- /**
7
- * Low, Normal, High or Urgent.
8
- */
196
+ /** Low, Normal, High or Urgent. */
9
197
  priority?: string;
10
198
  category?: string;
11
199
  realm?: string;
@@ -14,93 +202,35 @@ export type AgentTicketListQuery = {
14
202
  overdueOnly?: boolean;
15
203
  unsettledOnly?: boolean;
16
204
  awaitingAgentOnly?: boolean;
17
- /**
18
- * With no status, also lists the resolved, closed and cancelled tickets.
19
- */
205
+ /** With no status, also lists the resolved, closed and cancelled tickets. */
20
206
  includeSettled?: boolean;
21
207
  queue?: string;
22
208
  search?: string;
23
- /**
24
- * Newest, Oldest, RecentlyUpdated or LeastRecentlyUpdated.
25
- */
209
+ /** Newest, Oldest, RecentlyUpdated or LeastRecentlyUpdated. */
26
210
  order?: string;
27
211
  page?: number;
28
212
  pageSize?: number;
29
- };
30
- export type SupportAgentClient = {
31
- getSettings: () => Promise<any>;
32
- listTickets: (query?: AgentTicketListQuery) => Promise<any>;
33
- countTickets: () => Promise<any>;
34
- getTicket: (id: string) => Promise<any>;
35
- reply: (id: string, input: {
36
- version: string;
37
- body: string;
38
- isInternal?: boolean;
39
- files?: Blob[];
40
- }) => Promise<any>;
41
- changeStatus: (id: string, input: {
42
- version: string;
43
- status: string;
44
- }) => Promise<any>;
45
- changePriority: (id: string, input: {
46
- version: string;
47
- priority: string;
48
- }) => Promise<any>;
49
- changeCategory: (id: string, input: {
50
- version: string;
51
- category: string;
52
- }) => Promise<any>;
53
- assign: (id: string, input: {
54
- version: string;
55
- agentUserId: number | null;
56
- }) => Promise<any>;
57
- listAgents: () => Promise<any>;
58
- listRealms: () => Promise<any>;
213
+ }
214
+ export interface SupportAgentClient {
215
+ getSettings: () => Promise<AgentSettings>;
216
+ listTickets: (query?: AgentTicketListQuery) => Promise<AgentTicketPage>;
217
+ countTickets: () => Promise<AgentQueueCounts>;
218
+ getTicket: (id: string) => Promise<AgentTicket>;
219
+ reply: (id: string, input: AgentReplyInput) => Promise<AgentTicket>;
220
+ changeStatus: (id: string, input: AgentStatusChange) => Promise<AgentTicket>;
221
+ changePriority: (id: string, input: AgentPriorityChange) => Promise<AgentTicket>;
222
+ changeCategory: (id: string, input: AgentCategoryChange) => Promise<AgentTicket>;
223
+ assign: (id: string, input: AgentAssignment) => Promise<AgentTicket>;
224
+ listAgents: () => Promise<readonly AgentUser[]>;
225
+ listRealms: () => Promise<readonly string[]>;
59
226
  attachmentUrl: (id: string, attachmentId: string) => string;
60
227
  openAttachment: (id: string, attachmentId: string) => Promise<void>;
61
- };
62
- /**
63
- * @typedef {object} AgentTicketListQuery Every key the list endpoint accepts is passed through as given;
64
- * a key left undefined, null or blank is left out.
65
- * @property {string} [status] Open, InProgress, WaitingOnCustomer, Resolved, Closed or Cancelled.
66
- * @property {string} [priority] Low, Normal, High or Urgent.
67
- * @property {string} [category]
68
- * @property {string} [realm]
69
- * @property {number|string} [assignedAgentUserId]
70
- * @property {boolean} [unassignedOnly]
71
- * @property {boolean} [overdueOnly]
72
- * @property {boolean} [unsettledOnly]
73
- * @property {boolean} [awaitingAgentOnly]
74
- * @property {boolean} [includeSettled] With no status, also lists the resolved, closed and cancelled tickets.
75
- * @property {string} [queue]
76
- * @property {string} [search]
77
- * @property {string} [order] Newest, Oldest, RecentlyUpdated or LeastRecentlyUpdated.
78
- * @property {number} [page]
79
- * @property {number} [pageSize]
80
- */
81
- /**
82
- * @typedef {object} SupportAgentClient
83
- * @property {() => Promise<any>} getSettings
84
- * @property {(query?: AgentTicketListQuery) => Promise<any>} listTickets
85
- * @property {() => Promise<any>} countTickets
86
- * @property {(id: string) => Promise<any>} getTicket
87
- * @property {(id: string, input: { version: string, body: string, isInternal?: boolean, files?: Blob[] }) => Promise<any>} reply
88
- * @property {(id: string, input: { version: string, status: string }) => Promise<any>} changeStatus
89
- * @property {(id: string, input: { version: string, priority: string }) => Promise<any>} changePriority
90
- * @property {(id: string, input: { version: string, category: string }) => Promise<any>} changeCategory
91
- * @property {(id: string, input: { version: string, agentUserId: number | null }) => Promise<any>} assign
92
- * @property {() => Promise<any>} listAgents
93
- * @property {() => Promise<any>} listRealms
94
- * @property {(id: string, attachmentId: string) => string} attachmentUrl
95
- * @property {(id: string, attachmentId: string) => Promise<void>} openAttachment
96
- */
228
+ }
97
229
  /**
98
230
  * Binds the agent side of the support HTTP contract to the product's authenticated client.
99
231
  *
100
- * @param {import('../client.js').SupportHttp} http The product's axios-like instance (bearer token and refresh already wired).
101
- * @param {{ basePath?: string }} [options]
102
- * @returns {SupportAgentClient}
232
+ * The `http` argument is the product's axios-like instance (bearer token and refresh already wired).
103
233
  */
104
- export declare function createSupportAgentClient(http: import('../client.js').SupportHttp, { basePath }?: {
234
+ export declare function createSupportAgentClient(http: SupportHttp, { basePath }?: {
105
235
  basePath?: string;
106
236
  }): SupportAgentClient;