@mestra-dev/contract 0.0.292 → 0.0.293
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/index.d.ts +432 -1
- 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,437 @@ 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
|
+
};
|
|
1519
1950
|
} & {
|
|
1520
1951
|
"/settings": {
|
|
1521
1952
|
$post: {
|