"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Triggers = void 0;
const triggersCreateTrigger_js_1 = require("../funcs/triggersCreateTrigger.js");
const triggersDeleteTrigger_js_1 = require("../funcs/triggersDeleteTrigger.js");
const triggersListTrigger_js_1 = require("../funcs/triggersListTrigger.js");
const triggersUpdateTrigger_js_1 = require("../funcs/triggersUpdateTrigger.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
class Triggers extends sdks_js_1.ClientSDK {
    /**
     * Lists all webhook notification triggers configured for your product environmentcloudinary
     *
     * @remarks
     * Retrieves a list of all event triggers and notifications within your product environment.
     */
    async listTrigger(eventType, options) {
        return (0, fp_js_1.unwrapAsync)((0, triggersListTrigger_js_1.triggersListTrigger)(this, eventType, options));
    }
    /**
     * Creates a new notification trigger (webhook) by specifying an event type and a destination
     *
     * @remarks
     * Creates a new trigger.
     * Your product environment supports triggers up to a maximum determined by multiplying the number of unique event types by the limit of 30 notification URLs.
     */
    async createTrigger(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, triggersCreateTrigger_js_1.triggersCreateTrigger)(this, request, options));
    }
    /**
     * Updates the callback URL of an existing webhook trigger in your Cloudinary account
     *
     * @remarks
     * Updates a notification URL for a trigger.
     */
    async updateTrigger(id, requestBody, options) {
        return (0, fp_js_1.unwrapAsync)((0, triggersUpdateTrigger_js_1.triggersUpdateTrigger)(this, id, requestBody, options));
    }
    /**
     * Deletes a notification trigger
     *
     * @remarks
     * Deletes a trigger.
     */
    async deleteTrigger(id, options) {
        return (0, fp_js_1.unwrapAsync)((0, triggersDeleteTrigger_js_1.triggersDeleteTrigger)(this, id, options));
    }
}
exports.Triggers = Triggers;
//# sourceMappingURL=triggers.js.map