forked from sourcegraph/zendesk-discord-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzendesk.ts
58 lines (52 loc) · 1.11 KB
/
zendesk.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
export interface ExternalResource {
external_id: string
internal_note?: boolean
message: string
parent_id?: string
thread_id?: string
created_at: string
author: Author
allow_channelback?: boolean
fields?: Field[]
file_urls?: string[]
}
export interface Author {
external_id: string
name?: string
image_url?: string
locale?: string
fields?: Field[]
}
export interface Field {
/**
* @see https://developer.zendesk.com/documentation/channel_framework/understanding-the-channel-framework/pull_endpoint/#field-object
*/
id: string
value: any
}
export interface ChannelbackRequest {
message: string
thread_id: string
file_urls?: string[]
}
export interface ClickthroughRequest {
external_id: string
}
export interface Metadata {
/**
* Unique identifier for bot identication
*/
uuid: string
/**
* Discord token
*/
token: string
/**
* Discord forum channel
*/
channel: string
// Push data
subdomain?: string
instance_push_id?: string
zendesk_access_token?: string
}