@conflict-hq/ezacto-client 0.1.1 → 0.1.2

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/dist/generated.js CHANGED
@@ -21,7 +21,14 @@ export class EzactoClient {
21
21
  ? options.baseUrl
22
22
  : `${options.baseUrl}/`;
23
23
  this.token = options.token;
24
- this.fetchImplementation = options.fetch ?? globalThis.fetch;
24
+ // Bound, because this is stored on the instance and later called as
25
+ // `this.fetchImplementation(...)`. A browser's fetch is a method of
26
+ // Window and refuses any other receiver, so the unbound form threw
27
+ // "Failed to execute 'fetch' on 'Window': Illegal invocation" on every
28
+ // request from a page or an extension (#772). Binding whatever we are
29
+ // given also covers a caller who hands us a bare `globalThis.fetch`;
30
+ // an arrow or an already-bound function ignores the receiver anyway.
31
+ this.fetchImplementation = (options.fetch ?? globalThis.fetch).bind(globalThis);
25
32
  this.defaultHeaders = new Headers(options.headers);
26
33
  }
27
34
  async request(method, path, options) {
@@ -88,6 +95,14 @@ export class EzactoClient {
88
95
  headers,
89
96
  });
90
97
  }
98
+ async completeTwoFactorChallenge(args) {
99
+ const headers = new Headers(args.headers);
100
+ return this.request("POST", "/auth/two-factor/challenge", {
101
+ body: args.body,
102
+ signal: args.signal,
103
+ headers,
104
+ });
105
+ }
91
106
  async requestPasswordReset(args) {
92
107
  const headers = new Headers(args.headers);
93
108
  return this.request("POST", "/auth/password/forgot", {
@@ -290,6 +305,21 @@ export class EzactoClient {
290
305
  headers,
291
306
  });
292
307
  }
308
+ async getProfile(args = {}) {
309
+ const headers = new Headers(args.headers);
310
+ return this.request("GET", "/api/v1/profile", {
311
+ signal: args.signal,
312
+ headers,
313
+ });
314
+ }
315
+ async updateProfile(args) {
316
+ const headers = new Headers(args.headers);
317
+ return this.request("PATCH", "/api/v1/profile", {
318
+ body: args.body,
319
+ signal: args.signal,
320
+ headers,
321
+ });
322
+ }
293
323
  async listClients(args = {}) {
294
324
  const headers = new Headers(args.headers);
295
325
  return this.request("GET", "/api/v1/clients", {
@@ -1209,6 +1239,16 @@ export class EzactoClient {
1209
1239
  headers,
1210
1240
  });
1211
1241
  }
1242
+ async backfillRecurringInvoiceClaims(args) {
1243
+ const headers = new Headers(args.headers);
1244
+ if (args["Idempotency-Key"] !== undefined)
1245
+ headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
1246
+ return this.request("POST", "/api/v1/recurring-invoices/:id/claim-backfill".replace(":id", encodeURIComponent(String(args["id"]))), {
1247
+ body: args.body,
1248
+ signal: args.signal,
1249
+ headers,
1250
+ });
1251
+ }
1212
1252
  async generateRecurringInvoice(args) {
1213
1253
  const headers = new Headers(args.headers);
1214
1254
  if (args["Idempotency-Key"] !== undefined)
@@ -1383,6 +1423,101 @@ export class EzactoClient {
1383
1423
  headers,
1384
1424
  });
1385
1425
  }
1426
+ async getReportDefinitionRegistry(args = {}) {
1427
+ const headers = new Headers(args.headers);
1428
+ return this.request("GET", "/api/v1/report-definitions/registry", {
1429
+ signal: args.signal,
1430
+ headers,
1431
+ });
1432
+ }
1433
+ async listSavedReports(args = {}) {
1434
+ const headers = new Headers(args.headers);
1435
+ return this.request("GET", "/api/v1/report-definitions", {
1436
+ query: args.query,
1437
+ signal: args.signal,
1438
+ headers,
1439
+ });
1440
+ }
1441
+ async createSavedReport(args) {
1442
+ const headers = new Headers(args.headers);
1443
+ return this.request("POST", "/api/v1/report-definitions", {
1444
+ body: args.body,
1445
+ signal: args.signal,
1446
+ headers,
1447
+ });
1448
+ }
1449
+ async previewReportDefinition(args) {
1450
+ const headers = new Headers(args.headers);
1451
+ return this.request("POST", "/api/v1/report-definitions/preview", {
1452
+ body: args.body,
1453
+ signal: args.signal,
1454
+ headers,
1455
+ });
1456
+ }
1457
+ async getSavedReport(args) {
1458
+ const headers = new Headers(args.headers);
1459
+ return this.request("GET", "/api/v1/report-definitions/:reportId".replace(":reportId", encodeURIComponent(String(args["reportId"]))), {
1460
+ signal: args.signal,
1461
+ headers,
1462
+ });
1463
+ }
1464
+ async updateSavedReport(args) {
1465
+ const headers = new Headers(args.headers);
1466
+ return this.request("PATCH", "/api/v1/report-definitions/:reportId".replace(":reportId", encodeURIComponent(String(args["reportId"]))), {
1467
+ body: args.body,
1468
+ signal: args.signal,
1469
+ headers,
1470
+ });
1471
+ }
1472
+ async deleteSavedReport(args) {
1473
+ const headers = new Headers(args.headers);
1474
+ return this.request("DELETE", "/api/v1/report-definitions/:reportId".replace(":reportId", encodeURIComponent(String(args["reportId"]))), {
1475
+ signal: args.signal,
1476
+ headers,
1477
+ });
1478
+ }
1479
+ async duplicateSavedReport(args) {
1480
+ const headers = new Headers(args.headers);
1481
+ return this.request("POST", "/api/v1/report-definitions/:reportId/duplicate".replace(":reportId", encodeURIComponent(String(args["reportId"]))), {
1482
+ signal: args.signal,
1483
+ headers,
1484
+ });
1485
+ }
1486
+ async pinSavedReport(args) {
1487
+ const headers = new Headers(args.headers);
1488
+ return this.request("POST", "/api/v1/report-definitions/:reportId/pin".replace(":reportId", encodeURIComponent(String(args["reportId"]))), {
1489
+ signal: args.signal,
1490
+ headers,
1491
+ });
1492
+ }
1493
+ async unpinSavedReport(args) {
1494
+ const headers = new Headers(args.headers);
1495
+ return this.request("DELETE", "/api/v1/report-definitions/:reportId/pin".replace(":reportId", encodeURIComponent(String(args["reportId"]))), {
1496
+ signal: args.signal,
1497
+ headers,
1498
+ });
1499
+ }
1500
+ async shareSavedReport(args) {
1501
+ const headers = new Headers(args.headers);
1502
+ return this.request("POST", "/api/v1/report-definitions/:reportId/shares/:userId".replace(":reportId", encodeURIComponent(String(args["reportId"]))).replace(":userId", encodeURIComponent(String(args["userId"]))), {
1503
+ signal: args.signal,
1504
+ headers,
1505
+ });
1506
+ }
1507
+ async unshareSavedReport(args) {
1508
+ const headers = new Headers(args.headers);
1509
+ return this.request("DELETE", "/api/v1/report-definitions/:reportId/shares/:userId".replace(":reportId", encodeURIComponent(String(args["reportId"]))).replace(":userId", encodeURIComponent(String(args["userId"]))), {
1510
+ signal: args.signal,
1511
+ headers,
1512
+ });
1513
+ }
1514
+ async runSavedReport(args) {
1515
+ const headers = new Headers(args.headers);
1516
+ return this.request("POST", "/api/v1/report-definitions/:reportId/run".replace(":reportId", encodeURIComponent(String(args["reportId"]))), {
1517
+ signal: args.signal,
1518
+ headers,
1519
+ });
1520
+ }
1386
1521
  async getMyHoursReport(args) {
1387
1522
  const headers = new Headers(args.headers);
1388
1523
  return this.request("GET", "/api/v1/reports/my-hours", {
@@ -1399,6 +1534,30 @@ export class EzactoClient {
1399
1534
  headers,
1400
1535
  });
1401
1536
  }
1537
+ async getInvoicedReport(args) {
1538
+ const headers = new Headers(args.headers);
1539
+ return this.request("GET", "/api/v1/reports/invoiced", {
1540
+ query: args.query,
1541
+ signal: args.signal,
1542
+ headers,
1543
+ });
1544
+ }
1545
+ async getPaymentsReceivedReport(args) {
1546
+ const headers = new Headers(args.headers);
1547
+ return this.request("GET", "/api/v1/reports/payments-received", {
1548
+ query: args.query,
1549
+ signal: args.signal,
1550
+ headers,
1551
+ });
1552
+ }
1553
+ async getReceivablesReport(args) {
1554
+ const headers = new Headers(args.headers);
1555
+ return this.request("GET", "/api/v1/reports/receivables", {
1556
+ query: args.query,
1557
+ signal: args.signal,
1558
+ headers,
1559
+ });
1560
+ }
1402
1561
  async getContractorCostReport(args) {
1403
1562
  const headers = new Headers(args.headers);
1404
1563
  return this.request("GET", "/api/v1/reports/contractor", {
@@ -1407,6 +1566,37 @@ export class EzactoClient {
1407
1566
  headers,
1408
1567
  });
1409
1568
  }
1569
+ async getMonthEndManifest(args) {
1570
+ const headers = new Headers(args.headers);
1571
+ return this.request("GET", "/api/v1/reports/month-end", {
1572
+ query: args.query,
1573
+ signal: args.signal,
1574
+ headers,
1575
+ });
1576
+ }
1577
+ async getBandedMonthReport(args) {
1578
+ const headers = new Headers(args.headers);
1579
+ return this.request("GET", "/api/v1/reports/banded-months", {
1580
+ query: args.query,
1581
+ signal: args.signal,
1582
+ headers,
1583
+ });
1584
+ }
1585
+ async getBandCostAlert(args = {}) {
1586
+ const headers = new Headers(args.headers);
1587
+ return this.request("GET", "/api/v1/reports/band-cost-alert", {
1588
+ signal: args.signal,
1589
+ headers,
1590
+ });
1591
+ }
1592
+ async setBandCostAlert(args) {
1593
+ const headers = new Headers(args.headers);
1594
+ return this.request("POST", "/api/v1/reports/band-cost-alert", {
1595
+ body: args.body,
1596
+ signal: args.signal,
1597
+ headers,
1598
+ });
1599
+ }
1410
1600
  async getProfitabilityReport(args) {
1411
1601
  const headers = new Headers(args.headers);
1412
1602
  return this.request("GET", "/api/v1/reports/profitability", {
@@ -1439,6 +1629,14 @@ export class EzactoClient {
1439
1629
  headers,
1440
1630
  });
1441
1631
  }
1632
+ async executeDetailedTimeAction(args) {
1633
+ const headers = new Headers(args.headers);
1634
+ return this.request("POST", "/api/v1/reports/detailed-time/actions", {
1635
+ body: args.body,
1636
+ signal: args.signal,
1637
+ headers,
1638
+ });
1639
+ }
1442
1640
  async getClientRollupReport(args) {
1443
1641
  const headers = new Headers(args.headers);
1444
1642
  return this.request("GET", "/api/v1/reports/client-rollups/:clientId".replace(":clientId", encodeURIComponent(String(args["clientId"]))), {
@@ -1478,6 +1676,21 @@ export class EzactoClient {
1478
1676
  headers,
1479
1677
  });
1480
1678
  }
1679
+ async listSignInMethods(args = {}) {
1680
+ const headers = new Headers(args.headers);
1681
+ return this.request("GET", "/api/v1/admin/sign-in-methods", {
1682
+ signal: args.signal,
1683
+ headers,
1684
+ });
1685
+ }
1686
+ async updateSignInMethod(args) {
1687
+ const headers = new Headers(args.headers);
1688
+ return this.request("PATCH", "/api/v1/admin/sign-in-methods/:method".replace(":method", encodeURIComponent(String(args["method"]))), {
1689
+ body: args.body,
1690
+ signal: args.signal,
1691
+ headers,
1692
+ });
1693
+ }
1481
1694
  async getBackupStatus(args = {}) {
1482
1695
  const headers = new Headers(args.headers);
1483
1696
  return this.request("GET", "/api/v1/backup/status", {
@@ -1514,6 +1727,72 @@ export class EzactoClient {
1514
1727
  headers,
1515
1728
  });
1516
1729
  }
1730
+ async getWiseConnection(args = {}) {
1731
+ const headers = new Headers(args.headers);
1732
+ return this.request("GET", "/api/v1/integrations/wise", {
1733
+ signal: args.signal,
1734
+ headers,
1735
+ });
1736
+ }
1737
+ async listWiseRecipients(args = {}) {
1738
+ const headers = new Headers(args.headers);
1739
+ return this.request("GET", "/api/v1/integrations/wise/recipients", {
1740
+ signal: args.signal,
1741
+ headers,
1742
+ });
1743
+ }
1744
+ async onboardWiseRecipient(args) {
1745
+ const headers = new Headers(args.headers);
1746
+ return this.request("POST", "/api/v1/integrations/wise/recipients", {
1747
+ body: args.body,
1748
+ signal: args.signal,
1749
+ headers,
1750
+ });
1751
+ }
1752
+ async listWisePayoutProposals(args = {}) {
1753
+ const headers = new Headers(args.headers);
1754
+ return this.request("GET", "/api/v1/integrations/wise/proposals", {
1755
+ signal: args.signal,
1756
+ headers,
1757
+ });
1758
+ }
1759
+ async getWisePayoutDestination(args) {
1760
+ const headers = new Headers(args.headers);
1761
+ return this.request("GET", "/api/v1/integrations/wise/destinations/:userId".replace(":userId", encodeURIComponent(String(args["userId"]))), {
1762
+ signal: args.signal,
1763
+ headers,
1764
+ });
1765
+ }
1766
+ async removeWisePayoutDestination(args) {
1767
+ const headers = new Headers(args.headers);
1768
+ return this.request("DELETE", "/api/v1/integrations/wise/destinations/:userId".replace(":userId", encodeURIComponent(String(args["userId"]))), {
1769
+ signal: args.signal,
1770
+ headers,
1771
+ });
1772
+ }
1773
+ async shareWiseProfile(args) {
1774
+ const headers = new Headers(args.headers);
1775
+ return this.request("POST", "/api/v1/integrations/wise/contacts", {
1776
+ body: args.body,
1777
+ signal: args.signal,
1778
+ headers,
1779
+ });
1780
+ }
1781
+ async linkWiseRecipient(args) {
1782
+ const headers = new Headers(args.headers);
1783
+ return this.request("POST", "/api/v1/integrations/wise/recipients/link", {
1784
+ body: args.body,
1785
+ signal: args.signal,
1786
+ headers,
1787
+ });
1788
+ }
1789
+ async unlinkWiseRecipient(args) {
1790
+ const headers = new Headers(args.headers);
1791
+ return this.request("DELETE", "/api/v1/integrations/wise/recipients/:accountId".replace(":accountId", encodeURIComponent(String(args["accountId"]))), {
1792
+ signal: args.signal,
1793
+ headers,
1794
+ });
1795
+ }
1517
1796
  async listSsoProvisioningDomains(args = {}) {
1518
1797
  const headers = new Headers(args.headers);
1519
1798
  return this.request("GET", "/api/v1/settings/sso-domains", {
@@ -1593,6 +1872,83 @@ export class EzactoClient {
1593
1872
  headers,
1594
1873
  });
1595
1874
  }
1875
+ async releaseInvoicedTime(args) {
1876
+ const headers = new Headers(args.headers);
1877
+ return this.request("POST", "/api/v1/invoices/:id/released-time".replace(":id", encodeURIComponent(String(args["id"]))), {
1878
+ signal: args.signal,
1879
+ headers,
1880
+ });
1881
+ }
1882
+ async getInvoiceDocumentPreference(args) {
1883
+ const headers = new Headers(args.headers);
1884
+ return this.request("GET", "/api/v1/invoices/:id/document-preference".replace(":id", encodeURIComponent(String(args["id"]))), {
1885
+ signal: args.signal,
1886
+ headers,
1887
+ });
1888
+ }
1889
+ async setInvoiceDocumentPreference(args) {
1890
+ const headers = new Headers(args.headers);
1891
+ return this.request("POST", "/api/v1/invoices/:id/document-preference".replace(":id", encodeURIComponent(String(args["id"]))), {
1892
+ signal: args.signal,
1893
+ headers,
1894
+ });
1895
+ }
1896
+ async getOrganizationInvoiceDocuments(args = {}) {
1897
+ const headers = new Headers(args.headers);
1898
+ return this.request("GET", "/api/v1/settings/invoice-documents", {
1899
+ signal: args.signal,
1900
+ headers,
1901
+ });
1902
+ }
1903
+ async setOrganizationInvoiceDocuments(args = {}) {
1904
+ const headers = new Headers(args.headers);
1905
+ return this.request("POST", "/api/v1/settings/invoice-documents", {
1906
+ signal: args.signal,
1907
+ headers,
1908
+ });
1909
+ }
1910
+ async getInvoiceThankYouPreference(args) {
1911
+ const headers = new Headers(args.headers);
1912
+ return this.request("GET", "/api/v1/invoices/:id/thank-you-preference".replace(":id", encodeURIComponent(String(args["id"]))), {
1913
+ signal: args.signal,
1914
+ headers,
1915
+ });
1916
+ }
1917
+ async setInvoiceThankYouPreference(args) {
1918
+ const headers = new Headers(args.headers);
1919
+ return this.request("POST", "/api/v1/invoices/:id/thank-you-preference".replace(":id", encodeURIComponent(String(args["id"]))), {
1920
+ signal: args.signal,
1921
+ headers,
1922
+ });
1923
+ }
1924
+ async getOrganizationInvoiceThankYou(args = {}) {
1925
+ const headers = new Headers(args.headers);
1926
+ return this.request("GET", "/api/v1/settings/invoice-thank-you", {
1927
+ signal: args.signal,
1928
+ headers,
1929
+ });
1930
+ }
1931
+ async setOrganizationInvoiceThankYou(args = {}) {
1932
+ const headers = new Headers(args.headers);
1933
+ return this.request("POST", "/api/v1/settings/invoice-thank-you", {
1934
+ signal: args.signal,
1935
+ headers,
1936
+ });
1937
+ }
1938
+ async listIncompleteRecurringInvoices(args = {}) {
1939
+ const headers = new Headers(args.headers);
1940
+ return this.request("GET", "/api/v1/recurring-invoices/incomplete", {
1941
+ signal: args.signal,
1942
+ headers,
1943
+ });
1944
+ }
1945
+ async completeRecurringInvoiceDefinition(args) {
1946
+ const headers = new Headers(args.headers);
1947
+ return this.request("POST", "/api/v1/recurring-invoices/:id/completion".replace(":id", encodeURIComponent(String(args["id"]))), {
1948
+ signal: args.signal,
1949
+ headers,
1950
+ });
1951
+ }
1596
1952
  async listPayoutAccounts(args) {
1597
1953
  const headers = new Headers(args.headers);
1598
1954
  return this.request("GET", "/api/v1/users/:id/payout-accounts".replace(":id", encodeURIComponent(String(args["id"]))), {
@@ -1744,6 +2100,16 @@ export class EzactoClient {
1744
2100
  headers,
1745
2101
  });
1746
2102
  }
2103
+ async removeTeamPersonRate(args) {
2104
+ const headers = new Headers(args.headers);
2105
+ if (args["Idempotency-Key"] !== undefined)
2106
+ headers.set("Idempotency-Key", String(args["Idempotency-Key"]));
2107
+ return this.request("DELETE", "/api/v1/team/people/:id/rates/:rateId".replace(":id", encodeURIComponent(String(args["id"]))).replace(":rateId", encodeURIComponent(String(args["rateId"]))), {
2108
+ body: args.body,
2109
+ signal: args.signal,
2110
+ headers,
2111
+ });
2112
+ }
1747
2113
  async listClientAncestors(args) {
1748
2114
  const headers = new Headers(args.headers);
1749
2115
  return this.request("GET", "/api/v1/clients/:id/ancestors".replace(":id", encodeURIComponent(String(args["id"]))), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conflict-hq/ezacto-client",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Generated TypeScript client for the ezacto native API (v1 contract).",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {