@experteam-mx/ngx-services
Version:
Angular common services for Experteam apps
166 lines (165 loc) • 4.69 kB
TypeScript
import { CountryPaymentType, CountryPaymentTypeField, Customer, CustomerType, Document, PaymentType, PaymentTypeFieldAccount, PaymentTypeFieldCardType } from './api-invoices.interfaces';
import { CustomerCountryDocumentType } from './api-billing.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;
customer: {
company_name: string;
full_name: string;
email: string;
phone_code: string;
phone_number: string;
address_line1: string;
address_line2: string;
address_line3: string;
identification_number: string;
identification_type_id: number;
postal_code: string;
state: string;
county_name: string;
city_name: string;
country_id: number;
extra_fields: {
[key: string]: string;
};
};
document_extra_fields: {
[key: string]: string;
};
};
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;
format: string;
is_required: boolean;
catalog: [] | 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;
};