/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ApiResponse_i64 } from '../models/ApiResponse_i64';
import type { ApiResponse_NotificationBlock } from '../models/ApiResponse_NotificationBlock';
import type { ApiResponse_NotificationDetail } from '../models/ApiResponse_NotificationDetail';
import type { ApiResponse_NotificationSubscription } from '../models/ApiResponse_NotificationSubscription';
import type { ApiResponse_NotificationTemplate } from '../models/ApiResponse_NotificationTemplate';
import type { ApiResponse_String } from '../models/ApiResponse_String';
import type { ApiResponse_Vec_NotificationBlock } from '../models/ApiResponse_Vec_NotificationBlock';
import type { ApiResponse_Vec_NotificationDelivery } from '../models/ApiResponse_Vec_NotificationDelivery';
import type { ApiResponse_Vec_NotificationDetail } from '../models/ApiResponse_Vec_NotificationDetail';
import type { ApiResponse_Vec_NotificationSubscription } from '../models/ApiResponse_Vec_NotificationSubscription';
import type { ApiResponse_Vec_NotificationTemplate } from '../models/ApiResponse_Vec_NotificationTemplate';
import type { CreateBlockParams } from '../models/CreateBlockParams';
import type { CreateSubscriptionParams } from '../models/CreateSubscriptionParams';
import type { CreateTemplateParams } from '../models/CreateTemplateParams';
import type { UpdateSubscriptionParams } from '../models/UpdateSubscriptionParams';
import type { UpdateTemplateParams } from '../models/UpdateTemplateParams';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class NotificationsService {
	/**
	 * List notifications for the current user
	 * @returns ApiResponse_Vec_NotificationDetail Notifications listed successfully
	 * @throws ApiError
	 */
	public static notificationList({
		unreadOnly,
		limit,
		offset,
	}: {
		unreadOnly?: boolean | null,
		limit?: number | null,
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_NotificationDetail> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/notifications',
			query: {
				'unread_only': unreadOnly,
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Clear all notifications (dismiss all)
	 * @returns ApiResponse_i64 All notifications cleared
	 * @throws ApiError
	 */
	public static notificationClearAll(): CancelablePromise<ApiResponse_i64> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/notifications',
			errors: {
				401: `Authentication required or session expired`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List notification blocks for the current user
	 * @returns ApiResponse_Vec_NotificationBlock Blocks listed successfully
	 * @throws ApiError
	 */
	public static notificationListBlocks({
		limit,
		offset,
	}: {
		limit?: number | null,
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_NotificationBlock> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/notifications/blocks',
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Create a notification block
	 * @returns ApiResponse_NotificationBlock Block created
	 * @throws ApiError
	 */
	public static notificationCreateBlock({
		requestBody,
	}: {
		/**
		 * Block creation parameters
		 */
		requestBody: CreateBlockParams,
	}): CancelablePromise<ApiResponse_NotificationBlock> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/notifications/blocks',
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				401: `Authentication required or session expired`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Delete a notification block
	 * @returns ApiResponse_String Block deleted
	 * @throws ApiError
	 */
	public static notificationDeleteBlock({
		blockId,
	}: {
		blockId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/notifications/blocks/{block_id}',
			path: {
				'block_id': blockId,
			},
			errors: {
				401: `Authentication required or session expired`,
				404: `Block not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List notification deliveries for the current user
	 * @returns ApiResponse_Vec_NotificationDelivery Deliveries listed successfully
	 * @throws ApiError
	 */
	public static notificationListDeliveries({
		limit,
		offset,
	}: {
		limit?: number | null,
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_NotificationDelivery> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/notifications/deliveries',
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Mark all notifications as read
	 * @returns ApiResponse_i64 All notifications marked as read
	 * @throws ApiError
	 */
	public static notificationMarkAllAsRead(): CancelablePromise<ApiResponse_i64> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/notifications/read-all',
			errors: {
				401: `Authentication required or session expired`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List notification subscriptions for the current user
	 * @returns ApiResponse_Vec_NotificationSubscription Subscriptions listed successfully
	 * @throws ApiError
	 */
	public static notificationListSubscriptions({
		limit,
		offset,
	}: {
		limit?: number | null,
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_NotificationSubscription> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/notifications/subscriptions',
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Create a notification subscription
	 * @returns ApiResponse_NotificationSubscription Subscription created
	 * @throws ApiError
	 */
	public static notificationCreateSubscription({
		requestBody,
	}: {
		/**
		 * Subscription creation parameters
		 */
		requestBody: CreateSubscriptionParams,
	}): CancelablePromise<ApiResponse_NotificationSubscription> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/notifications/subscriptions',
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				401: `Authentication required or session expired`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Update a notification subscription
	 * @returns ApiResponse_NotificationSubscription Subscription updated
	 * @throws ApiError
	 */
	public static notificationUpdateSubscription({
		subscriptionId,
		requestBody,
	}: {
		subscriptionId: string,
		/**
		 * Subscription update parameters
		 */
		requestBody: UpdateSubscriptionParams,
	}): CancelablePromise<ApiResponse_NotificationSubscription> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/notifications/subscriptions/{subscription_id}',
			path: {
				'subscription_id': subscriptionId,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				401: `Authentication required or session expired`,
				404: `Subscription not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Delete a notification subscription
	 * @returns ApiResponse_String Subscription deleted
	 * @throws ApiError
	 */
	public static notificationDeleteSubscription({
		subscriptionId,
	}: {
		subscriptionId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/notifications/subscriptions/{subscription_id}',
			path: {
				'subscription_id': subscriptionId,
			},
			errors: {
				401: `Authentication required or session expired`,
				404: `Subscription not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List notification templates (requires system admin)
	 * @returns ApiResponse_Vec_NotificationTemplate Templates listed successfully
	 * @throws ApiError
	 */
	public static notificationListTemplates({
		limit,
		offset,
	}: {
		limit?: number | null,
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_NotificationTemplate> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/notifications/templates',
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `System admin access required`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Create a notification template (requires system admin)
	 * @returns ApiResponse_NotificationTemplate Template created
	 * @throws ApiError
	 */
	public static notificationCreateTemplate({
		requestBody,
	}: {
		/**
		 * Template creation parameters
		 */
		requestBody: CreateTemplateParams,
	}): CancelablePromise<ApiResponse_NotificationTemplate> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/notifications/templates',
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				401: `Authentication required or session expired`,
				403: `System admin access required`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Get a notification template by ID (requires system admin)
	 * @returns ApiResponse_NotificationTemplate Template retrieved
	 * @throws ApiError
	 */
	public static notificationGetTemplate({
		templateId,
	}: {
		templateId: string,
	}): CancelablePromise<ApiResponse_NotificationTemplate> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/notifications/templates/{template_id}',
			path: {
				'template_id': templateId,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `System admin access required`,
				404: `Template not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Update a notification template (requires system admin)
	 * @returns ApiResponse_NotificationTemplate Template updated
	 * @throws ApiError
	 */
	public static notificationUpdateTemplate({
		templateId,
		requestBody,
	}: {
		templateId: string,
		/**
		 * Template update parameters
		 */
		requestBody: UpdateTemplateParams,
	}): CancelablePromise<ApiResponse_NotificationTemplate> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/notifications/templates/{template_id}',
			path: {
				'template_id': templateId,
			},
			body: requestBody,
			mediaType: 'application/json',
			errors: {
				401: `Authentication required or session expired`,
				403: `System admin access required`,
				404: `Template not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Delete a notification template (requires system admin)
	 * @returns ApiResponse_String Template deleted
	 * @throws ApiError
	 */
	public static notificationDeleteTemplate({
		templateId,
	}: {
		templateId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/notifications/templates/{template_id}',
			path: {
				'template_id': templateId,
			},
			errors: {
				401: `Authentication required or session expired`,
				403: `System admin access required`,
				404: `Template not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Get unread notification count for the current user
	 * @returns ApiResponse_i64 Unread count returned successfully
	 * @throws ApiError
	 */
	public static notificationUnreadCount(): CancelablePromise<ApiResponse_i64> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/notifications/unread-count',
			errors: {
				401: `Authentication required or session expired`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Delete a notification
	 * @returns ApiResponse_String Notification deleted
	 * @throws ApiError
	 */
	public static notificationDelete({
		notificationId,
	}: {
		notificationId: string,
	}): CancelablePromise<ApiResponse_String> {
		return __request(OpenAPI, {
			method: 'DELETE',
			url: '/api/v1/notifications/{notification_id}',
			path: {
				'notification_id': notificationId,
			},
			errors: {
				401: `Authentication required or session expired`,
				404: `Notification not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * List deliveries for a specific notification
	 * @returns ApiResponse_Vec_NotificationDelivery Deliveries listed successfully
	 * @throws ApiError
	 */
	public static notificationListDeliveriesForNotification({
		notificationId,
		limit,
		offset,
	}: {
		notificationId: string,
		limit?: number | null,
		offset?: number | null,
	}): CancelablePromise<ApiResponse_Vec_NotificationDelivery> {
		return __request(OpenAPI, {
			method: 'GET',
			url: '/api/v1/notifications/{notification_id}/deliveries',
			path: {
				'notification_id': notificationId,
			},
			query: {
				'limit': limit,
				'offset': offset,
			},
			errors: {
				401: `Authentication required or session expired`,
				404: `Notification not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Dismiss a notification
	 * @returns ApiResponse_NotificationDetail Notification dismissed
	 * @throws ApiError
	 */
	public static notificationDismiss({
		notificationId,
	}: {
		notificationId: string,
	}): CancelablePromise<ApiResponse_NotificationDetail> {
		return __request(OpenAPI, {
			method: 'POST',
			url: '/api/v1/notifications/{notification_id}/dismiss',
			path: {
				'notification_id': notificationId,
			},
			errors: {
				401: `Authentication required or session expired`,
				404: `Notification not found`,
				500: `Internal server error`,
			},
		});
	}
	/**
	 * Mark a notification as read
	 * @returns ApiResponse_NotificationDetail Notification marked as read
	 * @throws ApiError
	 */
	public static notificationMarkAsRead({
		notificationId,
	}: {
		notificationId: string,
	}): CancelablePromise<ApiResponse_NotificationDetail> {
		return __request(OpenAPI, {
			method: 'PUT',
			url: '/api/v1/notifications/{notification_id}/read',
			path: {
				'notification_id': notificationId,
			},
			errors: {
				401: `Authentication required or session expired`,
				404: `Notification not found`,
				500: `Internal server error`,
			},
		});
	}
}
