n8n-nodes-seclore/dist/nodes/SecloreProtect/Services/SecloreDRMApiService.d.ts

21 lines
1.8 KiB
TypeScript
Raw Normal View History

import { IExecuteFunctions } from 'n8n-workflow';
import { IFileUploadResponse, IFileDownloadResponse, IFileDeleteResponse } from './Interfaces/FileStorageInterfaces';
import { ILoginResponse } from './Interfaces/LoginInterfaces';
import { IProtectWithExternalRefIdRequest, IProtectWithExternalRefIdResponse, IProtectWithFileIdRequest, IProtectWithFileIdResponse, IProtectWithHotFolderRequest, IProtectWithHotFolderResponse } from './Interfaces/ProtectInterfaces';
import { IUnprotectRequest, IUnprotectResponse } from './Interfaces/UnprotectInterfaces';
export declare class SecloreDRMApiService {
private context;
private baseUrl;
constructor(context: IExecuteFunctions, baseUrl: string);
private handleHttpError;
login(tenantId: string, tenantSecret: string, correlationId?: string): Promise<ILoginResponse>;
refreshToken(refreshToken: string, correlationId?: string): Promise<ILoginResponse>;
protectWithExternalRefId(protectRequest: IProtectWithExternalRefIdRequest, accessToken: string, correlationId?: string): Promise<IProtectWithExternalRefIdResponse>;
protectWithFileId(protectRequest: IProtectWithFileIdRequest, accessToken: string, correlationId?: string): Promise<IProtectWithFileIdResponse>;
protectWithHotFolder(protectRequest: IProtectWithHotFolderRequest, accessToken: string, correlationId?: string): Promise<IProtectWithHotFolderResponse>;
unprotect(unprotectRequest: IUnprotectRequest, accessToken: string, correlationId?: string): Promise<IUnprotectResponse>;
uploadFile(fileBuffer: Uint8Array, fileName: string, accessToken: string, correlationId?: string): Promise<IFileUploadResponse>;
downloadFile(fileStorageId: string, accessToken: string, correlationId?: string): Promise<IFileDownloadResponse>;
deleteFile(fileStorageId: string, accessToken: string, correlationId?: string): Promise<IFileDeleteResponse>;
}