Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit61f23ef

Browse files
committed
add webhook schema
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent7eba915 commit61f23ef

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

‎src/schema/skeleton.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,52 @@ export default {
140140
}
141141
}
142142
},
143+
webhook:{
144+
type:'object',
145+
description:'An optional configuration for webhooks triggered by events such as init, step/level/tutorial complete',
146+
properties:{
147+
url:{
148+
type:'string',
149+
description:'URL for POST restful webhook request',
150+
examples:['https://example.com/webhook']
151+
},
152+
events:{
153+
type:'object',
154+
description:'An object of events to trigger on',
155+
properties:{
156+
init:{
157+
type:'boolean',
158+
description:
159+
'An event triggered on tutorial startup. Sends tutorialId',
160+
},
161+
reset:{
162+
type:'boolean',
163+
description:
164+
'An event triggered on reset of a tutorial. Sends tutorialId',
165+
},
166+
step_complete:{
167+
type:'boolean',
168+
description:
169+
'An event triggered on completion of a step. Sends tutorialId, levelId & stepId',
170+
},
171+
level_complete:{
172+
step_complete:{
173+
type:'boolean',
174+
description:
175+
'An event triggered on completion of a level. Sends tutorialId & levelId',
176+
},
177+
},
178+
tutorial_complete:{
179+
step_complete:{
180+
type:'boolean',
181+
description:
182+
'An event triggered on completion of a tutorial. Sends tutorialId',
183+
},
184+
}
185+
}
186+
},
187+
}
188+
},
143189
additionalProperties:false,
144190
required:['testRunner','repo']
145191
},

‎src/schema/tutorial.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,52 @@ export default {
159159
}
160160
}
161161
},
162+
webhook:{
163+
type:'object',
164+
description:'An optional configuration for webhooks triggered by events such as init, step/level/tutorial complete',
165+
properties:{
166+
url:{
167+
type:'string',
168+
description:'URL for POST restful webhook request',
169+
examples:['https://example.com/webhook']
170+
},
171+
events:{
172+
type:'object',
173+
description:'An object of events to trigger on',
174+
properties:{
175+
init:{
176+
type:'boolean',
177+
description:
178+
'An event triggered on tutorial startup. Sends tutorialId',
179+
},
180+
reset:{
181+
type:'boolean',
182+
description:
183+
'An event triggered on reset of a tutorial. Sends tutorialId',
184+
},
185+
step_complete:{
186+
type:'boolean',
187+
description:
188+
'An event triggered on completion of a step. Sends tutorialId, levelId & stepId',
189+
},
190+
level_complete:{
191+
step_complete:{
192+
type:'boolean',
193+
description:
194+
'An event triggered on completion of a level. Sends tutorialId & levelId',
195+
},
196+
},
197+
tutorial_complete:{
198+
step_complete:{
199+
type:'boolean',
200+
description:
201+
'An event triggered on completion of a tutorial. Sends tutorialId',
202+
},
203+
}
204+
}
205+
},
206+
}
207+
},
162208
additionalProperties:false,
163209
required:['testRunner','repo']
164210
},

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp