@chift/chift-nodejs 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintcache +1 -0
- package/CHANGELOG.md +9 -0
- package/coverage/clover.xml +1645 -0
- package/coverage/coverage-final.json +19 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +146 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/src/helpers/index.html +131 -0
- package/coverage/lcov-report/src/helpers/openapi.ts.html +151 -0
- package/coverage/lcov-report/src/helpers/settings.ts.html +94 -0
- package/coverage/lcov-report/src/index.html +116 -0
- package/coverage/lcov-report/src/index.ts.html +88 -0
- package/coverage/lcov-report/src/modules/accounting.ts.html +1156 -0
- package/coverage/lcov-report/src/modules/api.ts.html +190 -0
- package/coverage/lcov-report/src/modules/consumer.ts.html +616 -0
- package/coverage/lcov-report/src/modules/consumers.ts.html +331 -0
- package/coverage/lcov-report/src/modules/custom.ts.html +193 -0
- package/coverage/lcov-report/src/modules/datastores.ts.html +142 -0
- package/coverage/lcov-report/src/modules/ecommerce.ts.html +331 -0
- package/coverage/lcov-report/src/modules/flow.ts.html +589 -0
- package/coverage/lcov-report/src/modules/index.html +326 -0
- package/coverage/lcov-report/src/modules/integrations.ts.html +151 -0
- package/coverage/lcov-report/src/modules/internalApi.ts.html +586 -0
- package/coverage/lcov-report/src/modules/invoicing.ts.html +391 -0
- package/coverage/lcov-report/src/modules/pos.ts.html +421 -0
- package/coverage/lcov-report/src/modules/sync.ts.html +316 -0
- package/coverage/lcov-report/src/modules/syncs.ts.html +169 -0
- package/coverage/lcov-report/src/modules/webhooks.ts.html +343 -0
- package/coverage/lcov.info +1976 -0
- package/dist/src/modules/accounting.d.ts +5 -1
- package/dist/src/modules/accounting.js +12 -1
- package/dist/src/modules/api.d.ts +781 -226
- package/dist/src/modules/consumer.d.ts +52 -15
- package/dist/src/modules/consumers.d.ts +260 -75
- package/dist/src/modules/datastores.d.ts +1 -1
- package/dist/src/modules/internalApi.js +5 -1
- package/dist/src/modules/sync.d.ts +208 -60
- package/dist/src/modules/syncs.d.ts +520 -150
- package/dist/test/modules/accounting.test.js +23 -0
- package/dist/test/modules/flow.test.d.ts +1 -0
- package/dist/test/modules/flow.test.js +69 -0
- package/package.json +1 -1
- package/src/modules/accounting.ts +17 -3
- package/src/modules/internalApi.ts +19 -10
- package/src/types/public-api/schema.d.ts +343 -33
- package/test/modules/accounting.test.ts +27 -0
|
@@ -437,11 +437,18 @@ export interface paths {
|
|
|
437
437
|
};
|
|
438
438
|
'/consumers/{consumer_id}/accounting/financial-entry': {
|
|
439
439
|
/**
|
|
440
|
-
* Create a financial entry
|
|
440
|
+
* Create a financial entry [Deprecated]
|
|
441
441
|
* @description Create a new financial entry (Bank or Cash operation)
|
|
442
442
|
*/
|
|
443
443
|
post: operations['accounting_create_financial_entry'];
|
|
444
444
|
};
|
|
445
|
+
'/consumers/{consumer_id}/accounting/financial-entries': {
|
|
446
|
+
/**
|
|
447
|
+
* Create a financial entry
|
|
448
|
+
* @description Create a new financial entry (Bank or Cash operation)
|
|
449
|
+
*/
|
|
450
|
+
post: operations['accounting_create_financial_entries'];
|
|
451
|
+
};
|
|
445
452
|
'/consumers/{consumer_id}/accounting/outstandings': {
|
|
446
453
|
/**
|
|
447
454
|
* Get clients/suppliers outstandings
|
|
@@ -449,6 +456,13 @@ export interface paths {
|
|
|
449
456
|
*/
|
|
450
457
|
get: operations['accounting_get_outstandings'];
|
|
451
458
|
};
|
|
459
|
+
'/consumers/{consumer_id}/accounting/attachments': {
|
|
460
|
+
/**
|
|
461
|
+
* Get attachments
|
|
462
|
+
* @description Returns a list of all attachments linked to an accounting entry
|
|
463
|
+
*/
|
|
464
|
+
get: operations['accounting_get_attachments'];
|
|
465
|
+
};
|
|
452
466
|
'/consumers/{consumer_id}/pos/orders': {
|
|
453
467
|
/**
|
|
454
468
|
* Get orders
|
|
@@ -696,6 +710,13 @@ export interface paths {
|
|
|
696
710
|
*/
|
|
697
711
|
get: operations['banking_get_account_transactions'];
|
|
698
712
|
};
|
|
713
|
+
'/consumers/{consumer_id}/payment/balances': {
|
|
714
|
+
/**
|
|
715
|
+
* Retrieve all Balances
|
|
716
|
+
* @description Returns a list of balances.
|
|
717
|
+
*/
|
|
718
|
+
get: operations['payment_get_balances'];
|
|
719
|
+
};
|
|
699
720
|
'/consumers/{consumer_id}/payment/transactions': {
|
|
700
721
|
/**
|
|
701
722
|
* Retrieve all Transactions
|
|
@@ -1020,6 +1041,13 @@ export interface components {
|
|
|
1020
1041
|
/** Base64 String */
|
|
1021
1042
|
base64_string: string;
|
|
1022
1043
|
};
|
|
1044
|
+
/** AttachmentItemOut */
|
|
1045
|
+
AttachmentItemOut: {
|
|
1046
|
+
/** Id */
|
|
1047
|
+
id: string;
|
|
1048
|
+
/** Base64 String */
|
|
1049
|
+
base64_string: string;
|
|
1050
|
+
};
|
|
1023
1051
|
/** AuthItem */
|
|
1024
1052
|
AuthItem: {
|
|
1025
1053
|
/** Clientid */
|
|
@@ -1032,6 +1060,35 @@ export interface components {
|
|
|
1032
1060
|
*/
|
|
1033
1061
|
accountId: string;
|
|
1034
1062
|
};
|
|
1063
|
+
/** BalanceItemOut */
|
|
1064
|
+
BalanceItemOut: {
|
|
1065
|
+
/**
|
|
1066
|
+
* Id
|
|
1067
|
+
* @description Technical id in Chift
|
|
1068
|
+
*/
|
|
1069
|
+
id: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* Source Ref
|
|
1072
|
+
* @description Technical id in the target software
|
|
1073
|
+
*/
|
|
1074
|
+
source_ref: components['schemas']['Ref'];
|
|
1075
|
+
/**
|
|
1076
|
+
* Availale Amount
|
|
1077
|
+
* @description Total amount available
|
|
1078
|
+
*/
|
|
1079
|
+
availale_amount: number;
|
|
1080
|
+
/**
|
|
1081
|
+
* Currency
|
|
1082
|
+
* @description Currency
|
|
1083
|
+
*/
|
|
1084
|
+
currency: string;
|
|
1085
|
+
/**
|
|
1086
|
+
* Create Date
|
|
1087
|
+
* Format: date-time
|
|
1088
|
+
* @description Create Date
|
|
1089
|
+
*/
|
|
1090
|
+
create_date: string;
|
|
1091
|
+
};
|
|
1035
1092
|
/** BankingAccountItem */
|
|
1036
1093
|
BankingAccountItem: {
|
|
1037
1094
|
/** Id */
|
|
@@ -1044,14 +1101,14 @@ export interface components {
|
|
|
1044
1101
|
* Current Balance Last Update Date
|
|
1045
1102
|
* Format: date-time
|
|
1046
1103
|
*/
|
|
1047
|
-
current_balance_last_update_date
|
|
1104
|
+
current_balance_last_update_date?: string;
|
|
1048
1105
|
/** Available Balance */
|
|
1049
1106
|
available_balance: number;
|
|
1050
1107
|
/**
|
|
1051
1108
|
* Available Balance Last Update Date
|
|
1052
1109
|
* Format: date-time
|
|
1053
1110
|
*/
|
|
1054
|
-
available_balance_last_update_date
|
|
1111
|
+
available_balance_last_update_date?: string;
|
|
1055
1112
|
/** Description */
|
|
1056
1113
|
description: string;
|
|
1057
1114
|
/** Reference */
|
|
@@ -1088,6 +1145,8 @@ export interface components {
|
|
|
1088
1145
|
counterpart_name?: string;
|
|
1089
1146
|
/** Counterpart Reference */
|
|
1090
1147
|
counterpart_reference?: string;
|
|
1148
|
+
/** Remittance Information */
|
|
1149
|
+
remittance_information?: string;
|
|
1091
1150
|
/**
|
|
1092
1151
|
* Creation Date
|
|
1093
1152
|
* Format: date-time
|
|
@@ -1794,7 +1853,7 @@ export interface components {
|
|
|
1794
1853
|
* Optional
|
|
1795
1854
|
* @default false
|
|
1796
1855
|
*/
|
|
1797
|
-
|
|
1856
|
+
optional?: boolean;
|
|
1798
1857
|
};
|
|
1799
1858
|
/** DatastoreDef */
|
|
1800
1859
|
DatastoreDef: {
|
|
@@ -1806,6 +1865,12 @@ export interface components {
|
|
|
1806
1865
|
*/
|
|
1807
1866
|
search_column?: string;
|
|
1808
1867
|
};
|
|
1868
|
+
/**
|
|
1869
|
+
* DocumentType
|
|
1870
|
+
* @description An enumeration.
|
|
1871
|
+
* @enum {string}
|
|
1872
|
+
*/
|
|
1873
|
+
DocumentType: 'invoice' | 'entry';
|
|
1809
1874
|
/** EmployeeItem */
|
|
1810
1875
|
EmployeeItem: {
|
|
1811
1876
|
/** Id */
|
|
@@ -1834,6 +1899,16 @@ export interface components {
|
|
|
1834
1899
|
/** Account Number */
|
|
1835
1900
|
account_number?: string;
|
|
1836
1901
|
};
|
|
1902
|
+
/**
|
|
1903
|
+
* EntryLineType
|
|
1904
|
+
* @description An enumeration.
|
|
1905
|
+
* @enum {string}
|
|
1906
|
+
*/
|
|
1907
|
+
EntryLineType:
|
|
1908
|
+
| 'customer_account'
|
|
1909
|
+
| 'supplier_account'
|
|
1910
|
+
| 'employee_account'
|
|
1911
|
+
| 'general_account';
|
|
1837
1912
|
/**
|
|
1838
1913
|
* ExecutionType
|
|
1839
1914
|
* @description An enumeration.
|
|
@@ -1901,10 +1976,45 @@ export interface components {
|
|
|
1901
1976
|
currency_exchange_rate?: number;
|
|
1902
1977
|
/** Reference */
|
|
1903
1978
|
reference?: string;
|
|
1979
|
+
/** Number */
|
|
1980
|
+
number?: string;
|
|
1904
1981
|
/** Items */
|
|
1905
1982
|
items: components['schemas']['FinancialEntryLineItem'][];
|
|
1983
|
+
/**
|
|
1984
|
+
* Pdf
|
|
1985
|
+
* @description Base 64 string representing the PDF attached to the sale/purchase entry.
|
|
1986
|
+
*/
|
|
1987
|
+
pdf?: string;
|
|
1988
|
+
};
|
|
1989
|
+
/** FinancialEntryItemInOld */
|
|
1990
|
+
FinancialEntryItemInOld: {
|
|
1991
|
+
/**
|
|
1992
|
+
* Date
|
|
1993
|
+
* Format: date
|
|
1994
|
+
*/
|
|
1995
|
+
date: string;
|
|
1996
|
+
/**
|
|
1997
|
+
* Journal Id
|
|
1998
|
+
* @description Indicates the journal used in for the operation.
|
|
1999
|
+
*/
|
|
2000
|
+
journal_id: string;
|
|
2001
|
+
/**
|
|
2002
|
+
* Currency
|
|
2003
|
+
* @description Indicates the currency of the operation (e.g. EUR).
|
|
2004
|
+
*/
|
|
2005
|
+
currency: string;
|
|
2006
|
+
/**
|
|
2007
|
+
* Currency Exchange Rate
|
|
2008
|
+
* @description Indicates the exchange rate at the date of the operation. Must be filled in when creating the operation in another currency from the default currency of the accounting system.
|
|
2009
|
+
* @default 1
|
|
2010
|
+
*/
|
|
2011
|
+
currency_exchange_rate?: number;
|
|
2012
|
+
/** Reference */
|
|
2013
|
+
reference?: string;
|
|
1906
2014
|
/** Number */
|
|
1907
2015
|
number?: string;
|
|
2016
|
+
/** Items */
|
|
2017
|
+
items: components['schemas']['FinancialEntryLineItemOld'][];
|
|
1908
2018
|
/**
|
|
1909
2019
|
* Pdf
|
|
1910
2020
|
* @description Base 64 string representing the PDF attached to the sale/purchase entry.
|
|
@@ -1936,16 +2046,61 @@ export interface components {
|
|
|
1936
2046
|
currency_exchange_rate?: number;
|
|
1937
2047
|
/** Reference */
|
|
1938
2048
|
reference?: string;
|
|
2049
|
+
/** Id */
|
|
2050
|
+
id: string;
|
|
2051
|
+
/** Number */
|
|
2052
|
+
number: string;
|
|
1939
2053
|
/** Items */
|
|
1940
2054
|
items: components['schemas']['FinancialEntryLineItemOut'][];
|
|
2055
|
+
};
|
|
2056
|
+
/** FinancialEntryItemOutOld */
|
|
2057
|
+
FinancialEntryItemOutOld: {
|
|
2058
|
+
/**
|
|
2059
|
+
* Date
|
|
2060
|
+
* Format: date
|
|
2061
|
+
*/
|
|
2062
|
+
date: string;
|
|
2063
|
+
/**
|
|
2064
|
+
* Journal Id
|
|
2065
|
+
* @description Indicates the journal used in for the operation.
|
|
2066
|
+
*/
|
|
2067
|
+
journal_id: string;
|
|
2068
|
+
/**
|
|
2069
|
+
* Currency
|
|
2070
|
+
* @description Indicates the currency of the operation (e.g. EUR).
|
|
2071
|
+
*/
|
|
2072
|
+
currency: string;
|
|
2073
|
+
/**
|
|
2074
|
+
* Currency Exchange Rate
|
|
2075
|
+
* @description Indicates the exchange rate at the date of the operation. Must be filled in when creating the operation in another currency from the default currency of the accounting system.
|
|
2076
|
+
* @default 1
|
|
2077
|
+
*/
|
|
2078
|
+
currency_exchange_rate?: number;
|
|
2079
|
+
/** Reference */
|
|
2080
|
+
reference?: string;
|
|
1941
2081
|
/** Id */
|
|
1942
2082
|
id: string;
|
|
1943
2083
|
/** Number */
|
|
1944
2084
|
number: string;
|
|
2085
|
+
/** Items */
|
|
2086
|
+
items: components['schemas']['FinancialEntryLineItemOutOld'][];
|
|
1945
2087
|
};
|
|
1946
2088
|
/** FinancialEntryLineItem */
|
|
1947
2089
|
FinancialEntryLineItem: {
|
|
1948
|
-
|
|
2090
|
+
account_type: components['schemas']['EntryLineType'];
|
|
2091
|
+
/** Account */
|
|
2092
|
+
account: string;
|
|
2093
|
+
/**
|
|
2094
|
+
* Amount
|
|
2095
|
+
* @description A positive amount represents funds transfered to the bank/cash account. In that case the bank/cash account is debited and the given account_number is credited.
|
|
2096
|
+
*/
|
|
2097
|
+
amount: number;
|
|
2098
|
+
/** Description */
|
|
2099
|
+
description?: string;
|
|
2100
|
+
};
|
|
2101
|
+
/** FinancialEntryLineItemOld */
|
|
2102
|
+
FinancialEntryLineItemOld: {
|
|
2103
|
+
type: components['schemas']['EntryLineType'];
|
|
1949
2104
|
/** Account Number */
|
|
1950
2105
|
account_number: string;
|
|
1951
2106
|
/**
|
|
@@ -1963,7 +2118,22 @@ export interface components {
|
|
|
1963
2118
|
};
|
|
1964
2119
|
/** FinancialEntryLineItemOut */
|
|
1965
2120
|
FinancialEntryLineItemOut: {
|
|
1966
|
-
|
|
2121
|
+
account_type: components['schemas']['EntryLineType'];
|
|
2122
|
+
/** Account */
|
|
2123
|
+
account: string;
|
|
2124
|
+
/**
|
|
2125
|
+
* Amount
|
|
2126
|
+
* @description A positive amount represents funds transfered to the bank/cash account. In that case the bank/cash account is debited and the given account_number is credited.
|
|
2127
|
+
*/
|
|
2128
|
+
amount: number;
|
|
2129
|
+
/** Description */
|
|
2130
|
+
description?: string;
|
|
2131
|
+
/** Counterpart Account */
|
|
2132
|
+
counterpart_account: string;
|
|
2133
|
+
};
|
|
2134
|
+
/** FinancialEntryLineItemOutOld */
|
|
2135
|
+
FinancialEntryLineItemOutOld: {
|
|
2136
|
+
type: components['schemas']['EntryLineType'];
|
|
1967
2137
|
/** Account Number */
|
|
1968
2138
|
account_number: string;
|
|
1969
2139
|
/**
|
|
@@ -1981,16 +2151,6 @@ export interface components {
|
|
|
1981
2151
|
/** Counterpart Account */
|
|
1982
2152
|
counterpart_account: string;
|
|
1983
2153
|
};
|
|
1984
|
-
/**
|
|
1985
|
-
* FinancialEntryLineType
|
|
1986
|
-
* @description An enumeration.
|
|
1987
|
-
* @enum {string}
|
|
1988
|
-
*/
|
|
1989
|
-
FinancialEntryLineType:
|
|
1990
|
-
| 'customer_account'
|
|
1991
|
-
| 'supplier_account'
|
|
1992
|
-
| 'employee_account'
|
|
1993
|
-
| 'general_account';
|
|
1994
2154
|
/** FlowConfig */
|
|
1995
2155
|
FlowConfig: {
|
|
1996
2156
|
/** Definitionfields */
|
|
@@ -2621,10 +2781,10 @@ export interface components {
|
|
|
2621
2781
|
* Description
|
|
2622
2782
|
* @description Line description
|
|
2623
2783
|
*/
|
|
2624
|
-
description
|
|
2784
|
+
description?: string;
|
|
2625
2785
|
/**
|
|
2626
2786
|
* Unit Price
|
|
2627
|
-
* @description Unit price
|
|
2787
|
+
* @description Unit price excl. taxes
|
|
2628
2788
|
*/
|
|
2629
2789
|
unit_price: number;
|
|
2630
2790
|
/**
|
|
@@ -2632,21 +2792,27 @@ export interface components {
|
|
|
2632
2792
|
* @description Quantity
|
|
2633
2793
|
*/
|
|
2634
2794
|
quantity: number;
|
|
2795
|
+
/**
|
|
2796
|
+
* Discount Amount
|
|
2797
|
+
* @description Line discount amount excl. taxes, (unit_price * quantity) - discount_amount = untaxed_amount
|
|
2798
|
+
* @default 0
|
|
2799
|
+
*/
|
|
2800
|
+
discount_amount?: number;
|
|
2635
2801
|
/**
|
|
2636
2802
|
* Tax Amount
|
|
2637
2803
|
* @description Line total taxes amount
|
|
2638
2804
|
*/
|
|
2639
2805
|
tax_amount: number;
|
|
2640
|
-
/**
|
|
2641
|
-
* Total
|
|
2642
|
-
* @description Line total amount incl. taxes
|
|
2643
|
-
*/
|
|
2644
|
-
total: number;
|
|
2645
2806
|
/**
|
|
2646
2807
|
* Untaxed Amount
|
|
2647
2808
|
* @description Line total untaxed amount
|
|
2648
2809
|
*/
|
|
2649
2810
|
untaxed_amount: number;
|
|
2811
|
+
/**
|
|
2812
|
+
* Total
|
|
2813
|
+
* @description Line total amount incl. taxes, total = tax_amount + untaxed_amount
|
|
2814
|
+
*/
|
|
2815
|
+
total: number;
|
|
2650
2816
|
/**
|
|
2651
2817
|
* Tax Rate
|
|
2652
2818
|
* @description Tax rate (e.g. 21.0)
|
|
@@ -3666,7 +3832,7 @@ export interface components {
|
|
|
3666
3832
|
* @description An enumeration.
|
|
3667
3833
|
* @enum {string}
|
|
3668
3834
|
*/
|
|
3669
|
-
OrderStatus: 'cancelled' | 'draft' | 'confirmed';
|
|
3835
|
+
OrderStatus: 'cancelled' | 'draft' | 'confirmed' | 'shipped' | 'refunded';
|
|
3670
3836
|
/** OutstandingItem */
|
|
3671
3837
|
OutstandingItem: {
|
|
3672
3838
|
/** Id */
|
|
@@ -3824,6 +3990,28 @@ export interface components {
|
|
|
3824
3990
|
/** Size */
|
|
3825
3991
|
size: number;
|
|
3826
3992
|
};
|
|
3993
|
+
/** Page[AttachmentItemOut] */
|
|
3994
|
+
Page_AttachmentItemOut_: {
|
|
3995
|
+
/** Items */
|
|
3996
|
+
items: components['schemas']['AttachmentItemOut'][];
|
|
3997
|
+
/** Total */
|
|
3998
|
+
total: number;
|
|
3999
|
+
/** Page */
|
|
4000
|
+
page: number;
|
|
4001
|
+
/** Size */
|
|
4002
|
+
size: number;
|
|
4003
|
+
};
|
|
4004
|
+
/** Page[BalanceItemOut] */
|
|
4005
|
+
Page_BalanceItemOut_: {
|
|
4006
|
+
/** Items */
|
|
4007
|
+
items: components['schemas']['BalanceItemOut'][];
|
|
4008
|
+
/** Total */
|
|
4009
|
+
total: number;
|
|
4010
|
+
/** Page */
|
|
4011
|
+
page: number;
|
|
4012
|
+
/** Size */
|
|
4013
|
+
size: number;
|
|
4014
|
+
};
|
|
3827
4015
|
/** Page[BankingAccountItem] */
|
|
3828
4016
|
Page_BankingAccountItem_: {
|
|
3829
4017
|
/** Items */
|
|
@@ -5136,12 +5324,6 @@ export interface components {
|
|
|
5136
5324
|
/** Size */
|
|
5137
5325
|
size: number;
|
|
5138
5326
|
};
|
|
5139
|
-
/**
|
|
5140
|
-
* PaymentStatus
|
|
5141
|
-
* @description An enumeration.
|
|
5142
|
-
* @enum {string}
|
|
5143
|
-
*/
|
|
5144
|
-
app__routers__accounting__PaymentStatus: 'all' | 'unpaid' | 'paid';
|
|
5145
5327
|
/** VatCode */
|
|
5146
5328
|
app__routers__accounting__VatCode: {
|
|
5147
5329
|
/** Id */
|
|
@@ -5407,6 +5589,12 @@ export interface components {
|
|
|
5407
5589
|
*/
|
|
5408
5590
|
country?: string;
|
|
5409
5591
|
};
|
|
5592
|
+
/**
|
|
5593
|
+
* PaymentStatus
|
|
5594
|
+
* @description An enumeration.
|
|
5595
|
+
* @enum {string}
|
|
5596
|
+
*/
|
|
5597
|
+
models__common__PaymentStatus: 'all' | 'unpaid' | 'paid';
|
|
5410
5598
|
/**
|
|
5411
5599
|
* InvoiceType
|
|
5412
5600
|
* @description An enumeration.
|
|
@@ -6927,7 +7115,7 @@ export interface operations {
|
|
|
6927
7115
|
/** @description Indicate if payments linked to the invoices should be included in the response. By default payments are not included and the field payments is null. */
|
|
6928
7116
|
include_payments?: components['schemas']['BoolParam'];
|
|
6929
7117
|
/** @description Extra filter to retrieve invoices with a specific payment status. */
|
|
6930
|
-
payment_status?: components['schemas']['
|
|
7118
|
+
payment_status?: components['schemas']['models__common__PaymentStatus'];
|
|
6931
7119
|
page?: number;
|
|
6932
7120
|
size?: number;
|
|
6933
7121
|
};
|
|
@@ -7058,7 +7246,7 @@ export interface operations {
|
|
|
7058
7246
|
/** @description Indicate if payments linked to the invoices should be included in the response. By default payments are not included and the field payments is null. */
|
|
7059
7247
|
include_payments?: components['schemas']['BoolParam'];
|
|
7060
7248
|
/** @description Extra filter to retrieve invoices with a specific payment status. */
|
|
7061
|
-
payment_status?: components['schemas']['
|
|
7249
|
+
payment_status?: components['schemas']['models__common__PaymentStatus'];
|
|
7062
7250
|
page?: number;
|
|
7063
7251
|
size?: number;
|
|
7064
7252
|
};
|
|
@@ -7989,10 +8177,56 @@ export interface operations {
|
|
|
7989
8177
|
};
|
|
7990
8178
|
};
|
|
7991
8179
|
/**
|
|
7992
|
-
* Create a financial entry
|
|
8180
|
+
* Create a financial entry [Deprecated]
|
|
7993
8181
|
* @description Create a new financial entry (Bank or Cash operation)
|
|
7994
8182
|
*/
|
|
7995
8183
|
accounting_create_financial_entry: {
|
|
8184
|
+
parameters: {
|
|
8185
|
+
query?: {
|
|
8186
|
+
/** @description Counterpart account number of the bank/cash journal. This will be retrieved from the accounting settings if left empty. */
|
|
8187
|
+
financial_counterpart_account?: string;
|
|
8188
|
+
};
|
|
8189
|
+
path: {
|
|
8190
|
+
consumer_id: string;
|
|
8191
|
+
};
|
|
8192
|
+
};
|
|
8193
|
+
requestBody: {
|
|
8194
|
+
content: {
|
|
8195
|
+
'application/json': components['schemas']['FinancialEntryItemInOld'];
|
|
8196
|
+
};
|
|
8197
|
+
};
|
|
8198
|
+
responses: {
|
|
8199
|
+
/** @description Successful Response */
|
|
8200
|
+
200: {
|
|
8201
|
+
content: {
|
|
8202
|
+
'application/json': components['schemas']['FinancialEntryItemOutOld'];
|
|
8203
|
+
};
|
|
8204
|
+
};
|
|
8205
|
+
/** @description Bad Request */
|
|
8206
|
+
400: {
|
|
8207
|
+
content: {
|
|
8208
|
+
'application/json': components['schemas']['ChiftError'];
|
|
8209
|
+
};
|
|
8210
|
+
};
|
|
8211
|
+
/** @description Not Found */
|
|
8212
|
+
404: {
|
|
8213
|
+
content: {
|
|
8214
|
+
'application/json': components['schemas']['ChiftError'];
|
|
8215
|
+
};
|
|
8216
|
+
};
|
|
8217
|
+
/** @description Validation Error */
|
|
8218
|
+
422: {
|
|
8219
|
+
content: {
|
|
8220
|
+
'application/json': components['schemas']['HTTPValidationError'];
|
|
8221
|
+
};
|
|
8222
|
+
};
|
|
8223
|
+
};
|
|
8224
|
+
};
|
|
8225
|
+
/**
|
|
8226
|
+
* Create a financial entry
|
|
8227
|
+
* @description Create a new financial entry (Bank or Cash operation)
|
|
8228
|
+
*/
|
|
8229
|
+
accounting_create_financial_entries: {
|
|
7996
8230
|
parameters: {
|
|
7997
8231
|
query?: {
|
|
7998
8232
|
/** @description Counterpart account number of the bank/cash journal. This will be retrieved from the accounting settings if left empty. */
|
|
@@ -8071,6 +8305,43 @@ export interface operations {
|
|
|
8071
8305
|
};
|
|
8072
8306
|
};
|
|
8073
8307
|
};
|
|
8308
|
+
/**
|
|
8309
|
+
* Get attachments
|
|
8310
|
+
* @description Returns a list of all attachments linked to an accounting entry
|
|
8311
|
+
*/
|
|
8312
|
+
accounting_get_attachments: {
|
|
8313
|
+
parameters: {
|
|
8314
|
+
query: {
|
|
8315
|
+
type: components['schemas']['DocumentType'];
|
|
8316
|
+
document_id: string;
|
|
8317
|
+
page?: number;
|
|
8318
|
+
size?: number;
|
|
8319
|
+
};
|
|
8320
|
+
path: {
|
|
8321
|
+
consumer_id: string;
|
|
8322
|
+
};
|
|
8323
|
+
};
|
|
8324
|
+
responses: {
|
|
8325
|
+
/** @description Successful Response */
|
|
8326
|
+
200: {
|
|
8327
|
+
content: {
|
|
8328
|
+
'application/json': components['schemas']['Page_AttachmentItemOut_'];
|
|
8329
|
+
};
|
|
8330
|
+
};
|
|
8331
|
+
/** @description Bad Request */
|
|
8332
|
+
400: {
|
|
8333
|
+
content: {
|
|
8334
|
+
'application/json': components['schemas']['ChiftError'];
|
|
8335
|
+
};
|
|
8336
|
+
};
|
|
8337
|
+
/** @description Validation Error */
|
|
8338
|
+
422: {
|
|
8339
|
+
content: {
|
|
8340
|
+
'application/json': components['schemas']['HTTPValidationError'];
|
|
8341
|
+
};
|
|
8342
|
+
};
|
|
8343
|
+
};
|
|
8344
|
+
};
|
|
8074
8345
|
/**
|
|
8075
8346
|
* Get orders
|
|
8076
8347
|
* @description Returns a list of the orders
|
|
@@ -8997,6 +9268,8 @@ export interface operations {
|
|
|
8997
9268
|
query?: {
|
|
8998
9269
|
/** @description Filter based on the type of the invoice. */
|
|
8999
9270
|
invoice_type?: components['schemas']['InvoiceTypeRequest'];
|
|
9271
|
+
/** @description Filter paid/unpaid invoices */
|
|
9272
|
+
payment_status?: components['schemas']['models__common__PaymentStatus'];
|
|
9000
9273
|
date_from?: string;
|
|
9001
9274
|
date_to?: string;
|
|
9002
9275
|
page?: number;
|
|
@@ -9580,6 +9853,41 @@ export interface operations {
|
|
|
9580
9853
|
};
|
|
9581
9854
|
};
|
|
9582
9855
|
};
|
|
9856
|
+
/**
|
|
9857
|
+
* Retrieve all Balances
|
|
9858
|
+
* @description Returns a list of balances.
|
|
9859
|
+
*/
|
|
9860
|
+
payment_get_balances: {
|
|
9861
|
+
parameters: {
|
|
9862
|
+
query?: {
|
|
9863
|
+
page?: number;
|
|
9864
|
+
size?: number;
|
|
9865
|
+
};
|
|
9866
|
+
path: {
|
|
9867
|
+
consumer_id: string;
|
|
9868
|
+
};
|
|
9869
|
+
};
|
|
9870
|
+
responses: {
|
|
9871
|
+
/** @description Successful Response */
|
|
9872
|
+
200: {
|
|
9873
|
+
content: {
|
|
9874
|
+
'application/json': components['schemas']['Page_BalanceItemOut_'];
|
|
9875
|
+
};
|
|
9876
|
+
};
|
|
9877
|
+
/** @description Bad Request */
|
|
9878
|
+
400: {
|
|
9879
|
+
content: {
|
|
9880
|
+
'application/json': components['schemas']['ChiftError'];
|
|
9881
|
+
};
|
|
9882
|
+
};
|
|
9883
|
+
/** @description Validation Error */
|
|
9884
|
+
422: {
|
|
9885
|
+
content: {
|
|
9886
|
+
'application/json': components['schemas']['HTTPValidationError'];
|
|
9887
|
+
};
|
|
9888
|
+
};
|
|
9889
|
+
};
|
|
9890
|
+
};
|
|
9583
9891
|
/**
|
|
9584
9892
|
* Retrieve all Transactions
|
|
9585
9893
|
* @description Returns a list of transactions. Optionally transaction type and dates can be defined to retrieve transactions of a certain type from a certain date to another date
|
|
@@ -9591,6 +9899,8 @@ export interface operations {
|
|
|
9591
9899
|
accounting_category?: components['schemas']['TransactionAccountingCategory'];
|
|
9592
9900
|
/** @description Get all transactions more recent than this one excluded */
|
|
9593
9901
|
starting_from?: string;
|
|
9902
|
+
/** @description Get all transactions for a specific balance */
|
|
9903
|
+
balance_id?: string;
|
|
9594
9904
|
date_from?: string;
|
|
9595
9905
|
date_to?: string;
|
|
9596
9906
|
page?: number;
|
|
@@ -567,6 +567,33 @@ test('createFinancialEntry', async () => {
|
|
|
567
567
|
}
|
|
568
568
|
|
|
569
569
|
const financialEntry = await consumer.accounting.createFinancialEntry({
|
|
570
|
+
date: '2022-01-01',
|
|
571
|
+
journal_id: journal.id,
|
|
572
|
+
currency: 'EUR',
|
|
573
|
+
items: [
|
|
574
|
+
{
|
|
575
|
+
account_type: 'customer_account',
|
|
576
|
+
account: clients[0].id,
|
|
577
|
+
amount: 10,
|
|
578
|
+
},
|
|
579
|
+
],
|
|
580
|
+
});
|
|
581
|
+
expect(financialEntry).toBeTruthy();
|
|
582
|
+
expect(financialEntry).toHaveProperty('journal_id', journal.id);
|
|
583
|
+
});
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* @deprecated replaced by createFinancialEntry
|
|
587
|
+
*/
|
|
588
|
+
test('createFinancialEntryOld', async () => {
|
|
589
|
+
const journal = journals.find((journal) => journal.journal_type === 'financial_operation');
|
|
590
|
+
if (!journal) {
|
|
591
|
+
throw new Error(
|
|
592
|
+
'No journal with type "financial_operation" found to create financial entry'
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
const financialEntry = await consumer.accounting.createFinancialEntryOld({
|
|
570
597
|
date: '2022-01-01',
|
|
571
598
|
journal_id: journal.id,
|
|
572
599
|
currency: 'EUR',
|