@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.cjs CHANGED
@@ -98,6 +98,7 @@ __export(src_exports, {
98
98
  TTS_MODEL_ELEVENLABS_FLASH: () => TTS_MODEL_ELEVENLABS_FLASH,
99
99
  TTS_MODEL_ELEVENLABS_MULTILINGUAL: () => TTS_MODEL_ELEVENLABS_MULTILINGUAL,
100
100
  TTS_MODEL_ELEVENLABS_TURBO: () => TTS_MODEL_ELEVENLABS_TURBO,
101
+ TTS_MODEL_POCKET: () => TTS_MODEL_POCKET,
101
102
  TTS_PREVIEW_PROVIDERS: () => TTS_PREVIEW_PROVIDERS,
102
103
  TemplatesApi: () => TemplatesApi,
103
104
  ToolkitState: () => ToolkitState,
@@ -135,7 +136,7 @@ __export(src_exports, {
135
136
  });
136
137
  module.exports = __toCommonJS(src_exports);
137
138
 
138
- // ../client/dist/chunk-F5J4UVSB.mjs
139
+ // ../client/dist/chunk-WFQXAPII.mjs
139
140
  var import_libphonenumber_js = require("libphonenumber-js");
140
141
  function getCookieValue(name) {
141
142
  if (typeof document === "undefined") return void 0;
@@ -536,8 +537,7 @@ var AppsApi = class extends BaseApiClient {
536
537
  };
537
538
  var BuildersApi = class extends BaseApiClient {
538
539
  /**
539
- * List all builders
540
- * @param all - If true, return all (superuser access required)
540
+ * List all builders (optionally all with superuser access)
541
541
  */
542
542
  async listBuilders(all) {
543
543
  const params = new URLSearchParams();
@@ -548,7 +548,6 @@ var BuildersApi = class extends BaseApiClient {
548
548
  }
549
549
  /**
550
550
  * Get a specific builder by UUID
551
- * @param builderId - Builder UUID
552
551
  */
553
552
  async getBuilder(builderId) {
554
553
  return this.fetch(`builders/${builderId}`);
@@ -723,24 +722,29 @@ var OrgApi = class extends BaseApiClient {
723
722
  }
724
723
  };
725
724
  var SupervisorsApi = class extends BaseApiClient {
725
+ /** List all supervisors in a workspace. */
726
726
  async getSupervisors(wid) {
727
727
  return this.fetch(`w/${wid}/supervisors`);
728
728
  }
729
+ /** Get a single supervisor by ID. */
729
730
  async getSupervisor(wid, id) {
730
731
  return this.fetch(`w/${wid}/supervisors/${id}`);
731
732
  }
733
+ /** Create a new supervisor in a workspace. */
732
734
  async createSupervisor(wid, supervisor) {
733
735
  return this.fetch(`w/${wid}/supervisors`, {
734
736
  method: "POST",
735
737
  body: JSON.stringify(supervisor)
736
738
  });
737
739
  }
740
+ /** Update an existing supervisor with partial data. */
738
741
  async updateSupervisor(wid, id, supervisor) {
739
742
  return this.fetch(`w/${wid}/supervisors/${id}`, {
740
743
  method: "PUT",
741
744
  body: JSON.stringify(supervisor)
742
745
  });
743
746
  }
747
+ /** Delete a supervisor by ID. */
744
748
  async deleteSupervisor(wid, id) {
745
749
  return this.fetch(`w/${wid}/supervisors/${id}`, {
746
750
  method: "DELETE"
@@ -800,6 +804,7 @@ var AbilitiesApi = class extends BaseApiClient {
800
804
  }
801
805
  };
802
806
  var AccessGrantsApi = class extends BaseApiClient {
807
+ /** List access grants received by the current member. */
803
808
  async getMyReceivedGrants(wid, params) {
804
809
  const searchParams = new URLSearchParams();
805
810
  if (params?.status) searchParams.set("status", params.status);
@@ -810,6 +815,7 @@ var AccessGrantsApi = class extends BaseApiClient {
810
815
  `w/${wid}/access-grants/my/received${qs ? `?${qs}` : ""}`
811
816
  );
812
817
  }
818
+ /** List access grants given by the current member. */
813
819
  async getMyGivenGrants(wid, params) {
814
820
  const searchParams = new URLSearchParams();
815
821
  if (params?.status) searchParams.set("status", params.status);
@@ -820,39 +826,45 @@ var AccessGrantsApi = class extends BaseApiClient {
820
826
  `w/${wid}/access-grants/my/given${qs ? `?${qs}` : ""}`
821
827
  );
822
828
  }
829
+ /** Get a single access grant by UUID. */
823
830
  async getAccessGrant(wid, uuid) {
824
831
  return this.fetch(`w/${wid}/access-grants/${uuid}`);
825
832
  }
833
+ /** Create a new access grant for a resource. */
826
834
  async createAccessGrant(wid, data) {
827
835
  return this.fetch(`w/${wid}/access-grants`, {
828
836
  method: "POST",
829
837
  body: JSON.stringify(data)
830
838
  });
831
839
  }
840
+ /** Resolve a pending access grant by approving or denying it. */
832
841
  async resolveAccessGrant(wid, uuid, data) {
833
842
  return this.fetch(`w/${wid}/access-grants/${uuid}/resolve`, {
834
843
  method: "PUT",
835
844
  body: JSON.stringify(data)
836
845
  });
837
846
  }
847
+ /** Revoke a previously approved access grant. */
838
848
  async revokeAccessGrant(wid, uuid, data) {
839
849
  return this.fetch(`w/${wid}/access-grants/${uuid}/revoke`, {
840
850
  method: "PUT",
841
851
  body: JSON.stringify(data)
842
852
  });
843
853
  }
854
+ /** List all access grants with optional filtering by status, resource type, and resource ID. */
844
855
  async getAccessGrants(wid, params) {
845
856
  const searchParams = new URLSearchParams();
846
857
  if (params?.status) searchParams.set("status", params.status);
847
858
  if (params?.resourceType) searchParams.set("resource_type", params.resourceType);
848
859
  if (params?.resourceId) searchParams.set("resource_id", params.resourceId.toString());
849
860
  if (params?.page) searchParams.set("page", params.page.toString());
850
- if (params?.pageSize) searchParams.set("pageSize", params.pageSize.toString());
861
+ if (params?.pageSize) searchParams.set("page_size", params.pageSize.toString());
851
862
  const qs = searchParams.toString();
852
863
  return this.fetch(
853
864
  `w/${wid}/access-grants${qs ? `?${qs}` : ""}`
854
865
  );
855
866
  }
867
+ /** Get all access grants for a specific member. */
856
868
  async getMemberGrants(wid, memberId) {
857
869
  const resp = await this.fetch(
858
870
  `w/${wid}/access-grants/member/${memberId}`
@@ -1625,6 +1637,7 @@ var AdminApi = class extends BaseApiClient {
1625
1637
  }
1626
1638
  };
1627
1639
  var AgentsApi = class extends BaseApiClient {
1640
+ /** List agents in a workspace with optional pagination, sorting, and search. */
1628
1641
  async getAgents(wid, options = {}) {
1629
1642
  const params = new URLSearchParams();
1630
1643
  if (options.page) params.append("page", options.page.toString());
@@ -1638,32 +1651,38 @@ var AgentsApi = class extends BaseApiClient {
1638
1651
  `w/${wid}/agents${params.toString() ? `?${params.toString()}` : ""}`
1639
1652
  );
1640
1653
  }
1654
+ /** Get a single agent by ID. */
1641
1655
  async getAgent(wid, id) {
1642
1656
  return this.fetch(`w/${wid}/agents/${id}`);
1643
1657
  }
1658
+ /** Create a new agent in a workspace. */
1644
1659
  async createAgent(wid, agent) {
1645
1660
  return this.fetch(`w/${wid}/agents`, {
1646
1661
  method: "POST",
1647
1662
  body: JSON.stringify(agent)
1648
1663
  });
1649
1664
  }
1665
+ /** Update an existing agent. */
1650
1666
  async updateAgent(wid, id, agent) {
1651
1667
  return this.fetch(`w/${wid}/agents/${id}`, {
1652
1668
  method: "PUT",
1653
1669
  body: JSON.stringify(agent)
1654
1670
  });
1655
1671
  }
1672
+ /** Delete an agent by ID, optionally forcing deletion of agents with active references. */
1656
1673
  async deleteAgent(wid, id, force) {
1657
1674
  const params = force ? "?force=true" : "";
1658
1675
  return this.fetch(`w/${wid}/agents/${id}${params}`, {
1659
1676
  method: "DELETE"
1660
1677
  });
1661
1678
  }
1679
+ /** Archive an agent, hiding it from default listings. */
1662
1680
  async archiveAgent(wid, id) {
1663
1681
  return this.fetch(`w/${wid}/agents/${id}/archive`, {
1664
1682
  method: "POST"
1665
1683
  });
1666
1684
  }
1685
+ /** Restore an archived agent back to active status. */
1667
1686
  async unarchiveAgent(wid, id) {
1668
1687
  return this.fetch(`w/${wid}/agents/${id}/unarchive`, {
1669
1688
  method: "POST"
@@ -1746,30 +1765,36 @@ var AIModelsApi = class extends BaseApiClient {
1746
1765
  };
1747
1766
  var ApiKeysApi = class extends BaseApiClient {
1748
1767
  // Workspace-specific API key methods
1768
+ /** List all API keys for a workspace. */
1749
1769
  async getApiKeys(wid) {
1750
1770
  return this.fetch(`w/${wid}/api-keys`);
1751
1771
  }
1772
+ /** Create a new API key for a workspace. */
1752
1773
  async createApiKey(wid, apiKey) {
1753
1774
  return this.fetch(`w/${wid}/api-keys`, {
1754
1775
  method: "POST",
1755
1776
  body: JSON.stringify(apiKey)
1756
1777
  });
1757
1778
  }
1779
+ /** Revoke a workspace API key. */
1758
1780
  async revokeApiKey(wid, id) {
1759
1781
  return this.fetch(`w/${wid}/api-keys/${id}`, {
1760
1782
  method: "DELETE"
1761
1783
  });
1762
1784
  }
1763
1785
  // Global (account-level) API key methods
1786
+ /** List all account-level API keys. */
1764
1787
  async getGlobalApiKeys() {
1765
1788
  return this.fetch(`account/api-keys`);
1766
1789
  }
1790
+ /** Create a new account-level API key. */
1767
1791
  async createGlobalApiKey(apiKey) {
1768
1792
  return this.fetch(`account/api-keys`, {
1769
1793
  method: "POST",
1770
1794
  body: JSON.stringify(apiKey)
1771
1795
  });
1772
1796
  }
1797
+ /** Revoke an account-level API key. */
1773
1798
  async revokeGlobalApiKey(id) {
1774
1799
  return this.fetch(`account/api-keys/${id}`, {
1775
1800
  method: "DELETE"
@@ -1777,6 +1802,7 @@ var ApiKeysApi = class extends BaseApiClient {
1777
1802
  }
1778
1803
  };
1779
1804
  var AssignmentsApi = class extends BaseApiClient {
1805
+ /** List assignments with optional filtering, pagination, and sorting. */
1780
1806
  async getAssignments(wid, options = {}) {
1781
1807
  const params = new URLSearchParams();
1782
1808
  if (options.page) params.append("page", options.page.toString());
@@ -1791,56 +1817,68 @@ var AssignmentsApi = class extends BaseApiClient {
1791
1817
  `w/${wid}/assignments${params.toString() ? `?${params.toString()}` : ""}`
1792
1818
  );
1793
1819
  }
1820
+ /** Get a single assignment by ID. */
1794
1821
  async getAssignment(wid, id) {
1795
1822
  return this.fetch(`w/${wid}/assignments/${id}`);
1796
1823
  }
1824
+ /** Get all chat messages for an assignment. */
1797
1825
  async getAssignmentMessages(wid, id) {
1798
1826
  return this.fetch(`w/${wid}/assignments/${id}/messages`);
1799
1827
  }
1828
+ /** Update an assignment by ID. */
1800
1829
  async updateAssignment(wid, id, assignment) {
1801
1830
  return this.fetch(`w/${wid}/assignments/${id}`, {
1802
1831
  method: "PUT",
1803
1832
  body: JSON.stringify(assignment)
1804
1833
  });
1805
1834
  }
1835
+ /** Delete an assignment by ID. */
1806
1836
  async deleteAssignment(wid, id) {
1807
1837
  return this.fetch(`w/${wid}/assignments/${id}`, {
1808
1838
  method: "DELETE"
1809
1839
  });
1810
1840
  }
1841
+ /** Get a specific task within an assignment. */
1811
1842
  async getAssignmentTask(wid, id, assignmentTaskId) {
1812
1843
  return this.fetch(`w/${wid}/assignments/${id}/tasks/${assignmentTaskId}`);
1813
1844
  }
1845
+ /** Set the current active task for an assignment. */
1814
1846
  async selectCurrentAssignmentTask(wid, id, assignmentTaskId) {
1815
1847
  return this.fetch(`w/${wid}/assignments/${id}/tasks/${assignmentTaskId}/select`, {
1816
1848
  method: "PUT"
1817
1849
  });
1818
1850
  }
1851
+ /** Create a new assignment for a member. */
1819
1852
  async createAssignment(wid, data) {
1820
1853
  return this.fetch(`w/${wid}/assignments`, {
1821
1854
  method: "POST",
1822
1855
  body: JSON.stringify(data)
1823
1856
  });
1824
1857
  }
1858
+ /** Get the current task detail for an assignment from the operator perspective. */
1825
1859
  async getAssignmentTaskDetail(wid, assignmentId) {
1826
1860
  return this.fetch(
1827
1861
  `w/${wid}/assignments/${assignmentId}/current-task-detail`
1828
1862
  );
1829
1863
  }
1864
+ /** Get the CEL expression evaluation context for an assignment. */
1830
1865
  async getAssignmentCelContext(wid, assignmentId) {
1831
1866
  return this.fetch(
1832
1867
  `w/${wid}/assignments/${assignmentId}/cel-context`
1833
1868
  );
1834
1869
  }
1870
+ /** Cancel an active assignment with an optional reason. */
1835
1871
  async cancelAssignment(wid, id, data) {
1836
1872
  return this.fetch(`w/${wid}/assignments/${id}/cancel`, {
1837
1873
  method: "POST",
1838
1874
  body: JSON.stringify(data ?? {})
1839
1875
  });
1840
1876
  }
1877
+ /** List available tools for an assignment. */
1841
1878
  async getAssignmentTools(wid, assignmentId) {
1842
1879
  return this.fetch(`w/${wid}/assignments/${assignmentId}/tools`);
1843
1880
  }
1881
+ /** Execute a tool within an assignment context. */
1844
1882
  async executeAssignmentTool(wid, assignmentId, toolName, parameters = {}) {
1845
1883
  return this.fetch(`w/${wid}/assignments/${assignmentId}/execute-tool`, {
1846
1884
  method: "POST",
@@ -1849,6 +1887,7 @@ var AssignmentsApi = class extends BaseApiClient {
1849
1887
  }
1850
1888
  };
1851
1889
  var AssistantsApi = class extends BaseApiClient {
1890
+ /** List assistants in a workspace with optional pagination, sorting, and search. */
1852
1891
  async getAssistants(wid, options = {}) {
1853
1892
  const params = new URLSearchParams();
1854
1893
  if (options.page) params.append("page", options.page.toString());
@@ -1863,9 +1902,11 @@ var AssistantsApi = class extends BaseApiClient {
1863
1902
  `w/${wid}/assistants${params.toString() ? `?${params.toString()}` : ""}`
1864
1903
  );
1865
1904
  }
1905
+ /** Get a single assistant by ID. */
1866
1906
  async getAssistant(wid, id) {
1867
1907
  return this.fetch(`w/${wid}/assistants/${id}`);
1868
1908
  }
1909
+ /** Create a new assistant in a workspace. */
1869
1910
  async createAssistant(wid, assistant) {
1870
1911
  const assistantData = { ...assistant };
1871
1912
  return this.fetch(`w/${wid}/assistants`, {
@@ -1873,17 +1914,20 @@ var AssistantsApi = class extends BaseApiClient {
1873
1914
  body: JSON.stringify(assistantData)
1874
1915
  });
1875
1916
  }
1917
+ /** Update an existing assistant with partial data. */
1876
1918
  async updateAssistant(wid, id, assistant) {
1877
1919
  return this.fetch(`w/${wid}/assistants/${id}`, {
1878
1920
  method: "PUT",
1879
1921
  body: JSON.stringify(assistant)
1880
1922
  });
1881
1923
  }
1924
+ /** Delete an assistant by ID. */
1882
1925
  async deleteAssistant(wid, id) {
1883
1926
  return this.fetch(`w/${wid}/assistants/${id}`, {
1884
1927
  method: "DELETE"
1885
1928
  });
1886
1929
  }
1930
+ /** Generate a text-to-speech audio preview for a given voice model. */
1887
1931
  async previewTTS(wid, request) {
1888
1932
  const response = await this.fetchRaw(`w/${wid}/assistants/tts-preview`, {
1889
1933
  method: "POST",
@@ -1894,6 +1938,17 @@ var AssistantsApi = class extends BaseApiClient {
1894
1938
  });
1895
1939
  return response.arrayBuffer();
1896
1940
  }
1941
+ /** Generate a thinking sound audio preview. */
1942
+ async previewThinkingSound(wid, request) {
1943
+ const response = await this.fetchRaw(`w/${wid}/assistants/thinking-sound-preview`, {
1944
+ method: "POST",
1945
+ headers: {
1946
+ "Content-Type": "application/json"
1947
+ },
1948
+ body: JSON.stringify(request)
1949
+ });
1950
+ return response.arrayBuffer();
1951
+ }
1897
1952
  };
1898
1953
  function sanitizePhoneForBackend(phoneNumber) {
1899
1954
  try {
@@ -1909,15 +1964,18 @@ function sanitizePhoneForBackend(phoneNumber) {
1909
1964
  return phoneNumber;
1910
1965
  }
1911
1966
  var AuthApi = class extends BaseApiClient {
1967
+ /** Get the authenticated user's account. */
1912
1968
  async getUserAccount() {
1913
1969
  return this.fetch("account");
1914
1970
  }
1971
+ /** Update the authenticated user's account information. */
1915
1972
  async updateUserAccount(info) {
1916
1973
  return this.fetch("account", {
1917
1974
  method: "POST",
1918
1975
  body: JSON.stringify(info)
1919
1976
  });
1920
1977
  }
1978
+ /** Initiate SMS login by sending a verification code to the given phone number. */
1921
1979
  async login(phoneNumber, wid, organizationUuid) {
1922
1980
  const params = new URLSearchParams();
1923
1981
  if (wid) params.append("wid", wid);
@@ -1928,6 +1986,7 @@ var AuthApi = class extends BaseApiClient {
1928
1986
  body: JSON.stringify(body)
1929
1987
  });
1930
1988
  }
1989
+ /** Resend the SMS verification code to the given phone number. */
1931
1990
  async resendCode(phoneNumber, organizationUuid) {
1932
1991
  const body = { phoneNumber: sanitizePhoneForBackend(phoneNumber) };
1933
1992
  if (organizationUuid) body.organizationUuid = organizationUuid;
@@ -1936,6 +1995,7 @@ var AuthApi = class extends BaseApiClient {
1936
1995
  body: JSON.stringify(body)
1937
1996
  });
1938
1997
  }
1998
+ /** Verify an SMS code and complete authentication, handling 2FA if required. */
1939
1999
  async verifyCodeWith2FA(phoneNumber, code, organizationUuid) {
1940
2000
  const verifyResponse = await this.fetch("auth/verify-with-2fa", {
1941
2001
  method: "POST",
@@ -1963,33 +2023,39 @@ var AuthApi = class extends BaseApiClient {
1963
2023
  }
1964
2024
  return verifyResponse;
1965
2025
  }
2026
+ /** Log in with email and password credentials. */
1966
2027
  async emailPasswordLogin(email, password, organizationUuid) {
1967
2028
  return await this.fetch(`auth/email-password-login`, {
1968
2029
  method: "POST",
1969
2030
  body: JSON.stringify({ email, password, organizationUuid })
1970
2031
  });
1971
2032
  }
2033
+ /** Sign up a new account with email and password. */
1972
2034
  async emailPasswordSignup(email, password, name, organizationUuid) {
1973
2035
  return await this.fetch(`auth/email-password-signup`, {
1974
2036
  method: "POST",
1975
2037
  body: JSON.stringify({ email, password, name, organizationUuid })
1976
2038
  });
1977
2039
  }
2040
+ /** Change the current account password by providing the existing password. */
1978
2041
  async changePassword(currentPassword, newPassword) {
1979
2042
  return await this.fetch(`auth/change-password`, {
1980
2043
  method: "POST",
1981
2044
  body: JSON.stringify({ currentPassword, newPassword })
1982
2045
  });
1983
2046
  }
2047
+ /** Set a password for an account that does not yet have one. */
1984
2048
  async setPassword(newPassword) {
1985
2049
  return await this.fetch(`auth/set-password`, {
1986
2050
  method: "POST",
1987
2051
  body: JSON.stringify({ newPassword })
1988
2052
  });
1989
2053
  }
2054
+ /** Check whether the current account has a password set. */
1990
2055
  async getPasswordStatus() {
1991
2056
  return await this.fetch(`auth/password-status`);
1992
2057
  }
2058
+ /** Log out the current session by clearing auth cookies. */
1993
2059
  async logout() {
1994
2060
  const response = await fetch(`/api/auth/logout`, {
1995
2061
  method: "POST",
@@ -2000,22 +2066,24 @@ var AuthApi = class extends BaseApiClient {
2000
2066
  }
2001
2067
  return await response.json();
2002
2068
  }
2003
- // request a token from auth/cross-domain-token
2069
+ /** Request a cross-domain authentication token for single sign-on across domains. */
2004
2070
  async requestCrossDomainToken() {
2005
2071
  return this.fetch("auth/cross-domain-token", {
2006
2072
  method: "POST"
2007
2073
  });
2008
2074
  }
2075
+ /** Exchange a cross-domain token for an authenticated session token. */
2009
2076
  async exchangeToken(token) {
2010
2077
  return this.fetch("auth/exchange-token", {
2011
2078
  method: "POST",
2012
2079
  body: JSON.stringify({ token })
2013
2080
  });
2014
2081
  }
2082
+ /** Get the organization and workspace mapping for a custom domain. */
2015
2083
  async getDomainMapping(customDomain) {
2016
2084
  return this.fetch(`s/mapping/${customDomain}`);
2017
2085
  }
2018
- // Signup API (used by eval scripts)
2086
+ /** Create a new signup with member and data records for a workspace. */
2019
2087
  async createSignup(wid, data) {
2020
2088
  return this.fetch(`w/${wid}/create-signup`, {
2021
2089
  method: "POST",
@@ -2023,12 +2091,14 @@ var AuthApi = class extends BaseApiClient {
2023
2091
  });
2024
2092
  }
2025
2093
  // ===== MAGIC LINK AUTHENTICATION METHODS =====
2094
+ /** Request a magic link to be sent to the given email address for passwordless login. */
2026
2095
  async requestMagicLink(email, organizationUuid, redirectUrl) {
2027
2096
  return await this.fetch(`auth/request-magic-link`, {
2028
2097
  method: "POST",
2029
2098
  body: JSON.stringify({ email, organizationUuid, redirectUrl })
2030
2099
  });
2031
2100
  }
2101
+ /** Validate a magic link token and optional OTP to complete authentication. */
2032
2102
  async validateMagicLink(token, otp) {
2033
2103
  const body = { token };
2034
2104
  if (otp) {
@@ -2040,12 +2110,14 @@ var AuthApi = class extends BaseApiClient {
2040
2110
  });
2041
2111
  }
2042
2112
  // ===== EMAIL VERIFICATION METHODS =====
2113
+ /** Send a verification code to the given email address for login. */
2043
2114
  async sendEmailVerification(email, organizationUuid) {
2044
2115
  return await this.fetch(`auth/send-email-verification`, {
2045
2116
  method: "POST",
2046
2117
  body: JSON.stringify({ email, organizationUuid })
2047
2118
  });
2048
2119
  }
2120
+ /** Verify an email code and complete authentication, handling 2FA if required. */
2049
2121
  async verifyEmail(email, code, organizationUuid) {
2050
2122
  const verifyResponse = await this.fetch(`auth/verify-email`, {
2051
2123
  method: "POST",
@@ -2068,44 +2140,52 @@ var AuthApi = class extends BaseApiClient {
2068
2140
  return verifyResponse;
2069
2141
  }
2070
2142
  // ===== TWO-FACTOR AUTHENTICATION METHODS =====
2143
+ /** Get the current two-factor authentication status and configured methods. */
2071
2144
  async getTwoFactorStatus() {
2072
2145
  return this.fetch("auth/2fa/status");
2073
2146
  }
2147
+ /** Initiate TOTP two-factor setup and receive the secret and QR code URI. */
2074
2148
  async setupTOTP(data) {
2075
2149
  return this.fetch("auth/2fa/totp/setup", {
2076
2150
  method: "POST",
2077
2151
  body: JSON.stringify(data)
2078
2152
  });
2079
2153
  }
2154
+ /** Verify a TOTP code to complete two-factor setup. */
2080
2155
  async verifyTOTPSetup(data) {
2081
2156
  return this.fetch("auth/2fa/totp/verify", {
2082
2157
  method: "POST",
2083
2158
  body: JSON.stringify(data)
2084
2159
  });
2085
2160
  }
2161
+ /** Initiate WebAuthn (passkey/security key) two-factor setup. */
2086
2162
  async setupWebAuthn(data) {
2087
2163
  return this.fetch("auth/2fa/webauthn/setup", {
2088
2164
  method: "POST",
2089
2165
  body: JSON.stringify(data)
2090
2166
  });
2091
2167
  }
2168
+ /** Verify a WebAuthn assertion to complete two-factor setup. */
2092
2169
  async verifyWebAuthnSetup(data) {
2093
2170
  return this.fetch("auth/2fa/webauthn/verify", {
2094
2171
  method: "POST",
2095
2172
  body: JSON.stringify(data)
2096
2173
  });
2097
2174
  }
2175
+ /** Generate new two-factor recovery codes, invalidating any existing ones. */
2098
2176
  async generateRecoveryCodes(data = {}) {
2099
2177
  return this.fetch("auth/2fa/recovery-codes/generate", {
2100
2178
  method: "POST",
2101
2179
  body: JSON.stringify(data)
2102
2180
  });
2103
2181
  }
2182
+ /** Disable a specific two-factor authentication method. */
2104
2183
  async disableTwoFactorMethod(methodId) {
2105
2184
  return this.fetch(`auth/2fa/methods/${methodId}`, {
2106
2185
  method: "DELETE"
2107
2186
  });
2108
2187
  }
2188
+ /** Update settings for a two-factor authentication method. */
2109
2189
  async updateTwoFactorMethod(data) {
2110
2190
  return this.fetch(`auth/2fa/methods/${data.methodId}`, {
2111
2191
  method: "PUT",
@@ -2113,6 +2193,7 @@ var AuthApi = class extends BaseApiClient {
2113
2193
  });
2114
2194
  }
2115
2195
  // ===== TWO-FACTOR AUTHENTICATION LOGIN METHODS =====
2196
+ /** Verify a TOTP code during login to complete two-factor authentication. */
2116
2197
  async verifyTOTPAuth(tempToken, code) {
2117
2198
  return this.fetch("auth/2fa/auth/totp", {
2118
2199
  method: "POST",
@@ -2122,6 +2203,7 @@ var AuthApi = class extends BaseApiClient {
2122
2203
  })
2123
2204
  });
2124
2205
  }
2206
+ /** Verify a recovery code during login to complete two-factor authentication. */
2125
2207
  async verifyRecoveryCodeAuth(tempToken, code) {
2126
2208
  return this.fetch("auth/2fa/auth/recovery", {
2127
2209
  method: "POST",
@@ -2131,6 +2213,7 @@ var AuthApi = class extends BaseApiClient {
2131
2213
  })
2132
2214
  });
2133
2215
  }
2216
+ /** Get WebAuthn credential request options for two-factor login verification. */
2134
2217
  async getWebAuthnAuthOptions(tempToken) {
2135
2218
  return this.fetch("auth/2fa/webauthn/options", {
2136
2219
  method: "POST",
@@ -2139,6 +2222,7 @@ var AuthApi = class extends BaseApiClient {
2139
2222
  })
2140
2223
  });
2141
2224
  }
2225
+ /** Verify a WebAuthn assertion during login to complete two-factor authentication. */
2142
2226
  async verifyWebAuthnAuth(tempToken, assertionResponse) {
2143
2227
  return this.fetch("auth/2fa/webauthn", {
2144
2228
  method: "POST",
@@ -2149,6 +2233,7 @@ var AuthApi = class extends BaseApiClient {
2149
2233
  });
2150
2234
  }
2151
2235
  // ===== ORGANIZATION MEMBERSHIP METHODS =====
2236
+ /** List all organizations the current account belongs to. */
2152
2237
  async getMyOrganizations() {
2153
2238
  return this.fetch("o/mine");
2154
2239
  }
@@ -2214,7 +2299,7 @@ var AuthApi = class extends BaseApiClient {
2214
2299
  }
2215
2300
  };
2216
2301
  var CalendarsApi = class extends BaseApiClient {
2217
- // Calendar CRUD
2302
+ /** List calendars in a workspace with optional pagination. */
2218
2303
  async getCalendars(wid, params) {
2219
2304
  const queryParams = new URLSearchParams();
2220
2305
  if (params?.page) queryParams.append("page", params.page.toString());
@@ -2225,6 +2310,7 @@ var CalendarsApi = class extends BaseApiClient {
2225
2310
  `w/${wid}/calendars${queryString ? `?${queryString}` : ""}`
2226
2311
  );
2227
2312
  }
2313
+ /** Get a single calendar by ID, optionally including its schedules. */
2228
2314
  async getCalendar(wid, id, includeSchedules) {
2229
2315
  const params = new URLSearchParams();
2230
2316
  if (includeSchedules) params.append("include_schedules", "true");
@@ -2232,33 +2318,38 @@ var CalendarsApi = class extends BaseApiClient {
2232
2318
  `w/${wid}/calendars/${id}${params.toString() ? `?${params.toString()}` : ""}`
2233
2319
  );
2234
2320
  }
2321
+ /** Create a new calendar in the workspace. */
2235
2322
  async createCalendar(wid, calendar) {
2236
2323
  return this.fetch(`w/${wid}/calendars`, {
2237
2324
  method: "POST",
2238
2325
  body: JSON.stringify(calendar)
2239
2326
  });
2240
2327
  }
2328
+ /** Update a calendar's configuration. */
2241
2329
  async updateCalendar(wid, id, calendar) {
2242
2330
  return this.fetch(`w/${wid}/calendars/${id}`, {
2243
2331
  method: "PUT",
2244
2332
  body: JSON.stringify(calendar)
2245
2333
  });
2246
2334
  }
2335
+ /** Delete a calendar by ID. */
2247
2336
  async deleteCalendar(wid, id) {
2248
2337
  return this.fetch(`w/${wid}/calendars/${id}`, {
2249
2338
  method: "DELETE"
2250
2339
  });
2251
2340
  }
2252
- // Calendar Schedules
2341
+ /** List all schedules for a calendar. */
2253
2342
  async getCalendarSchedules(wid, calendarId) {
2254
2343
  return this.fetch(`w/${wid}/calendars/${calendarId}/schedules`);
2255
2344
  }
2345
+ /** Create a new schedule for a calendar. */
2256
2346
  async createCalendarSchedule(wid, calendarId, schedule) {
2257
2347
  return this.fetch(`w/${wid}/calendars/${calendarId}/schedules`, {
2258
2348
  method: "POST",
2259
2349
  body: JSON.stringify(schedule)
2260
2350
  });
2261
2351
  }
2352
+ /** Update an existing calendar schedule. */
2262
2353
  async updateCalendarSchedule(wid, calendarId, scheduleId, schedule) {
2263
2354
  return this.fetch(
2264
2355
  `w/${wid}/calendars/${calendarId}/schedules/${scheduleId}`,
@@ -2268,18 +2359,20 @@ var CalendarsApi = class extends BaseApiClient {
2268
2359
  }
2269
2360
  );
2270
2361
  }
2362
+ /** Delete a calendar schedule. */
2271
2363
  async deleteCalendarSchedule(wid, calendarId, scheduleId) {
2272
2364
  return this.fetch(`w/${wid}/calendars/${calendarId}/schedules/${scheduleId}`, {
2273
2365
  method: "DELETE"
2274
2366
  });
2275
2367
  }
2276
- // Availability
2368
+ /** Check availability for a time range on a calendar. */
2277
2369
  async checkAvailability(wid, calendarId, check) {
2278
2370
  return this.fetch(`w/${wid}/calendars/${calendarId}/availability`, {
2279
2371
  method: "POST",
2280
2372
  body: JSON.stringify(check)
2281
2373
  });
2282
2374
  }
2375
+ /** Get available booking slots for a calendar within a date range. */
2283
2376
  async getAvailableSlots(wid, calendarId, request) {
2284
2377
  return this.fetch(
2285
2378
  `w/${wid}/calendars/${calendarId}/available-slots`,
@@ -2289,7 +2382,7 @@ var CalendarsApi = class extends BaseApiClient {
2289
2382
  }
2290
2383
  );
2291
2384
  }
2292
- // Calendar Events
2385
+ /** List calendar events with optional filtering by date range, status, and member. */
2293
2386
  async getCalendarEvents(wid, options = {}) {
2294
2387
  const params = new URLSearchParams();
2295
2388
  if (options.calendarId) params.append("calendarId", options.calendarId.toString());
@@ -2303,70 +2396,80 @@ var CalendarsApi = class extends BaseApiClient {
2303
2396
  `w/${wid}/calendar-events${params.toString() ? `?${params.toString()}` : ""}`
2304
2397
  );
2305
2398
  }
2399
+ /** Get a single calendar event by ID. */
2306
2400
  async getCalendarEvent(wid, eventId) {
2307
2401
  return this.fetch(`w/${wid}/calendar-events/${eventId}`);
2308
2402
  }
2403
+ /** Create a new calendar event. */
2309
2404
  async createCalendarEvent(wid, event) {
2310
2405
  return this.fetch(`w/${wid}/calendar-events`, {
2311
2406
  method: "POST",
2312
2407
  body: JSON.stringify(event)
2313
2408
  });
2314
2409
  }
2410
+ /** Update an existing calendar event. */
2315
2411
  async updateCalendarEvent(wid, eventId, event) {
2316
2412
  return this.fetch(`w/${wid}/calendar-events/${eventId}`, {
2317
2413
  method: "PUT",
2318
2414
  body: JSON.stringify(event)
2319
2415
  });
2320
2416
  }
2417
+ /** Cancel a calendar event with an optional reason. */
2321
2418
  async cancelCalendarEvent(wid, eventId, reason) {
2322
2419
  return this.fetch(`w/${wid}/calendar-events/${eventId}/cancel`, {
2323
2420
  method: "POST",
2324
2421
  body: JSON.stringify({ cancellationReason: reason })
2325
2422
  });
2326
2423
  }
2424
+ /** Delete a calendar event by ID. */
2327
2425
  async deleteCalendarEvent(wid, eventId) {
2328
2426
  return this.fetch(`w/${wid}/calendar-events/${eventId}`, {
2329
2427
  method: "DELETE"
2330
2428
  });
2331
2429
  }
2332
- // Event attendees
2430
+ /** Update an attendee's details on a calendar event. */
2333
2431
  async updateEventAttendee(wid, eventId, attendeeId, update) {
2334
2432
  return this.fetch(`w/${wid}/calendar-events/${eventId}/attendees/${attendeeId}`, {
2335
2433
  method: "PUT",
2336
2434
  body: JSON.stringify(update)
2337
2435
  });
2338
2436
  }
2339
- // Event Types
2437
+ /** List all calendar event types in the workspace. */
2340
2438
  async getEventTypes(wid) {
2341
2439
  return this.fetch(`w/${wid}/calendar-event-types`);
2342
2440
  }
2441
+ /** Get a single calendar event type by ID. */
2343
2442
  async getEventType(wid, id) {
2344
2443
  return this.fetch(`w/${wid}/calendar-event-types/${id}`);
2345
2444
  }
2445
+ /** Create a new calendar event type. */
2346
2446
  async createEventType(wid, eventType) {
2347
2447
  return this.fetch(`w/${wid}/calendar-event-types`, {
2348
2448
  method: "POST",
2349
2449
  body: JSON.stringify(eventType)
2350
2450
  });
2351
2451
  }
2452
+ /** Update an existing calendar event type. */
2352
2453
  async updateEventType(wid, id, eventType) {
2353
2454
  return this.fetch(`w/${wid}/calendar-event-types/${id}`, {
2354
2455
  method: "PUT",
2355
2456
  body: JSON.stringify(eventType)
2356
2457
  });
2357
2458
  }
2459
+ /** Delete a calendar event type by ID. */
2358
2460
  async deleteEventType(wid, id) {
2359
2461
  return this.fetch(`w/${wid}/calendar-event-types/${id}`, {
2360
2462
  method: "DELETE"
2361
2463
  });
2362
2464
  }
2363
- // iCal Feed Management
2465
+ /** Generate or regenerate an iCal feed token for a calendar. */
2364
2466
  async generateICalToken(wid, calendarId, regenerate = false) {
2365
2467
  return this.fetch(`w/${wid}/calendars/${calendarId}/ical-token`, {
2366
2468
  method: "POST",
2367
2469
  body: JSON.stringify({ regenerate })
2368
2470
  });
2369
2471
  }
2472
+ /** Revoke the iCal feed token for a calendar, disabling external feed access. */
2370
2473
  async revokeICalToken(wid, calendarId) {
2371
2474
  return this.fetch(
2372
2475
  `w/${wid}/calendars/${calendarId}/ical-token`,
@@ -2375,29 +2478,34 @@ var CalendarsApi = class extends BaseApiClient {
2375
2478
  }
2376
2479
  );
2377
2480
  }
2481
+ /** Get the iCal feed URL for a calendar. */
2378
2482
  async getICalFeedUrl(wid, calendarId) {
2379
2483
  return this.fetch(`w/${wid}/calendars/${calendarId}/ical-url`);
2380
2484
  }
2381
- // Google Calendar Integration
2485
+ /** List Google Calendars available for linking. */
2382
2486
  async listGoogleCalendars(wid) {
2383
2487
  return this.fetch(`w/${wid}/calendars/google/list`);
2384
2488
  }
2489
+ /** Get the Google Calendar integration status for the workspace. */
2385
2490
  async getGoogleCalendarStatus(wid) {
2386
2491
  return this.fetch(
2387
2492
  `w/${wid}/calendars/google/status`
2388
2493
  );
2389
2494
  }
2495
+ /** Link a calendar to a Google Calendar for two-way sync. */
2390
2496
  async linkCalendarToGoogle(wid, calendarId, request) {
2391
2497
  return this.fetch(`w/${wid}/calendars/${calendarId}/google/link`, {
2392
2498
  method: "POST",
2393
2499
  body: JSON.stringify(request)
2394
2500
  });
2395
2501
  }
2502
+ /** Unlink a calendar from its connected Google Calendar. */
2396
2503
  async unlinkCalendarFromGoogle(wid, calendarId) {
2397
2504
  return this.fetch(`w/${wid}/calendars/${calendarId}/google/link`, {
2398
2505
  method: "DELETE"
2399
2506
  });
2400
2507
  }
2508
+ /** Trigger a manual sync between a calendar and its linked Google Calendar. */
2401
2509
  async syncCalendarWithGoogle(wid, calendarId) {
2402
2510
  return this.fetch(`w/${wid}/calendars/${calendarId}/google/sync`, {
2403
2511
  method: "POST"
@@ -2405,15 +2513,18 @@ var CalendarsApi = class extends BaseApiClient {
2405
2513
  }
2406
2514
  };
2407
2515
  var CallsApi = class extends BaseApiClient {
2516
+ /** Initiate a new outbound call. */
2408
2517
  async initiateCall(wid, request) {
2409
2518
  return this.fetch(`w/${wid}/call`, {
2410
2519
  method: "POST",
2411
2520
  body: JSON.stringify(request)
2412
2521
  });
2413
2522
  }
2523
+ /** Get a voice authentication token for real-time audio. */
2414
2524
  async getVoiceToken(wid) {
2415
2525
  return this.fetch(`w/${wid}/voice/token`);
2416
2526
  }
2527
+ /** Get message timing data for a chat recording. */
2417
2528
  async getMessageTiming(wid, chatId) {
2418
2529
  return this.fetch(`w/${wid}/recordings/chat/${chatId}/message-timing`);
2419
2530
  }
@@ -2451,6 +2562,7 @@ var ChatsApi = class extends BaseApiClient {
2451
2562
  }
2452
2563
  return params;
2453
2564
  }
2565
+ /** List chats with optional filtering, sorting, and pagination. */
2454
2566
  async getChats(wid, options = {}) {
2455
2567
  const params = this.buildChatsQueryParams(options, true);
2456
2568
  const queryString = params.toString();
@@ -2458,6 +2570,7 @@ var ChatsApi = class extends BaseApiClient {
2458
2570
  `w/${wid}/chats${queryString ? `?${queryString}` : ""}`
2459
2571
  );
2460
2572
  }
2573
+ /** Export multiple chats as a downloadable blob. */
2461
2574
  async exportChats(wid, options = {}) {
2462
2575
  const params = this.buildChatsQueryParams(options, false);
2463
2576
  const queryString = params.toString();
@@ -2466,27 +2579,34 @@ var ChatsApi = class extends BaseApiClient {
2466
2579
  );
2467
2580
  return response.blob();
2468
2581
  }
2582
+ /** Export a single chat in the specified format as a downloadable blob. */
2469
2583
  async exportChat(wid, chatId, format = "jsonl") {
2470
2584
  const response = await this.fetchRaw(`w/${wid}/chats/${chatId}/export?format=${format}`);
2471
2585
  return response.blob();
2472
2586
  }
2587
+ /** Get a single chat by ID. */
2473
2588
  async getChat(wid, id) {
2474
2589
  return this.fetch(`w/${wid}/chats/${id}`);
2475
2590
  }
2591
+ /** Get token usage statistics for a chat. */
2476
2592
  async getChatTokenUsage(wid, chatId) {
2477
2593
  return this.fetch(`w/${wid}/chats/${chatId}/token-usage`);
2478
2594
  }
2595
+ /** Get todo items extracted from a chat. */
2479
2596
  async getChatTodos(wid, chatId) {
2480
2597
  return this.fetch(`w/${wid}/chats/${chatId}/todos`);
2481
2598
  }
2599
+ /** Get loaded and revealed skills for a chat. */
2482
2600
  async getChatSkills(wid, chatId) {
2483
2601
  return this.fetch(
2484
2602
  `w/${wid}/chats/${chatId}/skills`
2485
2603
  );
2486
2604
  }
2605
+ /** List chat IDs that need a response. */
2487
2606
  async getChatsNeedsResponse(wid) {
2488
2607
  return this.fetch(`w/${wid}/chats/needs-response`);
2489
2608
  }
2609
+ /** Get daily chat creation statistics with optional filtering. */
2490
2610
  async getChatsDailyCreationStats(wid, options) {
2491
2611
  const params = new URLSearchParams();
2492
2612
  if (options?.archived !== void 0) params.append("archived", options.archived.toString());
@@ -2496,40 +2616,47 @@ var ChatsApi = class extends BaseApiClient {
2496
2616
  `w/${wid}/chats/stats/daily-creation${queryString ? `?${queryString}` : ""}`
2497
2617
  );
2498
2618
  }
2619
+ /** Archive a chat. */
2499
2620
  async archiveChat(wid, id) {
2500
2621
  return this.fetch(`w/${wid}/chats/${id}/archive`, {
2501
2622
  method: "PUT"
2502
2623
  });
2503
2624
  }
2625
+ /** Unarchive a chat. */
2504
2626
  async unarchiveChat(wid, id) {
2505
2627
  return this.fetch(`w/${wid}/chats/${id}/unarchive`, {
2506
2628
  method: "PUT"
2507
2629
  });
2508
2630
  }
2631
+ /** Create a new chat. */
2509
2632
  async createChat(wid, chat) {
2510
2633
  return this.fetch(`w/${wid}/chats`, {
2511
2634
  method: "POST",
2512
2635
  body: JSON.stringify(chat)
2513
2636
  });
2514
2637
  }
2638
+ /** Delete a chat, optionally providing a reason. */
2515
2639
  async deleteChat(wid, id, reason) {
2516
2640
  return this.fetch(`w/${wid}/chats/${id}`, {
2517
2641
  method: "DELETE",
2518
2642
  body: reason ? JSON.stringify({ reason }) : void 0
2519
2643
  });
2520
2644
  }
2645
+ /** Update a chat's properties. */
2521
2646
  async updateChat(wid, id, chat) {
2522
2647
  return this.fetch(`w/${wid}/chats/${id}`, {
2523
2648
  method: "PUT",
2524
2649
  body: JSON.stringify(chat)
2525
2650
  });
2526
2651
  }
2652
+ /** Update the mute status of a chat. */
2527
2653
  async updateChatMute(wid, id, muted) {
2528
2654
  return this.fetch(`w/${wid}/chats/${id}/mute`, {
2529
2655
  method: "PUT",
2530
2656
  body: JSON.stringify({ muted })
2531
2657
  });
2532
2658
  }
2659
+ /** Update the needs-response flag on a chat. */
2533
2660
  async updateChatNeedsResponse(wid, id, needsResponse) {
2534
2661
  return this.fetch(
2535
2662
  `w/${wid}/chats/${id}/needs-response`,
@@ -2539,6 +2666,7 @@ var ChatsApi = class extends BaseApiClient {
2539
2666
  }
2540
2667
  );
2541
2668
  }
2669
+ /** Generate an AI summary for a chat, optionally updating its labels. */
2542
2670
  async summarizeChat(wid, id, updateLabels) {
2543
2671
  const params = new URLSearchParams();
2544
2672
  if (updateLabels !== void 0) {
@@ -2551,6 +2679,7 @@ var ChatsApi = class extends BaseApiClient {
2551
2679
  }
2552
2680
  );
2553
2681
  }
2682
+ /** List messages in a chat with optional pagination. */
2554
2683
  async getChatMessages(wid, id, limit, offset) {
2555
2684
  const params = new URLSearchParams();
2556
2685
  if (limit) params.append("limit", limit.toString());
@@ -2559,6 +2688,7 @@ var ChatsApi = class extends BaseApiClient {
2559
2688
  `w/${wid}/chats/${id}/messages${params.toString() ? `?${params.toString()}` : ""}`
2560
2689
  );
2561
2690
  }
2691
+ /** List messages associated with a specific tool call in a chat. */
2562
2692
  async getChatToolCallMessages(wid, chatId, callId, limit = 100, offset = 0) {
2563
2693
  const params = new URLSearchParams();
2564
2694
  params.append("limit", limit.toString());
@@ -2567,15 +2697,18 @@ var ChatsApi = class extends BaseApiClient {
2567
2697
  `w/${wid}/chats/${chatId}/tool-calls/${callId}/messages?${params.toString()}`
2568
2698
  );
2569
2699
  }
2700
+ /** Get the tools available in a chat. */
2570
2701
  async getChatTools(wid, chatId) {
2571
2702
  return this.fetch(`w/${wid}/chats/${chatId}/tools`);
2572
2703
  }
2704
+ /** Initiate an outbound phone call from a chat. */
2573
2705
  async initiateOutboundCall(wid, chatId, phoneNumberId) {
2574
2706
  return this.fetch(`w/${wid}/chats/${chatId}/outbound-call`, {
2575
2707
  method: "POST",
2576
2708
  body: JSON.stringify({ phoneNumberId, chatId })
2577
2709
  });
2578
2710
  }
2711
+ /** Send a message as the assistant in a chat, optionally including tool calls. */
2579
2712
  async sendAssistantMessage(wid, chatId, message, toolCalls) {
2580
2713
  return this.fetch(`w/${wid}/chats/${chatId}/send-assistant-message`, {
2581
2714
  method: "POST",
@@ -2585,6 +2718,7 @@ var ChatsApi = class extends BaseApiClient {
2585
2718
  })
2586
2719
  });
2587
2720
  }
2721
+ /** Rate a chat message by its UUID. */
2588
2722
  async rateMessage(wid, chatId, messageUuid, rating) {
2589
2723
  return this.fetch(
2590
2724
  `w/${wid}/chats/${chatId}/messages/${messageUuid}/rate`,
@@ -2613,10 +2747,11 @@ var ChatsApi = class extends BaseApiClient {
2613
2747
  body: JSON.stringify({ content })
2614
2748
  });
2615
2749
  }
2750
+ /** Get assignment tasks linked to a chat. */
2616
2751
  async getChatAssignmentTasks(wid, chatId) {
2617
2752
  return this.fetch(`w/${wid}/chats/${chatId}/assignment-tasks`);
2618
2753
  }
2619
- // Chat Completion API (used by eval scripts)
2754
+ /** Create a chat completion using the OpenAI-compatible API (used by eval scripts). */
2620
2755
  async createChatCompletion(wid, chatId, data) {
2621
2756
  return this.fetch(`w/${wid}/web-chat/${chatId}/chat/completions?stream=false`, {
2622
2757
  method: "POST",
@@ -2626,55 +2761,65 @@ var ChatsApi = class extends BaseApiClient {
2626
2761
  })
2627
2762
  });
2628
2763
  }
2629
- // Chat Labels API
2764
+ /** List all chat labels in a workspace. */
2630
2765
  async getChatLabels(wid) {
2631
2766
  return this.fetch(`w/${wid}/chat-labels`);
2632
2767
  }
2768
+ /** Get a chat label by ID. */
2633
2769
  async getChatLabel(wid, id) {
2634
2770
  return this.fetch(`w/${wid}/chat-labels/${id}`);
2635
2771
  }
2772
+ /** Get a chat label by UUID. */
2636
2773
  async getChatLabelByUuid(wid, uuid) {
2637
2774
  return this.fetch(`w/${wid}/chat-labels/${uuid}`);
2638
2775
  }
2776
+ /** Create a new chat label. */
2639
2777
  async createChatLabel(wid, label) {
2640
2778
  return this.fetch(`w/${wid}/chat-labels`, {
2641
2779
  method: "POST",
2642
2780
  body: JSON.stringify(label)
2643
2781
  });
2644
2782
  }
2783
+ /** Update a chat label. */
2645
2784
  async updateChatLabel(wid, id, label) {
2646
2785
  return this.fetch(`w/${wid}/chat-labels/${id}`, {
2647
2786
  method: "PUT",
2648
2787
  body: JSON.stringify(label)
2649
2788
  });
2650
2789
  }
2790
+ /** Delete a chat label. */
2651
2791
  async deleteChatLabel(wid, id) {
2652
2792
  return this.fetch(`w/${wid}/chat-labels/${id}`, {
2653
2793
  method: "DELETE"
2654
2794
  });
2655
2795
  }
2656
- // Chat Filters
2796
+ /** List all chat filters in a workspace. */
2657
2797
  async getChatFilters(wid) {
2658
2798
  return this.fetch(`w/${wid}/chat-filters`);
2659
2799
  }
2800
+ /** Get a chat filter by ID. */
2660
2801
  async getChatFilter(wid, id) {
2661
2802
  return this.fetch(`w/${wid}/chat-filters/${id}`);
2662
2803
  }
2804
+ /** Get a chat filter by UUID. */
2663
2805
  async getChatFilterByUuid(wid, uuid) {
2664
2806
  return this.fetch(`w/${wid}/chat-filters/by-uuid/${uuid}`);
2665
2807
  }
2808
+ /** Create a new chat filter. */
2666
2809
  async createChatFilter(wid, filter) {
2667
2810
  return this.fetch(`w/${wid}/chat-filters`, {
2668
2811
  method: "POST",
2669
2812
  body: JSON.stringify(filter)
2670
2813
  });
2671
2814
  }
2815
+ /** Update a chat filter. */
2672
2816
  async updateChatFilter(wid, id, filter) {
2673
2817
  return this.fetch(`w/${wid}/chat-filters/${id}`, {
2674
2818
  method: "PUT",
2675
2819
  body: JSON.stringify(filter)
2676
2820
  });
2677
2821
  }
2822
+ /** Delete a chat filter. */
2678
2823
  async deleteChatFilter(wid, id) {
2679
2824
  return this.fetch(`w/${wid}/chat-filters/${id}`, {
2680
2825
  method: "DELETE"
@@ -2767,6 +2912,7 @@ var CustomToolkitsApi = class extends BaseApiClient {
2767
2912
  }
2768
2913
  };
2769
2914
  var DataTypesApi = class extends BaseApiClient {
2915
+ /** List all data types for a workspace, optionally filtering by archived status. */
2770
2916
  async getDataTypes(wid, options) {
2771
2917
  const params = new URLSearchParams();
2772
2918
  if (options?.archived !== void 0) {
@@ -2775,45 +2921,54 @@ var DataTypesApi = class extends BaseApiClient {
2775
2921
  const queryString = params.toString();
2776
2922
  return this.fetch(`w/${wid}/data-types${queryString ? `?${queryString}` : ""}`);
2777
2923
  }
2924
+ /** Get a single data type by ID. */
2778
2925
  async getDataType(wid, id) {
2779
2926
  return this.fetch(`w/${wid}/data-types/${id}`);
2780
2927
  }
2928
+ /** Get a single data type by its slug. */
2781
2929
  async getDataTypeBySlug(wid, slug) {
2782
2930
  return this.fetch(`w/${wid}/data-types/slug/${slug}`);
2783
2931
  }
2932
+ /** Create a new data type definition in the workspace. */
2784
2933
  async createDataType(wid, dataType) {
2785
2934
  return this.fetch(`w/${wid}/data-types`, {
2786
2935
  method: "POST",
2787
2936
  body: JSON.stringify(dataType)
2788
2937
  });
2789
2938
  }
2939
+ /** Update an existing data type definition. */
2790
2940
  async updateDataType(wid, id, dataType) {
2791
2941
  return this.fetch(`w/${wid}/data-types/${id}`, {
2792
2942
  method: "PUT",
2793
2943
  body: JSON.stringify(dataType)
2794
2944
  });
2795
2945
  }
2946
+ /** Delete a data type definition by ID. */
2796
2947
  async deleteDataType(wid, id) {
2797
2948
  return this.fetch(`w/${wid}/data-types/${id}`, {
2798
2949
  method: "DELETE"
2799
2950
  });
2800
2951
  }
2952
+ /** Archive a data type, hiding it from default listings. */
2801
2953
  async archiveDataType(wid, id) {
2802
2954
  return this.fetch(`w/${wid}/data-types/${id}/archive`, {
2803
2955
  method: "POST"
2804
2956
  });
2805
2957
  }
2958
+ /** Restore an archived data type back to active status. */
2806
2959
  async unarchiveDataType(wid, id) {
2807
2960
  return this.fetch(`w/${wid}/data-types/${id}/unarchive`, {
2808
2961
  method: "POST"
2809
2962
  });
2810
2963
  }
2964
+ /** Clone a data type with a new name and slug. */
2811
2965
  async cloneDataType(wid, id, data) {
2812
2966
  return this.fetch(`w/${wid}/data-types/${id}/clone`, {
2813
2967
  method: "POST",
2814
2968
  body: JSON.stringify(data)
2815
2969
  });
2816
2970
  }
2971
+ /** List data records for a data type with optional filtering and pagination. */
2817
2972
  async getDataRecords(wid, dataTypeId, options) {
2818
2973
  const params = new URLSearchParams();
2819
2974
  if (options?.memberId) params.append("member_id", options.memberId.toString());
@@ -2825,32 +2980,37 @@ var DataTypesApi = class extends BaseApiClient {
2825
2980
  `w/${wid}/data-types/${dataTypeId}/records${params?.toString() ? `?${params.toString()}` : ""}`
2826
2981
  );
2827
2982
  }
2983
+ /** Get a single data record by ID. */
2828
2984
  async getDataRecord(wid, recordId) {
2829
2985
  return this.fetch(`w/${wid}/data-types/records/${recordId}`);
2830
2986
  }
2987
+ /** Create a new data record under the specified data type. */
2831
2988
  async createDataRecord(wid, dataTypeId, record) {
2832
2989
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/records`, {
2833
2990
  method: "POST",
2834
2991
  body: JSON.stringify(record)
2835
2992
  });
2836
2993
  }
2994
+ /** Update an existing data record's field values. */
2837
2995
  async updateDataRecord(wid, dataTypeId, recordId, record) {
2838
2996
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/records/${recordId}`, {
2839
2997
  method: "PUT",
2840
2998
  body: JSON.stringify(record)
2841
2999
  });
2842
3000
  }
3001
+ /** Delete a data record by ID. */
2843
3002
  async deleteDataRecord(wid, dataTypeId, recordId) {
2844
3003
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/records/${recordId}`, {
2845
3004
  method: "DELETE"
2846
3005
  });
2847
3006
  }
3007
+ /** Get the change history for a data record. */
2848
3008
  async getDataRecordChanges(wid, dataTypeId, recordId) {
2849
3009
  return this.fetch(
2850
3010
  `w/${wid}/data-types/${dataTypeId}/records/${recordId}/changes`
2851
3011
  );
2852
3012
  }
2853
- // Upsert Data Record API (used by eval scripts)
3013
+ /** Upsert a data record by external ID, creating or updating as needed. */
2854
3014
  async upsertDataRecord(wid, dataTypeId, externalId, data) {
2855
3015
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/upsert/${externalId}`, {
2856
3016
  method: "POST",
@@ -2860,14 +3020,14 @@ var DataTypesApi = class extends BaseApiClient {
2860
3020
  })
2861
3021
  });
2862
3022
  }
2863
- // Toggle field indexing for faster search
3023
+ /** Toggle search indexing for a data type field. */
2864
3024
  async toggleFieldIndex(wid, dataTypeId, fieldSlug, shouldIndex) {
2865
3025
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/fields/${fieldSlug}/toggle-index`, {
2866
3026
  method: "POST",
2867
3027
  body: JSON.stringify({ shouldIndex })
2868
3028
  });
2869
3029
  }
2870
- // Get field index status
3030
+ /** Get the index status for a data type field. */
2871
3031
  async getFieldIndexStatus(wid, dataTypeId, fieldSlug) {
2872
3032
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/fields/${fieldSlug}/index-status`);
2873
3033
  }
@@ -3092,13 +3252,15 @@ var SlackAppsApi = class extends BaseApiClient {
3092
3252
  }
3093
3253
  };
3094
3254
  var EventsApi = class extends BaseApiClient {
3095
- // Event Rules API
3255
+ /** List all event rules in the workspace. */
3096
3256
  async getEventRules(wid) {
3097
3257
  return this.fetch(`w/${wid}/event-rules`);
3098
3258
  }
3259
+ /** Get the available action types that can be used in event rules. */
3099
3260
  async getAvailableActions(wid) {
3100
3261
  return this.fetch(`w/${wid}/event-rules/actions/available`);
3101
3262
  }
3263
+ /** Search event rules by object type, event type, action type, and related entities. */
3102
3264
  async searchEventRules(wid, params) {
3103
3265
  const searchParams = new URLSearchParams();
3104
3266
  if (params.objectType) searchParams.append("objectType", params.objectType);
@@ -3112,33 +3274,38 @@ var EventsApi = class extends BaseApiClient {
3112
3274
  if (params.includeDisabled) searchParams.append("includeDisabled", "true");
3113
3275
  return this.fetch(`w/${wid}/event-rules/search?${searchParams.toString()}`);
3114
3276
  }
3277
+ /** Get a single event rule by ID. */
3115
3278
  async getEventRule(wid, id) {
3116
3279
  return this.fetch(`w/${wid}/event-rules/${id}`);
3117
3280
  }
3281
+ /** Create a new event rule in the workspace. */
3118
3282
  async createEventRule(wid, rule) {
3119
3283
  return this.fetch(`w/${wid}/event-rules`, {
3120
3284
  method: "POST",
3121
3285
  body: JSON.stringify(rule)
3122
3286
  });
3123
3287
  }
3288
+ /** Update an existing event rule. */
3124
3289
  async updateEventRule(wid, id, rule) {
3125
3290
  return this.fetch(`w/${wid}/event-rules/${id}`, {
3126
3291
  method: "PUT",
3127
3292
  body: JSON.stringify(rule)
3128
3293
  });
3129
3294
  }
3295
+ /** Delete an event rule by ID. */
3130
3296
  async deleteEventRule(wid, id) {
3131
3297
  return this.fetch(`w/${wid}/event-rules/${id}`, {
3132
3298
  method: "DELETE"
3133
3299
  });
3134
3300
  }
3301
+ /** Reorder event rules by specifying the desired rule ID sequence. */
3135
3302
  async reorderEventRules(wid, ruleIds) {
3136
3303
  return this.fetch(`w/${wid}/event-rules/reorder`, {
3137
3304
  method: "POST",
3138
3305
  body: JSON.stringify(ruleIds)
3139
3306
  });
3140
3307
  }
3141
- // Webhook Logs API
3308
+ /** List webhook logs with optional filtering by event type and success status. */
3142
3309
  async getWebhookLogs(wid, options = {}) {
3143
3310
  const params = new URLSearchParams();
3144
3311
  if (options.page) params.append("page", options.page.toString());
@@ -3151,6 +3318,7 @@ var EventsApi = class extends BaseApiClient {
3151
3318
  `w/${wid}/webhook-logs${params.toString() ? `?${params.toString()}` : ""}`
3152
3319
  );
3153
3320
  }
3321
+ /** List event rule executions with cursor-based pagination and filtering. */
3154
3322
  async getRuleExecutions(wid, options = {}) {
3155
3323
  const params = new URLSearchParams();
3156
3324
  if (options.cursor) params.append("cursor", options.cursor);
@@ -3169,7 +3337,7 @@ var EventsApi = class extends BaseApiClient {
3169
3337
  `w/${wid}/event-rules/executions${params.toString() ? `?${params.toString()}` : ""}`
3170
3338
  );
3171
3339
  }
3172
- // Events API
3340
+ /** List scheduled events with optional pagination and active status filtering. */
3173
3341
  async getEvents(wid, options = {}) {
3174
3342
  const params = new URLSearchParams();
3175
3343
  if (options.page) params.append("page", options.page.toString());
@@ -3181,26 +3349,31 @@ var EventsApi = class extends BaseApiClient {
3181
3349
  `w/${wid}/events${params.toString() ? `?${params.toString()}` : ""}`
3182
3350
  );
3183
3351
  }
3352
+ /** Get a single scheduled event by ID. */
3184
3353
  async getEvent(wid, id) {
3185
3354
  return this.fetch(`w/${wid}/events/${id}`);
3186
3355
  }
3356
+ /** Create a new scheduled event. */
3187
3357
  async createEvent(wid, event) {
3188
3358
  return this.fetch(`w/${wid}/events`, {
3189
3359
  method: "POST",
3190
3360
  body: JSON.stringify(event)
3191
3361
  });
3192
3362
  }
3363
+ /** Update an existing scheduled event. */
3193
3364
  async updateEvent(wid, id, event) {
3194
3365
  return this.fetch(`w/${wid}/events/${id}`, {
3195
3366
  method: "PUT",
3196
3367
  body: JSON.stringify(event)
3197
3368
  });
3198
3369
  }
3370
+ /** Delete a scheduled event by ID. */
3199
3371
  async deleteEvent(wid, id) {
3200
3372
  return this.fetch(`w/${wid}/events/${id}`, {
3201
3373
  method: "DELETE"
3202
3374
  });
3203
3375
  }
3376
+ /** Manually trigger a scheduled event for a specific member or member filter. */
3204
3377
  async runEvent(wid, id, params) {
3205
3378
  const searchParams = new URLSearchParams();
3206
3379
  if (params.memberId) searchParams.append("member_id", params.memberId.toString());
@@ -3210,6 +3383,7 @@ var EventsApi = class extends BaseApiClient {
3210
3383
  method: "POST"
3211
3384
  });
3212
3385
  }
3386
+ /** List event run history with optional filtering by event and status. */
3213
3387
  async getEventRuns(wid, options = {}) {
3214
3388
  const params = new URLSearchParams();
3215
3389
  if (options.page) params.append("page", options.page.toString());
@@ -3220,6 +3394,7 @@ var EventsApi = class extends BaseApiClient {
3220
3394
  if (options.status) params.append("status", options.status);
3221
3395
  return this.fetch(`w/${wid}/events/runs?${params.toString()}`);
3222
3396
  }
3397
+ /** Delete all run history for a scheduled event. */
3223
3398
  async resetEventRuns(wid, eventId) {
3224
3399
  return this.fetch(`w/${wid}/events/${eventId}/runs`, {
3225
3400
  method: "DELETE"
@@ -3228,24 +3403,13 @@ var EventsApi = class extends BaseApiClient {
3228
3403
  };
3229
3404
  var FeaturesApi = class extends BaseApiClient {
3230
3405
  /**
3231
- * Get the full feature registry with all metadata.
3232
- *
3233
- * Returns all feature definitions including:
3234
- * - Dependencies between features
3235
- * - Visibility settings for upgrade prompts
3236
- * - Associated abilities, tools, routes, and event types
3237
- * - UI configuration (icons, sidebar groups)
3238
- *
3239
- * @returns Feature registry response with all feature definitions
3406
+ * Get the full feature registry with all metadata
3240
3407
  */
3241
3408
  async getFeatureRegistry() {
3242
3409
  return this.fetch("features/registry");
3243
3410
  }
3244
3411
  /**
3245
- * Get a specific feature definition by slug.
3246
- *
3247
- * @param slug - The feature slug (e.g., "calendar", "gmail")
3248
- * @returns The full feature definition
3412
+ * Get a specific feature definition by slug
3249
3413
  */
3250
3414
  async getFeatureBySlug(slug) {
3251
3415
  return this.fetch(`features/${slug}`);
@@ -3385,6 +3549,7 @@ var FhirConnectionsApi = class extends BaseApiClient {
3385
3549
  }
3386
3550
  };
3387
3551
  var FilesApi = class extends BaseApiClient {
3552
+ /** List files in a workspace with optional folder filtering, sorting, and search. */
3388
3553
  async getFiles(wid, options = {}) {
3389
3554
  const params = new URLSearchParams();
3390
3555
  if (options.folderId) params.append("folder_id", options.folderId.toString());
@@ -3397,9 +3562,11 @@ var FilesApi = class extends BaseApiClient {
3397
3562
  `w/${wid}/files${params.toString() ? `?${params.toString()}` : ""}`
3398
3563
  );
3399
3564
  }
3565
+ /** Get a single file by ID. */
3400
3566
  async getFile(wid, id) {
3401
3567
  return this.fetch(`w/${wid}/files/${id}`);
3402
3568
  }
3569
+ /** Create a new file record in the workspace. */
3403
3570
  async createFile(wid, file) {
3404
3571
  return this.fetch(`w/${wid}/files`, {
3405
3572
  method: "POST",
@@ -3407,6 +3574,7 @@ var FilesApi = class extends BaseApiClient {
3407
3574
  body: JSON.stringify(file)
3408
3575
  });
3409
3576
  }
3577
+ /** Update an existing file's metadata. */
3410
3578
  async updateFile(wid, id, file) {
3411
3579
  return this.fetch(`w/${wid}/files/${id}`, {
3412
3580
  method: "PUT",
@@ -3414,11 +3582,13 @@ var FilesApi = class extends BaseApiClient {
3414
3582
  body: JSON.stringify(file)
3415
3583
  });
3416
3584
  }
3585
+ /** Delete a file by ID. */
3417
3586
  async deleteFile(wid, id) {
3418
3587
  return this.fetch(`w/${wid}/files/${id}`, {
3419
3588
  method: "DELETE"
3420
3589
  });
3421
3590
  }
3591
+ /** Convert a file to the specified format (text, markdown, or PDF). */
3422
3592
  async convertFile(wid, fileId, format = "pdf") {
3423
3593
  return this.fetch(
3424
3594
  `w/${wid}/files/${fileId}/convert?format=${format}`,
@@ -3427,6 +3597,7 @@ var FilesApi = class extends BaseApiClient {
3427
3597
  }
3428
3598
  );
3429
3599
  }
3600
+ /** Generate a pre-signed upload URL for uploading file content. */
3430
3601
  async generateFileUploadUrl(wid, request) {
3431
3602
  return this.fetch(`w/${wid}/files/upload-url`, {
3432
3603
  method: "POST",
@@ -3434,7 +3605,7 @@ var FilesApi = class extends BaseApiClient {
3434
3605
  body: JSON.stringify(request)
3435
3606
  });
3436
3607
  }
3437
- // Directories API
3608
+ /** List folders in a workspace, optionally filtered by parent folder. */
3438
3609
  async getFolders(wid, parentId) {
3439
3610
  const params = new URLSearchParams();
3440
3611
  if (parentId) params.append("parent_id", parentId.toString());
@@ -3442,31 +3613,37 @@ var FilesApi = class extends BaseApiClient {
3442
3613
  `w/${wid}/folders${params.toString() ? `?${params.toString()}` : ""}`
3443
3614
  );
3444
3615
  }
3616
+ /** Get a single folder by ID. */
3445
3617
  async getFolder(wid, id) {
3446
3618
  return this.fetch(`w/${wid}/folders/${id}`);
3447
3619
  }
3620
+ /** Create a new folder in the workspace. */
3448
3621
  async createFolder(wid, directory) {
3449
3622
  return this.fetch(`w/${wid}/folders`, {
3450
3623
  method: "POST",
3451
3624
  body: JSON.stringify(directory)
3452
3625
  });
3453
3626
  }
3627
+ /** Update a folder's properties. */
3454
3628
  async updateFolder(wid, id, directory) {
3455
3629
  return this.fetch(`w/${wid}/folders/${id}`, {
3456
3630
  method: "PUT",
3457
3631
  body: JSON.stringify(directory)
3458
3632
  });
3459
3633
  }
3634
+ /** Delete a folder by ID. */
3460
3635
  async deleteFolder(wid, id) {
3461
3636
  return this.fetch(`w/${wid}/folders/${id}`, {
3462
3637
  method: "DELETE"
3463
3638
  });
3464
3639
  }
3640
+ /** Trigger reindexing of a folder's contents for search. */
3465
3641
  async reindexFolder(wid, id) {
3466
3642
  return this.fetch(`w/${wid}/folders/${id}/reindex`, {
3467
3643
  method: "POST"
3468
3644
  });
3469
3645
  }
3646
+ /** Search for content within a folder using semantic search. */
3470
3647
  async searchFolder(wid, id, params) {
3471
3648
  const searchParams = new URLSearchParams();
3472
3649
  searchParams.append("query", params.query);
@@ -3475,52 +3652,60 @@ var FilesApi = class extends BaseApiClient {
3475
3652
  `w/${wid}/folders/${id}/search?${searchParams.toString()}`
3476
3653
  );
3477
3654
  }
3478
- // File Labels API
3655
+ /** List all file labels in the workspace. */
3479
3656
  async getFileLabels(wid) {
3480
3657
  return this.fetch(`w/${wid}/file-labels`);
3481
3658
  }
3659
+ /** Get a single file label by ID. */
3482
3660
  async getFileLabel(wid, id) {
3483
3661
  return this.fetch(`w/${wid}/file-labels/${id}`);
3484
3662
  }
3663
+ /** Get a single file label by UUID. */
3485
3664
  async getFileLabelByUuid(wid, uuid) {
3486
3665
  return this.fetch(`w/${wid}/file-labels/${uuid}`);
3487
3666
  }
3667
+ /** Create a new file label in the workspace. */
3488
3668
  async createFileLabel(wid, label) {
3489
3669
  return this.fetch(`w/${wid}/file-labels`, {
3490
3670
  method: "POST",
3491
3671
  body: JSON.stringify(label)
3492
3672
  });
3493
3673
  }
3674
+ /** Update a file label's properties. */
3494
3675
  async updateFileLabel(wid, id, label) {
3495
3676
  return this.fetch(`w/${wid}/file-labels/${id}`, {
3496
3677
  method: "PUT",
3497
3678
  body: JSON.stringify(label)
3498
3679
  });
3499
3680
  }
3681
+ /** Delete a file label by ID. */
3500
3682
  async deleteFileLabel(wid, id) {
3501
3683
  return this.fetch(`w/${wid}/file-labels/${id}`, {
3502
3684
  method: "DELETE"
3503
3685
  });
3504
3686
  }
3505
- // File Sharing API
3687
+ /** Get sharing settings for a file. */
3506
3688
  async getFileSharing(wid, fileId) {
3507
3689
  return this.fetch(`w/${wid}/files/${fileId}/sharing`);
3508
3690
  }
3691
+ /** Update the role associations for a file's sharing permissions. */
3509
3692
  async updateFileRoles(wid, fileId, data) {
3510
3693
  return this.fetch(`w/${wid}/files/${fileId}/sharing/roles`, {
3511
3694
  method: "PUT",
3512
3695
  body: JSON.stringify(data)
3513
3696
  });
3514
3697
  }
3698
+ /** Remove a role's access to a file. */
3515
3699
  async removeFileRole(wid, fileId, roleId) {
3516
3700
  return this.fetch(`w/${wid}/files/${fileId}/sharing/roles/${roleId}`, {
3517
3701
  method: "DELETE"
3518
3702
  });
3519
3703
  }
3520
- // Folder Sharing API
3704
+ /** Get sharing settings for a folder. */
3521
3705
  async getFolderSharing(wid, folderId) {
3522
3706
  return this.fetch(`w/${wid}/folders/${folderId}/sharing`);
3523
3707
  }
3708
+ /** Update the role associations for a folder's sharing permissions. */
3524
3709
  async updateFolderRoles(wid, folderId, data) {
3525
3710
  return this.fetch(
3526
3711
  `w/${wid}/folders/${folderId}/sharing/roles`,
@@ -3530,33 +3715,37 @@ var FilesApi = class extends BaseApiClient {
3530
3715
  }
3531
3716
  );
3532
3717
  }
3718
+ /** Remove a role's access to a folder. */
3533
3719
  async removeFolderRole(wid, folderId, roleId) {
3534
3720
  return this.fetch(`w/${wid}/folders/${folderId}/sharing/roles/${roleId}`, {
3535
3721
  method: "DELETE"
3536
3722
  });
3537
3723
  }
3538
- // Batch Sharing API
3724
+ /** Update all sharing settings for a file in a single request. */
3539
3725
  async updateFileSharing(wid, fileId, data) {
3540
3726
  return this.fetch(`w/${wid}/files/${fileId}/sharing`, {
3541
3727
  method: "PUT",
3542
3728
  body: JSON.stringify(data)
3543
3729
  });
3544
3730
  }
3731
+ /** Update all sharing settings for a folder in a single request. */
3545
3732
  async updateFolderSharing(wid, folderId, data) {
3546
3733
  return this.fetch(`w/${wid}/folders/${folderId}/sharing`, {
3547
3734
  method: "PUT",
3548
3735
  body: JSON.stringify(data)
3549
3736
  });
3550
3737
  }
3551
- // Public Sharing API (unauthenticated access to public files/folders)
3738
+ /** Get metadata for a publicly shared file (unauthenticated). */
3552
3739
  async getPublicFile(wid, fileId) {
3553
3740
  return this.fetch(`w/${wid}/sharing/files/${fileId}`);
3554
3741
  }
3742
+ /** Get contents of a publicly shared folder (unauthenticated). */
3555
3743
  async getPublicFolder(wid, folderId, page = 1, pageSize = 100) {
3556
3744
  return this.fetch(
3557
3745
  `w/${wid}/sharing/folders/${folderId}?page=${page}&pageSize=${pageSize}`
3558
3746
  );
3559
3747
  }
3748
+ /** List files within a publicly shared folder (unauthenticated). */
3560
3749
  async getPublicFolderFiles(wid, folderId, page = 1, pageSize = 100) {
3561
3750
  return this.fetch(
3562
3751
  `w/${wid}/sharing/folders/${folderId}/files?page=${page}&pageSize=${pageSize}`
@@ -3564,29 +3753,35 @@ var FilesApi = class extends BaseApiClient {
3564
3753
  }
3565
3754
  };
3566
3755
  var InboxesApi = class extends BaseApiClient {
3756
+ /** List all inboxes in a workspace. */
3567
3757
  async getInboxes(wid) {
3568
3758
  return this.fetch(`w/${wid}/inboxes`);
3569
3759
  }
3760
+ /** Get an inbox by ID. */
3570
3761
  async getInbox(wid, id) {
3571
3762
  return this.fetch(`w/${wid}/inboxes/${id}`);
3572
3763
  }
3764
+ /** Create a new inbox. */
3573
3765
  async createInbox(wid, inbox) {
3574
3766
  return this.fetch(`w/${wid}/inboxes`, {
3575
3767
  method: "POST",
3576
3768
  body: JSON.stringify(inbox)
3577
3769
  });
3578
3770
  }
3771
+ /** Update an inbox. */
3579
3772
  async updateInbox(wid, id, inbox) {
3580
3773
  return this.fetch(`w/${wid}/inboxes/${id}`, {
3581
3774
  method: "PUT",
3582
3775
  body: JSON.stringify(inbox)
3583
3776
  });
3584
3777
  }
3778
+ /** Delete an inbox. */
3585
3779
  async deleteInbox(wid, id) {
3586
3780
  return this.fetch(`w/${wid}/inboxes/${id}`, {
3587
3781
  method: "DELETE"
3588
3782
  });
3589
3783
  }
3784
+ /** List emails in an inbox with optional pagination and attachment inclusion. */
3590
3785
  async getInboxEmails(wid, inboxId, options = {}) {
3591
3786
  const params = new URLSearchParams();
3592
3787
  if (options.limit) params.append("limit", options.limit.toString());
@@ -3597,19 +3792,23 @@ var InboxesApi = class extends BaseApiClient {
3597
3792
  `w/${wid}/inboxes/${inboxId}/emails${params.toString() ? `?${params.toString()}` : ""}`
3598
3793
  );
3599
3794
  }
3795
+ /** Get a single email from an inbox. */
3600
3796
  async getInboxEmail(wid, inboxId, emailId) {
3601
3797
  return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/${emailId}`);
3602
3798
  }
3799
+ /** Mark an email as read. */
3603
3800
  async markEmailAsRead(wid, inboxId, emailId) {
3604
3801
  return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/${emailId}/mark-read`, {
3605
3802
  method: "POST"
3606
3803
  });
3607
3804
  }
3805
+ /** Mark an email as unread. */
3608
3806
  async markEmailAsUnread(wid, inboxId, emailId) {
3609
3807
  return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/${emailId}/unread`, {
3610
3808
  method: "POST"
3611
3809
  });
3612
3810
  }
3811
+ /** Convert an email to text, markdown, or PDF format. */
3613
3812
  async convertEmail(wid, emailId, format = "pdf") {
3614
3813
  return this.fetch(
3615
3814
  `w/${wid}/inboxes/emails/${emailId}/convert?format=${format}`,
@@ -3618,18 +3817,22 @@ var InboxesApi = class extends BaseApiClient {
3618
3817
  }
3619
3818
  );
3620
3819
  }
3820
+ /** Download an email attachment as raw bytes. */
3621
3821
  async downloadEmailAttachment(wid, inboxId, emailId, attachmentId) {
3622
3822
  const response = await this.fetchRaw(
3623
3823
  `w/${wid}/inboxes/${inboxId}/emails/${emailId}/attachments/${attachmentId}`
3624
3824
  );
3625
3825
  return response.arrayBuffer();
3626
3826
  }
3827
+ /** List email threads in an inbox. */
3627
3828
  async getInboxThreads(wid, inboxId) {
3628
3829
  return this.fetch(`w/${wid}/inboxes/${inboxId}/threads`);
3629
3830
  }
3831
+ /** List emails in a thread by assignment ID. */
3630
3832
  async getThreadEmails(wid, inboxId, assignmentId) {
3631
3833
  return this.fetch(`w/${wid}/inboxes/${inboxId}/assignments/${assignmentId}/emails`);
3632
3834
  }
3835
+ /** List emails associated with a chat. */
3633
3836
  async getChatEmails(wid, inboxId, chatId) {
3634
3837
  return this.fetch(`w/${wid}/inboxes/${inboxId}/chats/${chatId}/emails`);
3635
3838
  }
@@ -3680,9 +3883,7 @@ var InquiriesApi = class extends BaseApiClient {
3680
3883
  });
3681
3884
  }
3682
3885
  /**
3683
- * Export inquiries to CSV (superuser only)
3684
- * @param statusFilter Optional status filter: 'new', 'in_progress', 'done', or undefined for all
3685
- * @returns A Blob containing the CSV data
3886
+ * Export inquiries to CSV with optional status filtering (superuser only)
3686
3887
  */
3687
3888
  async exportInquiriesCsv(statusFilter) {
3688
3889
  const params = new URLSearchParams();
@@ -3869,6 +4070,7 @@ var McpServersApi = class extends BaseApiClient {
3869
4070
  }
3870
4071
  };
3871
4072
  var MembersApi = class extends BaseApiClient {
4073
+ /** Get the currently authenticated member for a workspace. */
3872
4074
  async getCurrentMember(wid) {
3873
4075
  return this.fetch(`w/${wid}/me`);
3874
4076
  }
@@ -3899,12 +4101,14 @@ var MembersApi = class extends BaseApiClient {
3899
4101
  method: "DELETE"
3900
4102
  });
3901
4103
  }
4104
+ /** Update the currently authenticated member's profile. */
3902
4105
  async updateCurrentMember(wid, member) {
3903
4106
  return this.fetch(`w/${wid}/me`, {
3904
4107
  method: "PUT",
3905
4108
  body: JSON.stringify(member)
3906
4109
  });
3907
4110
  }
4111
+ /** List workspace members with pagination, filtering, and sorting. */
3908
4112
  async getWorkspaceMembers(wid, page = 1, pageSize = 10, filters, search, role, sortBy, sortOrder, memberType, isArchived = false, isManager, memberTypes, hasAccount, excludeIds) {
3909
4113
  const params = new URLSearchParams();
3910
4114
  if (page) params.append("page", page.toString());
@@ -3937,21 +4141,25 @@ var MembersApi = class extends BaseApiClient {
3937
4141
  }
3938
4142
  return this.fetch(`w/${wid}/members?${params.toString()}`);
3939
4143
  }
4144
+ /** Get a single workspace member by ID. */
3940
4145
  async getWorkspaceMember(wid, memberId) {
3941
4146
  return this.fetch(`w/${wid}/members/${memberId}`);
3942
4147
  }
4148
+ /** Create a new workspace member. */
3943
4149
  async createWorkspaceMember(wid, data) {
3944
4150
  return this.fetch(`w/${wid}/members`, {
3945
4151
  method: "POST",
3946
4152
  body: JSON.stringify(data)
3947
4153
  });
3948
4154
  }
4155
+ /** Update a workspace member by ID. */
3949
4156
  async updateMember(wid, memberId, data) {
3950
4157
  return this.fetch(`w/${wid}/members/${memberId}`, {
3951
4158
  method: "PUT",
3952
4159
  body: JSON.stringify(data)
3953
4160
  });
3954
4161
  }
4162
+ /** Delete a workspace member, optionally forcing removal of associated data. */
3955
4163
  async deleteMember(wid, memberId, options) {
3956
4164
  const params = new URLSearchParams();
3957
4165
  if (options?.force) {
@@ -3963,98 +4171,119 @@ var MembersApi = class extends BaseApiClient {
3963
4171
  method: "DELETE"
3964
4172
  });
3965
4173
  }
4174
+ /** Archive a workspace member. */
3966
4175
  async archiveMember(wid, memberId) {
3967
4176
  return this.fetch(`w/${wid}/members/${memberId}/archive`, {
3968
4177
  method: "POST"
3969
4178
  });
3970
4179
  }
4180
+ /** Unarchive a previously archived workspace member. */
3971
4181
  async unarchiveMember(wid, memberId) {
3972
4182
  return this.fetch(`w/${wid}/members/${memberId}/unarchive`, {
3973
4183
  method: "POST"
3974
4184
  });
3975
4185
  }
3976
4186
  // Member Filter APIs
4187
+ /** List all saved member filters for a workspace. */
3977
4188
  async getMemberFilters(wid) {
3978
4189
  return this.fetch(`w/${wid}/member-filters`);
3979
4190
  }
4191
+ /** Get a single member filter by ID. */
3980
4192
  async getMemberFilter(wid, filterId) {
3981
4193
  return this.fetch(`w/${wid}/member-filters/${filterId}`);
3982
4194
  }
4195
+ /** Create a new saved member filter. */
3983
4196
  async createMemberFilter(wid, data) {
3984
4197
  return this.fetch(`w/${wid}/member-filters`, {
3985
4198
  method: "POST",
3986
4199
  body: JSON.stringify(data)
3987
4200
  });
3988
4201
  }
4202
+ /** Update a saved member filter. */
3989
4203
  async updateMemberFilter(wid, filterId, data) {
3990
4204
  return this.fetch(`w/${wid}/member-filters/${filterId}`, {
3991
4205
  method: "PUT",
3992
4206
  body: JSON.stringify(data)
3993
4207
  });
3994
4208
  }
4209
+ /** Delete a saved member filter. */
3995
4210
  async deleteMemberFilter(wid, filterId) {
3996
4211
  return this.fetch(`w/${wid}/member-filters/${filterId}`, {
3997
4212
  method: "DELETE"
3998
4213
  });
3999
4214
  }
4215
+ /** Get the count of members matching a saved filter. */
4000
4216
  async getMemberFilterCount(wid, filterId) {
4001
4217
  return this.fetch(`w/${wid}/member-filters/${filterId}/count`);
4002
4218
  }
4003
4219
  // Member Labels API
4220
+ /** List all member labels for a workspace. */
4004
4221
  async getMemberLabels(wid) {
4005
4222
  return this.fetch(`w/${wid}/member-labels`);
4006
4223
  }
4224
+ /** Get a single member label by ID. */
4007
4225
  async getMemberLabel(wid, id) {
4008
4226
  return this.fetch(`w/${wid}/member-labels/${id}`);
4009
4227
  }
4228
+ /** Get a single member label by UUID. */
4010
4229
  async getMemberLabelByUuid(wid, uuid) {
4011
4230
  return this.fetch(`w/${wid}/member-labels/${uuid}`);
4012
4231
  }
4232
+ /** Create a new member label. */
4013
4233
  async createMemberLabel(wid, label) {
4014
4234
  return this.fetch(`w/${wid}/member-labels`, {
4015
4235
  method: "POST",
4016
4236
  body: JSON.stringify(label)
4017
4237
  });
4018
4238
  }
4239
+ /** Update a member label. */
4019
4240
  async updateMemberLabel(wid, id, label) {
4020
4241
  return this.fetch(`w/${wid}/member-labels/${id}`, {
4021
4242
  method: "PUT",
4022
4243
  body: JSON.stringify(label)
4023
4244
  });
4024
4245
  }
4246
+ /** Delete a member label. */
4025
4247
  async deleteMemberLabel(wid, id) {
4026
4248
  return this.fetch(`w/${wid}/member-labels/${id}`, {
4027
4249
  method: "DELETE"
4028
4250
  });
4029
4251
  }
4030
4252
  // Member Roles API
4253
+ /** List all member roles for a workspace. */
4031
4254
  async getMemberRoles(wid) {
4032
4255
  return this.fetch(`w/${wid}/member-roles`);
4033
4256
  }
4257
+ /** Get a single member role by ID. */
4034
4258
  async getMemberRole(wid, id) {
4035
4259
  return this.fetch(`w/${wid}/member-roles/${id}`);
4036
4260
  }
4261
+ /** Get a single member role by UUID. */
4037
4262
  async getMemberRoleByUuid(wid, uuid) {
4038
4263
  return this.fetch(`w/${wid}/member-roles/${uuid}`);
4039
4264
  }
4265
+ /** Create a new member role. */
4040
4266
  async createMemberRole(wid, memberRole) {
4041
4267
  return this.fetch(`w/${wid}/member-roles`, {
4042
4268
  method: "POST",
4043
4269
  body: JSON.stringify(memberRole)
4044
4270
  });
4045
4271
  }
4272
+ /** Update a member role. */
4046
4273
  async updateMemberRole(wid, id, memberRole) {
4047
4274
  return this.fetch(`w/${wid}/member-roles/${id}`, {
4048
4275
  method: "PUT",
4049
4276
  body: JSON.stringify(memberRole)
4050
4277
  });
4051
4278
  }
4279
+ /** Delete a member role. */
4052
4280
  async deleteMemberRole(wid, id) {
4053
4281
  return this.fetch(`w/${wid}/member-roles/${id}`, {
4054
4282
  method: "DELETE"
4055
4283
  });
4056
4284
  }
4057
4285
  // Import/Export Members API
4286
+ /** Import members from a CSV file, streaming progress updates via callback. */
4058
4287
  async importMembers(wid, file, newMemberRoleId, onProgress) {
4059
4288
  const formData = new FormData();
4060
4289
  formData.append("file", file);
@@ -4099,6 +4328,7 @@ var MembersApi = class extends BaseApiClient {
4099
4328
  }
4100
4329
  return { success: true };
4101
4330
  }
4331
+ /** Export members as a downloadable file with selected fields and data types. */
4102
4332
  async exportMembers(wid, selectedFields, selectedDataTypes, memberType) {
4103
4333
  const params = new URLSearchParams();
4104
4334
  selectedFields.forEach((field) => params.append("selected_fields", field));
@@ -4118,6 +4348,7 @@ var MembersApi = class extends BaseApiClient {
4118
4348
  }
4119
4349
  return response.blob();
4120
4350
  }
4351
+ /** Get message activity counts for the specified members over a time period. */
4121
4352
  async getMembersMessageActivity(wid, memberIds, days = 30) {
4122
4353
  const memberIdsStr = memberIds.join(",");
4123
4354
  const params = new URLSearchParams();
@@ -4266,6 +4497,7 @@ var MembersApi = class extends BaseApiClient {
4266
4497
  }
4267
4498
  };
4268
4499
  var MilestonesApi = class extends BaseApiClient {
4500
+ /** List milestones in a workspace with optional pagination and sorting. */
4269
4501
  async getMilestones(wid, options = {}) {
4270
4502
  const params = new URLSearchParams();
4271
4503
  if (options.page) params.append("page", options.page.toString());
@@ -4276,21 +4508,25 @@ var MilestonesApi = class extends BaseApiClient {
4276
4508
  `w/${wid}/milestones${params.toString() ? `?${params.toString()}` : ""}`
4277
4509
  );
4278
4510
  }
4511
+ /** Get a single milestone by ID. */
4279
4512
  async getMilestone(wid, id) {
4280
4513
  return this.fetch(`w/${wid}/milestones/${id}`);
4281
4514
  }
4515
+ /** Create a new milestone in a workspace. */
4282
4516
  async createMilestone(wid, milestone) {
4283
4517
  return this.fetch(`w/${wid}/milestones`, {
4284
4518
  method: "POST",
4285
4519
  body: JSON.stringify(milestone)
4286
4520
  });
4287
4521
  }
4522
+ /** Update an existing milestone with partial data. */
4288
4523
  async updateMilestone(wid, id, milestone) {
4289
4524
  return this.fetch(`w/${wid}/milestones/${id}`, {
4290
4525
  method: "PUT",
4291
4526
  body: JSON.stringify(milestone)
4292
4527
  });
4293
4528
  }
4529
+ /** Delete a milestone by ID. */
4294
4530
  async deleteMilestone(wid, id) {
4295
4531
  return this.fetch(`w/${wid}/milestones/${id}`, {
4296
4532
  method: "DELETE"
@@ -4351,21 +4587,25 @@ var MondayIntegrationApi = class extends BaseApiClient {
4351
4587
  }
4352
4588
  };
4353
4589
  var NotificationRulesApi = class extends BaseApiClient {
4590
+ /** List all notification rules in a workspace. */
4354
4591
  async getNotificationRules(wid) {
4355
4592
  return this.fetch(`w/${wid}/notification-rules`);
4356
4593
  }
4594
+ /** Create a new notification rule. */
4357
4595
  async createNotificationRule(wid, rule) {
4358
4596
  return this.fetch(`w/${wid}/notification-rules`, {
4359
4597
  method: "POST",
4360
4598
  body: JSON.stringify(rule)
4361
4599
  });
4362
4600
  }
4601
+ /** Update a notification rule. */
4363
4602
  async updateNotificationRule(wid, ruleId, rule) {
4364
4603
  return this.fetch(`w/${wid}/notification-rules/${ruleId}`, {
4365
4604
  method: "PUT",
4366
4605
  body: JSON.stringify(rule)
4367
4606
  });
4368
4607
  }
4608
+ /** Delete a notification rule. */
4369
4609
  async deleteNotificationRule(wid, ruleId) {
4370
4610
  return this.fetch(`w/${wid}/notification-rules/${ruleId}`, {
4371
4611
  method: "DELETE"
@@ -4373,57 +4613,69 @@ var NotificationRulesApi = class extends BaseApiClient {
4373
4613
  }
4374
4614
  };
4375
4615
  var OperatorApi = class extends BaseApiClient {
4616
+ /** List all operator groups for a workspace. */
4376
4617
  async getOperatorGroups(wid) {
4377
4618
  return this.fetch(`w/${wid}/operator/groups`);
4378
4619
  }
4620
+ /** Get a single operator group by ID. */
4379
4621
  async getOperatorGroup(wid, groupId) {
4380
4622
  return this.fetch(`w/${wid}/operator/groups/${groupId}`);
4381
4623
  }
4624
+ /** Create a new operator group. */
4382
4625
  async createOperatorGroup(wid, data) {
4383
4626
  return this.fetch(`w/${wid}/operator/groups`, {
4384
4627
  method: "POST",
4385
4628
  body: JSON.stringify(data)
4386
4629
  });
4387
4630
  }
4631
+ /** Update an operator group. */
4388
4632
  async updateOperatorGroup(wid, groupId, data) {
4389
4633
  return this.fetch(`w/${wid}/operator/groups/${groupId}`, {
4390
4634
  method: "PUT",
4391
4635
  body: JSON.stringify(data)
4392
4636
  });
4393
4637
  }
4638
+ /** Delete an operator group. */
4394
4639
  async deleteOperatorGroup(wid, groupId) {
4395
4640
  return this.fetch(`w/${wid}/operator/groups/${groupId}`, {
4396
4641
  method: "DELETE"
4397
4642
  });
4398
4643
  }
4644
+ /** Add a member to an operator group. */
4399
4645
  async addGroupMember(wid, groupId, data) {
4400
4646
  return this.fetch(`w/${wid}/operator/groups/${groupId}/members`, {
4401
4647
  method: "POST",
4402
4648
  body: JSON.stringify(data)
4403
4649
  });
4404
4650
  }
4651
+ /** Remove a member from an operator group. */
4405
4652
  async removeGroupMember(wid, groupId, memberId) {
4406
4653
  return this.fetch(`w/${wid}/operator/groups/${groupId}/members/${memberId}`, {
4407
4654
  method: "DELETE"
4408
4655
  });
4409
4656
  }
4657
+ /** Get all currently live (online) operators in a workspace. */
4410
4658
  async getLiveOperators(wid) {
4411
4659
  return this.fetch(`w/${wid}/presence/live`);
4412
4660
  }
4661
+ /** Get the current member's presence status. */
4413
4662
  async getPresenceStatus(wid) {
4414
4663
  return this.fetch(`w/${wid}/presence/me`);
4415
4664
  }
4665
+ /** Disconnect the current member's presence session. */
4416
4666
  async disconnectPresence(wid) {
4417
4667
  return this.fetch(`w/${wid}/presence/disconnect-self`, {
4418
4668
  method: "POST"
4419
4669
  });
4420
4670
  }
4421
4671
  // Operator chat message methods
4672
+ /** Get paginated chat messages for an operator chat. */
4422
4673
  async getOperatorChatMessages(wid, chatId, limit = 50, offset = 0) {
4423
4674
  return this.fetch(
4424
4675
  `w/${wid}/operator/chats/${chatId}/messages?limit=${limit}&offset=${offset}`
4425
4676
  );
4426
4677
  }
4678
+ /** Send a message in an operator chat. */
4427
4679
  async sendOperatorMessage(wid, chatId, content) {
4428
4680
  return this.fetch(`w/${wid}/operator/chats/${chatId}/messages`, {
4429
4681
  method: "POST",
@@ -4507,45 +4759,54 @@ var OAuthApi = class extends BaseApiClient {
4507
4759
  }
4508
4760
  };
4509
4761
  var PhoneNumbersApi = class extends BaseApiClient {
4762
+ /** List all phone numbers in a workspace. */
4510
4763
  async getPhoneNumbers(wid) {
4511
4764
  return this.fetch(`w/${wid}/phone-numbers`);
4512
4765
  }
4766
+ /** List phone numbers available for provisioning. */
4513
4767
  async getAvailablePhoneNumbers(wid) {
4514
4768
  return this.fetch(
4515
4769
  `w/${wid}/phone-numbers/available-numbers`
4516
4770
  );
4517
4771
  }
4772
+ /** Request provisioning of a specific phone number. */
4518
4773
  async requestPhoneNumber(wid, phoneNumber) {
4519
4774
  return this.fetch(`w/${wid}/phone-numbers/request`, {
4520
4775
  method: "POST",
4521
4776
  body: JSON.stringify({ phone_number: phoneNumber })
4522
4777
  });
4523
4778
  }
4779
+ /** Get a phone number by ID. */
4524
4780
  async getPhoneNumber(wid, id) {
4525
4781
  return this.fetch(`w/${wid}/phone-numbers/${id}`);
4526
4782
  }
4783
+ /** Create a new phone number record. */
4527
4784
  async createPhoneNumber(wid, phoneNumber) {
4528
4785
  return this.fetch(`w/${wid}/phone-numbers`, {
4529
4786
  method: "POST",
4530
4787
  body: JSON.stringify(phoneNumber)
4531
4788
  });
4532
4789
  }
4790
+ /** Update a phone number record. */
4533
4791
  async updatePhoneNumber(wid, id, phoneNumber) {
4534
4792
  return this.fetch(`w/${wid}/phone-numbers/${id}`, {
4535
4793
  method: "PUT",
4536
4794
  body: JSON.stringify(phoneNumber)
4537
4795
  });
4538
4796
  }
4797
+ /** Delete a phone number. */
4539
4798
  async deletePhoneNumber(wid, id) {
4540
4799
  return this.fetch(`w/${wid}/phone-numbers/${id}`, {
4541
4800
  method: "DELETE"
4542
4801
  });
4543
4802
  }
4803
+ /** List paginated call records for a phone number. */
4544
4804
  async getPhoneNumberCalls(wid, id, page = 1, pageSize = 10) {
4545
4805
  return this.fetch(
4546
4806
  `w/${wid}/phone-numbers/${id}/calls?page=${page}&pageSize=${pageSize}`
4547
4807
  );
4548
4808
  }
4809
+ /** List paginated SMS messages for a phone number. */
4549
4810
  async getPhoneNumberMessages(wid, id, page = 1, pageSize = 10) {
4550
4811
  return this.fetch(
4551
4812
  `w/${wid}/phone-numbers/${id}/messages?page=${page}&pageSize=${pageSize}`
@@ -4553,6 +4814,7 @@ var PhoneNumbersApi = class extends BaseApiClient {
4553
4814
  }
4554
4815
  };
4555
4816
  var PronunciationsApi = class extends BaseApiClient {
4817
+ /** List pronunciation entries for an organization, optionally filtered by scope. */
4556
4818
  async getPronunciationEntries(orgUuid, options = {}) {
4557
4819
  const params = new URLSearchParams();
4558
4820
  if (options.scope) params.append("scope", options.scope);
@@ -4562,55 +4824,65 @@ var PronunciationsApi = class extends BaseApiClient {
4562
4824
  );
4563
4825
  return response.items;
4564
4826
  }
4827
+ /** Create a new pronunciation entry for an organization. */
4565
4828
  async createPronunciationEntry(orgUuid, data) {
4566
4829
  return this.fetch(`o/${orgUuid}/pronunciations`, {
4567
4830
  method: "POST",
4568
4831
  body: JSON.stringify(data)
4569
4832
  });
4570
4833
  }
4834
+ /** Update an existing organization pronunciation entry. */
4571
4835
  async updatePronunciationEntry(orgUuid, id, data) {
4572
4836
  return this.fetch(`o/${orgUuid}/pronunciations/${id}`, {
4573
4837
  method: "PUT",
4574
4838
  body: JSON.stringify(data)
4575
4839
  });
4576
4840
  }
4841
+ /** Delete a pronunciation entry from an organization. */
4577
4842
  async deletePronunciationEntry(orgUuid, id) {
4578
4843
  return this.fetch(`o/${orgUuid}/pronunciations/${id}`, {
4579
4844
  method: "DELETE"
4580
4845
  });
4581
4846
  }
4847
+ /** Export all pronunciation entries for an organization as term/respelling pairs. */
4582
4848
  async exportPronunciationEntries(orgUuid) {
4583
4849
  return this.fetch(`o/${orgUuid}/pronunciations/export`);
4584
4850
  }
4851
+ /** Bulk import pronunciation entries into an organization. */
4585
4852
  async importPronunciationEntries(orgUuid, entries) {
4586
4853
  return this.fetch(`o/${orgUuid}/pronunciations/import`, {
4587
4854
  method: "POST",
4588
4855
  body: JSON.stringify({ entries })
4589
4856
  });
4590
4857
  }
4858
+ /** List the current user's personal pronunciation entries. */
4591
4859
  async getMyPronunciations() {
4592
4860
  const response = await this.fetch(
4593
4861
  "account/pronunciations"
4594
4862
  );
4595
4863
  return response.items;
4596
4864
  }
4865
+ /** Create a personal pronunciation entry for the current user. */
4597
4866
  async createMyPronunciation(data) {
4598
4867
  return this.fetch("account/pronunciations", {
4599
4868
  method: "POST",
4600
4869
  body: JSON.stringify(data)
4601
4870
  });
4602
4871
  }
4872
+ /** Update a personal pronunciation entry. */
4603
4873
  async updateMyPronunciation(id, data) {
4604
4874
  return this.fetch(`account/pronunciations/${id}`, {
4605
4875
  method: "PUT",
4606
4876
  body: JSON.stringify(data)
4607
4877
  });
4608
4878
  }
4879
+ /** Delete a personal pronunciation entry. */
4609
4880
  async deleteMyPronunciation(id) {
4610
4881
  return this.fetch(`account/pronunciations/${id}`, {
4611
4882
  method: "DELETE"
4612
4883
  });
4613
4884
  }
4885
+ /** Get AI-suggested respellings for a given term. */
4614
4886
  async suggestPronunciations(term, language) {
4615
4887
  const response = await this.fetch(
4616
4888
  "account/pronunciations/suggest",
@@ -4621,12 +4893,14 @@ var PronunciationsApi = class extends BaseApiClient {
4621
4893
  );
4622
4894
  return response.suggestions;
4623
4895
  }
4896
+ /** List recommended voices for pronunciation preview. */
4624
4897
  async getRecommendedVoices() {
4625
4898
  const response = await this.fetch(
4626
4899
  "account/pronunciations/voices"
4627
4900
  );
4628
4901
  return response.voices;
4629
4902
  }
4903
+ /** Generate an audio preview of a pronunciation respelling using a specified voice. */
4630
4904
  async previewPronunciation(data) {
4631
4905
  const response = await this.fetchRaw("account/pronunciations/preview", {
4632
4906
  method: "POST",
@@ -4640,24 +4914,29 @@ var PronunciationsApi = class extends BaseApiClient {
4640
4914
  }
4641
4915
  };
4642
4916
  var QualificationsApi = class extends BaseApiClient {
4917
+ /** List all qualifications in a workspace. */
4643
4918
  async getQualifications(wid) {
4644
4919
  return this.fetch(`w/${wid}/qualifications`);
4645
4920
  }
4921
+ /** Get a single qualification by ID. */
4646
4922
  async getQualification(wid, id) {
4647
4923
  return this.fetch(`w/${wid}/qualifications/${id}`);
4648
4924
  }
4925
+ /** Create a new qualification in a workspace. */
4649
4926
  async createQualification(wid, data) {
4650
4927
  return this.fetch(`w/${wid}/qualifications`, {
4651
4928
  method: "POST",
4652
4929
  body: JSON.stringify(data)
4653
4930
  });
4654
4931
  }
4932
+ /** Update an existing qualification. */
4655
4933
  async updateQualification(wid, id, data) {
4656
4934
  return this.fetch(`w/${wid}/qualifications/${id}`, {
4657
4935
  method: "PUT",
4658
4936
  body: JSON.stringify(data)
4659
4937
  });
4660
4938
  }
4939
+ /** List members assigned to a qualification with optional filtering. */
4661
4940
  async getQualificationMembers(wid, id, params) {
4662
4941
  const searchParams = new URLSearchParams();
4663
4942
  if (params?.status) searchParams.set("status", params.status);
@@ -4669,16 +4948,19 @@ var QualificationsApi = class extends BaseApiClient {
4669
4948
  `w/${wid}/qualifications/${id}/members${qs ? `?${qs}` : ""}`
4670
4949
  );
4671
4950
  }
4951
+ /** Archive a qualification. */
4672
4952
  async archiveQualification(wid, id) {
4673
4953
  return this.fetch(`w/${wid}/qualifications/${id}`, {
4674
4954
  method: "DELETE"
4675
4955
  });
4676
4956
  }
4957
+ /** List all qualifications assigned to a specific member. */
4677
4958
  async getMemberQualifications(wid, memberId) {
4678
4959
  return this.fetch(
4679
4960
  `w/${wid}/qualifications/members/${memberId}/qualifications`
4680
4961
  );
4681
4962
  }
4963
+ /** Assign a qualification to a member. */
4682
4964
  async assignQualification(wid, memberId, data) {
4683
4965
  return this.fetch(
4684
4966
  `w/${wid}/qualifications/members/${memberId}/qualifications`,
@@ -4688,6 +4970,7 @@ var QualificationsApi = class extends BaseApiClient {
4688
4970
  }
4689
4971
  );
4690
4972
  }
4973
+ /** Update a member's qualification status or settings. */
4691
4974
  async updateMemberQualification(wid, memberId, qualificationId, data) {
4692
4975
  return this.fetch(
4693
4976
  `w/${wid}/qualifications/members/${memberId}/qualifications/${qualificationId}`,
@@ -4697,6 +4980,7 @@ var QualificationsApi = class extends BaseApiClient {
4697
4980
  }
4698
4981
  );
4699
4982
  }
4983
+ /** Remove a qualification assignment from a member. */
4700
4984
  async removeMemberQualification(wid, memberId, qualificationId) {
4701
4985
  return this.fetch(
4702
4986
  `w/${wid}/qualifications/members/${memberId}/qualifications/${qualificationId}`,
@@ -4705,17 +4989,20 @@ var QualificationsApi = class extends BaseApiClient {
4705
4989
  }
4706
4990
  );
4707
4991
  }
4992
+ /** Get the status change history for a member's qualification. */
4708
4993
  async getMemberQualificationLog(wid, memberId, qualificationId) {
4709
4994
  return this.fetch(
4710
4995
  `w/${wid}/qualifications/members/${memberId}/qualifications/${qualificationId}/log`
4711
4996
  );
4712
4997
  }
4713
4998
  // ===== Requirements =====
4999
+ /** List all requirements for a qualification. */
4714
5000
  async listRequirements(wid, qualificationId) {
4715
5001
  return this.fetch(
4716
5002
  `w/${wid}/qualifications/${qualificationId}/requirements`
4717
5003
  );
4718
5004
  }
5005
+ /** Create a new requirement for a qualification. */
4719
5006
  async createRequirement(wid, qualificationId, data) {
4720
5007
  return this.fetch(
4721
5008
  `w/${wid}/qualifications/${qualificationId}/requirements`,
@@ -4725,11 +5012,13 @@ var QualificationsApi = class extends BaseApiClient {
4725
5012
  }
4726
5013
  );
4727
5014
  }
5015
+ /** Get a single qualification requirement by ID. */
4728
5016
  async getRequirement(wid, requirementId) {
4729
5017
  return this.fetch(
4730
5018
  `w/${wid}/qualifications/requirements/${requirementId}`
4731
5019
  );
4732
5020
  }
5021
+ /** Update a qualification requirement. */
4733
5022
  async updateRequirement(wid, requirementId, data) {
4734
5023
  return this.fetch(
4735
5024
  `w/${wid}/qualifications/requirements/${requirementId}`,
@@ -4739,12 +5028,14 @@ var QualificationsApi = class extends BaseApiClient {
4739
5028
  }
4740
5029
  );
4741
5030
  }
5031
+ /** Delete a qualification requirement. */
4742
5032
  async deleteRequirement(wid, requirementId) {
4743
5033
  return this.fetch(`w/${wid}/qualifications/requirements/${requirementId}`, {
4744
5034
  method: "DELETE"
4745
5035
  });
4746
5036
  }
4747
5037
  // ===== Submissions =====
5038
+ /** List submissions for a qualification, optionally filtered by status or member. */
4748
5039
  async listSubmissions(wid, qualificationId, params) {
4749
5040
  const searchParams = new URLSearchParams();
4750
5041
  if (params?.status) searchParams.set("status", params.status);
@@ -4754,11 +5045,13 @@ var QualificationsApi = class extends BaseApiClient {
4754
5045
  `w/${wid}/qualifications/${qualificationId}/submissions${qs ? `?${qs}` : ""}`
4755
5046
  );
4756
5047
  }
5048
+ /** Get a single qualification submission by ID. */
4757
5049
  async getSubmission(wid, submissionId) {
4758
5050
  return this.fetch(
4759
5051
  `w/${wid}/qualifications/submissions/${submissionId}`
4760
5052
  );
4761
5053
  }
5054
+ /** Submit an answer for a qualification requirement. */
4762
5055
  async submitAnswer(wid, requirementId, data) {
4763
5056
  return this.fetch(
4764
5057
  `w/${wid}/qualifications/requirements/${requirementId}/submit`,
@@ -4768,6 +5061,7 @@ var QualificationsApi = class extends BaseApiClient {
4768
5061
  }
4769
5062
  );
4770
5063
  }
5064
+ /** Start a chat scenario for a qualification requirement. */
4771
5065
  async startScenario(wid, requirementId) {
4772
5066
  return this.fetch(
4773
5067
  `w/${wid}/qualifications/requirements/${requirementId}/start-scenario`,
@@ -4776,11 +5070,13 @@ var QualificationsApi = class extends BaseApiClient {
4776
5070
  }
4777
5071
  );
4778
5072
  }
5073
+ /** Delete a submission to allow the member to retry. */
4779
5074
  async retrySubmission(wid, submissionId) {
4780
5075
  await this.fetch(`w/${wid}/qualifications/submissions/${submissionId}/retry`, {
4781
5076
  method: "DELETE"
4782
5077
  });
4783
5078
  }
5079
+ /** Submit the current user's qualification for review. */
4784
5080
  async submitForReview(wid, qualificationId) {
4785
5081
  return this.fetch(
4786
5082
  `w/${wid}/qualifications/members/me/qualifications/${qualificationId}/submit`,
@@ -4789,6 +5085,7 @@ var QualificationsApi = class extends BaseApiClient {
4789
5085
  }
4790
5086
  );
4791
5087
  }
5088
+ /** Review a qualification submission, approving or rejecting it. */
4792
5089
  async reviewSubmission(wid, submissionId, data) {
4793
5090
  return this.fetch(
4794
5091
  `w/${wid}/qualifications/submissions/${submissionId}/review`,
@@ -4798,6 +5095,7 @@ var QualificationsApi = class extends BaseApiClient {
4798
5095
  }
4799
5096
  );
4800
5097
  }
5098
+ /** Override the score for a specific criterion on a submission. */
4801
5099
  async overrideCriterionScore(wid, submissionId, criterionId, data) {
4802
5100
  return this.fetch(
4803
5101
  `w/${wid}/qualifications/submissions/${submissionId}/criteria/${criterionId}`,
@@ -4809,6 +5107,7 @@ var QualificationsApi = class extends BaseApiClient {
4809
5107
  }
4810
5108
  };
4811
5109
  var ReportsApi = class extends BaseApiClient {
5110
+ /** Get AI model usage report for a workspace within an optional date range. */
4812
5111
  async getAIUsageReport(wid, params) {
4813
5112
  const queryParams = new URLSearchParams();
4814
5113
  if (params?.start_date) {
@@ -4821,6 +5120,7 @@ var ReportsApi = class extends BaseApiClient {
4821
5120
  const url = `w/${wid}/reports/ai-usage${queryString ? `?${queryString}` : ""}`;
4822
5121
  return this.fetch(url);
4823
5122
  }
5123
+ /** Get SMS usage report for a workspace within an optional date range. */
4824
5124
  async getSMSUsageReport(wid, params) {
4825
5125
  const queryParams = new URLSearchParams();
4826
5126
  if (params?.start_date) {
@@ -4833,6 +5133,7 @@ var ReportsApi = class extends BaseApiClient {
4833
5133
  const url = `w/${wid}/reports/sms-usage${queryString ? `?${queryString}` : ""}`;
4834
5134
  return this.fetch(url);
4835
5135
  }
5136
+ /** Get phone call usage report for a workspace within an optional date range. */
4836
5137
  async getPhoneUsageReport(wid, params) {
4837
5138
  const queryParams = new URLSearchParams();
4838
5139
  if (params?.start_date) {
@@ -4845,6 +5146,7 @@ var ReportsApi = class extends BaseApiClient {
4845
5146
  const url = `w/${wid}/reports/phone-usage${queryString ? `?${queryString}` : ""}`;
4846
5147
  return this.fetch(url);
4847
5148
  }
5149
+ /** Get usage report for a specific member within an optional date range. */
4848
5150
  async getMemberUsage(wid, memberId, params) {
4849
5151
  const queryParams = new URLSearchParams();
4850
5152
  if (params?.start_date) {
@@ -4857,6 +5159,7 @@ var ReportsApi = class extends BaseApiClient {
4857
5159
  const url = `w/${wid}/reports/member-usage/${memberId}${queryString ? `?${queryString}` : ""}`;
4858
5160
  return this.fetch(url);
4859
5161
  }
5162
+ /** Get voice (STT/TTS) usage report for a workspace within an optional date range. */
4860
5163
  async getVoiceUsageReport(wid, params) {
4861
5164
  const queryParams = new URLSearchParams();
4862
5165
  if (params?.start_date) {
@@ -4871,9 +5174,11 @@ var ReportsApi = class extends BaseApiClient {
4871
5174
  }
4872
5175
  };
4873
5176
  var SitesApi = class extends BaseApiClient {
5177
+ /** List all sites in a workspace. */
4874
5178
  async getSites(wid) {
4875
5179
  return this.fetch(`w/${wid}/sites`);
4876
5180
  }
5181
+ /** Check whether a site slug is available for use. */
4877
5182
  async checkSiteSlugAvailability(wid, slug, siteUuid = null) {
4878
5183
  const params = new URLSearchParams();
4879
5184
  if (siteUuid) params.append("site_uuid", siteUuid);
@@ -4881,6 +5186,7 @@ var SitesApi = class extends BaseApiClient {
4881
5186
  `w/${wid}/sites/available/${slug}?${params.toString()}`
4882
5187
  );
4883
5188
  }
5189
+ /** Check whether a custom domain is available for a site. */
4884
5190
  async checkSiteDomainAvailability(wid, domain, siteUuid = null) {
4885
5191
  const params = new URLSearchParams();
4886
5192
  if (siteUuid) params.append("site_uuid", siteUuid);
@@ -4888,24 +5194,29 @@ var SitesApi = class extends BaseApiClient {
4888
5194
  `w/${wid}/sites/domain-available/${domain}?${params.toString()}`
4889
5195
  );
4890
5196
  }
5197
+ /** Get a single site by ID. */
4891
5198
  async getSite(wid, id) {
4892
5199
  return this.fetch(`w/${wid}/sites/${id}`);
4893
5200
  }
5201
+ /** Get a single site by UUID. */
4894
5202
  async getSiteByUuid(wid, uuid) {
4895
5203
  return this.fetch(`s/${wid}/${uuid}`);
4896
5204
  }
5205
+ /** Get a fully rendered page from a site by slug or ID. */
4897
5206
  async getSiteRenderedPage(wid, siteUuid, pageSlugOrId) {
4898
5207
  return this.fetch(`s/${wid}/${siteUuid}/pages/${pageSlugOrId}`);
4899
5208
  }
5209
+ /** Get the rendered navigation menu for a site, including all translations. */
4900
5210
  async getSiteRenderedMenu(wid, siteUuid) {
4901
5211
  return this.fetch(`s/${wid}/${siteUuid}/menu`);
4902
5212
  }
5213
+ /** Sign up a new user through a site's public registration. */
4903
5214
  async siteSignup(wid, siteUuid) {
4904
5215
  return this.fetch(`s/${wid}/${siteUuid}/signup`, {
4905
5216
  method: "POST"
4906
5217
  });
4907
5218
  }
4908
- // ===== SITE-SPECIFIC AUTHENTICATION METHODS =====
5219
+ /** Send a phone verification code for site-specific authentication. */
4909
5220
  async siteSendPhoneCode(wid, siteUuid, phoneNumber) {
4910
5221
  return this.fetch(
4911
5222
  `s/${wid}/${siteUuid}/auth/send-phone-code`,
@@ -4915,6 +5226,7 @@ var SitesApi = class extends BaseApiClient {
4915
5226
  }
4916
5227
  );
4917
5228
  }
5229
+ /** Send an email verification code for site-specific authentication. */
4918
5230
  async siteSendEmailCode(wid, siteUuid, email) {
4919
5231
  return this.fetch(
4920
5232
  `s/${wid}/${siteUuid}/auth/send-email-code`,
@@ -4924,6 +5236,7 @@ var SitesApi = class extends BaseApiClient {
4924
5236
  }
4925
5237
  );
4926
5238
  }
5239
+ /** Verify a phone or email code and complete site authentication. */
4927
5240
  async siteVerifyCode(wid, siteUuid, code, phoneNumber, email) {
4928
5241
  const verifyResponse = await this.fetch(`s/${wid}/${siteUuid}/auth/verify`, {
4929
5242
  method: "POST",
@@ -4939,28 +5252,33 @@ var SitesApi = class extends BaseApiClient {
4939
5252
  }
4940
5253
  return verifyResponse;
4941
5254
  }
5255
+ /** Trigger a crawl of the site's external content source. */
4942
5256
  async crawlSite(wid, siteId) {
4943
5257
  return this.fetch(`w/${wid}/sites/${siteId}/crawl`, {
4944
5258
  method: "POST"
4945
5259
  });
4946
5260
  }
5261
+ /** Create a new site in the workspace. */
4947
5262
  async createSite(wid, site) {
4948
5263
  return this.fetch(`w/${wid}/sites`, {
4949
5264
  method: "POST",
4950
5265
  body: JSON.stringify(site)
4951
5266
  });
4952
5267
  }
5268
+ /** Update a site's configuration. */
4953
5269
  async updateSite(wid, id, site) {
4954
5270
  return this.fetch(`w/${wid}/sites/${id}`, {
4955
5271
  method: "PUT",
4956
5272
  body: JSON.stringify(site)
4957
5273
  });
4958
5274
  }
5275
+ /** Delete a site by ID. */
4959
5276
  async deleteSite(wid, id) {
4960
5277
  return this.fetch(`w/${wid}/sites/${id}`, {
4961
5278
  method: "DELETE"
4962
5279
  });
4963
5280
  }
5281
+ /** List pages for a site with optional pagination, sorting, and search. */
4964
5282
  async getSitePages(wid, siteId, options = {}) {
4965
5283
  const params = new URLSearchParams();
4966
5284
  if (options.page) params.append("page", options.page.toString());
@@ -4972,36 +5290,43 @@ var SitesApi = class extends BaseApiClient {
4972
5290
  `w/${wid}/sites/${siteId}/pages${params.toString() ? `?${params.toString()}` : ""}`
4973
5291
  );
4974
5292
  }
5293
+ /** Get a single page by ID within a site. */
4975
5294
  async getPage(wid, siteId, pageId) {
4976
5295
  return this.fetch(`w/${wid}/sites/${siteId}/pages/${pageId}`);
4977
5296
  }
5297
+ /** Get a single page by its slug within a site. */
4978
5298
  async getPageBySlug(wid, siteId, slug) {
4979
5299
  return this.fetch(`w/${wid}/sites/${siteId}/pages/by-slug/${slug}`);
4980
5300
  }
5301
+ /** Create a new page within a site. */
4981
5302
  async createPage(wid, siteId, page) {
4982
5303
  return this.fetch(`w/${wid}/sites/${siteId}/pages`, {
4983
5304
  method: "POST",
4984
5305
  body: JSON.stringify(page)
4985
5306
  });
4986
5307
  }
5308
+ /** Update a page's content or metadata. */
4987
5309
  async updatePage(wid, siteId, pageId, page) {
4988
5310
  return this.fetch(`w/${wid}/sites/${siteId}/pages/${pageId}`, {
4989
5311
  method: "PUT",
4990
5312
  body: JSON.stringify(page)
4991
5313
  });
4992
5314
  }
5315
+ /** Delete a page from a site. */
4993
5316
  async deletePage(wid, siteId, pageId) {
4994
5317
  return this.fetch(`w/${wid}/sites/${siteId}/pages/${pageId}`, {
4995
5318
  method: "DELETE"
4996
5319
  });
4997
5320
  }
5321
+ /** Get aggregate counts (pages, menu items, etc.) for a site. */
4998
5322
  async getSiteCounts(wid, siteId) {
4999
5323
  return this.fetch(`w/${wid}/sites/${siteId}/counts`);
5000
5324
  }
5001
- // Menu management methods
5325
+ /** Get the full menu tree for a site. */
5002
5326
  async getSiteMenu(wid, siteId) {
5003
5327
  return this.fetch(`w/${wid}/sites/${siteId}/menu`);
5004
5328
  }
5329
+ /** List menu items for a site, optionally filtered by parent item. */
5005
5330
  async getMenuItems(wid, siteId, parentId) {
5006
5331
  const params = new URLSearchParams();
5007
5332
  if (parentId !== void 0 && parentId !== null) {
@@ -5012,36 +5337,41 @@ var SitesApi = class extends BaseApiClient {
5012
5337
  `w/${wid}/sites/${siteId}/menu/items${query ? `?${query}` : ""}`
5013
5338
  );
5014
5339
  }
5340
+ /** Create a new menu item in a site's navigation. */
5015
5341
  async createMenuItem(wid, siteId, item) {
5016
5342
  return this.fetch(`w/${wid}/sites/${siteId}/menu/items`, {
5017
5343
  method: "POST",
5018
5344
  body: JSON.stringify(item)
5019
5345
  });
5020
5346
  }
5347
+ /** Update a menu item's properties. */
5021
5348
  async updateMenuItem(wid, siteId, itemId, item) {
5022
5349
  return this.fetch(`w/${wid}/sites/${siteId}/menu/items/${itemId}`, {
5023
5350
  method: "PUT",
5024
5351
  body: JSON.stringify(item)
5025
5352
  });
5026
5353
  }
5354
+ /** Delete a menu item from a site's navigation. */
5027
5355
  async deleteMenuItem(wid, siteId, itemId) {
5028
5356
  return this.fetch(`w/${wid}/sites/${siteId}/menu/items/${itemId}`, {
5029
5357
  method: "DELETE"
5030
5358
  });
5031
5359
  }
5360
+ /** Reorder menu items within a site's navigation. */
5032
5361
  async reorderMenuItems(wid, siteId, data) {
5033
5362
  return this.fetch(`w/${wid}/sites/${siteId}/menu/reorder`, {
5034
5363
  method: "POST",
5035
5364
  body: JSON.stringify(data)
5036
5365
  });
5037
5366
  }
5038
- // Site media upload method
5367
+ /** Generate a pre-signed upload URL for site media content. */
5039
5368
  async generateSiteMediaUploadUrl(wid, siteId, uploadRequest) {
5040
5369
  return this.fetch(`w/${wid}/sites/${siteId}/media/upload-url`, {
5041
5370
  method: "POST",
5042
5371
  body: JSON.stringify(uploadRequest)
5043
5372
  });
5044
5373
  }
5374
+ /** Initiate Google OAuth flow for site-specific authentication. */
5045
5375
  async siteGoogleOAuthInitiate(wid, siteUuid, origin) {
5046
5376
  const params = new URLSearchParams({ origin });
5047
5377
  return this.fetch(
@@ -5050,24 +5380,29 @@ var SitesApi = class extends BaseApiClient {
5050
5380
  }
5051
5381
  };
5052
5382
  var SubscriptionsApi = class extends BaseApiClient {
5383
+ /** List all subscriptions for the current account. */
5053
5384
  async getSubscriptions() {
5054
5385
  return this.fetch("subscriptions");
5055
5386
  }
5387
+ /** List all subscriptions associated with a workspace. */
5056
5388
  async getWorkspaceSubscriptions(wid) {
5057
5389
  return this.fetch(`w/${wid}/subscriptions`);
5058
5390
  }
5391
+ /** Cancel an active subscription. */
5059
5392
  async cancelSubscription(subscriptionId) {
5060
5393
  return this.fetch(`subscriptions/${subscriptionId}/cancel`, {
5061
5394
  method: "POST",
5062
5395
  credentials: "include"
5063
5396
  });
5064
5397
  }
5398
+ /** Reactivate a previously cancelled subscription. */
5065
5399
  async reactivateSubscription(subscriptionId) {
5066
5400
  return this.fetch(`subscriptions/${subscriptionId}/reactivate`, {
5067
5401
  method: "POST",
5068
5402
  credentials: "include"
5069
5403
  });
5070
5404
  }
5405
+ /** Update a subscription's budget or plan period. */
5071
5406
  async updateSubscription(subscriptionId, updates) {
5072
5407
  return this.fetch(`subscriptions/${subscriptionId}`, {
5073
5408
  method: "PUT",
@@ -5078,6 +5413,7 @@ var SubscriptionsApi = class extends BaseApiClient {
5078
5413
  }
5079
5414
  });
5080
5415
  }
5416
+ /** Provision the member role associated with a subscription. */
5081
5417
  async provisionMemberRole(subscriptionId) {
5082
5418
  return this.fetch(`subscriptions/${subscriptionId}/provision-role`, {
5083
5419
  method: "POST",
@@ -5086,6 +5422,7 @@ var SubscriptionsApi = class extends BaseApiClient {
5086
5422
  }
5087
5423
  };
5088
5424
  var TasksApi = class extends BaseApiClient {
5425
+ /** List all tasks in a workspace, optionally filtering by workflow or including archived. */
5089
5426
  async getTasks(wid, options = {}) {
5090
5427
  const params = new URLSearchParams();
5091
5428
  if (options.includeArchived) {
@@ -5098,31 +5435,37 @@ var TasksApi = class extends BaseApiClient {
5098
5435
  `w/${wid}/tasks${params.toString() ? `?${params.toString()}` : ""}`
5099
5436
  );
5100
5437
  }
5438
+ /** Get a single task by ID. */
5101
5439
  async getTask(wid, id) {
5102
5440
  return this.fetch(`w/${wid}/tasks/${id}`);
5103
5441
  }
5442
+ /** Create a new task in a workspace. */
5104
5443
  async createTask(wid, task) {
5105
5444
  return this.fetch(`w/${wid}/tasks`, {
5106
5445
  method: "POST",
5107
5446
  body: JSON.stringify(task)
5108
5447
  });
5109
5448
  }
5449
+ /** Update an existing task with partial data. */
5110
5450
  async updateTask(wid, id, task) {
5111
5451
  return this.fetch(`w/${wid}/tasks/${id}`, {
5112
5452
  method: "PUT",
5113
5453
  body: JSON.stringify(task)
5114
5454
  });
5115
5455
  }
5456
+ /** Delete a task by ID. */
5116
5457
  async deleteTask(wid, id) {
5117
5458
  return this.fetch(`w/${wid}/tasks/${id}`, {
5118
5459
  method: "DELETE"
5119
5460
  });
5120
5461
  }
5462
+ /** Archive a task, hiding it from default listings. */
5121
5463
  async archiveTask(wid, id) {
5122
5464
  return this.fetch(`w/${wid}/tasks/${id}/archive`, {
5123
5465
  method: "PUT"
5124
5466
  });
5125
5467
  }
5468
+ /** Restore an archived task back to active status. */
5126
5469
  async unarchiveTask(wid, id) {
5127
5470
  return this.fetch(`w/${wid}/tasks/${id}/unarchive`, {
5128
5471
  method: "PUT"
@@ -5176,17 +5519,21 @@ var ToolkitsApi = class extends BaseApiClient {
5176
5519
  }
5177
5520
  };
5178
5521
  var WorkflowsApi = class extends BaseApiClient {
5522
+ /** List all workflows in a workspace, optionally including archived ones. */
5179
5523
  async getWorkflows(wid, archived = false) {
5180
5524
  const url = archived ? `w/${wid}/workflows?archived=true` : `w/${wid}/workflows`;
5181
5525
  return this.fetch(url);
5182
5526
  }
5527
+ /** Get a single workflow by ID. */
5183
5528
  async getWorkflow(wid, id) {
5184
5529
  return this.fetch(`w/${wid}/workflows/${id}`);
5185
5530
  }
5531
+ /** Get activity metrics for a single workflow. */
5186
5532
  async getWorkflowActivity(wid, id, options) {
5187
5533
  const params = options?.days ? `?days=${options.days}` : "";
5188
5534
  return this.fetch(`w/${wid}/workflows/${id}/activity${params}`);
5189
5535
  }
5536
+ /** Get activity metrics for multiple workflows in a single request. */
5190
5537
  async getWorkflowsActivityBatch(wid, workflowIds, options) {
5191
5538
  const params = new URLSearchParams();
5192
5539
  params.set("workflow_ids", workflowIds.join(","));
@@ -5195,6 +5542,7 @@ var WorkflowsApi = class extends BaseApiClient {
5195
5542
  `w/${wid}/workflows/activity/batch?${params.toString()}`
5196
5543
  );
5197
5544
  }
5545
+ /** Get the Mermaid diagram representation of a workflow. */
5198
5546
  async getWorkflowDiagram(wid, id) {
5199
5547
  return this.fetch(`w/${wid}/workflows/${id}/diagram`);
5200
5548
  }
@@ -5209,52 +5557,62 @@ var WorkflowsApi = class extends BaseApiClient {
5209
5557
  }
5210
5558
  return `${this.baseUrl}/api/v2/w/${wid}/workflows/${id}/thumbnail`;
5211
5559
  }
5560
+ /** Create a new workflow in a workspace. */
5212
5561
  async createWorkflow(wid, workflow) {
5213
5562
  return this.fetch(`w/${wid}/workflows`, {
5214
5563
  method: "POST",
5215
5564
  body: JSON.stringify(workflow)
5216
5565
  });
5217
5566
  }
5567
+ /** Update an existing workflow. */
5218
5568
  async updateWorkflow(wid, id, workflow) {
5219
5569
  return this.fetch(`w/${wid}/workflows/${id}`, {
5220
5570
  method: "PUT",
5221
5571
  body: JSON.stringify(workflow)
5222
5572
  });
5223
5573
  }
5574
+ /** Preview the impact of deleting a workflow, including affected tasks and assignments. */
5224
5575
  async getWorkflowDeletionPreview(wid, id) {
5225
5576
  return this.fetch(`w/${wid}/workflows/${id}/deletion-preview`);
5226
5577
  }
5578
+ /** Delete a workflow, optionally cascading to delete its tasks. */
5227
5579
  async deleteWorkflow(wid, id, cascade = false) {
5228
5580
  const url = cascade ? `w/${wid}/workflows/${id}?cascade=true` : `w/${wid}/workflows/${id}`;
5229
5581
  return this.fetch(url, {
5230
5582
  method: "DELETE"
5231
5583
  });
5232
5584
  }
5585
+ /** Archive a workflow. */
5233
5586
  async archiveWorkflow(wid, id) {
5234
5587
  return this.fetch(`w/${wid}/workflows/${id}/archive`, {
5235
5588
  method: "POST"
5236
5589
  });
5237
5590
  }
5591
+ /** Unarchive a previously archived workflow. */
5238
5592
  async unarchiveWorkflow(wid, id) {
5239
5593
  return this.fetch(`w/${wid}/workflows/${id}/unarchive`, {
5240
5594
  method: "POST"
5241
5595
  });
5242
5596
  }
5597
+ /** Clone a workflow with a new name. */
5243
5598
  async cloneWorkflow(wid, id, data) {
5244
5599
  return this.fetch(`w/${wid}/workflows/${id}/clone`, {
5245
5600
  method: "POST",
5246
5601
  body: JSON.stringify(data)
5247
5602
  });
5248
5603
  }
5604
+ /** List available workflow templates. */
5249
5605
  async getWorkflowTemplates(wid) {
5250
5606
  return this.fetch(`w/${wid}/workflows/templates`);
5251
5607
  }
5608
+ /** Create a new workflow from a template. */
5252
5609
  async createWorkflowFromTemplate(wid, templateUuid, data) {
5253
5610
  return this.fetch(`w/${wid}/workflows/templates/${templateUuid}/create-workflow`, {
5254
5611
  method: "POST",
5255
5612
  body: JSON.stringify(data)
5256
5613
  });
5257
5614
  }
5615
+ /** Get task assignment statistics for a workflow within an optional date range. */
5258
5616
  async getWorkflowTaskAssignmentStats(wid, id, fromDate, toDate) {
5259
5617
  const params = new URLSearchParams();
5260
5618
  if (fromDate) params.append("from_date", fromDate);
@@ -5263,6 +5621,7 @@ var WorkflowsApi = class extends BaseApiClient {
5263
5621
  `w/${wid}/workflows/${id}/task-assignment-stats?${params.toString()}`
5264
5622
  );
5265
5623
  }
5624
+ /** List chats for a specific task within a workflow. */
5266
5625
  async getTaskChats(wid, workflowId, taskId, fromDate, toDate, limit = 100, offset = 0) {
5267
5626
  const params = new URLSearchParams();
5268
5627
  if (fromDate) params.append("from_date", fromDate);
@@ -5274,15 +5633,18 @@ var WorkflowsApi = class extends BaseApiClient {
5274
5633
  );
5275
5634
  }
5276
5635
  // Workflow Contributors API
5636
+ /** List all contributors for a workflow. */
5277
5637
  async getWorkflowContributors(wid, workflowId) {
5278
5638
  return this.fetch(`w/${wid}/workflows/${workflowId}/contributors`);
5279
5639
  }
5640
+ /** Add a contributor to a workflow. */
5280
5641
  async createWorkflowContributor(wid, workflowId, data) {
5281
5642
  return this.fetch(`w/${wid}/workflows/${workflowId}/contributors`, {
5282
5643
  method: "POST",
5283
5644
  body: JSON.stringify(data)
5284
5645
  });
5285
5646
  }
5647
+ /** Update a workflow contributor's settings. */
5286
5648
  async updateWorkflowContributor(wid, workflowId, contributorId, data) {
5287
5649
  return this.fetch(
5288
5650
  `w/${wid}/workflows/${workflowId}/contributors/${contributorId}`,
@@ -5292,6 +5654,7 @@ var WorkflowsApi = class extends BaseApiClient {
5292
5654
  }
5293
5655
  );
5294
5656
  }
5657
+ /** Remove a contributor from a workflow. */
5295
5658
  async deleteWorkflowContributor(wid, workflowId, contributorId) {
5296
5659
  return this.fetch(
5297
5660
  `w/${wid}/workflows/${workflowId}/contributors/${contributorId}`,
@@ -5471,59 +5834,73 @@ var WorkspaceInvitationsApi = class extends BaseApiClient {
5471
5834
  }
5472
5835
  };
5473
5836
  var WorkspacesApi = class extends BaseApiClient {
5837
+ /** List all workspaces accessible to the current user. */
5474
5838
  async getWorkspaces() {
5475
5839
  return this.fetch("w/");
5476
5840
  }
5841
+ /** List all publicly visible workspaces. */
5477
5842
  async getPublicWorkspaces() {
5478
5843
  return this.fetch("w/public");
5479
5844
  }
5845
+ /** Get a single workspace by ID. */
5480
5846
  async getWorkspace(wid) {
5481
5847
  return this.fetch(`w/${wid}`);
5482
5848
  }
5849
+ /** Create a new workspace. */
5483
5850
  async createWorkspace(workspace) {
5484
5851
  return this.fetch("w/", {
5485
5852
  method: "POST",
5486
5853
  body: JSON.stringify(workspace)
5487
5854
  });
5488
5855
  }
5856
+ /** Update an existing workspace. */
5489
5857
  async updateWorkspace(wid, workspace) {
5490
5858
  return this.fetch(`w/${wid}`, {
5491
5859
  method: "PUT",
5492
5860
  body: JSON.stringify(workspace)
5493
5861
  });
5494
5862
  }
5863
+ /** Delete a workspace. */
5495
5864
  async deleteWorkspace(wid) {
5496
5865
  return this.fetch(`w/${wid}`, {
5497
5866
  method: "DELETE"
5498
5867
  });
5499
5868
  }
5869
+ /** Leave a workspace as the current user. */
5500
5870
  async leaveWorkspace(wid) {
5501
5871
  return this.fetch(`w/${wid}/me`, {
5502
5872
  method: "DELETE"
5503
5873
  });
5504
5874
  }
5875
+ /** Get the default settings for a workspace. */
5505
5876
  async getWorkspaceDefaults(wid) {
5506
5877
  return this.fetch(`w/${wid}/defaults`);
5507
5878
  }
5879
+ /** Update the default settings for a workspace. */
5508
5880
  async updateWorkspaceDefaults(wid, defaults) {
5509
5881
  return this.fetch(`w/${wid}/defaults`, {
5510
5882
  method: "PUT",
5511
5883
  body: JSON.stringify(defaults)
5512
5884
  });
5513
5885
  }
5886
+ /** Get entity counts (members, tasks, workflows, etc.) for a workspace. */
5514
5887
  async getWorkspaceCounts(wid) {
5515
5888
  return this.fetch(`w/${wid}/counts`);
5516
5889
  }
5890
+ /** Check whether the workspace is currently within business hours. */
5517
5891
  async getBusinessHoursStatus(wid) {
5518
5892
  return this.fetch(`w/${wid}/business-hours-status`);
5519
5893
  }
5894
+ /** List all available workspace feature flags from the registry. */
5520
5895
  async getAvailableWorkspaceFeatures() {
5521
5896
  const result = await this.fetch(`features/registry`);
5522
5897
  return result.features;
5523
5898
  }
5899
+ /** Get active notices for a workspace. */
5524
5900
  async getWorkspaceNotices(wid) {
5525
5901
  return this.fetch(`w/${wid}/notices`);
5526
5902
  }
5903
+ /** List notifications for the current user in a workspace. */
5527
5904
  async getNotifications(wid, options = {}) {
5528
5905
  const params = new URLSearchParams();
5529
5906
  if (options.page) params.append("page", options.page.toString());
@@ -5532,32 +5909,39 @@ var WorkspacesApi = class extends BaseApiClient {
5532
5909
  const url = `w/${wid}/notifications${queryString ? `?${queryString}` : ""}`;
5533
5910
  return this.fetch(url);
5534
5911
  }
5912
+ /** Get a single notification by ID. */
5535
5913
  async getNotification(wid, id) {
5536
5914
  return this.fetch(`w/${wid}/notifications/${id}`);
5537
5915
  }
5916
+ /** Get the count of unread notifications for the current user. */
5538
5917
  async getUnreadNotificationCount(wid) {
5539
5918
  return this.fetch(`w/${wid}/notifications/unread-count`);
5540
5919
  }
5920
+ /** Mark a notification as read. */
5541
5921
  async markNotificationAsRead(wid, id) {
5542
5922
  return this.fetch(`w/${wid}/notifications/${id}/read`, {
5543
5923
  method: "POST"
5544
5924
  });
5545
5925
  }
5926
+ /** Dismiss a single notification. */
5546
5927
  async dismissNotification(wid, id) {
5547
5928
  return this.fetch(`w/${wid}/notifications/${id}/dismiss`, {
5548
5929
  method: "POST"
5549
5930
  });
5550
5931
  }
5932
+ /** Dismiss all notifications for the current user in a workspace. */
5551
5933
  async dismissAllNotifications(wid) {
5552
5934
  return this.fetch(`w/${wid}/notifications/dismiss-all`, {
5553
5935
  method: "POST"
5554
5936
  });
5555
5937
  }
5556
5938
  // ===== Push Notifications =====
5939
+ /** Get the VAPID public key for Web Push subscription registration. */
5557
5940
  async getVapidPublicKey() {
5558
5941
  const response = await this.fetch("push/vapid-public-key");
5559
5942
  return response.publicKey;
5560
5943
  }
5944
+ /** Register a Web Push subscription for the current user. */
5561
5945
  async registerPushSubscription(wid, subscription) {
5562
5946
  return this.fetch(
5563
5947
  `w/${wid}/push-subscriptions`,
@@ -5567,6 +5951,7 @@ var WorkspacesApi = class extends BaseApiClient {
5567
5951
  }
5568
5952
  );
5569
5953
  }
5954
+ /** Unregister a Web Push subscription by endpoint URL. */
5570
5955
  async unregisterPushSubscription(wid, endpoint) {
5571
5956
  return this.fetch(
5572
5957
  `w/${wid}/push-subscriptions?endpoint=${encodeURIComponent(endpoint)}`,
@@ -5575,32 +5960,39 @@ var WorkspacesApi = class extends BaseApiClient {
5575
5960
  }
5576
5961
  );
5577
5962
  }
5963
+ /** List all active Web Push subscriptions for the current user. */
5578
5964
  async listPushSubscriptions(wid) {
5579
5965
  return this.fetch(`w/${wid}/push-subscriptions`);
5580
5966
  }
5967
+ /** List all client workspaces managed by this reseller workspace. */
5581
5968
  async getResellerWorkspaces(wid) {
5582
5969
  return this.fetch(`w/${wid}/reseller/workspaces`);
5583
5970
  }
5971
+ /** Create a new client workspace under a reseller workspace. */
5584
5972
  async createClientWorkspace(wid, data) {
5585
5973
  return this.fetch(`w/${wid}/reseller/workspaces`, {
5586
5974
  method: "POST",
5587
5975
  body: JSON.stringify(data)
5588
5976
  });
5589
5977
  }
5978
+ /** Get a single client workspace by ID. */
5590
5979
  async getClientWorkspace(wid, workspaceId) {
5591
5980
  return this.fetch(`w/${wid}/reseller/workspaces/${workspaceId}`);
5592
5981
  }
5982
+ /** Update a client workspace's name or slug. */
5593
5983
  async updateClientWorkspace(wid, workspaceId, data) {
5594
5984
  return this.fetch(`w/${wid}/reseller/workspaces/${workspaceId}`, {
5595
5985
  method: "PUT",
5596
5986
  body: JSON.stringify(data)
5597
5987
  });
5598
5988
  }
5989
+ /** Delete a client workspace. */
5599
5990
  async deleteClientWorkspace(wid, workspaceId) {
5600
5991
  return this.fetch(`w/${wid}/reseller/workspaces/${workspaceId}`, {
5601
5992
  method: "DELETE"
5602
5993
  });
5603
5994
  }
5995
+ /** Provision a client workspace, setting up its database and resources. */
5604
5996
  async provisionClientWorkspace(wid, workspaceId) {
5605
5997
  return this.fetch(
5606
5998
  `w/${wid}/reseller/workspaces/${workspaceId}/provision`,
@@ -5609,44 +6001,53 @@ var WorkspacesApi = class extends BaseApiClient {
5609
6001
  }
5610
6002
  );
5611
6003
  }
6004
+ /** List products available from a reseller workspace, optionally filtering by featured status. */
5612
6005
  async getProducts(wid, featured) {
5613
6006
  const params = featured !== void 0 ? `?featured=${featured}` : "";
5614
6007
  return this.fetch(`w/${wid}/reseller/products${params}`);
5615
6008
  }
6009
+ /** Get a product by ID using the global endpoint. */
5616
6010
  async getProduct(id) {
5617
6011
  return this.fetch(`products/${id}`);
5618
6012
  }
6013
+ /** Get a publicly accessible product by ID. */
5619
6014
  async getPublicProduct(id) {
5620
6015
  return this.fetch(`products/${id}`);
5621
6016
  }
6017
+ /** Create a new product for a reseller workspace. */
5622
6018
  async createProduct(wid, product) {
5623
6019
  return this.fetch(`w/${wid}/reseller/products`, {
5624
6020
  method: "POST",
5625
6021
  body: JSON.stringify(product)
5626
6022
  });
5627
6023
  }
6024
+ /** Update an existing product. */
5628
6025
  async updateProduct(wid, id, updates) {
5629
6026
  return this.fetch(`w/${wid}/reseller/products/${id}`, {
5630
6027
  method: "PUT",
5631
6028
  body: JSON.stringify(updates)
5632
6029
  });
5633
6030
  }
6031
+ /** Delete a product from a reseller workspace. */
5634
6032
  async deleteProduct(wid, id) {
5635
6033
  return this.fetch(`w/${wid}/reseller/products/${id}`, {
5636
6034
  method: "DELETE"
5637
6035
  });
5638
6036
  }
5639
6037
  // Workspace Secret Key
6038
+ /** Reset and regenerate the workspace secret key. */
5640
6039
  async resetWorkspaceSecretKey(wid) {
5641
6040
  return this.fetch(`w/${wid}/defaults/reset-secret-key`, {
5642
6041
  method: "POST"
5643
6042
  });
5644
6043
  }
5645
6044
  // Workspace Export/Import API
6045
+ /** Export workspace configuration, optionally scoped to a single workflow. */
5646
6046
  async exportWorkspace(wid, workflowId) {
5647
6047
  const params = workflowId ? `?workflow_id=${workflowId}` : "";
5648
6048
  return this.fetch(`w/${wid}/export${params}`);
5649
6049
  }
6050
+ /** Preview the result of importing workspace configuration without applying changes. */
5650
6051
  async previewWorkspaceImport(wid, exportData, importMappings, createNew, autoMap) {
5651
6052
  return this.fetch(`w/${wid}/preview-import`, {
5652
6053
  method: "POST",
@@ -5658,6 +6059,7 @@ var WorkspacesApi = class extends BaseApiClient {
5658
6059
  })
5659
6060
  });
5660
6061
  }
6062
+ /** Import workspace configuration from exported data. */
5661
6063
  async importWorkspace(wid, exportData, importMappings, createNew) {
5662
6064
  return this.fetch(`w/${wid}/import`, {
5663
6065
  method: "POST",
@@ -5668,6 +6070,7 @@ var WorkspacesApi = class extends BaseApiClient {
5668
6070
  })
5669
6071
  });
5670
6072
  }
6073
+ /** Preview a workspace import using the legacy untyped interface. */
5671
6074
  // Legacy method for backward compatibility
5672
6075
  async previewImportWorkspace(wid, exportData, importMappings = {}, createNew = {}) {
5673
6076
  return this.fetch(`w/${wid}/preview-import`, {
@@ -5679,9 +6082,11 @@ var WorkspacesApi = class extends BaseApiClient {
5679
6082
  })
5680
6083
  });
5681
6084
  }
6085
+ /** List available themes for a workspace. */
5682
6086
  async getWorkspaceThemes(wid) {
5683
6087
  return this.fetch(`w/${wid}/themes`);
5684
6088
  }
6089
+ /** Update the active themes for a workspace. */
5685
6090
  async updateWorkspaceThemes(wid, themes) {
5686
6091
  return this.fetch(`w/${wid}/themes`, {
5687
6092
  method: "PUT",
@@ -5790,24 +6195,29 @@ function formatAppContextAsMarkdown(context) {
5790
6195
  ${lines.join("\n")}`;
5791
6196
  }
5792
6197
  var WorkflowNotesApi = class extends BaseApiClient {
6198
+ /** List all notes for a specific workflow. */
5793
6199
  async getWorkflowNotes(wid, workflowId) {
5794
6200
  return this.fetch(`w/${wid}/workflow-notes?workflow_id=${workflowId}`);
5795
6201
  }
6202
+ /** Get a single workflow note by ID. */
5796
6203
  async getWorkflowNote(wid, id) {
5797
6204
  return this.fetch(`w/${wid}/workflow-notes/${id}`);
5798
6205
  }
6206
+ /** Create a new note on a workflow. */
5799
6207
  async createWorkflowNote(wid, note) {
5800
6208
  return this.fetch(`w/${wid}/workflow-notes`, {
5801
6209
  method: "POST",
5802
6210
  body: JSON.stringify(note)
5803
6211
  });
5804
6212
  }
6213
+ /** Update an existing workflow note with partial data. */
5805
6214
  async updateWorkflowNote(wid, id, note) {
5806
6215
  return this.fetch(`w/${wid}/workflow-notes/${id}`, {
5807
6216
  method: "PUT",
5808
6217
  body: JSON.stringify(note)
5809
6218
  });
5810
6219
  }
6220
+ /** Delete a workflow note by ID. */
5811
6221
  async deleteWorkflowNote(wid, id) {
5812
6222
  return this.fetch(`w/${wid}/workflow-notes/${id}`, {
5813
6223
  method: "DELETE"
@@ -6250,6 +6660,7 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, assistants, supe
6250
6660
  target.updateAssistant = assistants.updateAssistant.bind(assistants);
6251
6661
  target.deleteAssistant = assistants.deleteAssistant.bind(assistants);
6252
6662
  target.previewTTS = assistants.previewTTS.bind(assistants);
6663
+ target.previewThinkingSound = assistants.previewThinkingSound.bind(assistants);
6253
6664
  target.getSupervisors = supervisors.getSupervisors.bind(supervisors);
6254
6665
  target.getSupervisor = supervisors.getSupervisor.bind(supervisors);
6255
6666
  target.createSupervisor = supervisors.createSupervisor.bind(supervisors);
@@ -6331,6 +6742,8 @@ function bindToolkitsMethods(target, toolkits, templates, aiModels, customToolki
6331
6742
  target.getVariableRegistry = templates.getVariableRegistry.bind(templates);
6332
6743
  target.getChatModels = aiModels.getChatModels.bind(aiModels);
6333
6744
  target.getRealtimeModels = aiModels.getRealtimeModels.bind(aiModels);
6745
+ target.getSTTModels = aiModels.getSTTModels.bind(aiModels);
6746
+ target.getTTSModels = aiModels.getTTSModels.bind(aiModels);
6334
6747
  target.getVoiceModels = aiModels.getVoiceModels.bind(aiModels);
6335
6748
  target.getAllModels = aiModels.getAllModels.bind(aiModels);
6336
6749
  target.getCustomToolkits = customToolkits.getCustomToolkits.bind(customToolkits);
@@ -6927,6 +7340,7 @@ var GravityRailClient = class {
6927
7340
  updateAssistant;
6928
7341
  deleteAssistant;
6929
7342
  previewTTS;
7343
+ previewThinkingSound;
6930
7344
  getSupervisors;
6931
7345
  getSupervisor;
6932
7346
  createSupervisor;
@@ -7005,6 +7419,8 @@ var GravityRailClient = class {
7005
7419
  getVariableRegistry;
7006
7420
  getChatModels;
7007
7421
  getRealtimeModels;
7422
+ getSTTModels;
7423
+ getTTSModels;
7008
7424
  getVoiceModels;
7009
7425
  getAllModels;
7010
7426
  getCustomToolkits;
@@ -7285,7 +7701,7 @@ function getTTSProvider(ttsModel) {
7285
7701
  if (!ttsModel || ttsModel === "native") return ttsModel ?? null;
7286
7702
  return ttsModel.split(":")[0] ?? null;
7287
7703
  }
7288
- var TTS_PREVIEW_PROVIDERS = ["openai", "elevenlabs", "google", "aws"];
7704
+ var TTS_PREVIEW_PROVIDERS = ["openai", "elevenlabs", "google", "aws", "pocket"];
7289
7705
  function getVoiceModelId(assistant) {
7290
7706
  const config = assistant.realtimeModelConfig;
7291
7707
  return config?.voiceModel ?? null;
@@ -7396,8 +7812,11 @@ var CHAT_TYPES = {
7396
7812
  MANAGER: "manager",
7397
7813
  CONTRIBUTOR: "contributor",
7398
7814
  DEVELOPER: "developer",
7399
- AGENT: "agent",
7400
- DM: "dm"
7815
+ MEMBER: "member",
7816
+ /** @deprecated Use MEMBER instead */
7817
+ AGENT: "member",
7818
+ /** @deprecated Use MEMBER instead */
7819
+ DM: "member"
7401
7820
  };
7402
7821
  var BUILTIN_ASSISTANT_CHAT_TYPES = /* @__PURE__ */ new Set([
7403
7822
  CHAT_TYPES.MANAGER,
@@ -7406,7 +7825,7 @@ var BUILTIN_ASSISTANT_CHAT_TYPES = /* @__PURE__ */ new Set([
7406
7825
  ]);
7407
7826
  var NO_ASSISTANT_PARTICIPANT_CHAT_TYPES = /* @__PURE__ */ new Set([
7408
7827
  ...BUILTIN_ASSISTANT_CHAT_TYPES,
7409
- CHAT_TYPES.DM
7828
+ CHAT_TYPES.MEMBER
7410
7829
  ]);
7411
7830
  function usesBuiltinAssistant(chatType) {
7412
7831
  return BUILTIN_ASSISTANT_CHAT_TYPES.has(chatType);
@@ -8213,7 +8632,7 @@ var SCOPE_PRESETS = {
8213
8632
  ALL: Object.keys(SCOPES)
8214
8633
  };
8215
8634
 
8216
- // ../client/dist/chunk-JKJZGXAC.mjs
8635
+ // ../client/dist/chunk-HC6VELKR.mjs
8217
8636
  var AccessLevel = /* @__PURE__ */ ((AccessLevel2) => {
8218
8637
  AccessLevel2["PRIVATE"] = "private";
8219
8638
  AccessLevel2["PUBLIC"] = "public";
@@ -8608,6 +9027,7 @@ var TTS_MODEL_ELEVENLABS_TURBO = "elevenlabs:tts:eleven_turbo_v2_5";
8608
9027
  var TTS_MODEL_ELEVENLABS_MULTILINGUAL = "elevenlabs:tts:eleven_multilingual_v2";
8609
9028
  var TTS_MODEL_AWS_POLLY_GENERATIVE = "aws:tts:polly-generative";
8610
9029
  var TTS_MODEL_AWS_POLLY_NEURAL = "aws:tts:polly-neural";
9030
+ var TTS_MODEL_POCKET = "pocket:tts:default";
8611
9031
  var FhirVendor = /* @__PURE__ */ ((FhirVendor2) => {
8612
9032
  FhirVendor2["ECLINICALWORKS"] = "eclinicalworks";
8613
9033
  FhirVendor2["EPIC"] = "epic";
@@ -8847,6 +9267,7 @@ var AttendeeResponseStatus = /* @__PURE__ */ ((AttendeeResponseStatus2) => {
8847
9267
  TTS_MODEL_ELEVENLABS_FLASH,
8848
9268
  TTS_MODEL_ELEVENLABS_MULTILINGUAL,
8849
9269
  TTS_MODEL_ELEVENLABS_TURBO,
9270
+ TTS_MODEL_POCKET,
8850
9271
  TTS_PREVIEW_PROVIDERS,
8851
9272
  TemplatesApi,
8852
9273
  ToolkitState,