UNPKG

@accounter/server

Version:

32 lines (31 loc) 4.88 kB
import { Injector } from 'graphql-modules'; import type { Document, DocumentInputNew_Input, DocumentLang, ExpenseDocumentType, Currency as GreenInvoiceCurrency, DocumentType as GreenInvoiceDocumentType, mutationInput_addDocument_input_allOf_0_discount_type, mutationInput_addDocument_input_allOf_0_linkType, mutationInput_addDocument_input_allOf_0_payment_items_appType, mutationInput_addDocument_input_allOf_0_payment_items_cardType, mutationInput_addDocument_input_allOf_0_payment_items_dealType, mutationInput_addDocument_input_allOf_0_payment_items_subType, mutationInput_addDocument_input_allOf_0_payment_items_type, VatType } from '../../../../../green-invoice-graphql/src/index.js'; import type { document_status } from '../../documents/types'; import { Currency, DocumentType, GreenInvoicePaymentType, NewDocumentInfo, NewDocumentInput, type GreenInvoiceDiscountType, type GreenInvoiceDocumentLang, type GreenInvoiceLinkType, type GreenInvoicePaymentAppType, type GreenInvoicePaymentCardType, type GreenInvoicePaymentDealType, type GreenInvoicePaymentSubType, type GreenInvoiceVatType } from '../../../__generated__/types.js'; export declare function normalizeDocumentType(rawType?: GreenInvoiceDocumentType | ExpenseDocumentType | number | null): DocumentType; export declare function getGreenInvoiceDocumentType(documentType: DocumentType): GreenInvoiceDocumentType; export declare function getTypeFromGreenInvoiceDocument(documentType: GreenInvoiceDocumentType): DocumentType; export declare function getGreenInvoiceDocumentNameFromType(documentType: DocumentType | GreenInvoiceDocumentType): string; export declare function getGreenInvoiceDocumentLanguage(lang: GreenInvoiceDocumentLang): DocumentLang; export declare function getLanguageFromGreenInvoiceDocument(lang: DocumentLang): GreenInvoiceDocumentLang; export declare function getGreenInvoiceDocumentVatType(vatType: GreenInvoiceVatType): VatType; export declare function getVatTypeFromGreenInvoiceDocument(vatType: VatType): GreenInvoiceVatType; export declare function getGreenInvoiceDocumentDiscountType(discountType: GreenInvoiceDiscountType): mutationInput_addDocument_input_allOf_0_discount_type; export declare function getGreenInvoiceDocumentPaymentType(type: GreenInvoicePaymentType): mutationInput_addDocument_input_allOf_0_payment_items_type; export declare function getTypeFromGreenInvoiceDocumentPayment(type: mutationInput_addDocument_input_allOf_0_payment_items_type): GreenInvoicePaymentType; export declare function getGreenInvoiceDocumentPaymentSubType(subType: GreenInvoicePaymentSubType): mutationInput_addDocument_input_allOf_0_payment_items_subType; export declare function getSubTypeFromGreenInvoiceDocumentPayment(subType: mutationInput_addDocument_input_allOf_0_payment_items_subType): GreenInvoicePaymentSubType; export declare function getGreenInvoiceDocumentPaymentAppType(appType: GreenInvoicePaymentAppType): mutationInput_addDocument_input_allOf_0_payment_items_appType; export declare function getPaymentAppTypeFromGreenInvoiceDocument(appType: mutationInput_addDocument_input_allOf_0_payment_items_appType): GreenInvoicePaymentAppType; export declare function getGreenInvoiceDocumentPaymentCardType(cardType: GreenInvoicePaymentCardType): mutationInput_addDocument_input_allOf_0_payment_items_cardType; export declare function getCardTypeFromGreenInvoiceDocumentPayment(cardType: mutationInput_addDocument_input_allOf_0_payment_items_cardType): GreenInvoicePaymentCardType; export declare function getGreenInvoiceDocumentPaymentDealType(dealType: GreenInvoicePaymentDealType): mutationInput_addDocument_input_allOf_0_payment_items_dealType; export declare function getDealTypeFromGreenInvoiceDocumentPayment(dealType: mutationInput_addDocument_input_allOf_0_payment_items_dealType): GreenInvoicePaymentDealType; export declare function getGreenInvoiceDocumentLinkType(linkType: GreenInvoiceLinkType): mutationInput_addDocument_input_allOf_0_linkType; export declare function convertCurrencyToGreenInvoice(currency: Currency): GreenInvoiceCurrency; export declare function greenInvoiceToDocumentStatus(greenInvoiceStatus: number): document_status; export declare function getLinkedDocuments(injector: Injector, externalDocumentId: string): Promise<string[] | null>; export declare function insertNewDocumentFromGreenInvoice(injector: Injector, greenInvoiceDoc: Document, ownerId: string, preDictatedChargeId?: string | null): Promise<import("../../documents/types").IInsertDocumentsResult>; export declare function getGreenInvoiceDocuments(injector: Injector, recursive?: boolean): Promise<Document[]>; export declare function convertDocumentInputIntoGreenInvoiceInput(initialInput: NewDocumentInput, injector: Injector): Promise<DocumentInputNew_Input>; export declare function convertGreenInvoiceDocumentToLocalDocumentInfo(greenInvoiceDocument: Document): NewDocumentInfo;