UNPKG

nd-common

Version:

83 lines (82 loc) 4.45 kB
import { HttpClient, HttpResponse } from "@angular/common/http"; import { Observable } from 'rxjs'; import { RecentDocumentType, IDocumentModel, IListViewResponse, IController, IGetParameters, IPutParameters, IPostParameters } from "nd-common"; import { RestAPIBaseService } from "../base.service"; import { ITokenController } from "../nd_token_controller"; export declare class DocumentControllerService extends RestAPIBaseService implements IController { private h; controllerUrl: string; constructor(h: HttpClient, _token: ITokenController); /** * Fetches information of the specified document. * * Queryable items: * [select] A comma separated list of strings that define what data should be returned in the request. * See OptionalAttributes for a complete list of attribute flags that control what is returned. * These strings can also define the custom attributes to be returned. This is done by specifying * the custom attribute number (in string form). If any descriptions are required for the * specified custom attributes, please add a leading \"1\" to the string form of the custom attribute number. * p [id] the id of the document to fetch information on. */ getInfo(p: IGetParameters): Observable<IDocumentModel>; /** * Fetches information of the specified documents. * * Queryable items: * [select] A comma separated list of strings that define what data should be returned in the request. * See OptionalAttributes for a complete list of attribute flags that control what is returned. * These strings can also define the custom attributes to be returned. This is done by specifying * the custom attribute number (in string form). If any descriptions are required for the * specified custom attributes, please add a leading \"1\" to the string form of the custom attribute number. * p - List of documents to retrieve information for. Should be a comma separated list of envelope and/or document ids. */ getListOfDocuments(p: IGetParameters): Observable<IDocumentModel[]>; /** * Get list of recent documents */ getRecent(p: any, documentType: RecentDocumentType, lastModifiedDate?: string): Observable<HttpResponse<IListViewResponse>>; /** * Get GrantAccessRequest appurl and error Text */ getGrantAccessRequestInfo(p: IGetParameters): Observable<any>; /** * Fetches information of the specified document's linked documents. * * Queryable items: * [select] A comma separated list of strings that define what data should be returned in the request. * See OptionalAttributes (SelectParameters) for a complete list of attribute flags that control what is returned. * These strings can also define the custom attributes to be returned. This is done by specifying * the custom attribute number (in string form). If any descriptions are required for the * specified custom attributes, please add a leading \"1\" to the string form of the custom attribute number. * p [id] the id of the document to fetch information on it's linked documents. */ getLinkedDocuments(p: IGetParameters): Observable<IDocumentModel[]>; /** * Puts new version of document. * Uses first rest api. * p contains document id and IVersion as body */ putNewVersion(p: IPutParameters): Observable<null>; /** * Check in a document * p should include: * { string } id Document id. * p may include: * { File } [file] Optional file object to check in. * { string } [extension] New file extension.Only used in conjunction with file. * { boolean } [notify] If true, email will be sent to user who checked out the document. */ checkIn(p: IPostParameters): Observable<any>; /** Upload new version contents * {File} file File to upload * {string} id Document id * {string} [extension] New file extension * {string} [verName] New version name */ putNewVersionContents(p: IPutParameters): Observable<null>; /** Retrieve document history * id Document id. * order Can take two values, either "none" (the default) or "chronological". If another value is used, simply apply "none". */ getHistory(p: IGetParameters): Observable<any>; }