auths objectreturn or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.async (event, steps) => {}if (event.query.validationToken) {
var validationToken = event.query.validationToken;
await $respond({
immediate: true,
status: 200,
body: validationToken
});
$end(`Processed validation token: ${validationToken}`);
}auths objectreturn or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.async (event, steps) => {}const stripBom = require('strip-bom-string');
const buffer = Buffer.from(steps.trigger.raw_event.body_b64, 'base64');
var data = stripBom(buffer.toString('utf8'));
this.notifications = JSON.parse(data);auths objectreturn or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.async (event, steps) => {}var notifications = steps.strip_byte_order_mark.notifications;
if (notifications.value[0].clientState != 'SuperSecretValue123!') {
await $respond({
immediate: true,
status: 400
});
$end(`Received notification with incorrect clientState`);
}auths objectreturn or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.async (event, steps) => {} await $respond({
immediate: true,
status: 202
});
console.log(steps.strip_byte_order_mark.notifications);