Update endpoints

This commit is contained in:
2025-09-06 17:11:37 +02:00
parent 0a65d21730
commit f84ffd5e23
2 changed files with 204 additions and 78 deletions

View File

@@ -14,8 +14,13 @@ import {
Author, Author,
Chapter, Chapter,
CoverSize, CoverSize,
CreateGotifyConnectorRecord,
CreateLibraryConnectorRecord,
CreateLibraryRecord,
CreateNotificationConnectorRecord,
CreateNtfyConnectorRecord,
CreatePushoverConnectorRecord,
FileLibrary, FileLibrary,
GotifyRecord,
LibraryConnector, LibraryConnector,
Manga, Manga,
MangaConnector, MangaConnector,
@@ -24,9 +29,7 @@ import {
MetadataSearchResult, MetadataSearchResult,
MinimalManga, MinimalManga,
NotificationConnector, NotificationConnector,
NtfyRecord,
ProblemDetails, ProblemDetails,
PushoverRecord,
RequestType, RequestType,
TrangaSettings, TrangaSettings,
Worker, Worker,
@@ -40,7 +43,7 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags FileLibrary * @tags FileLibrary
* @name FileLibraryList * @name FileLibraryList
* @summary Returns all API.Schema.MangaContext.FileLibrary * @summary Returns all API.Controllers.DTOs.FileLibrary
* @request GET:/v2/FileLibrary * @request GET:/v2/FileLibrary
*/ */
fileLibraryList = (params: RequestParams = {}) => fileLibraryList = (params: RequestParams = {}) =>
@@ -55,10 +58,10 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags FileLibrary * @tags FileLibrary
* @name FileLibraryUpdate * @name FileLibraryUpdate
* @summary Creates new API.Schema.MangaContext.FileLibrary * @summary Creates new API.Controllers.DTOs.FileLibrary
* @request PUT:/v2/FileLibrary * @request PUT:/v2/FileLibrary
*/ */
fileLibraryUpdate = (data: FileLibrary, params: RequestParams = {}) => fileLibraryUpdate = (data: CreateLibraryRecord, params: RequestParams = {}) =>
this.request<void, string>({ this.request<void, string>({
path: `/v2/FileLibrary`, path: `/v2/FileLibrary`,
method: 'PUT', method: 'PUT',
@@ -71,7 +74,7 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags FileLibrary * @tags FileLibrary
* @name FileLibraryDetail * @name FileLibraryDetail
* @summary Returns API.Schema.MangaContext.FileLibrary with FileLibraryId * @summary Returns API.Controllers.DTOs.FileLibrary with FileLibraryId
* @request GET:/v2/FileLibrary/{FileLibraryId} * @request GET:/v2/FileLibrary/{FileLibraryId}
*/ */
fileLibraryDetail = (fileLibraryId: string, params: RequestParams = {}) => fileLibraryDetail = (fileLibraryId: string, params: RequestParams = {}) =>
@@ -140,7 +143,7 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags LibraryConnector * @tags LibraryConnector
* @name LibraryConnectorList * @name LibraryConnectorList
* @summary Gets all configured API.Schema.LibraryContext.LibraryConnectors.LibraryConnector * @summary Gets all configured API.Controllers.DTOs.LibraryConnector
* @request GET:/v2/LibraryConnector * @request GET:/v2/LibraryConnector
*/ */
libraryConnectorList = (params: RequestParams = {}) => libraryConnectorList = (params: RequestParams = {}) =>
@@ -155,10 +158,10 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags LibraryConnector * @tags LibraryConnector
* @name LibraryConnectorUpdate * @name LibraryConnectorUpdate
* @summary Creates a new API.Schema.LibraryContext.LibraryConnectors.LibraryConnector * @summary Creates a new API.Controllers.DTOs.LibraryConnector
* @request PUT:/v2/LibraryConnector * @request PUT:/v2/LibraryConnector
*/ */
libraryConnectorUpdate = (data: LibraryConnector, params: RequestParams = {}) => libraryConnectorUpdate = (data: CreateLibraryConnectorRecord, params: RequestParams = {}) =>
this.request<string, string>({ this.request<string, string>({
path: `/v2/LibraryConnector`, path: `/v2/LibraryConnector`,
method: 'PUT', method: 'PUT',
@@ -171,7 +174,7 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags LibraryConnector * @tags LibraryConnector
* @name LibraryConnectorDetail * @name LibraryConnectorDetail
* @summary Returns API.Schema.LibraryContext.LibraryConnectors.LibraryConnector with LibraryConnectorId * @summary Returns API.Controllers.DTOs.LibraryConnector with LibraryConnectorId
* @request GET:/v2/LibraryConnector/{LibraryConnectorId} * @request GET:/v2/LibraryConnector/{LibraryConnectorId}
*/ */
libraryConnectorDetail = (libraryConnectorId: string, params: RequestParams = {}) => libraryConnectorDetail = (libraryConnectorId: string, params: RequestParams = {}) =>
@@ -186,7 +189,7 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags LibraryConnector * @tags LibraryConnector
* @name LibraryConnectorDelete * @name LibraryConnectorDelete
* @summary Deletes API.Schema.LibraryContext.LibraryConnectors.LibraryConnector with LibraryConnectorId * @summary Deletes API.Controllers.DTOs.LibraryConnector with LibraryConnectorId
* @request DELETE:/v2/LibraryConnector/{LibraryConnectorId} * @request DELETE:/v2/LibraryConnector/{LibraryConnectorId}
*/ */
libraryConnectorDelete = (libraryConnectorId: string, params: RequestParams = {}) => libraryConnectorDelete = (libraryConnectorId: string, params: RequestParams = {}) =>
@@ -429,7 +432,7 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags Manga * @tags Manga
* @name MangaChangeLibraryCreate * @name MangaChangeLibraryCreate
* @summary Move API.Controllers.DTOs.Manga to different API.Schema.MangaContext.FileLibrary * @summary Move API.Controllers.DTOs.Manga to different API.Controllers.DTOs.FileLibrary
* @request POST:/v2/Manga/{MangaId}/ChangeLibrary/{LibraryId} * @request POST:/v2/Manga/{MangaId}/ChangeLibrary/{LibraryId}
*/ */
mangaChangeLibraryCreate = (mangaId: string, libraryId: string, params: RequestParams = {}) => mangaChangeLibraryCreate = (mangaId: string, libraryId: string, params: RequestParams = {}) =>
@@ -681,7 +684,7 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags NotificationConnector * @tags NotificationConnector
* @name NotificationConnectorList * @name NotificationConnectorList
* @summary Gets all configured API.Schema.NotificationsContext.NotificationConnectors.NotificationConnector * @summary Gets all configured API.Controllers.DTOs.NotificationConnector
* @request GET:/v2/NotificationConnector * @request GET:/v2/NotificationConnector
*/ */
notificationConnectorList = (params: RequestParams = {}) => notificationConnectorList = (params: RequestParams = {}) =>
@@ -696,16 +699,18 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags NotificationConnector * @tags NotificationConnector
* @name NotificationConnectorUpdate * @name NotificationConnectorUpdate
* @summary Creates a new API.Schema.NotificationsContext.NotificationConnectors.NotificationConnector * @summary Creates a new API.Controllers.DTOs.NotificationConnector
* @request PUT:/v2/NotificationConnector * @request PUT:/v2/NotificationConnector
*/ */
notificationConnectorUpdate = (data: NotificationConnector, params: RequestParams = {}) => notificationConnectorUpdate = (
this.request<string, string>({ data: CreateNotificationConnectorRecord,
params: RequestParams = {}
) =>
this.request<void, string>({
path: `/v2/NotificationConnector`, path: `/v2/NotificationConnector`,
method: 'PUT', method: 'PUT',
body: data, body: data,
type: ContentType.Json, type: ContentType.Json,
format: 'json',
...params, ...params,
}); });
/** /**
@@ -713,7 +718,7 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags NotificationConnector * @tags NotificationConnector
* @name NotificationConnectorDetail * @name NotificationConnectorDetail
* @summary Returns API.Schema.NotificationsContext.NotificationConnectors.NotificationConnector with requested Name * @summary Returns API.Controllers.DTOs.NotificationConnector with requested Name
* @request GET:/v2/NotificationConnector/{Name} * @request GET:/v2/NotificationConnector/{Name}
*/ */
notificationConnectorDetail = (name: string, params: RequestParams = {}) => notificationConnectorDetail = (name: string, params: RequestParams = {}) =>
@@ -728,7 +733,7 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags NotificationConnector * @tags NotificationConnector
* @name NotificationConnectorDelete * @name NotificationConnectorDelete
* @summary Deletes the API.Schema.NotificationsContext.NotificationConnectors.NotificationConnector with the requested Name * @summary Deletes the API.Controllers.DTOs.NotificationConnector with the requested Name
* @request DELETE:/v2/NotificationConnector/{Name} * @request DELETE:/v2/NotificationConnector/{Name}
*/ */
notificationConnectorDelete = (name: string, params: RequestParams = {}) => notificationConnectorDelete = (name: string, params: RequestParams = {}) =>
@@ -742,16 +747,18 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags NotificationConnector * @tags NotificationConnector
* @name NotificationConnectorGotifyUpdate * @name NotificationConnectorGotifyUpdate
* @summary Creates a new Gotify-API.Schema.NotificationsContext.NotificationConnectors.NotificationConnector * @summary Creates a new Gotify-API.Controllers.DTOs.NotificationConnector
* @request PUT:/v2/NotificationConnector/Gotify * @request PUT:/v2/NotificationConnector/Gotify
*/ */
notificationConnectorGotifyUpdate = (data: GotifyRecord, params: RequestParams = {}) => notificationConnectorGotifyUpdate = (
this.request<string, string>({ data: CreateGotifyConnectorRecord,
params: RequestParams = {}
) =>
this.request<void, string>({
path: `/v2/NotificationConnector/Gotify`, path: `/v2/NotificationConnector/Gotify`,
method: 'PUT', method: 'PUT',
body: data, body: data,
type: ContentType.Json, type: ContentType.Json,
format: 'json',
...params, ...params,
}); });
/** /**
@@ -759,16 +766,18 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags NotificationConnector * @tags NotificationConnector
* @name NotificationConnectorNtfyUpdate * @name NotificationConnectorNtfyUpdate
* @summary Creates a new Ntfy-API.Schema.NotificationsContext.NotificationConnectors.NotificationConnector * @summary Creates a new Ntfy-API.Controllers.DTOs.NotificationConnector
* @request PUT:/v2/NotificationConnector/Ntfy * @request PUT:/v2/NotificationConnector/Ntfy
*/ */
notificationConnectorNtfyUpdate = (data: NtfyRecord, params: RequestParams = {}) => notificationConnectorNtfyUpdate = (
this.request<string, string>({ data: CreateNtfyConnectorRecord,
params: RequestParams = {}
) =>
this.request<void, string>({
path: `/v2/NotificationConnector/Ntfy`, path: `/v2/NotificationConnector/Ntfy`,
method: 'PUT', method: 'PUT',
body: data, body: data,
type: ContentType.Json, type: ContentType.Json,
format: 'json',
...params, ...params,
}); });
/** /**
@@ -776,16 +785,18 @@ export class V2<SecurityDataType = unknown> extends HttpClient<SecurityDataType>
* *
* @tags NotificationConnector * @tags NotificationConnector
* @name NotificationConnectorPushoverUpdate * @name NotificationConnectorPushoverUpdate
* @summary Creates a new Pushover-API.Schema.NotificationsContext.NotificationConnectors.NotificationConnector * @summary Creates a new Pushover-API.Controllers.DTOs.NotificationConnector
* @request PUT:/v2/NotificationConnector/Pushover * @request PUT:/v2/NotificationConnector/Pushover
*/ */
notificationConnectorPushoverUpdate = (data: PushoverRecord, params: RequestParams = {}) => notificationConnectorPushoverUpdate = (
this.request<string, string>({ data: CreatePushoverConnectorRecord,
params: RequestParams = {}
) =>
this.request<void, string>({
path: `/v2/NotificationConnector/Pushover`, path: `/v2/NotificationConnector/Pushover`,
method: 'PUT', method: 'PUT',
body: data, body: data,
type: ContentType.Json, type: ContentType.Json,
format: 'json',
...params, ...params,
}); });
/** /**

View File

@@ -111,46 +111,170 @@ export interface Chapter {
key: string; key: string;
} }
export interface FileLibrary { export interface CreateGotifyConnectorRecord {
/** /**
* @minLength 0 * The Name of the Notification Connector
* @maxLength 256 * @minLength 1
*/
name: string;
/**
* The Url of the Instance
* @format uri
* @minLength 1
*/
url: string;
/**
* The Apptoken used for authentication
* @minLength 1
*/
appToken: string;
/**
* The Priority of Notifications
* @format int32
*/
priority: number;
}
export interface CreateLibraryConnectorRecord {
libraryType: LibraryType;
/**
* The Url of the Library instance
* @format uri
* @minLength 1
*/
url: string;
/**
* The Username to authenticate to the Library instance
* @minLength 1
*/
username: string;
/**
* The Password to authenticate to the Library instance
* @minLength 1
*/
password: string;
}
export interface CreateLibraryRecord {
/**
* The directory Path of the library
* @minLength 1
*/ */
basePath: string; basePath: string;
/** /**
* @minLength 0 * The Name of the library
* @maxLength 512 * @minLength 1
*/
libraryName: string;
}
export interface CreateNotificationConnectorRecord {
/**
* The Name of the Notification Connector
* @minLength 1
*/
name: string;
/**
* The Url of the Instance
* @format uri
* @minLength 1
*/
url: string;
/**
* The HTTP Request Method to use for notifications
* @minLength 1
*/
httpMethod: string;
/**
* The Request Body to use to send notifications
* @minLength 1
*/
body: string;
/** The Request Headers to use to send notifications */
headers: Record<string, string>;
}
export interface CreateNtfyConnectorRecord {
/**
* The Name of the Notification Connector
* @minLength 1
*/
name: string;
/**
* The Url of the Instance
* @format uri
* @minLength 1
*/
url: string;
/**
* The Priority of Notifications
* @format int32
*/
priority: number;
/**
* The Username used for authentication
* @minLength 1
*/
username: string;
/**
* The Password used for authentication
* @minLength 1
*/
password: string;
/**
* The Topic of Notifications
* @minLength 1
*/
topic: string;
}
export interface CreatePushoverConnectorRecord {
/**
* The Name of the Notification Connector
* @minLength 1
*/
name: string;
/**
* The Apptoken used for authentication
* @minLength 1
*/
appToken: string;
/**
* The Username used for authentication
* @minLength 1
*/
username: string;
}
export interface FileLibrary {
/**
* The directory Path of the library
* @minLength 1
*/
basePath: string;
/**
* The Name of the library
* @minLength 1
*/ */
libraryName: string; libraryName: string;
/** /**
* Unique Identifier of the DTO
* @minLength 16 * @minLength 16
* @maxLength 64 * @maxLength 64
*/ */
key: string; key: string;
} }
export interface GotifyRecord {
name?: string | null;
endpoint?: string | null;
appToken?: string | null;
/** @format int32 */
priority?: number;
}
export interface LibraryConnector { export interface LibraryConnector {
libraryType: LibraryType;
/** /**
* The Url of the Library instance
* @format uri * @format uri
* @minLength 0 * @minLength 1
* @maxLength 256
*/ */
baseUrl: string; baseUrl: string;
type: LibraryType;
/** /**
* @minLength 0 * Unique Identifier of the DTO
* @maxLength 256
*/
auth: string;
/**
* @minLength 16 * @minLength 16
* @maxLength 64 * @maxLength 64
*/ */
@@ -309,37 +433,34 @@ export interface MinimalManga {
export interface NotificationConnector { export interface NotificationConnector {
/** /**
* @minLength 0 * The Name of the Notification Connector
* @maxLength 64 * @minLength 1
*/ */
name: string; name: string;
/** /**
* The Url of the Instance
* @format uri * @format uri
* @minLength 0 * @minLength 1
* @maxLength 2048
*/ */
url: string; url: string;
headers: Record<string, string>;
/** /**
* @minLength 0 * The HTTP Request Method to use for notifications
* @maxLength 8 * @minLength 1
*/ */
httpMethod: string; httpMethod: string;
/** /**
* @minLength 0 * The Request Body to use to send notifications
* @maxLength 4096 * @minLength 1
*/ */
body: string; body: string;
} /** The Request Headers to use to send notifications */
headers: Record<string, string>;
export interface NtfyRecord { /**
name?: string | null; * Unique Identifier of the DTO
endpoint?: string | null; * @minLength 16
username?: string | null; * @maxLength 64
password?: string | null; */
topic?: string | null; key: string;
/** @format int32 */
priority?: number;
} }
export interface ProblemDetails { export interface ProblemDetails {
@@ -352,12 +473,6 @@ export interface ProblemDetails {
[key: string]: any; [key: string]: any;
} }
export interface PushoverRecord {
name?: string | null;
appToken?: string | null;
user?: string | null;
}
export interface TrangaSettings { export interface TrangaSettings {
downloadLocation?: string | null; downloadLocation?: string | null;
userAgent?: string | null; userAgent?: string | null;