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