Skip to content

Commit 5d5aa99

Browse files
authored
Assessment webhooks (#59)
* Switch to python 3 * interview -> interviews * pre-screen -> assessment * Updated diagrams * Added new webhooks * 🤖
1 parent 1e14d60 commit 5d5aa99

File tree

9 files changed

+416
-313
lines changed

9 files changed

+416
-313
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.idea/*
44
node_modules/*
55
__pycache__
6+
docs/diagrams/.*

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ Since it's a static site, you can also just open `/docs/index.html` directly in
1313
The diagrams are generated using the following tool [diagrams](https://app.diagrams.net).
1414

1515
1. Go to that specific URL.
16-
2. Select open existing diagram.
16+
2. Open existing diagram.
1717
3. Open `docs/diagrams/webhooks-flow.drawio` file.
1818
4. Make all the needed changes.
19+
- Note that the document has 2 pages -- one with the entire flow and one with individual sections.
1920
5. Save the changes and put the resulting file on the repository to overwrite `docs/diagrams/webhooks-flow.drawio` file.
2021

2122
To update each image:

docs/diagrams/full-e2e-webhooks-flow.drawio

Lines changed: 0 additions & 219 deletions
This file was deleted.

docs/diagrams/webhooks-flow.drawio

Lines changed: 353 additions & 82 deletions
Large diffs are not rendered by default.

docs/images/client-events.png

-12.4 KB
Binary file not shown.

docs/images/client-events.svg

Lines changed: 1 addition & 1 deletion
Loading
-151 KB
Binary file not shown.

docs/images/full-e2e-prescreen-flow.svg

Lines changed: 1 addition & 2 deletions
Loading

docs/webhooks/index.html

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ <h2>Table of Contents</h2>
4343
<li>Events for CodeSignal Assessments</li>
4444
<ul>
4545
<li>
46-
<a href="#clientworkflow">Organization user workflow</a>
46+
<a href="#customerworkflow">Customer workflow</a>
4747
<ul>
48+
<li><a href="#assessmentCreated">assessmentCreated</a></li>
49+
<li><a href="#assessmentUpdated">assessmentUpdated</a></li>
4850
<li><a href="#companyTestSessionCreated">companyTestSessionCreated</a></li>
4951
</ul>
5052
</li>
@@ -76,7 +78,7 @@ <h2>Table of Contents</h2>
7678
</ul>
7779
</li>
7880
</ul>
79-
<li>Events for CodeSignal Live Interview</li>
81+
<li>Events for CodeSignal Interviews</li>
8082
<ul>
8183
<li><a href="#liveinterviewworkflow">Live Interview webhooks process flow</a></li>
8284
<li><a href="#liveInterviewFinished">liveInterviewFinished</a></li>
@@ -344,10 +346,10 @@ <h3 id="payloads">Webhook payloads</h3>
344346
</div>
345347
</div>
346348
<div class="section">
347-
<h2>Events for CodeSignal Pre-Screen</h2>
349+
<h2>Events for CodeSignal Assessments</h2>
348350
<div class="subsection">
349351
<p>
350-
Here is an overview of the end to end workflow of events for CodeSignal Pre-Screen.
352+
Here is an overview of the end to end workflow of events for CodeSignal Assessments.
351353
</p>
352354
<br />
353355
<img
@@ -357,14 +359,62 @@ <h2>Events for CodeSignal Pre-Screen</h2>
357359
/>
358360
</div>
359361
<div class="subsection">
360-
<h3 id="clientworkflow">Organization user workflow</h3>
362+
<h3 id="customerworkflow">Customer workflow</h3>
361363
<br />
362364
<img
363-
alt="Diagram of webhooks triggered on client flow"
365+
alt="Diagram of webhooks triggered on customer flow"
364366
width="80%"
365367
src="../images/client-events.svg"
366368
/>
367369
</div>
370+
<div class="subsection">
371+
<h3 id="assessmentCreated">assessmentCreated</h3>
372+
<p>Fired when a new assessment is created.</p>
373+
<div>Request format:</div>
374+
<pre><code>{
375+
event: 'assessmentCreated',
376+
triggeredOn: number,
377+
payload: {
378+
assessmentId: string,
379+
assessmentTitle: string,
380+
assessmentStatus: 'active' | 'archived' | 'deleted'
381+
}
382+
};</code></pre>
383+
<div>Sample request:</div>
384+
<pre><code>{
385+
event: 'assessmentCreated',
386+
triggeredOn: 1553720789347,
387+
payload: {
388+
assessmentId: 'lehu382hdleh29',
389+
assessmentTitle: 'General Coding Assessment',
390+
assessmentStatus: 'active'
391+
}
392+
};</code></pre>
393+
</div>
394+
<div class="subsection">
395+
<h3 id="assessmentUpdated">assessmentUpdated</h3>
396+
<p>Fired when an assessment is updated.</p>
397+
<div>Request format:</div>
398+
<pre><code>{
399+
event: 'assessmentUpdated',
400+
triggeredOn: number,
401+
payload: {
402+
assessmentId: string,
403+
assessmentTitle: string,
404+
assessmentStatus: 'active' | 'archived' | 'deleted'
405+
}
406+
};</code></pre>
407+
<div>Sample request:</div>
408+
<pre><code>{
409+
event: 'assessmentUpdated',
410+
triggeredOn: 1553720789347,
411+
payload: {
412+
assessmentId: 'lehu382hdleh29',
413+
assessmentTitle: 'General Coding Assessment',
414+
assessmentStatus: 'archived'
415+
}
416+
};</code></pre>
417+
</div>
368418
<div class="subsection">
369419
<h3 id="companyTestSessionCreated">companyTestSessionCreated</h3>
370420
<p>Fired when a test session is created.</p>
@@ -397,7 +447,7 @@ <h3 id="companyTestSessionCreated">companyTestSessionCreated</h3>
397447
<h3 id="candidateworkflow">Candidate workflow</h3>
398448
<br />
399449
<img
400-
alt="Diagram of webhooks triggered by the CodeSignal Pre-Screen product"
450+
alt="Diagram of webhooks triggered by the CodeSignal Assessments product"
401451
width="100%"
402452
src="../images/candidate-events.svg"
403453
/>
@@ -772,7 +822,7 @@ <h4 id="preScreenResultVerified">preScreenResultVerified</h4>
772822
}
773823
};</code></pre>
774824
</div>
775-
<h2>Events for CodeSignal Live Interview</h2>
825+
<h2>Events for CodeSignal Live Interviews</h2>
776826
<div class="subsection">
777827
<h3 id="liveinterviewworkflow">Live Interview webhooks process flow</h3>
778828
<img

0 commit comments

Comments
 (0)