"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteNotificationSpec = exports.updateNotificationSpec = exports.getNotificationSpec = exports.getNotificationSpecs = exports.createNotificationSpec = exports.deleteUser = exports.updateUser = exports.getUser = exports.getUsers = exports.createUser = exports.deleteSubscription = exports.updateSubscription = exports.getSubscription = exports.subscribe = exports.getSubscriptions = exports.createSubscription = exports.SystemNotificationSpecNames = exports.SubscriptionAction = exports.Cadence = exports.DeliveryMethod = exports.SubscriptionEntityType = void 0;
/**
 * Generated by orval v6.31.0 🍺
 * Do not edit manually.
 * Hub Newsletters Service
 * OpenAPI spec version: 0.0.1
 */
const custom_client_1 = require("../custom-client");
var SubscriptionEntityType;
(function (SubscriptionEntityType) {
    SubscriptionEntityType["DISCUSSION"] = "DISCUSSION";
    SubscriptionEntityType["CONTENT"] = "CONTENT";
})(SubscriptionEntityType || (exports.SubscriptionEntityType = SubscriptionEntityType = {}));
var DeliveryMethod;
(function (DeliveryMethod) {
    DeliveryMethod["EMAIL"] = "EMAIL";
})(DeliveryMethod || (exports.DeliveryMethod = DeliveryMethod = {}));
var Cadence;
(function (Cadence) {
    Cadence["ON_EVENT"] = "ON_EVENT";
    Cadence["DAILY"] = "DAILY";
    Cadence["WEEKLY"] = "WEEKLY";
    Cadence["MONTHLY"] = "MONTHLY";
})(Cadence || (exports.Cadence = Cadence = {}));
var SubscriptionAction;
(function (SubscriptionAction) {
    SubscriptionAction["DISCUSSION_POST_PENDING"] = "DISCUSSION_POST_PENDING";
})(SubscriptionAction || (exports.SubscriptionAction = SubscriptionAction = {}));
var SystemNotificationSpecNames;
(function (SystemNotificationSpecNames) {
    SystemNotificationSpecNames["TELEMETRY_REPORT"] = "TELEMETRY_REPORT";
    SystemNotificationSpecNames["EVENT"] = "EVENT";
    SystemNotificationSpecNames["DISCUSSION_ON_ENTITY"] = "DISCUSSION_ON_ENTITY";
})(SystemNotificationSpecNames || (exports.SystemNotificationSpecNames = SystemNotificationSpecNames = {}));
/**
 * Create a new newsletter subscription for an existing user id.
 */
const createSubscription = (iCreateSubscription, options) => {
    return (0, custom_client_1.customClient)({
        url: `/api/newsletters/v1/subscriptions`,
        method: "POST",
        headers: { "Content-Type": "application/json" },
        data: iCreateSubscription,
    }, options);
};
exports.createSubscription = createSubscription;
/**
 * Get all newsletter subscriptions for a user.
 */
const getSubscriptions = (params, options) => {
    return (0, custom_client_1.customClient)({ url: `/api/newsletters/v1/subscriptions`, method: "GET", params }, options);
};
exports.getSubscriptions = getSubscriptions;
/**
 * Create a new newsletter subscription and a newsletter user if they do not exist (upsert, based on token).
 */
const subscribe = (iSubscribe, options) => {
    return (0, custom_client_1.customClient)({
        url: `/api/newsletters/v1/subscriptions/subscribe`,
        method: "POST",
        headers: { "Content-Type": "application/json" },
        data: iSubscribe,
    }, options);
};
exports.subscribe = subscribe;
/**
 * Get a single newsletter subscription.
 */
const getSubscription = (id, options) => {
    return (0, custom_client_1.customClient)({ url: `/api/newsletters/v1/subscriptions/${id}`, method: "GET" }, options);
};
exports.getSubscription = getSubscription;
/**
 * Update a newsletter subscription.
 */
const updateSubscription = (id, iUpdateSubscription, options) => {
    return (0, custom_client_1.customClient)({
        url: `/api/newsletters/v1/subscriptions/${id}`,
        method: "PATCH",
        headers: { "Content-Type": "application/json" },
        data: iUpdateSubscription,
    }, options);
};
exports.updateSubscription = updateSubscription;
/**
 * Delete a newsletter subscription.
 */
const deleteSubscription = (id, options) => {
    return (0, custom_client_1.customClient)({ url: `/api/newsletters/v1/subscriptions/${id}`, method: "DELETE" }, options);
};
exports.deleteSubscription = deleteSubscription;
/**
 * Create a new newsletters user.
 */
const createUser = (iCreateUser, options) => {
    return (0, custom_client_1.customClient)({
        url: `/api/newsletters/v1/users`,
        method: "POST",
        headers: { "Content-Type": "application/json" },
        data: iCreateUser,
    }, options);
};
exports.createUser = createUser;
/**
 * Get all newsletters users.
 */
const getUsers = (options) => {
    return (0, custom_client_1.customClient)({ url: `/api/newsletters/v1/users`, method: "GET" }, options);
};
exports.getUsers = getUsers;
/**
 * Get a single newsletters user by id.
 */
const getUser = (userId, options) => {
    return (0, custom_client_1.customClient)({ url: `/api/newsletters/v1/users/${userId}`, method: "GET" }, options);
};
exports.getUser = getUser;
/**
 * Update a newsletters user by id.
 */
const updateUser = (userId, iUpdateUser, options) => {
    return (0, custom_client_1.customClient)({
        url: `/api/newsletters/v1/users/${userId}`,
        method: "PATCH",
        headers: { "Content-Type": "application/json" },
        data: iUpdateUser,
    }, options);
};
exports.updateUser = updateUser;
/**
 * Delete a newsletters user.
 */
const deleteUser = (userId, options) => {
    return (0, custom_client_1.customClient)({ url: `/api/newsletters/v1/users/${userId}`, method: "DELETE" }, options);
};
exports.deleteUser = deleteUser;
/**
 * Create a new notification spec (subscription blueprint).
 */
const createNotificationSpec = (iCreateNotificationSpec, options) => {
    return (0, custom_client_1.customClient)({
        url: `/api/newsletters/v1/notification-specs`,
        method: "POST",
        headers: { "Content-Type": "application/json" },
        data: iCreateNotificationSpec,
    }, options);
};
exports.createNotificationSpec = createNotificationSpec;
/**
 * Get all notification specs.
 */
const getNotificationSpecs = (options) => {
    return (0, custom_client_1.customClient)({ url: `/api/newsletters/v1/notification-specs`, method: "GET" }, options);
};
exports.getNotificationSpecs = getNotificationSpecs;
/**
 * Get a single notification spec by id.
 */
const getNotificationSpec = (id, options) => {
    return (0, custom_client_1.customClient)({ url: `/api/newsletters/v1/notification-specs/${id}`, method: "GET" }, options);
};
exports.getNotificationSpec = getNotificationSpec;
/**
 * Update a notification spec by id.
 */
const updateNotificationSpec = (id, iUpdateNotificationSpec, options) => {
    return (0, custom_client_1.customClient)({
        url: `/api/newsletters/v1/notification-specs/${id}`,
        method: "PATCH",
        headers: { "Content-Type": "application/json" },
        data: iUpdateNotificationSpec,
    }, options);
};
exports.updateNotificationSpec = updateNotificationSpec;
/**
 * Delete a notification spec by id.
 */
const deleteNotificationSpec = (id, options) => {
    return (0, custom_client_1.customClient)({ url: `/api/newsletters/v1/notification-specs/${id}`, method: "DELETE" }, options);
};
exports.deleteNotificationSpec = deleteNotificationSpec;
//# sourceMappingURL=orval-newsletters.js.map