tvpl.api

<back to all web services

SearchWorkflowRequest

Requires Authentication
The following routes are available for this service:
GET/workflow/search

export class PagingRequest
{
    public page: number;
    public limit: number;

    public constructor(init?: Partial<PagingRequest>) { (Object as any).assign(this, init); }
}

export class SearchWorkflowRequest extends PagingRequest
{
    public keyword?: string;
    public isInstance?: boolean;
    public isActive?: boolean;
    public documentTypeId?: number;
    public mainId?: number;
    public accountId?: number;
    public departmentId?: number;

    public constructor(init?: Partial<SearchWorkflowRequest>) { super(init); (Object as any).assign(this, init); }
}

export class MongoObject implements IMongoModel
{
    public id: string;

    public constructor(init?: Partial<MongoObject>) { (Object as any).assign(this, init); }
}

export class AuditLog extends MongoObject implements IEntityId, ICreated, IUpdate
{
    public userName?: string;
    public userId?: number;
    public documentId: number;
    public action: string;
    public description: string;
    public createdDate: string;
    public updatedDate: string;
    public ipAddress?: string;
    public userAgent?: string;

    public constructor(init?: Partial<AuditLog>) { super(init); (Object as any).assign(this, init); }
}

export class Pagination
{
    public total: number;
    public pages: number;
    public offset: number;
    public limit: number;
    public currentPage: number;

    public constructor(init?: Partial<Pagination>) { (Object as any).assign(this, init); }
}

export class PageResponse<AuditLog> implements IResponseRequest
{
    public code: number;
    public message: string;
    public data: AuditLog[];
    public pagination: Pagination;

    public constructor(init?: Partial<PageResponse<AuditLog>>) { (Object as any).assign(this, init); }
}

TypeScript SearchWorkflowRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /workflow/search HTTP/1.1 
Host: qlcn-api.vsmlab.vn 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	code: 0,
	message: String,
	data: 
	[
		{
			id: 0,
			title: String,
			description: String,
			documentCode: String,
			documentTypeId: 0,
			isInstance: False,
			mainId: 0,
			isActive: False,
			statusId: 0,
			accountId: 0,
			departmentId: 0,
			scopeType: 2,
			createdBy: String,
			updatedBy: String,
			updatedAt: "0001-01-01T00:00:00.0000000+07:06"
		}
	]
}