@superdurable/connector-freshdesk 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +30 -2
- package/dex-connector.json +449 -0
- package/dist/chunk-SSAMOXWJ.js +359 -0
- package/dist/connection-Lx6ZBW6r.d.ts +487 -0
- package/dist/index.d.ts +526 -0
- package/dist/index.js +1279 -0
- package/dist/mock.d.ts +145 -0
- package/dist/mock.js +350 -0
- package/package.json +62 -4
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import { SecretString, CredentialProvider, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/** Connector configuration; omitted fields use manifest defaults. */
|
|
5
|
+
interface Config {
|
|
6
|
+
/** Non-secret Freshdesk helpdesk domain: the acme in https://acme.freshdesk.com. Sign in at https://login.freshworks.com/email-login/, open your helpdesk, and copy the part before .freshdesk.com from the browser address bar. Enter lowercase letters, digits, and hyphens only, without https:// or .freshdesk.com; a custom support domain such as support.example.com does not work, because Freshdesk serves its API only on freshdesk.com domains. Required: every API request is sent to this helpdesk. */
|
|
7
|
+
domain: string;
|
|
8
|
+
/** Maximum complete Freshdesk API response in bytes. Leave blank to keep the displayed safety limit; enter a positive integer only to change it, for example when ticket descriptions or notes are unusually large. An oversized response selects invalidResponse, or uncertain for a write. */
|
|
9
|
+
maxResponseBytes?: number;
|
|
10
|
+
/** Delay between ticketChanged Trigger polls of Freshdesk's ticket list, as a Go duration of at least 10s such as 30s or 2m. Leave blank to keep the displayed interval. Each poll normally makes one List All Tickets request, which counts against the account's per-minute API limit and its lower Tickets List sublimit (40 per minute on the Growth plan); lower it only when changes must arrive sooner, and raise it when other apps share the helpdesk's API limit. Runtime value in milliseconds. */
|
|
11
|
+
pollIntervalMs?: number;
|
|
12
|
+
}
|
|
13
|
+
/** Runtime schema for manifest configuration. */
|
|
14
|
+
declare const ConfigSchema: z.ZodObject<{
|
|
15
|
+
domain: z.ZodString;
|
|
16
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
pollIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
/** Private connector credentials resolved by the host. */
|
|
20
|
+
interface Credentials {
|
|
21
|
+
/** Secret Freshdesk API key of the agent the connector acts as. Sign in at https://{domain}.freshdesk.com, select your profile picture at the top right, choose Profile Settings, then View API key, and complete the captcha, as https://support.freshdesk.com/support/solutions/articles/215517 describes. It is an opaque string of letters and digits; Freshdesk's API documentation uses abcdefghij1234567890 as an example. The connector sends it over HTTP Basic as the user name with X as the password. Stored only in this credential field; after resetting the key in Freshdesk, paste the new key here. */
|
|
22
|
+
apiKey: SecretString;
|
|
23
|
+
}
|
|
24
|
+
/** Decode private credential fields for the connector. */
|
|
25
|
+
declare function decodeCredentials(value: unknown): Credentials;
|
|
26
|
+
/** Host-owned source of private connector credentials. */
|
|
27
|
+
type CredentialSource = CredentialProvider<Credentials>;
|
|
28
|
+
/** SearchTicketsInput selects tickets with typed filters that the connector turns into one
|
|
29
|
+
* Freshdesk filter query. Different filters narrow each other; several statuses, priorities,
|
|
30
|
+
* or tags match any of them. At least one of Statuses, Priorities, Tags, or UpdatedSinceDate is
|
|
31
|
+
* required, because Freshdesk's filter query needs a condition and has no requester field. */
|
|
32
|
+
interface SearchTicketsInput {
|
|
33
|
+
/** Statuses matches tickets in any of these Freshdesk statuses, including custom ones. Empty matches every status. */
|
|
34
|
+
"statuses"?: Array<2 | 3 | 4 | 5 | 6 | 7 | (number & {})> | undefined;
|
|
35
|
+
/** Priorities matches tickets with any of these Freshdesk priorities. Empty matches every priority. */
|
|
36
|
+
"priorities"?: Array<1 | 2 | 3 | 4 | (number & {})> | undefined;
|
|
37
|
+
/** Tags matches tickets carrying any of these tags. */
|
|
38
|
+
"tags"?: Array<string> | undefined;
|
|
39
|
+
/** UpdatedSinceDate matches tickets updated on or after this UTC calendar date, written YYYY-MM-DD.
|
|
40
|
+
* Freshdesk's filter query compares dates, not instants. Blank applies no time filter. */
|
|
41
|
+
"updatedSinceDate"?: string | undefined;
|
|
42
|
+
/** RequesterEmail keeps only tickets requested by the contact with this email address, such as
|
|
43
|
+
* jane@example.com. The connector looks the contact up first and filters each page itself, so a
|
|
44
|
+
* page can hold fewer than SearchPageSize tickets, even none, while NextPage is set. Blank keeps
|
|
45
|
+
* every requester. */
|
|
46
|
+
"requesterEmail"?: string | undefined;
|
|
47
|
+
/** Page is 1 to MaxSearchPage; zero reads the first page. */
|
|
48
|
+
"page"?: number | undefined;
|
|
49
|
+
}
|
|
50
|
+
/** Ticket is the connector's view of one Freshdesk ticket. Custom fields, email addresses,
|
|
51
|
+
* attachments, and association details are omitted. Zero IDs mean Freshdesk reported null,
|
|
52
|
+
* such as an unassigned ticket. */
|
|
53
|
+
interface Ticket {
|
|
54
|
+
/** ID is the Freshdesk ticket ID. */
|
|
55
|
+
"id": number;
|
|
56
|
+
/** Subject is the ticket subject. */
|
|
57
|
+
"subject"?: string | undefined;
|
|
58
|
+
/** Description is the ticket's plain-text content. searchTickets leaves it empty to keep pages small. */
|
|
59
|
+
"description"?: string | undefined;
|
|
60
|
+
/** IsDescriptionTruncated reports that Description was cut at MaxTextBytes. */
|
|
61
|
+
"isDescriptionTruncated"?: boolean | undefined;
|
|
62
|
+
/** Status is Freshdesk's integer status. */
|
|
63
|
+
"status": 2 | 3 | 4 | 5 | 6 | 7 | (number & {});
|
|
64
|
+
/** Priority is Freshdesk's integer priority. */
|
|
65
|
+
"priority": 1 | 2 | 3 | 4 | (number & {});
|
|
66
|
+
/** Source is the channel that created the ticket. */
|
|
67
|
+
"source"?: 1 | 10 | 2 | 3 | 7 | 9 | (number & {}) | undefined;
|
|
68
|
+
/** Type is the account's ticket type label, such as Question or Problem, or empty for none. */
|
|
69
|
+
"type"?: string | undefined;
|
|
70
|
+
/** RequesterID is the contact who asked for support. */
|
|
71
|
+
"requesterId"?: number | undefined;
|
|
72
|
+
/** ResponderID is the assigned agent, Freshdesk's responder_id, or zero when unassigned. */
|
|
73
|
+
"responderId"?: number | undefined;
|
|
74
|
+
/** GroupID is the assigned group, or zero. */
|
|
75
|
+
"groupId"?: number | undefined;
|
|
76
|
+
/** CompanyID is the requester's company for this ticket, or zero. */
|
|
77
|
+
"companyId"?: number | undefined;
|
|
78
|
+
/** ProductID is the product the ticket belongs to, or zero. */
|
|
79
|
+
"productId"?: number | undefined;
|
|
80
|
+
/** Tags lists the ticket's tags. Freshdesk's search and list responses may omit them, so
|
|
81
|
+
* read the ticket with getTicket before relying on its tags. */
|
|
82
|
+
"tags"?: Array<string> | undefined;
|
|
83
|
+
/** IsEscalated reports that Freshdesk escalated the ticket for any reason. */
|
|
84
|
+
"isEscalated"?: boolean | undefined;
|
|
85
|
+
/** IsSpam reports that the ticket is marked as spam; Freshdesk rejects updates to it. */
|
|
86
|
+
"isSpam"?: boolean | undefined;
|
|
87
|
+
/** CreatedAt is when the ticket was created. */
|
|
88
|
+
"createdAt": string;
|
|
89
|
+
/** UpdatedAt is when the ticket last changed, at Freshdesk's one-second precision. */
|
|
90
|
+
"updatedAt": string;
|
|
91
|
+
/** DueBy is when the ticket is due to be resolved, or nil. */
|
|
92
|
+
"dueBy"?: string | null | undefined;
|
|
93
|
+
/** FirstResponseDueBy is when the first response is due, or nil. */
|
|
94
|
+
"firstResponseDueBy"?: string | null | undefined;
|
|
95
|
+
}
|
|
96
|
+
/** SearchTicketsOutput is one page of matching tickets. Freshdesk indexes new and changed tickets
|
|
97
|
+
* within a few minutes, so a page can omit a change made moments earlier. */
|
|
98
|
+
interface SearchTicketsOutput {
|
|
99
|
+
/** Tickets lists the matching tickets without their Description, and possibly without Tags. */
|
|
100
|
+
"tickets": Array<Ticket> | null;
|
|
101
|
+
/** TotalMatched is Freshdesk's count of tickets matching the filter query, before the
|
|
102
|
+
* RequesterEmail filter; Freshdesk serves only the first 300 of them. */
|
|
103
|
+
"totalMatched": number;
|
|
104
|
+
/** NextPage is the page to read next, or zero when this is the last page Freshdesk serves. */
|
|
105
|
+
"nextPage"?: number | undefined;
|
|
106
|
+
}
|
|
107
|
+
/** GetTicketInput names one ticket and how many of its first conversations to return. */
|
|
108
|
+
interface GetTicketInput {
|
|
109
|
+
/** TicketID is the Freshdesk ticket ID. */
|
|
110
|
+
"ticketId": number;
|
|
111
|
+
/** ConversationLimit is 1 to MaxConversationLimit; zero uses DefaultConversationLimit. */
|
|
112
|
+
"conversationLimit"?: number | undefined;
|
|
113
|
+
}
|
|
114
|
+
/** TicketRequester is the connector's view of the contact who requested a ticket. */
|
|
115
|
+
interface TicketRequester {
|
|
116
|
+
/** ID is the Freshdesk contact ID. */
|
|
117
|
+
"id": number;
|
|
118
|
+
/** Name is the contact's name. */
|
|
119
|
+
"name"?: string | undefined;
|
|
120
|
+
/** Email is the contact's primary email address, or empty when Freshdesk has none. */
|
|
121
|
+
"email"?: string | undefined;
|
|
122
|
+
}
|
|
123
|
+
/** TicketConversation is one reply or note on a ticket. */
|
|
124
|
+
interface TicketConversation {
|
|
125
|
+
/** ID is the Freshdesk conversation ID. */
|
|
126
|
+
"id": number;
|
|
127
|
+
/** TicketID is the ticket the conversation belongs to. */
|
|
128
|
+
"ticketId"?: number | undefined;
|
|
129
|
+
/** UserID is the agent or contact who added the conversation. */
|
|
130
|
+
"userId"?: number | undefined;
|
|
131
|
+
/** Source is the kind of conversation, such as ConversationSourceReply or ConversationSourceNote. */
|
|
132
|
+
"source": 0 | 2 | (number & {});
|
|
133
|
+
/** IsPrivate is true for a private note that only agents can see. */
|
|
134
|
+
"isPrivate": boolean;
|
|
135
|
+
/** IsIncoming is true for a conversation that appears as created from outside the portal,
|
|
136
|
+
* such as a requester's emailed reply. */
|
|
137
|
+
"isIncoming"?: boolean | undefined;
|
|
138
|
+
/** Body is the conversation as plain text. */
|
|
139
|
+
"body": string;
|
|
140
|
+
/** IsBodyTruncated reports that Body was cut at MaxTextBytes. */
|
|
141
|
+
"isBodyTruncated"?: boolean | undefined;
|
|
142
|
+
/** CreatedAt is when the conversation was added. */
|
|
143
|
+
"createdAt": string;
|
|
144
|
+
}
|
|
145
|
+
/** TicketDetails is one ticket with its requester and first conversations. */
|
|
146
|
+
interface TicketDetails {
|
|
147
|
+
/** Ticket is the ticket, including its plain-text description and tags. */
|
|
148
|
+
"ticket": Ticket;
|
|
149
|
+
/** Requester is the ticket's requester, or nil when Freshdesk did not embed one. */
|
|
150
|
+
"requester"?: TicketRequester | undefined;
|
|
151
|
+
/** Conversations lists the ticket's replies and notes oldest first, as Freshdesk orders them. */
|
|
152
|
+
"conversations": Array<TicketConversation> | null;
|
|
153
|
+
/** HasMoreConversations reports that the ticket has conversations after the last one returned. */
|
|
154
|
+
"hasMoreConversations"?: boolean | undefined;
|
|
155
|
+
}
|
|
156
|
+
/** TicketRequesterInput identifies the requester by email. Freshdesk uses the contact with that
|
|
157
|
+
* address or, when none exists, adds a contact named Name. */
|
|
158
|
+
interface TicketRequesterInput {
|
|
159
|
+
/** Email is one bare address such as jane@example.com. */
|
|
160
|
+
"email": string;
|
|
161
|
+
/** Name names a contact Freshdesk adds; blank lets Freshdesk derive one. */
|
|
162
|
+
"name"?: string | undefined;
|
|
163
|
+
}
|
|
164
|
+
/** CreateTicketInput is one new ticket. Zero values leave a field to Freshdesk's defaults, the
|
|
165
|
+
* account's ticket form, and its automations. */
|
|
166
|
+
interface CreateTicketInput {
|
|
167
|
+
/** Subject is the ticket subject. It is required. */
|
|
168
|
+
"subject": string;
|
|
169
|
+
/** Description is the ticket's plain-text content. It is required. The connector escapes it
|
|
170
|
+
* into Freshdesk's HTML description, so markup is shown literally and line breaks are kept. */
|
|
171
|
+
"description": string;
|
|
172
|
+
/** Requester is the customer asking for help. It is required. */
|
|
173
|
+
"requester": TicketRequesterInput;
|
|
174
|
+
/** Status is a Freshdesk status, or zero for Freshdesk's default, Open (2). */
|
|
175
|
+
"status"?: 2 | 3 | 4 | 5 | 6 | 7 | (number & {}) | undefined;
|
|
176
|
+
/** Priority is a Freshdesk priority, or zero for Freshdesk's default, Low (1). */
|
|
177
|
+
"priority"?: 1 | 2 | 3 | 4 | (number & {}) | undefined;
|
|
178
|
+
/** Type is one of the account's ticket type labels, such as Question, or empty for none. */
|
|
179
|
+
"type"?: string | undefined;
|
|
180
|
+
/** Tags are set on the new ticket; account automations may add more. */
|
|
181
|
+
"tags"?: Array<string> | undefined;
|
|
182
|
+
/** GroupID assigns the ticket to a group, or zero for Freshdesk's default routing. */
|
|
183
|
+
"groupId"?: number | undefined;
|
|
184
|
+
/** ResponderID assigns the ticket to an agent, Freshdesk's responder_id, or zero for none. */
|
|
185
|
+
"responderId"?: number | undefined;
|
|
186
|
+
}
|
|
187
|
+
/** CreateTicketOutput is the created ticket. */
|
|
188
|
+
interface CreateTicketOutput {
|
|
189
|
+
/** Ticket is the ticket Freshdesk created. */
|
|
190
|
+
"ticket": Ticket;
|
|
191
|
+
}
|
|
192
|
+
/** UpdateTicketInput is one change to an existing ticket. Zero and empty fields are left
|
|
193
|
+
* unchanged; this release cannot clear an agent or group. */
|
|
194
|
+
interface UpdateTicketInput {
|
|
195
|
+
/** TicketID is the Freshdesk ticket ID. */
|
|
196
|
+
"ticketId": number;
|
|
197
|
+
/** Status is the new Freshdesk status, including a custom one, or zero to keep it. */
|
|
198
|
+
"status"?: 2 | 3 | 4 | 5 | 6 | 7 | (number & {}) | undefined;
|
|
199
|
+
/** Priority is the new Freshdesk priority, or zero to keep it. */
|
|
200
|
+
"priority"?: 1 | 2 | 3 | 4 | (number & {}) | undefined;
|
|
201
|
+
/** GroupID assigns a group, or zero to keep the group. */
|
|
202
|
+
"groupId"?: number | undefined;
|
|
203
|
+
/** ResponderID assigns an agent, Freshdesk's responder_id, or zero to keep the agent. */
|
|
204
|
+
"responderId"?: number | undefined;
|
|
205
|
+
/** AddTags adds tags and keeps the ticket's other tags. A tag already present in any letter case is kept as is. */
|
|
206
|
+
"addTags"?: Array<string> | undefined;
|
|
207
|
+
/** RemoveTags removes tags in any letter case and keeps the ticket's other tags. */
|
|
208
|
+
"removeTags"?: Array<string> | undefined;
|
|
209
|
+
}
|
|
210
|
+
/** UpdateTicketOutput is the ticket after the change. */
|
|
211
|
+
interface UpdateTicketOutput {
|
|
212
|
+
/** Ticket is the ticket Freshdesk returned after the write, or as read when nothing needed writing. */
|
|
213
|
+
"ticket": Ticket;
|
|
214
|
+
/** WasAlreadyApplied reports that the ticket already held every requested value, for example
|
|
215
|
+
* because an earlier attempt of this Step wrote them, so this attempt wrote nothing. */
|
|
216
|
+
"wasAlreadyApplied"?: boolean | undefined;
|
|
217
|
+
}
|
|
218
|
+
/** AddNoteInput is one private note or one public reply to add to a ticket. */
|
|
219
|
+
interface AddNoteInput {
|
|
220
|
+
/** TicketID is the Freshdesk ticket ID. */
|
|
221
|
+
"ticketId": number;
|
|
222
|
+
/** Body is the plain-text note or reply. It is required. The connector escapes it into
|
|
223
|
+
* Freshdesk's HTML body, so markup is shown literally and line breaks are kept. */
|
|
224
|
+
"body": string;
|
|
225
|
+
/** IsPublicReply sends the body as a reply that Freshdesk emails to the requester, through
|
|
226
|
+
* POST /api/v2/tickets/{id}/reply. False adds a private note that only agents can see. */
|
|
227
|
+
"isPublicReply"?: boolean | undefined;
|
|
228
|
+
}
|
|
229
|
+
/** AddNoteOutput is the added note or reply. */
|
|
230
|
+
interface AddNoteOutput {
|
|
231
|
+
/** Conversation is the note or reply Freshdesk added. */
|
|
232
|
+
"conversation": TicketConversation;
|
|
233
|
+
}
|
|
234
|
+
/** Runtime validator for SearchTicketsInput. */
|
|
235
|
+
declare const SearchTicketsInputSchema: z.ZodObject<{
|
|
236
|
+
statuses: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
237
|
+
priorities: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
238
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
239
|
+
updatedSinceDate: z.ZodOptional<z.ZodString>;
|
|
240
|
+
requesterEmail: z.ZodOptional<z.ZodString>;
|
|
241
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
}, z.core.$strict>;
|
|
243
|
+
/** Runtime validator for Ticket. */
|
|
244
|
+
declare const TicketSchema: z.ZodObject<{
|
|
245
|
+
id: z.ZodNumber;
|
|
246
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
247
|
+
description: z.ZodOptional<z.ZodString>;
|
|
248
|
+
isDescriptionTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
249
|
+
status: z.ZodNumber;
|
|
250
|
+
priority: z.ZodNumber;
|
|
251
|
+
source: z.ZodOptional<z.ZodNumber>;
|
|
252
|
+
type: z.ZodOptional<z.ZodString>;
|
|
253
|
+
requesterId: z.ZodOptional<z.ZodNumber>;
|
|
254
|
+
responderId: z.ZodOptional<z.ZodNumber>;
|
|
255
|
+
groupId: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
companyId: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
productId: z.ZodOptional<z.ZodNumber>;
|
|
258
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
|
+
isEscalated: z.ZodOptional<z.ZodBoolean>;
|
|
260
|
+
isSpam: z.ZodOptional<z.ZodBoolean>;
|
|
261
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
262
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
263
|
+
dueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
264
|
+
firstResponseDueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
265
|
+
}, z.core.$strict>;
|
|
266
|
+
/** Runtime validator for SearchTicketsOutput. */
|
|
267
|
+
declare const SearchTicketsOutputSchema: z.ZodObject<{
|
|
268
|
+
tickets: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
269
|
+
id: z.ZodNumber;
|
|
270
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
271
|
+
description: z.ZodOptional<z.ZodString>;
|
|
272
|
+
isDescriptionTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
273
|
+
status: z.ZodNumber;
|
|
274
|
+
priority: z.ZodNumber;
|
|
275
|
+
source: z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
type: z.ZodOptional<z.ZodString>;
|
|
277
|
+
requesterId: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
responderId: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
groupId: z.ZodOptional<z.ZodNumber>;
|
|
280
|
+
companyId: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
productId: z.ZodOptional<z.ZodNumber>;
|
|
282
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
283
|
+
isEscalated: z.ZodOptional<z.ZodBoolean>;
|
|
284
|
+
isSpam: z.ZodOptional<z.ZodBoolean>;
|
|
285
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
286
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
287
|
+
dueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
288
|
+
firstResponseDueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
289
|
+
}, z.core.$strict>>>;
|
|
290
|
+
totalMatched: z.ZodNumber;
|
|
291
|
+
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
}, z.core.$strict>;
|
|
293
|
+
/** Runtime validator for GetTicketInput. */
|
|
294
|
+
declare const GetTicketInputSchema: z.ZodObject<{
|
|
295
|
+
ticketId: z.ZodNumber;
|
|
296
|
+
conversationLimit: z.ZodOptional<z.ZodNumber>;
|
|
297
|
+
}, z.core.$strict>;
|
|
298
|
+
/** Runtime validator for TicketRequester. */
|
|
299
|
+
declare const TicketRequesterSchema: z.ZodObject<{
|
|
300
|
+
id: z.ZodNumber;
|
|
301
|
+
name: z.ZodOptional<z.ZodString>;
|
|
302
|
+
email: z.ZodOptional<z.ZodString>;
|
|
303
|
+
}, z.core.$strict>;
|
|
304
|
+
/** Runtime validator for TicketConversation. */
|
|
305
|
+
declare const TicketConversationSchema: z.ZodObject<{
|
|
306
|
+
id: z.ZodNumber;
|
|
307
|
+
ticketId: z.ZodOptional<z.ZodNumber>;
|
|
308
|
+
userId: z.ZodOptional<z.ZodNumber>;
|
|
309
|
+
source: z.ZodNumber;
|
|
310
|
+
isPrivate: z.ZodBoolean;
|
|
311
|
+
isIncoming: z.ZodOptional<z.ZodBoolean>;
|
|
312
|
+
body: z.ZodString;
|
|
313
|
+
isBodyTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
314
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
315
|
+
}, z.core.$strict>;
|
|
316
|
+
/** Runtime validator for TicketDetails. */
|
|
317
|
+
declare const TicketDetailsSchema: z.ZodObject<{
|
|
318
|
+
ticket: z.ZodObject<{
|
|
319
|
+
id: z.ZodNumber;
|
|
320
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
321
|
+
description: z.ZodOptional<z.ZodString>;
|
|
322
|
+
isDescriptionTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
323
|
+
status: z.ZodNumber;
|
|
324
|
+
priority: z.ZodNumber;
|
|
325
|
+
source: z.ZodOptional<z.ZodNumber>;
|
|
326
|
+
type: z.ZodOptional<z.ZodString>;
|
|
327
|
+
requesterId: z.ZodOptional<z.ZodNumber>;
|
|
328
|
+
responderId: z.ZodOptional<z.ZodNumber>;
|
|
329
|
+
groupId: z.ZodOptional<z.ZodNumber>;
|
|
330
|
+
companyId: z.ZodOptional<z.ZodNumber>;
|
|
331
|
+
productId: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
333
|
+
isEscalated: z.ZodOptional<z.ZodBoolean>;
|
|
334
|
+
isSpam: z.ZodOptional<z.ZodBoolean>;
|
|
335
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
336
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
337
|
+
dueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
338
|
+
firstResponseDueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
339
|
+
}, z.core.$strict>;
|
|
340
|
+
requester: z.ZodOptional<z.ZodObject<{
|
|
341
|
+
id: z.ZodNumber;
|
|
342
|
+
name: z.ZodOptional<z.ZodString>;
|
|
343
|
+
email: z.ZodOptional<z.ZodString>;
|
|
344
|
+
}, z.core.$strict>>;
|
|
345
|
+
conversations: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
346
|
+
id: z.ZodNumber;
|
|
347
|
+
ticketId: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
userId: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
source: z.ZodNumber;
|
|
350
|
+
isPrivate: z.ZodBoolean;
|
|
351
|
+
isIncoming: z.ZodOptional<z.ZodBoolean>;
|
|
352
|
+
body: z.ZodString;
|
|
353
|
+
isBodyTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
354
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
355
|
+
}, z.core.$strict>>>;
|
|
356
|
+
hasMoreConversations: z.ZodOptional<z.ZodBoolean>;
|
|
357
|
+
}, z.core.$strict>;
|
|
358
|
+
/** Runtime validator for TicketRequesterInput. */
|
|
359
|
+
declare const TicketRequesterInputSchema: z.ZodObject<{
|
|
360
|
+
email: z.ZodString;
|
|
361
|
+
name: z.ZodOptional<z.ZodString>;
|
|
362
|
+
}, z.core.$strict>;
|
|
363
|
+
/** Runtime validator for CreateTicketInput. */
|
|
364
|
+
declare const CreateTicketInputSchema: z.ZodObject<{
|
|
365
|
+
subject: z.ZodString;
|
|
366
|
+
description: z.ZodString;
|
|
367
|
+
requester: z.ZodObject<{
|
|
368
|
+
email: z.ZodString;
|
|
369
|
+
name: z.ZodOptional<z.ZodString>;
|
|
370
|
+
}, z.core.$strict>;
|
|
371
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
372
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
373
|
+
type: z.ZodOptional<z.ZodString>;
|
|
374
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
375
|
+
groupId: z.ZodOptional<z.ZodNumber>;
|
|
376
|
+
responderId: z.ZodOptional<z.ZodNumber>;
|
|
377
|
+
}, z.core.$strict>;
|
|
378
|
+
/** Runtime validator for CreateTicketOutput. */
|
|
379
|
+
declare const CreateTicketOutputSchema: z.ZodObject<{
|
|
380
|
+
ticket: z.ZodObject<{
|
|
381
|
+
id: z.ZodNumber;
|
|
382
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
383
|
+
description: z.ZodOptional<z.ZodString>;
|
|
384
|
+
isDescriptionTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
385
|
+
status: z.ZodNumber;
|
|
386
|
+
priority: z.ZodNumber;
|
|
387
|
+
source: z.ZodOptional<z.ZodNumber>;
|
|
388
|
+
type: z.ZodOptional<z.ZodString>;
|
|
389
|
+
requesterId: z.ZodOptional<z.ZodNumber>;
|
|
390
|
+
responderId: z.ZodOptional<z.ZodNumber>;
|
|
391
|
+
groupId: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
companyId: z.ZodOptional<z.ZodNumber>;
|
|
393
|
+
productId: z.ZodOptional<z.ZodNumber>;
|
|
394
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
395
|
+
isEscalated: z.ZodOptional<z.ZodBoolean>;
|
|
396
|
+
isSpam: z.ZodOptional<z.ZodBoolean>;
|
|
397
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
398
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
399
|
+
dueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
400
|
+
firstResponseDueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
401
|
+
}, z.core.$strict>;
|
|
402
|
+
}, z.core.$strict>;
|
|
403
|
+
/** Runtime validator for UpdateTicketInput. */
|
|
404
|
+
declare const UpdateTicketInputSchema: z.ZodObject<{
|
|
405
|
+
ticketId: z.ZodNumber;
|
|
406
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
407
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
408
|
+
groupId: z.ZodOptional<z.ZodNumber>;
|
|
409
|
+
responderId: z.ZodOptional<z.ZodNumber>;
|
|
410
|
+
addTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
411
|
+
removeTags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
412
|
+
}, z.core.$strict>;
|
|
413
|
+
/** Runtime validator for UpdateTicketOutput. */
|
|
414
|
+
declare const UpdateTicketOutputSchema: z.ZodObject<{
|
|
415
|
+
ticket: z.ZodObject<{
|
|
416
|
+
id: z.ZodNumber;
|
|
417
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
418
|
+
description: z.ZodOptional<z.ZodString>;
|
|
419
|
+
isDescriptionTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
420
|
+
status: z.ZodNumber;
|
|
421
|
+
priority: z.ZodNumber;
|
|
422
|
+
source: z.ZodOptional<z.ZodNumber>;
|
|
423
|
+
type: z.ZodOptional<z.ZodString>;
|
|
424
|
+
requesterId: z.ZodOptional<z.ZodNumber>;
|
|
425
|
+
responderId: z.ZodOptional<z.ZodNumber>;
|
|
426
|
+
groupId: z.ZodOptional<z.ZodNumber>;
|
|
427
|
+
companyId: z.ZodOptional<z.ZodNumber>;
|
|
428
|
+
productId: z.ZodOptional<z.ZodNumber>;
|
|
429
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
430
|
+
isEscalated: z.ZodOptional<z.ZodBoolean>;
|
|
431
|
+
isSpam: z.ZodOptional<z.ZodBoolean>;
|
|
432
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
433
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
434
|
+
dueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
435
|
+
firstResponseDueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
436
|
+
}, z.core.$strict>;
|
|
437
|
+
wasAlreadyApplied: z.ZodOptional<z.ZodBoolean>;
|
|
438
|
+
}, z.core.$strict>;
|
|
439
|
+
/** Runtime validator for AddNoteInput. */
|
|
440
|
+
declare const AddNoteInputSchema: z.ZodObject<{
|
|
441
|
+
ticketId: z.ZodNumber;
|
|
442
|
+
body: z.ZodString;
|
|
443
|
+
isPublicReply: z.ZodOptional<z.ZodBoolean>;
|
|
444
|
+
}, z.core.$strict>;
|
|
445
|
+
/** Runtime validator for AddNoteOutput. */
|
|
446
|
+
declare const AddNoteOutputSchema: z.ZodObject<{
|
|
447
|
+
conversation: z.ZodObject<{
|
|
448
|
+
id: z.ZodNumber;
|
|
449
|
+
ticketId: z.ZodOptional<z.ZodNumber>;
|
|
450
|
+
userId: z.ZodOptional<z.ZodNumber>;
|
|
451
|
+
source: z.ZodNumber;
|
|
452
|
+
isPrivate: z.ZodBoolean;
|
|
453
|
+
isIncoming: z.ZodOptional<z.ZodBoolean>;
|
|
454
|
+
body: z.ZodString;
|
|
455
|
+
isBodyTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
456
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
457
|
+
}, z.core.$strict>;
|
|
458
|
+
}, z.core.$strict>;
|
|
459
|
+
|
|
460
|
+
/** Typed operations supplied by a client or mock. */
|
|
461
|
+
interface Operations {
|
|
462
|
+
/** Invoke searchTickets through this connection. */
|
|
463
|
+
searchTickets(): Query<SearchTicketsInput, SearchTicketsOutput>;
|
|
464
|
+
/** Invoke getTicket through this connection. */
|
|
465
|
+
getTicket(): Query<GetTicketInput, TicketDetails>;
|
|
466
|
+
/** Invoke createTicket through this connection. */
|
|
467
|
+
createTicket(): Mutation<CreateTicketInput, CreateTicketOutput>;
|
|
468
|
+
/** Invoke updateTicket through this connection. */
|
|
469
|
+
updateTicket(): Mutation<UpdateTicketInput, UpdateTicketOutput>;
|
|
470
|
+
/** Invoke addNote through this connection. */
|
|
471
|
+
addNote(): Mutation<AddNoteInput, AddNoteOutput>;
|
|
472
|
+
}
|
|
473
|
+
/** Named connector connection kept outside Flow state. */
|
|
474
|
+
declare class Connection<BoundOperations = Operations> {
|
|
475
|
+
/** Stable provider and connection name. */
|
|
476
|
+
readonly reference: ConnectionRef;
|
|
477
|
+
/** Bound provider operations. */
|
|
478
|
+
readonly operations: BoundOperations;
|
|
479
|
+
/** Validate a reference and bind operations. */
|
|
480
|
+
constructor(reference: ConnectionRef, operations: BoundOperations);
|
|
481
|
+
}
|
|
482
|
+
/** Bind a client to a named connection. */
|
|
483
|
+
declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
|
|
484
|
+
/** Bind scripted operations to a named connection. */
|
|
485
|
+
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
486
|
+
|
|
487
|
+
export { type AddNoteInput as A, UpdateTicketOutputSchema as B, Connection as C, decodeCredentials as D, newConnection as E, newConnectionWithOperations as F, type GetTicketInput as G, type Operations as O, type SearchTicketsInput as S, type TicketDetails as T, type UpdateTicketInput as U, type AddNoteOutput as a, type CreateTicketInput as b, type CreateTicketOutput as c, type SearchTicketsOutput as d, type UpdateTicketOutput as e, type Credentials as f, type Config as g, type Ticket as h, AddNoteInputSchema as i, AddNoteOutputSchema as j, ConfigSchema as k, CreateTicketInputSchema as l, CreateTicketOutputSchema as m, type CredentialSource as n, GetTicketInputSchema as o, SearchTicketsInputSchema as p, SearchTicketsOutputSchema as q, type TicketConversation as r, TicketConversationSchema as s, TicketDetailsSchema as t, type TicketRequester as u, type TicketRequesterInput as v, TicketRequesterInputSchema as w, TicketRequesterSchema as x, TicketSchema as y, UpdateTicketInputSchema as z };
|