UNPKG

@universis/docutracks

Version:

Implementation of document numbering services hosted by docutracks

50 lines (49 loc) 1.71 kB
import { IApplication } from '@themost/common'; import { DataContext } from '@themost/data'; import { DefaultDocumentNumberService, DocumentNumberSeries, DocumentNumberSeriesItem } from '@universis/docnumbers'; export declare interface DocutracksConfiguration { server: string; user: string; password: string; } declare interface GetUserResponse { User: { Id: number; UserName: string; FirstName: string; LastName: string; DisplayName: string; Email: string; IsAdministrator: boolean; HasDigitalSignatureToken: boolean; IsContentEditor: boolean; ContainerId: number; ReceivesUserNotifications: boolean; ReceivesAssignNotifications: boolean; ReceivesCPNotifications: boolean; }; } export declare class LoginError extends Error { constructor(); } export declare class InvalidIdentifierError extends Error { constructor(); } export declare class DocutracksNumberService extends DefaultDocumentNumberService { options: DocutracksConfiguration; private headers; constructor(app: IApplication); /** * Validates the content type of the given response * @param {Response} response */ private validateContentType; protected login(): Promise<any>; private getGroupFrom; next(context: DataContext, documentSeries: DocumentNumberSeries, extraAttributes?: any): Promise<any>; getUser(name: string): Promise<GetUserResponse>; getGroups(): Promise<any>; add(context: DataContext, file: string, item: DocumentNumberSeriesItem): any; replace(context: DataContext, file: string, item: DocumentNumberSeriesItem): any; } export {};