@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.
Files changed (51) hide show
  1. package/.eslintcache +1 -0
  2. package/CHANGELOG.md +9 -0
  3. package/coverage/clover.xml +1645 -0
  4. package/coverage/coverage-final.json +19 -0
  5. package/coverage/lcov-report/base.css +224 -0
  6. package/coverage/lcov-report/block-navigation.js +87 -0
  7. package/coverage/lcov-report/favicon.png +0 -0
  8. package/coverage/lcov-report/index.html +146 -0
  9. package/coverage/lcov-report/prettify.css +1 -0
  10. package/coverage/lcov-report/prettify.js +2 -0
  11. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  12. package/coverage/lcov-report/sorter.js +196 -0
  13. package/coverage/lcov-report/src/helpers/index.html +131 -0
  14. package/coverage/lcov-report/src/helpers/openapi.ts.html +151 -0
  15. package/coverage/lcov-report/src/helpers/settings.ts.html +94 -0
  16. package/coverage/lcov-report/src/index.html +116 -0
  17. package/coverage/lcov-report/src/index.ts.html +88 -0
  18. package/coverage/lcov-report/src/modules/accounting.ts.html +1156 -0
  19. package/coverage/lcov-report/src/modules/api.ts.html +190 -0
  20. package/coverage/lcov-report/src/modules/consumer.ts.html +616 -0
  21. package/coverage/lcov-report/src/modules/consumers.ts.html +331 -0
  22. package/coverage/lcov-report/src/modules/custom.ts.html +193 -0
  23. package/coverage/lcov-report/src/modules/datastores.ts.html +142 -0
  24. package/coverage/lcov-report/src/modules/ecommerce.ts.html +331 -0
  25. package/coverage/lcov-report/src/modules/flow.ts.html +589 -0
  26. package/coverage/lcov-report/src/modules/index.html +326 -0
  27. package/coverage/lcov-report/src/modules/integrations.ts.html +151 -0
  28. package/coverage/lcov-report/src/modules/internalApi.ts.html +586 -0
  29. package/coverage/lcov-report/src/modules/invoicing.ts.html +391 -0
  30. package/coverage/lcov-report/src/modules/pos.ts.html +421 -0
  31. package/coverage/lcov-report/src/modules/sync.ts.html +316 -0
  32. package/coverage/lcov-report/src/modules/syncs.ts.html +169 -0
  33. package/coverage/lcov-report/src/modules/webhooks.ts.html +343 -0
  34. package/coverage/lcov.info +1976 -0
  35. package/dist/src/modules/accounting.d.ts +5 -1
  36. package/dist/src/modules/accounting.js +12 -1
  37. package/dist/src/modules/api.d.ts +781 -226
  38. package/dist/src/modules/consumer.d.ts +52 -15
  39. package/dist/src/modules/consumers.d.ts +260 -75
  40. package/dist/src/modules/datastores.d.ts +1 -1
  41. package/dist/src/modules/internalApi.js +5 -1
  42. package/dist/src/modules/sync.d.ts +208 -60
  43. package/dist/src/modules/syncs.d.ts +520 -150
  44. package/dist/test/modules/accounting.test.js +23 -0
  45. package/dist/test/modules/flow.test.d.ts +1 -0
  46. package/dist/test/modules/flow.test.js +69 -0
  47. package/package.json +1 -1
  48. package/src/modules/accounting.ts +17 -3
  49. package/src/modules/internalApi.ts +19 -10
  50. package/src/types/public-api/schema.d.ts +343 -33
  51. package/test/modules/accounting.test.ts +27 -0
@@ -1471,12 +1471,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
1471
1471
  reference?: string | undefined;
1472
1472
  posted: boolean;
1473
1473
  }[]>;
1474
- createFinancialEntry(financial_entry: {
1474
+ createFinancialEntryOld(financial_entry: {
1475
1475
  date: string;
1476
1476
  journal_id: string;
1477
1477
  currency: string;
1478
1478
  currency_exchange_rate?: number | undefined;
1479
1479
  reference?: string | undefined;
1480
+ number?: string | undefined;
1480
1481
  items: {
1481
1482
  type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
1482
1483
  account_number: string;
@@ -1484,7 +1485,6 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
1484
1485
  amount: number;
1485
1486
  description?: string | undefined;
1486
1487
  }[];
1487
- number?: string | undefined;
1488
1488
  pdf?: string | undefined;
1489
1489
  }, params: {
1490
1490
  financial_counterpart_account?: string | undefined;
@@ -1494,6 +1494,8 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
1494
1494
  currency: string;
1495
1495
  currency_exchange_rate?: number | undefined;
1496
1496
  reference?: string | undefined;
1497
+ id: string;
1498
+ number: string;
1497
1499
  items: {
1498
1500
  type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
1499
1501
  account_number: string;
@@ -1502,9 +1504,39 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
1502
1504
  description?: string | undefined;
1503
1505
  counterpart_account: string;
1504
1506
  }[];
1507
+ }>;
1508
+ createFinancialEntry(financial_entry: {
1509
+ date: string;
1510
+ journal_id: string;
1511
+ currency: string;
1512
+ currency_exchange_rate?: number | undefined;
1513
+ reference?: string | undefined;
1514
+ number?: string | undefined;
1515
+ items: {
1516
+ account_type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
1517
+ account: string;
1518
+ amount: number;
1519
+ description?: string | undefined;
1520
+ }[];
1521
+ pdf?: string | undefined;
1522
+ }, params: {
1523
+ financial_counterpart_account?: string | undefined;
1524
+ } | undefined): import("../types/api").RequestData<{
1525
+ date: string;
1526
+ journal_id: string;
1527
+ currency: string;
1528
+ currency_exchange_rate?: number | undefined;
1529
+ reference?: string | undefined;
1505
1530
  id: string;
1506
1531
  number: string;
1507
- }>;
1532
+ items: {
1533
+ account_type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
1534
+ account: string;
1535
+ amount: number;
1536
+ description?: string | undefined;
1537
+ counterpart_account: string;
1538
+ }[];
1539
+ }[]>;
1508
1540
  createJournalEntry(journal_entry: {
1509
1541
  reference?: string | undefined;
1510
1542
  due_date?: string | undefined;
@@ -1562,6 +1594,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
1562
1594
  invoicing: import("../types/api").ApiFor<{
1563
1595
  getInvoices(params: {
1564
1596
  invoice_type?: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "all" | undefined;
1597
+ payment_status?: "all" | "paid" | "unpaid" | undefined;
1565
1598
  date_from?: string | undefined;
1566
1599
  date_to?: string | undefined;
1567
1600
  page?: number | undefined;
@@ -1580,12 +1613,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
1580
1613
  untaxed_amount: number;
1581
1614
  total: number;
1582
1615
  lines?: {
1583
- description: string;
1616
+ description?: string | undefined;
1584
1617
  unit_price: number;
1585
1618
  quantity: number;
1619
+ discount_amount?: number | undefined;
1586
1620
  tax_amount: number;
1587
- total: number;
1588
1621
  untaxed_amount: number;
1622
+ total: number;
1589
1623
  tax_rate?: number | undefined;
1590
1624
  account_number?: string | undefined;
1591
1625
  tax_id?: string | undefined;
@@ -1622,12 +1656,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
1622
1656
  untaxed_amount: number;
1623
1657
  total: number;
1624
1658
  lines?: {
1625
- description: string;
1659
+ description?: string | undefined;
1626
1660
  unit_price: number;
1627
1661
  quantity: number;
1662
+ discount_amount?: number | undefined;
1628
1663
  tax_amount: number;
1629
- total: number;
1630
1664
  untaxed_amount: number;
1665
+ total: number;
1631
1666
  tax_rate?: number | undefined;
1632
1667
  account_number?: string | undefined;
1633
1668
  tax_id?: string | undefined;
@@ -1657,12 +1692,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
1657
1692
  untaxed_amount: number;
1658
1693
  total: number;
1659
1694
  lines?: {
1660
- description: string;
1695
+ description?: string | undefined;
1661
1696
  unit_price: number;
1662
1697
  quantity: number;
1698
+ discount_amount?: number | undefined;
1663
1699
  tax_amount: number;
1664
- total: number;
1665
1700
  untaxed_amount: number;
1701
+ total: number;
1666
1702
  tax_rate?: number | undefined;
1667
1703
  account_number?: string | undefined;
1668
1704
  tax_id?: string | undefined;
@@ -1696,12 +1732,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
1696
1732
  untaxed_amount: number;
1697
1733
  total: number;
1698
1734
  lines?: {
1699
- description: string;
1735
+ description?: string | undefined;
1700
1736
  unit_price: number;
1701
1737
  quantity: number;
1738
+ discount_amount?: number | undefined;
1702
1739
  tax_amount: number;
1703
- total: number;
1704
1740
  untaxed_amount: number;
1741
+ total: number;
1705
1742
  tax_rate?: number | undefined;
1706
1743
  account_number?: string | undefined;
1707
1744
  tax_id?: string | undefined;
@@ -2309,7 +2346,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
2309
2346
  last_updated_on?: string | undefined;
2310
2347
  confirmed_on?: string | undefined;
2311
2348
  cancelled_on?: string | undefined;
2312
- status: "draft" | "cancelled" | "confirmed";
2349
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
2313
2350
  discount_amount: number;
2314
2351
  untaxed_amount_without_fees: number;
2315
2352
  tax_amount_without_fees: number;
@@ -2456,7 +2493,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
2456
2493
  last_updated_on?: string | undefined;
2457
2494
  confirmed_on?: string | undefined;
2458
2495
  cancelled_on?: string | undefined;
2459
- status: "draft" | "cancelled" | "confirmed";
2496
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
2460
2497
  discount_amount: number;
2461
2498
  untaxed_amount_without_fees: number;
2462
2499
  tax_amount_without_fees: number;
@@ -2562,7 +2599,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
2562
2599
  last_updated_on?: string | undefined;
2563
2600
  confirmed_on?: string | undefined;
2564
2601
  cancelled_on?: string | undefined;
2565
- status: "draft" | "cancelled" | "confirmed";
2602
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
2566
2603
  discount_amount: number;
2567
2604
  untaxed_amount_without_fees: number;
2568
2605
  tax_amount_without_fees: number;
@@ -2673,7 +2710,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
2673
2710
  name: string;
2674
2711
  title: string;
2675
2712
  type: string;
2676
- Optional?: boolean | undefined;
2713
+ optional?: boolean | undefined;
2677
2714
  }[];
2678
2715
  search_column?: string | undefined;
2679
2716
  };
@@ -4174,12 +4211,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
4174
4211
  reference?: string | undefined;
4175
4212
  posted: boolean;
4176
4213
  }[]>;
4177
- createFinancialEntry(financial_entry: {
4214
+ createFinancialEntryOld(financial_entry: {
4178
4215
  date: string;
4179
4216
  journal_id: string;
4180
4217
  currency: string;
4181
4218
  currency_exchange_rate?: number | undefined;
4182
4219
  reference?: string | undefined;
4220
+ number?: string | undefined;
4183
4221
  items: {
4184
4222
  type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
4185
4223
  account_number: string;
@@ -4187,7 +4225,6 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
4187
4225
  amount: number;
4188
4226
  description?: string | undefined;
4189
4227
  }[];
4190
- number?: string | undefined;
4191
4228
  pdf?: string | undefined;
4192
4229
  }, params: {
4193
4230
  financial_counterpart_account?: string | undefined;
@@ -4197,6 +4234,8 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
4197
4234
  currency: string;
4198
4235
  currency_exchange_rate?: number | undefined;
4199
4236
  reference?: string | undefined;
4237
+ id: string;
4238
+ number: string;
4200
4239
  items: {
4201
4240
  type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
4202
4241
  account_number: string;
@@ -4205,9 +4244,39 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
4205
4244
  description?: string | undefined;
4206
4245
  counterpart_account: string;
4207
4246
  }[];
4247
+ }>;
4248
+ createFinancialEntry(financial_entry: {
4249
+ date: string;
4250
+ journal_id: string;
4251
+ currency: string;
4252
+ currency_exchange_rate?: number | undefined;
4253
+ reference?: string | undefined;
4254
+ number?: string | undefined;
4255
+ items: {
4256
+ account_type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
4257
+ account: string;
4258
+ amount: number;
4259
+ description?: string | undefined;
4260
+ }[];
4261
+ pdf?: string | undefined;
4262
+ }, params: {
4263
+ financial_counterpart_account?: string | undefined;
4264
+ } | undefined): import("../types/api").RequestData<{
4265
+ date: string;
4266
+ journal_id: string;
4267
+ currency: string;
4268
+ currency_exchange_rate?: number | undefined;
4269
+ reference?: string | undefined;
4208
4270
  id: string;
4209
4271
  number: string;
4210
- }>;
4272
+ items: {
4273
+ account_type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
4274
+ account: string;
4275
+ amount: number;
4276
+ description?: string | undefined;
4277
+ counterpart_account: string;
4278
+ }[];
4279
+ }[]>;
4211
4280
  createJournalEntry(journal_entry: {
4212
4281
  reference?: string | undefined;
4213
4282
  due_date?: string | undefined;
@@ -4265,6 +4334,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
4265
4334
  invoicing: import("../types/api").ApiFor<{
4266
4335
  getInvoices(params: {
4267
4336
  invoice_type?: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "all" | undefined;
4337
+ payment_status?: "all" | "paid" | "unpaid" | undefined;
4268
4338
  date_from?: string | undefined;
4269
4339
  date_to?: string | undefined;
4270
4340
  page?: number | undefined;
@@ -4283,12 +4353,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
4283
4353
  untaxed_amount: number;
4284
4354
  total: number;
4285
4355
  lines?: {
4286
- description: string;
4356
+ description?: string | undefined;
4287
4357
  unit_price: number;
4288
4358
  quantity: number;
4359
+ discount_amount?: number | undefined;
4289
4360
  tax_amount: number;
4290
- total: number;
4291
4361
  untaxed_amount: number;
4362
+ total: number;
4292
4363
  tax_rate?: number | undefined;
4293
4364
  account_number?: string | undefined;
4294
4365
  tax_id?: string | undefined;
@@ -4325,12 +4396,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
4325
4396
  untaxed_amount: number;
4326
4397
  total: number;
4327
4398
  lines?: {
4328
- description: string;
4399
+ description?: string | undefined;
4329
4400
  unit_price: number;
4330
4401
  quantity: number;
4402
+ discount_amount?: number | undefined;
4331
4403
  tax_amount: number;
4332
- total: number;
4333
4404
  untaxed_amount: number;
4405
+ total: number;
4334
4406
  tax_rate?: number | undefined;
4335
4407
  account_number?: string | undefined;
4336
4408
  tax_id?: string | undefined;
@@ -4360,12 +4432,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
4360
4432
  untaxed_amount: number;
4361
4433
  total: number;
4362
4434
  lines?: {
4363
- description: string;
4435
+ description?: string | undefined;
4364
4436
  unit_price: number;
4365
4437
  quantity: number;
4438
+ discount_amount?: number | undefined;
4366
4439
  tax_amount: number;
4367
- total: number;
4368
4440
  untaxed_amount: number;
4441
+ total: number;
4369
4442
  tax_rate?: number | undefined;
4370
4443
  account_number?: string | undefined;
4371
4444
  tax_id?: string | undefined;
@@ -4399,12 +4472,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
4399
4472
  untaxed_amount: number;
4400
4473
  total: number;
4401
4474
  lines?: {
4402
- description: string;
4475
+ description?: string | undefined;
4403
4476
  unit_price: number;
4404
4477
  quantity: number;
4478
+ discount_amount?: number | undefined;
4405
4479
  tax_amount: number;
4406
- total: number;
4407
4480
  untaxed_amount: number;
4481
+ total: number;
4408
4482
  tax_rate?: number | undefined;
4409
4483
  account_number?: string | undefined;
4410
4484
  tax_id?: string | undefined;
@@ -5012,7 +5086,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
5012
5086
  last_updated_on?: string | undefined;
5013
5087
  confirmed_on?: string | undefined;
5014
5088
  cancelled_on?: string | undefined;
5015
- status: "draft" | "cancelled" | "confirmed";
5089
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
5016
5090
  discount_amount: number;
5017
5091
  untaxed_amount_without_fees: number;
5018
5092
  tax_amount_without_fees: number;
@@ -5159,7 +5233,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
5159
5233
  last_updated_on?: string | undefined;
5160
5234
  confirmed_on?: string | undefined;
5161
5235
  cancelled_on?: string | undefined;
5162
- status: "draft" | "cancelled" | "confirmed";
5236
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
5163
5237
  discount_amount: number;
5164
5238
  untaxed_amount_without_fees: number;
5165
5239
  tax_amount_without_fees: number;
@@ -5265,7 +5339,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
5265
5339
  last_updated_on?: string | undefined;
5266
5340
  confirmed_on?: string | undefined;
5267
5341
  cancelled_on?: string | undefined;
5268
- status: "draft" | "cancelled" | "confirmed";
5342
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
5269
5343
  discount_amount: number;
5270
5344
  untaxed_amount_without_fees: number;
5271
5345
  tax_amount_without_fees: number;
@@ -5376,7 +5450,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
5376
5450
  name: string;
5377
5451
  title: string;
5378
5452
  type: string;
5379
- Optional?: boolean | undefined;
5453
+ optional?: boolean | undefined;
5380
5454
  }[];
5381
5455
  search_column?: string | undefined;
5382
5456
  };
@@ -6877,12 +6951,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
6877
6951
  reference?: string | undefined;
6878
6952
  posted: boolean;
6879
6953
  }[]>;
6880
- createFinancialEntry(financial_entry: {
6954
+ createFinancialEntryOld(financial_entry: {
6881
6955
  date: string;
6882
6956
  journal_id: string;
6883
6957
  currency: string;
6884
6958
  currency_exchange_rate?: number | undefined;
6885
6959
  reference?: string | undefined;
6960
+ number?: string | undefined;
6886
6961
  items: {
6887
6962
  type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
6888
6963
  account_number: string;
@@ -6890,7 +6965,6 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
6890
6965
  amount: number;
6891
6966
  description?: string | undefined;
6892
6967
  }[];
6893
- number?: string | undefined;
6894
6968
  pdf?: string | undefined;
6895
6969
  }, params: {
6896
6970
  financial_counterpart_account?: string | undefined;
@@ -6900,6 +6974,8 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
6900
6974
  currency: string;
6901
6975
  currency_exchange_rate?: number | undefined;
6902
6976
  reference?: string | undefined;
6977
+ id: string;
6978
+ number: string;
6903
6979
  items: {
6904
6980
  type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
6905
6981
  account_number: string;
@@ -6908,9 +6984,39 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
6908
6984
  description?: string | undefined;
6909
6985
  counterpart_account: string;
6910
6986
  }[];
6987
+ }>;
6988
+ createFinancialEntry(financial_entry: {
6989
+ date: string;
6990
+ journal_id: string;
6991
+ currency: string;
6992
+ currency_exchange_rate?: number | undefined;
6993
+ reference?: string | undefined;
6994
+ number?: string | undefined;
6995
+ items: {
6996
+ account_type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
6997
+ account: string;
6998
+ amount: number;
6999
+ description?: string | undefined;
7000
+ }[];
7001
+ pdf?: string | undefined;
7002
+ }, params: {
7003
+ financial_counterpart_account?: string | undefined;
7004
+ } | undefined): import("../types/api").RequestData<{
7005
+ date: string;
7006
+ journal_id: string;
7007
+ currency: string;
7008
+ currency_exchange_rate?: number | undefined;
7009
+ reference?: string | undefined;
6911
7010
  id: string;
6912
7011
  number: string;
6913
- }>;
7012
+ items: {
7013
+ account_type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
7014
+ account: string;
7015
+ amount: number;
7016
+ description?: string | undefined;
7017
+ counterpart_account: string;
7018
+ }[];
7019
+ }[]>;
6914
7020
  createJournalEntry(journal_entry: {
6915
7021
  reference?: string | undefined;
6916
7022
  due_date?: string | undefined;
@@ -6968,6 +7074,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
6968
7074
  invoicing: import("../types/api").ApiFor<{
6969
7075
  getInvoices(params: {
6970
7076
  invoice_type?: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "all" | undefined;
7077
+ payment_status?: "all" | "paid" | "unpaid" | undefined;
6971
7078
  date_from?: string | undefined;
6972
7079
  date_to?: string | undefined;
6973
7080
  page?: number | undefined;
@@ -6986,12 +7093,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
6986
7093
  untaxed_amount: number;
6987
7094
  total: number;
6988
7095
  lines?: {
6989
- description: string;
7096
+ description?: string | undefined;
6990
7097
  unit_price: number;
6991
7098
  quantity: number;
7099
+ discount_amount?: number | undefined;
6992
7100
  tax_amount: number;
6993
- total: number;
6994
7101
  untaxed_amount: number;
7102
+ total: number;
6995
7103
  tax_rate?: number | undefined;
6996
7104
  account_number?: string | undefined;
6997
7105
  tax_id?: string | undefined;
@@ -7028,12 +7136,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
7028
7136
  untaxed_amount: number;
7029
7137
  total: number;
7030
7138
  lines?: {
7031
- description: string;
7139
+ description?: string | undefined;
7032
7140
  unit_price: number;
7033
7141
  quantity: number;
7142
+ discount_amount?: number | undefined;
7034
7143
  tax_amount: number;
7035
- total: number;
7036
7144
  untaxed_amount: number;
7145
+ total: number;
7037
7146
  tax_rate?: number | undefined;
7038
7147
  account_number?: string | undefined;
7039
7148
  tax_id?: string | undefined;
@@ -7063,12 +7172,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
7063
7172
  untaxed_amount: number;
7064
7173
  total: number;
7065
7174
  lines?: {
7066
- description: string;
7175
+ description?: string | undefined;
7067
7176
  unit_price: number;
7068
7177
  quantity: number;
7178
+ discount_amount?: number | undefined;
7069
7179
  tax_amount: number;
7070
- total: number;
7071
7180
  untaxed_amount: number;
7181
+ total: number;
7072
7182
  tax_rate?: number | undefined;
7073
7183
  account_number?: string | undefined;
7074
7184
  tax_id?: string | undefined;
@@ -7102,12 +7212,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
7102
7212
  untaxed_amount: number;
7103
7213
  total: number;
7104
7214
  lines?: {
7105
- description: string;
7215
+ description?: string | undefined;
7106
7216
  unit_price: number;
7107
7217
  quantity: number;
7218
+ discount_amount?: number | undefined;
7108
7219
  tax_amount: number;
7109
- total: number;
7110
7220
  untaxed_amount: number;
7221
+ total: number;
7111
7222
  tax_rate?: number | undefined;
7112
7223
  account_number?: string | undefined;
7113
7224
  tax_id?: string | undefined;
@@ -7715,7 +7826,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
7715
7826
  last_updated_on?: string | undefined;
7716
7827
  confirmed_on?: string | undefined;
7717
7828
  cancelled_on?: string | undefined;
7718
- status: "draft" | "cancelled" | "confirmed";
7829
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
7719
7830
  discount_amount: number;
7720
7831
  untaxed_amount_without_fees: number;
7721
7832
  tax_amount_without_fees: number;
@@ -7862,7 +7973,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
7862
7973
  last_updated_on?: string | undefined;
7863
7974
  confirmed_on?: string | undefined;
7864
7975
  cancelled_on?: string | undefined;
7865
- status: "draft" | "cancelled" | "confirmed";
7976
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
7866
7977
  discount_amount: number;
7867
7978
  untaxed_amount_without_fees: number;
7868
7979
  tax_amount_without_fees: number;
@@ -7968,7 +8079,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
7968
8079
  last_updated_on?: string | undefined;
7969
8080
  confirmed_on?: string | undefined;
7970
8081
  cancelled_on?: string | undefined;
7971
- status: "draft" | "cancelled" | "confirmed";
8082
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
7972
8083
  discount_amount: number;
7973
8084
  untaxed_amount_without_fees: number;
7974
8085
  tax_amount_without_fees: number;
@@ -8079,7 +8190,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
8079
8190
  name: string;
8080
8191
  title: string;
8081
8192
  type: string;
8082
- Optional?: boolean | undefined;
8193
+ optional?: boolean | undefined;
8083
8194
  }[];
8084
8195
  search_column?: string | undefined;
8085
8196
  };
@@ -9580,12 +9691,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
9580
9691
  reference?: string | undefined;
9581
9692
  posted: boolean;
9582
9693
  }[]>;
9583
- createFinancialEntry(financial_entry: {
9694
+ createFinancialEntryOld(financial_entry: {
9584
9695
  date: string;
9585
9696
  journal_id: string;
9586
9697
  currency: string;
9587
9698
  currency_exchange_rate?: number | undefined;
9588
9699
  reference?: string | undefined;
9700
+ number?: string | undefined;
9589
9701
  items: {
9590
9702
  type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
9591
9703
  account_number: string;
@@ -9593,7 +9705,6 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
9593
9705
  amount: number;
9594
9706
  description?: string | undefined;
9595
9707
  }[];
9596
- number?: string | undefined;
9597
9708
  pdf?: string | undefined;
9598
9709
  }, params: {
9599
9710
  financial_counterpart_account?: string | undefined;
@@ -9603,6 +9714,8 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
9603
9714
  currency: string;
9604
9715
  currency_exchange_rate?: number | undefined;
9605
9716
  reference?: string | undefined;
9717
+ id: string;
9718
+ number: string;
9606
9719
  items: {
9607
9720
  type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
9608
9721
  account_number: string;
@@ -9611,9 +9724,39 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
9611
9724
  description?: string | undefined;
9612
9725
  counterpart_account: string;
9613
9726
  }[];
9727
+ }>;
9728
+ createFinancialEntry(financial_entry: {
9729
+ date: string;
9730
+ journal_id: string;
9731
+ currency: string;
9732
+ currency_exchange_rate?: number | undefined;
9733
+ reference?: string | undefined;
9734
+ number?: string | undefined;
9735
+ items: {
9736
+ account_type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
9737
+ account: string;
9738
+ amount: number;
9739
+ description?: string | undefined;
9740
+ }[];
9741
+ pdf?: string | undefined;
9742
+ }, params: {
9743
+ financial_counterpart_account?: string | undefined;
9744
+ } | undefined): import("../types/api").RequestData<{
9745
+ date: string;
9746
+ journal_id: string;
9747
+ currency: string;
9748
+ currency_exchange_rate?: number | undefined;
9749
+ reference?: string | undefined;
9614
9750
  id: string;
9615
9751
  number: string;
9616
- }>;
9752
+ items: {
9753
+ account_type: "general_account" | "customer_account" | "supplier_account" | "employee_account";
9754
+ account: string;
9755
+ amount: number;
9756
+ description?: string | undefined;
9757
+ counterpart_account: string;
9758
+ }[];
9759
+ }[]>;
9617
9760
  createJournalEntry(journal_entry: {
9618
9761
  reference?: string | undefined;
9619
9762
  due_date?: string | undefined;
@@ -9671,6 +9814,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
9671
9814
  invoicing: import("../types/api").ApiFor<{
9672
9815
  getInvoices(params: {
9673
9816
  invoice_type?: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund" | "all" | undefined;
9817
+ payment_status?: "all" | "paid" | "unpaid" | undefined;
9674
9818
  date_from?: string | undefined;
9675
9819
  date_to?: string | undefined;
9676
9820
  page?: number | undefined;
@@ -9689,12 +9833,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
9689
9833
  untaxed_amount: number;
9690
9834
  total: number;
9691
9835
  lines?: {
9692
- description: string;
9836
+ description?: string | undefined;
9693
9837
  unit_price: number;
9694
9838
  quantity: number;
9839
+ discount_amount?: number | undefined;
9695
9840
  tax_amount: number;
9696
- total: number;
9697
9841
  untaxed_amount: number;
9842
+ total: number;
9698
9843
  tax_rate?: number | undefined;
9699
9844
  account_number?: string | undefined;
9700
9845
  tax_id?: string | undefined;
@@ -9731,12 +9876,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
9731
9876
  untaxed_amount: number;
9732
9877
  total: number;
9733
9878
  lines?: {
9734
- description: string;
9879
+ description?: string | undefined;
9735
9880
  unit_price: number;
9736
9881
  quantity: number;
9882
+ discount_amount?: number | undefined;
9737
9883
  tax_amount: number;
9738
- total: number;
9739
9884
  untaxed_amount: number;
9885
+ total: number;
9740
9886
  tax_rate?: number | undefined;
9741
9887
  account_number?: string | undefined;
9742
9888
  tax_id?: string | undefined;
@@ -9766,12 +9912,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
9766
9912
  untaxed_amount: number;
9767
9913
  total: number;
9768
9914
  lines?: {
9769
- description: string;
9915
+ description?: string | undefined;
9770
9916
  unit_price: number;
9771
9917
  quantity: number;
9918
+ discount_amount?: number | undefined;
9772
9919
  tax_amount: number;
9773
- total: number;
9774
9920
  untaxed_amount: number;
9921
+ total: number;
9775
9922
  tax_rate?: number | undefined;
9776
9923
  account_number?: string | undefined;
9777
9924
  tax_id?: string | undefined;
@@ -9805,12 +9952,13 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
9805
9952
  untaxed_amount: number;
9806
9953
  total: number;
9807
9954
  lines?: {
9808
- description: string;
9955
+ description?: string | undefined;
9809
9956
  unit_price: number;
9810
9957
  quantity: number;
9958
+ discount_amount?: number | undefined;
9811
9959
  tax_amount: number;
9812
- total: number;
9813
9960
  untaxed_amount: number;
9961
+ total: number;
9814
9962
  tax_rate?: number | undefined;
9815
9963
  account_number?: string | undefined;
9816
9964
  tax_id?: string | undefined;
@@ -10418,7 +10566,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
10418
10566
  last_updated_on?: string | undefined;
10419
10567
  confirmed_on?: string | undefined;
10420
10568
  cancelled_on?: string | undefined;
10421
- status: "draft" | "cancelled" | "confirmed";
10569
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
10422
10570
  discount_amount: number;
10423
10571
  untaxed_amount_without_fees: number;
10424
10572
  tax_amount_without_fees: number;
@@ -10565,7 +10713,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
10565
10713
  last_updated_on?: string | undefined;
10566
10714
  confirmed_on?: string | undefined;
10567
10715
  cancelled_on?: string | undefined;
10568
- status: "draft" | "cancelled" | "confirmed";
10716
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
10569
10717
  discount_amount: number;
10570
10718
  untaxed_amount_without_fees: number;
10571
10719
  tax_amount_without_fees: number;
@@ -10671,7 +10819,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
10671
10819
  last_updated_on?: string | undefined;
10672
10820
  confirmed_on?: string | undefined;
10673
10821
  cancelled_on?: string | undefined;
10674
- status: "draft" | "cancelled" | "confirmed";
10822
+ status: "draft" | "cancelled" | "confirmed" | "shipped" | "refunded";
10675
10823
  discount_amount: number;
10676
10824
  untaxed_amount_without_fees: number;
10677
10825
  tax_amount_without_fees: number;
@@ -10782,7 +10930,7 @@ declare const Sync: (internalApi: InternalAPI, body: components['schemas']['Sync
10782
10930
  name: string;
10783
10931
  title: string;
10784
10932
  type: string;
10785
- Optional?: boolean | undefined;
10933
+ optional?: boolean | undefined;
10786
10934
  }[];
10787
10935
  search_column?: string | undefined;
10788
10936
  };