line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package LINE::Bot::API::Types; |
2
|
1
|
|
|
1
|
|
112891
|
use strict; |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
31
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
552
|
use Type::Library -base; |
|
1
|
|
|
|
|
33276
|
|
|
1
|
|
|
|
|
9
|
|
6
|
1
|
|
|
1
|
|
881
|
use Type::Utils -all; |
|
1
|
|
|
|
|
5299
|
|
|
1
|
|
|
|
|
9
|
|
7
|
1
|
|
|
1
|
|
3889
|
use Types::Standard qw; |
|
1
|
|
|
|
|
67930
|
|
|
1
|
|
|
|
|
14
|
|
8
|
1
|
|
|
1
|
|
2304
|
use Types::Common::Numeric qw< PositiveOrZeroInt PositiveOrZeroNum >; |
|
1
|
|
|
|
|
21914
|
|
|
1
|
|
|
|
|
7
|
|
9
|
1
|
|
|
1
|
|
1102
|
use Types::Common::String qw< StrLength NonEmptyStr >; |
|
1
|
|
|
|
|
54342
|
|
|
1
|
|
|
|
|
11
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#source-user |
12
|
|
|
|
|
|
|
my $SourceUser = declare SourceUser => as Dict[ |
13
|
|
|
|
|
|
|
type => Enum["user"], |
14
|
|
|
|
|
|
|
userId => NonEmptyStr, |
15
|
|
|
|
|
|
|
]; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#source-group |
18
|
|
|
|
|
|
|
my $SourceGroup = declare SourceGroup => as Dict[ |
19
|
|
|
|
|
|
|
type => Enum["group"], |
20
|
|
|
|
|
|
|
groupId => NonEmptyStr, |
21
|
|
|
|
|
|
|
userId => Optional[Str], |
22
|
|
|
|
|
|
|
]; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#source-room |
25
|
|
|
|
|
|
|
my $SourceRoom = declare SourceRoom => as Dict[ |
26
|
|
|
|
|
|
|
type => Enum["room"], |
27
|
|
|
|
|
|
|
groupId => NonEmptyStr, |
28
|
|
|
|
|
|
|
userId => Optional[NonEmptyStr], |
29
|
|
|
|
|
|
|
]; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my $ContentProvider = Dict [ |
32
|
|
|
|
|
|
|
type => Enum["line", "external"], |
33
|
|
|
|
|
|
|
previewImageUrl => Optional[NonEmptyStr], |
34
|
|
|
|
|
|
|
originalContentUrl => Optional[NonEmptyStr], |
35
|
|
|
|
|
|
|
]; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#text-message |
38
|
|
|
|
|
|
|
my $TextMessage = declare TextMessage => as Dict[ id => Str, type => Enum["text"], text => StrLength[1,5000] ]; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#wh-image |
41
|
|
|
|
|
|
|
my $ImageMessage = declare ImageMessage => as Dict[ |
42
|
|
|
|
|
|
|
id => NonEmptyStr, |
43
|
|
|
|
|
|
|
type => Enum["image"], |
44
|
|
|
|
|
|
|
contentProvider => $ContentProvider, |
45
|
|
|
|
|
|
|
]; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#wh-video |
48
|
|
|
|
|
|
|
my $VideoMessage = declare VideoMessage => as Dict[ |
49
|
|
|
|
|
|
|
id => NonEmptyStr, |
50
|
|
|
|
|
|
|
type => Enum["video"], |
51
|
|
|
|
|
|
|
duration => PositiveOrZeroInt, |
52
|
|
|
|
|
|
|
contentProvider => $ContentProvider, |
53
|
|
|
|
|
|
|
]; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#wh-audio |
56
|
|
|
|
|
|
|
my $AudioMessage = declare AudioMessage => as Dict[ |
57
|
|
|
|
|
|
|
id => NonEmptyStr, |
58
|
|
|
|
|
|
|
type => Enum["audio"], |
59
|
|
|
|
|
|
|
duration => PositiveOrZeroInt, |
60
|
|
|
|
|
|
|
contentProvider => $ContentProvider, |
61
|
|
|
|
|
|
|
]; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#wh-file |
64
|
|
|
|
|
|
|
my $FileMessage = declare FileMessage => as Dict[ |
65
|
|
|
|
|
|
|
id => NonEmptyStr, |
66
|
|
|
|
|
|
|
type => Enum["file"], |
67
|
|
|
|
|
|
|
fileName => NonEmptyStr, |
68
|
|
|
|
|
|
|
fileSize => PositiveOrZeroInt, |
69
|
|
|
|
|
|
|
]; |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#wh-location |
72
|
|
|
|
|
|
|
my $LocationMessage = declare LocationMessage => as Dict[ |
73
|
|
|
|
|
|
|
id => NonEmptyStr, |
74
|
|
|
|
|
|
|
type => Enum["location"], |
75
|
|
|
|
|
|
|
title => NonEmptyStr, |
76
|
|
|
|
|
|
|
address => NonEmptyStr, |
77
|
|
|
|
|
|
|
latitude => Num, |
78
|
|
|
|
|
|
|
longtitude => Num, |
79
|
|
|
|
|
|
|
]; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#wh-sticker |
82
|
|
|
|
|
|
|
my $StickerMessage = declare StickerMessage => as Dict[ |
83
|
|
|
|
|
|
|
id => NonEmptyStr, |
84
|
|
|
|
|
|
|
type => Enum["sticker"], |
85
|
|
|
|
|
|
|
packageId => NonEmptyStr, |
86
|
|
|
|
|
|
|
stickerId => NonEmptyStr, |
87
|
|
|
|
|
|
|
]; |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#message-event |
90
|
|
|
|
|
|
|
declare MessageEvent => as Dict[ |
91
|
|
|
|
|
|
|
type => Enum["message"], |
92
|
|
|
|
|
|
|
replyToken => NonEmptyStr, |
93
|
|
|
|
|
|
|
timestamp => PositiveOrZeroNum, |
94
|
|
|
|
|
|
|
source => $SourceGroup | $SourceUser | $SourceRoom, |
95
|
|
|
|
|
|
|
message => $TextMessage | $ImageMessage | $AudioMessage | $VideoMessage | $FileMessage | $LocationMessage | $StickerMessage, |
96
|
|
|
|
|
|
|
]; |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#error-responses |
99
|
|
|
|
|
|
|
declare ErrorResponse => as Dict[ |
100
|
|
|
|
|
|
|
message => NonEmptyStr, |
101
|
|
|
|
|
|
|
details => ArrayRef[ |
102
|
|
|
|
|
|
|
Dict[ |
103
|
|
|
|
|
|
|
message => NonEmptyStr, |
104
|
|
|
|
|
|
|
property => NonEmptyStr, |
105
|
|
|
|
|
|
|
] |
106
|
|
|
|
|
|
|
] |
107
|
|
|
|
|
|
|
]; |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
my @__common__ = ( |
110
|
|
|
|
|
|
|
timestamp => PositiveOrZeroNum, |
111
|
|
|
|
|
|
|
source => $SourceGroup | $SourceUser | $SourceRoom, |
112
|
|
|
|
|
|
|
); |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#follow-event |
115
|
|
|
|
|
|
|
declare FollowEvent => as Dict[ |
116
|
|
|
|
|
|
|
type => Enum["follow"], |
117
|
|
|
|
|
|
|
replyToken => NonEmptyStr, |
118
|
|
|
|
|
|
|
@__common__ |
119
|
|
|
|
|
|
|
]; |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#unfollow-event |
122
|
|
|
|
|
|
|
declare UnfollowEvent => as Dict[ |
123
|
|
|
|
|
|
|
type => Enum["unfollow"], |
124
|
|
|
|
|
|
|
@__common__ |
125
|
|
|
|
|
|
|
]; |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#join-event |
128
|
|
|
|
|
|
|
declare JoinEvent => as Dict[ |
129
|
|
|
|
|
|
|
type => Enum["join"], |
130
|
|
|
|
|
|
|
replyToken => NonEmptyStr, |
131
|
|
|
|
|
|
|
@__common__, |
132
|
|
|
|
|
|
|
]; |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#leave-event |
135
|
|
|
|
|
|
|
declare LeaveEvent => as Dict[ |
136
|
|
|
|
|
|
|
type => Enum["leave"], |
137
|
|
|
|
|
|
|
@__common__, |
138
|
|
|
|
|
|
|
]; |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#member-joined-event |
141
|
|
|
|
|
|
|
declare MemberJoinedEvent => as Dict[ |
142
|
|
|
|
|
|
|
type => Enum["memberJoined"], |
143
|
|
|
|
|
|
|
replyToken => NonEmptyStr, |
144
|
|
|
|
|
|
|
joined => Dict[ |
145
|
|
|
|
|
|
|
members => ArrayRef[ $SourceUser ] |
146
|
|
|
|
|
|
|
], |
147
|
|
|
|
|
|
|
@__common__, |
148
|
|
|
|
|
|
|
]; |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#member-left-event |
151
|
|
|
|
|
|
|
declare MemberLeftEvent => as Dict[ |
152
|
|
|
|
|
|
|
type => Enum["memberLeft"], |
153
|
|
|
|
|
|
|
left => Dict[ |
154
|
|
|
|
|
|
|
members => ArrayRef[ $SourceUser ] |
155
|
|
|
|
|
|
|
], |
156
|
|
|
|
|
|
|
@__common__, |
157
|
|
|
|
|
|
|
]; |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#postback-event |
160
|
|
|
|
|
|
|
declare PostbackEvent => as Dict[ |
161
|
|
|
|
|
|
|
type => Enum["postback"], |
162
|
|
|
|
|
|
|
replyToken => NonEmptyStr, |
163
|
|
|
|
|
|
|
postback => Dict[ |
164
|
|
|
|
|
|
|
data => Str, |
165
|
|
|
|
|
|
|
params => HashRef |
166
|
|
|
|
|
|
|
], |
167
|
|
|
|
|
|
|
@__common__, |
168
|
|
|
|
|
|
|
]; |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#beacon-event |
171
|
|
|
|
|
|
|
declare BeaconEvent => as Dict[ |
172
|
|
|
|
|
|
|
type => Enum["beacon"], |
173
|
|
|
|
|
|
|
replyToken => NonEmptyStr, |
174
|
|
|
|
|
|
|
beacon => Dict[ |
175
|
|
|
|
|
|
|
hwid => NonEmptyStr, |
176
|
|
|
|
|
|
|
type => Enum["enter", "leave", "banner", "stay"], |
177
|
|
|
|
|
|
|
dm => Optional[Str], |
178
|
|
|
|
|
|
|
], |
179
|
|
|
|
|
|
|
@__common__, |
180
|
|
|
|
|
|
|
]; |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#account-link-event |
183
|
|
|
|
|
|
|
declare AccountLinkEvent => as Dict[ |
184
|
|
|
|
|
|
|
type => Enum["accountLink"], |
185
|
|
|
|
|
|
|
replyToken => NonEmptyStr, |
186
|
|
|
|
|
|
|
link => Dict[ |
187
|
|
|
|
|
|
|
result => Enum["ok", "failed"], |
188
|
|
|
|
|
|
|
nonce => Str |
189
|
|
|
|
|
|
|
], |
190
|
|
|
|
|
|
|
@__common__, |
191
|
|
|
|
|
|
|
]; |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#device-link-event |
194
|
|
|
|
|
|
|
declare DeviceLinkEvent => as Dict[ |
195
|
|
|
|
|
|
|
type => Enum["things"], |
196
|
|
|
|
|
|
|
replyToken => NonEmptyStr, |
197
|
|
|
|
|
|
|
things => Dict[ |
198
|
|
|
|
|
|
|
type => Enum["link"], |
199
|
|
|
|
|
|
|
deviceId => NonEmptyStr, |
200
|
|
|
|
|
|
|
], |
201
|
|
|
|
|
|
|
@__common__, |
202
|
|
|
|
|
|
|
]; |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#device-unlink-event |
205
|
|
|
|
|
|
|
declare DeviceUnlinkEvent => as Dict[ |
206
|
|
|
|
|
|
|
type => Enum["things"], |
207
|
|
|
|
|
|
|
replyToken => NonEmptyStr, |
208
|
|
|
|
|
|
|
things => Dict[ |
209
|
|
|
|
|
|
|
type => Enum["unlink"], |
210
|
|
|
|
|
|
|
deviceId => NonEmptyStr, |
211
|
|
|
|
|
|
|
], |
212
|
|
|
|
|
|
|
@__common__, |
213
|
|
|
|
|
|
|
]; |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#unsend-event |
216
|
|
|
|
|
|
|
declare UnsendEvent => as Dict[ |
217
|
|
|
|
|
|
|
type => Enum["unsend"], |
218
|
|
|
|
|
|
|
unsend => Dict [ |
219
|
|
|
|
|
|
|
messageId => Str, |
220
|
|
|
|
|
|
|
], |
221
|
|
|
|
|
|
|
@__common__, |
222
|
|
|
|
|
|
|
]; |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
# https://developers.line.biz/en/reference/messaging-api/#video-viewing-complete |
225
|
|
|
|
|
|
|
declare VideoViewingCompleteEvent => as Dict[ |
226
|
|
|
|
|
|
|
type => Enum["videoPlayComplete"], |
227
|
|
|
|
|
|
|
replyToken => Str, |
228
|
|
|
|
|
|
|
videoPlayComplete => Dict [ |
229
|
|
|
|
|
|
|
trackingId => Str, |
230
|
|
|
|
|
|
|
], |
231
|
|
|
|
|
|
|
@__common__, |
232
|
|
|
|
|
|
|
]; |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
1; |