Files
John 69b4e68baf
SAP-ERP Portal CI/CD / build (push) Failing after 5m20s
first commit
2026-09-23 17:31:02 +05:30

16 lines
669 B
JavaScript

// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import { Webhook } from 'standardwebhooks';
export class Webhooks extends APIResource {
unwrap(body, { headers, key }) {
if (headers !== undefined) {
const keyStr = key === undefined ? this._client.webhookKey : key;
if (keyStr === null)
throw new Error('Webhook key must not be null in order to unwrap');
const wh = new Webhook(keyStr);
wh.verify(body, headers);
}
return JSON.parse(body);
}
}
//# sourceMappingURL=webhooks.mjs.map