UNPKG

@nestjs-mod/files

Version:

Files module with an error filter, controller and rest-sdk for work with module from other nodejs appliaction

983 lines (982 loc) 27.1 kB
/** * * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from './configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import type { RequestArgs } from './base'; import { BaseAPI } from './base'; /** * * @export * @interface CreateWebhookDto */ export interface CreateWebhookDto { /** * * @type {string} * @memberof CreateWebhookDto */ 'eventName': string; /** * * @type {string} * @memberof CreateWebhookDto */ 'endpoint': string; /** * * @type {boolean} * @memberof CreateWebhookDto */ 'enabled': boolean; /** * * @type {object} * @memberof CreateWebhookDto */ 'headers'?: object | null; /** * * @type {number} * @memberof CreateWebhookDto */ 'requestTimeout'?: number | null; /** * * @type {string} * @memberof CreateWebhookDto */ 'workUntilDate'?: string | null; } /** * * @export * @interface FilesError */ export interface FilesError { /** * Files error (FILES-000), Forbidden (FILES-001) * @type {string} * @memberof FilesError */ 'message': string; /** * * @type {FilesErrorEnum} * @memberof FilesError */ 'code': FilesErrorEnum; /** * * @type {object} * @memberof FilesError */ 'metadata'?: object; } /** * * @export * @enum {string} */ export declare const FilesErrorEnum: { readonly Files000: "FILES-000"; readonly Files001: "FILES-001"; }; export type FilesErrorEnum = typeof FilesErrorEnum[keyof typeof FilesErrorEnum]; /** * * @export * @interface FilesPresignedUrls */ export interface FilesPresignedUrls { /** * * @type {string} * @memberof FilesPresignedUrls */ 'downloadUrl': string; /** * * @type {string} * @memberof FilesPresignedUrls */ 'uploadUrl': string; } /** * * @export * @interface FindManyResponseMeta */ export interface FindManyResponseMeta { /** * * @type {number} * @memberof FindManyResponseMeta */ 'curPage'?: number; /** * * @type {number} * @memberof FindManyResponseMeta */ 'perPage'?: number; /** * * @type {number} * @memberof FindManyResponseMeta */ 'totalResults': number; } /** * * @export * @interface FindManyWebhookLogResponse */ export interface FindManyWebhookLogResponse { /** * * @type {Array<WebhookLog>} * @memberof FindManyWebhookLogResponse */ 'webhookLogs': Array<WebhookLog>; /** * * @type {FindManyResponseMeta} * @memberof FindManyWebhookLogResponse */ 'meta': FindManyResponseMeta; } /** * * @export * @interface FindManyWebhookResponse */ export interface FindManyWebhookResponse { /** * * @type {Array<Webhook>} * @memberof FindManyWebhookResponse */ 'webhooks': Array<Webhook>; /** * * @type {FindManyResponseMeta} * @memberof FindManyWebhookResponse */ 'meta': FindManyResponseMeta; } /** * * @export * @interface StatusResponse */ export interface StatusResponse { /** * * @type {string} * @memberof StatusResponse */ 'message': string; } /** * * @export * @interface UpdateWebhookDto */ export interface UpdateWebhookDto { /** * * @type {string} * @memberof UpdateWebhookDto */ 'eventName'?: string; /** * * @type {string} * @memberof UpdateWebhookDto */ 'endpoint'?: string; /** * * @type {boolean} * @memberof UpdateWebhookDto */ 'enabled'?: boolean; /** * * @type {object} * @memberof UpdateWebhookDto */ 'headers'?: object | null; /** * * @type {number} * @memberof UpdateWebhookDto */ 'requestTimeout'?: number | null; /** * * @type {string} * @memberof UpdateWebhookDto */ 'workUntilDate'?: string | null; } /** * * @export * @interface Webhook */ export interface Webhook { /** * * @type {string} * @memberof Webhook */ 'id': string; /** * * @type {string} * @memberof Webhook */ 'eventName': string; /** * * @type {string} * @memberof Webhook */ 'endpoint': string; /** * * @type {boolean} * @memberof Webhook */ 'enabled': boolean; /** * * @type {object} * @memberof Webhook */ 'headers': object | null; /** * * @type {number} * @memberof Webhook */ 'requestTimeout': number | null; /** * * @type {string} * @memberof Webhook */ 'externalTenantId': string; /** * * @type {string} * @memberof Webhook */ 'createdBy': string; /** * * @type {string} * @memberof Webhook */ 'updatedBy': string; /** * * @type {string} * @memberof Webhook */ 'createdAt': string; /** * * @type {string} * @memberof Webhook */ 'updatedAt': string; /** * * @type {string} * @memberof Webhook */ 'workUntilDate': string | null; /** * * @type {WebhookUser} * @memberof Webhook */ 'WebhookUser_Webhook_createdByToWebhookUser'?: WebhookUser; /** * * @type {WebhookUser} * @memberof Webhook */ 'WebhookUser_Webhook_updatedByToWebhookUser'?: WebhookUser; /** * * @type {Array<WebhookLog>} * @memberof Webhook */ 'WebhookLog'?: Array<WebhookLog>; } /** * * @export * @interface WebhookEvent */ export interface WebhookEvent { /** * * @type {string} * @memberof WebhookEvent */ 'eventName': string; /** * * @type {string} * @memberof WebhookEvent */ 'description': string; /** * * @type {object} * @memberof WebhookEvent */ 'example': object; } /** * * @export * @interface WebhookLog */ export interface WebhookLog { /** * * @type {string} * @memberof WebhookLog */ 'id': string; /** * * @type {object} * @memberof WebhookLog */ 'request': object; /** * * @type {string} * @memberof WebhookLog */ 'responseStatus': string; /** * * @type {object} * @memberof WebhookLog */ 'response': object | null; /** * * @type {WebhookStatus} * @memberof WebhookLog */ 'webhookStatus': WebhookStatus; /** * * @type {string} * @memberof WebhookLog */ 'webhookId': string; /** * * @type {string} * @memberof WebhookLog */ 'externalTenantId': string; /** * * @type {string} * @memberof WebhookLog */ 'createdAt': string; /** * * @type {string} * @memberof WebhookLog */ 'updatedAt': string; /** * * @type {Webhook} * @memberof WebhookLog */ 'Webhook'?: Webhook; } /** * * @export * @enum {string} */ export declare const WebhookRole: { readonly Admin: "Admin"; readonly User: "User"; }; export type WebhookRole = typeof WebhookRole[keyof typeof WebhookRole]; /** * * @export * @enum {string} */ export declare const WebhookStatus: { readonly Pending: "Pending"; readonly Process: "Process"; readonly Success: "Success"; readonly Error: "Error"; readonly Timeout: "Timeout"; }; export type WebhookStatus = typeof WebhookStatus[keyof typeof WebhookStatus]; /** * * @export * @interface WebhookTestRequestResponse */ export interface WebhookTestRequestResponse { /** * * @type {object} * @memberof WebhookTestRequestResponse */ 'request': object; /** * * @type {string} * @memberof WebhookTestRequestResponse */ 'responseStatus': string; /** * * @type {object} * @memberof WebhookTestRequestResponse */ 'response': object | null; /** * * @type {WebhookStatus} * @memberof WebhookTestRequestResponse */ 'webhookStatus': WebhookStatus; } /** * * @export * @interface WebhookUser */ export interface WebhookUser { /** * * @type {string} * @memberof WebhookUser */ 'id': string; /** * * @type {string} * @memberof WebhookUser */ 'externalTenantId': string; /** * * @type {string} * @memberof WebhookUser */ 'externalUserId': string; /** * * @type {WebhookRole} * @memberof WebhookUser */ 'userRole': WebhookRole; /** * * @type {string} * @memberof WebhookUser */ 'createdAt': string; /** * * @type {string} * @memberof WebhookUser */ 'updatedAt': string; /** * * @type {Array<Webhook>} * @memberof WebhookUser */ 'Webhook_Webhook_createdByToWebhookUser'?: Array<Webhook>; /** * * @type {Array<Webhook>} * @memberof WebhookUser */ 'Webhook_Webhook_updatedByToWebhookUser'?: Array<Webhook>; } /** * FilesApi - axios parameter creator * @export */ export declare const FilesApiAxiosParamCreator: (configuration?: Configuration) => { /** * * @param {string} downloadUrl * @param {*} [options] Override http request option. * @throws {RequiredError} */ filesControllerDeleteFile: (downloadUrl: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {string} ext * @param {*} [options] Override http request option. * @throws {RequiredError} */ filesControllerGetPresignedUrl: (ext: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * FilesApi - functional programming interface * @export */ export declare const FilesApiFp: (configuration?: Configuration) => { /** * * @param {string} downloadUrl * @param {*} [options] Override http request option. * @throws {RequiredError} */ filesControllerDeleteFile(downloadUrl: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StatusResponse>>; /** * * @param {string} ext * @param {*} [options] Override http request option. * @throws {RequiredError} */ filesControllerGetPresignedUrl(ext: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FilesPresignedUrls>>; }; /** * FilesApi - factory interface * @export */ export declare const FilesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * * @param {string} downloadUrl * @param {*} [options] Override http request option. * @throws {RequiredError} */ filesControllerDeleteFile(downloadUrl: string, options?: RawAxiosRequestConfig): AxiosPromise<StatusResponse>; /** * * @param {string} ext * @param {*} [options] Override http request option. * @throws {RequiredError} */ filesControllerGetPresignedUrl(ext: string, options?: RawAxiosRequestConfig): AxiosPromise<FilesPresignedUrls>; }; /** * FilesApi - object-oriented interface * @export * @class FilesApi * @extends {BaseAPI} */ export declare class FilesApi extends BaseAPI { /** * * @param {string} downloadUrl * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FilesApi */ filesControllerDeleteFile(downloadUrl: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<StatusResponse, any>>; /** * * @param {string} ext * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FilesApi */ filesControllerGetPresignedUrl(ext: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FilesPresignedUrls, any>>; } /** * WebhookApi - axios parameter creator * @export */ export declare const WebhookApiAxiosParamCreator: (configuration?: Configuration) => { /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerCreateOne: (createWebhookDto: CreateWebhookDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerDeleteOne: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerEvents: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerFindMany: (curPage?: number, perPage?: number, searchText?: string, sort?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerFindOne: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerProfile: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerTestRequest: (createWebhookDto: CreateWebhookDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {string} id * @param {UpdateWebhookDto} updateWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerUpdateOne: (id: string, updateWebhookDto: UpdateWebhookDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerDeleteOne: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {string} webhookId * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerFindManyLogs: (webhookId: string, curPage?: number, perPage?: number, searchText?: string, sort?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerFindOne: (id: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * WebhookApi - functional programming interface * @export */ export declare const WebhookApiFp: (configuration?: Configuration) => { /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerCreateOne(createWebhookDto: CreateWebhookDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Webhook>>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerDeleteOne(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StatusResponse>>; /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerEvents(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<WebhookEvent>>>; /** * * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerFindMany(curPage?: number, perPage?: number, searchText?: string, sort?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FindManyWebhookResponse>>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerFindOne(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Webhook>>; /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerProfile(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookUser>>; /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerTestRequest(createWebhookDto: CreateWebhookDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookTestRequestResponse>>; /** * * @param {string} id * @param {UpdateWebhookDto} updateWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerUpdateOne(id: string, updateWebhookDto: UpdateWebhookDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Webhook>>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerDeleteOne(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StatusResponse>>; /** * * @param {string} webhookId * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerFindManyLogs(webhookId: string, curPage?: number, perPage?: number, searchText?: string, sort?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FindManyWebhookLogResponse>>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerFindOne(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WebhookLog>>; }; /** * WebhookApi - factory interface * @export */ export declare const WebhookApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerCreateOne(createWebhookDto: CreateWebhookDto, options?: RawAxiosRequestConfig): AxiosPromise<Webhook>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerDeleteOne(id: string, options?: RawAxiosRequestConfig): AxiosPromise<StatusResponse>; /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerEvents(options?: RawAxiosRequestConfig): AxiosPromise<Array<WebhookEvent>>; /** * * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerFindMany(curPage?: number, perPage?: number, searchText?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<FindManyWebhookResponse>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerFindOne(id: string, options?: RawAxiosRequestConfig): AxiosPromise<Webhook>; /** * * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerProfile(options?: RawAxiosRequestConfig): AxiosPromise<WebhookUser>; /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerTestRequest(createWebhookDto: CreateWebhookDto, options?: RawAxiosRequestConfig): AxiosPromise<WebhookTestRequestResponse>; /** * * @param {string} id * @param {UpdateWebhookDto} updateWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookControllerUpdateOne(id: string, updateWebhookDto: UpdateWebhookDto, options?: RawAxiosRequestConfig): AxiosPromise<Webhook>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerDeleteOne(id: string, options?: RawAxiosRequestConfig): AxiosPromise<StatusResponse>; /** * * @param {string} webhookId * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerFindManyLogs(webhookId: string, curPage?: number, perPage?: number, searchText?: string, sort?: string, options?: RawAxiosRequestConfig): AxiosPromise<FindManyWebhookLogResponse>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookLogsControllerFindOne(id: string, options?: RawAxiosRequestConfig): AxiosPromise<WebhookLog>; }; /** * WebhookApi - object-oriented interface * @export * @class WebhookApi * @extends {BaseAPI} */ export declare class WebhookApi extends BaseAPI { /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerCreateOne(createWebhookDto: CreateWebhookDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Webhook, any>>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerDeleteOne(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<StatusResponse, any>>; /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerEvents(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookEvent[], any>>; /** * * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerFindMany(curPage?: number, perPage?: number, searchText?: string, sort?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FindManyWebhookResponse, any>>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerFindOne(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Webhook, any>>; /** * * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerProfile(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookUser, any>>; /** * * @param {CreateWebhookDto} createWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerTestRequest(createWebhookDto: CreateWebhookDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookTestRequestResponse, any>>; /** * * @param {string} id * @param {UpdateWebhookDto} updateWebhookDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookControllerUpdateOne(id: string, updateWebhookDto: UpdateWebhookDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Webhook, any>>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookLogsControllerDeleteOne(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<StatusResponse, any>>; /** * * @param {string} webhookId * @param {number} [curPage] * @param {number} [perPage] * @param {string} [searchText] * @param {string} [sort] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookLogsControllerFindManyLogs(webhookId: string, curPage?: number, perPage?: number, searchText?: string, sort?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FindManyWebhookLogResponse, any>>; /** * * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhookApi */ webhookLogsControllerFindOne(id: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<WebhookLog, any>>; }