@gravity-rail/sdk 0.1.0 → 0.2.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.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  IndexStatus
11
11
  } from "./chunk-KQJR26B5.js";
12
12
 
13
- // ../client/dist/chunk-F5J4UVSB.mjs
13
+ // ../client/dist/chunk-WFQXAPII.mjs
14
14
  import { parsePhoneNumberFromString } from "libphonenumber-js";
15
15
  function getCookieValue(name) {
16
16
  if (typeof document === "undefined") return void 0;
@@ -411,8 +411,7 @@ var AppsApi = class extends BaseApiClient {
411
411
  };
412
412
  var BuildersApi = class extends BaseApiClient {
413
413
  /**
414
- * List all builders
415
- * @param all - If true, return all (superuser access required)
414
+ * List all builders (optionally all with superuser access)
416
415
  */
417
416
  async listBuilders(all) {
418
417
  const params = new URLSearchParams();
@@ -423,7 +422,6 @@ var BuildersApi = class extends BaseApiClient {
423
422
  }
424
423
  /**
425
424
  * Get a specific builder by UUID
426
- * @param builderId - Builder UUID
427
425
  */
428
426
  async getBuilder(builderId) {
429
427
  return this.fetch(`builders/${builderId}`);
@@ -598,24 +596,29 @@ var OrgApi = class extends BaseApiClient {
598
596
  }
599
597
  };
600
598
  var SupervisorsApi = class extends BaseApiClient {
599
+ /** List all supervisors in a workspace. */
601
600
  async getSupervisors(wid) {
602
601
  return this.fetch(`w/${wid}/supervisors`);
603
602
  }
603
+ /** Get a single supervisor by ID. */
604
604
  async getSupervisor(wid, id) {
605
605
  return this.fetch(`w/${wid}/supervisors/${id}`);
606
606
  }
607
+ /** Create a new supervisor in a workspace. */
607
608
  async createSupervisor(wid, supervisor) {
608
609
  return this.fetch(`w/${wid}/supervisors`, {
609
610
  method: "POST",
610
611
  body: JSON.stringify(supervisor)
611
612
  });
612
613
  }
614
+ /** Update an existing supervisor with partial data. */
613
615
  async updateSupervisor(wid, id, supervisor) {
614
616
  return this.fetch(`w/${wid}/supervisors/${id}`, {
615
617
  method: "PUT",
616
618
  body: JSON.stringify(supervisor)
617
619
  });
618
620
  }
621
+ /** Delete a supervisor by ID. */
619
622
  async deleteSupervisor(wid, id) {
620
623
  return this.fetch(`w/${wid}/supervisors/${id}`, {
621
624
  method: "DELETE"
@@ -675,6 +678,7 @@ var AbilitiesApi = class extends BaseApiClient {
675
678
  }
676
679
  };
677
680
  var AccessGrantsApi = class extends BaseApiClient {
681
+ /** List access grants received by the current member. */
678
682
  async getMyReceivedGrants(wid, params) {
679
683
  const searchParams = new URLSearchParams();
680
684
  if (params?.status) searchParams.set("status", params.status);
@@ -685,6 +689,7 @@ var AccessGrantsApi = class extends BaseApiClient {
685
689
  `w/${wid}/access-grants/my/received${qs ? `?${qs}` : ""}`
686
690
  );
687
691
  }
692
+ /** List access grants given by the current member. */
688
693
  async getMyGivenGrants(wid, params) {
689
694
  const searchParams = new URLSearchParams();
690
695
  if (params?.status) searchParams.set("status", params.status);
@@ -695,39 +700,45 @@ var AccessGrantsApi = class extends BaseApiClient {
695
700
  `w/${wid}/access-grants/my/given${qs ? `?${qs}` : ""}`
696
701
  );
697
702
  }
703
+ /** Get a single access grant by UUID. */
698
704
  async getAccessGrant(wid, uuid) {
699
705
  return this.fetch(`w/${wid}/access-grants/${uuid}`);
700
706
  }
707
+ /** Create a new access grant for a resource. */
701
708
  async createAccessGrant(wid, data) {
702
709
  return this.fetch(`w/${wid}/access-grants`, {
703
710
  method: "POST",
704
711
  body: JSON.stringify(data)
705
712
  });
706
713
  }
714
+ /** Resolve a pending access grant by approving or denying it. */
707
715
  async resolveAccessGrant(wid, uuid, data) {
708
716
  return this.fetch(`w/${wid}/access-grants/${uuid}/resolve`, {
709
717
  method: "PUT",
710
718
  body: JSON.stringify(data)
711
719
  });
712
720
  }
721
+ /** Revoke a previously approved access grant. */
713
722
  async revokeAccessGrant(wid, uuid, data) {
714
723
  return this.fetch(`w/${wid}/access-grants/${uuid}/revoke`, {
715
724
  method: "PUT",
716
725
  body: JSON.stringify(data)
717
726
  });
718
727
  }
728
+ /** List all access grants with optional filtering by status, resource type, and resource ID. */
719
729
  async getAccessGrants(wid, params) {
720
730
  const searchParams = new URLSearchParams();
721
731
  if (params?.status) searchParams.set("status", params.status);
722
732
  if (params?.resourceType) searchParams.set("resource_type", params.resourceType);
723
733
  if (params?.resourceId) searchParams.set("resource_id", params.resourceId.toString());
724
734
  if (params?.page) searchParams.set("page", params.page.toString());
725
- if (params?.pageSize) searchParams.set("pageSize", params.pageSize.toString());
735
+ if (params?.pageSize) searchParams.set("page_size", params.pageSize.toString());
726
736
  const qs = searchParams.toString();
727
737
  return this.fetch(
728
738
  `w/${wid}/access-grants${qs ? `?${qs}` : ""}`
729
739
  );
730
740
  }
741
+ /** Get all access grants for a specific member. */
731
742
  async getMemberGrants(wid, memberId) {
732
743
  const resp = await this.fetch(
733
744
  `w/${wid}/access-grants/member/${memberId}`
@@ -1500,6 +1511,7 @@ var AdminApi = class extends BaseApiClient {
1500
1511
  }
1501
1512
  };
1502
1513
  var AgentsApi = class extends BaseApiClient {
1514
+ /** List agents in a workspace with optional pagination, sorting, and search. */
1503
1515
  async getAgents(wid, options = {}) {
1504
1516
  const params = new URLSearchParams();
1505
1517
  if (options.page) params.append("page", options.page.toString());
@@ -1513,32 +1525,38 @@ var AgentsApi = class extends BaseApiClient {
1513
1525
  `w/${wid}/agents${params.toString() ? `?${params.toString()}` : ""}`
1514
1526
  );
1515
1527
  }
1528
+ /** Get a single agent by ID. */
1516
1529
  async getAgent(wid, id) {
1517
1530
  return this.fetch(`w/${wid}/agents/${id}`);
1518
1531
  }
1532
+ /** Create a new agent in a workspace. */
1519
1533
  async createAgent(wid, agent) {
1520
1534
  return this.fetch(`w/${wid}/agents`, {
1521
1535
  method: "POST",
1522
1536
  body: JSON.stringify(agent)
1523
1537
  });
1524
1538
  }
1539
+ /** Update an existing agent. */
1525
1540
  async updateAgent(wid, id, agent) {
1526
1541
  return this.fetch(`w/${wid}/agents/${id}`, {
1527
1542
  method: "PUT",
1528
1543
  body: JSON.stringify(agent)
1529
1544
  });
1530
1545
  }
1546
+ /** Delete an agent by ID, optionally forcing deletion of agents with active references. */
1531
1547
  async deleteAgent(wid, id, force) {
1532
1548
  const params = force ? "?force=true" : "";
1533
1549
  return this.fetch(`w/${wid}/agents/${id}${params}`, {
1534
1550
  method: "DELETE"
1535
1551
  });
1536
1552
  }
1553
+ /** Archive an agent, hiding it from default listings. */
1537
1554
  async archiveAgent(wid, id) {
1538
1555
  return this.fetch(`w/${wid}/agents/${id}/archive`, {
1539
1556
  method: "POST"
1540
1557
  });
1541
1558
  }
1559
+ /** Restore an archived agent back to active status. */
1542
1560
  async unarchiveAgent(wid, id) {
1543
1561
  return this.fetch(`w/${wid}/agents/${id}/unarchive`, {
1544
1562
  method: "POST"
@@ -1621,30 +1639,36 @@ var AIModelsApi = class extends BaseApiClient {
1621
1639
  };
1622
1640
  var ApiKeysApi = class extends BaseApiClient {
1623
1641
  // Workspace-specific API key methods
1642
+ /** List all API keys for a workspace. */
1624
1643
  async getApiKeys(wid) {
1625
1644
  return this.fetch(`w/${wid}/api-keys`);
1626
1645
  }
1646
+ /** Create a new API key for a workspace. */
1627
1647
  async createApiKey(wid, apiKey) {
1628
1648
  return this.fetch(`w/${wid}/api-keys`, {
1629
1649
  method: "POST",
1630
1650
  body: JSON.stringify(apiKey)
1631
1651
  });
1632
1652
  }
1653
+ /** Revoke a workspace API key. */
1633
1654
  async revokeApiKey(wid, id) {
1634
1655
  return this.fetch(`w/${wid}/api-keys/${id}`, {
1635
1656
  method: "DELETE"
1636
1657
  });
1637
1658
  }
1638
1659
  // Global (account-level) API key methods
1660
+ /** List all account-level API keys. */
1639
1661
  async getGlobalApiKeys() {
1640
1662
  return this.fetch(`account/api-keys`);
1641
1663
  }
1664
+ /** Create a new account-level API key. */
1642
1665
  async createGlobalApiKey(apiKey) {
1643
1666
  return this.fetch(`account/api-keys`, {
1644
1667
  method: "POST",
1645
1668
  body: JSON.stringify(apiKey)
1646
1669
  });
1647
1670
  }
1671
+ /** Revoke an account-level API key. */
1648
1672
  async revokeGlobalApiKey(id) {
1649
1673
  return this.fetch(`account/api-keys/${id}`, {
1650
1674
  method: "DELETE"
@@ -1652,6 +1676,7 @@ var ApiKeysApi = class extends BaseApiClient {
1652
1676
  }
1653
1677
  };
1654
1678
  var AssignmentsApi = class extends BaseApiClient {
1679
+ /** List assignments with optional filtering, pagination, and sorting. */
1655
1680
  async getAssignments(wid, options = {}) {
1656
1681
  const params = new URLSearchParams();
1657
1682
  if (options.page) params.append("page", options.page.toString());
@@ -1666,56 +1691,68 @@ var AssignmentsApi = class extends BaseApiClient {
1666
1691
  `w/${wid}/assignments${params.toString() ? `?${params.toString()}` : ""}`
1667
1692
  );
1668
1693
  }
1694
+ /** Get a single assignment by ID. */
1669
1695
  async getAssignment(wid, id) {
1670
1696
  return this.fetch(`w/${wid}/assignments/${id}`);
1671
1697
  }
1698
+ /** Get all chat messages for an assignment. */
1672
1699
  async getAssignmentMessages(wid, id) {
1673
1700
  return this.fetch(`w/${wid}/assignments/${id}/messages`);
1674
1701
  }
1702
+ /** Update an assignment by ID. */
1675
1703
  async updateAssignment(wid, id, assignment) {
1676
1704
  return this.fetch(`w/${wid}/assignments/${id}`, {
1677
1705
  method: "PUT",
1678
1706
  body: JSON.stringify(assignment)
1679
1707
  });
1680
1708
  }
1709
+ /** Delete an assignment by ID. */
1681
1710
  async deleteAssignment(wid, id) {
1682
1711
  return this.fetch(`w/${wid}/assignments/${id}`, {
1683
1712
  method: "DELETE"
1684
1713
  });
1685
1714
  }
1715
+ /** Get a specific task within an assignment. */
1686
1716
  async getAssignmentTask(wid, id, assignmentTaskId) {
1687
1717
  return this.fetch(`w/${wid}/assignments/${id}/tasks/${assignmentTaskId}`);
1688
1718
  }
1719
+ /** Set the current active task for an assignment. */
1689
1720
  async selectCurrentAssignmentTask(wid, id, assignmentTaskId) {
1690
1721
  return this.fetch(`w/${wid}/assignments/${id}/tasks/${assignmentTaskId}/select`, {
1691
1722
  method: "PUT"
1692
1723
  });
1693
1724
  }
1725
+ /** Create a new assignment for a member. */
1694
1726
  async createAssignment(wid, data) {
1695
1727
  return this.fetch(`w/${wid}/assignments`, {
1696
1728
  method: "POST",
1697
1729
  body: JSON.stringify(data)
1698
1730
  });
1699
1731
  }
1732
+ /** Get the current task detail for an assignment from the operator perspective. */
1700
1733
  async getAssignmentTaskDetail(wid, assignmentId) {
1701
1734
  return this.fetch(
1702
1735
  `w/${wid}/assignments/${assignmentId}/current-task-detail`
1703
1736
  );
1704
1737
  }
1738
+ /** Get the CEL expression evaluation context for an assignment. */
1705
1739
  async getAssignmentCelContext(wid, assignmentId) {
1706
1740
  return this.fetch(
1707
1741
  `w/${wid}/assignments/${assignmentId}/cel-context`
1708
1742
  );
1709
1743
  }
1744
+ /** Cancel an active assignment with an optional reason. */
1710
1745
  async cancelAssignment(wid, id, data) {
1711
1746
  return this.fetch(`w/${wid}/assignments/${id}/cancel`, {
1712
1747
  method: "POST",
1713
1748
  body: JSON.stringify(data ?? {})
1714
1749
  });
1715
1750
  }
1751
+ /** List available tools for an assignment. */
1716
1752
  async getAssignmentTools(wid, assignmentId) {
1717
1753
  return this.fetch(`w/${wid}/assignments/${assignmentId}/tools`);
1718
1754
  }
1755
+ /** Execute a tool within an assignment context. */
1719
1756
  async executeAssignmentTool(wid, assignmentId, toolName, parameters = {}) {
1720
1757
  return this.fetch(`w/${wid}/assignments/${assignmentId}/execute-tool`, {
1721
1758
  method: "POST",
@@ -1724,6 +1761,7 @@ var AssignmentsApi = class extends BaseApiClient {
1724
1761
  }
1725
1762
  };
1726
1763
  var AssistantsApi = class extends BaseApiClient {
1764
+ /** List assistants in a workspace with optional pagination, sorting, and search. */
1727
1765
  async getAssistants(wid, options = {}) {
1728
1766
  const params = new URLSearchParams();
1729
1767
  if (options.page) params.append("page", options.page.toString());
@@ -1738,9 +1776,11 @@ var AssistantsApi = class extends BaseApiClient {
1738
1776
  `w/${wid}/assistants${params.toString() ? `?${params.toString()}` : ""}`
1739
1777
  );
1740
1778
  }
1779
+ /** Get a single assistant by ID. */
1741
1780
  async getAssistant(wid, id) {
1742
1781
  return this.fetch(`w/${wid}/assistants/${id}`);
1743
1782
  }
1783
+ /** Create a new assistant in a workspace. */
1744
1784
  async createAssistant(wid, assistant) {
1745
1785
  const assistantData = { ...assistant };
1746
1786
  return this.fetch(`w/${wid}/assistants`, {
@@ -1748,17 +1788,20 @@ var AssistantsApi = class extends BaseApiClient {
1748
1788
  body: JSON.stringify(assistantData)
1749
1789
  });
1750
1790
  }
1791
+ /** Update an existing assistant with partial data. */
1751
1792
  async updateAssistant(wid, id, assistant) {
1752
1793
  return this.fetch(`w/${wid}/assistants/${id}`, {
1753
1794
  method: "PUT",
1754
1795
  body: JSON.stringify(assistant)
1755
1796
  });
1756
1797
  }
1798
+ /** Delete an assistant by ID. */
1757
1799
  async deleteAssistant(wid, id) {
1758
1800
  return this.fetch(`w/${wid}/assistants/${id}`, {
1759
1801
  method: "DELETE"
1760
1802
  });
1761
1803
  }
1804
+ /** Generate a text-to-speech audio preview for a given voice model. */
1762
1805
  async previewTTS(wid, request) {
1763
1806
  const response = await this.fetchRaw(`w/${wid}/assistants/tts-preview`, {
1764
1807
  method: "POST",
@@ -1769,6 +1812,17 @@ var AssistantsApi = class extends BaseApiClient {
1769
1812
  });
1770
1813
  return response.arrayBuffer();
1771
1814
  }
1815
+ /** Generate a thinking sound audio preview. */
1816
+ async previewThinkingSound(wid, request) {
1817
+ const response = await this.fetchRaw(`w/${wid}/assistants/thinking-sound-preview`, {
1818
+ method: "POST",
1819
+ headers: {
1820
+ "Content-Type": "application/json"
1821
+ },
1822
+ body: JSON.stringify(request)
1823
+ });
1824
+ return response.arrayBuffer();
1825
+ }
1772
1826
  };
1773
1827
  function sanitizePhoneForBackend(phoneNumber) {
1774
1828
  try {
@@ -1784,15 +1838,18 @@ function sanitizePhoneForBackend(phoneNumber) {
1784
1838
  return phoneNumber;
1785
1839
  }
1786
1840
  var AuthApi = class extends BaseApiClient {
1841
+ /** Get the authenticated user's account. */
1787
1842
  async getUserAccount() {
1788
1843
  return this.fetch("account");
1789
1844
  }
1845
+ /** Update the authenticated user's account information. */
1790
1846
  async updateUserAccount(info) {
1791
1847
  return this.fetch("account", {
1792
1848
  method: "POST",
1793
1849
  body: JSON.stringify(info)
1794
1850
  });
1795
1851
  }
1852
+ /** Initiate SMS login by sending a verification code to the given phone number. */
1796
1853
  async login(phoneNumber, wid, organizationUuid) {
1797
1854
  const params = new URLSearchParams();
1798
1855
  if (wid) params.append("wid", wid);
@@ -1803,6 +1860,7 @@ var AuthApi = class extends BaseApiClient {
1803
1860
  body: JSON.stringify(body)
1804
1861
  });
1805
1862
  }
1863
+ /** Resend the SMS verification code to the given phone number. */
1806
1864
  async resendCode(phoneNumber, organizationUuid) {
1807
1865
  const body = { phoneNumber: sanitizePhoneForBackend(phoneNumber) };
1808
1866
  if (organizationUuid) body.organizationUuid = organizationUuid;
@@ -1811,6 +1869,7 @@ var AuthApi = class extends BaseApiClient {
1811
1869
  body: JSON.stringify(body)
1812
1870
  });
1813
1871
  }
1872
+ /** Verify an SMS code and complete authentication, handling 2FA if required. */
1814
1873
  async verifyCodeWith2FA(phoneNumber, code, organizationUuid) {
1815
1874
  const verifyResponse = await this.fetch("auth/verify-with-2fa", {
1816
1875
  method: "POST",
@@ -1838,33 +1897,39 @@ var AuthApi = class extends BaseApiClient {
1838
1897
  }
1839
1898
  return verifyResponse;
1840
1899
  }
1900
+ /** Log in with email and password credentials. */
1841
1901
  async emailPasswordLogin(email, password, organizationUuid) {
1842
1902
  return await this.fetch(`auth/email-password-login`, {
1843
1903
  method: "POST",
1844
1904
  body: JSON.stringify({ email, password, organizationUuid })
1845
1905
  });
1846
1906
  }
1907
+ /** Sign up a new account with email and password. */
1847
1908
  async emailPasswordSignup(email, password, name, organizationUuid) {
1848
1909
  return await this.fetch(`auth/email-password-signup`, {
1849
1910
  method: "POST",
1850
1911
  body: JSON.stringify({ email, password, name, organizationUuid })
1851
1912
  });
1852
1913
  }
1914
+ /** Change the current account password by providing the existing password. */
1853
1915
  async changePassword(currentPassword, newPassword) {
1854
1916
  return await this.fetch(`auth/change-password`, {
1855
1917
  method: "POST",
1856
1918
  body: JSON.stringify({ currentPassword, newPassword })
1857
1919
  });
1858
1920
  }
1921
+ /** Set a password for an account that does not yet have one. */
1859
1922
  async setPassword(newPassword) {
1860
1923
  return await this.fetch(`auth/set-password`, {
1861
1924
  method: "POST",
1862
1925
  body: JSON.stringify({ newPassword })
1863
1926
  });
1864
1927
  }
1928
+ /** Check whether the current account has a password set. */
1865
1929
  async getPasswordStatus() {
1866
1930
  return await this.fetch(`auth/password-status`);
1867
1931
  }
1932
+ /** Log out the current session by clearing auth cookies. */
1868
1933
  async logout() {
1869
1934
  const response = await fetch(`/api/auth/logout`, {
1870
1935
  method: "POST",
@@ -1875,22 +1940,24 @@ var AuthApi = class extends BaseApiClient {
1875
1940
  }
1876
1941
  return await response.json();
1877
1942
  }
1878
- // request a token from auth/cross-domain-token
1943
+ /** Request a cross-domain authentication token for single sign-on across domains. */
1879
1944
  async requestCrossDomainToken() {
1880
1945
  return this.fetch("auth/cross-domain-token", {
1881
1946
  method: "POST"
1882
1947
  });
1883
1948
  }
1949
+ /** Exchange a cross-domain token for an authenticated session token. */
1884
1950
  async exchangeToken(token) {
1885
1951
  return this.fetch("auth/exchange-token", {
1886
1952
  method: "POST",
1887
1953
  body: JSON.stringify({ token })
1888
1954
  });
1889
1955
  }
1956
+ /** Get the organization and workspace mapping for a custom domain. */
1890
1957
  async getDomainMapping(customDomain) {
1891
1958
  return this.fetch(`s/mapping/${customDomain}`);
1892
1959
  }
1893
- // Signup API (used by eval scripts)
1960
+ /** Create a new signup with member and data records for a workspace. */
1894
1961
  async createSignup(wid, data) {
1895
1962
  return this.fetch(`w/${wid}/create-signup`, {
1896
1963
  method: "POST",
@@ -1898,12 +1965,14 @@ var AuthApi = class extends BaseApiClient {
1898
1965
  });
1899
1966
  }
1900
1967
  // ===== MAGIC LINK AUTHENTICATION METHODS =====
1968
+ /** Request a magic link to be sent to the given email address for passwordless login. */
1901
1969
  async requestMagicLink(email, organizationUuid, redirectUrl) {
1902
1970
  return await this.fetch(`auth/request-magic-link`, {
1903
1971
  method: "POST",
1904
1972
  body: JSON.stringify({ email, organizationUuid, redirectUrl })
1905
1973
  });
1906
1974
  }
1975
+ /** Validate a magic link token and optional OTP to complete authentication. */
1907
1976
  async validateMagicLink(token, otp) {
1908
1977
  const body = { token };
1909
1978
  if (otp) {
@@ -1915,12 +1984,14 @@ var AuthApi = class extends BaseApiClient {
1915
1984
  });
1916
1985
  }
1917
1986
  // ===== EMAIL VERIFICATION METHODS =====
1987
+ /** Send a verification code to the given email address for login. */
1918
1988
  async sendEmailVerification(email, organizationUuid) {
1919
1989
  return await this.fetch(`auth/send-email-verification`, {
1920
1990
  method: "POST",
1921
1991
  body: JSON.stringify({ email, organizationUuid })
1922
1992
  });
1923
1993
  }
1994
+ /** Verify an email code and complete authentication, handling 2FA if required. */
1924
1995
  async verifyEmail(email, code, organizationUuid) {
1925
1996
  const verifyResponse = await this.fetch(`auth/verify-email`, {
1926
1997
  method: "POST",
@@ -1943,44 +2014,52 @@ var AuthApi = class extends BaseApiClient {
1943
2014
  return verifyResponse;
1944
2015
  }
1945
2016
  // ===== TWO-FACTOR AUTHENTICATION METHODS =====
2017
+ /** Get the current two-factor authentication status and configured methods. */
1946
2018
  async getTwoFactorStatus() {
1947
2019
  return this.fetch("auth/2fa/status");
1948
2020
  }
2021
+ /** Initiate TOTP two-factor setup and receive the secret and QR code URI. */
1949
2022
  async setupTOTP(data) {
1950
2023
  return this.fetch("auth/2fa/totp/setup", {
1951
2024
  method: "POST",
1952
2025
  body: JSON.stringify(data)
1953
2026
  });
1954
2027
  }
2028
+ /** Verify a TOTP code to complete two-factor setup. */
1955
2029
  async verifyTOTPSetup(data) {
1956
2030
  return this.fetch("auth/2fa/totp/verify", {
1957
2031
  method: "POST",
1958
2032
  body: JSON.stringify(data)
1959
2033
  });
1960
2034
  }
2035
+ /** Initiate WebAuthn (passkey/security key) two-factor setup. */
1961
2036
  async setupWebAuthn(data) {
1962
2037
  return this.fetch("auth/2fa/webauthn/setup", {
1963
2038
  method: "POST",
1964
2039
  body: JSON.stringify(data)
1965
2040
  });
1966
2041
  }
2042
+ /** Verify a WebAuthn assertion to complete two-factor setup. */
1967
2043
  async verifyWebAuthnSetup(data) {
1968
2044
  return this.fetch("auth/2fa/webauthn/verify", {
1969
2045
  method: "POST",
1970
2046
  body: JSON.stringify(data)
1971
2047
  });
1972
2048
  }
2049
+ /** Generate new two-factor recovery codes, invalidating any existing ones. */
1973
2050
  async generateRecoveryCodes(data = {}) {
1974
2051
  return this.fetch("auth/2fa/recovery-codes/generate", {
1975
2052
  method: "POST",
1976
2053
  body: JSON.stringify(data)
1977
2054
  });
1978
2055
  }
2056
+ /** Disable a specific two-factor authentication method. */
1979
2057
  async disableTwoFactorMethod(methodId) {
1980
2058
  return this.fetch(`auth/2fa/methods/${methodId}`, {
1981
2059
  method: "DELETE"
1982
2060
  });
1983
2061
  }
2062
+ /** Update settings for a two-factor authentication method. */
1984
2063
  async updateTwoFactorMethod(data) {
1985
2064
  return this.fetch(`auth/2fa/methods/${data.methodId}`, {
1986
2065
  method: "PUT",
@@ -1988,6 +2067,7 @@ var AuthApi = class extends BaseApiClient {
1988
2067
  });
1989
2068
  }
1990
2069
  // ===== TWO-FACTOR AUTHENTICATION LOGIN METHODS =====
2070
+ /** Verify a TOTP code during login to complete two-factor authentication. */
1991
2071
  async verifyTOTPAuth(tempToken, code) {
1992
2072
  return this.fetch("auth/2fa/auth/totp", {
1993
2073
  method: "POST",
@@ -1997,6 +2077,7 @@ var AuthApi = class extends BaseApiClient {
1997
2077
  })
1998
2078
  });
1999
2079
  }
2080
+ /** Verify a recovery code during login to complete two-factor authentication. */
2000
2081
  async verifyRecoveryCodeAuth(tempToken, code) {
2001
2082
  return this.fetch("auth/2fa/auth/recovery", {
2002
2083
  method: "POST",
@@ -2006,6 +2087,7 @@ var AuthApi = class extends BaseApiClient {
2006
2087
  })
2007
2088
  });
2008
2089
  }
2090
+ /** Get WebAuthn credential request options for two-factor login verification. */
2009
2091
  async getWebAuthnAuthOptions(tempToken) {
2010
2092
  return this.fetch("auth/2fa/webauthn/options", {
2011
2093
  method: "POST",
@@ -2014,6 +2096,7 @@ var AuthApi = class extends BaseApiClient {
2014
2096
  })
2015
2097
  });
2016
2098
  }
2099
+ /** Verify a WebAuthn assertion during login to complete two-factor authentication. */
2017
2100
  async verifyWebAuthnAuth(tempToken, assertionResponse) {
2018
2101
  return this.fetch("auth/2fa/webauthn", {
2019
2102
  method: "POST",
@@ -2024,6 +2107,7 @@ var AuthApi = class extends BaseApiClient {
2024
2107
  });
2025
2108
  }
2026
2109
  // ===== ORGANIZATION MEMBERSHIP METHODS =====
2110
+ /** List all organizations the current account belongs to. */
2027
2111
  async getMyOrganizations() {
2028
2112
  return this.fetch("o/mine");
2029
2113
  }
@@ -2089,7 +2173,7 @@ var AuthApi = class extends BaseApiClient {
2089
2173
  }
2090
2174
  };
2091
2175
  var CalendarsApi = class extends BaseApiClient {
2092
- // Calendar CRUD
2176
+ /** List calendars in a workspace with optional pagination. */
2093
2177
  async getCalendars(wid, params) {
2094
2178
  const queryParams = new URLSearchParams();
2095
2179
  if (params?.page) queryParams.append("page", params.page.toString());
@@ -2100,6 +2184,7 @@ var CalendarsApi = class extends BaseApiClient {
2100
2184
  `w/${wid}/calendars${queryString ? `?${queryString}` : ""}`
2101
2185
  );
2102
2186
  }
2187
+ /** Get a single calendar by ID, optionally including its schedules. */
2103
2188
  async getCalendar(wid, id, includeSchedules) {
2104
2189
  const params = new URLSearchParams();
2105
2190
  if (includeSchedules) params.append("include_schedules", "true");
@@ -2107,33 +2192,38 @@ var CalendarsApi = class extends BaseApiClient {
2107
2192
  `w/${wid}/calendars/${id}${params.toString() ? `?${params.toString()}` : ""}`
2108
2193
  );
2109
2194
  }
2195
+ /** Create a new calendar in the workspace. */
2110
2196
  async createCalendar(wid, calendar) {
2111
2197
  return this.fetch(`w/${wid}/calendars`, {
2112
2198
  method: "POST",
2113
2199
  body: JSON.stringify(calendar)
2114
2200
  });
2115
2201
  }
2202
+ /** Update a calendar's configuration. */
2116
2203
  async updateCalendar(wid, id, calendar) {
2117
2204
  return this.fetch(`w/${wid}/calendars/${id}`, {
2118
2205
  method: "PUT",
2119
2206
  body: JSON.stringify(calendar)
2120
2207
  });
2121
2208
  }
2209
+ /** Delete a calendar by ID. */
2122
2210
  async deleteCalendar(wid, id) {
2123
2211
  return this.fetch(`w/${wid}/calendars/${id}`, {
2124
2212
  method: "DELETE"
2125
2213
  });
2126
2214
  }
2127
- // Calendar Schedules
2215
+ /** List all schedules for a calendar. */
2128
2216
  async getCalendarSchedules(wid, calendarId) {
2129
2217
  return this.fetch(`w/${wid}/calendars/${calendarId}/schedules`);
2130
2218
  }
2219
+ /** Create a new schedule for a calendar. */
2131
2220
  async createCalendarSchedule(wid, calendarId, schedule) {
2132
2221
  return this.fetch(`w/${wid}/calendars/${calendarId}/schedules`, {
2133
2222
  method: "POST",
2134
2223
  body: JSON.stringify(schedule)
2135
2224
  });
2136
2225
  }
2226
+ /** Update an existing calendar schedule. */
2137
2227
  async updateCalendarSchedule(wid, calendarId, scheduleId, schedule) {
2138
2228
  return this.fetch(
2139
2229
  `w/${wid}/calendars/${calendarId}/schedules/${scheduleId}`,
@@ -2143,18 +2233,20 @@ var CalendarsApi = class extends BaseApiClient {
2143
2233
  }
2144
2234
  );
2145
2235
  }
2236
+ /** Delete a calendar schedule. */
2146
2237
  async deleteCalendarSchedule(wid, calendarId, scheduleId) {
2147
2238
  return this.fetch(`w/${wid}/calendars/${calendarId}/schedules/${scheduleId}`, {
2148
2239
  method: "DELETE"
2149
2240
  });
2150
2241
  }
2151
- // Availability
2242
+ /** Check availability for a time range on a calendar. */
2152
2243
  async checkAvailability(wid, calendarId, check) {
2153
2244
  return this.fetch(`w/${wid}/calendars/${calendarId}/availability`, {
2154
2245
  method: "POST",
2155
2246
  body: JSON.stringify(check)
2156
2247
  });
2157
2248
  }
2249
+ /** Get available booking slots for a calendar within a date range. */
2158
2250
  async getAvailableSlots(wid, calendarId, request) {
2159
2251
  return this.fetch(
2160
2252
  `w/${wid}/calendars/${calendarId}/available-slots`,
@@ -2164,7 +2256,7 @@ var CalendarsApi = class extends BaseApiClient {
2164
2256
  }
2165
2257
  );
2166
2258
  }
2167
- // Calendar Events
2259
+ /** List calendar events with optional filtering by date range, status, and member. */
2168
2260
  async getCalendarEvents(wid, options = {}) {
2169
2261
  const params = new URLSearchParams();
2170
2262
  if (options.calendarId) params.append("calendarId", options.calendarId.toString());
@@ -2178,70 +2270,80 @@ var CalendarsApi = class extends BaseApiClient {
2178
2270
  `w/${wid}/calendar-events${params.toString() ? `?${params.toString()}` : ""}`
2179
2271
  );
2180
2272
  }
2273
+ /** Get a single calendar event by ID. */
2181
2274
  async getCalendarEvent(wid, eventId) {
2182
2275
  return this.fetch(`w/${wid}/calendar-events/${eventId}`);
2183
2276
  }
2277
+ /** Create a new calendar event. */
2184
2278
  async createCalendarEvent(wid, event) {
2185
2279
  return this.fetch(`w/${wid}/calendar-events`, {
2186
2280
  method: "POST",
2187
2281
  body: JSON.stringify(event)
2188
2282
  });
2189
2283
  }
2284
+ /** Update an existing calendar event. */
2190
2285
  async updateCalendarEvent(wid, eventId, event) {
2191
2286
  return this.fetch(`w/${wid}/calendar-events/${eventId}`, {
2192
2287
  method: "PUT",
2193
2288
  body: JSON.stringify(event)
2194
2289
  });
2195
2290
  }
2291
+ /** Cancel a calendar event with an optional reason. */
2196
2292
  async cancelCalendarEvent(wid, eventId, reason) {
2197
2293
  return this.fetch(`w/${wid}/calendar-events/${eventId}/cancel`, {
2198
2294
  method: "POST",
2199
2295
  body: JSON.stringify({ cancellationReason: reason })
2200
2296
  });
2201
2297
  }
2298
+ /** Delete a calendar event by ID. */
2202
2299
  async deleteCalendarEvent(wid, eventId) {
2203
2300
  return this.fetch(`w/${wid}/calendar-events/${eventId}`, {
2204
2301
  method: "DELETE"
2205
2302
  });
2206
2303
  }
2207
- // Event attendees
2304
+ /** Update an attendee's details on a calendar event. */
2208
2305
  async updateEventAttendee(wid, eventId, attendeeId, update) {
2209
2306
  return this.fetch(`w/${wid}/calendar-events/${eventId}/attendees/${attendeeId}`, {
2210
2307
  method: "PUT",
2211
2308
  body: JSON.stringify(update)
2212
2309
  });
2213
2310
  }
2214
- // Event Types
2311
+ /** List all calendar event types in the workspace. */
2215
2312
  async getEventTypes(wid) {
2216
2313
  return this.fetch(`w/${wid}/calendar-event-types`);
2217
2314
  }
2315
+ /** Get a single calendar event type by ID. */
2218
2316
  async getEventType(wid, id) {
2219
2317
  return this.fetch(`w/${wid}/calendar-event-types/${id}`);
2220
2318
  }
2319
+ /** Create a new calendar event type. */
2221
2320
  async createEventType(wid, eventType) {
2222
2321
  return this.fetch(`w/${wid}/calendar-event-types`, {
2223
2322
  method: "POST",
2224
2323
  body: JSON.stringify(eventType)
2225
2324
  });
2226
2325
  }
2326
+ /** Update an existing calendar event type. */
2227
2327
  async updateEventType(wid, id, eventType) {
2228
2328
  return this.fetch(`w/${wid}/calendar-event-types/${id}`, {
2229
2329
  method: "PUT",
2230
2330
  body: JSON.stringify(eventType)
2231
2331
  });
2232
2332
  }
2333
+ /** Delete a calendar event type by ID. */
2233
2334
  async deleteEventType(wid, id) {
2234
2335
  return this.fetch(`w/${wid}/calendar-event-types/${id}`, {
2235
2336
  method: "DELETE"
2236
2337
  });
2237
2338
  }
2238
- // iCal Feed Management
2339
+ /** Generate or regenerate an iCal feed token for a calendar. */
2239
2340
  async generateICalToken(wid, calendarId, regenerate = false) {
2240
2341
  return this.fetch(`w/${wid}/calendars/${calendarId}/ical-token`, {
2241
2342
  method: "POST",
2242
2343
  body: JSON.stringify({ regenerate })
2243
2344
  });
2244
2345
  }
2346
+ /** Revoke the iCal feed token for a calendar, disabling external feed access. */
2245
2347
  async revokeICalToken(wid, calendarId) {
2246
2348
  return this.fetch(
2247
2349
  `w/${wid}/calendars/${calendarId}/ical-token`,
@@ -2250,29 +2352,34 @@ var CalendarsApi = class extends BaseApiClient {
2250
2352
  }
2251
2353
  );
2252
2354
  }
2355
+ /** Get the iCal feed URL for a calendar. */
2253
2356
  async getICalFeedUrl(wid, calendarId) {
2254
2357
  return this.fetch(`w/${wid}/calendars/${calendarId}/ical-url`);
2255
2358
  }
2256
- // Google Calendar Integration
2359
+ /** List Google Calendars available for linking. */
2257
2360
  async listGoogleCalendars(wid) {
2258
2361
  return this.fetch(`w/${wid}/calendars/google/list`);
2259
2362
  }
2363
+ /** Get the Google Calendar integration status for the workspace. */
2260
2364
  async getGoogleCalendarStatus(wid) {
2261
2365
  return this.fetch(
2262
2366
  `w/${wid}/calendars/google/status`
2263
2367
  );
2264
2368
  }
2369
+ /** Link a calendar to a Google Calendar for two-way sync. */
2265
2370
  async linkCalendarToGoogle(wid, calendarId, request) {
2266
2371
  return this.fetch(`w/${wid}/calendars/${calendarId}/google/link`, {
2267
2372
  method: "POST",
2268
2373
  body: JSON.stringify(request)
2269
2374
  });
2270
2375
  }
2376
+ /** Unlink a calendar from its connected Google Calendar. */
2271
2377
  async unlinkCalendarFromGoogle(wid, calendarId) {
2272
2378
  return this.fetch(`w/${wid}/calendars/${calendarId}/google/link`, {
2273
2379
  method: "DELETE"
2274
2380
  });
2275
2381
  }
2382
+ /** Trigger a manual sync between a calendar and its linked Google Calendar. */
2276
2383
  async syncCalendarWithGoogle(wid, calendarId) {
2277
2384
  return this.fetch(`w/${wid}/calendars/${calendarId}/google/sync`, {
2278
2385
  method: "POST"
@@ -2280,15 +2387,18 @@ var CalendarsApi = class extends BaseApiClient {
2280
2387
  }
2281
2388
  };
2282
2389
  var CallsApi = class extends BaseApiClient {
2390
+ /** Initiate a new outbound call. */
2283
2391
  async initiateCall(wid, request) {
2284
2392
  return this.fetch(`w/${wid}/call`, {
2285
2393
  method: "POST",
2286
2394
  body: JSON.stringify(request)
2287
2395
  });
2288
2396
  }
2397
+ /** Get a voice authentication token for real-time audio. */
2289
2398
  async getVoiceToken(wid) {
2290
2399
  return this.fetch(`w/${wid}/voice/token`);
2291
2400
  }
2401
+ /** Get message timing data for a chat recording. */
2292
2402
  async getMessageTiming(wid, chatId) {
2293
2403
  return this.fetch(`w/${wid}/recordings/chat/${chatId}/message-timing`);
2294
2404
  }
@@ -2326,6 +2436,7 @@ var ChatsApi = class extends BaseApiClient {
2326
2436
  }
2327
2437
  return params;
2328
2438
  }
2439
+ /** List chats with optional filtering, sorting, and pagination. */
2329
2440
  async getChats(wid, options = {}) {
2330
2441
  const params = this.buildChatsQueryParams(options, true);
2331
2442
  const queryString = params.toString();
@@ -2333,6 +2444,7 @@ var ChatsApi = class extends BaseApiClient {
2333
2444
  `w/${wid}/chats${queryString ? `?${queryString}` : ""}`
2334
2445
  );
2335
2446
  }
2447
+ /** Export multiple chats as a downloadable blob. */
2336
2448
  async exportChats(wid, options = {}) {
2337
2449
  const params = this.buildChatsQueryParams(options, false);
2338
2450
  const queryString = params.toString();
@@ -2341,27 +2453,34 @@ var ChatsApi = class extends BaseApiClient {
2341
2453
  );
2342
2454
  return response.blob();
2343
2455
  }
2456
+ /** Export a single chat in the specified format as a downloadable blob. */
2344
2457
  async exportChat(wid, chatId, format = "jsonl") {
2345
2458
  const response = await this.fetchRaw(`w/${wid}/chats/${chatId}/export?format=${format}`);
2346
2459
  return response.blob();
2347
2460
  }
2461
+ /** Get a single chat by ID. */
2348
2462
  async getChat(wid, id) {
2349
2463
  return this.fetch(`w/${wid}/chats/${id}`);
2350
2464
  }
2465
+ /** Get token usage statistics for a chat. */
2351
2466
  async getChatTokenUsage(wid, chatId) {
2352
2467
  return this.fetch(`w/${wid}/chats/${chatId}/token-usage`);
2353
2468
  }
2469
+ /** Get todo items extracted from a chat. */
2354
2470
  async getChatTodos(wid, chatId) {
2355
2471
  return this.fetch(`w/${wid}/chats/${chatId}/todos`);
2356
2472
  }
2473
+ /** Get loaded and revealed skills for a chat. */
2357
2474
  async getChatSkills(wid, chatId) {
2358
2475
  return this.fetch(
2359
2476
  `w/${wid}/chats/${chatId}/skills`
2360
2477
  );
2361
2478
  }
2479
+ /** List chat IDs that need a response. */
2362
2480
  async getChatsNeedsResponse(wid) {
2363
2481
  return this.fetch(`w/${wid}/chats/needs-response`);
2364
2482
  }
2483
+ /** Get daily chat creation statistics with optional filtering. */
2365
2484
  async getChatsDailyCreationStats(wid, options) {
2366
2485
  const params = new URLSearchParams();
2367
2486
  if (options?.archived !== void 0) params.append("archived", options.archived.toString());
@@ -2371,40 +2490,47 @@ var ChatsApi = class extends BaseApiClient {
2371
2490
  `w/${wid}/chats/stats/daily-creation${queryString ? `?${queryString}` : ""}`
2372
2491
  );
2373
2492
  }
2493
+ /** Archive a chat. */
2374
2494
  async archiveChat(wid, id) {
2375
2495
  return this.fetch(`w/${wid}/chats/${id}/archive`, {
2376
2496
  method: "PUT"
2377
2497
  });
2378
2498
  }
2499
+ /** Unarchive a chat. */
2379
2500
  async unarchiveChat(wid, id) {
2380
2501
  return this.fetch(`w/${wid}/chats/${id}/unarchive`, {
2381
2502
  method: "PUT"
2382
2503
  });
2383
2504
  }
2505
+ /** Create a new chat. */
2384
2506
  async createChat(wid, chat) {
2385
2507
  return this.fetch(`w/${wid}/chats`, {
2386
2508
  method: "POST",
2387
2509
  body: JSON.stringify(chat)
2388
2510
  });
2389
2511
  }
2512
+ /** Delete a chat, optionally providing a reason. */
2390
2513
  async deleteChat(wid, id, reason) {
2391
2514
  return this.fetch(`w/${wid}/chats/${id}`, {
2392
2515
  method: "DELETE",
2393
2516
  body: reason ? JSON.stringify({ reason }) : void 0
2394
2517
  });
2395
2518
  }
2519
+ /** Update a chat's properties. */
2396
2520
  async updateChat(wid, id, chat) {
2397
2521
  return this.fetch(`w/${wid}/chats/${id}`, {
2398
2522
  method: "PUT",
2399
2523
  body: JSON.stringify(chat)
2400
2524
  });
2401
2525
  }
2526
+ /** Update the mute status of a chat. */
2402
2527
  async updateChatMute(wid, id, muted) {
2403
2528
  return this.fetch(`w/${wid}/chats/${id}/mute`, {
2404
2529
  method: "PUT",
2405
2530
  body: JSON.stringify({ muted })
2406
2531
  });
2407
2532
  }
2533
+ /** Update the needs-response flag on a chat. */
2408
2534
  async updateChatNeedsResponse(wid, id, needsResponse) {
2409
2535
  return this.fetch(
2410
2536
  `w/${wid}/chats/${id}/needs-response`,
@@ -2414,6 +2540,7 @@ var ChatsApi = class extends BaseApiClient {
2414
2540
  }
2415
2541
  );
2416
2542
  }
2543
+ /** Generate an AI summary for a chat, optionally updating its labels. */
2417
2544
  async summarizeChat(wid, id, updateLabels) {
2418
2545
  const params = new URLSearchParams();
2419
2546
  if (updateLabels !== void 0) {
@@ -2426,6 +2553,7 @@ var ChatsApi = class extends BaseApiClient {
2426
2553
  }
2427
2554
  );
2428
2555
  }
2556
+ /** List messages in a chat with optional pagination. */
2429
2557
  async getChatMessages(wid, id, limit, offset) {
2430
2558
  const params = new URLSearchParams();
2431
2559
  if (limit) params.append("limit", limit.toString());
@@ -2434,6 +2562,7 @@ var ChatsApi = class extends BaseApiClient {
2434
2562
  `w/${wid}/chats/${id}/messages${params.toString() ? `?${params.toString()}` : ""}`
2435
2563
  );
2436
2564
  }
2565
+ /** List messages associated with a specific tool call in a chat. */
2437
2566
  async getChatToolCallMessages(wid, chatId, callId, limit = 100, offset = 0) {
2438
2567
  const params = new URLSearchParams();
2439
2568
  params.append("limit", limit.toString());
@@ -2442,15 +2571,18 @@ var ChatsApi = class extends BaseApiClient {
2442
2571
  `w/${wid}/chats/${chatId}/tool-calls/${callId}/messages?${params.toString()}`
2443
2572
  );
2444
2573
  }
2574
+ /** Get the tools available in a chat. */
2445
2575
  async getChatTools(wid, chatId) {
2446
2576
  return this.fetch(`w/${wid}/chats/${chatId}/tools`);
2447
2577
  }
2578
+ /** Initiate an outbound phone call from a chat. */
2448
2579
  async initiateOutboundCall(wid, chatId, phoneNumberId) {
2449
2580
  return this.fetch(`w/${wid}/chats/${chatId}/outbound-call`, {
2450
2581
  method: "POST",
2451
2582
  body: JSON.stringify({ phoneNumberId, chatId })
2452
2583
  });
2453
2584
  }
2585
+ /** Send a message as the assistant in a chat, optionally including tool calls. */
2454
2586
  async sendAssistantMessage(wid, chatId, message, toolCalls) {
2455
2587
  return this.fetch(`w/${wid}/chats/${chatId}/send-assistant-message`, {
2456
2588
  method: "POST",
@@ -2460,6 +2592,7 @@ var ChatsApi = class extends BaseApiClient {
2460
2592
  })
2461
2593
  });
2462
2594
  }
2595
+ /** Rate a chat message by its UUID. */
2463
2596
  async rateMessage(wid, chatId, messageUuid, rating) {
2464
2597
  return this.fetch(
2465
2598
  `w/${wid}/chats/${chatId}/messages/${messageUuid}/rate`,
@@ -2488,10 +2621,11 @@ var ChatsApi = class extends BaseApiClient {
2488
2621
  body: JSON.stringify({ content })
2489
2622
  });
2490
2623
  }
2624
+ /** Get assignment tasks linked to a chat. */
2491
2625
  async getChatAssignmentTasks(wid, chatId) {
2492
2626
  return this.fetch(`w/${wid}/chats/${chatId}/assignment-tasks`);
2493
2627
  }
2494
- // Chat Completion API (used by eval scripts)
2628
+ /** Create a chat completion using the OpenAI-compatible API (used by eval scripts). */
2495
2629
  async createChatCompletion(wid, chatId, data) {
2496
2630
  return this.fetch(`w/${wid}/web-chat/${chatId}/chat/completions?stream=false`, {
2497
2631
  method: "POST",
@@ -2501,55 +2635,65 @@ var ChatsApi = class extends BaseApiClient {
2501
2635
  })
2502
2636
  });
2503
2637
  }
2504
- // Chat Labels API
2638
+ /** List all chat labels in a workspace. */
2505
2639
  async getChatLabels(wid) {
2506
2640
  return this.fetch(`w/${wid}/chat-labels`);
2507
2641
  }
2642
+ /** Get a chat label by ID. */
2508
2643
  async getChatLabel(wid, id) {
2509
2644
  return this.fetch(`w/${wid}/chat-labels/${id}`);
2510
2645
  }
2646
+ /** Get a chat label by UUID. */
2511
2647
  async getChatLabelByUuid(wid, uuid) {
2512
2648
  return this.fetch(`w/${wid}/chat-labels/${uuid}`);
2513
2649
  }
2650
+ /** Create a new chat label. */
2514
2651
  async createChatLabel(wid, label) {
2515
2652
  return this.fetch(`w/${wid}/chat-labels`, {
2516
2653
  method: "POST",
2517
2654
  body: JSON.stringify(label)
2518
2655
  });
2519
2656
  }
2657
+ /** Update a chat label. */
2520
2658
  async updateChatLabel(wid, id, label) {
2521
2659
  return this.fetch(`w/${wid}/chat-labels/${id}`, {
2522
2660
  method: "PUT",
2523
2661
  body: JSON.stringify(label)
2524
2662
  });
2525
2663
  }
2664
+ /** Delete a chat label. */
2526
2665
  async deleteChatLabel(wid, id) {
2527
2666
  return this.fetch(`w/${wid}/chat-labels/${id}`, {
2528
2667
  method: "DELETE"
2529
2668
  });
2530
2669
  }
2531
- // Chat Filters
2670
+ /** List all chat filters in a workspace. */
2532
2671
  async getChatFilters(wid) {
2533
2672
  return this.fetch(`w/${wid}/chat-filters`);
2534
2673
  }
2674
+ /** Get a chat filter by ID. */
2535
2675
  async getChatFilter(wid, id) {
2536
2676
  return this.fetch(`w/${wid}/chat-filters/${id}`);
2537
2677
  }
2678
+ /** Get a chat filter by UUID. */
2538
2679
  async getChatFilterByUuid(wid, uuid) {
2539
2680
  return this.fetch(`w/${wid}/chat-filters/by-uuid/${uuid}`);
2540
2681
  }
2682
+ /** Create a new chat filter. */
2541
2683
  async createChatFilter(wid, filter) {
2542
2684
  return this.fetch(`w/${wid}/chat-filters`, {
2543
2685
  method: "POST",
2544
2686
  body: JSON.stringify(filter)
2545
2687
  });
2546
2688
  }
2689
+ /** Update a chat filter. */
2547
2690
  async updateChatFilter(wid, id, filter) {
2548
2691
  return this.fetch(`w/${wid}/chat-filters/${id}`, {
2549
2692
  method: "PUT",
2550
2693
  body: JSON.stringify(filter)
2551
2694
  });
2552
2695
  }
2696
+ /** Delete a chat filter. */
2553
2697
  async deleteChatFilter(wid, id) {
2554
2698
  return this.fetch(`w/${wid}/chat-filters/${id}`, {
2555
2699
  method: "DELETE"
@@ -2642,6 +2786,7 @@ var CustomToolkitsApi = class extends BaseApiClient {
2642
2786
  }
2643
2787
  };
2644
2788
  var DataTypesApi = class extends BaseApiClient {
2789
+ /** List all data types for a workspace, optionally filtering by archived status. */
2645
2790
  async getDataTypes(wid, options) {
2646
2791
  const params = new URLSearchParams();
2647
2792
  if (options?.archived !== void 0) {
@@ -2650,45 +2795,54 @@ var DataTypesApi = class extends BaseApiClient {
2650
2795
  const queryString = params.toString();
2651
2796
  return this.fetch(`w/${wid}/data-types${queryString ? `?${queryString}` : ""}`);
2652
2797
  }
2798
+ /** Get a single data type by ID. */
2653
2799
  async getDataType(wid, id) {
2654
2800
  return this.fetch(`w/${wid}/data-types/${id}`);
2655
2801
  }
2802
+ /** Get a single data type by its slug. */
2656
2803
  async getDataTypeBySlug(wid, slug) {
2657
2804
  return this.fetch(`w/${wid}/data-types/slug/${slug}`);
2658
2805
  }
2806
+ /** Create a new data type definition in the workspace. */
2659
2807
  async createDataType(wid, dataType) {
2660
2808
  return this.fetch(`w/${wid}/data-types`, {
2661
2809
  method: "POST",
2662
2810
  body: JSON.stringify(dataType)
2663
2811
  });
2664
2812
  }
2813
+ /** Update an existing data type definition. */
2665
2814
  async updateDataType(wid, id, dataType) {
2666
2815
  return this.fetch(`w/${wid}/data-types/${id}`, {
2667
2816
  method: "PUT",
2668
2817
  body: JSON.stringify(dataType)
2669
2818
  });
2670
2819
  }
2820
+ /** Delete a data type definition by ID. */
2671
2821
  async deleteDataType(wid, id) {
2672
2822
  return this.fetch(`w/${wid}/data-types/${id}`, {
2673
2823
  method: "DELETE"
2674
2824
  });
2675
2825
  }
2826
+ /** Archive a data type, hiding it from default listings. */
2676
2827
  async archiveDataType(wid, id) {
2677
2828
  return this.fetch(`w/${wid}/data-types/${id}/archive`, {
2678
2829
  method: "POST"
2679
2830
  });
2680
2831
  }
2832
+ /** Restore an archived data type back to active status. */
2681
2833
  async unarchiveDataType(wid, id) {
2682
2834
  return this.fetch(`w/${wid}/data-types/${id}/unarchive`, {
2683
2835
  method: "POST"
2684
2836
  });
2685
2837
  }
2838
+ /** Clone a data type with a new name and slug. */
2686
2839
  async cloneDataType(wid, id, data) {
2687
2840
  return this.fetch(`w/${wid}/data-types/${id}/clone`, {
2688
2841
  method: "POST",
2689
2842
  body: JSON.stringify(data)
2690
2843
  });
2691
2844
  }
2845
+ /** List data records for a data type with optional filtering and pagination. */
2692
2846
  async getDataRecords(wid, dataTypeId, options) {
2693
2847
  const params = new URLSearchParams();
2694
2848
  if (options?.memberId) params.append("member_id", options.memberId.toString());
@@ -2700,32 +2854,37 @@ var DataTypesApi = class extends BaseApiClient {
2700
2854
  `w/${wid}/data-types/${dataTypeId}/records${params?.toString() ? `?${params.toString()}` : ""}`
2701
2855
  );
2702
2856
  }
2857
+ /** Get a single data record by ID. */
2703
2858
  async getDataRecord(wid, recordId) {
2704
2859
  return this.fetch(`w/${wid}/data-types/records/${recordId}`);
2705
2860
  }
2861
+ /** Create a new data record under the specified data type. */
2706
2862
  async createDataRecord(wid, dataTypeId, record) {
2707
2863
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/records`, {
2708
2864
  method: "POST",
2709
2865
  body: JSON.stringify(record)
2710
2866
  });
2711
2867
  }
2868
+ /** Update an existing data record's field values. */
2712
2869
  async updateDataRecord(wid, dataTypeId, recordId, record) {
2713
2870
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/records/${recordId}`, {
2714
2871
  method: "PUT",
2715
2872
  body: JSON.stringify(record)
2716
2873
  });
2717
2874
  }
2875
+ /** Delete a data record by ID. */
2718
2876
  async deleteDataRecord(wid, dataTypeId, recordId) {
2719
2877
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/records/${recordId}`, {
2720
2878
  method: "DELETE"
2721
2879
  });
2722
2880
  }
2881
+ /** Get the change history for a data record. */
2723
2882
  async getDataRecordChanges(wid, dataTypeId, recordId) {
2724
2883
  return this.fetch(
2725
2884
  `w/${wid}/data-types/${dataTypeId}/records/${recordId}/changes`
2726
2885
  );
2727
2886
  }
2728
- // Upsert Data Record API (used by eval scripts)
2887
+ /** Upsert a data record by external ID, creating or updating as needed. */
2729
2888
  async upsertDataRecord(wid, dataTypeId, externalId, data) {
2730
2889
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/upsert/${externalId}`, {
2731
2890
  method: "POST",
@@ -2735,14 +2894,14 @@ var DataTypesApi = class extends BaseApiClient {
2735
2894
  })
2736
2895
  });
2737
2896
  }
2738
- // Toggle field indexing for faster search
2897
+ /** Toggle search indexing for a data type field. */
2739
2898
  async toggleFieldIndex(wid, dataTypeId, fieldSlug, shouldIndex) {
2740
2899
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/fields/${fieldSlug}/toggle-index`, {
2741
2900
  method: "POST",
2742
2901
  body: JSON.stringify({ shouldIndex })
2743
2902
  });
2744
2903
  }
2745
- // Get field index status
2904
+ /** Get the index status for a data type field. */
2746
2905
  async getFieldIndexStatus(wid, dataTypeId, fieldSlug) {
2747
2906
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/fields/${fieldSlug}/index-status`);
2748
2907
  }
@@ -2967,13 +3126,15 @@ var SlackAppsApi = class extends BaseApiClient {
2967
3126
  }
2968
3127
  };
2969
3128
  var EventsApi = class extends BaseApiClient {
2970
- // Event Rules API
3129
+ /** List all event rules in the workspace. */
2971
3130
  async getEventRules(wid) {
2972
3131
  return this.fetch(`w/${wid}/event-rules`);
2973
3132
  }
3133
+ /** Get the available action types that can be used in event rules. */
2974
3134
  async getAvailableActions(wid) {
2975
3135
  return this.fetch(`w/${wid}/event-rules/actions/available`);
2976
3136
  }
3137
+ /** Search event rules by object type, event type, action type, and related entities. */
2977
3138
  async searchEventRules(wid, params) {
2978
3139
  const searchParams = new URLSearchParams();
2979
3140
  if (params.objectType) searchParams.append("objectType", params.objectType);
@@ -2987,33 +3148,38 @@ var EventsApi = class extends BaseApiClient {
2987
3148
  if (params.includeDisabled) searchParams.append("includeDisabled", "true");
2988
3149
  return this.fetch(`w/${wid}/event-rules/search?${searchParams.toString()}`);
2989
3150
  }
3151
+ /** Get a single event rule by ID. */
2990
3152
  async getEventRule(wid, id) {
2991
3153
  return this.fetch(`w/${wid}/event-rules/${id}`);
2992
3154
  }
3155
+ /** Create a new event rule in the workspace. */
2993
3156
  async createEventRule(wid, rule) {
2994
3157
  return this.fetch(`w/${wid}/event-rules`, {
2995
3158
  method: "POST",
2996
3159
  body: JSON.stringify(rule)
2997
3160
  });
2998
3161
  }
3162
+ /** Update an existing event rule. */
2999
3163
  async updateEventRule(wid, id, rule) {
3000
3164
  return this.fetch(`w/${wid}/event-rules/${id}`, {
3001
3165
  method: "PUT",
3002
3166
  body: JSON.stringify(rule)
3003
3167
  });
3004
3168
  }
3169
+ /** Delete an event rule by ID. */
3005
3170
  async deleteEventRule(wid, id) {
3006
3171
  return this.fetch(`w/${wid}/event-rules/${id}`, {
3007
3172
  method: "DELETE"
3008
3173
  });
3009
3174
  }
3175
+ /** Reorder event rules by specifying the desired rule ID sequence. */
3010
3176
  async reorderEventRules(wid, ruleIds) {
3011
3177
  return this.fetch(`w/${wid}/event-rules/reorder`, {
3012
3178
  method: "POST",
3013
3179
  body: JSON.stringify(ruleIds)
3014
3180
  });
3015
3181
  }
3016
- // Webhook Logs API
3182
+ /** List webhook logs with optional filtering by event type and success status. */
3017
3183
  async getWebhookLogs(wid, options = {}) {
3018
3184
  const params = new URLSearchParams();
3019
3185
  if (options.page) params.append("page", options.page.toString());
@@ -3026,6 +3192,7 @@ var EventsApi = class extends BaseApiClient {
3026
3192
  `w/${wid}/webhook-logs${params.toString() ? `?${params.toString()}` : ""}`
3027
3193
  );
3028
3194
  }
3195
+ /** List event rule executions with cursor-based pagination and filtering. */
3029
3196
  async getRuleExecutions(wid, options = {}) {
3030
3197
  const params = new URLSearchParams();
3031
3198
  if (options.cursor) params.append("cursor", options.cursor);
@@ -3044,7 +3211,7 @@ var EventsApi = class extends BaseApiClient {
3044
3211
  `w/${wid}/event-rules/executions${params.toString() ? `?${params.toString()}` : ""}`
3045
3212
  );
3046
3213
  }
3047
- // Events API
3214
+ /** List scheduled events with optional pagination and active status filtering. */
3048
3215
  async getEvents(wid, options = {}) {
3049
3216
  const params = new URLSearchParams();
3050
3217
  if (options.page) params.append("page", options.page.toString());
@@ -3056,26 +3223,31 @@ var EventsApi = class extends BaseApiClient {
3056
3223
  `w/${wid}/events${params.toString() ? `?${params.toString()}` : ""}`
3057
3224
  );
3058
3225
  }
3226
+ /** Get a single scheduled event by ID. */
3059
3227
  async getEvent(wid, id) {
3060
3228
  return this.fetch(`w/${wid}/events/${id}`);
3061
3229
  }
3230
+ /** Create a new scheduled event. */
3062
3231
  async createEvent(wid, event) {
3063
3232
  return this.fetch(`w/${wid}/events`, {
3064
3233
  method: "POST",
3065
3234
  body: JSON.stringify(event)
3066
3235
  });
3067
3236
  }
3237
+ /** Update an existing scheduled event. */
3068
3238
  async updateEvent(wid, id, event) {
3069
3239
  return this.fetch(`w/${wid}/events/${id}`, {
3070
3240
  method: "PUT",
3071
3241
  body: JSON.stringify(event)
3072
3242
  });
3073
3243
  }
3244
+ /** Delete a scheduled event by ID. */
3074
3245
  async deleteEvent(wid, id) {
3075
3246
  return this.fetch(`w/${wid}/events/${id}`, {
3076
3247
  method: "DELETE"
3077
3248
  });
3078
3249
  }
3250
+ /** Manually trigger a scheduled event for a specific member or member filter. */
3079
3251
  async runEvent(wid, id, params) {
3080
3252
  const searchParams = new URLSearchParams();
3081
3253
  if (params.memberId) searchParams.append("member_id", params.memberId.toString());
@@ -3085,6 +3257,7 @@ var EventsApi = class extends BaseApiClient {
3085
3257
  method: "POST"
3086
3258
  });
3087
3259
  }
3260
+ /** List event run history with optional filtering by event and status. */
3088
3261
  async getEventRuns(wid, options = {}) {
3089
3262
  const params = new URLSearchParams();
3090
3263
  if (options.page) params.append("page", options.page.toString());
@@ -3095,6 +3268,7 @@ var EventsApi = class extends BaseApiClient {
3095
3268
  if (options.status) params.append("status", options.status);
3096
3269
  return this.fetch(`w/${wid}/events/runs?${params.toString()}`);
3097
3270
  }
3271
+ /** Delete all run history for a scheduled event. */
3098
3272
  async resetEventRuns(wid, eventId) {
3099
3273
  return this.fetch(`w/${wid}/events/${eventId}/runs`, {
3100
3274
  method: "DELETE"
@@ -3103,24 +3277,13 @@ var EventsApi = class extends BaseApiClient {
3103
3277
  };
3104
3278
  var FeaturesApi = class extends BaseApiClient {
3105
3279
  /**
3106
- * Get the full feature registry with all metadata.
3107
- *
3108
- * Returns all feature definitions including:
3109
- * - Dependencies between features
3110
- * - Visibility settings for upgrade prompts
3111
- * - Associated abilities, tools, routes, and event types
3112
- * - UI configuration (icons, sidebar groups)
3113
- *
3114
- * @returns Feature registry response with all feature definitions
3280
+ * Get the full feature registry with all metadata
3115
3281
  */
3116
3282
  async getFeatureRegistry() {
3117
3283
  return this.fetch("features/registry");
3118
3284
  }
3119
3285
  /**
3120
- * Get a specific feature definition by slug.
3121
- *
3122
- * @param slug - The feature slug (e.g., "calendar", "gmail")
3123
- * @returns The full feature definition
3286
+ * Get a specific feature definition by slug
3124
3287
  */
3125
3288
  async getFeatureBySlug(slug) {
3126
3289
  return this.fetch(`features/${slug}`);
@@ -3260,6 +3423,7 @@ var FhirConnectionsApi = class extends BaseApiClient {
3260
3423
  }
3261
3424
  };
3262
3425
  var FilesApi = class extends BaseApiClient {
3426
+ /** List files in a workspace with optional folder filtering, sorting, and search. */
3263
3427
  async getFiles(wid, options = {}) {
3264
3428
  const params = new URLSearchParams();
3265
3429
  if (options.folderId) params.append("folder_id", options.folderId.toString());
@@ -3272,9 +3436,11 @@ var FilesApi = class extends BaseApiClient {
3272
3436
  `w/${wid}/files${params.toString() ? `?${params.toString()}` : ""}`
3273
3437
  );
3274
3438
  }
3439
+ /** Get a single file by ID. */
3275
3440
  async getFile(wid, id) {
3276
3441
  return this.fetch(`w/${wid}/files/${id}`);
3277
3442
  }
3443
+ /** Create a new file record in the workspace. */
3278
3444
  async createFile(wid, file) {
3279
3445
  return this.fetch(`w/${wid}/files`, {
3280
3446
  method: "POST",
@@ -3282,6 +3448,7 @@ var FilesApi = class extends BaseApiClient {
3282
3448
  body: JSON.stringify(file)
3283
3449
  });
3284
3450
  }
3451
+ /** Update an existing file's metadata. */
3285
3452
  async updateFile(wid, id, file) {
3286
3453
  return this.fetch(`w/${wid}/files/${id}`, {
3287
3454
  method: "PUT",
@@ -3289,11 +3456,13 @@ var FilesApi = class extends BaseApiClient {
3289
3456
  body: JSON.stringify(file)
3290
3457
  });
3291
3458
  }
3459
+ /** Delete a file by ID. */
3292
3460
  async deleteFile(wid, id) {
3293
3461
  return this.fetch(`w/${wid}/files/${id}`, {
3294
3462
  method: "DELETE"
3295
3463
  });
3296
3464
  }
3465
+ /** Convert a file to the specified format (text, markdown, or PDF). */
3297
3466
  async convertFile(wid, fileId, format = "pdf") {
3298
3467
  return this.fetch(
3299
3468
  `w/${wid}/files/${fileId}/convert?format=${format}`,
@@ -3302,6 +3471,7 @@ var FilesApi = class extends BaseApiClient {
3302
3471
  }
3303
3472
  );
3304
3473
  }
3474
+ /** Generate a pre-signed upload URL for uploading file content. */
3305
3475
  async generateFileUploadUrl(wid, request) {
3306
3476
  return this.fetch(`w/${wid}/files/upload-url`, {
3307
3477
  method: "POST",
@@ -3309,7 +3479,7 @@ var FilesApi = class extends BaseApiClient {
3309
3479
  body: JSON.stringify(request)
3310
3480
  });
3311
3481
  }
3312
- // Directories API
3482
+ /** List folders in a workspace, optionally filtered by parent folder. */
3313
3483
  async getFolders(wid, parentId) {
3314
3484
  const params = new URLSearchParams();
3315
3485
  if (parentId) params.append("parent_id", parentId.toString());
@@ -3317,31 +3487,37 @@ var FilesApi = class extends BaseApiClient {
3317
3487
  `w/${wid}/folders${params.toString() ? `?${params.toString()}` : ""}`
3318
3488
  );
3319
3489
  }
3490
+ /** Get a single folder by ID. */
3320
3491
  async getFolder(wid, id) {
3321
3492
  return this.fetch(`w/${wid}/folders/${id}`);
3322
3493
  }
3494
+ /** Create a new folder in the workspace. */
3323
3495
  async createFolder(wid, directory) {
3324
3496
  return this.fetch(`w/${wid}/folders`, {
3325
3497
  method: "POST",
3326
3498
  body: JSON.stringify(directory)
3327
3499
  });
3328
3500
  }
3501
+ /** Update a folder's properties. */
3329
3502
  async updateFolder(wid, id, directory) {
3330
3503
  return this.fetch(`w/${wid}/folders/${id}`, {
3331
3504
  method: "PUT",
3332
3505
  body: JSON.stringify(directory)
3333
3506
  });
3334
3507
  }
3508
+ /** Delete a folder by ID. */
3335
3509
  async deleteFolder(wid, id) {
3336
3510
  return this.fetch(`w/${wid}/folders/${id}`, {
3337
3511
  method: "DELETE"
3338
3512
  });
3339
3513
  }
3514
+ /** Trigger reindexing of a folder's contents for search. */
3340
3515
  async reindexFolder(wid, id) {
3341
3516
  return this.fetch(`w/${wid}/folders/${id}/reindex`, {
3342
3517
  method: "POST"
3343
3518
  });
3344
3519
  }
3520
+ /** Search for content within a folder using semantic search. */
3345
3521
  async searchFolder(wid, id, params) {
3346
3522
  const searchParams = new URLSearchParams();
3347
3523
  searchParams.append("query", params.query);
@@ -3350,52 +3526,60 @@ var FilesApi = class extends BaseApiClient {
3350
3526
  `w/${wid}/folders/${id}/search?${searchParams.toString()}`
3351
3527
  );
3352
3528
  }
3353
- // File Labels API
3529
+ /** List all file labels in the workspace. */
3354
3530
  async getFileLabels(wid) {
3355
3531
  return this.fetch(`w/${wid}/file-labels`);
3356
3532
  }
3533
+ /** Get a single file label by ID. */
3357
3534
  async getFileLabel(wid, id) {
3358
3535
  return this.fetch(`w/${wid}/file-labels/${id}`);
3359
3536
  }
3537
+ /** Get a single file label by UUID. */
3360
3538
  async getFileLabelByUuid(wid, uuid) {
3361
3539
  return this.fetch(`w/${wid}/file-labels/${uuid}`);
3362
3540
  }
3541
+ /** Create a new file label in the workspace. */
3363
3542
  async createFileLabel(wid, label) {
3364
3543
  return this.fetch(`w/${wid}/file-labels`, {
3365
3544
  method: "POST",
3366
3545
  body: JSON.stringify(label)
3367
3546
  });
3368
3547
  }
3548
+ /** Update a file label's properties. */
3369
3549
  async updateFileLabel(wid, id, label) {
3370
3550
  return this.fetch(`w/${wid}/file-labels/${id}`, {
3371
3551
  method: "PUT",
3372
3552
  body: JSON.stringify(label)
3373
3553
  });
3374
3554
  }
3555
+ /** Delete a file label by ID. */
3375
3556
  async deleteFileLabel(wid, id) {
3376
3557
  return this.fetch(`w/${wid}/file-labels/${id}`, {
3377
3558
  method: "DELETE"
3378
3559
  });
3379
3560
  }
3380
- // File Sharing API
3561
+ /** Get sharing settings for a file. */
3381
3562
  async getFileSharing(wid, fileId) {
3382
3563
  return this.fetch(`w/${wid}/files/${fileId}/sharing`);
3383
3564
  }
3565
+ /** Update the role associations for a file's sharing permissions. */
3384
3566
  async updateFileRoles(wid, fileId, data) {
3385
3567
  return this.fetch(`w/${wid}/files/${fileId}/sharing/roles`, {
3386
3568
  method: "PUT",
3387
3569
  body: JSON.stringify(data)
3388
3570
  });
3389
3571
  }
3572
+ /** Remove a role's access to a file. */
3390
3573
  async removeFileRole(wid, fileId, roleId) {
3391
3574
  return this.fetch(`w/${wid}/files/${fileId}/sharing/roles/${roleId}`, {
3392
3575
  method: "DELETE"
3393
3576
  });
3394
3577
  }
3395
- // Folder Sharing API
3578
+ /** Get sharing settings for a folder. */
3396
3579
  async getFolderSharing(wid, folderId) {
3397
3580
  return this.fetch(`w/${wid}/folders/${folderId}/sharing`);
3398
3581
  }
3582
+ /** Update the role associations for a folder's sharing permissions. */
3399
3583
  async updateFolderRoles(wid, folderId, data) {
3400
3584
  return this.fetch(
3401
3585
  `w/${wid}/folders/${folderId}/sharing/roles`,
@@ -3405,33 +3589,37 @@ var FilesApi = class extends BaseApiClient {
3405
3589
  }
3406
3590
  );
3407
3591
  }
3592
+ /** Remove a role's access to a folder. */
3408
3593
  async removeFolderRole(wid, folderId, roleId) {
3409
3594
  return this.fetch(`w/${wid}/folders/${folderId}/sharing/roles/${roleId}`, {
3410
3595
  method: "DELETE"
3411
3596
  });
3412
3597
  }
3413
- // Batch Sharing API
3598
+ /** Update all sharing settings for a file in a single request. */
3414
3599
  async updateFileSharing(wid, fileId, data) {
3415
3600
  return this.fetch(`w/${wid}/files/${fileId}/sharing`, {
3416
3601
  method: "PUT",
3417
3602
  body: JSON.stringify(data)
3418
3603
  });
3419
3604
  }
3605
+ /** Update all sharing settings for a folder in a single request. */
3420
3606
  async updateFolderSharing(wid, folderId, data) {
3421
3607
  return this.fetch(`w/${wid}/folders/${folderId}/sharing`, {
3422
3608
  method: "PUT",
3423
3609
  body: JSON.stringify(data)
3424
3610
  });
3425
3611
  }
3426
- // Public Sharing API (unauthenticated access to public files/folders)
3612
+ /** Get metadata for a publicly shared file (unauthenticated). */
3427
3613
  async getPublicFile(wid, fileId) {
3428
3614
  return this.fetch(`w/${wid}/sharing/files/${fileId}`);
3429
3615
  }
3616
+ /** Get contents of a publicly shared folder (unauthenticated). */
3430
3617
  async getPublicFolder(wid, folderId, page = 1, pageSize = 100) {
3431
3618
  return this.fetch(
3432
3619
  `w/${wid}/sharing/folders/${folderId}?page=${page}&pageSize=${pageSize}`
3433
3620
  );
3434
3621
  }
3622
+ /** List files within a publicly shared folder (unauthenticated). */
3435
3623
  async getPublicFolderFiles(wid, folderId, page = 1, pageSize = 100) {
3436
3624
  return this.fetch(
3437
3625
  `w/${wid}/sharing/folders/${folderId}/files?page=${page}&pageSize=${pageSize}`
@@ -3439,29 +3627,35 @@ var FilesApi = class extends BaseApiClient {
3439
3627
  }
3440
3628
  };
3441
3629
  var InboxesApi = class extends BaseApiClient {
3630
+ /** List all inboxes in a workspace. */
3442
3631
  async getInboxes(wid) {
3443
3632
  return this.fetch(`w/${wid}/inboxes`);
3444
3633
  }
3634
+ /** Get an inbox by ID. */
3445
3635
  async getInbox(wid, id) {
3446
3636
  return this.fetch(`w/${wid}/inboxes/${id}`);
3447
3637
  }
3638
+ /** Create a new inbox. */
3448
3639
  async createInbox(wid, inbox) {
3449
3640
  return this.fetch(`w/${wid}/inboxes`, {
3450
3641
  method: "POST",
3451
3642
  body: JSON.stringify(inbox)
3452
3643
  });
3453
3644
  }
3645
+ /** Update an inbox. */
3454
3646
  async updateInbox(wid, id, inbox) {
3455
3647
  return this.fetch(`w/${wid}/inboxes/${id}`, {
3456
3648
  method: "PUT",
3457
3649
  body: JSON.stringify(inbox)
3458
3650
  });
3459
3651
  }
3652
+ /** Delete an inbox. */
3460
3653
  async deleteInbox(wid, id) {
3461
3654
  return this.fetch(`w/${wid}/inboxes/${id}`, {
3462
3655
  method: "DELETE"
3463
3656
  });
3464
3657
  }
3658
+ /** List emails in an inbox with optional pagination and attachment inclusion. */
3465
3659
  async getInboxEmails(wid, inboxId, options = {}) {
3466
3660
  const params = new URLSearchParams();
3467
3661
  if (options.limit) params.append("limit", options.limit.toString());
@@ -3472,19 +3666,23 @@ var InboxesApi = class extends BaseApiClient {
3472
3666
  `w/${wid}/inboxes/${inboxId}/emails${params.toString() ? `?${params.toString()}` : ""}`
3473
3667
  );
3474
3668
  }
3669
+ /** Get a single email from an inbox. */
3475
3670
  async getInboxEmail(wid, inboxId, emailId) {
3476
3671
  return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/${emailId}`);
3477
3672
  }
3673
+ /** Mark an email as read. */
3478
3674
  async markEmailAsRead(wid, inboxId, emailId) {
3479
3675
  return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/${emailId}/mark-read`, {
3480
3676
  method: "POST"
3481
3677
  });
3482
3678
  }
3679
+ /** Mark an email as unread. */
3483
3680
  async markEmailAsUnread(wid, inboxId, emailId) {
3484
3681
  return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/${emailId}/unread`, {
3485
3682
  method: "POST"
3486
3683
  });
3487
3684
  }
3685
+ /** Convert an email to text, markdown, or PDF format. */
3488
3686
  async convertEmail(wid, emailId, format = "pdf") {
3489
3687
  return this.fetch(
3490
3688
  `w/${wid}/inboxes/emails/${emailId}/convert?format=${format}`,
@@ -3493,18 +3691,22 @@ var InboxesApi = class extends BaseApiClient {
3493
3691
  }
3494
3692
  );
3495
3693
  }
3694
+ /** Download an email attachment as raw bytes. */
3496
3695
  async downloadEmailAttachment(wid, inboxId, emailId, attachmentId) {
3497
3696
  const response = await this.fetchRaw(
3498
3697
  `w/${wid}/inboxes/${inboxId}/emails/${emailId}/attachments/${attachmentId}`
3499
3698
  );
3500
3699
  return response.arrayBuffer();
3501
3700
  }
3701
+ /** List email threads in an inbox. */
3502
3702
  async getInboxThreads(wid, inboxId) {
3503
3703
  return this.fetch(`w/${wid}/inboxes/${inboxId}/threads`);
3504
3704
  }
3705
+ /** List emails in a thread by assignment ID. */
3505
3706
  async getThreadEmails(wid, inboxId, assignmentId) {
3506
3707
  return this.fetch(`w/${wid}/inboxes/${inboxId}/assignments/${assignmentId}/emails`);
3507
3708
  }
3709
+ /** List emails associated with a chat. */
3508
3710
  async getChatEmails(wid, inboxId, chatId) {
3509
3711
  return this.fetch(`w/${wid}/inboxes/${inboxId}/chats/${chatId}/emails`);
3510
3712
  }
@@ -3555,9 +3757,7 @@ var InquiriesApi = class extends BaseApiClient {
3555
3757
  });
3556
3758
  }
3557
3759
  /**
3558
- * Export inquiries to CSV (superuser only)
3559
- * @param statusFilter Optional status filter: 'new', 'in_progress', 'done', or undefined for all
3560
- * @returns A Blob containing the CSV data
3760
+ * Export inquiries to CSV with optional status filtering (superuser only)
3561
3761
  */
3562
3762
  async exportInquiriesCsv(statusFilter) {
3563
3763
  const params = new URLSearchParams();
@@ -3744,6 +3944,7 @@ var McpServersApi = class extends BaseApiClient {
3744
3944
  }
3745
3945
  };
3746
3946
  var MembersApi = class extends BaseApiClient {
3947
+ /** Get the currently authenticated member for a workspace. */
3747
3948
  async getCurrentMember(wid) {
3748
3949
  return this.fetch(`w/${wid}/me`);
3749
3950
  }
@@ -3774,12 +3975,14 @@ var MembersApi = class extends BaseApiClient {
3774
3975
  method: "DELETE"
3775
3976
  });
3776
3977
  }
3978
+ /** Update the currently authenticated member's profile. */
3777
3979
  async updateCurrentMember(wid, member) {
3778
3980
  return this.fetch(`w/${wid}/me`, {
3779
3981
  method: "PUT",
3780
3982
  body: JSON.stringify(member)
3781
3983
  });
3782
3984
  }
3985
+ /** List workspace members with pagination, filtering, and sorting. */
3783
3986
  async getWorkspaceMembers(wid, page = 1, pageSize = 10, filters, search, role, sortBy, sortOrder, memberType, isArchived = false, isManager, memberTypes, hasAccount, excludeIds) {
3784
3987
  const params = new URLSearchParams();
3785
3988
  if (page) params.append("page", page.toString());
@@ -3812,21 +4015,25 @@ var MembersApi = class extends BaseApiClient {
3812
4015
  }
3813
4016
  return this.fetch(`w/${wid}/members?${params.toString()}`);
3814
4017
  }
4018
+ /** Get a single workspace member by ID. */
3815
4019
  async getWorkspaceMember(wid, memberId) {
3816
4020
  return this.fetch(`w/${wid}/members/${memberId}`);
3817
4021
  }
4022
+ /** Create a new workspace member. */
3818
4023
  async createWorkspaceMember(wid, data) {
3819
4024
  return this.fetch(`w/${wid}/members`, {
3820
4025
  method: "POST",
3821
4026
  body: JSON.stringify(data)
3822
4027
  });
3823
4028
  }
4029
+ /** Update a workspace member by ID. */
3824
4030
  async updateMember(wid, memberId, data) {
3825
4031
  return this.fetch(`w/${wid}/members/${memberId}`, {
3826
4032
  method: "PUT",
3827
4033
  body: JSON.stringify(data)
3828
4034
  });
3829
4035
  }
4036
+ /** Delete a workspace member, optionally forcing removal of associated data. */
3830
4037
  async deleteMember(wid, memberId, options) {
3831
4038
  const params = new URLSearchParams();
3832
4039
  if (options?.force) {
@@ -3838,98 +4045,119 @@ var MembersApi = class extends BaseApiClient {
3838
4045
  method: "DELETE"
3839
4046
  });
3840
4047
  }
4048
+ /** Archive a workspace member. */
3841
4049
  async archiveMember(wid, memberId) {
3842
4050
  return this.fetch(`w/${wid}/members/${memberId}/archive`, {
3843
4051
  method: "POST"
3844
4052
  });
3845
4053
  }
4054
+ /** Unarchive a previously archived workspace member. */
3846
4055
  async unarchiveMember(wid, memberId) {
3847
4056
  return this.fetch(`w/${wid}/members/${memberId}/unarchive`, {
3848
4057
  method: "POST"
3849
4058
  });
3850
4059
  }
3851
4060
  // Member Filter APIs
4061
+ /** List all saved member filters for a workspace. */
3852
4062
  async getMemberFilters(wid) {
3853
4063
  return this.fetch(`w/${wid}/member-filters`);
3854
4064
  }
4065
+ /** Get a single member filter by ID. */
3855
4066
  async getMemberFilter(wid, filterId) {
3856
4067
  return this.fetch(`w/${wid}/member-filters/${filterId}`);
3857
4068
  }
4069
+ /** Create a new saved member filter. */
3858
4070
  async createMemberFilter(wid, data) {
3859
4071
  return this.fetch(`w/${wid}/member-filters`, {
3860
4072
  method: "POST",
3861
4073
  body: JSON.stringify(data)
3862
4074
  });
3863
4075
  }
4076
+ /** Update a saved member filter. */
3864
4077
  async updateMemberFilter(wid, filterId, data) {
3865
4078
  return this.fetch(`w/${wid}/member-filters/${filterId}`, {
3866
4079
  method: "PUT",
3867
4080
  body: JSON.stringify(data)
3868
4081
  });
3869
4082
  }
4083
+ /** Delete a saved member filter. */
3870
4084
  async deleteMemberFilter(wid, filterId) {
3871
4085
  return this.fetch(`w/${wid}/member-filters/${filterId}`, {
3872
4086
  method: "DELETE"
3873
4087
  });
3874
4088
  }
4089
+ /** Get the count of members matching a saved filter. */
3875
4090
  async getMemberFilterCount(wid, filterId) {
3876
4091
  return this.fetch(`w/${wid}/member-filters/${filterId}/count`);
3877
4092
  }
3878
4093
  // Member Labels API
4094
+ /** List all member labels for a workspace. */
3879
4095
  async getMemberLabels(wid) {
3880
4096
  return this.fetch(`w/${wid}/member-labels`);
3881
4097
  }
4098
+ /** Get a single member label by ID. */
3882
4099
  async getMemberLabel(wid, id) {
3883
4100
  return this.fetch(`w/${wid}/member-labels/${id}`);
3884
4101
  }
4102
+ /** Get a single member label by UUID. */
3885
4103
  async getMemberLabelByUuid(wid, uuid) {
3886
4104
  return this.fetch(`w/${wid}/member-labels/${uuid}`);
3887
4105
  }
4106
+ /** Create a new member label. */
3888
4107
  async createMemberLabel(wid, label) {
3889
4108
  return this.fetch(`w/${wid}/member-labels`, {
3890
4109
  method: "POST",
3891
4110
  body: JSON.stringify(label)
3892
4111
  });
3893
4112
  }
4113
+ /** Update a member label. */
3894
4114
  async updateMemberLabel(wid, id, label) {
3895
4115
  return this.fetch(`w/${wid}/member-labels/${id}`, {
3896
4116
  method: "PUT",
3897
4117
  body: JSON.stringify(label)
3898
4118
  });
3899
4119
  }
4120
+ /** Delete a member label. */
3900
4121
  async deleteMemberLabel(wid, id) {
3901
4122
  return this.fetch(`w/${wid}/member-labels/${id}`, {
3902
4123
  method: "DELETE"
3903
4124
  });
3904
4125
  }
3905
4126
  // Member Roles API
4127
+ /** List all member roles for a workspace. */
3906
4128
  async getMemberRoles(wid) {
3907
4129
  return this.fetch(`w/${wid}/member-roles`);
3908
4130
  }
4131
+ /** Get a single member role by ID. */
3909
4132
  async getMemberRole(wid, id) {
3910
4133
  return this.fetch(`w/${wid}/member-roles/${id}`);
3911
4134
  }
4135
+ /** Get a single member role by UUID. */
3912
4136
  async getMemberRoleByUuid(wid, uuid) {
3913
4137
  return this.fetch(`w/${wid}/member-roles/${uuid}`);
3914
4138
  }
4139
+ /** Create a new member role. */
3915
4140
  async createMemberRole(wid, memberRole) {
3916
4141
  return this.fetch(`w/${wid}/member-roles`, {
3917
4142
  method: "POST",
3918
4143
  body: JSON.stringify(memberRole)
3919
4144
  });
3920
4145
  }
4146
+ /** Update a member role. */
3921
4147
  async updateMemberRole(wid, id, memberRole) {
3922
4148
  return this.fetch(`w/${wid}/member-roles/${id}`, {
3923
4149
  method: "PUT",
3924
4150
  body: JSON.stringify(memberRole)
3925
4151
  });
3926
4152
  }
4153
+ /** Delete a member role. */
3927
4154
  async deleteMemberRole(wid, id) {
3928
4155
  return this.fetch(`w/${wid}/member-roles/${id}`, {
3929
4156
  method: "DELETE"
3930
4157
  });
3931
4158
  }
3932
4159
  // Import/Export Members API
4160
+ /** Import members from a CSV file, streaming progress updates via callback. */
3933
4161
  async importMembers(wid, file, newMemberRoleId, onProgress) {
3934
4162
  const formData = new FormData();
3935
4163
  formData.append("file", file);
@@ -3974,6 +4202,7 @@ var MembersApi = class extends BaseApiClient {
3974
4202
  }
3975
4203
  return { success: true };
3976
4204
  }
4205
+ /** Export members as a downloadable file with selected fields and data types. */
3977
4206
  async exportMembers(wid, selectedFields, selectedDataTypes, memberType) {
3978
4207
  const params = new URLSearchParams();
3979
4208
  selectedFields.forEach((field) => params.append("selected_fields", field));
@@ -3993,6 +4222,7 @@ var MembersApi = class extends BaseApiClient {
3993
4222
  }
3994
4223
  return response.blob();
3995
4224
  }
4225
+ /** Get message activity counts for the specified members over a time period. */
3996
4226
  async getMembersMessageActivity(wid, memberIds, days = 30) {
3997
4227
  const memberIdsStr = memberIds.join(",");
3998
4228
  const params = new URLSearchParams();
@@ -4141,6 +4371,7 @@ var MembersApi = class extends BaseApiClient {
4141
4371
  }
4142
4372
  };
4143
4373
  var MilestonesApi = class extends BaseApiClient {
4374
+ /** List milestones in a workspace with optional pagination and sorting. */
4144
4375
  async getMilestones(wid, options = {}) {
4145
4376
  const params = new URLSearchParams();
4146
4377
  if (options.page) params.append("page", options.page.toString());
@@ -4151,21 +4382,25 @@ var MilestonesApi = class extends BaseApiClient {
4151
4382
  `w/${wid}/milestones${params.toString() ? `?${params.toString()}` : ""}`
4152
4383
  );
4153
4384
  }
4385
+ /** Get a single milestone by ID. */
4154
4386
  async getMilestone(wid, id) {
4155
4387
  return this.fetch(`w/${wid}/milestones/${id}`);
4156
4388
  }
4389
+ /** Create a new milestone in a workspace. */
4157
4390
  async createMilestone(wid, milestone) {
4158
4391
  return this.fetch(`w/${wid}/milestones`, {
4159
4392
  method: "POST",
4160
4393
  body: JSON.stringify(milestone)
4161
4394
  });
4162
4395
  }
4396
+ /** Update an existing milestone with partial data. */
4163
4397
  async updateMilestone(wid, id, milestone) {
4164
4398
  return this.fetch(`w/${wid}/milestones/${id}`, {
4165
4399
  method: "PUT",
4166
4400
  body: JSON.stringify(milestone)
4167
4401
  });
4168
4402
  }
4403
+ /** Delete a milestone by ID. */
4169
4404
  async deleteMilestone(wid, id) {
4170
4405
  return this.fetch(`w/${wid}/milestones/${id}`, {
4171
4406
  method: "DELETE"
@@ -4226,21 +4461,25 @@ var MondayIntegrationApi = class extends BaseApiClient {
4226
4461
  }
4227
4462
  };
4228
4463
  var NotificationRulesApi = class extends BaseApiClient {
4464
+ /** List all notification rules in a workspace. */
4229
4465
  async getNotificationRules(wid) {
4230
4466
  return this.fetch(`w/${wid}/notification-rules`);
4231
4467
  }
4468
+ /** Create a new notification rule. */
4232
4469
  async createNotificationRule(wid, rule) {
4233
4470
  return this.fetch(`w/${wid}/notification-rules`, {
4234
4471
  method: "POST",
4235
4472
  body: JSON.stringify(rule)
4236
4473
  });
4237
4474
  }
4475
+ /** Update a notification rule. */
4238
4476
  async updateNotificationRule(wid, ruleId, rule) {
4239
4477
  return this.fetch(`w/${wid}/notification-rules/${ruleId}`, {
4240
4478
  method: "PUT",
4241
4479
  body: JSON.stringify(rule)
4242
4480
  });
4243
4481
  }
4482
+ /** Delete a notification rule. */
4244
4483
  async deleteNotificationRule(wid, ruleId) {
4245
4484
  return this.fetch(`w/${wid}/notification-rules/${ruleId}`, {
4246
4485
  method: "DELETE"
@@ -4248,57 +4487,69 @@ var NotificationRulesApi = class extends BaseApiClient {
4248
4487
  }
4249
4488
  };
4250
4489
  var OperatorApi = class extends BaseApiClient {
4490
+ /** List all operator groups for a workspace. */
4251
4491
  async getOperatorGroups(wid) {
4252
4492
  return this.fetch(`w/${wid}/operator/groups`);
4253
4493
  }
4494
+ /** Get a single operator group by ID. */
4254
4495
  async getOperatorGroup(wid, groupId) {
4255
4496
  return this.fetch(`w/${wid}/operator/groups/${groupId}`);
4256
4497
  }
4498
+ /** Create a new operator group. */
4257
4499
  async createOperatorGroup(wid, data) {
4258
4500
  return this.fetch(`w/${wid}/operator/groups`, {
4259
4501
  method: "POST",
4260
4502
  body: JSON.stringify(data)
4261
4503
  });
4262
4504
  }
4505
+ /** Update an operator group. */
4263
4506
  async updateOperatorGroup(wid, groupId, data) {
4264
4507
  return this.fetch(`w/${wid}/operator/groups/${groupId}`, {
4265
4508
  method: "PUT",
4266
4509
  body: JSON.stringify(data)
4267
4510
  });
4268
4511
  }
4512
+ /** Delete an operator group. */
4269
4513
  async deleteOperatorGroup(wid, groupId) {
4270
4514
  return this.fetch(`w/${wid}/operator/groups/${groupId}`, {
4271
4515
  method: "DELETE"
4272
4516
  });
4273
4517
  }
4518
+ /** Add a member to an operator group. */
4274
4519
  async addGroupMember(wid, groupId, data) {
4275
4520
  return this.fetch(`w/${wid}/operator/groups/${groupId}/members`, {
4276
4521
  method: "POST",
4277
4522
  body: JSON.stringify(data)
4278
4523
  });
4279
4524
  }
4525
+ /** Remove a member from an operator group. */
4280
4526
  async removeGroupMember(wid, groupId, memberId) {
4281
4527
  return this.fetch(`w/${wid}/operator/groups/${groupId}/members/${memberId}`, {
4282
4528
  method: "DELETE"
4283
4529
  });
4284
4530
  }
4531
+ /** Get all currently live (online) operators in a workspace. */
4285
4532
  async getLiveOperators(wid) {
4286
4533
  return this.fetch(`w/${wid}/presence/live`);
4287
4534
  }
4535
+ /** Get the current member's presence status. */
4288
4536
  async getPresenceStatus(wid) {
4289
4537
  return this.fetch(`w/${wid}/presence/me`);
4290
4538
  }
4539
+ /** Disconnect the current member's presence session. */
4291
4540
  async disconnectPresence(wid) {
4292
4541
  return this.fetch(`w/${wid}/presence/disconnect-self`, {
4293
4542
  method: "POST"
4294
4543
  });
4295
4544
  }
4296
4545
  // Operator chat message methods
4546
+ /** Get paginated chat messages for an operator chat. */
4297
4547
  async getOperatorChatMessages(wid, chatId, limit = 50, offset = 0) {
4298
4548
  return this.fetch(
4299
4549
  `w/${wid}/operator/chats/${chatId}/messages?limit=${limit}&offset=${offset}`
4300
4550
  );
4301
4551
  }
4552
+ /** Send a message in an operator chat. */
4302
4553
  async sendOperatorMessage(wid, chatId, content) {
4303
4554
  return this.fetch(`w/${wid}/operator/chats/${chatId}/messages`, {
4304
4555
  method: "POST",
@@ -4382,45 +4633,54 @@ var OAuthApi = class extends BaseApiClient {
4382
4633
  }
4383
4634
  };
4384
4635
  var PhoneNumbersApi = class extends BaseApiClient {
4636
+ /** List all phone numbers in a workspace. */
4385
4637
  async getPhoneNumbers(wid) {
4386
4638
  return this.fetch(`w/${wid}/phone-numbers`);
4387
4639
  }
4640
+ /** List phone numbers available for provisioning. */
4388
4641
  async getAvailablePhoneNumbers(wid) {
4389
4642
  return this.fetch(
4390
4643
  `w/${wid}/phone-numbers/available-numbers`
4391
4644
  );
4392
4645
  }
4646
+ /** Request provisioning of a specific phone number. */
4393
4647
  async requestPhoneNumber(wid, phoneNumber) {
4394
4648
  return this.fetch(`w/${wid}/phone-numbers/request`, {
4395
4649
  method: "POST",
4396
4650
  body: JSON.stringify({ phone_number: phoneNumber })
4397
4651
  });
4398
4652
  }
4653
+ /** Get a phone number by ID. */
4399
4654
  async getPhoneNumber(wid, id) {
4400
4655
  return this.fetch(`w/${wid}/phone-numbers/${id}`);
4401
4656
  }
4657
+ /** Create a new phone number record. */
4402
4658
  async createPhoneNumber(wid, phoneNumber) {
4403
4659
  return this.fetch(`w/${wid}/phone-numbers`, {
4404
4660
  method: "POST",
4405
4661
  body: JSON.stringify(phoneNumber)
4406
4662
  });
4407
4663
  }
4664
+ /** Update a phone number record. */
4408
4665
  async updatePhoneNumber(wid, id, phoneNumber) {
4409
4666
  return this.fetch(`w/${wid}/phone-numbers/${id}`, {
4410
4667
  method: "PUT",
4411
4668
  body: JSON.stringify(phoneNumber)
4412
4669
  });
4413
4670
  }
4671
+ /** Delete a phone number. */
4414
4672
  async deletePhoneNumber(wid, id) {
4415
4673
  return this.fetch(`w/${wid}/phone-numbers/${id}`, {
4416
4674
  method: "DELETE"
4417
4675
  });
4418
4676
  }
4677
+ /** List paginated call records for a phone number. */
4419
4678
  async getPhoneNumberCalls(wid, id, page = 1, pageSize = 10) {
4420
4679
  return this.fetch(
4421
4680
  `w/${wid}/phone-numbers/${id}/calls?page=${page}&pageSize=${pageSize}`
4422
4681
  );
4423
4682
  }
4683
+ /** List paginated SMS messages for a phone number. */
4424
4684
  async getPhoneNumberMessages(wid, id, page = 1, pageSize = 10) {
4425
4685
  return this.fetch(
4426
4686
  `w/${wid}/phone-numbers/${id}/messages?page=${page}&pageSize=${pageSize}`
@@ -4428,6 +4688,7 @@ var PhoneNumbersApi = class extends BaseApiClient {
4428
4688
  }
4429
4689
  };
4430
4690
  var PronunciationsApi = class extends BaseApiClient {
4691
+ /** List pronunciation entries for an organization, optionally filtered by scope. */
4431
4692
  async getPronunciationEntries(orgUuid, options = {}) {
4432
4693
  const params = new URLSearchParams();
4433
4694
  if (options.scope) params.append("scope", options.scope);
@@ -4437,55 +4698,65 @@ var PronunciationsApi = class extends BaseApiClient {
4437
4698
  );
4438
4699
  return response.items;
4439
4700
  }
4701
+ /** Create a new pronunciation entry for an organization. */
4440
4702
  async createPronunciationEntry(orgUuid, data) {
4441
4703
  return this.fetch(`o/${orgUuid}/pronunciations`, {
4442
4704
  method: "POST",
4443
4705
  body: JSON.stringify(data)
4444
4706
  });
4445
4707
  }
4708
+ /** Update an existing organization pronunciation entry. */
4446
4709
  async updatePronunciationEntry(orgUuid, id, data) {
4447
4710
  return this.fetch(`o/${orgUuid}/pronunciations/${id}`, {
4448
4711
  method: "PUT",
4449
4712
  body: JSON.stringify(data)
4450
4713
  });
4451
4714
  }
4715
+ /** Delete a pronunciation entry from an organization. */
4452
4716
  async deletePronunciationEntry(orgUuid, id) {
4453
4717
  return this.fetch(`o/${orgUuid}/pronunciations/${id}`, {
4454
4718
  method: "DELETE"
4455
4719
  });
4456
4720
  }
4721
+ /** Export all pronunciation entries for an organization as term/respelling pairs. */
4457
4722
  async exportPronunciationEntries(orgUuid) {
4458
4723
  return this.fetch(`o/${orgUuid}/pronunciations/export`);
4459
4724
  }
4725
+ /** Bulk import pronunciation entries into an organization. */
4460
4726
  async importPronunciationEntries(orgUuid, entries) {
4461
4727
  return this.fetch(`o/${orgUuid}/pronunciations/import`, {
4462
4728
  method: "POST",
4463
4729
  body: JSON.stringify({ entries })
4464
4730
  });
4465
4731
  }
4732
+ /** List the current user's personal pronunciation entries. */
4466
4733
  async getMyPronunciations() {
4467
4734
  const response = await this.fetch(
4468
4735
  "account/pronunciations"
4469
4736
  );
4470
4737
  return response.items;
4471
4738
  }
4739
+ /** Create a personal pronunciation entry for the current user. */
4472
4740
  async createMyPronunciation(data) {
4473
4741
  return this.fetch("account/pronunciations", {
4474
4742
  method: "POST",
4475
4743
  body: JSON.stringify(data)
4476
4744
  });
4477
4745
  }
4746
+ /** Update a personal pronunciation entry. */
4478
4747
  async updateMyPronunciation(id, data) {
4479
4748
  return this.fetch(`account/pronunciations/${id}`, {
4480
4749
  method: "PUT",
4481
4750
  body: JSON.stringify(data)
4482
4751
  });
4483
4752
  }
4753
+ /** Delete a personal pronunciation entry. */
4484
4754
  async deleteMyPronunciation(id) {
4485
4755
  return this.fetch(`account/pronunciations/${id}`, {
4486
4756
  method: "DELETE"
4487
4757
  });
4488
4758
  }
4759
+ /** Get AI-suggested respellings for a given term. */
4489
4760
  async suggestPronunciations(term, language) {
4490
4761
  const response = await this.fetch(
4491
4762
  "account/pronunciations/suggest",
@@ -4496,12 +4767,14 @@ var PronunciationsApi = class extends BaseApiClient {
4496
4767
  );
4497
4768
  return response.suggestions;
4498
4769
  }
4770
+ /** List recommended voices for pronunciation preview. */
4499
4771
  async getRecommendedVoices() {
4500
4772
  const response = await this.fetch(
4501
4773
  "account/pronunciations/voices"
4502
4774
  );
4503
4775
  return response.voices;
4504
4776
  }
4777
+ /** Generate an audio preview of a pronunciation respelling using a specified voice. */
4505
4778
  async previewPronunciation(data) {
4506
4779
  const response = await this.fetchRaw("account/pronunciations/preview", {
4507
4780
  method: "POST",
@@ -4515,24 +4788,29 @@ var PronunciationsApi = class extends BaseApiClient {
4515
4788
  }
4516
4789
  };
4517
4790
  var QualificationsApi = class extends BaseApiClient {
4791
+ /** List all qualifications in a workspace. */
4518
4792
  async getQualifications(wid) {
4519
4793
  return this.fetch(`w/${wid}/qualifications`);
4520
4794
  }
4795
+ /** Get a single qualification by ID. */
4521
4796
  async getQualification(wid, id) {
4522
4797
  return this.fetch(`w/${wid}/qualifications/${id}`);
4523
4798
  }
4799
+ /** Create a new qualification in a workspace. */
4524
4800
  async createQualification(wid, data) {
4525
4801
  return this.fetch(`w/${wid}/qualifications`, {
4526
4802
  method: "POST",
4527
4803
  body: JSON.stringify(data)
4528
4804
  });
4529
4805
  }
4806
+ /** Update an existing qualification. */
4530
4807
  async updateQualification(wid, id, data) {
4531
4808
  return this.fetch(`w/${wid}/qualifications/${id}`, {
4532
4809
  method: "PUT",
4533
4810
  body: JSON.stringify(data)
4534
4811
  });
4535
4812
  }
4813
+ /** List members assigned to a qualification with optional filtering. */
4536
4814
  async getQualificationMembers(wid, id, params) {
4537
4815
  const searchParams = new URLSearchParams();
4538
4816
  if (params?.status) searchParams.set("status", params.status);
@@ -4544,16 +4822,19 @@ var QualificationsApi = class extends BaseApiClient {
4544
4822
  `w/${wid}/qualifications/${id}/members${qs ? `?${qs}` : ""}`
4545
4823
  );
4546
4824
  }
4825
+ /** Archive a qualification. */
4547
4826
  async archiveQualification(wid, id) {
4548
4827
  return this.fetch(`w/${wid}/qualifications/${id}`, {
4549
4828
  method: "DELETE"
4550
4829
  });
4551
4830
  }
4831
+ /** List all qualifications assigned to a specific member. */
4552
4832
  async getMemberQualifications(wid, memberId) {
4553
4833
  return this.fetch(
4554
4834
  `w/${wid}/qualifications/members/${memberId}/qualifications`
4555
4835
  );
4556
4836
  }
4837
+ /** Assign a qualification to a member. */
4557
4838
  async assignQualification(wid, memberId, data) {
4558
4839
  return this.fetch(
4559
4840
  `w/${wid}/qualifications/members/${memberId}/qualifications`,
@@ -4563,6 +4844,7 @@ var QualificationsApi = class extends BaseApiClient {
4563
4844
  }
4564
4845
  );
4565
4846
  }
4847
+ /** Update a member's qualification status or settings. */
4566
4848
  async updateMemberQualification(wid, memberId, qualificationId, data) {
4567
4849
  return this.fetch(
4568
4850
  `w/${wid}/qualifications/members/${memberId}/qualifications/${qualificationId}`,
@@ -4572,6 +4854,7 @@ var QualificationsApi = class extends BaseApiClient {
4572
4854
  }
4573
4855
  );
4574
4856
  }
4857
+ /** Remove a qualification assignment from a member. */
4575
4858
  async removeMemberQualification(wid, memberId, qualificationId) {
4576
4859
  return this.fetch(
4577
4860
  `w/${wid}/qualifications/members/${memberId}/qualifications/${qualificationId}`,
@@ -4580,17 +4863,20 @@ var QualificationsApi = class extends BaseApiClient {
4580
4863
  }
4581
4864
  );
4582
4865
  }
4866
+ /** Get the status change history for a member's qualification. */
4583
4867
  async getMemberQualificationLog(wid, memberId, qualificationId) {
4584
4868
  return this.fetch(
4585
4869
  `w/${wid}/qualifications/members/${memberId}/qualifications/${qualificationId}/log`
4586
4870
  );
4587
4871
  }
4588
4872
  // ===== Requirements =====
4873
+ /** List all requirements for a qualification. */
4589
4874
  async listRequirements(wid, qualificationId) {
4590
4875
  return this.fetch(
4591
4876
  `w/${wid}/qualifications/${qualificationId}/requirements`
4592
4877
  );
4593
4878
  }
4879
+ /** Create a new requirement for a qualification. */
4594
4880
  async createRequirement(wid, qualificationId, data) {
4595
4881
  return this.fetch(
4596
4882
  `w/${wid}/qualifications/${qualificationId}/requirements`,
@@ -4600,11 +4886,13 @@ var QualificationsApi = class extends BaseApiClient {
4600
4886
  }
4601
4887
  );
4602
4888
  }
4889
+ /** Get a single qualification requirement by ID. */
4603
4890
  async getRequirement(wid, requirementId) {
4604
4891
  return this.fetch(
4605
4892
  `w/${wid}/qualifications/requirements/${requirementId}`
4606
4893
  );
4607
4894
  }
4895
+ /** Update a qualification requirement. */
4608
4896
  async updateRequirement(wid, requirementId, data) {
4609
4897
  return this.fetch(
4610
4898
  `w/${wid}/qualifications/requirements/${requirementId}`,
@@ -4614,12 +4902,14 @@ var QualificationsApi = class extends BaseApiClient {
4614
4902
  }
4615
4903
  );
4616
4904
  }
4905
+ /** Delete a qualification requirement. */
4617
4906
  async deleteRequirement(wid, requirementId) {
4618
4907
  return this.fetch(`w/${wid}/qualifications/requirements/${requirementId}`, {
4619
4908
  method: "DELETE"
4620
4909
  });
4621
4910
  }
4622
4911
  // ===== Submissions =====
4912
+ /** List submissions for a qualification, optionally filtered by status or member. */
4623
4913
  async listSubmissions(wid, qualificationId, params) {
4624
4914
  const searchParams = new URLSearchParams();
4625
4915
  if (params?.status) searchParams.set("status", params.status);
@@ -4629,11 +4919,13 @@ var QualificationsApi = class extends BaseApiClient {
4629
4919
  `w/${wid}/qualifications/${qualificationId}/submissions${qs ? `?${qs}` : ""}`
4630
4920
  );
4631
4921
  }
4922
+ /** Get a single qualification submission by ID. */
4632
4923
  async getSubmission(wid, submissionId) {
4633
4924
  return this.fetch(
4634
4925
  `w/${wid}/qualifications/submissions/${submissionId}`
4635
4926
  );
4636
4927
  }
4928
+ /** Submit an answer for a qualification requirement. */
4637
4929
  async submitAnswer(wid, requirementId, data) {
4638
4930
  return this.fetch(
4639
4931
  `w/${wid}/qualifications/requirements/${requirementId}/submit`,
@@ -4643,6 +4935,7 @@ var QualificationsApi = class extends BaseApiClient {
4643
4935
  }
4644
4936
  );
4645
4937
  }
4938
+ /** Start a chat scenario for a qualification requirement. */
4646
4939
  async startScenario(wid, requirementId) {
4647
4940
  return this.fetch(
4648
4941
  `w/${wid}/qualifications/requirements/${requirementId}/start-scenario`,
@@ -4651,11 +4944,13 @@ var QualificationsApi = class extends BaseApiClient {
4651
4944
  }
4652
4945
  );
4653
4946
  }
4947
+ /** Delete a submission to allow the member to retry. */
4654
4948
  async retrySubmission(wid, submissionId) {
4655
4949
  await this.fetch(`w/${wid}/qualifications/submissions/${submissionId}/retry`, {
4656
4950
  method: "DELETE"
4657
4951
  });
4658
4952
  }
4953
+ /** Submit the current user's qualification for review. */
4659
4954
  async submitForReview(wid, qualificationId) {
4660
4955
  return this.fetch(
4661
4956
  `w/${wid}/qualifications/members/me/qualifications/${qualificationId}/submit`,
@@ -4664,6 +4959,7 @@ var QualificationsApi = class extends BaseApiClient {
4664
4959
  }
4665
4960
  );
4666
4961
  }
4962
+ /** Review a qualification submission, approving or rejecting it. */
4667
4963
  async reviewSubmission(wid, submissionId, data) {
4668
4964
  return this.fetch(
4669
4965
  `w/${wid}/qualifications/submissions/${submissionId}/review`,
@@ -4673,6 +4969,7 @@ var QualificationsApi = class extends BaseApiClient {
4673
4969
  }
4674
4970
  );
4675
4971
  }
4972
+ /** Override the score for a specific criterion on a submission. */
4676
4973
  async overrideCriterionScore(wid, submissionId, criterionId, data) {
4677
4974
  return this.fetch(
4678
4975
  `w/${wid}/qualifications/submissions/${submissionId}/criteria/${criterionId}`,
@@ -4684,6 +4981,7 @@ var QualificationsApi = class extends BaseApiClient {
4684
4981
  }
4685
4982
  };
4686
4983
  var ReportsApi = class extends BaseApiClient {
4984
+ /** Get AI model usage report for a workspace within an optional date range. */
4687
4985
  async getAIUsageReport(wid, params) {
4688
4986
  const queryParams = new URLSearchParams();
4689
4987
  if (params?.start_date) {
@@ -4696,6 +4994,7 @@ var ReportsApi = class extends BaseApiClient {
4696
4994
  const url = `w/${wid}/reports/ai-usage${queryString ? `?${queryString}` : ""}`;
4697
4995
  return this.fetch(url);
4698
4996
  }
4997
+ /** Get SMS usage report for a workspace within an optional date range. */
4699
4998
  async getSMSUsageReport(wid, params) {
4700
4999
  const queryParams = new URLSearchParams();
4701
5000
  if (params?.start_date) {
@@ -4708,6 +5007,7 @@ var ReportsApi = class extends BaseApiClient {
4708
5007
  const url = `w/${wid}/reports/sms-usage${queryString ? `?${queryString}` : ""}`;
4709
5008
  return this.fetch(url);
4710
5009
  }
5010
+ /** Get phone call usage report for a workspace within an optional date range. */
4711
5011
  async getPhoneUsageReport(wid, params) {
4712
5012
  const queryParams = new URLSearchParams();
4713
5013
  if (params?.start_date) {
@@ -4720,6 +5020,7 @@ var ReportsApi = class extends BaseApiClient {
4720
5020
  const url = `w/${wid}/reports/phone-usage${queryString ? `?${queryString}` : ""}`;
4721
5021
  return this.fetch(url);
4722
5022
  }
5023
+ /** Get usage report for a specific member within an optional date range. */
4723
5024
  async getMemberUsage(wid, memberId, params) {
4724
5025
  const queryParams = new URLSearchParams();
4725
5026
  if (params?.start_date) {
@@ -4732,6 +5033,7 @@ var ReportsApi = class extends BaseApiClient {
4732
5033
  const url = `w/${wid}/reports/member-usage/${memberId}${queryString ? `?${queryString}` : ""}`;
4733
5034
  return this.fetch(url);
4734
5035
  }
5036
+ /** Get voice (STT/TTS) usage report for a workspace within an optional date range. */
4735
5037
  async getVoiceUsageReport(wid, params) {
4736
5038
  const queryParams = new URLSearchParams();
4737
5039
  if (params?.start_date) {
@@ -4746,9 +5048,11 @@ var ReportsApi = class extends BaseApiClient {
4746
5048
  }
4747
5049
  };
4748
5050
  var SitesApi = class extends BaseApiClient {
5051
+ /** List all sites in a workspace. */
4749
5052
  async getSites(wid) {
4750
5053
  return this.fetch(`w/${wid}/sites`);
4751
5054
  }
5055
+ /** Check whether a site slug is available for use. */
4752
5056
  async checkSiteSlugAvailability(wid, slug, siteUuid = null) {
4753
5057
  const params = new URLSearchParams();
4754
5058
  if (siteUuid) params.append("site_uuid", siteUuid);
@@ -4756,6 +5060,7 @@ var SitesApi = class extends BaseApiClient {
4756
5060
  `w/${wid}/sites/available/${slug}?${params.toString()}`
4757
5061
  );
4758
5062
  }
5063
+ /** Check whether a custom domain is available for a site. */
4759
5064
  async checkSiteDomainAvailability(wid, domain, siteUuid = null) {
4760
5065
  const params = new URLSearchParams();
4761
5066
  if (siteUuid) params.append("site_uuid", siteUuid);
@@ -4763,24 +5068,29 @@ var SitesApi = class extends BaseApiClient {
4763
5068
  `w/${wid}/sites/domain-available/${domain}?${params.toString()}`
4764
5069
  );
4765
5070
  }
5071
+ /** Get a single site by ID. */
4766
5072
  async getSite(wid, id) {
4767
5073
  return this.fetch(`w/${wid}/sites/${id}`);
4768
5074
  }
5075
+ /** Get a single site by UUID. */
4769
5076
  async getSiteByUuid(wid, uuid) {
4770
5077
  return this.fetch(`s/${wid}/${uuid}`);
4771
5078
  }
5079
+ /** Get a fully rendered page from a site by slug or ID. */
4772
5080
  async getSiteRenderedPage(wid, siteUuid, pageSlugOrId) {
4773
5081
  return this.fetch(`s/${wid}/${siteUuid}/pages/${pageSlugOrId}`);
4774
5082
  }
5083
+ /** Get the rendered navigation menu for a site, including all translations. */
4775
5084
  async getSiteRenderedMenu(wid, siteUuid) {
4776
5085
  return this.fetch(`s/${wid}/${siteUuid}/menu`);
4777
5086
  }
5087
+ /** Sign up a new user through a site's public registration. */
4778
5088
  async siteSignup(wid, siteUuid) {
4779
5089
  return this.fetch(`s/${wid}/${siteUuid}/signup`, {
4780
5090
  method: "POST"
4781
5091
  });
4782
5092
  }
4783
- // ===== SITE-SPECIFIC AUTHENTICATION METHODS =====
5093
+ /** Send a phone verification code for site-specific authentication. */
4784
5094
  async siteSendPhoneCode(wid, siteUuid, phoneNumber) {
4785
5095
  return this.fetch(
4786
5096
  `s/${wid}/${siteUuid}/auth/send-phone-code`,
@@ -4790,6 +5100,7 @@ var SitesApi = class extends BaseApiClient {
4790
5100
  }
4791
5101
  );
4792
5102
  }
5103
+ /** Send an email verification code for site-specific authentication. */
4793
5104
  async siteSendEmailCode(wid, siteUuid, email) {
4794
5105
  return this.fetch(
4795
5106
  `s/${wid}/${siteUuid}/auth/send-email-code`,
@@ -4799,6 +5110,7 @@ var SitesApi = class extends BaseApiClient {
4799
5110
  }
4800
5111
  );
4801
5112
  }
5113
+ /** Verify a phone or email code and complete site authentication. */
4802
5114
  async siteVerifyCode(wid, siteUuid, code, phoneNumber, email) {
4803
5115
  const verifyResponse = await this.fetch(`s/${wid}/${siteUuid}/auth/verify`, {
4804
5116
  method: "POST",
@@ -4814,28 +5126,33 @@ var SitesApi = class extends BaseApiClient {
4814
5126
  }
4815
5127
  return verifyResponse;
4816
5128
  }
5129
+ /** Trigger a crawl of the site's external content source. */
4817
5130
  async crawlSite(wid, siteId) {
4818
5131
  return this.fetch(`w/${wid}/sites/${siteId}/crawl`, {
4819
5132
  method: "POST"
4820
5133
  });
4821
5134
  }
5135
+ /** Create a new site in the workspace. */
4822
5136
  async createSite(wid, site) {
4823
5137
  return this.fetch(`w/${wid}/sites`, {
4824
5138
  method: "POST",
4825
5139
  body: JSON.stringify(site)
4826
5140
  });
4827
5141
  }
5142
+ /** Update a site's configuration. */
4828
5143
  async updateSite(wid, id, site) {
4829
5144
  return this.fetch(`w/${wid}/sites/${id}`, {
4830
5145
  method: "PUT",
4831
5146
  body: JSON.stringify(site)
4832
5147
  });
4833
5148
  }
5149
+ /** Delete a site by ID. */
4834
5150
  async deleteSite(wid, id) {
4835
5151
  return this.fetch(`w/${wid}/sites/${id}`, {
4836
5152
  method: "DELETE"
4837
5153
  });
4838
5154
  }
5155
+ /** List pages for a site with optional pagination, sorting, and search. */
4839
5156
  async getSitePages(wid, siteId, options = {}) {
4840
5157
  const params = new URLSearchParams();
4841
5158
  if (options.page) params.append("page", options.page.toString());
@@ -4847,36 +5164,43 @@ var SitesApi = class extends BaseApiClient {
4847
5164
  `w/${wid}/sites/${siteId}/pages${params.toString() ? `?${params.toString()}` : ""}`
4848
5165
  );
4849
5166
  }
5167
+ /** Get a single page by ID within a site. */
4850
5168
  async getPage(wid, siteId, pageId) {
4851
5169
  return this.fetch(`w/${wid}/sites/${siteId}/pages/${pageId}`);
4852
5170
  }
5171
+ /** Get a single page by its slug within a site. */
4853
5172
  async getPageBySlug(wid, siteId, slug) {
4854
5173
  return this.fetch(`w/${wid}/sites/${siteId}/pages/by-slug/${slug}`);
4855
5174
  }
5175
+ /** Create a new page within a site. */
4856
5176
  async createPage(wid, siteId, page) {
4857
5177
  return this.fetch(`w/${wid}/sites/${siteId}/pages`, {
4858
5178
  method: "POST",
4859
5179
  body: JSON.stringify(page)
4860
5180
  });
4861
5181
  }
5182
+ /** Update a page's content or metadata. */
4862
5183
  async updatePage(wid, siteId, pageId, page) {
4863
5184
  return this.fetch(`w/${wid}/sites/${siteId}/pages/${pageId}`, {
4864
5185
  method: "PUT",
4865
5186
  body: JSON.stringify(page)
4866
5187
  });
4867
5188
  }
5189
+ /** Delete a page from a site. */
4868
5190
  async deletePage(wid, siteId, pageId) {
4869
5191
  return this.fetch(`w/${wid}/sites/${siteId}/pages/${pageId}`, {
4870
5192
  method: "DELETE"
4871
5193
  });
4872
5194
  }
5195
+ /** Get aggregate counts (pages, menu items, etc.) for a site. */
4873
5196
  async getSiteCounts(wid, siteId) {
4874
5197
  return this.fetch(`w/${wid}/sites/${siteId}/counts`);
4875
5198
  }
4876
- // Menu management methods
5199
+ /** Get the full menu tree for a site. */
4877
5200
  async getSiteMenu(wid, siteId) {
4878
5201
  return this.fetch(`w/${wid}/sites/${siteId}/menu`);
4879
5202
  }
5203
+ /** List menu items for a site, optionally filtered by parent item. */
4880
5204
  async getMenuItems(wid, siteId, parentId) {
4881
5205
  const params = new URLSearchParams();
4882
5206
  if (parentId !== void 0 && parentId !== null) {
@@ -4887,36 +5211,41 @@ var SitesApi = class extends BaseApiClient {
4887
5211
  `w/${wid}/sites/${siteId}/menu/items${query ? `?${query}` : ""}`
4888
5212
  );
4889
5213
  }
5214
+ /** Create a new menu item in a site's navigation. */
4890
5215
  async createMenuItem(wid, siteId, item) {
4891
5216
  return this.fetch(`w/${wid}/sites/${siteId}/menu/items`, {
4892
5217
  method: "POST",
4893
5218
  body: JSON.stringify(item)
4894
5219
  });
4895
5220
  }
5221
+ /** Update a menu item's properties. */
4896
5222
  async updateMenuItem(wid, siteId, itemId, item) {
4897
5223
  return this.fetch(`w/${wid}/sites/${siteId}/menu/items/${itemId}`, {
4898
5224
  method: "PUT",
4899
5225
  body: JSON.stringify(item)
4900
5226
  });
4901
5227
  }
5228
+ /** Delete a menu item from a site's navigation. */
4902
5229
  async deleteMenuItem(wid, siteId, itemId) {
4903
5230
  return this.fetch(`w/${wid}/sites/${siteId}/menu/items/${itemId}`, {
4904
5231
  method: "DELETE"
4905
5232
  });
4906
5233
  }
5234
+ /** Reorder menu items within a site's navigation. */
4907
5235
  async reorderMenuItems(wid, siteId, data) {
4908
5236
  return this.fetch(`w/${wid}/sites/${siteId}/menu/reorder`, {
4909
5237
  method: "POST",
4910
5238
  body: JSON.stringify(data)
4911
5239
  });
4912
5240
  }
4913
- // Site media upload method
5241
+ /** Generate a pre-signed upload URL for site media content. */
4914
5242
  async generateSiteMediaUploadUrl(wid, siteId, uploadRequest) {
4915
5243
  return this.fetch(`w/${wid}/sites/${siteId}/media/upload-url`, {
4916
5244
  method: "POST",
4917
5245
  body: JSON.stringify(uploadRequest)
4918
5246
  });
4919
5247
  }
5248
+ /** Initiate Google OAuth flow for site-specific authentication. */
4920
5249
  async siteGoogleOAuthInitiate(wid, siteUuid, origin) {
4921
5250
  const params = new URLSearchParams({ origin });
4922
5251
  return this.fetch(
@@ -4925,24 +5254,29 @@ var SitesApi = class extends BaseApiClient {
4925
5254
  }
4926
5255
  };
4927
5256
  var SubscriptionsApi = class extends BaseApiClient {
5257
+ /** List all subscriptions for the current account. */
4928
5258
  async getSubscriptions() {
4929
5259
  return this.fetch("subscriptions");
4930
5260
  }
5261
+ /** List all subscriptions associated with a workspace. */
4931
5262
  async getWorkspaceSubscriptions(wid) {
4932
5263
  return this.fetch(`w/${wid}/subscriptions`);
4933
5264
  }
5265
+ /** Cancel an active subscription. */
4934
5266
  async cancelSubscription(subscriptionId) {
4935
5267
  return this.fetch(`subscriptions/${subscriptionId}/cancel`, {
4936
5268
  method: "POST",
4937
5269
  credentials: "include"
4938
5270
  });
4939
5271
  }
5272
+ /** Reactivate a previously cancelled subscription. */
4940
5273
  async reactivateSubscription(subscriptionId) {
4941
5274
  return this.fetch(`subscriptions/${subscriptionId}/reactivate`, {
4942
5275
  method: "POST",
4943
5276
  credentials: "include"
4944
5277
  });
4945
5278
  }
5279
+ /** Update a subscription's budget or plan period. */
4946
5280
  async updateSubscription(subscriptionId, updates) {
4947
5281
  return this.fetch(`subscriptions/${subscriptionId}`, {
4948
5282
  method: "PUT",
@@ -4953,6 +5287,7 @@ var SubscriptionsApi = class extends BaseApiClient {
4953
5287
  }
4954
5288
  });
4955
5289
  }
5290
+ /** Provision the member role associated with a subscription. */
4956
5291
  async provisionMemberRole(subscriptionId) {
4957
5292
  return this.fetch(`subscriptions/${subscriptionId}/provision-role`, {
4958
5293
  method: "POST",
@@ -4961,6 +5296,7 @@ var SubscriptionsApi = class extends BaseApiClient {
4961
5296
  }
4962
5297
  };
4963
5298
  var TasksApi = class extends BaseApiClient {
5299
+ /** List all tasks in a workspace, optionally filtering by workflow or including archived. */
4964
5300
  async getTasks(wid, options = {}) {
4965
5301
  const params = new URLSearchParams();
4966
5302
  if (options.includeArchived) {
@@ -4973,31 +5309,37 @@ var TasksApi = class extends BaseApiClient {
4973
5309
  `w/${wid}/tasks${params.toString() ? `?${params.toString()}` : ""}`
4974
5310
  );
4975
5311
  }
5312
+ /** Get a single task by ID. */
4976
5313
  async getTask(wid, id) {
4977
5314
  return this.fetch(`w/${wid}/tasks/${id}`);
4978
5315
  }
5316
+ /** Create a new task in a workspace. */
4979
5317
  async createTask(wid, task) {
4980
5318
  return this.fetch(`w/${wid}/tasks`, {
4981
5319
  method: "POST",
4982
5320
  body: JSON.stringify(task)
4983
5321
  });
4984
5322
  }
5323
+ /** Update an existing task with partial data. */
4985
5324
  async updateTask(wid, id, task) {
4986
5325
  return this.fetch(`w/${wid}/tasks/${id}`, {
4987
5326
  method: "PUT",
4988
5327
  body: JSON.stringify(task)
4989
5328
  });
4990
5329
  }
5330
+ /** Delete a task by ID. */
4991
5331
  async deleteTask(wid, id) {
4992
5332
  return this.fetch(`w/${wid}/tasks/${id}`, {
4993
5333
  method: "DELETE"
4994
5334
  });
4995
5335
  }
5336
+ /** Archive a task, hiding it from default listings. */
4996
5337
  async archiveTask(wid, id) {
4997
5338
  return this.fetch(`w/${wid}/tasks/${id}/archive`, {
4998
5339
  method: "PUT"
4999
5340
  });
5000
5341
  }
5342
+ /** Restore an archived task back to active status. */
5001
5343
  async unarchiveTask(wid, id) {
5002
5344
  return this.fetch(`w/${wid}/tasks/${id}/unarchive`, {
5003
5345
  method: "PUT"
@@ -5051,17 +5393,21 @@ var ToolkitsApi = class extends BaseApiClient {
5051
5393
  }
5052
5394
  };
5053
5395
  var WorkflowsApi = class extends BaseApiClient {
5396
+ /** List all workflows in a workspace, optionally including archived ones. */
5054
5397
  async getWorkflows(wid, archived = false) {
5055
5398
  const url = archived ? `w/${wid}/workflows?archived=true` : `w/${wid}/workflows`;
5056
5399
  return this.fetch(url);
5057
5400
  }
5401
+ /** Get a single workflow by ID. */
5058
5402
  async getWorkflow(wid, id) {
5059
5403
  return this.fetch(`w/${wid}/workflows/${id}`);
5060
5404
  }
5405
+ /** Get activity metrics for a single workflow. */
5061
5406
  async getWorkflowActivity(wid, id, options) {
5062
5407
  const params = options?.days ? `?days=${options.days}` : "";
5063
5408
  return this.fetch(`w/${wid}/workflows/${id}/activity${params}`);
5064
5409
  }
5410
+ /** Get activity metrics for multiple workflows in a single request. */
5065
5411
  async getWorkflowsActivityBatch(wid, workflowIds, options) {
5066
5412
  const params = new URLSearchParams();
5067
5413
  params.set("workflow_ids", workflowIds.join(","));
@@ -5070,6 +5416,7 @@ var WorkflowsApi = class extends BaseApiClient {
5070
5416
  `w/${wid}/workflows/activity/batch?${params.toString()}`
5071
5417
  );
5072
5418
  }
5419
+ /** Get the Mermaid diagram representation of a workflow. */
5073
5420
  async getWorkflowDiagram(wid, id) {
5074
5421
  return this.fetch(`w/${wid}/workflows/${id}/diagram`);
5075
5422
  }
@@ -5084,52 +5431,62 @@ var WorkflowsApi = class extends BaseApiClient {
5084
5431
  }
5085
5432
  return `${this.baseUrl}/api/v2/w/${wid}/workflows/${id}/thumbnail`;
5086
5433
  }
5434
+ /** Create a new workflow in a workspace. */
5087
5435
  async createWorkflow(wid, workflow) {
5088
5436
  return this.fetch(`w/${wid}/workflows`, {
5089
5437
  method: "POST",
5090
5438
  body: JSON.stringify(workflow)
5091
5439
  });
5092
5440
  }
5441
+ /** Update an existing workflow. */
5093
5442
  async updateWorkflow(wid, id, workflow) {
5094
5443
  return this.fetch(`w/${wid}/workflows/${id}`, {
5095
5444
  method: "PUT",
5096
5445
  body: JSON.stringify(workflow)
5097
5446
  });
5098
5447
  }
5448
+ /** Preview the impact of deleting a workflow, including affected tasks and assignments. */
5099
5449
  async getWorkflowDeletionPreview(wid, id) {
5100
5450
  return this.fetch(`w/${wid}/workflows/${id}/deletion-preview`);
5101
5451
  }
5452
+ /** Delete a workflow, optionally cascading to delete its tasks. */
5102
5453
  async deleteWorkflow(wid, id, cascade = false) {
5103
5454
  const url = cascade ? `w/${wid}/workflows/${id}?cascade=true` : `w/${wid}/workflows/${id}`;
5104
5455
  return this.fetch(url, {
5105
5456
  method: "DELETE"
5106
5457
  });
5107
5458
  }
5459
+ /** Archive a workflow. */
5108
5460
  async archiveWorkflow(wid, id) {
5109
5461
  return this.fetch(`w/${wid}/workflows/${id}/archive`, {
5110
5462
  method: "POST"
5111
5463
  });
5112
5464
  }
5465
+ /** Unarchive a previously archived workflow. */
5113
5466
  async unarchiveWorkflow(wid, id) {
5114
5467
  return this.fetch(`w/${wid}/workflows/${id}/unarchive`, {
5115
5468
  method: "POST"
5116
5469
  });
5117
5470
  }
5471
+ /** Clone a workflow with a new name. */
5118
5472
  async cloneWorkflow(wid, id, data) {
5119
5473
  return this.fetch(`w/${wid}/workflows/${id}/clone`, {
5120
5474
  method: "POST",
5121
5475
  body: JSON.stringify(data)
5122
5476
  });
5123
5477
  }
5478
+ /** List available workflow templates. */
5124
5479
  async getWorkflowTemplates(wid) {
5125
5480
  return this.fetch(`w/${wid}/workflows/templates`);
5126
5481
  }
5482
+ /** Create a new workflow from a template. */
5127
5483
  async createWorkflowFromTemplate(wid, templateUuid, data) {
5128
5484
  return this.fetch(`w/${wid}/workflows/templates/${templateUuid}/create-workflow`, {
5129
5485
  method: "POST",
5130
5486
  body: JSON.stringify(data)
5131
5487
  });
5132
5488
  }
5489
+ /** Get task assignment statistics for a workflow within an optional date range. */
5133
5490
  async getWorkflowTaskAssignmentStats(wid, id, fromDate, toDate) {
5134
5491
  const params = new URLSearchParams();
5135
5492
  if (fromDate) params.append("from_date", fromDate);
@@ -5138,6 +5495,7 @@ var WorkflowsApi = class extends BaseApiClient {
5138
5495
  `w/${wid}/workflows/${id}/task-assignment-stats?${params.toString()}`
5139
5496
  );
5140
5497
  }
5498
+ /** List chats for a specific task within a workflow. */
5141
5499
  async getTaskChats(wid, workflowId, taskId, fromDate, toDate, limit = 100, offset = 0) {
5142
5500
  const params = new URLSearchParams();
5143
5501
  if (fromDate) params.append("from_date", fromDate);
@@ -5149,15 +5507,18 @@ var WorkflowsApi = class extends BaseApiClient {
5149
5507
  );
5150
5508
  }
5151
5509
  // Workflow Contributors API
5510
+ /** List all contributors for a workflow. */
5152
5511
  async getWorkflowContributors(wid, workflowId) {
5153
5512
  return this.fetch(`w/${wid}/workflows/${workflowId}/contributors`);
5154
5513
  }
5514
+ /** Add a contributor to a workflow. */
5155
5515
  async createWorkflowContributor(wid, workflowId, data) {
5156
5516
  return this.fetch(`w/${wid}/workflows/${workflowId}/contributors`, {
5157
5517
  method: "POST",
5158
5518
  body: JSON.stringify(data)
5159
5519
  });
5160
5520
  }
5521
+ /** Update a workflow contributor's settings. */
5161
5522
  async updateWorkflowContributor(wid, workflowId, contributorId, data) {
5162
5523
  return this.fetch(
5163
5524
  `w/${wid}/workflows/${workflowId}/contributors/${contributorId}`,
@@ -5167,6 +5528,7 @@ var WorkflowsApi = class extends BaseApiClient {
5167
5528
  }
5168
5529
  );
5169
5530
  }
5531
+ /** Remove a contributor from a workflow. */
5170
5532
  async deleteWorkflowContributor(wid, workflowId, contributorId) {
5171
5533
  return this.fetch(
5172
5534
  `w/${wid}/workflows/${workflowId}/contributors/${contributorId}`,
@@ -5346,59 +5708,73 @@ var WorkspaceInvitationsApi = class extends BaseApiClient {
5346
5708
  }
5347
5709
  };
5348
5710
  var WorkspacesApi = class extends BaseApiClient {
5711
+ /** List all workspaces accessible to the current user. */
5349
5712
  async getWorkspaces() {
5350
5713
  return this.fetch("w/");
5351
5714
  }
5715
+ /** List all publicly visible workspaces. */
5352
5716
  async getPublicWorkspaces() {
5353
5717
  return this.fetch("w/public");
5354
5718
  }
5719
+ /** Get a single workspace by ID. */
5355
5720
  async getWorkspace(wid) {
5356
5721
  return this.fetch(`w/${wid}`);
5357
5722
  }
5723
+ /** Create a new workspace. */
5358
5724
  async createWorkspace(workspace) {
5359
5725
  return this.fetch("w/", {
5360
5726
  method: "POST",
5361
5727
  body: JSON.stringify(workspace)
5362
5728
  });
5363
5729
  }
5730
+ /** Update an existing workspace. */
5364
5731
  async updateWorkspace(wid, workspace) {
5365
5732
  return this.fetch(`w/${wid}`, {
5366
5733
  method: "PUT",
5367
5734
  body: JSON.stringify(workspace)
5368
5735
  });
5369
5736
  }
5737
+ /** Delete a workspace. */
5370
5738
  async deleteWorkspace(wid) {
5371
5739
  return this.fetch(`w/${wid}`, {
5372
5740
  method: "DELETE"
5373
5741
  });
5374
5742
  }
5743
+ /** Leave a workspace as the current user. */
5375
5744
  async leaveWorkspace(wid) {
5376
5745
  return this.fetch(`w/${wid}/me`, {
5377
5746
  method: "DELETE"
5378
5747
  });
5379
5748
  }
5749
+ /** Get the default settings for a workspace. */
5380
5750
  async getWorkspaceDefaults(wid) {
5381
5751
  return this.fetch(`w/${wid}/defaults`);
5382
5752
  }
5753
+ /** Update the default settings for a workspace. */
5383
5754
  async updateWorkspaceDefaults(wid, defaults) {
5384
5755
  return this.fetch(`w/${wid}/defaults`, {
5385
5756
  method: "PUT",
5386
5757
  body: JSON.stringify(defaults)
5387
5758
  });
5388
5759
  }
5760
+ /** Get entity counts (members, tasks, workflows, etc.) for a workspace. */
5389
5761
  async getWorkspaceCounts(wid) {
5390
5762
  return this.fetch(`w/${wid}/counts`);
5391
5763
  }
5764
+ /** Check whether the workspace is currently within business hours. */
5392
5765
  async getBusinessHoursStatus(wid) {
5393
5766
  return this.fetch(`w/${wid}/business-hours-status`);
5394
5767
  }
5768
+ /** List all available workspace feature flags from the registry. */
5395
5769
  async getAvailableWorkspaceFeatures() {
5396
5770
  const result = await this.fetch(`features/registry`);
5397
5771
  return result.features;
5398
5772
  }
5773
+ /** Get active notices for a workspace. */
5399
5774
  async getWorkspaceNotices(wid) {
5400
5775
  return this.fetch(`w/${wid}/notices`);
5401
5776
  }
5777
+ /** List notifications for the current user in a workspace. */
5402
5778
  async getNotifications(wid, options = {}) {
5403
5779
  const params = new URLSearchParams();
5404
5780
  if (options.page) params.append("page", options.page.toString());
@@ -5407,32 +5783,39 @@ var WorkspacesApi = class extends BaseApiClient {
5407
5783
  const url = `w/${wid}/notifications${queryString ? `?${queryString}` : ""}`;
5408
5784
  return this.fetch(url);
5409
5785
  }
5786
+ /** Get a single notification by ID. */
5410
5787
  async getNotification(wid, id) {
5411
5788
  return this.fetch(`w/${wid}/notifications/${id}`);
5412
5789
  }
5790
+ /** Get the count of unread notifications for the current user. */
5413
5791
  async getUnreadNotificationCount(wid) {
5414
5792
  return this.fetch(`w/${wid}/notifications/unread-count`);
5415
5793
  }
5794
+ /** Mark a notification as read. */
5416
5795
  async markNotificationAsRead(wid, id) {
5417
5796
  return this.fetch(`w/${wid}/notifications/${id}/read`, {
5418
5797
  method: "POST"
5419
5798
  });
5420
5799
  }
5800
+ /** Dismiss a single notification. */
5421
5801
  async dismissNotification(wid, id) {
5422
5802
  return this.fetch(`w/${wid}/notifications/${id}/dismiss`, {
5423
5803
  method: "POST"
5424
5804
  });
5425
5805
  }
5806
+ /** Dismiss all notifications for the current user in a workspace. */
5426
5807
  async dismissAllNotifications(wid) {
5427
5808
  return this.fetch(`w/${wid}/notifications/dismiss-all`, {
5428
5809
  method: "POST"
5429
5810
  });
5430
5811
  }
5431
5812
  // ===== Push Notifications =====
5813
+ /** Get the VAPID public key for Web Push subscription registration. */
5432
5814
  async getVapidPublicKey() {
5433
5815
  const response = await this.fetch("push/vapid-public-key");
5434
5816
  return response.publicKey;
5435
5817
  }
5818
+ /** Register a Web Push subscription for the current user. */
5436
5819
  async registerPushSubscription(wid, subscription) {
5437
5820
  return this.fetch(
5438
5821
  `w/${wid}/push-subscriptions`,
@@ -5442,6 +5825,7 @@ var WorkspacesApi = class extends BaseApiClient {
5442
5825
  }
5443
5826
  );
5444
5827
  }
5828
+ /** Unregister a Web Push subscription by endpoint URL. */
5445
5829
  async unregisterPushSubscription(wid, endpoint) {
5446
5830
  return this.fetch(
5447
5831
  `w/${wid}/push-subscriptions?endpoint=${encodeURIComponent(endpoint)}`,
@@ -5450,32 +5834,39 @@ var WorkspacesApi = class extends BaseApiClient {
5450
5834
  }
5451
5835
  );
5452
5836
  }
5837
+ /** List all active Web Push subscriptions for the current user. */
5453
5838
  async listPushSubscriptions(wid) {
5454
5839
  return this.fetch(`w/${wid}/push-subscriptions`);
5455
5840
  }
5841
+ /** List all client workspaces managed by this reseller workspace. */
5456
5842
  async getResellerWorkspaces(wid) {
5457
5843
  return this.fetch(`w/${wid}/reseller/workspaces`);
5458
5844
  }
5845
+ /** Create a new client workspace under a reseller workspace. */
5459
5846
  async createClientWorkspace(wid, data) {
5460
5847
  return this.fetch(`w/${wid}/reseller/workspaces`, {
5461
5848
  method: "POST",
5462
5849
  body: JSON.stringify(data)
5463
5850
  });
5464
5851
  }
5852
+ /** Get a single client workspace by ID. */
5465
5853
  async getClientWorkspace(wid, workspaceId) {
5466
5854
  return this.fetch(`w/${wid}/reseller/workspaces/${workspaceId}`);
5467
5855
  }
5856
+ /** Update a client workspace's name or slug. */
5468
5857
  async updateClientWorkspace(wid, workspaceId, data) {
5469
5858
  return this.fetch(`w/${wid}/reseller/workspaces/${workspaceId}`, {
5470
5859
  method: "PUT",
5471
5860
  body: JSON.stringify(data)
5472
5861
  });
5473
5862
  }
5863
+ /** Delete a client workspace. */
5474
5864
  async deleteClientWorkspace(wid, workspaceId) {
5475
5865
  return this.fetch(`w/${wid}/reseller/workspaces/${workspaceId}`, {
5476
5866
  method: "DELETE"
5477
5867
  });
5478
5868
  }
5869
+ /** Provision a client workspace, setting up its database and resources. */
5479
5870
  async provisionClientWorkspace(wid, workspaceId) {
5480
5871
  return this.fetch(
5481
5872
  `w/${wid}/reseller/workspaces/${workspaceId}/provision`,
@@ -5484,44 +5875,53 @@ var WorkspacesApi = class extends BaseApiClient {
5484
5875
  }
5485
5876
  );
5486
5877
  }
5878
+ /** List products available from a reseller workspace, optionally filtering by featured status. */
5487
5879
  async getProducts(wid, featured) {
5488
5880
  const params = featured !== void 0 ? `?featured=${featured}` : "";
5489
5881
  return this.fetch(`w/${wid}/reseller/products${params}`);
5490
5882
  }
5883
+ /** Get a product by ID using the global endpoint. */
5491
5884
  async getProduct(id) {
5492
5885
  return this.fetch(`products/${id}`);
5493
5886
  }
5887
+ /** Get a publicly accessible product by ID. */
5494
5888
  async getPublicProduct(id) {
5495
5889
  return this.fetch(`products/${id}`);
5496
5890
  }
5891
+ /** Create a new product for a reseller workspace. */
5497
5892
  async createProduct(wid, product) {
5498
5893
  return this.fetch(`w/${wid}/reseller/products`, {
5499
5894
  method: "POST",
5500
5895
  body: JSON.stringify(product)
5501
5896
  });
5502
5897
  }
5898
+ /** Update an existing product. */
5503
5899
  async updateProduct(wid, id, updates) {
5504
5900
  return this.fetch(`w/${wid}/reseller/products/${id}`, {
5505
5901
  method: "PUT",
5506
5902
  body: JSON.stringify(updates)
5507
5903
  });
5508
5904
  }
5905
+ /** Delete a product from a reseller workspace. */
5509
5906
  async deleteProduct(wid, id) {
5510
5907
  return this.fetch(`w/${wid}/reseller/products/${id}`, {
5511
5908
  method: "DELETE"
5512
5909
  });
5513
5910
  }
5514
5911
  // Workspace Secret Key
5912
+ /** Reset and regenerate the workspace secret key. */
5515
5913
  async resetWorkspaceSecretKey(wid) {
5516
5914
  return this.fetch(`w/${wid}/defaults/reset-secret-key`, {
5517
5915
  method: "POST"
5518
5916
  });
5519
5917
  }
5520
5918
  // Workspace Export/Import API
5919
+ /** Export workspace configuration, optionally scoped to a single workflow. */
5521
5920
  async exportWorkspace(wid, workflowId) {
5522
5921
  const params = workflowId ? `?workflow_id=${workflowId}` : "";
5523
5922
  return this.fetch(`w/${wid}/export${params}`);
5524
5923
  }
5924
+ /** Preview the result of importing workspace configuration without applying changes. */
5525
5925
  async previewWorkspaceImport(wid, exportData, importMappings, createNew, autoMap) {
5526
5926
  return this.fetch(`w/${wid}/preview-import`, {
5527
5927
  method: "POST",
@@ -5533,6 +5933,7 @@ var WorkspacesApi = class extends BaseApiClient {
5533
5933
  })
5534
5934
  });
5535
5935
  }
5936
+ /** Import workspace configuration from exported data. */
5536
5937
  async importWorkspace(wid, exportData, importMappings, createNew) {
5537
5938
  return this.fetch(`w/${wid}/import`, {
5538
5939
  method: "POST",
@@ -5543,6 +5944,7 @@ var WorkspacesApi = class extends BaseApiClient {
5543
5944
  })
5544
5945
  });
5545
5946
  }
5947
+ /** Preview a workspace import using the legacy untyped interface. */
5546
5948
  // Legacy method for backward compatibility
5547
5949
  async previewImportWorkspace(wid, exportData, importMappings = {}, createNew = {}) {
5548
5950
  return this.fetch(`w/${wid}/preview-import`, {
@@ -5554,9 +5956,11 @@ var WorkspacesApi = class extends BaseApiClient {
5554
5956
  })
5555
5957
  });
5556
5958
  }
5959
+ /** List available themes for a workspace. */
5557
5960
  async getWorkspaceThemes(wid) {
5558
5961
  return this.fetch(`w/${wid}/themes`);
5559
5962
  }
5963
+ /** Update the active themes for a workspace. */
5560
5964
  async updateWorkspaceThemes(wid, themes) {
5561
5965
  return this.fetch(`w/${wid}/themes`, {
5562
5966
  method: "PUT",
@@ -5665,24 +6069,29 @@ function formatAppContextAsMarkdown(context) {
5665
6069
  ${lines.join("\n")}`;
5666
6070
  }
5667
6071
  var WorkflowNotesApi = class extends BaseApiClient {
6072
+ /** List all notes for a specific workflow. */
5668
6073
  async getWorkflowNotes(wid, workflowId) {
5669
6074
  return this.fetch(`w/${wid}/workflow-notes?workflow_id=${workflowId}`);
5670
6075
  }
6076
+ /** Get a single workflow note by ID. */
5671
6077
  async getWorkflowNote(wid, id) {
5672
6078
  return this.fetch(`w/${wid}/workflow-notes/${id}`);
5673
6079
  }
6080
+ /** Create a new note on a workflow. */
5674
6081
  async createWorkflowNote(wid, note) {
5675
6082
  return this.fetch(`w/${wid}/workflow-notes`, {
5676
6083
  method: "POST",
5677
6084
  body: JSON.stringify(note)
5678
6085
  });
5679
6086
  }
6087
+ /** Update an existing workflow note with partial data. */
5680
6088
  async updateWorkflowNote(wid, id, note) {
5681
6089
  return this.fetch(`w/${wid}/workflow-notes/${id}`, {
5682
6090
  method: "PUT",
5683
6091
  body: JSON.stringify(note)
5684
6092
  });
5685
6093
  }
6094
+ /** Delete a workflow note by ID. */
5686
6095
  async deleteWorkflowNote(wid, id) {
5687
6096
  return this.fetch(`w/${wid}/workflow-notes/${id}`, {
5688
6097
  method: "DELETE"
@@ -6125,6 +6534,7 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, assistants, supe
6125
6534
  target.updateAssistant = assistants.updateAssistant.bind(assistants);
6126
6535
  target.deleteAssistant = assistants.deleteAssistant.bind(assistants);
6127
6536
  target.previewTTS = assistants.previewTTS.bind(assistants);
6537
+ target.previewThinkingSound = assistants.previewThinkingSound.bind(assistants);
6128
6538
  target.getSupervisors = supervisors.getSupervisors.bind(supervisors);
6129
6539
  target.getSupervisor = supervisors.getSupervisor.bind(supervisors);
6130
6540
  target.createSupervisor = supervisors.createSupervisor.bind(supervisors);
@@ -6206,6 +6616,8 @@ function bindToolkitsMethods(target, toolkits, templates, aiModels, customToolki
6206
6616
  target.getVariableRegistry = templates.getVariableRegistry.bind(templates);
6207
6617
  target.getChatModels = aiModels.getChatModels.bind(aiModels);
6208
6618
  target.getRealtimeModels = aiModels.getRealtimeModels.bind(aiModels);
6619
+ target.getSTTModels = aiModels.getSTTModels.bind(aiModels);
6620
+ target.getTTSModels = aiModels.getTTSModels.bind(aiModels);
6209
6621
  target.getVoiceModels = aiModels.getVoiceModels.bind(aiModels);
6210
6622
  target.getAllModels = aiModels.getAllModels.bind(aiModels);
6211
6623
  target.getCustomToolkits = customToolkits.getCustomToolkits.bind(customToolkits);
@@ -6802,6 +7214,7 @@ var GravityRailClient = class {
6802
7214
  updateAssistant;
6803
7215
  deleteAssistant;
6804
7216
  previewTTS;
7217
+ previewThinkingSound;
6805
7218
  getSupervisors;
6806
7219
  getSupervisor;
6807
7220
  createSupervisor;
@@ -6880,6 +7293,8 @@ var GravityRailClient = class {
6880
7293
  getVariableRegistry;
6881
7294
  getChatModels;
6882
7295
  getRealtimeModels;
7296
+ getSTTModels;
7297
+ getTTSModels;
6883
7298
  getVoiceModels;
6884
7299
  getAllModels;
6885
7300
  getCustomToolkits;
@@ -7160,7 +7575,7 @@ function getTTSProvider(ttsModel) {
7160
7575
  if (!ttsModel || ttsModel === "native") return ttsModel ?? null;
7161
7576
  return ttsModel.split(":")[0] ?? null;
7162
7577
  }
7163
- var TTS_PREVIEW_PROVIDERS = ["openai", "elevenlabs", "google", "aws"];
7578
+ var TTS_PREVIEW_PROVIDERS = ["openai", "elevenlabs", "google", "aws", "pocket"];
7164
7579
  function getVoiceModelId(assistant) {
7165
7580
  const config = assistant.realtimeModelConfig;
7166
7581
  return config?.voiceModel ?? null;
@@ -7271,8 +7686,11 @@ var CHAT_TYPES = {
7271
7686
  MANAGER: "manager",
7272
7687
  CONTRIBUTOR: "contributor",
7273
7688
  DEVELOPER: "developer",
7274
- AGENT: "agent",
7275
- DM: "dm"
7689
+ MEMBER: "member",
7690
+ /** @deprecated Use MEMBER instead */
7691
+ AGENT: "member",
7692
+ /** @deprecated Use MEMBER instead */
7693
+ DM: "member"
7276
7694
  };
7277
7695
  var BUILTIN_ASSISTANT_CHAT_TYPES = /* @__PURE__ */ new Set([
7278
7696
  CHAT_TYPES.MANAGER,
@@ -7281,7 +7699,7 @@ var BUILTIN_ASSISTANT_CHAT_TYPES = /* @__PURE__ */ new Set([
7281
7699
  ]);
7282
7700
  var NO_ASSISTANT_PARTICIPANT_CHAT_TYPES = /* @__PURE__ */ new Set([
7283
7701
  ...BUILTIN_ASSISTANT_CHAT_TYPES,
7284
- CHAT_TYPES.DM
7702
+ CHAT_TYPES.MEMBER
7285
7703
  ]);
7286
7704
  function usesBuiltinAssistant(chatType) {
7287
7705
  return BUILTIN_ASSISTANT_CHAT_TYPES.has(chatType);
@@ -8088,7 +8506,7 @@ var SCOPE_PRESETS = {
8088
8506
  ALL: Object.keys(SCOPES)
8089
8507
  };
8090
8508
 
8091
- // ../client/dist/chunk-JKJZGXAC.mjs
8509
+ // ../client/dist/chunk-HC6VELKR.mjs
8092
8510
  var AccessLevel = /* @__PURE__ */ ((AccessLevel2) => {
8093
8511
  AccessLevel2["PRIVATE"] = "private";
8094
8512
  AccessLevel2["PUBLIC"] = "public";
@@ -8483,6 +8901,7 @@ var TTS_MODEL_ELEVENLABS_TURBO = "elevenlabs:tts:eleven_turbo_v2_5";
8483
8901
  var TTS_MODEL_ELEVENLABS_MULTILINGUAL = "elevenlabs:tts:eleven_multilingual_v2";
8484
8902
  var TTS_MODEL_AWS_POLLY_GENERATIVE = "aws:tts:polly-generative";
8485
8903
  var TTS_MODEL_AWS_POLLY_NEURAL = "aws:tts:polly-neural";
8904
+ var TTS_MODEL_POCKET = "pocket:tts:default";
8486
8905
  var FhirVendor = /* @__PURE__ */ ((FhirVendor2) => {
8487
8906
  FhirVendor2["ECLINICALWORKS"] = "eclinicalworks";
8488
8907
  FhirVendor2["EPIC"] = "epic";
@@ -8645,6 +9064,7 @@ export {
8645
9064
  TTS_MODEL_ELEVENLABS_FLASH,
8646
9065
  TTS_MODEL_ELEVENLABS_MULTILINGUAL,
8647
9066
  TTS_MODEL_ELEVENLABS_TURBO,
9067
+ TTS_MODEL_POCKET,
8648
9068
  TTS_PREVIEW_PROVIDERS,
8649
9069
  TemplatesApi,
8650
9070
  ToolkitState,