@gpt-platform/client 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1767 -155
- package/dist/index.d.ts +1767 -155
- package/dist/index.js +2156 -175
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2156 -175
- package/dist/index.mjs.map +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1285,7 +1285,7 @@ function buildUserAgent(sdkVersion, appInfo) {
|
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
1287
1287
|
// src/version.ts
|
|
1288
|
-
var SDK_VERSION = "0.
|
|
1288
|
+
var SDK_VERSION = "0.3.0";
|
|
1289
1289
|
var DEFAULT_API_VERSION = "2026-02-25";
|
|
1290
1290
|
|
|
1291
1291
|
// src/base-client.ts
|
|
@@ -1607,6 +1607,15 @@ var getVoiceSessionsWorkspaceByWorkspaceId = (options) => (options.client ?? cli
|
|
|
1607
1607
|
url: "/voice/sessions/workspace/{workspace_id}",
|
|
1608
1608
|
...options
|
|
1609
1609
|
});
|
|
1610
|
+
var postEmailMarketingSequences = (options) => (options.client ?? client).post({
|
|
1611
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1612
|
+
url: "/email-marketing/sequences",
|
|
1613
|
+
...options,
|
|
1614
|
+
headers: {
|
|
1615
|
+
"Content-Type": "application/vnd.api+json",
|
|
1616
|
+
...options.headers
|
|
1617
|
+
}
|
|
1618
|
+
});
|
|
1610
1619
|
var patchExtractionDocumentsByIdCancel = (options) => (options.client ?? client).patch({
|
|
1611
1620
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1612
1621
|
url: "/extraction/documents/{id}/cancel",
|
|
@@ -1616,6 +1625,15 @@ var patchExtractionDocumentsByIdCancel = (options) => (options.client ?? client)
|
|
|
1616
1625
|
...options.headers
|
|
1617
1626
|
}
|
|
1618
1627
|
});
|
|
1628
|
+
var postCrmRelationships = (options) => (options.client ?? client).post({
|
|
1629
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1630
|
+
url: "/crm/relationships",
|
|
1631
|
+
...options,
|
|
1632
|
+
headers: {
|
|
1633
|
+
"Content-Type": "application/vnd.api+json",
|
|
1634
|
+
...options.headers
|
|
1635
|
+
}
|
|
1636
|
+
});
|
|
1619
1637
|
var deleteAgentVersionsById = (options) => (options.client ?? client).delete({
|
|
1620
1638
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1621
1639
|
url: "/agent-versions/{id}",
|
|
@@ -1626,6 +1644,16 @@ var getAgentVersionsById = (options) => (options.client ?? client).get({
|
|
|
1626
1644
|
url: "/agent-versions/{id}",
|
|
1627
1645
|
...options
|
|
1628
1646
|
});
|
|
1647
|
+
var deleteCrmRelationshipsById = (options) => (options.client ?? client).delete({
|
|
1648
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1649
|
+
url: "/crm/relationships/{id}",
|
|
1650
|
+
...options
|
|
1651
|
+
});
|
|
1652
|
+
var getCrmRelationshipsById = (options) => (options.client ?? client).get({
|
|
1653
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1654
|
+
url: "/crm/relationships/{id}",
|
|
1655
|
+
...options
|
|
1656
|
+
});
|
|
1629
1657
|
var getWatcherEventsById = (options) => (options.client ?? client).get({
|
|
1630
1658
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1631
1659
|
url: "/watcher/events/{id}",
|
|
@@ -1640,6 +1668,16 @@ var patchApiKeysByIdRevoke = (options) => (options.client ?? client).patch({
|
|
|
1640
1668
|
...options.headers
|
|
1641
1669
|
}
|
|
1642
1670
|
});
|
|
1671
|
+
var getCrmCustomEntitiesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
1672
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1673
|
+
url: "/crm/custom-entities/workspace/{workspace_id}",
|
|
1674
|
+
...options
|
|
1675
|
+
});
|
|
1676
|
+
var getEmailMarketingSequencesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
1677
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1678
|
+
url: "/email-marketing/sequences/workspace/{workspace_id}",
|
|
1679
|
+
...options
|
|
1680
|
+
});
|
|
1643
1681
|
var patchApiKeysByIdRotate = (options) => (options.client ?? client).patch({
|
|
1644
1682
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1645
1683
|
url: "/api-keys/{id}/rotate",
|
|
@@ -1649,6 +1687,15 @@ var patchApiKeysByIdRotate = (options) => (options.client ?? client).patch({
|
|
|
1649
1687
|
...options.headers
|
|
1650
1688
|
}
|
|
1651
1689
|
});
|
|
1690
|
+
var patchWorkspaceMembershipsByWorkspaceIdByUserIdProfile = (options) => (options.client ?? client).patch({
|
|
1691
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1692
|
+
url: "/workspace-memberships/{workspace_id}/{user_id}/profile",
|
|
1693
|
+
...options,
|
|
1694
|
+
headers: {
|
|
1695
|
+
"Content-Type": "application/vnd.api+json",
|
|
1696
|
+
...options.headers
|
|
1697
|
+
}
|
|
1698
|
+
});
|
|
1652
1699
|
var getWorkspaces = (options) => (options.client ?? client).get({
|
|
1653
1700
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1654
1701
|
url: "/workspaces",
|
|
@@ -1696,6 +1743,35 @@ var patchExtractionDocumentsByIdDismiss = (options) => (options.client ?? client
|
|
|
1696
1743
|
...options.headers
|
|
1697
1744
|
}
|
|
1698
1745
|
});
|
|
1746
|
+
var getCrawlerResults = (options) => (options.client ?? client).get({
|
|
1747
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1748
|
+
url: "/crawler/results",
|
|
1749
|
+
...options
|
|
1750
|
+
});
|
|
1751
|
+
var getCrmExportsById = (options) => (options.client ?? client).get({
|
|
1752
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1753
|
+
url: "/crm/exports/{id}",
|
|
1754
|
+
...options
|
|
1755
|
+
});
|
|
1756
|
+
var deleteCrmDealsById = (options) => (options.client ?? client).delete({
|
|
1757
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1758
|
+
url: "/crm/deals/{id}",
|
|
1759
|
+
...options
|
|
1760
|
+
});
|
|
1761
|
+
var getCrmDealsById = (options) => (options.client ?? client).get({
|
|
1762
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1763
|
+
url: "/crm/deals/{id}",
|
|
1764
|
+
...options
|
|
1765
|
+
});
|
|
1766
|
+
var patchCrmDealsById = (options) => (options.client ?? client).patch({
|
|
1767
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1768
|
+
url: "/crm/deals/{id}",
|
|
1769
|
+
...options,
|
|
1770
|
+
headers: {
|
|
1771
|
+
"Content-Type": "application/vnd.api+json",
|
|
1772
|
+
...options.headers
|
|
1773
|
+
}
|
|
1774
|
+
});
|
|
1699
1775
|
var postUsersAuthResetPasswordRequest = (options) => (options.client ?? client).post({
|
|
1700
1776
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1701
1777
|
url: "/users/auth/reset-password/request",
|
|
@@ -1725,6 +1801,25 @@ var postAgentsByIdAnalyzeTraining = (options) => (options.client ?? client).post
|
|
|
1725
1801
|
url: "/agents/{id}/analyze-training",
|
|
1726
1802
|
...options
|
|
1727
1803
|
});
|
|
1804
|
+
var getCrmContactsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
1805
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1806
|
+
url: "/crm/contacts/workspace/{workspace_id}",
|
|
1807
|
+
...options
|
|
1808
|
+
});
|
|
1809
|
+
var getEmailMarketingTemplatesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
1810
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1811
|
+
url: "/email-marketing/templates/workspace/{workspace_id}",
|
|
1812
|
+
...options
|
|
1813
|
+
});
|
|
1814
|
+
var postEmailMarketingCampaignsByIdAnalyze = (options) => (options.client ?? client).post({
|
|
1815
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1816
|
+
url: "/email-marketing/campaigns/{id}/analyze",
|
|
1817
|
+
...options,
|
|
1818
|
+
headers: {
|
|
1819
|
+
"Content-Type": "application/vnd.api+json",
|
|
1820
|
+
...options.headers
|
|
1821
|
+
}
|
|
1822
|
+
});
|
|
1728
1823
|
var postWebhookConfigsByIdTest = (options) => (options.client ?? client).post({
|
|
1729
1824
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1730
1825
|
url: "/webhook-configs/{id}/test",
|
|
@@ -1757,11 +1852,65 @@ var getExtractionBatchesWorkspaceByWorkspaceId = (options) => (options.client ??
|
|
|
1757
1852
|
url: "/extraction/batches/workspace/{workspace_id}",
|
|
1758
1853
|
...options
|
|
1759
1854
|
});
|
|
1855
|
+
var postConnectorsFullscriptCreatePatient = (options) => (options.client ?? client).post({
|
|
1856
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1857
|
+
url: "/connectors/fullscript/create-patient",
|
|
1858
|
+
...options,
|
|
1859
|
+
headers: {
|
|
1860
|
+
"Content-Type": "application/vnd.api+json",
|
|
1861
|
+
...options.headers
|
|
1862
|
+
}
|
|
1863
|
+
});
|
|
1864
|
+
var postEmailMarketingCampaignsByIdOptimizeSendTimes = (options) => (options.client ?? client).post({
|
|
1865
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1866
|
+
url: "/email-marketing/campaigns/{id}/optimize-send-times",
|
|
1867
|
+
...options,
|
|
1868
|
+
headers: {
|
|
1869
|
+
"Content-Type": "application/vnd.api+json",
|
|
1870
|
+
...options.headers
|
|
1871
|
+
}
|
|
1872
|
+
});
|
|
1760
1873
|
var getExtractionDocumentsByIdStatus = (options) => (options.client ?? client).get({
|
|
1761
1874
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1762
1875
|
url: "/extraction/documents/{id}/status",
|
|
1763
1876
|
...options
|
|
1764
1877
|
});
|
|
1878
|
+
var postConnectorsFullscriptSessionGrant = (options) => (options.client ?? client).post({
|
|
1879
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1880
|
+
url: "/connectors/fullscript/session-grant",
|
|
1881
|
+
...options,
|
|
1882
|
+
headers: {
|
|
1883
|
+
"Content-Type": "application/vnd.api+json",
|
|
1884
|
+
...options.headers
|
|
1885
|
+
}
|
|
1886
|
+
});
|
|
1887
|
+
var postEmailMarketingCampaignsByIdSend = (options) => (options.client ?? client).post({
|
|
1888
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1889
|
+
url: "/email-marketing/campaigns/{id}/send",
|
|
1890
|
+
...options,
|
|
1891
|
+
headers: {
|
|
1892
|
+
"Content-Type": "application/vnd.api+json",
|
|
1893
|
+
...options.headers
|
|
1894
|
+
}
|
|
1895
|
+
});
|
|
1896
|
+
var postEmailMarketingCampaignsByIdCreateFollowup = (options) => (options.client ?? client).post({
|
|
1897
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1898
|
+
url: "/email-marketing/campaigns/{id}/create-followup",
|
|
1899
|
+
...options,
|
|
1900
|
+
headers: {
|
|
1901
|
+
"Content-Type": "application/vnd.api+json",
|
|
1902
|
+
...options.headers
|
|
1903
|
+
}
|
|
1904
|
+
});
|
|
1905
|
+
var postCrmContacts = (options) => (options.client ?? client).post({
|
|
1906
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1907
|
+
url: "/crm/contacts",
|
|
1908
|
+
...options,
|
|
1909
|
+
headers: {
|
|
1910
|
+
"Content-Type": "application/vnd.api+json",
|
|
1911
|
+
...options.headers
|
|
1912
|
+
}
|
|
1913
|
+
});
|
|
1765
1914
|
var deleteWebhookConfigsById = (options) => (options.client ?? client).delete({
|
|
1766
1915
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1767
1916
|
url: "/webhook-configs/{id}",
|
|
@@ -1781,6 +1930,15 @@ var patchWebhookConfigsById = (options) => (options.client ?? client).patch({
|
|
|
1781
1930
|
...options.headers
|
|
1782
1931
|
}
|
|
1783
1932
|
});
|
|
1933
|
+
var postConnectorsCredentialsByIdRefresh = (options) => (options.client ?? client).post({
|
|
1934
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1935
|
+
url: "/connectors/credentials/{id}/refresh",
|
|
1936
|
+
...options,
|
|
1937
|
+
headers: {
|
|
1938
|
+
"Content-Type": "application/vnd.api+json",
|
|
1939
|
+
...options.headers
|
|
1940
|
+
}
|
|
1941
|
+
});
|
|
1784
1942
|
var postWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options) => (options.client ?? client).post({
|
|
1785
1943
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1786
1944
|
url: "/workspaces/{workspace_id}/extraction/documents/dismiss-all-trained",
|
|
@@ -1799,6 +1957,34 @@ var postExtractionDocumentsFindOrBeginUpload = (options) => (options.client ?? c
|
|
|
1799
1957
|
...options.headers
|
|
1800
1958
|
}
|
|
1801
1959
|
});
|
|
1960
|
+
var postEmailMarketingCampaigns = (options) => (options.client ?? client).post({
|
|
1961
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1962
|
+
url: "/email-marketing/campaigns",
|
|
1963
|
+
...options,
|
|
1964
|
+
headers: {
|
|
1965
|
+
"Content-Type": "application/vnd.api+json",
|
|
1966
|
+
...options.headers
|
|
1967
|
+
}
|
|
1968
|
+
});
|
|
1969
|
+
var deleteCrmCustomEntitiesById = (options) => (options.client ?? client).delete({
|
|
1970
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1971
|
+
url: "/crm/custom-entities/{id}",
|
|
1972
|
+
...options
|
|
1973
|
+
});
|
|
1974
|
+
var getCrmCustomEntitiesById = (options) => (options.client ?? client).get({
|
|
1975
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1976
|
+
url: "/crm/custom-entities/{id}",
|
|
1977
|
+
...options
|
|
1978
|
+
});
|
|
1979
|
+
var patchCrmCustomEntitiesById = (options) => (options.client ?? client).patch({
|
|
1980
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1981
|
+
url: "/crm/custom-entities/{id}",
|
|
1982
|
+
...options,
|
|
1983
|
+
headers: {
|
|
1984
|
+
"Content-Type": "application/vnd.api+json",
|
|
1985
|
+
...options.headers
|
|
1986
|
+
}
|
|
1987
|
+
});
|
|
1802
1988
|
var postAgentsByIdRestoreVersion = (options) => (options.client ?? client).post({
|
|
1803
1989
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1804
1990
|
url: "/agents/{id}/restore-version",
|
|
@@ -1826,6 +2012,29 @@ var postAgentsByIdPublishVersion = (options) => (options.client ?? client).post(
|
|
|
1826
2012
|
...options.headers
|
|
1827
2013
|
}
|
|
1828
2014
|
});
|
|
2015
|
+
var patchEmailMarketingSenderProfilesByIdValidateDns = (options) => (options.client ?? client).patch({
|
|
2016
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2017
|
+
url: "/email-marketing/sender-profiles/{id}/validate-dns",
|
|
2018
|
+
...options,
|
|
2019
|
+
headers: {
|
|
2020
|
+
"Content-Type": "application/vnd.api+json",
|
|
2021
|
+
...options.headers
|
|
2022
|
+
}
|
|
2023
|
+
});
|
|
2024
|
+
var getConnectorsCredentialsById = (options) => (options.client ?? client).get({
|
|
2025
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2026
|
+
url: "/connectors/credentials/{id}",
|
|
2027
|
+
...options
|
|
2028
|
+
});
|
|
2029
|
+
var postCrmCompanies = (options) => (options.client ?? client).post({
|
|
2030
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2031
|
+
url: "/crm/companies",
|
|
2032
|
+
...options,
|
|
2033
|
+
headers: {
|
|
2034
|
+
"Content-Type": "application/vnd.api+json",
|
|
2035
|
+
...options.headers
|
|
2036
|
+
}
|
|
2037
|
+
});
|
|
1829
2038
|
var getVoiceSessionsMine = (options) => (options.client ?? client).get({
|
|
1830
2039
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1831
2040
|
url: "/voice/sessions/mine",
|
|
@@ -1868,11 +2077,53 @@ var patchUsersAuthResetPassword = (options) => (options.client ?? client).patch(
|
|
|
1868
2077
|
...options.headers
|
|
1869
2078
|
}
|
|
1870
2079
|
});
|
|
2080
|
+
var deleteEmailMarketingSenderProfilesById = (options) => (options.client ?? client).delete({
|
|
2081
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2082
|
+
url: "/email-marketing/sender-profiles/{id}",
|
|
2083
|
+
...options
|
|
2084
|
+
});
|
|
2085
|
+
var getEmailMarketingSenderProfilesById = (options) => (options.client ?? client).get({
|
|
2086
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2087
|
+
url: "/email-marketing/sender-profiles/{id}",
|
|
2088
|
+
...options
|
|
2089
|
+
});
|
|
2090
|
+
var patchEmailMarketingSenderProfilesById = (options) => (options.client ?? client).patch({
|
|
2091
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2092
|
+
url: "/email-marketing/sender-profiles/{id}",
|
|
2093
|
+
...options,
|
|
2094
|
+
headers: {
|
|
2095
|
+
"Content-Type": "application/vnd.api+json",
|
|
2096
|
+
...options.headers
|
|
2097
|
+
}
|
|
2098
|
+
});
|
|
2099
|
+
var getCrmRelationshipTypes = (options) => (options.client ?? client).get({
|
|
2100
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2101
|
+
url: "/crm/relationship-types",
|
|
2102
|
+
...options
|
|
2103
|
+
});
|
|
2104
|
+
var postCrmRelationshipTypes = (options) => (options.client ?? client).post({
|
|
2105
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2106
|
+
url: "/crm/relationship-types",
|
|
2107
|
+
...options,
|
|
2108
|
+
headers: {
|
|
2109
|
+
"Content-Type": "application/vnd.api+json",
|
|
2110
|
+
...options.headers
|
|
2111
|
+
}
|
|
2112
|
+
});
|
|
1871
2113
|
var getSchedulingCalendarSyncsById = (options) => (options.client ?? client).get({
|
|
1872
2114
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1873
2115
|
url: "/scheduling/calendar-syncs/{id}",
|
|
1874
2116
|
...options
|
|
1875
2117
|
});
|
|
2118
|
+
var postCrmCustomEntities = (options) => (options.client ?? client).post({
|
|
2119
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2120
|
+
url: "/crm/custom-entities",
|
|
2121
|
+
...options,
|
|
2122
|
+
headers: {
|
|
2123
|
+
"Content-Type": "application/vnd.api+json",
|
|
2124
|
+
...options.headers
|
|
2125
|
+
}
|
|
2126
|
+
});
|
|
1876
2127
|
var postExtractionDocumentsBeginUpload = (options) => (options.client ?? client).post({
|
|
1877
2128
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1878
2129
|
url: "/extraction/documents/begin-upload",
|
|
@@ -1896,6 +2147,11 @@ var postSearchSaved = (options) => (options.client ?? client).post({
|
|
|
1896
2147
|
...options.headers
|
|
1897
2148
|
}
|
|
1898
2149
|
});
|
|
2150
|
+
var getEmailMarketingCampaignsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2151
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2152
|
+
url: "/email-marketing/campaigns/workspace/{workspace_id}",
|
|
2153
|
+
...options
|
|
2154
|
+
});
|
|
1899
2155
|
var deleteNotificationMethodsById = (options) => (options.client ?? client).delete({
|
|
1900
2156
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1901
2157
|
url: "/notification-methods/{id}",
|
|
@@ -1934,11 +2190,91 @@ var patchTrainingExamplesById = (options) => (options.client ?? client).patch({
|
|
|
1934
2190
|
...options.headers
|
|
1935
2191
|
}
|
|
1936
2192
|
});
|
|
2193
|
+
var getEmailMarketingGeneratedEmailsById = (options) => (options.client ?? client).get({
|
|
2194
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2195
|
+
url: "/email-marketing/generated-emails/{id}",
|
|
2196
|
+
...options
|
|
2197
|
+
});
|
|
2198
|
+
var patchEmailMarketingGeneratedEmailsById = (options) => (options.client ?? client).patch({
|
|
2199
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2200
|
+
url: "/email-marketing/generated-emails/{id}",
|
|
2201
|
+
...options,
|
|
2202
|
+
headers: {
|
|
2203
|
+
"Content-Type": "application/vnd.api+json",
|
|
2204
|
+
...options.headers
|
|
2205
|
+
}
|
|
2206
|
+
});
|
|
2207
|
+
var deleteEmailMarketingCampaignsById = (options) => (options.client ?? client).delete({
|
|
2208
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2209
|
+
url: "/email-marketing/campaigns/{id}",
|
|
2210
|
+
...options
|
|
2211
|
+
});
|
|
2212
|
+
var getEmailMarketingCampaignsById = (options) => (options.client ?? client).get({
|
|
2213
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2214
|
+
url: "/email-marketing/campaigns/{id}",
|
|
2215
|
+
...options
|
|
2216
|
+
});
|
|
2217
|
+
var patchEmailMarketingCampaignsById = (options) => (options.client ?? client).patch({
|
|
2218
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2219
|
+
url: "/email-marketing/campaigns/{id}",
|
|
2220
|
+
...options,
|
|
2221
|
+
headers: {
|
|
2222
|
+
"Content-Type": "application/vnd.api+json",
|
|
2223
|
+
...options.headers
|
|
2224
|
+
}
|
|
2225
|
+
});
|
|
1937
2226
|
var getSearchSuggest = (options) => (options.client ?? client).get({
|
|
1938
2227
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1939
2228
|
url: "/search/suggest",
|
|
1940
2229
|
...options
|
|
1941
2230
|
});
|
|
2231
|
+
var deleteCrmRelationshipTypesById = (options) => (options.client ?? client).delete({
|
|
2232
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2233
|
+
url: "/crm/relationship-types/{id}",
|
|
2234
|
+
...options
|
|
2235
|
+
});
|
|
2236
|
+
var getCrmRelationshipTypesById = (options) => (options.client ?? client).get({
|
|
2237
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2238
|
+
url: "/crm/relationship-types/{id}",
|
|
2239
|
+
...options
|
|
2240
|
+
});
|
|
2241
|
+
var patchCrmRelationshipTypesById = (options) => (options.client ?? client).patch({
|
|
2242
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2243
|
+
url: "/crm/relationship-types/{id}",
|
|
2244
|
+
...options,
|
|
2245
|
+
headers: {
|
|
2246
|
+
"Content-Type": "application/vnd.api+json",
|
|
2247
|
+
...options.headers
|
|
2248
|
+
}
|
|
2249
|
+
});
|
|
2250
|
+
var deleteCrmContactsById = (options) => (options.client ?? client).delete({
|
|
2251
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2252
|
+
url: "/crm/contacts/{id}",
|
|
2253
|
+
...options
|
|
2254
|
+
});
|
|
2255
|
+
var getCrmContactsById = (options) => (options.client ?? client).get({
|
|
2256
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2257
|
+
url: "/crm/contacts/{id}",
|
|
2258
|
+
...options
|
|
2259
|
+
});
|
|
2260
|
+
var patchCrmContactsById = (options) => (options.client ?? client).patch({
|
|
2261
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2262
|
+
url: "/crm/contacts/{id}",
|
|
2263
|
+
...options,
|
|
2264
|
+
headers: {
|
|
2265
|
+
"Content-Type": "application/vnd.api+json",
|
|
2266
|
+
...options.headers
|
|
2267
|
+
}
|
|
2268
|
+
});
|
|
2269
|
+
var patchCrawlerJobsByIdCancel = (options) => (options.client ?? client).patch({
|
|
2270
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2271
|
+
url: "/crawler/jobs/{id}/cancel",
|
|
2272
|
+
...options,
|
|
2273
|
+
headers: {
|
|
2274
|
+
"Content-Type": "application/vnd.api+json",
|
|
2275
|
+
...options.headers
|
|
2276
|
+
}
|
|
2277
|
+
});
|
|
1942
2278
|
var postAgentVersionsByIdAddSystemField = (options) => (options.client ?? client).post({
|
|
1943
2279
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1944
2280
|
url: "/agent-versions/{id}/add-system-field",
|
|
@@ -1962,6 +2298,15 @@ var postThreadsByIdMessages = (options) => (options.client ?? client).post({
|
|
|
1962
2298
|
...options.headers
|
|
1963
2299
|
}
|
|
1964
2300
|
});
|
|
2301
|
+
var patchEmailMarketingGeneratedEmailsByIdApprove = (options) => (options.client ?? client).patch({
|
|
2302
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2303
|
+
url: "/email-marketing/generated-emails/{id}/approve",
|
|
2304
|
+
...options,
|
|
2305
|
+
headers: {
|
|
2306
|
+
"Content-Type": "application/vnd.api+json",
|
|
2307
|
+
...options.headers
|
|
2308
|
+
}
|
|
2309
|
+
});
|
|
1965
2310
|
var getCreditPackagesById = (options) => (options.client ?? client).get({
|
|
1966
2311
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1967
2312
|
url: "/credit-packages/{id}",
|
|
@@ -2024,6 +2369,11 @@ var postAgentsByIdValidate = (options) => (options.client ?? client).post({
|
|
|
2024
2369
|
...options.headers
|
|
2025
2370
|
}
|
|
2026
2371
|
});
|
|
2372
|
+
var getConnectorsCredentials = (options) => (options.client ?? client).get({
|
|
2373
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2374
|
+
url: "/connectors/credentials",
|
|
2375
|
+
...options
|
|
2376
|
+
});
|
|
2027
2377
|
var getUsersMe = (options) => (options.client ?? client).get({
|
|
2028
2378
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2029
2379
|
url: "/users/me",
|
|
@@ -2052,18 +2402,27 @@ var patchSchedulingParticipantsById = (options) => (options.client ?? client).pa
|
|
|
2052
2402
|
...options.headers
|
|
2053
2403
|
}
|
|
2054
2404
|
});
|
|
2055
|
-
var
|
|
2405
|
+
var patchEmailMarketingSequencesByIdResume = (options) => (options.client ?? client).patch({
|
|
2056
2406
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2057
|
-
url: "/
|
|
2407
|
+
url: "/email-marketing/sequences/{id}/resume",
|
|
2058
2408
|
...options,
|
|
2059
2409
|
headers: {
|
|
2060
2410
|
"Content-Type": "application/vnd.api+json",
|
|
2061
2411
|
...options.headers
|
|
2062
2412
|
}
|
|
2063
2413
|
});
|
|
2064
|
-
var
|
|
2414
|
+
var postTenantsByIdCredit = (options) => (options.client ?? client).post({
|
|
2065
2415
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2066
|
-
url: "/
|
|
2416
|
+
url: "/tenants/{id}/credit",
|
|
2417
|
+
...options,
|
|
2418
|
+
headers: {
|
|
2419
|
+
"Content-Type": "application/vnd.api+json",
|
|
2420
|
+
...options.headers
|
|
2421
|
+
}
|
|
2422
|
+
});
|
|
2423
|
+
var patchSchedulingBookingsSchedulingBookingsByIdCancel = (options) => (options.client ?? client).patch({
|
|
2424
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2425
|
+
url: "/scheduling/bookings/scheduling/bookings/{id}/cancel",
|
|
2067
2426
|
...options,
|
|
2068
2427
|
headers: {
|
|
2069
2428
|
"Content-Type": "application/vnd.api+json",
|
|
@@ -2136,6 +2495,21 @@ var patchExtractionDocumentsByIdFinishUpload = (options) => (options.client ?? c
|
|
|
2136
2495
|
...options.headers
|
|
2137
2496
|
}
|
|
2138
2497
|
});
|
|
2498
|
+
var deleteCrawlerJobsById = (options) => (options.client ?? client).delete({
|
|
2499
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2500
|
+
url: "/crawler/jobs/{id}",
|
|
2501
|
+
...options
|
|
2502
|
+
});
|
|
2503
|
+
var getCrawlerJobsById = (options) => (options.client ?? client).get({
|
|
2504
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2505
|
+
url: "/crawler/jobs/{id}",
|
|
2506
|
+
...options
|
|
2507
|
+
});
|
|
2508
|
+
var getCrmExportsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2509
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2510
|
+
url: "/crm/exports/workspace/{workspace_id}",
|
|
2511
|
+
...options
|
|
2512
|
+
});
|
|
2139
2513
|
var getTrainingSessionsAgentsByAgentIdSessions = (options) => (options.client ?? client).get({
|
|
2140
2514
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2141
2515
|
url: "/training-sessions/agents/{agent_id}/sessions",
|
|
@@ -2216,6 +2590,30 @@ var postNotificationPreferences = (options) => (options.client ?? client).post({
|
|
|
2216
2590
|
...options.headers
|
|
2217
2591
|
}
|
|
2218
2592
|
});
|
|
2593
|
+
var deleteCrmPipelineStagesById = (options) => (options.client ?? client).delete({
|
|
2594
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2595
|
+
url: "/crm/pipeline-stages/{id}",
|
|
2596
|
+
...options
|
|
2597
|
+
});
|
|
2598
|
+
var getCrmPipelineStagesById = (options) => (options.client ?? client).get({
|
|
2599
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2600
|
+
url: "/crm/pipeline-stages/{id}",
|
|
2601
|
+
...options
|
|
2602
|
+
});
|
|
2603
|
+
var patchCrmPipelineStagesById = (options) => (options.client ?? client).patch({
|
|
2604
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2605
|
+
url: "/crm/pipeline-stages/{id}",
|
|
2606
|
+
...options,
|
|
2607
|
+
headers: {
|
|
2608
|
+
"Content-Type": "application/vnd.api+json",
|
|
2609
|
+
...options.headers
|
|
2610
|
+
}
|
|
2611
|
+
});
|
|
2612
|
+
var getCrmPipelinesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2613
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2614
|
+
url: "/crm/pipelines/workspace/{workspace_id}",
|
|
2615
|
+
...options
|
|
2616
|
+
});
|
|
2219
2617
|
var patchSchedulingCalendarSyncsSchedulingCalendarSyncsByIdPause = (options) => (options.client ?? client).patch({
|
|
2220
2618
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2221
2619
|
url: "/scheduling/calendar-syncs/scheduling/calendar-syncs/{id}/pause",
|
|
@@ -2286,6 +2684,39 @@ var postWatcherClaims = (options) => (options.client ?? client).post({
|
|
|
2286
2684
|
...options.headers
|
|
2287
2685
|
}
|
|
2288
2686
|
});
|
|
2687
|
+
var getCrawlerJobs = (options) => (options.client ?? client).get({
|
|
2688
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2689
|
+
url: "/crawler/jobs",
|
|
2690
|
+
...options
|
|
2691
|
+
});
|
|
2692
|
+
var postCrawlerJobs = (options) => (options.client ?? client).post({
|
|
2693
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2694
|
+
url: "/crawler/jobs",
|
|
2695
|
+
...options,
|
|
2696
|
+
headers: {
|
|
2697
|
+
"Content-Type": "application/vnd.api+json",
|
|
2698
|
+
...options.headers
|
|
2699
|
+
}
|
|
2700
|
+
});
|
|
2701
|
+
var deleteCrmCompaniesById = (options) => (options.client ?? client).delete({
|
|
2702
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2703
|
+
url: "/crm/companies/{id}",
|
|
2704
|
+
...options
|
|
2705
|
+
});
|
|
2706
|
+
var getCrmCompaniesById = (options) => (options.client ?? client).get({
|
|
2707
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2708
|
+
url: "/crm/companies/{id}",
|
|
2709
|
+
...options
|
|
2710
|
+
});
|
|
2711
|
+
var patchCrmCompaniesById = (options) => (options.client ?? client).patch({
|
|
2712
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2713
|
+
url: "/crm/companies/{id}",
|
|
2714
|
+
...options,
|
|
2715
|
+
headers: {
|
|
2716
|
+
"Content-Type": "application/vnd.api+json",
|
|
2717
|
+
...options.headers
|
|
2718
|
+
}
|
|
2719
|
+
});
|
|
2289
2720
|
var patchSchedulingBookingsSchedulingBookingsByIdReschedule = (options) => (options.client ?? client).patch({
|
|
2290
2721
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2291
2722
|
url: "/scheduling/bookings/scheduling/bookings/{id}/reschedule",
|
|
@@ -2358,6 +2789,15 @@ var postUsersRegisterIsv = (options) => (options.client ?? client).post({
|
|
|
2358
2789
|
...options.headers
|
|
2359
2790
|
}
|
|
2360
2791
|
});
|
|
2792
|
+
var postCrmPipelines = (options) => (options.client ?? client).post({
|
|
2793
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2794
|
+
url: "/crm/pipelines",
|
|
2795
|
+
...options,
|
|
2796
|
+
headers: {
|
|
2797
|
+
"Content-Type": "application/vnd.api+json",
|
|
2798
|
+
...options.headers
|
|
2799
|
+
}
|
|
2800
|
+
});
|
|
2361
2801
|
var getExtractionResultsDocumentByDocumentId = (options) => (options.client ?? client).get({
|
|
2362
2802
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2363
2803
|
url: "/extraction/results/document/{document_id}",
|
|
@@ -2382,6 +2822,20 @@ var getWorkspacesById = (options) => (options.client ?? client).get({
|
|
|
2382
2822
|
url: "/workspaces/{id}",
|
|
2383
2823
|
...options
|
|
2384
2824
|
});
|
|
2825
|
+
var getCrawlerSchedules = (options) => (options.client ?? client).get({
|
|
2826
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2827
|
+
url: "/crawler/schedules",
|
|
2828
|
+
...options
|
|
2829
|
+
});
|
|
2830
|
+
var postCrawlerSchedules = (options) => (options.client ?? client).post({
|
|
2831
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2832
|
+
url: "/crawler/schedules",
|
|
2833
|
+
...options,
|
|
2834
|
+
headers: {
|
|
2835
|
+
"Content-Type": "application/vnd.api+json",
|
|
2836
|
+
...options.headers
|
|
2837
|
+
}
|
|
2838
|
+
});
|
|
2385
2839
|
var postWebhookConfigsBulkDisable = (options) => (options.client ?? client).post({
|
|
2386
2840
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2387
2841
|
url: "/webhook-configs/bulk-disable",
|
|
@@ -2484,6 +2938,15 @@ var postWorkspacesByWorkspaceIdExtractionByDocumentIdMapping = (options) => (opt
|
|
|
2484
2938
|
...options.headers
|
|
2485
2939
|
}
|
|
2486
2940
|
});
|
|
2941
|
+
var postConnectorsFullscriptCheckPatient = (options) => (options.client ?? client).post({
|
|
2942
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2943
|
+
url: "/connectors/fullscript/check-patient",
|
|
2944
|
+
...options,
|
|
2945
|
+
headers: {
|
|
2946
|
+
"Content-Type": "application/vnd.api+json",
|
|
2947
|
+
...options.headers
|
|
2948
|
+
}
|
|
2949
|
+
});
|
|
2487
2950
|
var getSchedulingEventTypes = (options) => (options.client ?? client).get({
|
|
2488
2951
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2489
2952
|
url: "/scheduling/event-types",
|
|
@@ -2498,6 +2961,25 @@ var postSchedulingEventTypes = (options) => (options.client ?? client).post({
|
|
|
2498
2961
|
...options.headers
|
|
2499
2962
|
}
|
|
2500
2963
|
});
|
|
2964
|
+
var deleteCrmPipelinesById = (options) => (options.client ?? client).delete({
|
|
2965
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2966
|
+
url: "/crm/pipelines/{id}",
|
|
2967
|
+
...options
|
|
2968
|
+
});
|
|
2969
|
+
var getCrmPipelinesById = (options) => (options.client ?? client).get({
|
|
2970
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2971
|
+
url: "/crm/pipelines/{id}",
|
|
2972
|
+
...options
|
|
2973
|
+
});
|
|
2974
|
+
var patchCrmPipelinesById = (options) => (options.client ?? client).patch({
|
|
2975
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2976
|
+
url: "/crm/pipelines/{id}",
|
|
2977
|
+
...options,
|
|
2978
|
+
headers: {
|
|
2979
|
+
"Content-Type": "application/vnd.api+json",
|
|
2980
|
+
...options.headers
|
|
2981
|
+
}
|
|
2982
|
+
});
|
|
2501
2983
|
var getPlansById = (options) => (options.client ?? client).get({
|
|
2502
2984
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2503
2985
|
url: "/plans/{id}",
|
|
@@ -2540,6 +3022,16 @@ var postTenantsByIdSchedulePurge = (options) => (options.client ?? client).post(
|
|
|
2540
3022
|
...options.headers
|
|
2541
3023
|
}
|
|
2542
3024
|
});
|
|
3025
|
+
var deleteCrmActivitiesById = (options) => (options.client ?? client).delete({
|
|
3026
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3027
|
+
url: "/crm/activities/{id}",
|
|
3028
|
+
...options
|
|
3029
|
+
});
|
|
3030
|
+
var getCrmActivitiesById = (options) => (options.client ?? client).get({
|
|
3031
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3032
|
+
url: "/crm/activities/{id}",
|
|
3033
|
+
...options
|
|
3034
|
+
});
|
|
2543
3035
|
var getUserProfiles = (options) => (options.client ?? client).get({
|
|
2544
3036
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2545
3037
|
url: "/user-profiles",
|
|
@@ -2661,6 +3153,15 @@ var getTransactions = (options) => (options.client ?? client).get({
|
|
|
2661
3153
|
url: "/transactions",
|
|
2662
3154
|
...options
|
|
2663
3155
|
});
|
|
3156
|
+
var postConnectorsOauthInitiate = (options) => (options.client ?? client).post({
|
|
3157
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3158
|
+
url: "/connectors/oauth/initiate",
|
|
3159
|
+
...options,
|
|
3160
|
+
headers: {
|
|
3161
|
+
"Content-Type": "application/vnd.api+json",
|
|
3162
|
+
...options.headers
|
|
3163
|
+
}
|
|
3164
|
+
});
|
|
2664
3165
|
var postSearchSavedByIdRun = (options) => (options.client ?? client).post({
|
|
2665
3166
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2666
3167
|
url: "/search/saved/{id}/run",
|
|
@@ -2803,6 +3304,25 @@ var patchSchedulingEventsById = (options) => (options.client ?? client).patch({
|
|
|
2803
3304
|
...options.headers
|
|
2804
3305
|
}
|
|
2805
3306
|
});
|
|
3307
|
+
var deleteConnectorsById = (options) => (options.client ?? client).delete({
|
|
3308
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3309
|
+
url: "/connectors/{id}",
|
|
3310
|
+
...options
|
|
3311
|
+
});
|
|
3312
|
+
var getConnectorsById = (options) => (options.client ?? client).get({
|
|
3313
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3314
|
+
url: "/connectors/{id}",
|
|
3315
|
+
...options
|
|
3316
|
+
});
|
|
3317
|
+
var patchConnectorsById = (options) => (options.client ?? client).patch({
|
|
3318
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3319
|
+
url: "/connectors/{id}",
|
|
3320
|
+
...options,
|
|
3321
|
+
headers: {
|
|
3322
|
+
"Content-Type": "application/vnd.api+json",
|
|
3323
|
+
...options.headers
|
|
3324
|
+
}
|
|
3325
|
+
});
|
|
2806
3326
|
var getWorkspaceMemberships = (options) => (options.client ?? client).get({
|
|
2807
3327
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2808
3328
|
url: "/workspace-memberships",
|
|
@@ -2945,6 +3465,15 @@ var getPlans = (options) => (options.client ?? client).get({
|
|
|
2945
3465
|
url: "/plans",
|
|
2946
3466
|
...options
|
|
2947
3467
|
});
|
|
3468
|
+
var postCrmActivities = (options) => (options.client ?? client).post({
|
|
3469
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3470
|
+
url: "/crm/activities",
|
|
3471
|
+
...options,
|
|
3472
|
+
headers: {
|
|
3473
|
+
"Content-Type": "application/vnd.api+json",
|
|
3474
|
+
...options.headers
|
|
3475
|
+
}
|
|
3476
|
+
});
|
|
2948
3477
|
var getSchedulingEvents = (options) => (options.client ?? client).get({
|
|
2949
3478
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2950
3479
|
url: "/scheduling/events",
|
|
@@ -2987,6 +3516,11 @@ var getExtractionDocuments = (options) => (options.client ?? client).get({
|
|
|
2987
3516
|
url: "/extraction/documents",
|
|
2988
3517
|
...options
|
|
2989
3518
|
});
|
|
3519
|
+
var getCrmDealsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3520
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3521
|
+
url: "/crm/deals/workspace/{workspace_id}",
|
|
3522
|
+
...options
|
|
3523
|
+
});
|
|
2990
3524
|
var patchExtractionResultsByIdSaveCorrections = (options) => (options.client ?? client).patch({
|
|
2991
3525
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2992
3526
|
url: "/extraction/results/{id}/save-corrections",
|
|
@@ -3005,6 +3539,11 @@ var postUsersAuthResendConfirmation = (options) => (options.client ?? client).po
|
|
|
3005
3539
|
...options.headers
|
|
3006
3540
|
}
|
|
3007
3541
|
});
|
|
3542
|
+
var getCrawlerResultsById = (options) => (options.client ?? client).get({
|
|
3543
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3544
|
+
url: "/crawler/results/{id}",
|
|
3545
|
+
...options
|
|
3546
|
+
});
|
|
3008
3547
|
var getAiMessages = (options) => (options.client ?? client).get({
|
|
3009
3548
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3010
3549
|
url: "/ai/messages",
|
|
@@ -3033,6 +3572,15 @@ var postWatcherEvents = (options) => (options.client ?? client).post({
|
|
|
3033
3572
|
...options.headers
|
|
3034
3573
|
}
|
|
3035
3574
|
});
|
|
3575
|
+
var postConnectorsOauthCallback = (options) => (options.client ?? client).post({
|
|
3576
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3577
|
+
url: "/connectors/oauth/callback",
|
|
3578
|
+
...options,
|
|
3579
|
+
headers: {
|
|
3580
|
+
"Content-Type": "application/vnd.api+json",
|
|
3581
|
+
...options.headers
|
|
3582
|
+
}
|
|
3583
|
+
});
|
|
3036
3584
|
var postAgentVersionsByIdSetSystemFields = (options) => (options.client ?? client).post({
|
|
3037
3585
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3038
3586
|
url: "/agent-versions/{id}/set-system-fields",
|
|
@@ -3112,6 +3660,39 @@ var getWallet = (options) => (options.client ?? client).get({
|
|
|
3112
3660
|
url: "/wallet",
|
|
3113
3661
|
...options
|
|
3114
3662
|
});
|
|
3663
|
+
var deleteCrawlerSchedulesById = (options) => (options.client ?? client).delete({
|
|
3664
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3665
|
+
url: "/crawler/schedules/{id}",
|
|
3666
|
+
...options
|
|
3667
|
+
});
|
|
3668
|
+
var getCrawlerSchedulesById = (options) => (options.client ?? client).get({
|
|
3669
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3670
|
+
url: "/crawler/schedules/{id}",
|
|
3671
|
+
...options
|
|
3672
|
+
});
|
|
3673
|
+
var patchCrawlerSchedulesById = (options) => (options.client ?? client).patch({
|
|
3674
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3675
|
+
url: "/crawler/schedules/{id}",
|
|
3676
|
+
...options,
|
|
3677
|
+
headers: {
|
|
3678
|
+
"Content-Type": "application/vnd.api+json",
|
|
3679
|
+
...options.headers
|
|
3680
|
+
}
|
|
3681
|
+
});
|
|
3682
|
+
var postCrmDeals = (options) => (options.client ?? client).post({
|
|
3683
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3684
|
+
url: "/crm/deals",
|
|
3685
|
+
...options,
|
|
3686
|
+
headers: {
|
|
3687
|
+
"Content-Type": "application/vnd.api+json",
|
|
3688
|
+
...options.headers
|
|
3689
|
+
}
|
|
3690
|
+
});
|
|
3691
|
+
var getCrmActivitiesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3692
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3693
|
+
url: "/crm/activities/workspace/{workspace_id}",
|
|
3694
|
+
...options
|
|
3695
|
+
});
|
|
3115
3696
|
var getAgents = (options) => (options.client ?? client).get({
|
|
3116
3697
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3117
3698
|
url: "/agents",
|
|
@@ -3131,6 +3712,20 @@ var getApplicationsByApplicationIdEmailTemplatesBySlug = (options) => (options.c
|
|
|
3131
3712
|
url: "/applications/{application_id}/email-templates/{slug}",
|
|
3132
3713
|
...options
|
|
3133
3714
|
});
|
|
3715
|
+
var getConnectors = (options) => (options.client ?? client).get({
|
|
3716
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3717
|
+
url: "/connectors",
|
|
3718
|
+
...options
|
|
3719
|
+
});
|
|
3720
|
+
var postConnectors = (options) => (options.client ?? client).post({
|
|
3721
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3722
|
+
url: "/connectors",
|
|
3723
|
+
...options,
|
|
3724
|
+
headers: {
|
|
3725
|
+
"Content-Type": "application/vnd.api+json",
|
|
3726
|
+
...options.headers
|
|
3727
|
+
}
|
|
3728
|
+
});
|
|
3134
3729
|
var postAgentsByIdExport = (options) => (options.client ?? client).post({
|
|
3135
3730
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3136
3731
|
url: "/agents/{id}/export",
|
|
@@ -3183,16 +3778,44 @@ var postTrainingExamplesBulkDelete = (options) => (options.client ?? client).pos
|
|
|
3183
3778
|
...options.headers
|
|
3184
3779
|
}
|
|
3185
3780
|
});
|
|
3781
|
+
var getCrmRelationshipsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3782
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3783
|
+
url: "/crm/relationships/workspace/{workspace_id}",
|
|
3784
|
+
...options
|
|
3785
|
+
});
|
|
3786
|
+
var getCrmCompaniesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3787
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3788
|
+
url: "/crm/companies/workspace/{workspace_id}",
|
|
3789
|
+
...options
|
|
3790
|
+
});
|
|
3186
3791
|
var getCreditPackages = (options) => (options.client ?? client).get({
|
|
3187
3792
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3188
3793
|
url: "/credit-packages",
|
|
3189
3794
|
...options
|
|
3190
3795
|
});
|
|
3796
|
+
var postCrmPipelineStages = (options) => (options.client ?? client).post({
|
|
3797
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3798
|
+
url: "/crm/pipeline-stages",
|
|
3799
|
+
...options,
|
|
3800
|
+
headers: {
|
|
3801
|
+
"Content-Type": "application/vnd.api+json",
|
|
3802
|
+
...options.headers
|
|
3803
|
+
}
|
|
3804
|
+
});
|
|
3191
3805
|
var getUsers = (options) => (options.client ?? client).get({
|
|
3192
3806
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3193
3807
|
url: "/users",
|
|
3194
3808
|
...options
|
|
3195
3809
|
});
|
|
3810
|
+
var postCrmExports = (options) => (options.client ?? client).post({
|
|
3811
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3812
|
+
url: "/crm/exports",
|
|
3813
|
+
...options,
|
|
3814
|
+
headers: {
|
|
3815
|
+
"Content-Type": "application/vnd.api+json",
|
|
3816
|
+
...options.headers
|
|
3817
|
+
}
|
|
3818
|
+
});
|
|
3196
3819
|
|
|
3197
3820
|
// src/pagination.ts
|
|
3198
3821
|
var DEFAULT_MAX_PAGES = 500;
|
|
@@ -3656,209 +4279,1490 @@ function createBillingNamespace(rb) {
|
|
|
3656
4279
|
options
|
|
3657
4280
|
)
|
|
3658
4281
|
);
|
|
3659
|
-
},
|
|
3660
|
-
get: async (id, options) => {
|
|
4282
|
+
},
|
|
4283
|
+
get: async (id, options) => {
|
|
4284
|
+
return rb.execute(
|
|
4285
|
+
getCreditPackagesById,
|
|
4286
|
+
{ path: { id } },
|
|
4287
|
+
options
|
|
4288
|
+
);
|
|
4289
|
+
}
|
|
4290
|
+
},
|
|
4291
|
+
paymentMethods: {
|
|
4292
|
+
delete: async (id, options) => {
|
|
4293
|
+
return rb.executeDelete(
|
|
4294
|
+
deletePaymentMethodsById,
|
|
4295
|
+
{ path: { id } },
|
|
4296
|
+
options
|
|
4297
|
+
);
|
|
4298
|
+
},
|
|
4299
|
+
list: async (options) => {
|
|
4300
|
+
return rb.execute(
|
|
4301
|
+
getPaymentMethods,
|
|
4302
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4303
|
+
options
|
|
4304
|
+
);
|
|
4305
|
+
},
|
|
4306
|
+
listAll: async (options) => {
|
|
4307
|
+
return paginateToArray(
|
|
4308
|
+
rb.createPaginatedFetcher(
|
|
4309
|
+
getPaymentMethods,
|
|
4310
|
+
(page, pageSize) => ({
|
|
4311
|
+
query: { page: { number: page, size: pageSize } }
|
|
4312
|
+
}),
|
|
4313
|
+
options
|
|
4314
|
+
)
|
|
4315
|
+
);
|
|
4316
|
+
},
|
|
4317
|
+
create: async (attributes, options) => {
|
|
4318
|
+
return rb.execute(
|
|
4319
|
+
postPaymentMethods,
|
|
4320
|
+
{ body: { data: { type: "payment_method", attributes } } },
|
|
4321
|
+
options
|
|
4322
|
+
);
|
|
4323
|
+
},
|
|
4324
|
+
update: async (id, attributes, options) => {
|
|
4325
|
+
return rb.execute(
|
|
4326
|
+
patchPaymentMethodsById,
|
|
4327
|
+
{
|
|
4328
|
+
path: { id },
|
|
4329
|
+
body: { data: { id, type: "payment_method", attributes } }
|
|
4330
|
+
},
|
|
4331
|
+
options
|
|
4332
|
+
);
|
|
4333
|
+
},
|
|
4334
|
+
get: async (id, options) => {
|
|
4335
|
+
return rb.execute(
|
|
4336
|
+
getPaymentMethodsById,
|
|
4337
|
+
{ path: { id } },
|
|
4338
|
+
options
|
|
4339
|
+
);
|
|
4340
|
+
}
|
|
4341
|
+
}
|
|
4342
|
+
};
|
|
4343
|
+
}
|
|
4344
|
+
|
|
4345
|
+
// src/namespaces/catalog.ts
|
|
4346
|
+
function createCatalogNamespace(_rb) {
|
|
4347
|
+
return {
|
|
4348
|
+
/**
|
|
4349
|
+
* Products — product catalog management
|
|
4350
|
+
*/
|
|
4351
|
+
products: {
|
|
4352
|
+
/** List products with pagination */
|
|
4353
|
+
list: async (_options) => {
|
|
4354
|
+
throw new Error("Product list not yet implemented in SDK");
|
|
4355
|
+
},
|
|
4356
|
+
/** Get a product by ID */
|
|
4357
|
+
get: async (_id, _options) => {
|
|
4358
|
+
throw new Error("Product get not yet implemented in SDK");
|
|
4359
|
+
},
|
|
4360
|
+
/** Create a new product */
|
|
4361
|
+
create: async (_attributes, _options) => {
|
|
4362
|
+
throw new Error("Product create not yet implemented in SDK");
|
|
4363
|
+
},
|
|
4364
|
+
/** Update a product */
|
|
4365
|
+
update: async (_id, _attributes, _options) => {
|
|
4366
|
+
throw new Error("Product update not yet implemented in SDK");
|
|
4367
|
+
}
|
|
4368
|
+
},
|
|
4369
|
+
/**
|
|
4370
|
+
* Variants — product variants (SKUs)
|
|
4371
|
+
*/
|
|
4372
|
+
variants: {
|
|
4373
|
+
/** List variants for a product */
|
|
4374
|
+
listByProduct: async (_productId, _options) => {
|
|
4375
|
+
throw new Error("Variant list not yet implemented in SDK");
|
|
4376
|
+
}
|
|
4377
|
+
},
|
|
4378
|
+
/**
|
|
4379
|
+
* Taxonomy — product categories and classification
|
|
4380
|
+
*/
|
|
4381
|
+
taxonomies: {
|
|
4382
|
+
/** List taxonomies */
|
|
4383
|
+
list: async (_options) => {
|
|
4384
|
+
throw new Error("Taxonomy list not yet implemented in SDK");
|
|
4385
|
+
},
|
|
4386
|
+
/** Get taxonomy nodes */
|
|
4387
|
+
getNodes: async (_taxonomyId, _options) => {
|
|
4388
|
+
throw new Error("Taxonomy nodes not yet implemented in SDK");
|
|
4389
|
+
}
|
|
4390
|
+
}
|
|
4391
|
+
};
|
|
4392
|
+
}
|
|
4393
|
+
|
|
4394
|
+
// src/namespaces/channels.ts
|
|
4395
|
+
function createChannelsNamespace(_rb) {
|
|
4396
|
+
return {
|
|
4397
|
+
/**
|
|
4398
|
+
* Channel Config — configuration for messaging channels
|
|
4399
|
+
*/
|
|
4400
|
+
configs: {
|
|
4401
|
+
/** List channel configurations */
|
|
4402
|
+
list: async (_options) => {
|
|
4403
|
+
throw new Error("Channel configs list not yet implemented in SDK");
|
|
4404
|
+
},
|
|
4405
|
+
/** Get a channel config by ID */
|
|
4406
|
+
get: async (_id, _options) => {
|
|
4407
|
+
throw new Error("Channel config get not yet implemented in SDK");
|
|
4408
|
+
}
|
|
4409
|
+
},
|
|
4410
|
+
/**
|
|
4411
|
+
* Messages — inbound and outbound message handling
|
|
4412
|
+
*/
|
|
4413
|
+
messages: {
|
|
4414
|
+
/** Send a message through a channel */
|
|
4415
|
+
send: async (_attributes, _options) => {
|
|
4416
|
+
throw new Error("Message send not yet implemented in SDK");
|
|
4417
|
+
},
|
|
4418
|
+
/** List inbound messages */
|
|
4419
|
+
listInbound: async (_options) => {
|
|
4420
|
+
throw new Error("Inbound messages list not yet implemented in SDK");
|
|
4421
|
+
}
|
|
4422
|
+
}
|
|
4423
|
+
};
|
|
4424
|
+
}
|
|
4425
|
+
|
|
4426
|
+
// src/namespaces/communication.ts
|
|
4427
|
+
function createCommunicationNamespace(rb) {
|
|
4428
|
+
return {
|
|
4429
|
+
notifications: {
|
|
4430
|
+
/** List notification logs (alias for list) */
|
|
4431
|
+
logs: async (options) => {
|
|
4432
|
+
return rb.execute(
|
|
4433
|
+
getNotificationLogs,
|
|
4434
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4435
|
+
options
|
|
4436
|
+
);
|
|
4437
|
+
},
|
|
4438
|
+
list: async (options) => {
|
|
4439
|
+
return rb.execute(
|
|
4440
|
+
getNotificationLogs,
|
|
4441
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4442
|
+
options
|
|
4443
|
+
);
|
|
4444
|
+
},
|
|
4445
|
+
listAll: async (options) => {
|
|
4446
|
+
return paginateToArray(
|
|
4447
|
+
rb.createPaginatedFetcher(
|
|
4448
|
+
getNotificationLogs,
|
|
4449
|
+
(page, pageSize) => ({
|
|
4450
|
+
query: { page: { number: page, size: pageSize } }
|
|
4451
|
+
}),
|
|
4452
|
+
options
|
|
4453
|
+
)
|
|
4454
|
+
);
|
|
4455
|
+
},
|
|
4456
|
+
get: async (id, options) => {
|
|
4457
|
+
return rb.execute(
|
|
4458
|
+
getNotificationLogsById,
|
|
4459
|
+
{ path: { id } },
|
|
4460
|
+
options
|
|
4461
|
+
);
|
|
4462
|
+
},
|
|
4463
|
+
methods: {
|
|
4464
|
+
delete: async (id, options) => {
|
|
4465
|
+
return rb.executeDelete(
|
|
4466
|
+
deleteNotificationMethodsById,
|
|
4467
|
+
{ path: { id } },
|
|
4468
|
+
options
|
|
4469
|
+
);
|
|
4470
|
+
},
|
|
4471
|
+
list: async (options) => {
|
|
4472
|
+
return rb.execute(
|
|
4473
|
+
getNotificationMethods,
|
|
4474
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4475
|
+
options
|
|
4476
|
+
);
|
|
4477
|
+
},
|
|
4478
|
+
listAll: async (options) => {
|
|
4479
|
+
return paginateToArray(
|
|
4480
|
+
rb.createPaginatedFetcher(
|
|
4481
|
+
getNotificationMethods,
|
|
4482
|
+
(page, pageSize) => ({
|
|
4483
|
+
query: { page: { number: page, size: pageSize } }
|
|
4484
|
+
}),
|
|
4485
|
+
options
|
|
4486
|
+
)
|
|
4487
|
+
);
|
|
4488
|
+
},
|
|
4489
|
+
create: async (attributes, options) => {
|
|
4490
|
+
return rb.execute(
|
|
4491
|
+
postNotificationMethods,
|
|
4492
|
+
{ body: { data: { type: "notification_method", attributes } } },
|
|
4493
|
+
options
|
|
4494
|
+
);
|
|
4495
|
+
},
|
|
4496
|
+
update: async (id, attributes, options) => {
|
|
4497
|
+
return rb.execute(
|
|
4498
|
+
patchNotificationMethodsById,
|
|
4499
|
+
{
|
|
4500
|
+
path: { id },
|
|
4501
|
+
body: { data: { id, type: "notification_method", attributes } }
|
|
4502
|
+
},
|
|
4503
|
+
options
|
|
4504
|
+
);
|
|
4505
|
+
},
|
|
4506
|
+
get: async (id, options) => {
|
|
4507
|
+
return rb.execute(
|
|
4508
|
+
getNotificationMethodsById,
|
|
4509
|
+
{ path: { id } },
|
|
4510
|
+
options
|
|
4511
|
+
);
|
|
4512
|
+
}
|
|
4513
|
+
},
|
|
4514
|
+
preferences: {
|
|
4515
|
+
delete: async (id, options) => {
|
|
4516
|
+
return rb.executeDelete(
|
|
4517
|
+
deleteNotificationPreferencesById,
|
|
4518
|
+
{ path: { id } },
|
|
4519
|
+
options
|
|
4520
|
+
);
|
|
4521
|
+
},
|
|
4522
|
+
list: async (options) => {
|
|
4523
|
+
return rb.execute(
|
|
4524
|
+
getNotificationPreferences,
|
|
4525
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4526
|
+
options
|
|
4527
|
+
);
|
|
4528
|
+
},
|
|
4529
|
+
listAll: async (options) => {
|
|
4530
|
+
return paginateToArray(
|
|
4531
|
+
rb.createPaginatedFetcher(
|
|
4532
|
+
getNotificationPreferences,
|
|
4533
|
+
(page, pageSize) => ({
|
|
4534
|
+
query: { page: { number: page, size: pageSize } }
|
|
4535
|
+
}),
|
|
4536
|
+
options
|
|
4537
|
+
)
|
|
4538
|
+
);
|
|
4539
|
+
},
|
|
4540
|
+
create: async (attributes, options) => {
|
|
4541
|
+
return rb.execute(
|
|
4542
|
+
postNotificationPreferences,
|
|
4543
|
+
{ body: { data: { type: "notification_preference", attributes } } },
|
|
4544
|
+
options
|
|
4545
|
+
);
|
|
4546
|
+
},
|
|
4547
|
+
update: async (id, attributes, options) => {
|
|
4548
|
+
return rb.execute(
|
|
4549
|
+
patchNotificationPreferencesById,
|
|
4550
|
+
{
|
|
4551
|
+
path: { id },
|
|
4552
|
+
body: {
|
|
4553
|
+
data: { id, type: "notification_preference", attributes }
|
|
4554
|
+
}
|
|
4555
|
+
},
|
|
4556
|
+
options
|
|
4557
|
+
);
|
|
4558
|
+
},
|
|
4559
|
+
get: async (id, options) => {
|
|
4560
|
+
return rb.execute(
|
|
4561
|
+
getNotificationPreferencesById,
|
|
4562
|
+
{ path: { id } },
|
|
4563
|
+
options
|
|
4564
|
+
);
|
|
4565
|
+
}
|
|
4566
|
+
}
|
|
4567
|
+
}
|
|
4568
|
+
};
|
|
4569
|
+
}
|
|
4570
|
+
|
|
4571
|
+
// src/namespaces/connectors.ts
|
|
4572
|
+
function createConnectorsNamespace(rb) {
|
|
4573
|
+
return {
|
|
4574
|
+
/**
|
|
4575
|
+
* Connector Instances — configured external system connections
|
|
4576
|
+
*/
|
|
4577
|
+
instances: {
|
|
4578
|
+
/** List connector instances for the current workspace */
|
|
4579
|
+
list: async (options) => rb.execute(getConnectors, {}, options),
|
|
4580
|
+
/** Get a connector instance by ID */
|
|
4581
|
+
get: async (id, options) => rb.execute(
|
|
4582
|
+
getConnectorsById,
|
|
4583
|
+
{ path: { id } },
|
|
4584
|
+
options
|
|
4585
|
+
),
|
|
4586
|
+
/** Create a new connector instance */
|
|
4587
|
+
create: async (attributes, options) => rb.execute(
|
|
4588
|
+
postConnectors,
|
|
4589
|
+
{ body: { data: { type: "connector_instance", attributes } } },
|
|
4590
|
+
options
|
|
4591
|
+
),
|
|
4592
|
+
/** Update a connector instance */
|
|
4593
|
+
update: async (id, attributes, options) => rb.execute(
|
|
4594
|
+
patchConnectorsById,
|
|
4595
|
+
{
|
|
4596
|
+
path: { id },
|
|
4597
|
+
body: { data: { type: "connector_instance", id, attributes } }
|
|
4598
|
+
},
|
|
4599
|
+
options
|
|
4600
|
+
),
|
|
4601
|
+
/** Delete a connector instance */
|
|
4602
|
+
delete: async (id, options) => rb.executeDelete(deleteConnectorsById, { path: { id } }, options)
|
|
4603
|
+
},
|
|
4604
|
+
/**
|
|
4605
|
+
* Credentials — OAuth tokens and API keys for external systems
|
|
4606
|
+
*/
|
|
4607
|
+
credentials: {
|
|
4608
|
+
/** List credentials for the current workspace */
|
|
4609
|
+
list: async (options) => rb.execute(getConnectorsCredentials, {}, options),
|
|
4610
|
+
/** Get a credential by ID */
|
|
4611
|
+
get: async (id, options) => rb.execute(
|
|
4612
|
+
getConnectorsCredentialsById,
|
|
4613
|
+
{ path: { id } },
|
|
4614
|
+
options
|
|
4615
|
+
),
|
|
4616
|
+
/** Refresh an OAuth credential */
|
|
4617
|
+
refresh: async (id, options) => rb.execute(
|
|
4618
|
+
postConnectorsCredentialsByIdRefresh,
|
|
4619
|
+
{ path: { id }, body: { data: {} } },
|
|
4620
|
+
options
|
|
4621
|
+
)
|
|
4622
|
+
},
|
|
4623
|
+
/**
|
|
4624
|
+
* OAuth — initiate and complete connector OAuth flows
|
|
4625
|
+
*/
|
|
4626
|
+
oauth: {
|
|
4627
|
+
/**
|
|
4628
|
+
* Get the OAuth authorization URL for a connector type.
|
|
4629
|
+
* Returns the URL to redirect the user to for authorization.
|
|
4630
|
+
*/
|
|
4631
|
+
connect: async (connectorType, workspaceId, options) => rb.execute(
|
|
4632
|
+
postConnectorsOauthInitiate,
|
|
4633
|
+
{
|
|
4634
|
+
body: {
|
|
4635
|
+
data: {
|
|
4636
|
+
type: "connector_instance",
|
|
4637
|
+
attributes: {
|
|
4638
|
+
connector_type: connectorType,
|
|
4639
|
+
workspace_id: workspaceId
|
|
4640
|
+
}
|
|
4641
|
+
}
|
|
4642
|
+
}
|
|
4643
|
+
},
|
|
4644
|
+
options
|
|
4645
|
+
),
|
|
4646
|
+
/**
|
|
4647
|
+
* Exchange OAuth authorization code for a credential.
|
|
4648
|
+
* Called from the redirect handler after the user authorizes in the provider.
|
|
4649
|
+
*/
|
|
4650
|
+
callback: async (connectorType, code, state, workspaceId, options) => rb.execute(
|
|
4651
|
+
postConnectorsOauthCallback,
|
|
4652
|
+
{
|
|
4653
|
+
body: {
|
|
4654
|
+
data: {
|
|
4655
|
+
type: "connector_instance",
|
|
4656
|
+
attributes: {
|
|
4657
|
+
connector_type: connectorType,
|
|
4658
|
+
code,
|
|
4659
|
+
state,
|
|
4660
|
+
workspace_id: workspaceId
|
|
4661
|
+
}
|
|
4662
|
+
}
|
|
4663
|
+
}
|
|
4664
|
+
},
|
|
4665
|
+
options
|
|
4666
|
+
)
|
|
4667
|
+
},
|
|
4668
|
+
/**
|
|
4669
|
+
* Supported Connectors — discover available integrations
|
|
4670
|
+
*/
|
|
4671
|
+
available: {
|
|
4672
|
+
/** List all supported connector types */
|
|
4673
|
+
list: () => [
|
|
4674
|
+
"salesforce",
|
|
4675
|
+
"sharepoint",
|
|
4676
|
+
"microsoft_365",
|
|
4677
|
+
"outlook",
|
|
4678
|
+
"gmail",
|
|
4679
|
+
"slack",
|
|
4680
|
+
"hubspot",
|
|
4681
|
+
"notion",
|
|
4682
|
+
"jira",
|
|
4683
|
+
"confluence",
|
|
4684
|
+
"fullscript",
|
|
4685
|
+
"github",
|
|
4686
|
+
"gitlab",
|
|
4687
|
+
"google_calendar",
|
|
4688
|
+
"google_chat",
|
|
4689
|
+
"custom"
|
|
4690
|
+
]
|
|
4691
|
+
},
|
|
4692
|
+
/**
|
|
4693
|
+
* Fullscript — supplement prescribing platform integration.
|
|
4694
|
+
*
|
|
4695
|
+
* Requires a Fullscript connector instance and OAuth credential.
|
|
4696
|
+
* Use `connectors.oauth.connect("fullscript", workspaceId)` to authorize.
|
|
4697
|
+
*/
|
|
4698
|
+
fullscript: {
|
|
4699
|
+
/**
|
|
4700
|
+
* Check if a patient exists in Fullscript by email address.
|
|
4701
|
+
* Returns the patient if found, or null if not found.
|
|
4702
|
+
*/
|
|
4703
|
+
checkPatient: async (connectorId, workspaceId, email, options) => rb.execute(
|
|
4704
|
+
postConnectorsFullscriptCheckPatient,
|
|
4705
|
+
{
|
|
4706
|
+
body: {
|
|
4707
|
+
data: {
|
|
4708
|
+
type: "connector_instance",
|
|
4709
|
+
attributes: {
|
|
4710
|
+
connector_id: connectorId,
|
|
4711
|
+
workspace_id: workspaceId,
|
|
4712
|
+
email
|
|
4713
|
+
}
|
|
4714
|
+
}
|
|
4715
|
+
}
|
|
4716
|
+
},
|
|
4717
|
+
options
|
|
4718
|
+
),
|
|
4719
|
+
/**
|
|
4720
|
+
* Create a patient record in Fullscript.
|
|
4721
|
+
*/
|
|
4722
|
+
createPatient: async (connectorId, workspaceId, attrs, options) => rb.execute(
|
|
4723
|
+
postConnectorsFullscriptCreatePatient,
|
|
4724
|
+
{
|
|
4725
|
+
body: {
|
|
4726
|
+
data: {
|
|
4727
|
+
type: "connector_instance",
|
|
4728
|
+
attributes: {
|
|
4729
|
+
connector_id: connectorId,
|
|
4730
|
+
workspace_id: workspaceId,
|
|
4731
|
+
...attrs
|
|
4732
|
+
}
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4735
|
+
},
|
|
4736
|
+
options
|
|
4737
|
+
),
|
|
4738
|
+
/**
|
|
4739
|
+
* Get an embed session grant token for the Fullscript prescribing widget.
|
|
4740
|
+
* Token is short-lived (5-15 minutes). Cached server-side for 2 minutes.
|
|
4741
|
+
*/
|
|
4742
|
+
sessionGrant: async (connectorId, workspaceId, patientId, options) => rb.execute(
|
|
4743
|
+
postConnectorsFullscriptSessionGrant,
|
|
4744
|
+
{
|
|
4745
|
+
body: {
|
|
4746
|
+
data: {
|
|
4747
|
+
type: "connector_instance",
|
|
4748
|
+
attributes: {
|
|
4749
|
+
connector_id: connectorId,
|
|
4750
|
+
workspace_id: workspaceId,
|
|
4751
|
+
patient_id: patientId
|
|
4752
|
+
}
|
|
4753
|
+
}
|
|
4754
|
+
}
|
|
4755
|
+
},
|
|
4756
|
+
options
|
|
4757
|
+
),
|
|
4758
|
+
oauth: {
|
|
4759
|
+
/** Get the Fullscript OAuth authorization URL */
|
|
4760
|
+
connect: async (workspaceId, options) => rb.execute(
|
|
4761
|
+
postConnectorsOauthInitiate,
|
|
4762
|
+
{
|
|
4763
|
+
body: {
|
|
4764
|
+
data: {
|
|
4765
|
+
type: "connector_instance",
|
|
4766
|
+
attributes: {
|
|
4767
|
+
connector_type: "fullscript",
|
|
4768
|
+
workspace_id: workspaceId
|
|
4769
|
+
}
|
|
4770
|
+
}
|
|
4771
|
+
}
|
|
4772
|
+
},
|
|
4773
|
+
options
|
|
4774
|
+
),
|
|
4775
|
+
/** Exchange OAuth authorization code for Fullscript credential */
|
|
4776
|
+
callback: async (code, state, workspaceId, options) => rb.execute(
|
|
4777
|
+
postConnectorsOauthCallback,
|
|
4778
|
+
{
|
|
4779
|
+
body: {
|
|
4780
|
+
data: {
|
|
4781
|
+
type: "connector_instance",
|
|
4782
|
+
attributes: {
|
|
4783
|
+
connector_type: "fullscript",
|
|
4784
|
+
code,
|
|
4785
|
+
state,
|
|
4786
|
+
workspace_id: workspaceId
|
|
4787
|
+
}
|
|
4788
|
+
}
|
|
4789
|
+
}
|
|
4790
|
+
},
|
|
4791
|
+
options
|
|
4792
|
+
)
|
|
4793
|
+
}
|
|
4794
|
+
}
|
|
4795
|
+
};
|
|
4796
|
+
}
|
|
4797
|
+
|
|
4798
|
+
// src/namespaces/crawler.ts
|
|
4799
|
+
function createCrawlerNamespace(rb) {
|
|
4800
|
+
return {
|
|
4801
|
+
/**
|
|
4802
|
+
* Jobs — crawl job management
|
|
4803
|
+
*/
|
|
4804
|
+
jobs: {
|
|
4805
|
+
/** List crawl jobs with pagination */
|
|
4806
|
+
list: async (options) => {
|
|
4807
|
+
return rb.execute(
|
|
4808
|
+
getCrawlerJobs,
|
|
4809
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4810
|
+
options
|
|
4811
|
+
);
|
|
4812
|
+
},
|
|
4813
|
+
/** Get a crawl job by ID */
|
|
4814
|
+
get: async (id, options) => {
|
|
4815
|
+
return rb.execute(
|
|
4816
|
+
getCrawlerJobsById,
|
|
4817
|
+
{ path: { id } },
|
|
4818
|
+
options
|
|
4819
|
+
);
|
|
4820
|
+
},
|
|
4821
|
+
/** Start a new crawl job */
|
|
4822
|
+
create: async (attributes, options) => {
|
|
4823
|
+
return rb.execute(
|
|
4824
|
+
postCrawlerJobs,
|
|
4825
|
+
{
|
|
4826
|
+
body: { data: { type: "crawler_crawl_job", attributes } }
|
|
4827
|
+
},
|
|
4828
|
+
options
|
|
4829
|
+
);
|
|
4830
|
+
},
|
|
4831
|
+
/** Cancel a crawl job */
|
|
4832
|
+
cancel: async (id, options) => {
|
|
4833
|
+
return rb.execute(
|
|
4834
|
+
patchCrawlerJobsByIdCancel,
|
|
4835
|
+
{ path: { id }, body: {} },
|
|
4836
|
+
options
|
|
4837
|
+
);
|
|
4838
|
+
},
|
|
4839
|
+
/** Delete a crawl job */
|
|
4840
|
+
delete: async (id, options) => {
|
|
4841
|
+
return rb.executeDelete(
|
|
4842
|
+
deleteCrawlerJobsById,
|
|
4843
|
+
{ path: { id } },
|
|
4844
|
+
options
|
|
4845
|
+
);
|
|
4846
|
+
}
|
|
4847
|
+
},
|
|
4848
|
+
/**
|
|
4849
|
+
* Schedules — recurring crawl configurations
|
|
4850
|
+
*/
|
|
4851
|
+
schedules: {
|
|
4852
|
+
/** List crawl schedules */
|
|
4853
|
+
list: async (options) => {
|
|
4854
|
+
return rb.execute(getCrawlerSchedules, {}, options);
|
|
4855
|
+
},
|
|
4856
|
+
/** Get a schedule by ID */
|
|
4857
|
+
get: async (id, options) => {
|
|
4858
|
+
return rb.execute(
|
|
4859
|
+
getCrawlerSchedulesById,
|
|
4860
|
+
{ path: { id } },
|
|
4861
|
+
options
|
|
4862
|
+
);
|
|
4863
|
+
},
|
|
4864
|
+
/** Create a new crawl schedule */
|
|
4865
|
+
create: async (attributes, options) => {
|
|
4866
|
+
return rb.execute(
|
|
4867
|
+
postCrawlerSchedules,
|
|
4868
|
+
{
|
|
4869
|
+
body: { data: { type: "crawler_crawl_schedule", attributes } }
|
|
4870
|
+
},
|
|
4871
|
+
options
|
|
4872
|
+
);
|
|
4873
|
+
},
|
|
4874
|
+
/** Update a schedule */
|
|
4875
|
+
update: async (id, attributes, options) => {
|
|
4876
|
+
return rb.execute(
|
|
4877
|
+
patchCrawlerSchedulesById,
|
|
4878
|
+
{
|
|
4879
|
+
path: { id },
|
|
4880
|
+
body: { data: { id, type: "crawler_crawl_schedule", attributes } }
|
|
4881
|
+
},
|
|
4882
|
+
options
|
|
4883
|
+
);
|
|
4884
|
+
},
|
|
4885
|
+
/** Delete a schedule */
|
|
4886
|
+
delete: async (id, options) => {
|
|
4887
|
+
return rb.executeDelete(
|
|
4888
|
+
deleteCrawlerSchedulesById,
|
|
4889
|
+
{ path: { id } },
|
|
4890
|
+
options
|
|
4891
|
+
);
|
|
4892
|
+
}
|
|
4893
|
+
},
|
|
4894
|
+
/**
|
|
4895
|
+
* Results — crawl results and extracted content
|
|
4896
|
+
*/
|
|
4897
|
+
results: {
|
|
4898
|
+
/** List crawl results */
|
|
4899
|
+
list: async (options) => {
|
|
4900
|
+
return rb.execute(
|
|
4901
|
+
getCrawlerResults,
|
|
4902
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4903
|
+
options
|
|
4904
|
+
);
|
|
4905
|
+
},
|
|
4906
|
+
/** Get a crawl result by ID */
|
|
4907
|
+
get: async (id, options) => {
|
|
4908
|
+
return rb.execute(
|
|
4909
|
+
getCrawlerResultsById,
|
|
4910
|
+
{ path: { id } },
|
|
4911
|
+
options
|
|
4912
|
+
);
|
|
4913
|
+
}
|
|
4914
|
+
}
|
|
4915
|
+
};
|
|
4916
|
+
}
|
|
4917
|
+
|
|
4918
|
+
// src/namespaces/crm.ts
|
|
4919
|
+
function createCrmNamespace(rb) {
|
|
4920
|
+
return {
|
|
4921
|
+
/**
|
|
4922
|
+
* Contacts — people and leads
|
|
4923
|
+
*/
|
|
4924
|
+
contacts: {
|
|
4925
|
+
/** Get a contact by ID */
|
|
4926
|
+
get: async (id, options) => {
|
|
4927
|
+
return rb.execute(
|
|
4928
|
+
getCrmContactsById,
|
|
4929
|
+
{ path: { id } },
|
|
4930
|
+
options
|
|
4931
|
+
);
|
|
4932
|
+
},
|
|
4933
|
+
/** Create a new contact */
|
|
4934
|
+
create: async (attributes, options) => {
|
|
4935
|
+
return rb.execute(
|
|
4936
|
+
postCrmContacts,
|
|
4937
|
+
{
|
|
4938
|
+
body: { data: { type: "crm_contact", attributes } }
|
|
4939
|
+
},
|
|
4940
|
+
options
|
|
4941
|
+
);
|
|
4942
|
+
},
|
|
4943
|
+
/** Update a contact */
|
|
4944
|
+
update: async (id, attributes, options) => {
|
|
4945
|
+
return rb.execute(
|
|
4946
|
+
patchCrmContactsById,
|
|
4947
|
+
{
|
|
4948
|
+
path: { id },
|
|
4949
|
+
body: { data: { id, type: "crm_contact", attributes } }
|
|
4950
|
+
},
|
|
4951
|
+
options
|
|
4952
|
+
);
|
|
4953
|
+
},
|
|
4954
|
+
/** Delete a contact (soft delete) */
|
|
4955
|
+
delete: async (id, options) => {
|
|
4956
|
+
return rb.executeDelete(
|
|
4957
|
+
deleteCrmContactsById,
|
|
4958
|
+
{ path: { id } },
|
|
4959
|
+
options
|
|
4960
|
+
);
|
|
4961
|
+
},
|
|
4962
|
+
/** List contacts by workspace */
|
|
4963
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
4964
|
+
return rb.execute(
|
|
4965
|
+
getCrmContactsWorkspaceByWorkspaceId,
|
|
4966
|
+
{
|
|
4967
|
+
path: { workspace_id: workspaceId },
|
|
4968
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
4969
|
+
},
|
|
4970
|
+
options
|
|
4971
|
+
);
|
|
4972
|
+
}
|
|
4973
|
+
},
|
|
4974
|
+
/**
|
|
4975
|
+
* Companies — organizations
|
|
4976
|
+
*/
|
|
4977
|
+
companies: {
|
|
4978
|
+
/** Get a company by ID */
|
|
4979
|
+
get: async (id, options) => {
|
|
4980
|
+
return rb.execute(
|
|
4981
|
+
getCrmCompaniesById,
|
|
4982
|
+
{ path: { id } },
|
|
4983
|
+
options
|
|
4984
|
+
);
|
|
4985
|
+
},
|
|
4986
|
+
/** Create a new company */
|
|
4987
|
+
create: async (attributes, options) => {
|
|
4988
|
+
return rb.execute(
|
|
4989
|
+
postCrmCompanies,
|
|
4990
|
+
{
|
|
4991
|
+
body: { data: { type: "crm_company", attributes } }
|
|
4992
|
+
},
|
|
4993
|
+
options
|
|
4994
|
+
);
|
|
4995
|
+
},
|
|
4996
|
+
/** Update a company */
|
|
4997
|
+
update: async (id, attributes, options) => {
|
|
4998
|
+
return rb.execute(
|
|
4999
|
+
patchCrmCompaniesById,
|
|
5000
|
+
{
|
|
5001
|
+
path: { id },
|
|
5002
|
+
body: { data: { id, type: "crm_company", attributes } }
|
|
5003
|
+
},
|
|
5004
|
+
options
|
|
5005
|
+
);
|
|
5006
|
+
},
|
|
5007
|
+
/** Delete a company (soft delete) */
|
|
5008
|
+
delete: async (id, options) => {
|
|
5009
|
+
return rb.executeDelete(
|
|
5010
|
+
deleteCrmCompaniesById,
|
|
5011
|
+
{ path: { id } },
|
|
5012
|
+
options
|
|
5013
|
+
);
|
|
5014
|
+
},
|
|
5015
|
+
/** List companies by workspace */
|
|
5016
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5017
|
+
return rb.execute(
|
|
5018
|
+
getCrmCompaniesWorkspaceByWorkspaceId,
|
|
5019
|
+
{
|
|
5020
|
+
path: { workspace_id: workspaceId },
|
|
5021
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5022
|
+
},
|
|
5023
|
+
options
|
|
5024
|
+
);
|
|
5025
|
+
}
|
|
5026
|
+
},
|
|
5027
|
+
/**
|
|
5028
|
+
* Deals — opportunities and pipeline stages
|
|
5029
|
+
*/
|
|
5030
|
+
deals: {
|
|
5031
|
+
/** Get a deal by ID */
|
|
5032
|
+
get: async (id, options) => {
|
|
5033
|
+
return rb.execute(getCrmDealsById, { path: { id } }, options);
|
|
5034
|
+
},
|
|
5035
|
+
/** Create a new deal */
|
|
5036
|
+
create: async (attributes, options) => {
|
|
5037
|
+
return rb.execute(
|
|
5038
|
+
postCrmDeals,
|
|
5039
|
+
{
|
|
5040
|
+
body: { data: { type: "crm_deal", attributes } }
|
|
5041
|
+
},
|
|
5042
|
+
options
|
|
5043
|
+
);
|
|
5044
|
+
},
|
|
5045
|
+
/** Update a deal */
|
|
5046
|
+
update: async (id, attributes, options) => {
|
|
5047
|
+
return rb.execute(
|
|
5048
|
+
patchCrmDealsById,
|
|
5049
|
+
{
|
|
5050
|
+
path: { id },
|
|
5051
|
+
body: { data: { id, type: "crm_deal", attributes } }
|
|
5052
|
+
},
|
|
5053
|
+
options
|
|
5054
|
+
);
|
|
5055
|
+
},
|
|
5056
|
+
/** Delete a deal (soft delete) */
|
|
5057
|
+
delete: async (id, options) => {
|
|
5058
|
+
return rb.executeDelete(deleteCrmDealsById, { path: { id } }, options);
|
|
5059
|
+
},
|
|
5060
|
+
/** List deals by workspace */
|
|
5061
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5062
|
+
return rb.execute(
|
|
5063
|
+
getCrmDealsWorkspaceByWorkspaceId,
|
|
5064
|
+
{
|
|
5065
|
+
path: { workspace_id: workspaceId },
|
|
5066
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5067
|
+
},
|
|
5068
|
+
options
|
|
5069
|
+
);
|
|
5070
|
+
}
|
|
5071
|
+
},
|
|
5072
|
+
/**
|
|
5073
|
+
* Activities — interactions and notes
|
|
5074
|
+
*/
|
|
5075
|
+
activities: {
|
|
5076
|
+
/** Get an activity by ID */
|
|
5077
|
+
get: async (id, options) => {
|
|
5078
|
+
return rb.execute(
|
|
5079
|
+
getCrmActivitiesById,
|
|
5080
|
+
{ path: { id } },
|
|
5081
|
+
options
|
|
5082
|
+
);
|
|
5083
|
+
},
|
|
5084
|
+
/** Create a new activity */
|
|
5085
|
+
create: async (attributes, options) => {
|
|
5086
|
+
return rb.execute(
|
|
5087
|
+
postCrmActivities,
|
|
5088
|
+
{
|
|
5089
|
+
body: { data: { type: "crm_activity", attributes } }
|
|
5090
|
+
},
|
|
5091
|
+
options
|
|
5092
|
+
);
|
|
5093
|
+
},
|
|
5094
|
+
/** Update an activity (not available - activities are immutable after creation) */
|
|
5095
|
+
update: async (_id, _attributes, _options) => {
|
|
5096
|
+
throw new Error(
|
|
5097
|
+
"Activity update not available - activities are immutable"
|
|
5098
|
+
);
|
|
5099
|
+
},
|
|
5100
|
+
/** Delete an activity (soft delete) */
|
|
5101
|
+
delete: async (id, options) => {
|
|
5102
|
+
return rb.executeDelete(
|
|
5103
|
+
deleteCrmActivitiesById,
|
|
5104
|
+
{ path: { id } },
|
|
5105
|
+
options
|
|
5106
|
+
);
|
|
5107
|
+
},
|
|
5108
|
+
/** List activities by workspace */
|
|
5109
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5110
|
+
return rb.execute(
|
|
5111
|
+
getCrmActivitiesWorkspaceByWorkspaceId,
|
|
5112
|
+
{
|
|
5113
|
+
path: { workspace_id: workspaceId },
|
|
5114
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5115
|
+
},
|
|
5116
|
+
options
|
|
5117
|
+
);
|
|
5118
|
+
}
|
|
5119
|
+
},
|
|
5120
|
+
/**
|
|
5121
|
+
* Pipelines — deal workflow stages
|
|
5122
|
+
*/
|
|
5123
|
+
pipelines: {
|
|
5124
|
+
/** Get a pipeline by ID */
|
|
5125
|
+
get: async (id, options) => {
|
|
5126
|
+
return rb.execute(
|
|
5127
|
+
getCrmPipelinesById,
|
|
5128
|
+
{ path: { id } },
|
|
5129
|
+
options
|
|
5130
|
+
);
|
|
5131
|
+
},
|
|
5132
|
+
/** Create a new pipeline */
|
|
5133
|
+
create: async (attributes, options) => {
|
|
5134
|
+
return rb.execute(
|
|
5135
|
+
postCrmPipelines,
|
|
5136
|
+
{
|
|
5137
|
+
body: { data: { type: "crm_pipeline", attributes } }
|
|
5138
|
+
},
|
|
5139
|
+
options
|
|
5140
|
+
);
|
|
5141
|
+
},
|
|
5142
|
+
/** Update a pipeline */
|
|
5143
|
+
update: async (id, attributes, options) => {
|
|
5144
|
+
return rb.execute(
|
|
5145
|
+
patchCrmPipelinesById,
|
|
5146
|
+
{
|
|
5147
|
+
path: { id },
|
|
5148
|
+
body: { data: { id, type: "crm_pipeline", attributes } }
|
|
5149
|
+
},
|
|
5150
|
+
options
|
|
5151
|
+
);
|
|
5152
|
+
},
|
|
5153
|
+
/** Delete a pipeline */
|
|
5154
|
+
delete: async (id, options) => {
|
|
5155
|
+
return rb.executeDelete(
|
|
5156
|
+
deleteCrmPipelinesById,
|
|
5157
|
+
{ path: { id } },
|
|
5158
|
+
options
|
|
5159
|
+
);
|
|
5160
|
+
},
|
|
5161
|
+
/** List pipelines by workspace */
|
|
5162
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5163
|
+
return rb.execute(
|
|
5164
|
+
getCrmPipelinesWorkspaceByWorkspaceId,
|
|
5165
|
+
{
|
|
5166
|
+
path: { workspace_id: workspaceId }
|
|
5167
|
+
},
|
|
5168
|
+
options
|
|
5169
|
+
);
|
|
5170
|
+
}
|
|
5171
|
+
},
|
|
5172
|
+
/**
|
|
5173
|
+
* Pipeline Stages — stages within a pipeline
|
|
5174
|
+
*/
|
|
5175
|
+
pipelineStages: {
|
|
5176
|
+
/** Get a pipeline stage by ID */
|
|
5177
|
+
get: async (id, options) => {
|
|
5178
|
+
return rb.execute(
|
|
5179
|
+
getCrmPipelineStagesById,
|
|
5180
|
+
{ path: { id } },
|
|
5181
|
+
options
|
|
5182
|
+
);
|
|
5183
|
+
},
|
|
5184
|
+
/** Create a new pipeline stage */
|
|
5185
|
+
create: async (attributes, options) => {
|
|
5186
|
+
return rb.execute(
|
|
5187
|
+
postCrmPipelineStages,
|
|
5188
|
+
{
|
|
5189
|
+
body: { data: { type: "crm_pipeline_stage", attributes } }
|
|
5190
|
+
},
|
|
5191
|
+
options
|
|
5192
|
+
);
|
|
5193
|
+
},
|
|
5194
|
+
/** Update a pipeline stage */
|
|
5195
|
+
update: async (id, attributes, options) => {
|
|
5196
|
+
return rb.execute(
|
|
5197
|
+
patchCrmPipelineStagesById,
|
|
5198
|
+
{
|
|
5199
|
+
path: { id },
|
|
5200
|
+
body: { data: { id, type: "crm_pipeline_stage", attributes } }
|
|
5201
|
+
},
|
|
5202
|
+
options
|
|
5203
|
+
);
|
|
5204
|
+
},
|
|
5205
|
+
/** Delete a pipeline stage */
|
|
5206
|
+
delete: async (id, options) => {
|
|
5207
|
+
return rb.executeDelete(
|
|
5208
|
+
deleteCrmPipelineStagesById,
|
|
5209
|
+
{ path: { id } },
|
|
5210
|
+
options
|
|
5211
|
+
);
|
|
5212
|
+
}
|
|
5213
|
+
},
|
|
5214
|
+
/**
|
|
5215
|
+
* Relationship Types — custom relationship templates
|
|
5216
|
+
*/
|
|
5217
|
+
relationshipTypes: {
|
|
5218
|
+
/** Get a relationship type by ID */
|
|
5219
|
+
get: async (id, options) => {
|
|
5220
|
+
return rb.execute(
|
|
5221
|
+
getCrmRelationshipTypesById,
|
|
5222
|
+
{ path: { id } },
|
|
5223
|
+
options
|
|
5224
|
+
);
|
|
5225
|
+
},
|
|
5226
|
+
/** Create a new relationship type */
|
|
5227
|
+
create: async (attributes, options) => {
|
|
5228
|
+
return rb.execute(
|
|
5229
|
+
postCrmRelationshipTypes,
|
|
5230
|
+
{
|
|
5231
|
+
body: { data: { type: "crm_relationship_type", attributes } }
|
|
5232
|
+
},
|
|
5233
|
+
options
|
|
5234
|
+
);
|
|
5235
|
+
},
|
|
5236
|
+
/** Update a relationship type */
|
|
5237
|
+
update: async (id, attributes, options) => {
|
|
5238
|
+
return rb.execute(
|
|
5239
|
+
patchCrmRelationshipTypesById,
|
|
5240
|
+
{
|
|
5241
|
+
path: { id },
|
|
5242
|
+
body: { data: { id, type: "crm_relationship_type", attributes } }
|
|
5243
|
+
},
|
|
5244
|
+
options
|
|
5245
|
+
);
|
|
5246
|
+
},
|
|
5247
|
+
/** Delete a relationship type */
|
|
5248
|
+
delete: async (id, options) => {
|
|
5249
|
+
return rb.executeDelete(
|
|
5250
|
+
deleteCrmRelationshipTypesById,
|
|
5251
|
+
{ path: { id } },
|
|
5252
|
+
options
|
|
5253
|
+
);
|
|
5254
|
+
},
|
|
5255
|
+
/** List all relationship types */
|
|
5256
|
+
list: async (options) => {
|
|
5257
|
+
return rb.execute(
|
|
5258
|
+
getCrmRelationshipTypes,
|
|
5259
|
+
{},
|
|
5260
|
+
options
|
|
5261
|
+
);
|
|
5262
|
+
}
|
|
5263
|
+
},
|
|
5264
|
+
/**
|
|
5265
|
+
* Relationships — connections between entities
|
|
5266
|
+
*/
|
|
5267
|
+
relationships: {
|
|
5268
|
+
/** Get a relationship by ID */
|
|
5269
|
+
get: async (id, options) => {
|
|
5270
|
+
return rb.execute(
|
|
5271
|
+
getCrmRelationshipsById,
|
|
5272
|
+
{ path: { id } },
|
|
5273
|
+
options
|
|
5274
|
+
);
|
|
5275
|
+
},
|
|
5276
|
+
/** Create a new relationship */
|
|
5277
|
+
create: async (attributes, options) => {
|
|
5278
|
+
return rb.execute(
|
|
5279
|
+
postCrmRelationships,
|
|
5280
|
+
{
|
|
5281
|
+
body: { data: { type: "crm_relationship", attributes } }
|
|
5282
|
+
},
|
|
5283
|
+
options
|
|
5284
|
+
);
|
|
5285
|
+
},
|
|
5286
|
+
/** Delete a relationship */
|
|
5287
|
+
delete: async (id, options) => {
|
|
5288
|
+
return rb.executeDelete(
|
|
5289
|
+
deleteCrmRelationshipsById,
|
|
5290
|
+
{ path: { id } },
|
|
5291
|
+
options
|
|
5292
|
+
);
|
|
5293
|
+
},
|
|
5294
|
+
/** List relationships by workspace */
|
|
5295
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5296
|
+
return rb.execute(
|
|
5297
|
+
getCrmRelationshipsWorkspaceByWorkspaceId,
|
|
5298
|
+
{
|
|
5299
|
+
path: { workspace_id: workspaceId }
|
|
5300
|
+
},
|
|
5301
|
+
options
|
|
5302
|
+
);
|
|
5303
|
+
}
|
|
5304
|
+
},
|
|
5305
|
+
/**
|
|
5306
|
+
* Custom Entities — ISV-defined entity types
|
|
5307
|
+
*/
|
|
5308
|
+
customEntities: {
|
|
5309
|
+
/** Get a custom entity by ID */
|
|
5310
|
+
get: async (id, options) => {
|
|
5311
|
+
return rb.execute(
|
|
5312
|
+
getCrmCustomEntitiesById,
|
|
5313
|
+
{ path: { id } },
|
|
5314
|
+
options
|
|
5315
|
+
);
|
|
5316
|
+
},
|
|
5317
|
+
/** Create a new custom entity */
|
|
5318
|
+
create: async (attributes, options) => {
|
|
5319
|
+
return rb.execute(
|
|
5320
|
+
postCrmCustomEntities,
|
|
5321
|
+
{
|
|
5322
|
+
body: { data: { type: "crm_custom_entity", attributes } }
|
|
5323
|
+
},
|
|
5324
|
+
options
|
|
5325
|
+
);
|
|
5326
|
+
},
|
|
5327
|
+
/** Update a custom entity */
|
|
5328
|
+
update: async (id, attributes, options) => {
|
|
5329
|
+
return rb.execute(
|
|
5330
|
+
patchCrmCustomEntitiesById,
|
|
5331
|
+
{
|
|
5332
|
+
path: { id },
|
|
5333
|
+
body: { data: { id, type: "crm_custom_entity", attributes } }
|
|
5334
|
+
},
|
|
5335
|
+
options
|
|
5336
|
+
);
|
|
5337
|
+
},
|
|
5338
|
+
/** Delete a custom entity (soft delete) */
|
|
5339
|
+
delete: async (id, options) => {
|
|
5340
|
+
return rb.executeDelete(
|
|
5341
|
+
deleteCrmCustomEntitiesById,
|
|
5342
|
+
{ path: { id } },
|
|
5343
|
+
options
|
|
5344
|
+
);
|
|
5345
|
+
},
|
|
5346
|
+
/** List custom entities by workspace with optional type and attribute filters */
|
|
5347
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5348
|
+
const pageQuery = buildPageQuery(options?.page, options?.pageSize);
|
|
5349
|
+
return rb.execute(
|
|
5350
|
+
getCrmCustomEntitiesWorkspaceByWorkspaceId,
|
|
5351
|
+
{
|
|
5352
|
+
path: { workspace_id: workspaceId },
|
|
5353
|
+
query: {
|
|
5354
|
+
...options?.type ? { "filter[type]": options.type } : {},
|
|
5355
|
+
...options?.filters ? {
|
|
5356
|
+
"filter[filters]": JSON.stringify(options.filters)
|
|
5357
|
+
} : {},
|
|
5358
|
+
...pageQuery?.query
|
|
5359
|
+
}
|
|
5360
|
+
},
|
|
5361
|
+
options
|
|
5362
|
+
);
|
|
5363
|
+
},
|
|
5364
|
+
/** Batch update multiple custom entities in a single transaction */
|
|
5365
|
+
batchUpdate: async (workspaceId, updates, options) => {
|
|
5366
|
+
return rb.rawPost(
|
|
5367
|
+
"/crm/custom-entities/batch",
|
|
5368
|
+
{ workspace_id: workspaceId, updates },
|
|
5369
|
+
options
|
|
5370
|
+
);
|
|
5371
|
+
},
|
|
5372
|
+
/** Run aggregate queries (count/avg/sum) on custom entity properties */
|
|
5373
|
+
aggregate: async (workspaceId, params, options) => {
|
|
5374
|
+
return rb.rawPost(
|
|
5375
|
+
"/crm/custom-entities/aggregate",
|
|
5376
|
+
{ workspace_id: workspaceId, ...params },
|
|
5377
|
+
options
|
|
5378
|
+
);
|
|
5379
|
+
},
|
|
5380
|
+
/** Version history for this custom entity */
|
|
5381
|
+
versions: {
|
|
5382
|
+
/** List all versions of a custom entity (ordered by version_number desc) */
|
|
5383
|
+
list: async (entityId, options) => {
|
|
5384
|
+
const pageQuery = buildPageQuery(options?.page, options?.pageSize);
|
|
5385
|
+
const qs = pageQuery?.query && Object.keys(pageQuery.query).length > 0 ? "?" + new URLSearchParams(
|
|
5386
|
+
Object.entries(pageQuery.query).map(([k, v]) => [
|
|
5387
|
+
k,
|
|
5388
|
+
String(v)
|
|
5389
|
+
])
|
|
5390
|
+
).toString() : "";
|
|
5391
|
+
return rb.rawGet(
|
|
5392
|
+
`/crm/custom-entities/${entityId}/versions${qs}`,
|
|
5393
|
+
options
|
|
5394
|
+
);
|
|
5395
|
+
},
|
|
5396
|
+
/** Get a single version snapshot by ID */
|
|
5397
|
+
get: async (entityId, versionId, options) => rb.rawGet(
|
|
5398
|
+
`/crm/custom-entities/${entityId}/versions/${versionId}`,
|
|
5399
|
+
options
|
|
5400
|
+
),
|
|
5401
|
+
/** Restore a custom entity to a prior version */
|
|
5402
|
+
restore: async (entityId, versionId, options) => {
|
|
5403
|
+
return rb.rawPost(
|
|
5404
|
+
`/crm/custom-entities/${entityId}/versions/${versionId}/restore`,
|
|
5405
|
+
{},
|
|
5406
|
+
options
|
|
5407
|
+
);
|
|
5408
|
+
}
|
|
5409
|
+
}
|
|
5410
|
+
},
|
|
5411
|
+
/** CRM data export — create async export jobs and poll for completion. */
|
|
5412
|
+
export: {
|
|
5413
|
+
/**
|
|
5414
|
+
* Create a data export job. Returns immediately with a pending job.
|
|
5415
|
+
* Poll `get()` until `status === 'complete'`, then download from `file_url`.
|
|
5416
|
+
*/
|
|
5417
|
+
create: async (workspaceId, params, options) => {
|
|
5418
|
+
return rb.execute(
|
|
5419
|
+
postCrmExports,
|
|
5420
|
+
{
|
|
5421
|
+
body: {
|
|
5422
|
+
data: {
|
|
5423
|
+
type: "crm_data_export_job",
|
|
5424
|
+
attributes: {
|
|
5425
|
+
workspace_id: workspaceId,
|
|
5426
|
+
entity_type: params.entityType,
|
|
5427
|
+
entity_subtype: params.entitySubtype,
|
|
5428
|
+
format: params.format,
|
|
5429
|
+
include: params.include ?? [],
|
|
5430
|
+
filters: params.filters ?? []
|
|
5431
|
+
}
|
|
5432
|
+
}
|
|
5433
|
+
}
|
|
5434
|
+
},
|
|
5435
|
+
options
|
|
5436
|
+
);
|
|
5437
|
+
},
|
|
5438
|
+
/**
|
|
5439
|
+
* Get an export job by ID. When `status === 'complete'`, `file_url` is
|
|
5440
|
+
* populated and valid for 1 hour.
|
|
5441
|
+
*/
|
|
5442
|
+
get: async (jobId, options) => {
|
|
5443
|
+
return rb.execute(
|
|
5444
|
+
getCrmExportsById,
|
|
5445
|
+
{ path: { id: jobId } },
|
|
5446
|
+
options
|
|
5447
|
+
);
|
|
5448
|
+
},
|
|
5449
|
+
/** List all export jobs for a workspace, most recent first. */
|
|
5450
|
+
list: async (workspaceId, options) => {
|
|
5451
|
+
return rb.execute(
|
|
5452
|
+
getCrmExportsWorkspaceByWorkspaceId,
|
|
5453
|
+
{ path: { workspace_id: workspaceId } },
|
|
5454
|
+
options
|
|
5455
|
+
);
|
|
5456
|
+
}
|
|
5457
|
+
}
|
|
5458
|
+
};
|
|
5459
|
+
}
|
|
5460
|
+
|
|
5461
|
+
// src/namespaces/dataStore.ts
|
|
5462
|
+
function createDataStoreNamespace(_rb) {
|
|
5463
|
+
return {
|
|
5464
|
+
/**
|
|
5465
|
+
* Records — key-value storage with versioning
|
|
5466
|
+
*/
|
|
5467
|
+
records: {
|
|
5468
|
+
/** Get a value by namespace and key */
|
|
5469
|
+
get: async (_namespace, _key, _options) => {
|
|
5470
|
+
throw new Error("Record get not yet implemented in SDK");
|
|
5471
|
+
},
|
|
5472
|
+
/** Set a value (creates or updates) */
|
|
5473
|
+
set: async (_namespace, _key, _value, _options) => {
|
|
5474
|
+
throw new Error("Record set not yet implemented in SDK");
|
|
5475
|
+
},
|
|
5476
|
+
/** Delete a value */
|
|
5477
|
+
delete: async (_namespace, _key, _options) => {
|
|
5478
|
+
throw new Error("Record delete not yet implemented in SDK");
|
|
5479
|
+
},
|
|
5480
|
+
/** List all keys in a namespace */
|
|
5481
|
+
listKeys: async (_namespace, _options) => {
|
|
5482
|
+
throw new Error("List keys not yet implemented in SDK");
|
|
5483
|
+
},
|
|
5484
|
+
/** List all records in a namespace */
|
|
5485
|
+
list: async (_namespace, _options) => {
|
|
5486
|
+
throw new Error("List records not yet implemented in SDK");
|
|
5487
|
+
}
|
|
5488
|
+
},
|
|
5489
|
+
/**
|
|
5490
|
+
* Namespaces — namespace policies and access control
|
|
5491
|
+
*/
|
|
5492
|
+
namespaces: {
|
|
5493
|
+
/** Get namespace policy */
|
|
5494
|
+
getPolicy: async (_namespace, _options) => {
|
|
5495
|
+
throw new Error("Namespace policy get not yet implemented in SDK");
|
|
5496
|
+
},
|
|
5497
|
+
/** Create namespace policy */
|
|
5498
|
+
createPolicy: async (_attributes, _options) => {
|
|
5499
|
+
throw new Error("Namespace policy create not yet implemented in SDK");
|
|
5500
|
+
},
|
|
5501
|
+
/** Get namespace statistics */
|
|
5502
|
+
getStats: async (_namespace, _options) => {
|
|
5503
|
+
throw new Error("Namespace stats not yet implemented in SDK");
|
|
5504
|
+
}
|
|
5505
|
+
}
|
|
5506
|
+
};
|
|
5507
|
+
}
|
|
5508
|
+
|
|
5509
|
+
// src/namespaces/emailMarketing.ts
|
|
5510
|
+
function createEmailMarketingNamespace(rb) {
|
|
5511
|
+
return {
|
|
5512
|
+
/**
|
|
5513
|
+
* Campaigns — email campaign orchestration
|
|
5514
|
+
*/
|
|
5515
|
+
campaigns: {
|
|
5516
|
+
/** Get a campaign by ID */
|
|
5517
|
+
get: async (id, options) => {
|
|
5518
|
+
return rb.execute(
|
|
5519
|
+
getEmailMarketingCampaignsById,
|
|
5520
|
+
{ path: { id } },
|
|
5521
|
+
options
|
|
5522
|
+
);
|
|
5523
|
+
},
|
|
5524
|
+
/** Create a new campaign */
|
|
5525
|
+
create: async (attributes, options) => {
|
|
5526
|
+
return rb.execute(
|
|
5527
|
+
postEmailMarketingCampaigns,
|
|
5528
|
+
{
|
|
5529
|
+
body: { data: { type: "email_marketing_campaign", attributes } }
|
|
5530
|
+
},
|
|
5531
|
+
options
|
|
5532
|
+
);
|
|
5533
|
+
},
|
|
5534
|
+
/** Update a campaign */
|
|
5535
|
+
update: async (id, attributes, options) => {
|
|
5536
|
+
return rb.execute(
|
|
5537
|
+
patchEmailMarketingCampaignsById,
|
|
5538
|
+
{
|
|
5539
|
+
path: { id },
|
|
5540
|
+
body: {
|
|
5541
|
+
data: { id, type: "email_marketing_campaign", attributes }
|
|
5542
|
+
}
|
|
5543
|
+
},
|
|
5544
|
+
options
|
|
5545
|
+
);
|
|
5546
|
+
},
|
|
5547
|
+
/** Delete a campaign */
|
|
5548
|
+
delete: async (id, options) => {
|
|
5549
|
+
return rb.executeDelete(
|
|
5550
|
+
deleteEmailMarketingCampaignsById,
|
|
5551
|
+
{ path: { id } },
|
|
5552
|
+
options
|
|
5553
|
+
);
|
|
5554
|
+
},
|
|
5555
|
+
/** List campaigns by workspace */
|
|
5556
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5557
|
+
return rb.execute(
|
|
5558
|
+
getEmailMarketingCampaignsWorkspaceByWorkspaceId,
|
|
5559
|
+
{
|
|
5560
|
+
path: { workspace_id: workspaceId },
|
|
5561
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5562
|
+
},
|
|
5563
|
+
options
|
|
5564
|
+
);
|
|
5565
|
+
},
|
|
5566
|
+
/** Send the campaign */
|
|
5567
|
+
send: async (id, options) => {
|
|
5568
|
+
return rb.execute(
|
|
5569
|
+
postEmailMarketingCampaignsByIdSend,
|
|
5570
|
+
{ path: { id }, body: {} },
|
|
5571
|
+
options
|
|
5572
|
+
);
|
|
5573
|
+
},
|
|
5574
|
+
/** Analyze campaign performance with AI */
|
|
5575
|
+
analyze: async (id, options) => {
|
|
5576
|
+
return rb.execute(
|
|
5577
|
+
postEmailMarketingCampaignsByIdAnalyze,
|
|
5578
|
+
{ path: { id }, body: {} },
|
|
5579
|
+
options
|
|
5580
|
+
);
|
|
5581
|
+
},
|
|
5582
|
+
/** Optimize send times using AI */
|
|
5583
|
+
optimizeSendTimes: async (id, options) => {
|
|
5584
|
+
return rb.execute(
|
|
5585
|
+
postEmailMarketingCampaignsByIdOptimizeSendTimes,
|
|
5586
|
+
{ path: { id }, body: {} },
|
|
5587
|
+
options
|
|
5588
|
+
);
|
|
5589
|
+
},
|
|
5590
|
+
/** Create a follow-up campaign */
|
|
5591
|
+
createFollowup: async (id, attributes, options) => {
|
|
5592
|
+
return rb.execute(
|
|
5593
|
+
postEmailMarketingCampaignsByIdCreateFollowup,
|
|
5594
|
+
{
|
|
5595
|
+
path: { id },
|
|
5596
|
+
body: { data: { type: "email_marketing_campaign", attributes } }
|
|
5597
|
+
},
|
|
5598
|
+
options
|
|
5599
|
+
);
|
|
5600
|
+
}
|
|
5601
|
+
},
|
|
5602
|
+
/**
|
|
5603
|
+
* Templates — email template management
|
|
5604
|
+
*/
|
|
5605
|
+
templates: {
|
|
5606
|
+
/** List templates by workspace */
|
|
5607
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
3661
5608
|
return rb.execute(
|
|
3662
|
-
|
|
3663
|
-
{
|
|
5609
|
+
getEmailMarketingTemplatesWorkspaceByWorkspaceId,
|
|
5610
|
+
{
|
|
5611
|
+
path: { workspace_id: workspaceId },
|
|
5612
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5613
|
+
},
|
|
3664
5614
|
options
|
|
3665
5615
|
);
|
|
3666
5616
|
}
|
|
3667
5617
|
},
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
5618
|
+
/**
|
|
5619
|
+
* Generated Emails — AI-personalized emails awaiting review
|
|
5620
|
+
*/
|
|
5621
|
+
generatedEmails: {
|
|
5622
|
+
/** Get a generated email by ID */
|
|
5623
|
+
get: async (id, options) => {
|
|
5624
|
+
return rb.execute(
|
|
5625
|
+
getEmailMarketingGeneratedEmailsById,
|
|
3672
5626
|
{ path: { id } },
|
|
3673
5627
|
options
|
|
3674
5628
|
);
|
|
3675
5629
|
},
|
|
3676
|
-
|
|
5630
|
+
/** Update a generated email */
|
|
5631
|
+
update: async (id, attributes, options) => {
|
|
3677
5632
|
return rb.execute(
|
|
3678
|
-
|
|
3679
|
-
|
|
5633
|
+
patchEmailMarketingGeneratedEmailsById,
|
|
5634
|
+
{
|
|
5635
|
+
path: { id },
|
|
5636
|
+
body: {
|
|
5637
|
+
data: { id, type: "email_marketing_generated_email", attributes }
|
|
5638
|
+
}
|
|
5639
|
+
},
|
|
3680
5640
|
options
|
|
3681
5641
|
);
|
|
3682
5642
|
},
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
}),
|
|
3690
|
-
options
|
|
3691
|
-
)
|
|
5643
|
+
/** Approve a generated email for sending */
|
|
5644
|
+
approve: async (id, options) => {
|
|
5645
|
+
return rb.execute(
|
|
5646
|
+
patchEmailMarketingGeneratedEmailsByIdApprove,
|
|
5647
|
+
{ path: { id }, body: {} },
|
|
5648
|
+
options
|
|
3692
5649
|
);
|
|
3693
|
-
}
|
|
3694
|
-
|
|
5650
|
+
}
|
|
5651
|
+
},
|
|
5652
|
+
/**
|
|
5653
|
+
* Sender Profiles — sender identities with DNS validation
|
|
5654
|
+
*/
|
|
5655
|
+
senderProfiles: {
|
|
5656
|
+
/** Get a sender profile by ID */
|
|
5657
|
+
get: async (id, options) => {
|
|
3695
5658
|
return rb.execute(
|
|
3696
|
-
|
|
3697
|
-
{
|
|
5659
|
+
getEmailMarketingSenderProfilesById,
|
|
5660
|
+
{ path: { id } },
|
|
3698
5661
|
options
|
|
3699
5662
|
);
|
|
3700
5663
|
},
|
|
5664
|
+
/** Update a sender profile */
|
|
3701
5665
|
update: async (id, attributes, options) => {
|
|
3702
5666
|
return rb.execute(
|
|
3703
|
-
|
|
5667
|
+
patchEmailMarketingSenderProfilesById,
|
|
3704
5668
|
{
|
|
3705
5669
|
path: { id },
|
|
3706
|
-
body: {
|
|
5670
|
+
body: {
|
|
5671
|
+
data: { id, type: "email_marketing_sender_profile", attributes }
|
|
5672
|
+
}
|
|
3707
5673
|
},
|
|
3708
5674
|
options
|
|
3709
5675
|
);
|
|
3710
5676
|
},
|
|
3711
|
-
|
|
5677
|
+
/** Validate DNS records for sender profile */
|
|
5678
|
+
validateDns: async (id, options) => {
|
|
3712
5679
|
return rb.execute(
|
|
3713
|
-
|
|
5680
|
+
patchEmailMarketingSenderProfilesByIdValidateDns,
|
|
5681
|
+
{ path: { id }, body: {} },
|
|
5682
|
+
options
|
|
5683
|
+
);
|
|
5684
|
+
},
|
|
5685
|
+
/** Delete a sender profile */
|
|
5686
|
+
delete: async (id, options) => {
|
|
5687
|
+
return rb.executeDelete(
|
|
5688
|
+
deleteEmailMarketingSenderProfilesById,
|
|
3714
5689
|
{ path: { id } },
|
|
3715
5690
|
options
|
|
3716
5691
|
);
|
|
3717
5692
|
}
|
|
3718
|
-
}
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
notifications: {
|
|
3726
|
-
/** List notification logs (alias for list) */
|
|
3727
|
-
logs: async (options) => {
|
|
5693
|
+
},
|
|
5694
|
+
/**
|
|
5695
|
+
* Sequences — drip campaign automation
|
|
5696
|
+
*/
|
|
5697
|
+
sequences: {
|
|
5698
|
+
/** Create a new sequence */
|
|
5699
|
+
create: async (attributes, options) => {
|
|
3728
5700
|
return rb.execute(
|
|
3729
|
-
|
|
3730
|
-
|
|
5701
|
+
postEmailMarketingSequences,
|
|
5702
|
+
{
|
|
5703
|
+
body: { data: { type: "email_marketing_sequence", attributes } }
|
|
5704
|
+
},
|
|
3731
5705
|
options
|
|
3732
5706
|
);
|
|
3733
5707
|
},
|
|
3734
|
-
|
|
5708
|
+
/** List sequences by workspace */
|
|
5709
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
3735
5710
|
return rb.execute(
|
|
3736
|
-
|
|
3737
|
-
|
|
5711
|
+
getEmailMarketingSequencesWorkspaceByWorkspaceId,
|
|
5712
|
+
{
|
|
5713
|
+
path: { workspace_id: workspaceId },
|
|
5714
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5715
|
+
},
|
|
3738
5716
|
options
|
|
3739
5717
|
);
|
|
3740
5718
|
},
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
rb.createPaginatedFetcher(
|
|
3744
|
-
getNotificationLogs,
|
|
3745
|
-
(page, pageSize) => ({
|
|
3746
|
-
query: { page: { number: page, size: pageSize } }
|
|
3747
|
-
}),
|
|
3748
|
-
options
|
|
3749
|
-
)
|
|
3750
|
-
);
|
|
3751
|
-
},
|
|
3752
|
-
get: async (id, options) => {
|
|
5719
|
+
/** Resume a paused sequence */
|
|
5720
|
+
resume: async (id, options) => {
|
|
3753
5721
|
return rb.execute(
|
|
3754
|
-
|
|
3755
|
-
{ path: { id } },
|
|
5722
|
+
patchEmailMarketingSequencesByIdResume,
|
|
5723
|
+
{ path: { id }, body: {} },
|
|
3756
5724
|
options
|
|
3757
5725
|
);
|
|
3758
|
-
}
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
},
|
|
3799
|
-
options
|
|
3800
|
-
);
|
|
3801
|
-
},
|
|
3802
|
-
get: async (id, options) => {
|
|
3803
|
-
return rb.execute(
|
|
3804
|
-
getNotificationMethodsById,
|
|
3805
|
-
{ path: { id } },
|
|
3806
|
-
options
|
|
3807
|
-
);
|
|
3808
|
-
}
|
|
3809
|
-
},
|
|
3810
|
-
preferences: {
|
|
3811
|
-
delete: async (id, options) => {
|
|
3812
|
-
return rb.executeDelete(
|
|
3813
|
-
deleteNotificationPreferencesById,
|
|
3814
|
-
{ path: { id } },
|
|
3815
|
-
options
|
|
3816
|
-
);
|
|
3817
|
-
},
|
|
3818
|
-
list: async (options) => {
|
|
3819
|
-
return rb.execute(
|
|
3820
|
-
getNotificationPreferences,
|
|
3821
|
-
buildPageQuery(options?.page, options?.pageSize),
|
|
3822
|
-
options
|
|
3823
|
-
);
|
|
3824
|
-
},
|
|
3825
|
-
listAll: async (options) => {
|
|
3826
|
-
return paginateToArray(
|
|
3827
|
-
rb.createPaginatedFetcher(
|
|
3828
|
-
getNotificationPreferences,
|
|
3829
|
-
(page, pageSize) => ({
|
|
3830
|
-
query: { page: { number: page, size: pageSize } }
|
|
3831
|
-
}),
|
|
3832
|
-
options
|
|
3833
|
-
)
|
|
3834
|
-
);
|
|
3835
|
-
},
|
|
3836
|
-
create: async (attributes, options) => {
|
|
3837
|
-
return rb.execute(
|
|
3838
|
-
postNotificationPreferences,
|
|
3839
|
-
{ body: { data: { type: "notification_preference", attributes } } },
|
|
3840
|
-
options
|
|
3841
|
-
);
|
|
3842
|
-
},
|
|
3843
|
-
update: async (id, attributes, options) => {
|
|
3844
|
-
return rb.execute(
|
|
3845
|
-
patchNotificationPreferencesById,
|
|
3846
|
-
{
|
|
3847
|
-
path: { id },
|
|
3848
|
-
body: {
|
|
3849
|
-
data: { id, type: "notification_preference", attributes }
|
|
3850
|
-
}
|
|
3851
|
-
},
|
|
3852
|
-
options
|
|
3853
|
-
);
|
|
3854
|
-
},
|
|
3855
|
-
get: async (id, options) => {
|
|
3856
|
-
return rb.execute(
|
|
3857
|
-
getNotificationPreferencesById,
|
|
3858
|
-
{ path: { id } },
|
|
3859
|
-
options
|
|
3860
|
-
);
|
|
3861
|
-
}
|
|
5726
|
+
}
|
|
5727
|
+
}
|
|
5728
|
+
};
|
|
5729
|
+
}
|
|
5730
|
+
|
|
5731
|
+
// src/namespaces/support.ts
|
|
5732
|
+
function createSupportNamespace(_rb) {
|
|
5733
|
+
return {
|
|
5734
|
+
/**
|
|
5735
|
+
* Tickets — customer support tickets
|
|
5736
|
+
*/
|
|
5737
|
+
tickets: {
|
|
5738
|
+
/** List tickets with pagination */
|
|
5739
|
+
list: async (_options) => {
|
|
5740
|
+
throw new Error("Tickets list not yet implemented in SDK");
|
|
5741
|
+
},
|
|
5742
|
+
/** Get a ticket by ID */
|
|
5743
|
+
get: async (_id, _options) => {
|
|
5744
|
+
throw new Error("Ticket get not yet implemented in SDK");
|
|
5745
|
+
},
|
|
5746
|
+
/** Create a new ticket */
|
|
5747
|
+
create: async (_attributes, _options) => {
|
|
5748
|
+
throw new Error("Ticket create not yet implemented in SDK");
|
|
5749
|
+
},
|
|
5750
|
+
/** Update a ticket */
|
|
5751
|
+
update: async (_id, _attributes, _options) => {
|
|
5752
|
+
throw new Error("Ticket update not yet implemented in SDK");
|
|
5753
|
+
},
|
|
5754
|
+
/** Add a message to a ticket */
|
|
5755
|
+
addMessage: async (_ticketId, _attributes, _options) => {
|
|
5756
|
+
throw new Error("Ticket add message not yet implemented in SDK");
|
|
5757
|
+
}
|
|
5758
|
+
},
|
|
5759
|
+
/**
|
|
5760
|
+
* Queues — ticket routing containers
|
|
5761
|
+
*/
|
|
5762
|
+
queues: {
|
|
5763
|
+
/** List queues */
|
|
5764
|
+
list: async (_options) => {
|
|
5765
|
+
throw new Error("Queues list not yet implemented in SDK");
|
|
3862
5766
|
}
|
|
3863
5767
|
}
|
|
3864
5768
|
};
|
|
@@ -4157,11 +6061,11 @@ function createExtractionNamespace(rb) {
|
|
|
4157
6061
|
* });
|
|
4158
6062
|
* console.log(`${result.filtered} of ${result.total} rows match`);
|
|
4159
6063
|
*/
|
|
4160
|
-
query: async (resultId, params, options) => {
|
|
6064
|
+
query: async (resultId, params = {}, options) => {
|
|
4161
6065
|
return rb.rawPost(
|
|
4162
6066
|
`/extraction/results/${resultId}/query`,
|
|
4163
6067
|
{
|
|
4164
|
-
filters: params.filters,
|
|
6068
|
+
filters: params.filters ?? [],
|
|
4165
6069
|
limit: params.limit,
|
|
4166
6070
|
offset: params.offset
|
|
4167
6071
|
},
|
|
@@ -4347,7 +6251,7 @@ var ChangePasswordSchema = import_zod2.z.object({
|
|
|
4347
6251
|
message: "Passwords do not match",
|
|
4348
6252
|
path: ["password_confirmation"]
|
|
4349
6253
|
});
|
|
4350
|
-
function createIdentityNamespace(rb) {
|
|
6254
|
+
function createIdentityNamespace(rb, baseUrl) {
|
|
4351
6255
|
return {
|
|
4352
6256
|
/** Login with email and password — returns a token object */
|
|
4353
6257
|
login: async (email, password, options) => {
|
|
@@ -4600,6 +6504,58 @@ function createIdentityNamespace(rb) {
|
|
|
4600
6504
|
);
|
|
4601
6505
|
}
|
|
4602
6506
|
},
|
|
6507
|
+
/**
|
|
6508
|
+
* Social OAuth sign-in (Google, GitHub, Microsoft).
|
|
6509
|
+
*
|
|
6510
|
+
* This is a browser-redirect flow — the backend redirects the user's browser
|
|
6511
|
+
* to the provider, then back to your `redirectUrl` with `?token=JWT` appended.
|
|
6512
|
+
*
|
|
6513
|
+
* @example
|
|
6514
|
+
* ```typescript
|
|
6515
|
+
* // Get the URL and redirect manually
|
|
6516
|
+
* const url = client.identity.oauth.getAuthorizationUrl('google', {
|
|
6517
|
+
* appId: 'your-app-id',
|
|
6518
|
+
* redirectUrl: 'https://yourapp.com/auth/callback',
|
|
6519
|
+
* });
|
|
6520
|
+
* window.location.href = url;
|
|
6521
|
+
*
|
|
6522
|
+
* // Or use the convenience helper (browser only)
|
|
6523
|
+
* client.identity.oauth.signIn('google', {
|
|
6524
|
+
* appId: 'your-app-id',
|
|
6525
|
+
* redirectUrl: 'https://yourapp.com/auth/callback',
|
|
6526
|
+
* });
|
|
6527
|
+
*
|
|
6528
|
+
* // On your callback page, extract the token:
|
|
6529
|
+
* const token = new URLSearchParams(window.location.search).get('token');
|
|
6530
|
+
* ```
|
|
6531
|
+
*/
|
|
6532
|
+
oauth: {
|
|
6533
|
+
/**
|
|
6534
|
+
* Build the authorization URL for the given OAuth provider.
|
|
6535
|
+
* Navigate the user's browser to this URL to begin the sign-in flow.
|
|
6536
|
+
*/
|
|
6537
|
+
getAuthorizationUrl(provider, options) {
|
|
6538
|
+
const base = (baseUrl ?? "").replace(/\/$/, "");
|
|
6539
|
+
const params = { app_id: options.appId };
|
|
6540
|
+
if (options.redirectUrl) params["redirect_url"] = options.redirectUrl;
|
|
6541
|
+
return `${base}/oauth/${provider}?${new URLSearchParams(params).toString()}`;
|
|
6542
|
+
},
|
|
6543
|
+
/**
|
|
6544
|
+
* Redirect the browser to the OAuth sign-in page for the given provider.
|
|
6545
|
+
* Only works in browser environments (sets `window.location.href`).
|
|
6546
|
+
*
|
|
6547
|
+
* After the user authenticates, they are redirected back to `redirectUrl`
|
|
6548
|
+
* with a `?token=JWT` query parameter containing their session token.
|
|
6549
|
+
*/
|
|
6550
|
+
signIn(provider, options) {
|
|
6551
|
+
if (typeof window === "undefined") {
|
|
6552
|
+
throw new Error(
|
|
6553
|
+
"identity.oauth.signIn() requires a browser environment. Use identity.oauth.getAuthorizationUrl() to get the URL and redirect manually."
|
|
6554
|
+
);
|
|
6555
|
+
}
|
|
6556
|
+
window.location.href = this.getAuthorizationUrl(provider, options);
|
|
6557
|
+
}
|
|
6558
|
+
},
|
|
4603
6559
|
apiKeys: {
|
|
4604
6560
|
list: async (options) => {
|
|
4605
6561
|
return rb.execute(
|
|
@@ -4985,9 +6941,17 @@ function createPlatformNamespace(rb) {
|
|
|
4985
6941
|
},
|
|
4986
6942
|
/** Update workspace member profile attributes (G9) */
|
|
4987
6943
|
updateProfile: async (workspaceId, memberId, profileAttrs, options) => {
|
|
4988
|
-
return rb.
|
|
4989
|
-
|
|
4990
|
-
{
|
|
6944
|
+
return rb.execute(
|
|
6945
|
+
patchWorkspaceMembershipsByWorkspaceIdByUserIdProfile,
|
|
6946
|
+
{
|
|
6947
|
+
path: { workspace_id: workspaceId, user_id: memberId },
|
|
6948
|
+
body: {
|
|
6949
|
+
data: {
|
|
6950
|
+
type: "workspace-membership",
|
|
6951
|
+
attributes: { profile_attributes: profileAttrs }
|
|
6952
|
+
}
|
|
6953
|
+
}
|
|
6954
|
+
},
|
|
4991
6955
|
options
|
|
4992
6956
|
);
|
|
4993
6957
|
},
|
|
@@ -5827,7 +7791,16 @@ function createVoiceNamespace(rb) {
|
|
|
5827
7791
|
options
|
|
5828
7792
|
);
|
|
5829
7793
|
},
|
|
5830
|
-
/**
|
|
7794
|
+
/**
|
|
7795
|
+
* End a voice session and release the LiveKit room.
|
|
7796
|
+
*
|
|
7797
|
+
* @param id - Voice session ID to end
|
|
7798
|
+
* @param options - Request options
|
|
7799
|
+
*
|
|
7800
|
+
* @note Session stop is fully server-controlled. No attributes are accepted
|
|
7801
|
+
* in the request body — `status` is set to `"ended"` and `ended_at` is set
|
|
7802
|
+
* automatically. Passing extra attributes will result in a 422 error.
|
|
7803
|
+
*/
|
|
5831
7804
|
stop: async (id, options) => {
|
|
5832
7805
|
return rb.execute(
|
|
5833
7806
|
patchVoiceSessionsByIdStop,
|
|
@@ -6350,7 +8323,7 @@ var RequestBuilder = class {
|
|
|
6350
8323
|
() => this.clientInstance.post({
|
|
6351
8324
|
url,
|
|
6352
8325
|
headers,
|
|
6353
|
-
...body !== void 0 && { body
|
|
8326
|
+
...body !== void 0 && { body },
|
|
6354
8327
|
...options?.signal && { signal: options.signal }
|
|
6355
8328
|
})
|
|
6356
8329
|
);
|
|
@@ -6494,9 +8467,17 @@ var GptClient = class extends BaseClient {
|
|
|
6494
8467
|
this.agents = createAgentsNamespace(rb);
|
|
6495
8468
|
this.ai = createAiNamespace(rb);
|
|
6496
8469
|
this.billing = createBillingNamespace(rb);
|
|
8470
|
+
this.catalog = createCatalogNamespace(rb);
|
|
8471
|
+
this.channels = createChannelsNamespace(rb);
|
|
6497
8472
|
this.communication = createCommunicationNamespace(rb);
|
|
8473
|
+
this.connectors = createConnectorsNamespace(rb);
|
|
8474
|
+
this.crawler = createCrawlerNamespace(rb);
|
|
8475
|
+
this.crm = createCrmNamespace(rb);
|
|
8476
|
+
this.dataStore = createDataStoreNamespace(rb);
|
|
8477
|
+
this.emailMarketing = createEmailMarketingNamespace(rb);
|
|
8478
|
+
this.support = createSupportNamespace(rb);
|
|
6498
8479
|
this.extraction = createExtractionNamespace(rb);
|
|
6499
|
-
this.identity = createIdentityNamespace(rb);
|
|
8480
|
+
this.identity = createIdentityNamespace(rb, this.config?.baseUrl);
|
|
6500
8481
|
this.platform = createPlatformNamespace(rb);
|
|
6501
8482
|
this.scheduling = createSchedulingNamespace(rb);
|
|
6502
8483
|
this.search = createSearchNamespace(rb);
|