@ctodev/cclibrary-typings
Version:
Library typings for use with CLARC INFINITY
637 lines (636 loc) • 20.1 kB
TypeScript
import { TccET_APPLI } from './applications.model';
import { TccET_MDM } from './mdm.model';
import { IExpandable, TccTranslation, TccC4Node, TccDataType, TccBpiDeliveryProfileType, TccOperatingState as _TccOperatingState, TccBusinessType, TccDataTypeMap, TccPrimitiveValue, TccMessageType, TccHistoryItem, TccDocumentOrigin, TccEmailAddresses, TccParticipantIdScheme } from './shared.model';
export declare namespace TccET_BIZOBJ {
export enum Storage {
ccSP_Unknown = "ccSP_Unknown",
ccSP_FileSystem = "ccSP_FileSystem",
ccSP_S3 = "ccSP_S3",
ccSP_Google = "ccSP_Google",
ccSP_Azure = "ccSP_Azure"
}
export enum AbstractType {
ccAT_Complex = "ccAT_Complex",
ccAT_Enumeration = "ccAT_Enumeration",
ccAT_Primitive = "ccAT_Primitive"
}
export enum CharCase {
ccCC_Normal = "ccCC_Normal",
ccCC_Upper = "ccCC_Upper",
ccCC_Lower = "ccCC_Lower"
}
export enum SubtypeClass {
ccST_Document = "ccST_Document",
ccST_Folder = "ccST_Folder"
}
export type State = _TccOperatingState;
export const State: typeof _TccOperatingState;
export enum SubjectPlaceholder {
id = "id",
timestamp = "timestamp",
hh = "hh",
nn = "nn",
ss = "ss",
zzz = "zzz",
yy = "yy",
yyyy = "yyyy",
mm = "mm",
dd = "dd"
}
export interface Subject extends TccTranslation {
}
export interface DisplayName extends TccTranslation {
}
export interface Description extends TccTranslation {
}
export interface IProperty {
Id: string;
Name: string;
AbstractType: AbstractType;
Mandatory?: boolean;
Collection?: boolean;
Searchable?: boolean;
Unique?: boolean;
/**
* if the property can be filled by the ai assistant (clara)
* @default true
*/
AiEnabled?: boolean;
DisplayName?: DisplayName;
Description?: Description;
BusinessType?: TccBusinessType;
MinConfidence?: number;
}
interface TypedPrimitiveProperty<T extends TccDataType> extends IProperty {
DataType: T;
DefaultValue?: TccDataTypeMap[T] | string;
Key?: boolean;
AbstractType: AbstractType.ccAT_Primitive;
MinLength?: number;
MaxLength?: number;
CharCase?: CharCase;
Nullable?: boolean;
RegEx?: string;
}
export type PrimitiveProperty = TypedPrimitiveProperty<TccDataType.ccDT_Binary> | TypedPrimitiveProperty<TccDataType.ccDT_Boolean> | TypedPrimitiveProperty<TccDataType.ccDT_DateTime> | TypedPrimitiveProperty<TccDataType.ccDT_Float> | TypedPrimitiveProperty<TccDataType.ccDT_Integer> | TypedPrimitiveProperty<TccDataType.ccDT_String> | TypedPrimitiveProperty<TccDataType.ccDT_Unknown>;
export interface ComplexProperty extends IProperty {
AbstractType: AbstractType.ccAT_Complex;
Items: Array<PropertyContainer>;
}
export interface EnumerationItems {
Key: string;
Value?: TccTranslation;
}
export interface EnumerationProperty extends IProperty {
AbstractType: AbstractType.ccAT_Enumeration;
MultiValues?: boolean;
Items: Array<EnumerationItems>;
DefaultValue?: string;
}
export interface PropertyContainer {
TccBusinessObjectPrimitivePropertyDefinition?: PrimitiveProperty;
TccBusinessObjectEnumerationPropertyDefinition?: EnumerationProperty;
TccBusinessObjectComplexPropertyDefinition?: ComplexProperty;
}
export interface SubType {
Id: string;
Description?: TccTranslation;
ParentId?: string;
TypeClass?: SubtypeClass;
TypeId?: string;
DisplayName?: TccTranslation;
Properties: Array<PropertyContainer>;
}
export interface BusinessObject extends TccC4Node {
Subject?: Subject;
Properties: Array<PropertyContainer>;
SubTypes?: Array<SubType>;
}
export interface DesktopItem {
Enabled?: boolean;
Mandatory?: boolean;
Position?: ItemPosition;
ReadOnly?: boolean;
Id: string;
Value?: TccPrimitiveValue;
MultiLine?: boolean;
Color?: string;
UserExit?: string;
UseParentDefault?: boolean;
Decimals?: number;
ParentId?: string;
ShowUnfolded?: boolean;
ShowRoot?: boolean;
}
export interface ItemPosition extends IExpandable {
Column: number;
Row: number;
Width: number;
Height: number;
}
export interface Container {
Containers: Array<Container>;
Name: TccTranslation;
Items: Array<DesktopItem>;
}
export interface DesktopTable {
Name: TccTranslation;
Columns: DesktopItem[];
RootItemId: string;
}
export interface Desktop extends TccC4Node {
RootContainer: Container;
Tables: DesktopTable[];
Script?: string;
BusinessObject: string;
}
export enum SourceType {
ccUX_Unknown = "ccUX_Unknown",
ccUX_Repository = "ccUX_Repository",
ccUX_Database = "ccUX_Database",
ccUX_Debitors = "ccUX_Debitors",
ccUX_Creditors = "ccUX_Creditors",
ccUX_Companies = "ccUX_Companies",
ccUX_SalesOrgs = "ccUX_SalesOrgs",
ccUX_Articles = "ccUX_Articles",
ccUX_Orders = "ccUX_Orders",
ccUX_Quotes = "ccUX_Quotes"
}
export enum TccSearchMode {
ccSM_None = "ccSM_None",// "Searchvalue"
ccSM_Prefix = "ccSM_Prefix",// "%Searchvalue"
ccSM_Suffix = "ccSM_Suffix",// "Searchvalue%"
ccSM_Any = "ccSM_Any"
}
export interface FieldMapping {
Source: string;
Target: string;
}
export interface TccSearchFieldBehaviour {
Field: string;
Mode: TccSearchMode;
}
export type TccSearchFieldBehaviours = Array<TccSearchFieldBehaviour>;
export interface Userexit extends TccC4Node {
SourceType: SourceType;
DataSourceId: string;
Query?: string;
Mappings: Array<FieldMapping>;
Hitlist: string[];
SubTypeId?: string;
SearchFieldBehaviours?: TccSearchFieldBehaviours;
}
export enum TccManualValidation {
ccMV_Always = "ccMV_Always",
ccMV_Never = "ccMV_Never",
ccMV_IfRequired = "ccMV_IfRequired"
}
export interface TccCompanyCode {
Id: string;
Active: boolean;
Default: boolean;
Code: string;
Description: string;
HotFolderId?: string;
MailBoxId: string;
EGatewayProviderId: string;
Validation: TccValidation;
AssignedClientSecret?: AssignedClientSecret;
}
export interface TccValidation {
Manual: TccManualValidation;
AppId: string;
GroupId: string;
}
/**
* @deprecated option no longer used in backend
*/
export enum TccExtractionStrategy {
ccXS_Unknown = "ccXS_Unknown",
ccXS_Rule = "ccXS_Rule",
ccXS_Ai = "ccXS_Ai",
ccXS_Mixed = "ccXS_Mixed"
}
export interface BaseSolution extends TccC4Node {
Active: boolean;
DeliveryProfile: BpiDeliveryProfile;
ConversionProfile: BpiConversionProfile;
OrderNumberDefinitions: string[];
Extraction?: TccExtractionSettings;
UnitMappings?: string;
}
export interface TccExtractionSettings {
ValidateResults?: boolean;
/**
* @deprecated option no longer used in backend
*/
Strategy?: TccExtractionStrategy;
}
export enum TccInvoiceTypes {
ccIT_RMB = "ccIT_RMB",
ccIT_ROB = "ccIT_ROB",
ccIT_GMB = "ccIT_GMB",
ccIT_GOB = "ccIT_GOB",
ccIT_Unknown = "ccIT_Unknown",
ccIT_CreditNote = "ccIT_CreditNote",
ccIT_Invoice = "ccIT_Invoice",
ccIT_Common = "ccIT_Common"
}
export enum TccReaderXtractOption {
ccRO_SwissQrCode = "ccRO_SwissQrCode",// Swiss Payment Standard (SPS 2022)
ccRO_SwishQrCode = "ccRO_SwishQrCode",// Swish QR Code Format v2
ccRO_EpcQrCode = "ccRO_EpcQrCode",// EPC069-12 SEPA Credit Transfer (SCT) QR Code Specification
ccRO_GiroCode = "ccRO_GiroCode",// Based on EPC069-12 (SEPA QR Code)
ccRO_QrRechnung = "ccRO_QrRechnung",// Austrian EPC QR Code-kompatible (with national fields)
ccRO_VippsQr = "ccRO_VippsQr",// Vipps Invoice QR Specification
ccRO_GS1 = "ccRO_GS1",// GS1 Digital Link, GS1 DataMatrix
ccRO_Fapiao = "ccRO_Fapiao"
}
export interface Invoice extends BaseSolution {
CompanyCodes?: TccCompanyCodeInvoice[];
ReaderOptions?: TccReaderXtractOption;
}
export enum TccProcessClearingMethod {
ccCM_Email = "ccCM_Email",
ccCM_Workflow = "ccCM_Workflow",
ccCM_Unknown = "ccCM_Unknown"
}
export interface TccProcessClearing {
/**
* @default TccProcessClearingMethod.ccCM_Unknown
*/
ClearingMethod: TccProcessClearingMethod;
EmailRecipient: string;
WorkflowId: string;
}
export interface TccCompanyCodeInvoice extends TccCompanyCode {
Auditors: Auditors;
Modifiers: Modifiers;
GenerateLookALikes?: boolean;
Clearing: TccProcessClearing;
}
export interface AssignedClientSecret {
ClientId: string;
SecretId: string;
}
export interface Modifiers {
AlwaysCreateOneLineItem: TccInvoiceTypes[];
}
export interface Auditors {
DeVatParagraph14Audit: boolean;
AtVatParagraph11Audit: boolean;
}
export interface Modifiers {
}
export interface BpiDeliveryProfile {
AccessProfileId: string;
TransformerId: string;
AccessProfileType: TccBpiDeliveryProfileType;
}
export interface Confirmation extends BaseSolution {
PurchasingOrganisations?: PurchasingOrganisation[];
}
export interface PurchasingOrganisation extends TccCompanyCode {
}
export interface Order extends BaseSolution {
SalesOrganisations?: OrderSalesOrg[];
}
export interface OrderSalesOrg extends TccCompanyCode {
}
export enum TccTemplatePlaceholder {
InvoiceNumber = "ccBT_InvoiceNumber",
DocumentDate = "ccBT_DocumentDate",
NetAmount = "ccBT_NetAmount",
GrossAmount = "ccBT_GrossAmount",
Currency = "ccBT_Currency",
SalesOrganisation = "ccBT_SalesOrganisation"
}
export enum TccEmailDeliveryMethod {
ccED_None = "ccED_None",
ccED_Direct = "ccED_Direct",
ccED_Mailbox = "ccED_Mailbox"
}
export enum TccEnumEInvoiceMainStandard {
ccIT_XInvoice = "ccIT_XInvoice",
ccIT_FatturaPA = "ccIT_FatturaPA",
ccIT_FacturX = "ccIT_FacturX",
ccIT_Invoice = "ccIT_Invoice",
ccIT_Attachement = "ccIT_Attachement",
ccIT_None = "ccIT_None"
}
export enum TccDeliveryType {
ccDT_Date = "ccDT_Date",
ccDT_Period = "ccDT_Period",
ccDT_Month = "ccDT_Month",
ccDT_Week = "ccDT_Week",
ccDT_Year = "ccDT_Year",
ccDT_NoValue = "ccDT_NoValue"
}
export enum TccEnumEInvoiceValidationMode {
ccEV_Disabled = "ccEV_Disabled",
ccEV_Report = "ccEV_Report",
ccEV_Strict = "ccEV_Strict"
}
export interface EBilling extends TccC4Node {
SalesOrgs: TccSalesOrgBilling[];
Active: boolean;
}
export interface TccSalesOrgBilling {
Code: string;
Name: TccTranslation;
Description: TccTranslation;
MessageTemplates: MessageTemplates[];
EmailSenderAddress: string;
EGatewayProvider?: {
AccessProfileId: string;
AccessProfileType: TccBpiDeliveryProfileType;
};
DeliveryPlan: DeliveryPlan;
Active: boolean;
EmailDeliveryMethod?: TccEmailDeliveryMethod;
EmailSenderMailbox?: string;
InvoiceFormat?: TccEnumEInvoiceMainStandard;
DeliveryProfile: AccessProfile;
/**
* @default TccEnumEInvoiceValidationMode.ccEV_Strict
*/
ValidationMode?: TccEnumEInvoiceValidationMode;
ParticipantId?: string;
ParticipantIdScheme?: TccParticipantIdScheme;
}
export interface MessageTemplates {
Language: string;
Subject: string;
Body: string;
}
export interface DeliveryPlan {
ExecutionMode?: string;
SendSchedule: string;
}
export interface EBillingEntity extends TccET_APPLI.Document<EBillingData> {
}
export interface EBillingData {
Class: TccET_APPLI.MetadataObjectClasses.TccBusinessDocumentInvoice;
Data: {
Type: TccInvoiceTypes;
Subject: string;
AdditionalInformation: string;
Basics: {
ReceiptDate: string;
SendDate: {
$date: number;
};
Recipient: {
Email: TccEmailAddresses;
EmailCc: TccEmailAddresses;
EmailBcc: TccEmailAddresses;
Name: string;
};
Origin: TccDocumentOrigin;
DeliveryMethod: DeliveryMethod;
TransferFormat: TransferFormat;
CmsDocumentReference: {
System: string;
};
Date: {
Value: {
$date: number;
};
Confidence: number;
Rect: number[];
};
Number: {
Value: string;
Confidence: number;
Rect: number[];
};
Barcode: {
Value: string;
};
};
Amounts: {
PrePaidTotalAmount: {
Value: number;
};
DuePayableAmount: {
Value: number;
};
Gross: {
Value: number;
};
Net: {
Value: number;
};
TotalPosNet: {
Value: number;
};
Discounts: any[];
Charges: any[];
Currency: {
Value: TccET_MDM.Currency;
Confidence: number;
Rect: number[];
};
};
Taxes: any[];
Delivery: {
Type: TccDataType;
Date: {
Value: string;
Confidence: number;
Rect: number[];
};
Period: {
Start: {
Value: string;
Confidence: number;
Rect: number[];
};
End: {
Value: string;
Confidence: number;
Rect: number[];
};
};
Week: {
Value: number;
};
Month: {
Value: number;
};
Year: {
Value: number;
};
IncoTerms: {
Code: TccInvoiceTypes;
Location: string;
};
};
TermsOfPayments: any[];
PaymentReference: {
Value: string;
};
SwissEsr: {
Value: string;
};
Positions: any[];
ReferenceDocuments: any[];
BusinessPartners: EBillingBusinessPartner[];
};
}
export interface EBillingChangeLogItem extends TccHistoryItem {
Type: TccMessageType;
Code: string;
Text: string;
}
export interface EBillingBusinessPartner {
PartnerType: PartnerType;
Id: {
Value: string;
};
Language: string;
GlobalId: {
Value: string;
};
LeitwegId: {
Value: string;
};
ParticipantId: {
Value: string;
};
PeppolId: {
Value: string;
};
Name: {
Value: string;
};
NameAddition: {
Value: string;
};
Country: {
Value: string;
};
City: {
Value: string;
};
Street: {
Value: string;
Name: {
Value: string;
};
Number: {
Value: string;
};
Apartment: {
Value: string;
};
Addition: {
Value: string;
};
};
PostCode: {
Value: string;
};
AddressLines: any[];
CompanyCode: {
Value: string;
};
SalesOrganisation: {
Value: string;
};
SalesTaxId: {
Value: string;
Confidence: number;
Rect: number[];
};
TaxId: {
Value: string;
Confidence: number;
Rect: number[];
};
Banks: {
Name: {
Value: string;
};
Code: {
Value: string;
};
AccountNumber: {
Value: string;
};
Swift: {
Value: string;
};
Iban: {
Value: string;
Confidence: number;
Rect: number[];
};
ProprietaryId: {
Value: string;
};
}[];
Contact: {
Name: {
Value: string;
Confidence: number;
Rect: number[];
};
Email: {
Value: string;
Confidence: number;
Rect: number[];
};
Phone: {
Value: string;
Confidence: number;
Rect: number[];
};
Division: {
Value: string;
};
};
}
export interface billingSendData {
DocHubItemId: string;
Recipients: string[];
Cc: string[];
Bcc: string[];
Subject: string;
Body: string;
}
export interface DocumentFlow extends TccC4Node {
DeliveryProfile: AccessProfile;
ConversionProfile: BpiConversionProfile;
}
export interface BpiConversionProfile {
ConversionProfileId: string;
}
export interface AccessProfile {
AccessProfileId?: string;
TransformerId?: string;
AccessProfileType?: TccBpiDeliveryProfileType;
}
export enum TransferFormat {
ccBF_Unknown = "ccBF_Unknown",
ccBF_PDF = "ccBF_PDF",
ccBF_Image = "ccBF_Image",
ccBF_XML = "ccBF_XML",
ccBF_FacturX = "ccBF_FacturX",//- ZUGFeRD -> Alle Sprachen
ccBF_XInvoice = "ccBF_XInvoice",//- XRechnung -> Alle Sprachen
ccBF_Paper = "ccBF_Paper",
ccBF_Other = "ccBF_Other"
}
export enum DeliveryMethod {
ccDM_Unknown = "ccDM_Unknown",
ccDM_PostalService = "ccDM_PostalService",
ccDM_Email = "ccDM_Email",
ccDM_EGatewayProvider = "ccDM_EGatewayProvider"
}
export enum PartnerType {
ccBP_Unknown = "ccBP_Unknown",
ccBP_Creditor = "ccBP_Creditor",
ccBP_Debitor = "ccBP_Debitor"
}
export {};
}