myinvois-sdk
Version:
TypeScript SDK for interacting with the Malaysia e-invoicing system (MyInvois) API
52 lines (51 loc) • 2.06 kB
TypeScript
import { HttpClient } from '../utils/http-client';
import { AuthService } from './auth-service';
import { MyInvoisConfig } from '../config';
/**
* Service for document operations
*/
export declare class DocumentService {
private httpClient;
private authService;
private config;
/**
* Creates a new document service
* @param httpClient The HTTP client to use
* @param authService The authentication service to use
* @param config The MyInvois configuration
*/
constructor(httpClient: HttpClient, authService: AuthService, config: MyInvoisConfig);
/**
* Get document status
* @param documentUuid The UUID of the document
* @param taxpayerTIN The taxpayer's TIN (for whom the document was created)
* @param authTIN The TIN to use for authentication
* @returns A promise resolving to the document status
*/
getDocumentStatus(documentUuid: string, taxpayerTIN?: string, authTIN?: string): Promise<any>;
/**
* Get submission details
* @param submissionUuid The UUID of the submission
* @param taxpayerTIN The taxpayer's TIN (for whom the submission was made)
* @param authTIN The TIN to use for authentication
* @param pageNo The page number (default: 1)
* @param pageSize The page size (default: 100)
* @returns A promise resolving to the submission details
*/
getSubmissionDetails(submissionUuid: string, taxpayerTIN?: string, authTIN?: string, pageNo?: number, pageSize?: number): Promise<any>;
/**
* List documents
* @param taxpayerTIN The taxpayer's TIN (for whom the documents were created)
* @param authTIN The TIN to use for authentication
* @param options The query options
* @returns A promise resolving to the list of documents
*/
listDocuments(taxpayerTIN?: string, authTIN?: string, options?: {
pageNo?: number;
pageSize?: number;
documentNumber?: string;
fromDate?: string;
toDate?: string;
status?: string;
}): Promise<any>;
}