@bit-ui-libs/common
Version:
This library was generated with [Nx](https://nx.dev).
41 lines (36 loc) • 1.02 kB
text/typescript
import { FilteredRequest } from '../../common';
import { DocumentStatusEnum } from '../enums';
import { DocumentsService } from './documents.service';
export interface WithDocumentsService {
documents: DocumentsService;
}
export type ListDocumentsRequest = FilteredRequest<{
docId?: string;
userId?: string;
typeId?: string;
status?: DocumentStatusEnum;
}>;
// Documents API has a simpler model for Attachments,
// as opposed to the the other AttachmentData from common
export interface BitDocumentAttachmentData {
name: string;
data?: string;
url?: string;
}
export interface AddDocumentRequest {
docId?: string;
profileId: string;
userId?: string;
typeId?: number;
// Despite being defined as optional in the API,
// the backend still requires this, for some reason
number: string;
attachments?: BitDocumentAttachmentData[];
}
export interface EditDocumentRequest {
docId: string;
profileId: string;
typeId: number;
number: string;
attachments: BitDocumentAttachmentData[];
}