This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export let tests = { | |
good:[], | |
bad:[] | |
} | |
tests.good.push(`Hello All! | |
Thank you all for joining us today, we hope you enjoyed the workshop! For anyone that wasn't able to make it of would like to refer back this link will take you to a recording of the event: | |
https://drive.google.com/file/d/1h1IH7ns-3ywxi00Y6cDl_TpYG7v6Y2gF/view?usp=sharing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"assetID": "urn:aaid:AS:UE1:23c30ee0-2c4d-46d6-87f2-087832fca718", | |
"documentLanguage": "en-US" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type":"CALLBACK", | |
"data": { | |
"url":"your webhook url", | |
"headers": { | |
"name":"value" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"assetID": "urn:aaid:AS:UE1:23c30ee0-2c4d-46d6-87f2-087832fca718", | |
"documentLanguage": "en-US", | |
"notifiers": [ | |
{ | |
"type": "CALLBACK", | |
"data": { | |
"url": "https://dummy.callback.org/" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function createPDFJob(asset, webhook, token, clientId) { | |
let body = { | |
'assetID': asset.assetID, | |
'documentLanguage': 'en-US', | |
'notifiers': [ | |
{ | |
'type':'CALLBACK', | |
'data':{ | |
'url':webhook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Used to debug webhook notifications. | |
Will need to be used with ngrok. | |
Thanks to Todd Sharp for the base code I modified. | |
*/ | |
import * as http from 'http'; | |
async function handler(req, res) { | |
console.log('Entered webhook handler.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ack":"done" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"jobID": "FAQjIUIGfuIkgcBMMunRsZ56P6qoQ4bR", | |
"statusResponse": { | |
"status": "done", | |
"asset": { | |
"metadata": { | |
"type": "application/pdf", | |
"size": 79120 | |
}, | |
"downloadUri": "very long and very special unique url. so special", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type":"CALLBACK", | |
"data": { | |
"url":"your webhook url", | |
"headers": { | |
"name":"value" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type":"CALLBACK", | |
"data": { | |
"url":"your webhook url", | |
"headers": { | |
"cats":"rule", | |
"dogs":"drool" | |
} | |
} | |
} |