@chift/chift-nodejs 1.0.2 → 1.0.3
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/CHANGELOG.md +4 -0
- package/dist/src/modules/accounting.d.ts +4 -1
- package/dist/src/modules/accounting.js +16 -1
- package/dist/src/modules/api.d.ts +1494 -262
- package/dist/src/modules/consumer.d.ts +95 -13
- package/dist/src/modules/consumers.d.ts +475 -65
- package/dist/src/modules/integrations.d.ts +2 -0
- package/dist/src/modules/sync.d.ts +380 -52
- package/dist/src/modules/sync.js +0 -2
- package/dist/src/modules/syncs.d.ts +956 -136
- package/dist/test/modules/accounting.test.js +104 -15
- package/dist/test/modules/consumers.test.js +1 -1
- package/dist/test/modules/pos.test.js +4 -4
- package/package.json +1 -1
- package/.eslintcache +0 -1
- package/coverage/clover.xml +0 -1645
- package/coverage/coverage-final.json +0 -19
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -146
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/src/helpers/index.html +0 -131
- package/coverage/lcov-report/src/helpers/openapi.ts.html +0 -151
- package/coverage/lcov-report/src/helpers/settings.ts.html +0 -94
- package/coverage/lcov-report/src/index.html +0 -116
- package/coverage/lcov-report/src/index.ts.html +0 -88
- package/coverage/lcov-report/src/modules/accounting.ts.html +0 -1156
- package/coverage/lcov-report/src/modules/api.ts.html +0 -190
- package/coverage/lcov-report/src/modules/consumer.ts.html +0 -616
- package/coverage/lcov-report/src/modules/consumers.ts.html +0 -331
- package/coverage/lcov-report/src/modules/custom.ts.html +0 -193
- package/coverage/lcov-report/src/modules/datastores.ts.html +0 -142
- package/coverage/lcov-report/src/modules/ecommerce.ts.html +0 -331
- package/coverage/lcov-report/src/modules/flow.ts.html +0 -589
- package/coverage/lcov-report/src/modules/index.html +0 -326
- package/coverage/lcov-report/src/modules/integrations.ts.html +0 -151
- package/coverage/lcov-report/src/modules/internalApi.ts.html +0 -586
- package/coverage/lcov-report/src/modules/invoicing.ts.html +0 -391
- package/coverage/lcov-report/src/modules/pos.ts.html +0 -421
- package/coverage/lcov-report/src/modules/sync.ts.html +0 -316
- package/coverage/lcov-report/src/modules/syncs.ts.html +0 -169
- package/coverage/lcov-report/src/modules/webhooks.ts.html +0 -343
- package/coverage/lcov.info +0 -1976
- package/dist/test/modules/flow.test.d.ts +0 -1
- package/dist/test/modules/flow.test.js +0 -69
|
@@ -341,6 +341,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
341
341
|
country?: string | undefined;
|
|
342
342
|
}[] | undefined;
|
|
343
343
|
account_number?: string | undefined;
|
|
344
|
+
company_number?: string | undefined;
|
|
344
345
|
id?: string | undefined;
|
|
345
346
|
}[]>;
|
|
346
347
|
createClient(client: {
|
|
@@ -411,6 +412,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
411
412
|
country?: string | undefined;
|
|
412
413
|
}[] | undefined;
|
|
413
414
|
account_number?: string | undefined;
|
|
415
|
+
company_number?: string | undefined;
|
|
414
416
|
id?: string | undefined;
|
|
415
417
|
}>;
|
|
416
418
|
getClient(clientId: string): import("../types/api").RequestData<{
|
|
@@ -446,6 +448,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
446
448
|
country?: string | undefined;
|
|
447
449
|
}[] | undefined;
|
|
448
450
|
account_number?: string | undefined;
|
|
451
|
+
company_number?: string | undefined;
|
|
449
452
|
id?: string | undefined;
|
|
450
453
|
}>;
|
|
451
454
|
updateClient(clientId: string, client: {
|
|
@@ -513,6 +516,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
513
516
|
country?: string | undefined;
|
|
514
517
|
}[] | undefined;
|
|
515
518
|
account_number?: string | undefined;
|
|
519
|
+
company_number?: string | undefined;
|
|
516
520
|
id?: string | undefined;
|
|
517
521
|
}>;
|
|
518
522
|
getSuppliers(): import("../types/api").RequestData<{
|
|
@@ -548,6 +552,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
548
552
|
country?: string | undefined;
|
|
549
553
|
}[] | undefined;
|
|
550
554
|
account_number?: string | undefined;
|
|
555
|
+
company_number?: string | undefined;
|
|
551
556
|
id?: string | undefined;
|
|
552
557
|
}[]>;
|
|
553
558
|
createSupplier(supplier: {
|
|
@@ -618,6 +623,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
618
623
|
country?: string | undefined;
|
|
619
624
|
}[] | undefined;
|
|
620
625
|
account_number?: string | undefined;
|
|
626
|
+
company_number?: string | undefined;
|
|
621
627
|
id?: string | undefined;
|
|
622
628
|
}>;
|
|
623
629
|
getSupplier(supplierId: string): import("../types/api").RequestData<{
|
|
@@ -653,6 +659,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
653
659
|
country?: string | undefined;
|
|
654
660
|
}[] | undefined;
|
|
655
661
|
account_number?: string | undefined;
|
|
662
|
+
company_number?: string | undefined;
|
|
656
663
|
id?: string | undefined;
|
|
657
664
|
}>;
|
|
658
665
|
updateSupplier(supplierId: string, supplier: {
|
|
@@ -720,6 +727,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
720
727
|
country?: string | undefined;
|
|
721
728
|
}[] | undefined;
|
|
722
729
|
account_number?: string | undefined;
|
|
730
|
+
company_number?: string | undefined;
|
|
723
731
|
id?: string | undefined;
|
|
724
732
|
}>;
|
|
725
733
|
createInvoice(invoice: {
|
|
@@ -784,7 +792,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
784
792
|
amount: number;
|
|
785
793
|
dedicated_amount?: number | undefined;
|
|
786
794
|
payment_date: string;
|
|
787
|
-
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation";
|
|
795
|
+
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation" | "unknown";
|
|
788
796
|
journal_id: string;
|
|
789
797
|
journal_name: string;
|
|
790
798
|
reconciled?: boolean | undefined;
|
|
@@ -875,7 +883,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
875
883
|
amount: number;
|
|
876
884
|
dedicated_amount?: number | undefined;
|
|
877
885
|
payment_date: string;
|
|
878
|
-
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation";
|
|
886
|
+
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation" | "unknown";
|
|
879
887
|
journal_id: string;
|
|
880
888
|
journal_name: string;
|
|
881
889
|
reconciled?: boolean | undefined;
|
|
@@ -926,7 +934,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
926
934
|
amount: number;
|
|
927
935
|
dedicated_amount?: number | undefined;
|
|
928
936
|
payment_date: string;
|
|
929
|
-
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation";
|
|
937
|
+
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation" | "unknown";
|
|
930
938
|
journal_id: string;
|
|
931
939
|
journal_name: string;
|
|
932
940
|
reconciled?: boolean | undefined;
|
|
@@ -973,7 +981,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
973
981
|
amount: number;
|
|
974
982
|
dedicated_amount?: number | undefined;
|
|
975
983
|
payment_date: string;
|
|
976
|
-
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation";
|
|
984
|
+
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation" | "unknown";
|
|
977
985
|
journal_id: string;
|
|
978
986
|
journal_name: string;
|
|
979
987
|
reconciled?: boolean | undefined;
|
|
@@ -1020,7 +1028,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1020
1028
|
amount: number;
|
|
1021
1029
|
dedicated_amount?: number | undefined;
|
|
1022
1030
|
payment_date: string;
|
|
1023
|
-
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation";
|
|
1031
|
+
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation" | "unknown";
|
|
1024
1032
|
journal_id: string;
|
|
1025
1033
|
journal_name: string;
|
|
1026
1034
|
reconciled?: boolean | undefined;
|
|
@@ -1071,7 +1079,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1071
1079
|
amount: number;
|
|
1072
1080
|
dedicated_amount?: number | undefined;
|
|
1073
1081
|
payment_date: string;
|
|
1074
|
-
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation";
|
|
1082
|
+
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation" | "unknown";
|
|
1075
1083
|
journal_id: string;
|
|
1076
1084
|
journal_name: string;
|
|
1077
1085
|
reconciled?: boolean | undefined;
|
|
@@ -1285,7 +1293,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1285
1293
|
amount: number;
|
|
1286
1294
|
dedicated_amount?: number | undefined;
|
|
1287
1295
|
payment_date: string;
|
|
1288
|
-
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation";
|
|
1296
|
+
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation" | "unknown";
|
|
1289
1297
|
journal_id: string;
|
|
1290
1298
|
journal_name: string;
|
|
1291
1299
|
reconciled?: boolean | undefined;
|
|
@@ -1296,13 +1304,13 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1296
1304
|
id: string;
|
|
1297
1305
|
code: string;
|
|
1298
1306
|
name: string;
|
|
1299
|
-
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation";
|
|
1307
|
+
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation" | "unknown";
|
|
1300
1308
|
}[]>;
|
|
1301
1309
|
getVatCodes(): import("../types/api").RequestData<{
|
|
1302
1310
|
id: string;
|
|
1303
1311
|
code?: string | undefined;
|
|
1304
1312
|
label: string;
|
|
1305
|
-
scope?: "
|
|
1313
|
+
scope?: "unknown" | "nat" | "eu" | "int" | undefined;
|
|
1306
1314
|
rate: number;
|
|
1307
1315
|
type: "unknown" | "sale" | "purchase" | "both";
|
|
1308
1316
|
}[]>;
|
|
@@ -1414,6 +1422,25 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1414
1422
|
reference?: string | undefined;
|
|
1415
1423
|
account_number?: string | undefined;
|
|
1416
1424
|
}[]>;
|
|
1425
|
+
getOutstandings(params: {
|
|
1426
|
+
unposted_allowed: "true" | "false";
|
|
1427
|
+
type: "client" | "supplier";
|
|
1428
|
+
}): import("../types/api").RequestData<{
|
|
1429
|
+
id: string;
|
|
1430
|
+
number?: string | undefined;
|
|
1431
|
+
journal_id: string;
|
|
1432
|
+
journal_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "financial_operation" | "miscellaneous_operation" | "unknown";
|
|
1433
|
+
date: string;
|
|
1434
|
+
due_date?: string | undefined;
|
|
1435
|
+
currency: string;
|
|
1436
|
+
currency_exchange_rate: number;
|
|
1437
|
+
amount: number;
|
|
1438
|
+
open_amount: number;
|
|
1439
|
+
partner_id: string;
|
|
1440
|
+
account_number: string;
|
|
1441
|
+
reference?: string | undefined;
|
|
1442
|
+
posted: boolean;
|
|
1443
|
+
}[]>;
|
|
1417
1444
|
createFinancialEntry(financial_entry: {
|
|
1418
1445
|
date: string;
|
|
1419
1446
|
journal_id: string;
|
|
@@ -1429,7 +1456,9 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1429
1456
|
}[];
|
|
1430
1457
|
number?: string | undefined;
|
|
1431
1458
|
pdf?: string | undefined;
|
|
1432
|
-
}
|
|
1459
|
+
}, params: {
|
|
1460
|
+
financial_counterpart_account?: string | undefined;
|
|
1461
|
+
} | undefined): import("../types/api").RequestData<{
|
|
1433
1462
|
date: string;
|
|
1434
1463
|
journal_id: string;
|
|
1435
1464
|
currency: string;
|
|
@@ -1446,6 +1475,59 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1446
1475
|
id: string;
|
|
1447
1476
|
number: string;
|
|
1448
1477
|
}>;
|
|
1478
|
+
createJournalEntry(journal_entry: {
|
|
1479
|
+
reference?: string | undefined;
|
|
1480
|
+
due_date?: string | undefined;
|
|
1481
|
+
journal_id: string;
|
|
1482
|
+
name: string;
|
|
1483
|
+
date: string;
|
|
1484
|
+
items: {
|
|
1485
|
+
account_number: string;
|
|
1486
|
+
partner_id?: string | undefined;
|
|
1487
|
+
description?: string | undefined;
|
|
1488
|
+
debit: number;
|
|
1489
|
+
credit: number;
|
|
1490
|
+
currency: string;
|
|
1491
|
+
currency_exchange_rate?: number | undefined;
|
|
1492
|
+
analytic_distribution?: {
|
|
1493
|
+
analytic_plan: string;
|
|
1494
|
+
analytic_accounts: {
|
|
1495
|
+
analytic_account: string;
|
|
1496
|
+
percentage: number;
|
|
1497
|
+
}[];
|
|
1498
|
+
}[] | undefined;
|
|
1499
|
+
pdf?: string | undefined;
|
|
1500
|
+
}[];
|
|
1501
|
+
}): import("../types/api").RequestData<{
|
|
1502
|
+
reference?: string | undefined;
|
|
1503
|
+
due_date?: string | undefined;
|
|
1504
|
+
journal_id: string;
|
|
1505
|
+
name?: string | undefined;
|
|
1506
|
+
journal_name: string;
|
|
1507
|
+
date?: string | undefined;
|
|
1508
|
+
posted?: boolean | undefined;
|
|
1509
|
+
id: string;
|
|
1510
|
+
items?: {
|
|
1511
|
+
account_number: string;
|
|
1512
|
+
partner_id?: string | undefined;
|
|
1513
|
+
description?: string | undefined;
|
|
1514
|
+
debit: number;
|
|
1515
|
+
credit: number;
|
|
1516
|
+
currency: string;
|
|
1517
|
+
currency_exchange_rate?: number | undefined;
|
|
1518
|
+
id: string;
|
|
1519
|
+
partner_name?: string | undefined;
|
|
1520
|
+
account_name: string;
|
|
1521
|
+
matching_numbers?: string[] | undefined;
|
|
1522
|
+
analytic_distribution?: {
|
|
1523
|
+
analytic_plan: string;
|
|
1524
|
+
analytic_accounts: {
|
|
1525
|
+
analytic_account: string;
|
|
1526
|
+
percentage: number;
|
|
1527
|
+
}[];
|
|
1528
|
+
}[] | undefined;
|
|
1529
|
+
}[] | undefined;
|
|
1530
|
+
}>;
|
|
1449
1531
|
}>;
|
|
1450
1532
|
invoicing: import("../types/api").ApiFor<{
|
|
1451
1533
|
getInvoices(params: {
|
|
@@ -1674,7 +1756,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1674
1756
|
rate: number;
|
|
1675
1757
|
type: "unknown" | "sale" | "purchase" | "both";
|
|
1676
1758
|
code?: string | undefined;
|
|
1677
|
-
scope?: "
|
|
1759
|
+
scope?: "unknown" | "nat" | "eu" | "int" | undefined;
|
|
1678
1760
|
}[]>;
|
|
1679
1761
|
getTaxById(taxId: string): import("../types/api").RequestData<{
|
|
1680
1762
|
id: string;
|
|
@@ -1686,7 +1768,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1686
1768
|
rate: number;
|
|
1687
1769
|
type: "unknown" | "sale" | "purchase" | "both";
|
|
1688
1770
|
code?: string | undefined;
|
|
1689
|
-
scope?: "
|
|
1771
|
+
scope?: "unknown" | "nat" | "eu" | "int" | undefined;
|
|
1690
1772
|
}>;
|
|
1691
1773
|
getOpportunities(): import("../types/api").RequestData<{
|
|
1692
1774
|
id: string;
|
|
@@ -1741,7 +1823,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1741
1823
|
} | undefined;
|
|
1742
1824
|
}>;
|
|
1743
1825
|
getContacts(params?: {
|
|
1744
|
-
contact_type?: "all" | "
|
|
1826
|
+
contact_type?: "all" | "supplier" | "prospect" | "customer" | undefined;
|
|
1745
1827
|
page?: number | undefined;
|
|
1746
1828
|
size?: number | undefined;
|
|
1747
1829
|
} | undefined): import("../types/api").RequestData<{
|