|
| 1 | +"""Schemas for Exact Online streams.""" |
| 2 | + |
| 3 | +from singer_sdk.typing import ( |
| 4 | + BooleanType, |
| 5 | + DateTimeType, |
| 6 | + IntegerType, |
| 7 | + NumberType, |
| 8 | + PropertiesList, |
| 9 | + Property, |
| 10 | + StringType, |
| 11 | +) |
| 12 | + |
| 13 | +transaction_lines_schema = PropertiesList( |
| 14 | + Property("Timestamp", IntegerType), |
| 15 | + Property("Account", StringType), |
| 16 | + Property("AccountCode", StringType), |
| 17 | + Property("AccountName", StringType), |
| 18 | + Property("AmountDC", NumberType), |
| 19 | + Property("AmountFC", NumberType), |
| 20 | + Property("AmountVATBaseFC", NumberType), |
| 21 | + Property("AmountVATFC", NumberType), |
| 22 | + Property("Asset", StringType), |
| 23 | + Property("AssetCode", StringType), |
| 24 | + Property("AssetDescription", StringType), |
| 25 | + Property("CostCenter", StringType), |
| 26 | + Property("CostCenterDescription", StringType), |
| 27 | + Property("CostUnit", StringType), |
| 28 | + Property("CostUnitDescription", StringType), |
| 29 | + Property("Created", DateTimeType), |
| 30 | + Property("Creator", StringType), |
| 31 | + Property("CreatorFullName", StringType), |
| 32 | + Property("Currency", StringType), |
| 33 | + Property("CustomField", StringType), |
| 34 | + Property("Date", DateTimeType), |
| 35 | + Property("Description", StringType), |
| 36 | + Property("Division", IntegerType), |
| 37 | + Property("Document", StringType), |
| 38 | + Property("DocumentNumber", IntegerType), |
| 39 | + Property("DocumentSubject", StringType), |
| 40 | + Property("DueDate", DateTimeType), |
| 41 | + Property("EntryID", StringType), |
| 42 | + Property("EntryNumber", IntegerType), |
| 43 | + Property("ExchangeRate", NumberType), |
| 44 | + Property("ExternalLinkDescription", StringType), |
| 45 | + Property("ExternalLinkReference", StringType), |
| 46 | + Property("ExtraDutyAmountFC", NumberType), |
| 47 | + Property("ExtraDutyPercentage", NumberType), |
| 48 | + Property("FinancialPeriod", IntegerType), |
| 49 | + Property("FinancialYear", IntegerType), |
| 50 | + Property("GLAccount", StringType), |
| 51 | + Property("GLAccountCode", StringType), |
| 52 | + Property("GLAccountDescription", StringType), |
| 53 | + Property("ID", StringType), |
| 54 | + Property("InvoiceNumber", IntegerType), |
| 55 | + Property("Item", StringType), |
| 56 | + Property("ItemCode", StringType), |
| 57 | + Property("ItemDescription", StringType), |
| 58 | + Property("JournalCode", StringType), |
| 59 | + Property("JournalDescription", StringType), |
| 60 | + Property("LineNumber", IntegerType), |
| 61 | + Property("LineType", IntegerType), |
| 62 | + Property("Modified", DateTimeType), |
| 63 | + Property("ModifierFullName", StringType), |
| 64 | + Property("Notes", StringType), |
| 65 | + Property("OffsetID", StringType), |
| 66 | + Property("OrderNumber", IntegerType), |
| 67 | + Property("PaymentDiscountAmount", NumberType), |
| 68 | + Property("PaymentReference", StringType), |
| 69 | + Property("Project", StringType), |
| 70 | + Property("ProjectCode", StringType), |
| 71 | + Property("ProjectDescription", StringType), |
| 72 | + Property("Quantity", NumberType), |
| 73 | + Property("SerialNumber", StringType), |
| 74 | + Property("Status", IntegerType), |
| 75 | + Property("Subscription", StringType), |
| 76 | + Property("SubscriptionDescription", StringType), |
| 77 | + Property("TrackingNumber", StringType), |
| 78 | + Property("TrackingNumberDescription", StringType), |
| 79 | + Property("Type", IntegerType), |
| 80 | + Property("VATCode", StringType), |
| 81 | + Property("VATCodeDescription", StringType), |
| 82 | + Property("VATPercentage", NumberType), |
| 83 | + Property("VATType", StringType), |
| 84 | + Property("YourRef", StringType), |
| 85 | +).to_dict() |
| 86 | + |
| 87 | +gl_accounts_schema = PropertiesList( |
| 88 | + Property("Timestamp", IntegerType), |
| 89 | + Property("AllowCostsInSales", BooleanType), |
| 90 | + Property("AssimilatedVATBox", IntegerType), |
| 91 | + Property("BalanceSide", StringType), |
| 92 | + Property("BalanceType", StringType), |
| 93 | + Property("BelcotaxType", IntegerType), |
| 94 | + Property("Code", StringType), |
| 95 | + Property("Compress", BooleanType), |
| 96 | + Property("Costcenter", StringType), |
| 97 | + Property("CostcenterDescription", StringType), |
| 98 | + Property("Costunit", StringType), |
| 99 | + Property("CostunitDescription", StringType), |
| 100 | + Property("Created", DateTimeType), |
| 101 | + Property("Creator", StringType), |
| 102 | + Property("CreatorFullName", StringType), |
| 103 | + Property("CustomField", StringType), |
| 104 | + Property("Description", StringType), |
| 105 | + Property("Division", IntegerType), |
| 106 | + Property("ExcludeVATListing", BooleanType), |
| 107 | + Property("ExpenseNonDeductiblePercentage", NumberType), |
| 108 | + Property("ID", StringType), |
| 109 | + Property("IsBlocked", BooleanType), |
| 110 | + Property("Matching", BooleanType), |
| 111 | + Property("Modified", DateTimeType), |
| 112 | + Property("Modifier", StringType), |
| 113 | + Property("ModifierFullName", StringType), |
| 114 | + Property("PrivateGLAccount", StringType), |
| 115 | + Property("PrivatePercentage", NumberType), |
| 116 | + Property("ReportingCode", BooleanType), |
| 117 | + Property("RevalueCurrency", BooleanType), |
| 118 | + Property("SearchCode", StringType), |
| 119 | + Property("Type", IntegerType), |
| 120 | + Property("TypeDescription", StringType), |
| 121 | + Property("UseCostcenter", BooleanType), |
| 122 | + Property("UseCostunit", BooleanType), |
| 123 | + Property("VATCode", StringType), |
| 124 | + Property("VATDescription", StringType), |
| 125 | + Property("VATGLAccountType", StringType), |
| 126 | + Property("VATNonDeductibleGLAccount", StringType), |
| 127 | + Property("VATNonDeductiblePercentage", NumberType), |
| 128 | + Property("VATSystem", StringType), |
| 129 | + Property("YearEndCostGLAccount", StringType), |
| 130 | + Property("YearEndReflectionGLAccount", StringType), |
| 131 | +).to_dict() |
| 132 | + |
| 133 | +gl_classifications_schema = PropertiesList( |
| 134 | + Property("Timestamp", IntegerType), |
| 135 | + Property("Abstract", BooleanType), |
| 136 | + Property("Balance", StringType), |
| 137 | + Property("Code", StringType), |
| 138 | + Property("Created", DateTimeType), |
| 139 | + Property("CreatorFullName", StringType), |
| 140 | + Property("Description", StringType), |
| 141 | + Property("Division", IntegerType), |
| 142 | + Property("ID", StringType), |
| 143 | + Property("IsTupleSubElement", BooleanType), |
| 144 | + Property("Modified", DateTimeType), |
| 145 | + Property("Modifier", StringType), |
| 146 | + Property("ModifierFullName", StringType), |
| 147 | + Property("Name", StringType), |
| 148 | + Property("Nillable", BooleanType), |
| 149 | + Property("Parent", StringType), |
| 150 | + Property("PeriodType", StringType), |
| 151 | + Property("SubstitutionGroup", StringType), |
| 152 | + Property("TaxonomyNamespace", StringType), |
| 153 | + Property("TaxonomyNamespaceDescription", StringType), |
| 154 | + Property("Type", StringType), |
| 155 | +).to_dict() |
| 156 | + |
| 157 | +gl_account_classification_mappings_schema = PropertiesList( |
| 158 | + Property("ID", StringType), |
| 159 | + Property("Classification", StringType), |
| 160 | + Property("ClassificationCode", StringType), |
| 161 | + Property("ClassificationDescription", StringType), |
| 162 | + Property("Division", IntegerType), |
| 163 | + Property("GLAccount", StringType), |
| 164 | + Property("GLAccountCode", StringType), |
| 165 | + Property("GLAccountDescription", StringType), |
| 166 | + Property("GLSchemeCode", StringType), |
| 167 | + Property("GLSchemeDescription", StringType), |
| 168 | + Property("GLSchemeID", StringType), |
| 169 | +).to_dict() |
| 170 | + |
| 171 | +assets_schema = PropertiesList( |
| 172 | + Property("ID", StringType), # Primary key |
| 173 | + Property("AlreadyDepreciated", StringType), # Asset already depreciated before registering |
| 174 | + Property("AssetFrom", StringType), # Original asset ID in case of transfer/split |
| 175 | + Property("AssetFromDescription", StringType), # Description of AssetFrom |
| 176 | + Property("AssetGroup", StringType), # Asset group for GLAccount transactions |
| 177 | + Property("AssetGroupCode", StringType), # Code of the asset group |
| 178 | + Property("AssetGroupDescription", StringType), # Description of the asset group |
| 179 | + Property("CatalogueValue", NumberType), # The catalogue value of the asset |
| 180 | + Property("Code", StringType), # Code of the asset |
| 181 | + Property("CommercialBuildingValues", StringType), # Commercial building values with dates |
| 182 | + Property("Costcenter", StringType), # Assets can be linked to a cost center |
| 183 | + Property("CostcenterDescription", StringType), # Description of Costcenter |
| 184 | + Property("Costunit", StringType), # Assets can be linked to a cost unit |
| 185 | + Property("CostunitDescription", StringType), # Description of Costunit |
| 186 | + Property("Created", DateTimeType), # Creation date |
| 187 | + Property("Creator", StringType), # User ID of creator |
| 188 | + Property("CreatorFullName", StringType), # Name of creator |
| 189 | + Property("CustomField", StringType), # Custom field endpoint |
| 190 | + Property("DeductionPercentage", NumberType), # Belgium legislation investment deduction |
| 191 | + Property("DepreciatedAmount", NumberType), # Already depreciated amount for existing asset |
| 192 | + Property("DepreciatedPeriods", IntegerType), # Number of periods already depreciated |
| 193 | + Property("DepreciatedStartDate", DateTimeType), # StartDate of depreciating |
| 194 | + Property("Description", StringType), # This is the description of the Asset |
| 195 | + Property("Division", IntegerType), # Division code |
| 196 | + Property("EndDate", DateTimeType), # Asset EndDate when Sold or Inactive |
| 197 | + Property("EngineEmission", IntegerType), # Engine emission for co² report |
| 198 | + Property("EngineType", IntegerType), # Engine type for co² report |
| 199 | + Property("GLTransactionLine", StringType), # GL transaction line creating the asset |
| 200 | + Property("GLTransactionLineDescription", StringType), # Description of GLTransactionLine |
| 201 | + Property("InvestmentAccount", StringType), # Supplier of the asset |
| 202 | + Property("InvestmentAccountCode", StringType), # Code of InvestmentAccount |
| 203 | + Property("InvestmentAccountName", StringType), # Name of InvestmentAccount |
| 204 | + Property("InvestmentAmountDC", NumberType), # Investment amount in default currency |
| 205 | + Property("InvestmentAmountFC", NumberType), # Investment value of the asset |
| 206 | + Property("InvestmentCurrency", StringType), # Currency of the investment amount |
| 207 | + Property("InvestmentCurrencyDescription", StringType), # Description of InvestmentCurrency |
| 208 | + Property("InvestmentDate", DateTimeType), # Original date when asset was bought |
| 209 | + Property("InvestmentDeduction", IntegerType), # Belgian investment deduction functionality |
| 210 | + Property("Modified", DateTimeType), # Last modified date |
| 211 | + Property("Modifier", StringType), # User ID of modifier |
| 212 | + Property("ModifierFullName", StringType), # Name of modifier |
| 213 | + Property("Notes", StringType), # Extra remarks for the asset |
| 214 | + Property("Parent", StringType), # Parent asset |
| 215 | + Property("ParentCode", StringType), # Code of Parent |
| 216 | + Property("ParentDescription", StringType), # Description of Parent |
| 217 | + Property("Picture", StringType), # Image for an asset (Binary data as string) |
| 218 | + Property("PictureFileName", StringType), # Filename of the image |
| 219 | + Property("PrimaryMethod", StringType), # First method of depreciation |
| 220 | + Property("PrimaryMethodCode", StringType), # Code of PrimaryMethod |
| 221 | + Property("PrimaryMethodDescription", StringType), # Description of PrimaryMethod |
| 222 | + Property("ResidualValue", NumberType), # Residual value at end of depreciation |
| 223 | + Property("StartDate", DateTimeType), # Asset Depreciation StartDate |
| 224 | + Property("Status", IntegerType), # Asset status (1=Active, 2=Not validated, etc.) |
| 225 | + Property("TransactionEntryID", StringType), # Reference to transaction lines |
| 226 | + Property("TransactionEntryNo", IntegerType), # Entry number of transaction |
| 227 | + Property("Type", StringType), # Asset type (0=Other Assets, 1=Commercial Building) |
| 228 | +).to_dict() |
0 commit comments