UNPKG

attio-js

Version:

Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.

72 lines 2.25 kB
"use strict"; /* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Webhooks = void 0; const webhooksCreate_js_1 = require("../funcs/webhooksCreate.js"); const webhooksDelete_js_1 = require("../funcs/webhooksDelete.js"); const webhooksGet_js_1 = require("../funcs/webhooksGet.js"); const webhooksList_js_1 = require("../funcs/webhooksList.js"); const webhooksPartialUpdate_js_1 = require("../funcs/webhooksPartialUpdate.js"); const sdks_js_1 = require("../lib/sdks.js"); const fp_js_1 = require("../types/fp.js"); class Webhooks extends sdks_js_1.ClientSDK { /** * List webhooks * * @remarks * Get all of the webhooks in your workspace. * * Required scopes: `webhook:read`. */ async list(request, options) { return (0, fp_js_1.unwrapAsync)((0, webhooksList_js_1.webhooksList)(this, request, options)); } /** * Create a webhook * * @remarks * Create a webhook and associated subscriptions. * * Required scopes: `webhook:read-write`. */ async create(request, options) { return (0, fp_js_1.unwrapAsync)((0, webhooksCreate_js_1.webhooksCreate)(this, request, options)); } /** * Get a webhook * * @remarks * Get a single webhook. * * Required scopes: `webhook:read`. */ async get(request, options) { return (0, fp_js_1.unwrapAsync)((0, webhooksGet_js_1.webhooksGet)(this, request, options)); } /** * Update a webhook * * @remarks * Update a webhook and associated subscriptions. * * Required scopes: `webhook:read-write`. */ async partialUpdate(request, options) { return (0, fp_js_1.unwrapAsync)((0, webhooksPartialUpdate_js_1.webhooksPartialUpdate)(this, request, options)); } /** * Delete a webhook * * @remarks * Delete a webhook by ID. * * Required scopes: `webhook:read-write`. */ async delete(request, options) { return (0, fp_js_1.unwrapAsync)((0, webhooksDelete_js_1.webhooksDelete)(this, request, options)); } } exports.Webhooks = Webhooks; //# sourceMappingURL=webhooks.js.map