UNPKG

@gsb-core/core

Version:

GSB core services and classes for platform-independent web applications

926 lines (925 loc) 24.9 kB
import { GsbUsageLimit } from "./gsb-function.model"; import { GsbUser, GsbContact, GsbRole } from "./gsb-user.model"; import { GsbFile } from "./gsb-file.model"; import { GsbTag } from "./gsb-tag.model"; import { GsbCategory } from "./gsb-category.model"; import { GsbCodeGenerator } from "./gsb-entity-def.model"; export declare class GsbSubscriptionPlan { _entDefName?: string; createDate?: Date; lastUpdateDate?: Date; nextPaymentDate?: Date; id?: string; paymentType?: PaymentType; lastPaymentDate?: Date; lastUpdatedBy?: GsbUser; payments?: GsbPrtPayment[]; creditCard?: GsbPrtCreditCard; createdBy?: GsbUser; paymentOption?: GsbPrtPaymentOption; lastUpdatedBy_id?: string; nextPaymentAmount?: number; paymentOption_id?: string; currency?: GsbPrtCurrency; createdBy_id?: string; creditCard_id?: string; subscriptions?: GsbSubscription[]; currency_id?: string; title?: string; startDate?: Date; orders?: GsbPrtOrder[]; tenant?: GsbTenant; salesPack?: GsbPrtSalesPack; status?: SubscriptionPlanStatus; partner_id?: string; partner?: GsbPrtPartner; tenant_id?: string; salesPack_id?: string; constructor(obj?: Partial<GsbSubscriptionPlan>); } export declare enum PaymentType { CreditCardOnline = 2, CreditCardManuel = 4, Cash = 8, BankTransfer = 1 } export declare enum SubscriptionPlanStatus { Active = 1, Freezed = 2, Cancelled = 4, Renewing = 8 } export declare class GsbSubscription { _entDefName?: string; plan_id?: string; lastPaymentAmount?: number; plan?: GsbSubscriptionPlan; active?: boolean; createDate?: Date; title?: string; productVariant?: GsbPrtProductVariant; lastUpdateDate?: Date; usedQuantity?: number; provision_id?: string; endDate?: Date; tenant_id?: string; service_id?: string; productVariant_id?: string; lastPaymentCoverage?: number; id?: string; quantity?: number; providerCode?: string; serviceCode?: string; tenant?: GsbTenant; startDate?: Date; createdBy?: GsbUser; lastUpdatedBy?: GsbUser; lastPaymentDate?: Date; renewQuantity?: number; createdBy_id?: string; lastUpdatedBy_id?: string; constructor(obj?: Partial<GsbSubscription>); } export declare class GsbPrtPayment { _entDefName?: string; basket_id?: string; trigger_id?: string; employee_id?: string; subscriptionPlan_id?: string; isAuto?: boolean; senderLegal_id?: string; failOrder?: GsbPrtOrder; lastUpdatedBy_id?: string; paymentOption?: GsbPrtPaymentOption; registration_id?: string; creditCard_id?: string; id?: string; order_id?: string; senderLegal?: GsbPrtLegalEntity; direction?: TransactionDirection; sessionToken?: string; lastUpdatedBy?: GsbUser; amount?: number; createDate?: Date; paymentOption_id?: string; invoice?: GsbPrtInvoice; order?: GsbPrtOrder; message?: string; senderPartner_id?: string; senderPartner?: GsbPrtPartner; receiverPartner_id?: string; receiverPartner?: GsbPrtPartner; currency_id?: string; invoice_id?: string; tenant_id?: string; registration?: GsbCmRegistration; title?: string; salesPack?: GsbPrtSalesPack; lastUpdateDate?: Date; salesPack_id?: string; creditCard?: GsbPrtCreditCard; trackVersion?: string; status?: PaymentStatus; code?: string; failOrder_id?: string; currency?: GsbPrtCurrency; expense_id?: string; receiverLegal?: GsbPrtLegalEntity; paymentLogs?: GsbPrtPaymentLog[]; createdBy_id?: string; receiverLegal_id?: string; createdBy?: GsbUser; subscriptionPlan?: GsbSubscriptionPlan; tenant?: GsbTenant; constructor(obj?: Partial<GsbPrtPayment>); } export declare enum TransactionDirection { Incoming = 1, None = 4, Outgoing = 2 } export declare enum PaymentStatus { Awaiting = 1, Completed = 2, Failed = 4, Cancelled = 8, Refunded = 16 } export declare class GsbPrtPaymentLog { _entDefName?: string; createDate?: Date; lastUpdatedBy_id?: string; lastUpdateDate?: Date; payment?: GsbPrtPayment; violatorParam?: string; order_id?: string; createdBy_id?: string; response?: string; title?: string; request?: string; id?: string; message?: string; order?: GsbPrtOrder; payment_id?: string; status?: number; lastUpdatedBy?: GsbUser; createdBy?: GsbUser; constructor(obj?: Partial<GsbPrtPaymentLog>); } export declare class GsbCmRegistration { _entDefName?: string; promotion?: any; paymentOption?: any; paymentOption_id?: string; currency?: any; verifications?: any[]; createdBy?: any; name?: string; paymentToken?: string; verification?: any; status?: number; validationCode?: string; verificationKey?: string; lastUpdatedBy_id?: string; registration?: any; subscriptionPlan_id?: string; surname?: string; verification_id?: string; creditCard_id?: string; order_id?: string; registration_id?: string; lastUpdateDate?: Date; id?: string; currency_id?: string; salesPack_id?: string; title?: string; email?: string; payment_id?: string; updatedRegistrations?: any[]; lastUpdatedBy?: any; subscriptionPlan?: GsbSubscriptionPlan; creditCard?: any; tenant?: any; savePaymentInfo?: boolean; billingType?: number; salesPack?: any; phoneNumber?: string; createdBy_id?: string; transferCode?: string; tenant_id?: string; partner_id?: string; emailVerified?: boolean; order?: any; partner?: any; payment?: any; provisions?: any[]; socialToken?: string; type?: number; password?: string; createDate?: Date; picture?: string; socialProvider?: number; constructor(obj?: Partial<GsbCmRegistration>); } export declare class GsbTenant { _entDefName?: string; orders?: GsbPrtOrder[]; backupSchedule?: string; lastUpdateDate?: Date; description?: string; lastUpdatedBy?: GsbUser; users?: GsbUser[]; title?: string; createDate?: Date; dataCenter_id?: string; id?: string; backupCount?: number; payments?: GsbPrtPayment[]; createdBy?: GsbUser; partner?: GsbPrtPartner; subscriptions?: GsbSubscription[]; cluster_id?: string; subcriptionPlans?: GsbSubscriptionPlan[]; connections?: string; partner_id?: string; lastUpdatedBy_id?: string; createdBy_id?: string; originalTenant_id?: string; code?: string; name?: string; usages?: GsbUsage[]; subscriptionType?: SubscriptionType; constructor(obj?: Partial<GsbTenant>); } export interface GsbUsage { id?: string; title?: string; createdBy_id?: string; createdBy?: GsbUser; lastUpdatedBy_id?: string; lastUpdatedBy?: GsbUser; lastUpdateDate?: Date; createDate?: Date; limit?: GsbUsageLimit; tenant_id?: string; tenant?: GsbTenant; quantity?: number; lastReset?: Date; limit_id?: string; } export declare enum SubscriptionType { Free = 1, Premium = 2, Professional = 4, Team = 8, Enterprise = 16 } export interface GsbPrtCreditCard { tenant_id?: string; registrations?: GsbCmRegistration[]; partner_id?: string; lastUpdateDate?: Date; paymentRefCode?: string; partner?: GsbPrtPartner; createdBy_id?: string; cardNumber?: string; title?: string; subscriptionPlans?: GsbSubscriptionPlan[]; tenant?: GsbTenant; lastUpdatedBy_id?: string; createdBy?: GsbUser; securityCode?: string; createDate?: Date; id?: string; payments?: GsbPrtPayment[]; expireDate?: string; lastUpdatedBy?: GsbUser; cardHolder?: string; } export declare class GsbPrtOrder { _entDefName?: string; registration?: GsbCmRegistration; type?: OrderType; payment?: GsbPrtPayment; payment_id?: string; receiveAddress_id?: string; accountRecord_id?: string; id?: string; providerPartner_id?: string; trackVersion?: string; salesPack_id?: string; startDate?: Date; totalPrice?: number; tenant?: GsbTenant; currency_id?: string; receiverPartner_id?: string; salesPack?: GsbPrtSalesPack; price?: number; origin?: PaymentOrigin; subscriptionPlan_id?: string; note?: string; currency?: GsbPrtCurrency; lastUpdatedBy?: GsbUser; createdBy?: GsbUser; lastPaymentDate?: Date; providerLegal_id?: string; paymentOption?: GsbPrtPaymentOption; createdBy_id?: string; trigger_id?: string; priority?: Priority; discount?: number; failedPayments?: GsbPrtPayment[]; paymentProcOptions?: string; invoiceProcOptions?: string; registration_id?: string; discountRate?: number; receiverUnit_id?: string; subscriptionPlan?: GsbSubscriptionPlan; providerContact_id?: string; receiverContact_id?: string; invoice_id?: string; createDate?: Date; lastUpdateDate?: Date; status?: OrderStatus; providerPartner?: GsbPrtPartner; providerLegal?: GsbPrtLegalEntity; receiverPartner?: GsbPrtPartner; receiverLegal_id?: string; receiverLegal?: GsbPrtLegalEntity; title?: string; code?: string; vat?: number; tenant_id?: string; paymentRefCode?: string; lastUpdatedBy_id?: string; paymentOption_id?: string; constructor(obj?: Partial<GsbPrtOrder>); } export declare enum OrderType { Sales = 1, Purchase = 2, Transfer = 4, Production = 8, Service = 16 } export declare enum PaymentOrigin { User = 0, Registration = 1, Subscription = 2, RecurringPayment = 4 } export declare enum Priority { Urgent = 8, High = 4, Medium = 2, Low = 1 } export declare enum OrderStatus { Editing = 1, OnReview = 2, Preparing = 4, Completed = 8, Freezed = 16, Cancelled = 32, AwaitingPayment = 64 } export declare class GsbPrtCurrency { _entDefName?: string; symbol?: string; code?: string; id?: string; paymentRefCode?: string; maxDecimals?: number; payments?: GsbPrtPayment[]; exchangeRate_id?: string; subsPlans?: GsbSubscriptionPlan[]; createdBy?: GsbUser; lastUpdatedBy_id?: string; accountingRefCode?: string; createdBy_id?: string; orderNumber?: number; registrations?: GsbCmRegistration[]; createDate?: Date; lastUpdateDate?: Date; isPublic?: boolean; shortName?: string; orders?: GsbPrtOrder[]; salesPacks?: GsbPrtSalesPack[]; title?: string; products?: GsbPrtProduct[]; partners?: GsbPrtPartner[]; paymentOptions?: GsbPrtPaymentOption[]; lastUpdatedBy?: GsbUser; constructor(obj?: Partial<GsbPrtCurrency>); } export declare class GsbPrtPaymentOption { _entDefName?: string; paymentRefCode?: string; lastUpdateDate?: Date; salesPacks?: GsbPrtSalesPack[]; title?: string; createDate?: Date; paymentProcessOption_id?: string; orderNumber?: number; paymentType?: PaymentType; currencies?: GsbPrtCurrency[]; autoRenew?: boolean; coverage?: number; createdBy?: GsbUser; partners?: GsbPrtPartner[]; priority?: number; orders?: GsbPrtOrder[]; headline?: string; isPublic?: boolean; providerLegal_id?: string; providerPartner?: GsbPrtPartner; discountRate?: number; lastUpdatedBy_id?: string; partnerDefaults?: GsbPrtPartner[]; discount?: number; installmentCount?: number; createdBy_id?: string; invoiceProcessOption_id?: string; payments?: GsbPrtPayment[]; subscriptionPlans?: GsbSubscriptionPlan[]; billingPeriod?: BillingPeriod; id?: string; lastUpdatedBy?: GsbUser; providerLegal?: GsbPrtLegalEntity; providerPartner_id?: string; name?: string; registrations?: GsbCmRegistration[]; discountAmount?: number; constructor(obj?: Partial<GsbPrtPaymentOption>); } export declare enum BillingPeriod { Weekly = 1, Monthly = 2, Quarterly = 3, Yearly = 4 } export declare class GsbPrtPartner { _entDefName?: string; createdBy?: GsbUser; lastUpdatedBy_id?: string; lastUpdatedBy?: GsbUser; registration?: GsbCmRegistration; logo?: GsbFile; providedPaymentOptions?: GsbPrtPaymentOption[]; sentPayments?: GsbPrtPayment[]; providedSalesPacks?: GsbPrtSalesPack[]; receivedPayments?: GsbPrtPayment[]; invoiceRefCode?: string; title?: string; phoneNumber?: string; name?: string; faxNumber?: string; billingType?: BillingType; email?: string; trackVersion?: string; creditLimit?: number; primaryContact_id?: string; providedOrders?: GsbPrtOrder[]; contacts?: GsbContact[]; folder_id?: string; receivedOrders?: GsbPrtOrder[]; receiveOrderTypes?: OrderType; provideOrderTypes?: OrderType; paymentOptions?: GsbPrtPaymentOption[]; currency_id?: string; defLegal_id?: string; id?: string; paymentRefCode?: string; user_id?: string; discount?: number; accountManager_id?: string; createDate?: Date; lastUpdateDate?: Date; createdBy_id?: string; defLegal?: GsbPrtLegalEntity; type?: PartnerType; user?: GsbUser; currency?: GsbPrtCurrency; users?: GsbUser[]; folder?: GsbFile; website?: string; subscriptionPlans?: GsbSubscriptionPlan[]; tenants?: GsbTenant[]; legalEntities?: GsbPrtLegalEntity[]; creditCards?: GsbPrtCreditCard[]; defPaymentOption_id?: string; registration_id?: string; defCreditCard_id?: string; defPaymentOption?: GsbPrtPaymentOption; defCreditCard?: GsbPrtCreditCard; note?: string; registeredCountry_id?: string; logo_id?: string; accountManager?: GsbUser; files?: GsbFile[]; tags?: GsbTag[]; constructor(obj?: Partial<GsbPrtPartner>); } export declare enum BillingType { Organization = 2, Personal = 1 } export declare enum PartnerType { Customer = 1, Supplier = 2, Distributer = 4, Reseller = 8, Branch = 16, Franchise = 32, GroupCompany = 64 } export declare class GsbPrtSalesPack { _entDefName?: string; subscriptionPlans?: GsbSubscriptionPlan[]; providerPartner_id?: string; providerLegal_id?: string; payments?: GsbPrtPayment[]; id?: string; description?: string; name?: string; paymentOptions?: GsbPrtPaymentOption[]; registrations?: GsbCmRegistration[]; title?: string; createdBy?: GsbUser; accountingRefCode?: string; lastUpdateDate?: Date; orders?: GsbPrtOrder[]; orderNumber?: number; providerLegal?: GsbPrtLegalEntity; providerPartner?: GsbPrtPartner; lastUpdatedBy?: GsbUser; createDate?: Date; paymentRefCode?: string; createdBy_id?: string; isPublic?: boolean; lastUpdatedBy_id?: string; items?: GsbPrtSalesPackItem[]; currency_id?: string; currency?: GsbPrtCurrency; constructor(obj?: Partial<GsbPrtSalesPack>); } export declare class GsbPrtSalesPackItem { _entDefName?: string; salesPack?: GsbPrtSalesPack; product?: GsbPrtProduct; title?: string; id?: string; variants?: GsbPrtSalesPackItemVar[]; createdBy?: GsbUser; lastUpdatedBy_id?: string; createDate?: Date; orderNumber?: number; salesPack_id?: string; createdBy_id?: string; quantity?: number; product_id?: string; lastUpdateDate?: Date; lastUpdatedBy?: GsbUser; constructor(obj?: Partial<GsbPrtSalesPackItem>); } export declare class GsbPrtSalesPackItemVar { _entDefName?: string; min?: number; max?: number; title?: string; id?: string; lastUpdateDate?: Date; salesPackItem?: GsbPrtSalesPackItem; quantity?: number; productVariant?: GsbPrtProductVariant; environment?: string; createDate?: Date; createdBy_id?: string; lastUpdatedBy_id?: string; salesPackItem_id?: string; productVariant_id?: string; createdBy?: GsbUser; lastUpdatedBy?: GsbUser; constructor(obj?: Partial<GsbPrtSalesPackItemVar>); } export declare class GsbPrtProduct { _entDefName?: string; invoiceRefCode?: string; lastUpdatedBy?: GsbUser[]; tags?: GsbTag[]; createdBy_id?: string; passive?: boolean; variants?: GsbPrtProductVariant[]; currency_id?: string; unitPrice?: number; categories?: GsbCategory[]; currency?: GsbPrtCurrency; rrp?: number; name?: string; images?: GsbFile[]; measurementUnit_id?: string; lastUpdateDate?: Date; createdBy?: GsbUser; paymentRefCode?: string; salesPackItems?: GsbPrtSalesPackItem[]; description?: string; title?: string; hidden?: boolean; type?: ProductType; marketPrice?: number; id?: string; vatRate?: number; buyPrice?: number; cost?: number; wholesalePrice?: number; constructor(obj?: Partial<GsbPrtProduct>); } export declare enum ProductType { Sale = 1, Supply = 2, InternalService = 4, FixedAsset = 8 } export declare class GsbPrtProductVariant { _entDefName?: string; title?: string; limits?: GsbUsageLimit[]; salesPackItemVars?: GsbPrtSalesPackItemVar[]; orderNumber?: number; product?: GsbPrtProduct; unitPrice?: number; lotQuantity?: number; id?: string; barcode?: string; name?: string; cost?: number; shortName?: string; lastUpdateDate?: Date; product_id?: string; createDate?: Date; subscriptions?: GsbSubscription[]; constructor(obj?: Partial<GsbPrtProductVariant>); } export declare class GsbPrtLegalEntity { _entDefName?: string; createdBy_id?: string; id?: string; partner_id?: string; registrationNumber?: string; title?: string; receivedPayments?: GsbPrtPayment[]; legalName?: string; providedOrders?: GsbPrtOrder[]; accRefCode?: string; defOrgUnit_id?: string; createdBy?: GsbUser; lastUpdatedBy?: GsbUser; invoiceCodeGenerator_id?: string; taxId?: string; registeredAddress_id?: string; providedSalesPacks?: GsbPrtSalesPack[]; invoiceCodeGenerator?: GsbCodeGenerator; vatExempt?: boolean; sentPayments?: GsbPrtPayment[]; receivedOrders?: GsbPrtOrder[]; vatExemptProofs?: GsbFile[]; vatExemptReason?: string; lastUpdatedBy_id?: string; lastUpdateDate?: Date; providedPaymentOptions?: GsbPrtPaymentOption[]; paymentRefCode?: string; createDate?: Date; partner?: GsbPrtPartner; registeredAddress?: GsbAddress; taxAuthority?: string; constructor(obj?: Partial<GsbPrtLegalEntity>); } export declare class GsbAddress { _entDefName?: string; id?: string; partner_id?: string; lastUpdateDate?: Date; trackVersion?: string; addressLine1?: string; phoneNumber?: string; country_id?: string; city?: GsbPrtCity; title?: string; additionalInfo?: string; city_id?: string; latitude?: number; createDate?: Date; addressLine2?: string; createdBy_id?: string; state?: GsbPrtState; registeredLegalEntities?: GsbPrtLegalEntity[]; lastUpdatedBy?: GsbUser; country?: GsbPrtCountry; zipCode?: string; postalCode?: string; partner?: GsbPrtPartner; state_id?: string; createdBy?: GsbUser; lastUpdatedBy_id?: string; longitude?: number; constructor(obj?: Partial<GsbAddress>); } export declare class GsbPrtState { _entDefName?: string; cities?: GsbPrtCity[]; externalId?: string; createdBy?: GsbUser; createDate?: Date; code?: string; country_id?: string; latitude?: number; longitude?: number; createdBy_id?: string; title?: string; lastUpdatedBy_id?: string; id?: string; country?: GsbPrtCountry; lastUpdateDate?: Date; lastUpdatedBy?: GsbUser; addresses?: GsbAddress[]; constructor(obj?: Partial<GsbPrtState>); } export declare class GsbPrtCountry { _entDefName?: string; addresses?: GsbAddress[]; lastUpdatedBy_id?: string; states?: GsbPrtState[]; phoneCode?: string; title?: string; currencyCode?: string; numericCode?: string; lastUpdatedBy?: GsbUser; createdBy?: GsbUser; region?: string; id?: string; latitude?: number; tId?: string; code?: string; lastUpdateDate?: Date; currencySymbol?: string; externalId?: string; createdBy_id?: string; createDate?: Date; shortName?: string; iso2?: string; cities?: GsbPrtCity[]; serviceVatRate?: number; longitude?: number; capital?: string; native?: string; iso3?: string; constructor(obj?: Partial<GsbPrtCountry>); } export declare class GsbPrtCity { _entDefName?: string; state?: GsbPrtState; createDate?: Date; latitude?: number; lastUpdatedBy?: GsbUser; country_id?: string; lastUpdateDate?: Date; state_id?: string; id?: string; externalId?: string; originalName?: string; longitude?: number; country?: GsbPrtCountry; lastUpdatedBy_id?: string; addresses?: GsbAddress[]; createdBy_id?: string; code?: string; createdBy?: GsbUser; title?: string; constructor(obj?: Partial<GsbPrtCity>); } export declare class GsbPrtInvoice { _entDefName?: string; receiverUnit?: GsbOrganizationalUnit; creditApplied?: number; receiverUnit_id?: string; shippingVat?: number; providerLegal_id?: string; providerLegal?: GsbPrtLegalEntity; createDate?: Date; document_id?: string; shippingVatRate?: number; invoiceDate?: Date; currency?: GsbPrtCurrency; receiveAccount_id?: string; createdBy_id?: string; document?: GsbFile; order_id?: string; items?: GsbPrtInvoiceItem[]; payment?: GsbPrtPayment; shippingCost?: number; grandTotal?: number; subTotal?: number; receiverLegal?: GsbPrtLegalEntity; code?: string; title?: string; totalPrice?: number; payment_id?: string; providerUnit_id?: string; providerAddress_id?: string; discount?: number; trigger_id?: string; type?: InvoiceType; price?: number; createdBy?: GsbUser; lastUpdatedBy?: GsbUser; providerAddress?: GsbAddress; receiverAddress?: GsbAddress; shippingAddress?: GsbAddress; accRefCode?: string; providerPartner_id?: string; providerPartner?: GsbPrtPartner; receiverPartner_id?: string; receiverPartner?: GsbPrtPartner; providerUnit?: GsbOrganizationalUnit; shippingAddress_id?: string; receiverAddress_id?: string; receiverLegal_id?: string; status?: SalesInvoiceStatus; vat?: number; order?: GsbPrtOrder; lastUpdatedBy_id?: string; id?: string; currency_id?: string; lastUpdateDate?: Date; constructor(obj?: Partial<GsbPrtInvoice>); } export declare enum InvoiceType { Internal = 4, Sales = 1, Purchase = 2 } export declare enum SalesInvoiceStatus { EInvoiceSaved = 4, Approved = 1, Signed = 2, Preparing = 0, Cancelled = 8 } export declare class GsbPrtInvoiceItem { _entDefName?: string; invoice_id?: string; invoice?: GsbPrtInvoice; id?: string; vat?: number; createDate?: Date; lastUpdatedBy?: GsbUser; title?: string; totalPrice?: number; product?: GsbPrtProduct; quantity?: number; discountRate?: number; product_id?: string; lastUpdateDate?: Date; lastUpdatedBy_id?: string; createdBy_id?: string; vatRate?: number; discount?: number; price?: number; grandTotal?: number; unitPrice?: number; createdBy?: GsbUser; constructor(obj?: Partial<GsbPrtInvoiceItem>); } export declare class GsbOrganizationalUnit { _entDefName?: string; parent?: GsbOrganizationalUnit; children?: GsbOrganizationalUnit[]; taskRole?: GsbRole; receivedOrders?: GsbPrtOrder[]; providedOrders?: GsbPrtOrder[]; legal?: GsbPrtLegalEntity; providedInvoices?: GsbPrtInvoice[]; createDate?: Date; lastUpdateDate?: Date; legal_id?: string; id?: string; createdBy_id?: string; receiveOrderTypes?: OrderType; taskRole_id?: string; provideOrderTypes?: OrderType; receivedInvoices?: GsbPrtInvoice[]; title?: string; parent_id?: string; createdBy?: GsbUser; lastUpdatedBy_id?: string; type?: OrganizationalUnitType; lastUpdatedBy?: GsbUser; constructor(obj?: Partial<GsbOrganizationalUnit>); } export declare enum OrganizationalUnitType { Operation = 16, Office = 1, Warehouse = 2, Production = 4, Store = 8 }