@chift/chift-nodejs 1.0.3 → 1.0.4
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 +5 -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/sync.d.ts +208 -60
- package/dist/src/modules/syncs.d.ts +520 -150
- package/dist/test/modules/accounting.test.js +23 -0
- package/package.json +1 -1
- package/src/modules/accounting.ts +17 -3
- package/src/types/public-api/schema.d.ts +343 -33
- package/test/modules/accounting.test.ts +27 -0
|
@@ -1441,12 +1441,13 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1441
1441
|
reference?: string | undefined;
|
|
1442
1442
|
posted: boolean;
|
|
1443
1443
|
}[]>;
|
|
1444
|
-
|
|
1444
|
+
createFinancialEntryOld(financial_entry: {
|
|
1445
1445
|
date: string;
|
|
1446
1446
|
journal_id: string;
|
|
1447
1447
|
currency: string;
|
|
1448
1448
|
currency_exchange_rate?: number | undefined;
|
|
1449
1449
|
reference?: string | undefined;
|
|
1450
|
+
number?: string | undefined;
|
|
1450
1451
|
items: {
|
|
1451
1452
|
type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
|
|
1452
1453
|
account_number: string;
|
|
@@ -1454,7 +1455,6 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1454
1455
|
amount: number;
|
|
1455
1456
|
description?: string | undefined;
|
|
1456
1457
|
}[];
|
|
1457
|
-
number?: string | undefined;
|
|
1458
1458
|
pdf?: string | undefined;
|
|
1459
1459
|
}, params: {
|
|
1460
1460
|
financial_counterpart_account?: string | undefined;
|
|
@@ -1464,6 +1464,8 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1464
1464
|
currency: string;
|
|
1465
1465
|
currency_exchange_rate?: number | undefined;
|
|
1466
1466
|
reference?: string | undefined;
|
|
1467
|
+
id: string;
|
|
1468
|
+
number: string;
|
|
1467
1469
|
items: {
|
|
1468
1470
|
type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
|
|
1469
1471
|
account_number: string;
|
|
@@ -1472,9 +1474,39 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1472
1474
|
description?: string | undefined;
|
|
1473
1475
|
counterpart_account: string;
|
|
1474
1476
|
}[];
|
|
1477
|
+
}>;
|
|
1478
|
+
createFinancialEntry(financial_entry: {
|
|
1479
|
+
date: string;
|
|
1480
|
+
journal_id: string;
|
|
1481
|
+
currency: string;
|
|
1482
|
+
currency_exchange_rate?: number | undefined;
|
|
1483
|
+
reference?: string | undefined;
|
|
1484
|
+
number?: string | undefined;
|
|
1485
|
+
items: {
|
|
1486
|
+
account_type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
|
|
1487
|
+
account: string;
|
|
1488
|
+
amount: number;
|
|
1489
|
+
description?: string | undefined;
|
|
1490
|
+
}[];
|
|
1491
|
+
pdf?: string | undefined;
|
|
1492
|
+
}, params: {
|
|
1493
|
+
financial_counterpart_account?: string | undefined;
|
|
1494
|
+
} | undefined): import("../types/api").RequestData<{
|
|
1495
|
+
date: string;
|
|
1496
|
+
journal_id: string;
|
|
1497
|
+
currency: string;
|
|
1498
|
+
currency_exchange_rate?: number | undefined;
|
|
1499
|
+
reference?: string | undefined;
|
|
1475
1500
|
id: string;
|
|
1476
1501
|
number: string;
|
|
1477
|
-
|
|
1502
|
+
items: {
|
|
1503
|
+
account_type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
|
|
1504
|
+
account: string;
|
|
1505
|
+
amount: number;
|
|
1506
|
+
description?: string | undefined;
|
|
1507
|
+
counterpart_account: string;
|
|
1508
|
+
}[];
|
|
1509
|
+
}[]>;
|
|
1478
1510
|
createJournalEntry(journal_entry: {
|
|
1479
1511
|
reference?: string | undefined;
|
|
1480
1512
|
due_date?: string | undefined;
|
|
@@ -1532,6 +1564,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1532
1564
|
invoicing: import("../types/api").ApiFor<{
|
|
1533
1565
|
getInvoices(params: {
|
|
1534
1566
|
invoice_type?: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "all" | undefined;
|
|
1567
|
+
payment_status?: "all" | "paid" | "unpaid" | undefined;
|
|
1535
1568
|
date_from?: string | undefined;
|
|
1536
1569
|
date_to?: string | undefined;
|
|
1537
1570
|
page?: number | undefined;
|
|
@@ -1550,12 +1583,13 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1550
1583
|
untaxed_amount: number;
|
|
1551
1584
|
total: number;
|
|
1552
1585
|
lines?: {
|
|
1553
|
-
description
|
|
1586
|
+
description?: string | undefined;
|
|
1554
1587
|
unit_price: number;
|
|
1555
1588
|
quantity: number;
|
|
1589
|
+
discount_amount?: number | undefined;
|
|
1556
1590
|
tax_amount: number;
|
|
1557
|
-
total: number;
|
|
1558
1591
|
untaxed_amount: number;
|
|
1592
|
+
total: number;
|
|
1559
1593
|
tax_rate?: number | undefined;
|
|
1560
1594
|
account_number?: string | undefined;
|
|
1561
1595
|
tax_id?: string | undefined;
|
|
@@ -1592,12 +1626,13 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1592
1626
|
untaxed_amount: number;
|
|
1593
1627
|
total: number;
|
|
1594
1628
|
lines?: {
|
|
1595
|
-
description
|
|
1629
|
+
description?: string | undefined;
|
|
1596
1630
|
unit_price: number;
|
|
1597
1631
|
quantity: number;
|
|
1632
|
+
discount_amount?: number | undefined;
|
|
1598
1633
|
tax_amount: number;
|
|
1599
|
-
total: number;
|
|
1600
1634
|
untaxed_amount: number;
|
|
1635
|
+
total: number;
|
|
1601
1636
|
tax_rate?: number | undefined;
|
|
1602
1637
|
account_number?: string | undefined;
|
|
1603
1638
|
tax_id?: string | undefined;
|
|
@@ -1627,12 +1662,13 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1627
1662
|
untaxed_amount: number;
|
|
1628
1663
|
total: number;
|
|
1629
1664
|
lines?: {
|
|
1630
|
-
description
|
|
1665
|
+
description?: string | undefined;
|
|
1631
1666
|
unit_price: number;
|
|
1632
1667
|
quantity: number;
|
|
1668
|
+
discount_amount?: number | undefined;
|
|
1633
1669
|
tax_amount: number;
|
|
1634
|
-
total: number;
|
|
1635
1670
|
untaxed_amount: number;
|
|
1671
|
+
total: number;
|
|
1636
1672
|
tax_rate?: number | undefined;
|
|
1637
1673
|
account_number?: string | undefined;
|
|
1638
1674
|
tax_id?: string | undefined;
|
|
@@ -1666,12 +1702,13 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
1666
1702
|
untaxed_amount: number;
|
|
1667
1703
|
total: number;
|
|
1668
1704
|
lines?: {
|
|
1669
|
-
description
|
|
1705
|
+
description?: string | undefined;
|
|
1670
1706
|
unit_price: number;
|
|
1671
1707
|
quantity: number;
|
|
1708
|
+
discount_amount?: number | undefined;
|
|
1672
1709
|
tax_amount: number;
|
|
1673
|
-
total: number;
|
|
1674
1710
|
untaxed_amount: number;
|
|
1711
|
+
total: number;
|
|
1675
1712
|
tax_rate?: number | undefined;
|
|
1676
1713
|
account_number?: string | undefined;
|
|
1677
1714
|
tax_id?: string | undefined;
|
|
@@ -2279,7 +2316,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
2279
2316
|
last_updated_on?: string | undefined;
|
|
2280
2317
|
confirmed_on?: string | undefined;
|
|
2281
2318
|
cancelled_on?: string | undefined;
|
|
2282
|
-
status: "draft" | "cancelled" | "confirmed";
|
|
2319
|
+
status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
|
|
2283
2320
|
discount_amount: number;
|
|
2284
2321
|
untaxed_amount_without_fees: number;
|
|
2285
2322
|
tax_amount_without_fees: number;
|
|
@@ -2426,7 +2463,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
2426
2463
|
last_updated_on?: string | undefined;
|
|
2427
2464
|
confirmed_on?: string | undefined;
|
|
2428
2465
|
cancelled_on?: string | undefined;
|
|
2429
|
-
status: "draft" | "cancelled" | "confirmed";
|
|
2466
|
+
status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
|
|
2430
2467
|
discount_amount: number;
|
|
2431
2468
|
untaxed_amount_without_fees: number;
|
|
2432
2469
|
tax_amount_without_fees: number;
|
|
@@ -2532,7 +2569,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
2532
2569
|
last_updated_on?: string | undefined;
|
|
2533
2570
|
confirmed_on?: string | undefined;
|
|
2534
2571
|
cancelled_on?: string | undefined;
|
|
2535
|
-
status: "draft" | "cancelled" | "confirmed";
|
|
2572
|
+
status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
|
|
2536
2573
|
discount_amount: number;
|
|
2537
2574
|
untaxed_amount_without_fees: number;
|
|
2538
2575
|
tax_amount_without_fees: number;
|
|
@@ -2641,7 +2678,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
|
|
|
2641
2678
|
name: string;
|
|
2642
2679
|
title: string;
|
|
2643
2680
|
type: string;
|
|
2644
|
-
|
|
2681
|
+
optional?: boolean | undefined;
|
|
2645
2682
|
}[];
|
|
2646
2683
|
search_column?: string | undefined;
|
|
2647
2684
|
};
|