@cavuno/board 1.22.0 → 1.23.0
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.mts +323 -2
- package/dist/index.d.ts +323 -2
- package/dist/index.js +251 -1
- package/dist/index.mjs +251 -1
- package/package.json +1 -1
- package/skills/manifest.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -109,7 +109,7 @@ async function clearSession(storage) {
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// src/version.ts
|
|
112
|
-
var SDK_VERSION = "1.
|
|
112
|
+
var SDK_VERSION = "1.23.0";
|
|
113
113
|
|
|
114
114
|
// src/client.ts
|
|
115
115
|
function isRawBody(body) {
|
|
@@ -1764,6 +1764,256 @@ function meNamespace(client) {
|
|
|
1764
1764
|
{ ...options, method: "DELETE", query }
|
|
1765
1765
|
);
|
|
1766
1766
|
}
|
|
1767
|
+
},
|
|
1768
|
+
/**
|
|
1769
|
+
* The authenticated board user's messaging inbox (doc 34 / ADR-0053).
|
|
1770
|
+
* The v1 surface is polled REST — there is no realtime primitive; poll
|
|
1771
|
+
* `list` / `listMessages` / `unreadCount` on an interval (3–5s is the
|
|
1772
|
+
* reference cadence) for near-live updates.
|
|
1773
|
+
*/
|
|
1774
|
+
conversations: {
|
|
1775
|
+
/**
|
|
1776
|
+
* List my conversations (each page sorted most-recent-activity-first;
|
|
1777
|
+
* cross-page cursor order is approximate — see the API docs). `archived:
|
|
1778
|
+
* true` returns the archived view. Poll for inbox liveness.
|
|
1779
|
+
*
|
|
1780
|
+
* @example
|
|
1781
|
+
* const { data } = await board.me.conversations.list({ limit: 20 });
|
|
1782
|
+
*/
|
|
1783
|
+
list(query, options) {
|
|
1784
|
+
return client.fetch("/me/conversations", {
|
|
1785
|
+
...options,
|
|
1786
|
+
query
|
|
1787
|
+
});
|
|
1788
|
+
},
|
|
1789
|
+
/**
|
|
1790
|
+
* The count of distinct conversations with an unread message — the
|
|
1791
|
+
* inbox badge. Poll for liveness.
|
|
1792
|
+
*
|
|
1793
|
+
* @example
|
|
1794
|
+
* const { count } = await board.me.conversations.unreadCount();
|
|
1795
|
+
*/
|
|
1796
|
+
unreadCount(options) {
|
|
1797
|
+
return client.fetch(
|
|
1798
|
+
"/me/conversations/unread-count",
|
|
1799
|
+
options
|
|
1800
|
+
);
|
|
1801
|
+
},
|
|
1802
|
+
/**
|
|
1803
|
+
* A conversation's header — live-resolved counterparty identity, the
|
|
1804
|
+
* viewer's role, and the viewer's last-read pointer. The messages are a
|
|
1805
|
+
* separate paginated call (`listMessages`).
|
|
1806
|
+
*
|
|
1807
|
+
* @example
|
|
1808
|
+
* const convo = await board.me.conversations.retrieve(id);
|
|
1809
|
+
*/
|
|
1810
|
+
retrieve(id, options) {
|
|
1811
|
+
return client.fetch(
|
|
1812
|
+
`/me/conversations/${encodeURIComponent(id)}`,
|
|
1813
|
+
options
|
|
1814
|
+
);
|
|
1815
|
+
},
|
|
1816
|
+
/**
|
|
1817
|
+
* A conversation's messages, oldest-first (append order). Unsent
|
|
1818
|
+
* messages are tombstones (empty `body`, `deletedAt` set). Poll for the
|
|
1819
|
+
* live thread.
|
|
1820
|
+
*
|
|
1821
|
+
* @example
|
|
1822
|
+
* const { data } = await board.me.conversations.listMessages(id, { limit: 50 });
|
|
1823
|
+
*/
|
|
1824
|
+
listMessages(id, query, options) {
|
|
1825
|
+
return client.fetch(
|
|
1826
|
+
`/me/conversations/${encodeURIComponent(id)}/messages`,
|
|
1827
|
+
{ ...options, query }
|
|
1828
|
+
);
|
|
1829
|
+
},
|
|
1830
|
+
/**
|
|
1831
|
+
* Cold-initiate a conversation with a candidate (employer-only).
|
|
1832
|
+
* Converges on the existing thread. Returns the created message.
|
|
1833
|
+
*
|
|
1834
|
+
* @example
|
|
1835
|
+
* const msg = await board.me.conversations.start({ candidateBoardUserId, body: 'Hi!' });
|
|
1836
|
+
*/
|
|
1837
|
+
start(body, options) {
|
|
1838
|
+
return client.fetch("/me/conversations", {
|
|
1839
|
+
...options,
|
|
1840
|
+
method: "POST",
|
|
1841
|
+
body
|
|
1842
|
+
});
|
|
1843
|
+
},
|
|
1844
|
+
/**
|
|
1845
|
+
* Message an applicant from the ATS (application context, outside the
|
|
1846
|
+
* talent paywall). Returns the created message.
|
|
1847
|
+
*
|
|
1848
|
+
* @example
|
|
1849
|
+
* const msg = await board.me.conversations.startAboutApplication({ applicationId, body: '…' });
|
|
1850
|
+
*/
|
|
1851
|
+
startAboutApplication(body, options) {
|
|
1852
|
+
return client.fetch("/me/conversations/about-application", {
|
|
1853
|
+
...options,
|
|
1854
|
+
method: "POST",
|
|
1855
|
+
body
|
|
1856
|
+
});
|
|
1857
|
+
},
|
|
1858
|
+
/**
|
|
1859
|
+
* Reply in an existing conversation. Returns the created message.
|
|
1860
|
+
*
|
|
1861
|
+
* @example
|
|
1862
|
+
* const msg = await board.me.conversations.reply(id, { body: 'Sounds good' });
|
|
1863
|
+
*/
|
|
1864
|
+
reply(id, body, options) {
|
|
1865
|
+
return client.fetch(
|
|
1866
|
+
`/me/conversations/${encodeURIComponent(id)}/reply`,
|
|
1867
|
+
{ ...options, method: "POST", body }
|
|
1868
|
+
);
|
|
1869
|
+
},
|
|
1870
|
+
/**
|
|
1871
|
+
* Mark a conversation read for the viewer. Idempotent.
|
|
1872
|
+
*
|
|
1873
|
+
* @example
|
|
1874
|
+
* await board.me.conversations.markRead(id);
|
|
1875
|
+
*/
|
|
1876
|
+
markRead(id, options) {
|
|
1877
|
+
return client.fetch(
|
|
1878
|
+
`/me/conversations/${encodeURIComponent(id)}/read`,
|
|
1879
|
+
{ ...options, method: "POST" }
|
|
1880
|
+
);
|
|
1881
|
+
},
|
|
1882
|
+
/**
|
|
1883
|
+
* Archive a conversation for the viewer (per-side). Idempotent.
|
|
1884
|
+
*
|
|
1885
|
+
* @example
|
|
1886
|
+
* await board.me.conversations.archive(id);
|
|
1887
|
+
*/
|
|
1888
|
+
archive(id, options) {
|
|
1889
|
+
return client.fetch(
|
|
1890
|
+
`/me/conversations/${encodeURIComponent(id)}/archive`,
|
|
1891
|
+
{ ...options, method: "POST" }
|
|
1892
|
+
);
|
|
1893
|
+
},
|
|
1894
|
+
/**
|
|
1895
|
+
* Move an archived conversation back to the main inbox. Idempotent.
|
|
1896
|
+
*
|
|
1897
|
+
* @example
|
|
1898
|
+
* await board.me.conversations.unarchive(id);
|
|
1899
|
+
*/
|
|
1900
|
+
unarchive(id, options) {
|
|
1901
|
+
return client.fetch(
|
|
1902
|
+
`/me/conversations/${encodeURIComponent(id)}/unarchive`,
|
|
1903
|
+
{ ...options, method: "POST" }
|
|
1904
|
+
);
|
|
1905
|
+
},
|
|
1906
|
+
/**
|
|
1907
|
+
* The existing employer↔candidate conversation id (or null). Tier-3
|
|
1908
|
+
* talent-contact helper — route to an existing thread instead of opening
|
|
1909
|
+
* a composer.
|
|
1910
|
+
*
|
|
1911
|
+
* @example
|
|
1912
|
+
* const { conversationId } = await board.me.conversations.findExisting({ candidateBoardUserId });
|
|
1913
|
+
*/
|
|
1914
|
+
findExisting(query, options) {
|
|
1915
|
+
return client.fetch(
|
|
1916
|
+
"/me/conversations/find-existing",
|
|
1917
|
+
{ ...options, query }
|
|
1918
|
+
);
|
|
1919
|
+
}
|
|
1920
|
+
},
|
|
1921
|
+
/**
|
|
1922
|
+
* Blocking (doc 34 §E): list / add / remove blocks + a Tier-3 status check.
|
|
1923
|
+
*/
|
|
1924
|
+
blocks: {
|
|
1925
|
+
/**
|
|
1926
|
+
* The users I've blocked.
|
|
1927
|
+
*
|
|
1928
|
+
* @example
|
|
1929
|
+
* const { data } = await board.me.blocks.list();
|
|
1930
|
+
*/
|
|
1931
|
+
list(options) {
|
|
1932
|
+
return client.fetch("/me/blocks", options);
|
|
1933
|
+
},
|
|
1934
|
+
/**
|
|
1935
|
+
* Block a user (silent). Idempotent.
|
|
1936
|
+
*
|
|
1937
|
+
* @example
|
|
1938
|
+
* await board.me.blocks.create({ boardUserId });
|
|
1939
|
+
*/
|
|
1940
|
+
create(body, options) {
|
|
1941
|
+
return client.fetch("/me/blocks", {
|
|
1942
|
+
...options,
|
|
1943
|
+
method: "POST",
|
|
1944
|
+
body
|
|
1945
|
+
});
|
|
1946
|
+
},
|
|
1947
|
+
/**
|
|
1948
|
+
* Unblock a user. Idempotent.
|
|
1949
|
+
*
|
|
1950
|
+
* @example
|
|
1951
|
+
* await board.me.blocks.remove(boardUserId);
|
|
1952
|
+
*/
|
|
1953
|
+
remove(boardUserId, options) {
|
|
1954
|
+
return client.fetch(
|
|
1955
|
+
`/me/blocks/${encodeURIComponent(boardUserId)}`,
|
|
1956
|
+
{ ...options, method: "DELETE" }
|
|
1957
|
+
);
|
|
1958
|
+
},
|
|
1959
|
+
/**
|
|
1960
|
+
* Whether I've blocked a user (Tier-3 helper).
|
|
1961
|
+
*
|
|
1962
|
+
* @example
|
|
1963
|
+
* const { blocked } = await board.me.blocks.status(boardUserId);
|
|
1964
|
+
*/
|
|
1965
|
+
status(boardUserId, options) {
|
|
1966
|
+
return client.fetch(
|
|
1967
|
+
`/me/blocks/${encodeURIComponent(boardUserId)}`,
|
|
1968
|
+
options
|
|
1969
|
+
);
|
|
1970
|
+
}
|
|
1971
|
+
},
|
|
1972
|
+
/**
|
|
1973
|
+
* Message-scoped actions (doc 34 §E): edit / unsend your own messages
|
|
1974
|
+
* (15-minute window), and report a message addressed to you.
|
|
1975
|
+
*/
|
|
1976
|
+
messages: {
|
|
1977
|
+
/**
|
|
1978
|
+
* Edit one of your own messages (within the 15-minute window). Returns
|
|
1979
|
+
* the updated message.
|
|
1980
|
+
*
|
|
1981
|
+
* @example
|
|
1982
|
+
* const msg = await board.me.messages.edit(id, { body: 'fixed typo' });
|
|
1983
|
+
*/
|
|
1984
|
+
edit(id, body, options) {
|
|
1985
|
+
return client.fetch(`/me/messages/${encodeURIComponent(id)}`, {
|
|
1986
|
+
...options,
|
|
1987
|
+
method: "PATCH",
|
|
1988
|
+
body
|
|
1989
|
+
});
|
|
1990
|
+
},
|
|
1991
|
+
/**
|
|
1992
|
+
* Unsend (soft-delete) one of your own messages (within the 15-minute
|
|
1993
|
+
* window). Idempotent. Returns the tombstoned message (empty `body`).
|
|
1994
|
+
*
|
|
1995
|
+
* @example
|
|
1996
|
+
* await board.me.messages.unsend(id);
|
|
1997
|
+
*/
|
|
1998
|
+
unsend(id, options) {
|
|
1999
|
+
return client.fetch(`/me/messages/${encodeURIComponent(id)}`, {
|
|
2000
|
+
...options,
|
|
2001
|
+
method: "DELETE"
|
|
2002
|
+
});
|
|
2003
|
+
},
|
|
2004
|
+
/**
|
|
2005
|
+
* Report a message addressed to you for moderation. Auto-blocks the
|
|
2006
|
+
* author.
|
|
2007
|
+
*
|
|
2008
|
+
* @example
|
|
2009
|
+
* const { blocked } = await board.me.messages.report(id, { reason: 'spam' });
|
|
2010
|
+
*/
|
|
2011
|
+
report(id, body, options) {
|
|
2012
|
+
return client.fetch(
|
|
2013
|
+
`/me/messages/${encodeURIComponent(id)}/report`,
|
|
2014
|
+
{ ...options, method: "POST", body }
|
|
2015
|
+
);
|
|
2016
|
+
}
|
|
1767
2017
|
}
|
|
1768
2018
|
};
|
|
1769
2019
|
}
|
package/package.json
CHANGED
package/skills/manifest.json
CHANGED