@mestra-dev/contract 0.0.292 → 0.0.294

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 (2) hide show
  1. package/dist/index.d.ts +563 -7
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -579,8 +579,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
579
579
  name: string;
580
580
  active: boolean;
581
581
  code: string;
582
- sortOrder: number;
583
582
  kind: string;
583
+ sortOrder: number;
584
584
  publiclyVisible: boolean;
585
585
  };
586
586
  };
@@ -1516,6 +1516,562 @@ declare const routes: import("hono/hono-base").HonoBase<{
1516
1516
  status: 200;
1517
1517
  };
1518
1518
  };
1519
+ } & {
1520
+ "/member/schedules/:workspace": {
1521
+ $get: {
1522
+ input: {
1523
+ query: {
1524
+ collaboratorId?: string | undefined;
1525
+ };
1526
+ } & {
1527
+ param: {
1528
+ workspace: string;
1529
+ };
1530
+ };
1531
+ output: {
1532
+ success: true;
1533
+ schedules: {
1534
+ collaboratorId: string;
1535
+ pattern: {
1536
+ kind: "weekly" | "alternating" | "two_on_two_off" | "custom";
1537
+ daysOn: number;
1538
+ daysOff: number;
1539
+ startsOn: string | null;
1540
+ start: string;
1541
+ end: string;
1542
+ placeId: string | null;
1543
+ };
1544
+ shifts: {
1545
+ weekday: number;
1546
+ start: string;
1547
+ end: string;
1548
+ placeId: string | null;
1549
+ }[];
1550
+ updatedAt: string;
1551
+ }[];
1552
+ };
1553
+ outputFormat: "json";
1554
+ status: 200;
1555
+ };
1556
+ };
1557
+ } & {
1558
+ "/member/schedule": {
1559
+ $post: {
1560
+ input: {
1561
+ json: {
1562
+ workspace: string;
1563
+ collaboratorId: string;
1564
+ pattern: {
1565
+ kind: "weekly" | "alternating" | "two_on_two_off" | "custom";
1566
+ daysOn: number;
1567
+ daysOff: number;
1568
+ startsOn: string | null;
1569
+ start: string;
1570
+ end: string;
1571
+ placeId: string | null;
1572
+ };
1573
+ shifts: {
1574
+ weekday: number;
1575
+ start: string;
1576
+ end: string;
1577
+ placeId: string | null;
1578
+ }[];
1579
+ };
1580
+ };
1581
+ output: {
1582
+ success: false;
1583
+ error: string;
1584
+ };
1585
+ outputFormat: "json";
1586
+ status: 403;
1587
+ } | {
1588
+ input: {
1589
+ json: {
1590
+ workspace: string;
1591
+ collaboratorId: string;
1592
+ pattern: {
1593
+ kind: "weekly" | "alternating" | "two_on_two_off" | "custom";
1594
+ daysOn: number;
1595
+ daysOff: number;
1596
+ startsOn: string | null;
1597
+ start: string;
1598
+ end: string;
1599
+ placeId: string | null;
1600
+ };
1601
+ shifts: {
1602
+ weekday: number;
1603
+ start: string;
1604
+ end: string;
1605
+ placeId: string | null;
1606
+ }[];
1607
+ };
1608
+ };
1609
+ output: {
1610
+ success: false;
1611
+ error: string;
1612
+ };
1613
+ outputFormat: "json";
1614
+ status: 400;
1615
+ } | {
1616
+ input: {
1617
+ json: {
1618
+ workspace: string;
1619
+ collaboratorId: string;
1620
+ pattern: {
1621
+ kind: "weekly" | "alternating" | "two_on_two_off" | "custom";
1622
+ daysOn: number;
1623
+ daysOff: number;
1624
+ startsOn: string | null;
1625
+ start: string;
1626
+ end: string;
1627
+ placeId: string | null;
1628
+ };
1629
+ shifts: {
1630
+ weekday: number;
1631
+ start: string;
1632
+ end: string;
1633
+ placeId: string | null;
1634
+ }[];
1635
+ };
1636
+ };
1637
+ output: {
1638
+ success: false;
1639
+ error: string;
1640
+ };
1641
+ outputFormat: "json";
1642
+ status: 404;
1643
+ } | {
1644
+ input: {
1645
+ json: {
1646
+ workspace: string;
1647
+ collaboratorId: string;
1648
+ pattern: {
1649
+ kind: "weekly" | "alternating" | "two_on_two_off" | "custom";
1650
+ daysOn: number;
1651
+ daysOff: number;
1652
+ startsOn: string | null;
1653
+ start: string;
1654
+ end: string;
1655
+ placeId: string | null;
1656
+ };
1657
+ shifts: {
1658
+ weekday: number;
1659
+ start: string;
1660
+ end: string;
1661
+ placeId: string | null;
1662
+ }[];
1663
+ };
1664
+ };
1665
+ output: {
1666
+ success: true;
1667
+ schedule: {
1668
+ collaboratorId: string;
1669
+ pattern: {
1670
+ kind: "weekly" | "alternating" | "two_on_two_off" | "custom";
1671
+ daysOn: number;
1672
+ daysOff: number;
1673
+ startsOn: string | null;
1674
+ start: string;
1675
+ end: string;
1676
+ placeId: string | null;
1677
+ };
1678
+ shifts: {
1679
+ weekday: number;
1680
+ start: string;
1681
+ end: string;
1682
+ placeId: string | null;
1683
+ }[];
1684
+ updatedAt: string;
1685
+ };
1686
+ };
1687
+ outputFormat: "json";
1688
+ status: 200;
1689
+ };
1690
+ };
1691
+ } & {
1692
+ "/member/requests/:workspace": {
1693
+ $get: {
1694
+ input: {
1695
+ query: {
1696
+ collaboratorId?: string | undefined;
1697
+ from?: string | undefined;
1698
+ to?: string | undefined;
1699
+ status?: "pending" | "approved" | "rejected" | undefined;
1700
+ };
1701
+ } & {
1702
+ param: {
1703
+ workspace: string;
1704
+ };
1705
+ };
1706
+ output: {
1707
+ success: true;
1708
+ requests: {
1709
+ id: string;
1710
+ collaboratorId: string;
1711
+ kind: "vacation" | "sick" | "remote" | "unpaid" | "overtime";
1712
+ status: "pending" | "approved" | "rejected";
1713
+ from: string;
1714
+ to: string;
1715
+ start: string | null;
1716
+ end: string | null;
1717
+ requestedBy: string | null;
1718
+ reviewedBy: string | null;
1719
+ reviewedAt: string | null;
1720
+ createdAt: string;
1721
+ }[];
1722
+ };
1723
+ outputFormat: "json";
1724
+ status: 200;
1725
+ };
1726
+ };
1727
+ } & {
1728
+ "/member/requests": {
1729
+ $post: {
1730
+ input: {
1731
+ json: {
1732
+ kind: "vacation" | "sick" | "remote" | "unpaid";
1733
+ from: string;
1734
+ to: string;
1735
+ workspace: string;
1736
+ collaboratorId: string;
1737
+ } | {
1738
+ kind: "overtime";
1739
+ date: string;
1740
+ start: string;
1741
+ end: string;
1742
+ workspace: string;
1743
+ collaboratorId: string;
1744
+ };
1745
+ };
1746
+ output: {
1747
+ success: false;
1748
+ error: string;
1749
+ };
1750
+ outputFormat: "json";
1751
+ status: 403;
1752
+ } | {
1753
+ input: {
1754
+ json: {
1755
+ kind: "vacation" | "sick" | "remote" | "unpaid";
1756
+ from: string;
1757
+ to: string;
1758
+ workspace: string;
1759
+ collaboratorId: string;
1760
+ } | {
1761
+ kind: "overtime";
1762
+ date: string;
1763
+ start: string;
1764
+ end: string;
1765
+ workspace: string;
1766
+ collaboratorId: string;
1767
+ };
1768
+ };
1769
+ output: {
1770
+ success: false;
1771
+ error: string;
1772
+ };
1773
+ outputFormat: "json";
1774
+ status: 409;
1775
+ } | {
1776
+ input: {
1777
+ json: {
1778
+ kind: "vacation" | "sick" | "remote" | "unpaid";
1779
+ from: string;
1780
+ to: string;
1781
+ workspace: string;
1782
+ collaboratorId: string;
1783
+ } | {
1784
+ kind: "overtime";
1785
+ date: string;
1786
+ start: string;
1787
+ end: string;
1788
+ workspace: string;
1789
+ collaboratorId: string;
1790
+ };
1791
+ };
1792
+ output: {
1793
+ success: false;
1794
+ error: string;
1795
+ };
1796
+ outputFormat: "json";
1797
+ status: 404;
1798
+ } | {
1799
+ input: {
1800
+ json: {
1801
+ kind: "vacation" | "sick" | "remote" | "unpaid";
1802
+ from: string;
1803
+ to: string;
1804
+ workspace: string;
1805
+ collaboratorId: string;
1806
+ } | {
1807
+ kind: "overtime";
1808
+ date: string;
1809
+ start: string;
1810
+ end: string;
1811
+ workspace: string;
1812
+ collaboratorId: string;
1813
+ };
1814
+ };
1815
+ output: {
1816
+ success: true;
1817
+ request: {
1818
+ id: string;
1819
+ collaboratorId: string;
1820
+ kind: "vacation" | "sick" | "remote" | "unpaid" | "overtime";
1821
+ status: "pending" | "approved" | "rejected";
1822
+ from: string;
1823
+ to: string;
1824
+ start: string | null;
1825
+ end: string | null;
1826
+ requestedBy: string | null;
1827
+ reviewedBy: string | null;
1828
+ reviewedAt: string | null;
1829
+ createdAt: string;
1830
+ };
1831
+ };
1832
+ outputFormat: "json";
1833
+ status: 201;
1834
+ };
1835
+ };
1836
+ } & {
1837
+ "/member/requests/review": {
1838
+ $post: {
1839
+ input: {
1840
+ json: {
1841
+ workspace: string;
1842
+ requestId: string;
1843
+ status: "approved" | "rejected";
1844
+ };
1845
+ };
1846
+ output: {
1847
+ success: false;
1848
+ error: string;
1849
+ };
1850
+ outputFormat: "json";
1851
+ status: 403;
1852
+ } | {
1853
+ input: {
1854
+ json: {
1855
+ workspace: string;
1856
+ requestId: string;
1857
+ status: "approved" | "rejected";
1858
+ };
1859
+ };
1860
+ output: {
1861
+ success: false;
1862
+ error: string;
1863
+ };
1864
+ outputFormat: "json";
1865
+ status: 404;
1866
+ } | {
1867
+ input: {
1868
+ json: {
1869
+ workspace: string;
1870
+ requestId: string;
1871
+ status: "approved" | "rejected";
1872
+ };
1873
+ };
1874
+ output: {
1875
+ success: true;
1876
+ request: {
1877
+ id: string;
1878
+ collaboratorId: string;
1879
+ kind: "vacation" | "sick" | "remote" | "unpaid" | "overtime";
1880
+ status: "pending" | "approved" | "rejected";
1881
+ from: string;
1882
+ to: string;
1883
+ start: string | null;
1884
+ end: string | null;
1885
+ requestedBy: string | null;
1886
+ reviewedBy: string | null;
1887
+ reviewedAt: string | null;
1888
+ createdAt: string;
1889
+ };
1890
+ };
1891
+ outputFormat: "json";
1892
+ status: 200;
1893
+ };
1894
+ };
1895
+ } & {
1896
+ "/member/requests/cancel": {
1897
+ $post: {
1898
+ input: {
1899
+ json: {
1900
+ workspace: string;
1901
+ requestId: string;
1902
+ };
1903
+ };
1904
+ output: {
1905
+ success: false;
1906
+ error: string;
1907
+ };
1908
+ outputFormat: "json";
1909
+ status: 403;
1910
+ } | {
1911
+ input: {
1912
+ json: {
1913
+ workspace: string;
1914
+ requestId: string;
1915
+ };
1916
+ };
1917
+ output: {
1918
+ success: false;
1919
+ error: string;
1920
+ };
1921
+ outputFormat: "json";
1922
+ status: 409;
1923
+ } | {
1924
+ input: {
1925
+ json: {
1926
+ workspace: string;
1927
+ requestId: string;
1928
+ };
1929
+ };
1930
+ output: {
1931
+ success: false;
1932
+ error: string;
1933
+ };
1934
+ outputFormat: "json";
1935
+ status: 404;
1936
+ } | {
1937
+ input: {
1938
+ json: {
1939
+ workspace: string;
1940
+ requestId: string;
1941
+ };
1942
+ };
1943
+ output: {
1944
+ success: true;
1945
+ };
1946
+ outputFormat: "json";
1947
+ status: 200;
1948
+ };
1949
+ };
1950
+ } & {
1951
+ "/member/feedback/:workspace": {
1952
+ $get: {
1953
+ input: {
1954
+ query: {
1955
+ collaboratorId: string;
1956
+ };
1957
+ } & {
1958
+ param: {
1959
+ workspace: string;
1960
+ };
1961
+ };
1962
+ output: {
1963
+ success: true;
1964
+ feedback: {
1965
+ id: string;
1966
+ collaboratorId: string;
1967
+ rating: number;
1968
+ reason: string;
1969
+ comment: string;
1970
+ date: string;
1971
+ customerId: string | null;
1972
+ authorName: string;
1973
+ customerContact: string | null;
1974
+ recordedBy: string | null;
1975
+ recordedByName: string | null;
1976
+ createdAt: string;
1977
+ }[];
1978
+ };
1979
+ outputFormat: "json";
1980
+ status: 200;
1981
+ };
1982
+ };
1983
+ } & {
1984
+ "/member/feedback": {
1985
+ $post: {
1986
+ input: {
1987
+ json: {
1988
+ workspace: string;
1989
+ collaboratorId: string;
1990
+ customer: {
1991
+ source: "existing";
1992
+ customerId: string;
1993
+ } | {
1994
+ source: "manual";
1995
+ name: string;
1996
+ contact?: string | null | undefined;
1997
+ };
1998
+ rating: number;
1999
+ reason: string;
2000
+ comment: string;
2001
+ date: string;
2002
+ };
2003
+ };
2004
+ output: {
2005
+ success: false;
2006
+ error: string;
2007
+ };
2008
+ outputFormat: "json";
2009
+ status: 400;
2010
+ } | {
2011
+ input: {
2012
+ json: {
2013
+ workspace: string;
2014
+ collaboratorId: string;
2015
+ customer: {
2016
+ source: "existing";
2017
+ customerId: string;
2018
+ } | {
2019
+ source: "manual";
2020
+ name: string;
2021
+ contact?: string | null | undefined;
2022
+ };
2023
+ rating: number;
2024
+ reason: string;
2025
+ comment: string;
2026
+ date: string;
2027
+ };
2028
+ };
2029
+ output: {
2030
+ success: false;
2031
+ error: string;
2032
+ };
2033
+ outputFormat: "json";
2034
+ status: 404;
2035
+ } | {
2036
+ input: {
2037
+ json: {
2038
+ workspace: string;
2039
+ collaboratorId: string;
2040
+ customer: {
2041
+ source: "existing";
2042
+ customerId: string;
2043
+ } | {
2044
+ source: "manual";
2045
+ name: string;
2046
+ contact?: string | null | undefined;
2047
+ };
2048
+ rating: number;
2049
+ reason: string;
2050
+ comment: string;
2051
+ date: string;
2052
+ };
2053
+ };
2054
+ output: {
2055
+ success: true;
2056
+ feedback: {
2057
+ id: string;
2058
+ collaboratorId: string;
2059
+ rating: number;
2060
+ reason: string;
2061
+ comment: string;
2062
+ date: string;
2063
+ customerId: string | null;
2064
+ authorName: string;
2065
+ customerContact: string | null;
2066
+ recordedBy: string | null;
2067
+ recordedByName: string | null;
2068
+ createdAt: string;
2069
+ };
2070
+ };
2071
+ outputFormat: "json";
2072
+ status: 201;
2073
+ };
2074
+ };
1519
2075
  } & {
1520
2076
  "/settings": {
1521
2077
  $post: {
@@ -1977,11 +2533,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
1977
2533
  deleted_at: string | null;
1978
2534
  verified_at: string | null;
1979
2535
  suspended_at: string | null;
2536
+ customerId: string | null;
1980
2537
  subject: string;
1981
2538
  created_by: string;
1982
2539
  phaseId: string | null;
1983
2540
  priority: string | null;
1984
- customerId: string | null;
1985
2541
  visibility: string | null;
1986
2542
  };
1987
2543
  };
@@ -4129,8 +4685,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
4129
4685
  invoiceId: string;
4130
4686
  status: string;
4131
4687
  date: string;
4132
- created_by: string;
4133
4688
  customerId: string;
4689
+ created_by: string;
4134
4690
  fullPayment: boolean | null;
4135
4691
  installment: boolean | null;
4136
4692
  notes: string | null;
@@ -4264,8 +4820,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
4264
4820
  invoiceId: string;
4265
4821
  status: string;
4266
4822
  date: string;
4267
- created_by: string;
4268
4823
  customerId: string;
4824
+ created_by: string;
4269
4825
  fullPayment: boolean | null;
4270
4826
  installment: boolean | null;
4271
4827
  notes: string | null;
@@ -4453,8 +5009,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
4453
5009
  invoiceId: string;
4454
5010
  status: string;
4455
5011
  date: string;
4456
- created_by: string;
4457
5012
  customerId: string;
5013
+ created_by: string;
4458
5014
  fullPayment: boolean | null;
4459
5015
  installment: boolean | null;
4460
5016
  notes: string | null;
@@ -4596,8 +5152,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
4596
5152
  verified_at: string | null;
4597
5153
  suspended_at: string | null;
4598
5154
  date: string;
4599
- created_by: string;
4600
5155
  customerId: string;
5156
+ created_by: string;
4601
5157
  notes: string | null;
4602
5158
  serviceId: string;
4603
5159
  }[];
@@ -10486,13 +11042,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
10486
11042
  createdAt: string;
10487
11043
  date: string;
10488
11044
  reason: string;
11045
+ comment: string | null;
10489
11046
  productName: string;
10490
11047
  variant: string | null;
10491
11048
  sku: string;
10492
11049
  quantity: number;
10493
11050
  fromWarehouseId: string;
10494
11051
  toWarehouseId: string;
10495
- comment: string | null;
10496
11052
  userName: string | null;
10497
11053
  };
10498
11054
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.292",
3
+ "version": "0.0.294",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,