@experteam-mx/ngx-services
Version:
Angular common services for Experteam apps
196 lines (195 loc) • 5.52 kB
TypeScript
import { CountryPaymentType, CountryPaymentTypeField, Customer, CustomerCountryDocumentType, CustomerType, Document, DocumentRequests, DocumentStatus, PaymentType, PaymentTypeFieldAccount, PaymentTypeFieldCardType, Tolerance } from './api-invoices.interfaces';
export interface OperationAccountPaymentIn {
document_type_range_id: number | null;
document_number: string | null;
observation: string | null;
document_date: string | null;
total_amount: number;
country_reference_currency_id: number;
customer: {
company_name: string;
full_name: string;
account_number: string;
country_id: number;
};
payments: AccountPayment[];
}
export type AccountPayment = {
country_payment_type_id: number;
country_reference_currency_id: number;
amount: number;
exchange: string;
due_date: string;
received: number;
status?: boolean;
details?: {};
};
export interface OperationAccountPaymentOut {
document: Document;
transaction_id: string;
}
export type PrintCollectionReceiptOut = {
collection_receipt: string;
};
export type CancelPaymentReceiptIn = {
document_id: number;
is_canceled_invoice: boolean;
cancellation_reason_id: number;
};
export type OperationCancelBillingIn = {
invoiceId: number;
cancellation_reason_id: number;
cancel_payment: boolean;
send_shipments: boolean;
local_cancel?: boolean;
};
export type OperationCancelBillingOut = {
creditNoteDocument: Document | null;
};
export type OperationDocumentIn = {
country_document_type_id: number;
document_id: number;
customer: {
customer_type_id: number;
company_name: string;
full_name: string;
email: string;
phone_code: string | null;
phone_number: string | null;
address_line1: string | null;
address_line2: string | null;
address_line3: string | null;
identification_number: string;
identification_type_id: number;
postal_code: string | null;
state: string | null;
county_name: string | null;
city_name: string | null;
country_id: number;
extra_fields: {
[key: string]: string | number | boolean;
} | null;
};
document_extra_fields: {
[key: string]: string | number | boolean;
} | null;
};
export type OperationDocumentOut = {
document: Document;
};
export type InvoiceTypeCustomParamsIn = {
identificationNumber: string;
identificationTypeid: number;
};
export type OperationPrintDocumentOut = {
document: string;
};
export type CustomerTypesOut = {
customer_types: CustomerType[];
total: number;
};
export type CustomersOut = {
customers: Customer[];
};
export type OperationShipmentExternalOut = {
document: Document;
};
export type OperationShipmentExternalIn = {};
export type CustomerDocumentTypesOut = {
customer_country_document_types: CustomerCountryDocumentType[];
total: number;
};
export type CountryPaymentTypesOut = {
country_payment_types: CountryPaymentType[];
total: number;
};
export type CountryPaymentTypeOut = {
country_payment_type: CountryPaymentType;
};
export type CountryPaymentTypeIn = {
payment_type_id: number;
country_id: number;
name: string;
billing_payment_code: string;
can_tolerance: boolean;
is_active: boolean;
};
export type CountryPaymentTypeFieldsOut = {
country_payment_type_fields: CountryPaymentTypeField[];
total: number;
};
export type CountryPaymentTypeFieldOut = {
country_payment_type_field: CountryPaymentTypeField;
};
export type CountryPaymentTypeFieldIn = {
country_payment_type_id: number;
code: string;
name: string;
description: string | null;
format: string;
is_required: boolean;
catalog: string[] | null;
is_interface: boolean;
};
export type PaymentTypesOut = {
payment_types: PaymentType[];
total: number;
};
export type PaymentTypeFieldCardTypesOut = {
country_payment_type_field_card_types: PaymentTypeFieldCardType[];
total: number;
};
export type PaymentTypeFieldCardTypeIn = {
country_payment_type_field_id: number;
name: string;
code: string;
accountable_account: string;
is_active: boolean;
};
export type PaymentTypeFieldCardTypeOut = {
country_payment_type_field_card_type: PaymentTypeFieldCardType;
};
export type PaymentTypeFieldAccountsOut = {
country_payment_type_field_accounts: PaymentTypeFieldAccount[];
total: number;
};
export type PaymentTypeFieldAccountIn = {
country_payment_type_field_id: number;
name: string;
account: string;
accountable_account: string;
currency_id: number;
is_active: boolean;
};
export type PaymentTypeFieldAccountOut = {
country_payment_type_field_account: PaymentTypeFieldAccount;
};
export type TolerancesOut = {
tolerances: Tolerance[];
total: number;
};
export type ToleranceIn = {
company_country_id: number;
tolerance_type: number;
min_amount: number;
max_amount: number;
tolerance: number;
is_active: boolean;
};
export type ToleranceOut = {
tolerance: Tolerance;
};
export type OperationDocumentRequestsOut = {
requests: DocumentRequests[];
};
export type GetDocumentsOut = {
documents: Document[];
total: number;
};
export type DocumentStatusesOut = {
document_status: DocumentStatus[];
total: number;
};
export type OperationPrintXmlOut = {
xml: string;
};