@gpt-platform/client 0.2.1 → 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 +1620 -62
- package/dist/index.d.ts +1620 -62
- package/dist/index.js +2110 -181
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2110 -181
- package/dist/index.mjs.map +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1224,7 +1224,7 @@ function buildUserAgent(sdkVersion, appInfo) {
|
|
|
1224
1224
|
}
|
|
1225
1225
|
|
|
1226
1226
|
// src/version.ts
|
|
1227
|
-
var SDK_VERSION = "0.
|
|
1227
|
+
var SDK_VERSION = "0.3.0";
|
|
1228
1228
|
var DEFAULT_API_VERSION = "2026-02-25";
|
|
1229
1229
|
|
|
1230
1230
|
// src/base-client.ts
|
|
@@ -1546,6 +1546,15 @@ var getVoiceSessionsWorkspaceByWorkspaceId = (options) => (options.client ?? cli
|
|
|
1546
1546
|
url: "/voice/sessions/workspace/{workspace_id}",
|
|
1547
1547
|
...options
|
|
1548
1548
|
});
|
|
1549
|
+
var postEmailMarketingSequences = (options) => (options.client ?? client).post({
|
|
1550
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1551
|
+
url: "/email-marketing/sequences",
|
|
1552
|
+
...options,
|
|
1553
|
+
headers: {
|
|
1554
|
+
"Content-Type": "application/vnd.api+json",
|
|
1555
|
+
...options.headers
|
|
1556
|
+
}
|
|
1557
|
+
});
|
|
1549
1558
|
var patchExtractionDocumentsByIdCancel = (options) => (options.client ?? client).patch({
|
|
1550
1559
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1551
1560
|
url: "/extraction/documents/{id}/cancel",
|
|
@@ -1555,6 +1564,15 @@ var patchExtractionDocumentsByIdCancel = (options) => (options.client ?? client)
|
|
|
1555
1564
|
...options.headers
|
|
1556
1565
|
}
|
|
1557
1566
|
});
|
|
1567
|
+
var postCrmRelationships = (options) => (options.client ?? client).post({
|
|
1568
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1569
|
+
url: "/crm/relationships",
|
|
1570
|
+
...options,
|
|
1571
|
+
headers: {
|
|
1572
|
+
"Content-Type": "application/vnd.api+json",
|
|
1573
|
+
...options.headers
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1558
1576
|
var deleteAgentVersionsById = (options) => (options.client ?? client).delete({
|
|
1559
1577
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1560
1578
|
url: "/agent-versions/{id}",
|
|
@@ -1565,6 +1583,16 @@ var getAgentVersionsById = (options) => (options.client ?? client).get({
|
|
|
1565
1583
|
url: "/agent-versions/{id}",
|
|
1566
1584
|
...options
|
|
1567
1585
|
});
|
|
1586
|
+
var deleteCrmRelationshipsById = (options) => (options.client ?? client).delete({
|
|
1587
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1588
|
+
url: "/crm/relationships/{id}",
|
|
1589
|
+
...options
|
|
1590
|
+
});
|
|
1591
|
+
var getCrmRelationshipsById = (options) => (options.client ?? client).get({
|
|
1592
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1593
|
+
url: "/crm/relationships/{id}",
|
|
1594
|
+
...options
|
|
1595
|
+
});
|
|
1568
1596
|
var getWatcherEventsById = (options) => (options.client ?? client).get({
|
|
1569
1597
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1570
1598
|
url: "/watcher/events/{id}",
|
|
@@ -1579,6 +1607,16 @@ var patchApiKeysByIdRevoke = (options) => (options.client ?? client).patch({
|
|
|
1579
1607
|
...options.headers
|
|
1580
1608
|
}
|
|
1581
1609
|
});
|
|
1610
|
+
var getCrmCustomEntitiesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
1611
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1612
|
+
url: "/crm/custom-entities/workspace/{workspace_id}",
|
|
1613
|
+
...options
|
|
1614
|
+
});
|
|
1615
|
+
var getEmailMarketingSequencesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
1616
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1617
|
+
url: "/email-marketing/sequences/workspace/{workspace_id}",
|
|
1618
|
+
...options
|
|
1619
|
+
});
|
|
1582
1620
|
var patchApiKeysByIdRotate = (options) => (options.client ?? client).patch({
|
|
1583
1621
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1584
1622
|
url: "/api-keys/{id}/rotate",
|
|
@@ -1588,6 +1626,15 @@ var patchApiKeysByIdRotate = (options) => (options.client ?? client).patch({
|
|
|
1588
1626
|
...options.headers
|
|
1589
1627
|
}
|
|
1590
1628
|
});
|
|
1629
|
+
var patchWorkspaceMembershipsByWorkspaceIdByUserIdProfile = (options) => (options.client ?? client).patch({
|
|
1630
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1631
|
+
url: "/workspace-memberships/{workspace_id}/{user_id}/profile",
|
|
1632
|
+
...options,
|
|
1633
|
+
headers: {
|
|
1634
|
+
"Content-Type": "application/vnd.api+json",
|
|
1635
|
+
...options.headers
|
|
1636
|
+
}
|
|
1637
|
+
});
|
|
1591
1638
|
var getWorkspaces = (options) => (options.client ?? client).get({
|
|
1592
1639
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1593
1640
|
url: "/workspaces",
|
|
@@ -1635,6 +1682,35 @@ var patchExtractionDocumentsByIdDismiss = (options) => (options.client ?? client
|
|
|
1635
1682
|
...options.headers
|
|
1636
1683
|
}
|
|
1637
1684
|
});
|
|
1685
|
+
var getCrawlerResults = (options) => (options.client ?? client).get({
|
|
1686
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1687
|
+
url: "/crawler/results",
|
|
1688
|
+
...options
|
|
1689
|
+
});
|
|
1690
|
+
var getCrmExportsById = (options) => (options.client ?? client).get({
|
|
1691
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1692
|
+
url: "/crm/exports/{id}",
|
|
1693
|
+
...options
|
|
1694
|
+
});
|
|
1695
|
+
var deleteCrmDealsById = (options) => (options.client ?? client).delete({
|
|
1696
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1697
|
+
url: "/crm/deals/{id}",
|
|
1698
|
+
...options
|
|
1699
|
+
});
|
|
1700
|
+
var getCrmDealsById = (options) => (options.client ?? client).get({
|
|
1701
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1702
|
+
url: "/crm/deals/{id}",
|
|
1703
|
+
...options
|
|
1704
|
+
});
|
|
1705
|
+
var patchCrmDealsById = (options) => (options.client ?? client).patch({
|
|
1706
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1707
|
+
url: "/crm/deals/{id}",
|
|
1708
|
+
...options,
|
|
1709
|
+
headers: {
|
|
1710
|
+
"Content-Type": "application/vnd.api+json",
|
|
1711
|
+
...options.headers
|
|
1712
|
+
}
|
|
1713
|
+
});
|
|
1638
1714
|
var postUsersAuthResetPasswordRequest = (options) => (options.client ?? client).post({
|
|
1639
1715
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1640
1716
|
url: "/users/auth/reset-password/request",
|
|
@@ -1664,6 +1740,25 @@ var postAgentsByIdAnalyzeTraining = (options) => (options.client ?? client).post
|
|
|
1664
1740
|
url: "/agents/{id}/analyze-training",
|
|
1665
1741
|
...options
|
|
1666
1742
|
});
|
|
1743
|
+
var getCrmContactsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
1744
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1745
|
+
url: "/crm/contacts/workspace/{workspace_id}",
|
|
1746
|
+
...options
|
|
1747
|
+
});
|
|
1748
|
+
var getEmailMarketingTemplatesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
1749
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1750
|
+
url: "/email-marketing/templates/workspace/{workspace_id}",
|
|
1751
|
+
...options
|
|
1752
|
+
});
|
|
1753
|
+
var postEmailMarketingCampaignsByIdAnalyze = (options) => (options.client ?? client).post({
|
|
1754
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1755
|
+
url: "/email-marketing/campaigns/{id}/analyze",
|
|
1756
|
+
...options,
|
|
1757
|
+
headers: {
|
|
1758
|
+
"Content-Type": "application/vnd.api+json",
|
|
1759
|
+
...options.headers
|
|
1760
|
+
}
|
|
1761
|
+
});
|
|
1667
1762
|
var postWebhookConfigsByIdTest = (options) => (options.client ?? client).post({
|
|
1668
1763
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1669
1764
|
url: "/webhook-configs/{id}/test",
|
|
@@ -1696,11 +1791,65 @@ var getExtractionBatchesWorkspaceByWorkspaceId = (options) => (options.client ??
|
|
|
1696
1791
|
url: "/extraction/batches/workspace/{workspace_id}",
|
|
1697
1792
|
...options
|
|
1698
1793
|
});
|
|
1794
|
+
var postConnectorsFullscriptCreatePatient = (options) => (options.client ?? client).post({
|
|
1795
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1796
|
+
url: "/connectors/fullscript/create-patient",
|
|
1797
|
+
...options,
|
|
1798
|
+
headers: {
|
|
1799
|
+
"Content-Type": "application/vnd.api+json",
|
|
1800
|
+
...options.headers
|
|
1801
|
+
}
|
|
1802
|
+
});
|
|
1803
|
+
var postEmailMarketingCampaignsByIdOptimizeSendTimes = (options) => (options.client ?? client).post({
|
|
1804
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1805
|
+
url: "/email-marketing/campaigns/{id}/optimize-send-times",
|
|
1806
|
+
...options,
|
|
1807
|
+
headers: {
|
|
1808
|
+
"Content-Type": "application/vnd.api+json",
|
|
1809
|
+
...options.headers
|
|
1810
|
+
}
|
|
1811
|
+
});
|
|
1699
1812
|
var getExtractionDocumentsByIdStatus = (options) => (options.client ?? client).get({
|
|
1700
1813
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1701
1814
|
url: "/extraction/documents/{id}/status",
|
|
1702
1815
|
...options
|
|
1703
1816
|
});
|
|
1817
|
+
var postConnectorsFullscriptSessionGrant = (options) => (options.client ?? client).post({
|
|
1818
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1819
|
+
url: "/connectors/fullscript/session-grant",
|
|
1820
|
+
...options,
|
|
1821
|
+
headers: {
|
|
1822
|
+
"Content-Type": "application/vnd.api+json",
|
|
1823
|
+
...options.headers
|
|
1824
|
+
}
|
|
1825
|
+
});
|
|
1826
|
+
var postEmailMarketingCampaignsByIdSend = (options) => (options.client ?? client).post({
|
|
1827
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1828
|
+
url: "/email-marketing/campaigns/{id}/send",
|
|
1829
|
+
...options,
|
|
1830
|
+
headers: {
|
|
1831
|
+
"Content-Type": "application/vnd.api+json",
|
|
1832
|
+
...options.headers
|
|
1833
|
+
}
|
|
1834
|
+
});
|
|
1835
|
+
var postEmailMarketingCampaignsByIdCreateFollowup = (options) => (options.client ?? client).post({
|
|
1836
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1837
|
+
url: "/email-marketing/campaigns/{id}/create-followup",
|
|
1838
|
+
...options,
|
|
1839
|
+
headers: {
|
|
1840
|
+
"Content-Type": "application/vnd.api+json",
|
|
1841
|
+
...options.headers
|
|
1842
|
+
}
|
|
1843
|
+
});
|
|
1844
|
+
var postCrmContacts = (options) => (options.client ?? client).post({
|
|
1845
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1846
|
+
url: "/crm/contacts",
|
|
1847
|
+
...options,
|
|
1848
|
+
headers: {
|
|
1849
|
+
"Content-Type": "application/vnd.api+json",
|
|
1850
|
+
...options.headers
|
|
1851
|
+
}
|
|
1852
|
+
});
|
|
1704
1853
|
var deleteWebhookConfigsById = (options) => (options.client ?? client).delete({
|
|
1705
1854
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1706
1855
|
url: "/webhook-configs/{id}",
|
|
@@ -1720,6 +1869,15 @@ var patchWebhookConfigsById = (options) => (options.client ?? client).patch({
|
|
|
1720
1869
|
...options.headers
|
|
1721
1870
|
}
|
|
1722
1871
|
});
|
|
1872
|
+
var postConnectorsCredentialsByIdRefresh = (options) => (options.client ?? client).post({
|
|
1873
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1874
|
+
url: "/connectors/credentials/{id}/refresh",
|
|
1875
|
+
...options,
|
|
1876
|
+
headers: {
|
|
1877
|
+
"Content-Type": "application/vnd.api+json",
|
|
1878
|
+
...options.headers
|
|
1879
|
+
}
|
|
1880
|
+
});
|
|
1723
1881
|
var postWorkspacesByWorkspaceIdExtractionDocumentsDismissAllTrained = (options) => (options.client ?? client).post({
|
|
1724
1882
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1725
1883
|
url: "/workspaces/{workspace_id}/extraction/documents/dismiss-all-trained",
|
|
@@ -1738,6 +1896,34 @@ var postExtractionDocumentsFindOrBeginUpload = (options) => (options.client ?? c
|
|
|
1738
1896
|
...options.headers
|
|
1739
1897
|
}
|
|
1740
1898
|
});
|
|
1899
|
+
var postEmailMarketingCampaigns = (options) => (options.client ?? client).post({
|
|
1900
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1901
|
+
url: "/email-marketing/campaigns",
|
|
1902
|
+
...options,
|
|
1903
|
+
headers: {
|
|
1904
|
+
"Content-Type": "application/vnd.api+json",
|
|
1905
|
+
...options.headers
|
|
1906
|
+
}
|
|
1907
|
+
});
|
|
1908
|
+
var deleteCrmCustomEntitiesById = (options) => (options.client ?? client).delete({
|
|
1909
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1910
|
+
url: "/crm/custom-entities/{id}",
|
|
1911
|
+
...options
|
|
1912
|
+
});
|
|
1913
|
+
var getCrmCustomEntitiesById = (options) => (options.client ?? client).get({
|
|
1914
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1915
|
+
url: "/crm/custom-entities/{id}",
|
|
1916
|
+
...options
|
|
1917
|
+
});
|
|
1918
|
+
var patchCrmCustomEntitiesById = (options) => (options.client ?? client).patch({
|
|
1919
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1920
|
+
url: "/crm/custom-entities/{id}",
|
|
1921
|
+
...options,
|
|
1922
|
+
headers: {
|
|
1923
|
+
"Content-Type": "application/vnd.api+json",
|
|
1924
|
+
...options.headers
|
|
1925
|
+
}
|
|
1926
|
+
});
|
|
1741
1927
|
var postAgentsByIdRestoreVersion = (options) => (options.client ?? client).post({
|
|
1742
1928
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1743
1929
|
url: "/agents/{id}/restore-version",
|
|
@@ -1765,6 +1951,29 @@ var postAgentsByIdPublishVersion = (options) => (options.client ?? client).post(
|
|
|
1765
1951
|
...options.headers
|
|
1766
1952
|
}
|
|
1767
1953
|
});
|
|
1954
|
+
var patchEmailMarketingSenderProfilesByIdValidateDns = (options) => (options.client ?? client).patch({
|
|
1955
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1956
|
+
url: "/email-marketing/sender-profiles/{id}/validate-dns",
|
|
1957
|
+
...options,
|
|
1958
|
+
headers: {
|
|
1959
|
+
"Content-Type": "application/vnd.api+json",
|
|
1960
|
+
...options.headers
|
|
1961
|
+
}
|
|
1962
|
+
});
|
|
1963
|
+
var getConnectorsCredentialsById = (options) => (options.client ?? client).get({
|
|
1964
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1965
|
+
url: "/connectors/credentials/{id}",
|
|
1966
|
+
...options
|
|
1967
|
+
});
|
|
1968
|
+
var postCrmCompanies = (options) => (options.client ?? client).post({
|
|
1969
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1970
|
+
url: "/crm/companies",
|
|
1971
|
+
...options,
|
|
1972
|
+
headers: {
|
|
1973
|
+
"Content-Type": "application/vnd.api+json",
|
|
1974
|
+
...options.headers
|
|
1975
|
+
}
|
|
1976
|
+
});
|
|
1768
1977
|
var getVoiceSessionsMine = (options) => (options.client ?? client).get({
|
|
1769
1978
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1770
1979
|
url: "/voice/sessions/mine",
|
|
@@ -1807,11 +2016,53 @@ var patchUsersAuthResetPassword = (options) => (options.client ?? client).patch(
|
|
|
1807
2016
|
...options.headers
|
|
1808
2017
|
}
|
|
1809
2018
|
});
|
|
2019
|
+
var deleteEmailMarketingSenderProfilesById = (options) => (options.client ?? client).delete({
|
|
2020
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2021
|
+
url: "/email-marketing/sender-profiles/{id}",
|
|
2022
|
+
...options
|
|
2023
|
+
});
|
|
2024
|
+
var getEmailMarketingSenderProfilesById = (options) => (options.client ?? client).get({
|
|
2025
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2026
|
+
url: "/email-marketing/sender-profiles/{id}",
|
|
2027
|
+
...options
|
|
2028
|
+
});
|
|
2029
|
+
var patchEmailMarketingSenderProfilesById = (options) => (options.client ?? client).patch({
|
|
2030
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2031
|
+
url: "/email-marketing/sender-profiles/{id}",
|
|
2032
|
+
...options,
|
|
2033
|
+
headers: {
|
|
2034
|
+
"Content-Type": "application/vnd.api+json",
|
|
2035
|
+
...options.headers
|
|
2036
|
+
}
|
|
2037
|
+
});
|
|
2038
|
+
var getCrmRelationshipTypes = (options) => (options.client ?? client).get({
|
|
2039
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2040
|
+
url: "/crm/relationship-types",
|
|
2041
|
+
...options
|
|
2042
|
+
});
|
|
2043
|
+
var postCrmRelationshipTypes = (options) => (options.client ?? client).post({
|
|
2044
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2045
|
+
url: "/crm/relationship-types",
|
|
2046
|
+
...options,
|
|
2047
|
+
headers: {
|
|
2048
|
+
"Content-Type": "application/vnd.api+json",
|
|
2049
|
+
...options.headers
|
|
2050
|
+
}
|
|
2051
|
+
});
|
|
1810
2052
|
var getSchedulingCalendarSyncsById = (options) => (options.client ?? client).get({
|
|
1811
2053
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1812
2054
|
url: "/scheduling/calendar-syncs/{id}",
|
|
1813
2055
|
...options
|
|
1814
2056
|
});
|
|
2057
|
+
var postCrmCustomEntities = (options) => (options.client ?? client).post({
|
|
2058
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2059
|
+
url: "/crm/custom-entities",
|
|
2060
|
+
...options,
|
|
2061
|
+
headers: {
|
|
2062
|
+
"Content-Type": "application/vnd.api+json",
|
|
2063
|
+
...options.headers
|
|
2064
|
+
}
|
|
2065
|
+
});
|
|
1815
2066
|
var postExtractionDocumentsBeginUpload = (options) => (options.client ?? client).post({
|
|
1816
2067
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1817
2068
|
url: "/extraction/documents/begin-upload",
|
|
@@ -1835,6 +2086,11 @@ var postSearchSaved = (options) => (options.client ?? client).post({
|
|
|
1835
2086
|
...options.headers
|
|
1836
2087
|
}
|
|
1837
2088
|
});
|
|
2089
|
+
var getEmailMarketingCampaignsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2090
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2091
|
+
url: "/email-marketing/campaigns/workspace/{workspace_id}",
|
|
2092
|
+
...options
|
|
2093
|
+
});
|
|
1838
2094
|
var deleteNotificationMethodsById = (options) => (options.client ?? client).delete({
|
|
1839
2095
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1840
2096
|
url: "/notification-methods/{id}",
|
|
@@ -1873,11 +2129,91 @@ var patchTrainingExamplesById = (options) => (options.client ?? client).patch({
|
|
|
1873
2129
|
...options.headers
|
|
1874
2130
|
}
|
|
1875
2131
|
});
|
|
2132
|
+
var getEmailMarketingGeneratedEmailsById = (options) => (options.client ?? client).get({
|
|
2133
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2134
|
+
url: "/email-marketing/generated-emails/{id}",
|
|
2135
|
+
...options
|
|
2136
|
+
});
|
|
2137
|
+
var patchEmailMarketingGeneratedEmailsById = (options) => (options.client ?? client).patch({
|
|
2138
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2139
|
+
url: "/email-marketing/generated-emails/{id}",
|
|
2140
|
+
...options,
|
|
2141
|
+
headers: {
|
|
2142
|
+
"Content-Type": "application/vnd.api+json",
|
|
2143
|
+
...options.headers
|
|
2144
|
+
}
|
|
2145
|
+
});
|
|
2146
|
+
var deleteEmailMarketingCampaignsById = (options) => (options.client ?? client).delete({
|
|
2147
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2148
|
+
url: "/email-marketing/campaigns/{id}",
|
|
2149
|
+
...options
|
|
2150
|
+
});
|
|
2151
|
+
var getEmailMarketingCampaignsById = (options) => (options.client ?? client).get({
|
|
2152
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2153
|
+
url: "/email-marketing/campaigns/{id}",
|
|
2154
|
+
...options
|
|
2155
|
+
});
|
|
2156
|
+
var patchEmailMarketingCampaignsById = (options) => (options.client ?? client).patch({
|
|
2157
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2158
|
+
url: "/email-marketing/campaigns/{id}",
|
|
2159
|
+
...options,
|
|
2160
|
+
headers: {
|
|
2161
|
+
"Content-Type": "application/vnd.api+json",
|
|
2162
|
+
...options.headers
|
|
2163
|
+
}
|
|
2164
|
+
});
|
|
1876
2165
|
var getSearchSuggest = (options) => (options.client ?? client).get({
|
|
1877
2166
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1878
2167
|
url: "/search/suggest",
|
|
1879
2168
|
...options
|
|
1880
2169
|
});
|
|
2170
|
+
var deleteCrmRelationshipTypesById = (options) => (options.client ?? client).delete({
|
|
2171
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2172
|
+
url: "/crm/relationship-types/{id}",
|
|
2173
|
+
...options
|
|
2174
|
+
});
|
|
2175
|
+
var getCrmRelationshipTypesById = (options) => (options.client ?? client).get({
|
|
2176
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2177
|
+
url: "/crm/relationship-types/{id}",
|
|
2178
|
+
...options
|
|
2179
|
+
});
|
|
2180
|
+
var patchCrmRelationshipTypesById = (options) => (options.client ?? client).patch({
|
|
2181
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2182
|
+
url: "/crm/relationship-types/{id}",
|
|
2183
|
+
...options,
|
|
2184
|
+
headers: {
|
|
2185
|
+
"Content-Type": "application/vnd.api+json",
|
|
2186
|
+
...options.headers
|
|
2187
|
+
}
|
|
2188
|
+
});
|
|
2189
|
+
var deleteCrmContactsById = (options) => (options.client ?? client).delete({
|
|
2190
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2191
|
+
url: "/crm/contacts/{id}",
|
|
2192
|
+
...options
|
|
2193
|
+
});
|
|
2194
|
+
var getCrmContactsById = (options) => (options.client ?? client).get({
|
|
2195
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2196
|
+
url: "/crm/contacts/{id}",
|
|
2197
|
+
...options
|
|
2198
|
+
});
|
|
2199
|
+
var patchCrmContactsById = (options) => (options.client ?? client).patch({
|
|
2200
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2201
|
+
url: "/crm/contacts/{id}",
|
|
2202
|
+
...options,
|
|
2203
|
+
headers: {
|
|
2204
|
+
"Content-Type": "application/vnd.api+json",
|
|
2205
|
+
...options.headers
|
|
2206
|
+
}
|
|
2207
|
+
});
|
|
2208
|
+
var patchCrawlerJobsByIdCancel = (options) => (options.client ?? client).patch({
|
|
2209
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2210
|
+
url: "/crawler/jobs/{id}/cancel",
|
|
2211
|
+
...options,
|
|
2212
|
+
headers: {
|
|
2213
|
+
"Content-Type": "application/vnd.api+json",
|
|
2214
|
+
...options.headers
|
|
2215
|
+
}
|
|
2216
|
+
});
|
|
1881
2217
|
var postAgentVersionsByIdAddSystemField = (options) => (options.client ?? client).post({
|
|
1882
2218
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1883
2219
|
url: "/agent-versions/{id}/add-system-field",
|
|
@@ -1901,6 +2237,15 @@ var postThreadsByIdMessages = (options) => (options.client ?? client).post({
|
|
|
1901
2237
|
...options.headers
|
|
1902
2238
|
}
|
|
1903
2239
|
});
|
|
2240
|
+
var patchEmailMarketingGeneratedEmailsByIdApprove = (options) => (options.client ?? client).patch({
|
|
2241
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2242
|
+
url: "/email-marketing/generated-emails/{id}/approve",
|
|
2243
|
+
...options,
|
|
2244
|
+
headers: {
|
|
2245
|
+
"Content-Type": "application/vnd.api+json",
|
|
2246
|
+
...options.headers
|
|
2247
|
+
}
|
|
2248
|
+
});
|
|
1904
2249
|
var getCreditPackagesById = (options) => (options.client ?? client).get({
|
|
1905
2250
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1906
2251
|
url: "/credit-packages/{id}",
|
|
@@ -1963,6 +2308,11 @@ var postAgentsByIdValidate = (options) => (options.client ?? client).post({
|
|
|
1963
2308
|
...options.headers
|
|
1964
2309
|
}
|
|
1965
2310
|
});
|
|
2311
|
+
var getConnectorsCredentials = (options) => (options.client ?? client).get({
|
|
2312
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2313
|
+
url: "/connectors/credentials",
|
|
2314
|
+
...options
|
|
2315
|
+
});
|
|
1966
2316
|
var getUsersMe = (options) => (options.client ?? client).get({
|
|
1967
2317
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1968
2318
|
url: "/users/me",
|
|
@@ -1991,18 +2341,27 @@ var patchSchedulingParticipantsById = (options) => (options.client ?? client).pa
|
|
|
1991
2341
|
...options.headers
|
|
1992
2342
|
}
|
|
1993
2343
|
});
|
|
1994
|
-
var
|
|
2344
|
+
var patchEmailMarketingSequencesByIdResume = (options) => (options.client ?? client).patch({
|
|
1995
2345
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1996
|
-
url: "/
|
|
2346
|
+
url: "/email-marketing/sequences/{id}/resume",
|
|
1997
2347
|
...options,
|
|
1998
2348
|
headers: {
|
|
1999
2349
|
"Content-Type": "application/vnd.api+json",
|
|
2000
2350
|
...options.headers
|
|
2001
2351
|
}
|
|
2002
2352
|
});
|
|
2003
|
-
var
|
|
2353
|
+
var postTenantsByIdCredit = (options) => (options.client ?? client).post({
|
|
2004
2354
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2005
|
-
url: "/
|
|
2355
|
+
url: "/tenants/{id}/credit",
|
|
2356
|
+
...options,
|
|
2357
|
+
headers: {
|
|
2358
|
+
"Content-Type": "application/vnd.api+json",
|
|
2359
|
+
...options.headers
|
|
2360
|
+
}
|
|
2361
|
+
});
|
|
2362
|
+
var patchSchedulingBookingsSchedulingBookingsByIdCancel = (options) => (options.client ?? client).patch({
|
|
2363
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2364
|
+
url: "/scheduling/bookings/scheduling/bookings/{id}/cancel",
|
|
2006
2365
|
...options,
|
|
2007
2366
|
headers: {
|
|
2008
2367
|
"Content-Type": "application/vnd.api+json",
|
|
@@ -2075,6 +2434,21 @@ var patchExtractionDocumentsByIdFinishUpload = (options) => (options.client ?? c
|
|
|
2075
2434
|
...options.headers
|
|
2076
2435
|
}
|
|
2077
2436
|
});
|
|
2437
|
+
var deleteCrawlerJobsById = (options) => (options.client ?? client).delete({
|
|
2438
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2439
|
+
url: "/crawler/jobs/{id}",
|
|
2440
|
+
...options
|
|
2441
|
+
});
|
|
2442
|
+
var getCrawlerJobsById = (options) => (options.client ?? client).get({
|
|
2443
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2444
|
+
url: "/crawler/jobs/{id}",
|
|
2445
|
+
...options
|
|
2446
|
+
});
|
|
2447
|
+
var getCrmExportsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2448
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2449
|
+
url: "/crm/exports/workspace/{workspace_id}",
|
|
2450
|
+
...options
|
|
2451
|
+
});
|
|
2078
2452
|
var getTrainingSessionsAgentsByAgentIdSessions = (options) => (options.client ?? client).get({
|
|
2079
2453
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2080
2454
|
url: "/training-sessions/agents/{agent_id}/sessions",
|
|
@@ -2155,6 +2529,30 @@ var postNotificationPreferences = (options) => (options.client ?? client).post({
|
|
|
2155
2529
|
...options.headers
|
|
2156
2530
|
}
|
|
2157
2531
|
});
|
|
2532
|
+
var deleteCrmPipelineStagesById = (options) => (options.client ?? client).delete({
|
|
2533
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2534
|
+
url: "/crm/pipeline-stages/{id}",
|
|
2535
|
+
...options
|
|
2536
|
+
});
|
|
2537
|
+
var getCrmPipelineStagesById = (options) => (options.client ?? client).get({
|
|
2538
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2539
|
+
url: "/crm/pipeline-stages/{id}",
|
|
2540
|
+
...options
|
|
2541
|
+
});
|
|
2542
|
+
var patchCrmPipelineStagesById = (options) => (options.client ?? client).patch({
|
|
2543
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2544
|
+
url: "/crm/pipeline-stages/{id}",
|
|
2545
|
+
...options,
|
|
2546
|
+
headers: {
|
|
2547
|
+
"Content-Type": "application/vnd.api+json",
|
|
2548
|
+
...options.headers
|
|
2549
|
+
}
|
|
2550
|
+
});
|
|
2551
|
+
var getCrmPipelinesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2552
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2553
|
+
url: "/crm/pipelines/workspace/{workspace_id}",
|
|
2554
|
+
...options
|
|
2555
|
+
});
|
|
2158
2556
|
var patchSchedulingCalendarSyncsSchedulingCalendarSyncsByIdPause = (options) => (options.client ?? client).patch({
|
|
2159
2557
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2160
2558
|
url: "/scheduling/calendar-syncs/scheduling/calendar-syncs/{id}/pause",
|
|
@@ -2225,6 +2623,39 @@ var postWatcherClaims = (options) => (options.client ?? client).post({
|
|
|
2225
2623
|
...options.headers
|
|
2226
2624
|
}
|
|
2227
2625
|
});
|
|
2626
|
+
var getCrawlerJobs = (options) => (options.client ?? client).get({
|
|
2627
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2628
|
+
url: "/crawler/jobs",
|
|
2629
|
+
...options
|
|
2630
|
+
});
|
|
2631
|
+
var postCrawlerJobs = (options) => (options.client ?? client).post({
|
|
2632
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2633
|
+
url: "/crawler/jobs",
|
|
2634
|
+
...options,
|
|
2635
|
+
headers: {
|
|
2636
|
+
"Content-Type": "application/vnd.api+json",
|
|
2637
|
+
...options.headers
|
|
2638
|
+
}
|
|
2639
|
+
});
|
|
2640
|
+
var deleteCrmCompaniesById = (options) => (options.client ?? client).delete({
|
|
2641
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2642
|
+
url: "/crm/companies/{id}",
|
|
2643
|
+
...options
|
|
2644
|
+
});
|
|
2645
|
+
var getCrmCompaniesById = (options) => (options.client ?? client).get({
|
|
2646
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2647
|
+
url: "/crm/companies/{id}",
|
|
2648
|
+
...options
|
|
2649
|
+
});
|
|
2650
|
+
var patchCrmCompaniesById = (options) => (options.client ?? client).patch({
|
|
2651
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2652
|
+
url: "/crm/companies/{id}",
|
|
2653
|
+
...options,
|
|
2654
|
+
headers: {
|
|
2655
|
+
"Content-Type": "application/vnd.api+json",
|
|
2656
|
+
...options.headers
|
|
2657
|
+
}
|
|
2658
|
+
});
|
|
2228
2659
|
var patchSchedulingBookingsSchedulingBookingsByIdReschedule = (options) => (options.client ?? client).patch({
|
|
2229
2660
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2230
2661
|
url: "/scheduling/bookings/scheduling/bookings/{id}/reschedule",
|
|
@@ -2297,6 +2728,15 @@ var postUsersRegisterIsv = (options) => (options.client ?? client).post({
|
|
|
2297
2728
|
...options.headers
|
|
2298
2729
|
}
|
|
2299
2730
|
});
|
|
2731
|
+
var postCrmPipelines = (options) => (options.client ?? client).post({
|
|
2732
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2733
|
+
url: "/crm/pipelines",
|
|
2734
|
+
...options,
|
|
2735
|
+
headers: {
|
|
2736
|
+
"Content-Type": "application/vnd.api+json",
|
|
2737
|
+
...options.headers
|
|
2738
|
+
}
|
|
2739
|
+
});
|
|
2300
2740
|
var getExtractionResultsDocumentByDocumentId = (options) => (options.client ?? client).get({
|
|
2301
2741
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2302
2742
|
url: "/extraction/results/document/{document_id}",
|
|
@@ -2321,6 +2761,20 @@ var getWorkspacesById = (options) => (options.client ?? client).get({
|
|
|
2321
2761
|
url: "/workspaces/{id}",
|
|
2322
2762
|
...options
|
|
2323
2763
|
});
|
|
2764
|
+
var getCrawlerSchedules = (options) => (options.client ?? client).get({
|
|
2765
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2766
|
+
url: "/crawler/schedules",
|
|
2767
|
+
...options
|
|
2768
|
+
});
|
|
2769
|
+
var postCrawlerSchedules = (options) => (options.client ?? client).post({
|
|
2770
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2771
|
+
url: "/crawler/schedules",
|
|
2772
|
+
...options,
|
|
2773
|
+
headers: {
|
|
2774
|
+
"Content-Type": "application/vnd.api+json",
|
|
2775
|
+
...options.headers
|
|
2776
|
+
}
|
|
2777
|
+
});
|
|
2324
2778
|
var postWebhookConfigsBulkDisable = (options) => (options.client ?? client).post({
|
|
2325
2779
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2326
2780
|
url: "/webhook-configs/bulk-disable",
|
|
@@ -2423,6 +2877,15 @@ var postWorkspacesByWorkspaceIdExtractionByDocumentIdMapping = (options) => (opt
|
|
|
2423
2877
|
...options.headers
|
|
2424
2878
|
}
|
|
2425
2879
|
});
|
|
2880
|
+
var postConnectorsFullscriptCheckPatient = (options) => (options.client ?? client).post({
|
|
2881
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2882
|
+
url: "/connectors/fullscript/check-patient",
|
|
2883
|
+
...options,
|
|
2884
|
+
headers: {
|
|
2885
|
+
"Content-Type": "application/vnd.api+json",
|
|
2886
|
+
...options.headers
|
|
2887
|
+
}
|
|
2888
|
+
});
|
|
2426
2889
|
var getSchedulingEventTypes = (options) => (options.client ?? client).get({
|
|
2427
2890
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2428
2891
|
url: "/scheduling/event-types",
|
|
@@ -2437,6 +2900,25 @@ var postSchedulingEventTypes = (options) => (options.client ?? client).post({
|
|
|
2437
2900
|
...options.headers
|
|
2438
2901
|
}
|
|
2439
2902
|
});
|
|
2903
|
+
var deleteCrmPipelinesById = (options) => (options.client ?? client).delete({
|
|
2904
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2905
|
+
url: "/crm/pipelines/{id}",
|
|
2906
|
+
...options
|
|
2907
|
+
});
|
|
2908
|
+
var getCrmPipelinesById = (options) => (options.client ?? client).get({
|
|
2909
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2910
|
+
url: "/crm/pipelines/{id}",
|
|
2911
|
+
...options
|
|
2912
|
+
});
|
|
2913
|
+
var patchCrmPipelinesById = (options) => (options.client ?? client).patch({
|
|
2914
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2915
|
+
url: "/crm/pipelines/{id}",
|
|
2916
|
+
...options,
|
|
2917
|
+
headers: {
|
|
2918
|
+
"Content-Type": "application/vnd.api+json",
|
|
2919
|
+
...options.headers
|
|
2920
|
+
}
|
|
2921
|
+
});
|
|
2440
2922
|
var getPlansById = (options) => (options.client ?? client).get({
|
|
2441
2923
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2442
2924
|
url: "/plans/{id}",
|
|
@@ -2479,6 +2961,16 @@ var postTenantsByIdSchedulePurge = (options) => (options.client ?? client).post(
|
|
|
2479
2961
|
...options.headers
|
|
2480
2962
|
}
|
|
2481
2963
|
});
|
|
2964
|
+
var deleteCrmActivitiesById = (options) => (options.client ?? client).delete({
|
|
2965
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2966
|
+
url: "/crm/activities/{id}",
|
|
2967
|
+
...options
|
|
2968
|
+
});
|
|
2969
|
+
var getCrmActivitiesById = (options) => (options.client ?? client).get({
|
|
2970
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2971
|
+
url: "/crm/activities/{id}",
|
|
2972
|
+
...options
|
|
2973
|
+
});
|
|
2482
2974
|
var getUserProfiles = (options) => (options.client ?? client).get({
|
|
2483
2975
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2484
2976
|
url: "/user-profiles",
|
|
@@ -2600,6 +3092,15 @@ var getTransactions = (options) => (options.client ?? client).get({
|
|
|
2600
3092
|
url: "/transactions",
|
|
2601
3093
|
...options
|
|
2602
3094
|
});
|
|
3095
|
+
var postConnectorsOauthInitiate = (options) => (options.client ?? client).post({
|
|
3096
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3097
|
+
url: "/connectors/oauth/initiate",
|
|
3098
|
+
...options,
|
|
3099
|
+
headers: {
|
|
3100
|
+
"Content-Type": "application/vnd.api+json",
|
|
3101
|
+
...options.headers
|
|
3102
|
+
}
|
|
3103
|
+
});
|
|
2603
3104
|
var postSearchSavedByIdRun = (options) => (options.client ?? client).post({
|
|
2604
3105
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2605
3106
|
url: "/search/saved/{id}/run",
|
|
@@ -2742,6 +3243,25 @@ var patchSchedulingEventsById = (options) => (options.client ?? client).patch({
|
|
|
2742
3243
|
...options.headers
|
|
2743
3244
|
}
|
|
2744
3245
|
});
|
|
3246
|
+
var deleteConnectorsById = (options) => (options.client ?? client).delete({
|
|
3247
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3248
|
+
url: "/connectors/{id}",
|
|
3249
|
+
...options
|
|
3250
|
+
});
|
|
3251
|
+
var getConnectorsById = (options) => (options.client ?? client).get({
|
|
3252
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3253
|
+
url: "/connectors/{id}",
|
|
3254
|
+
...options
|
|
3255
|
+
});
|
|
3256
|
+
var patchConnectorsById = (options) => (options.client ?? client).patch({
|
|
3257
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3258
|
+
url: "/connectors/{id}",
|
|
3259
|
+
...options,
|
|
3260
|
+
headers: {
|
|
3261
|
+
"Content-Type": "application/vnd.api+json",
|
|
3262
|
+
...options.headers
|
|
3263
|
+
}
|
|
3264
|
+
});
|
|
2745
3265
|
var getWorkspaceMemberships = (options) => (options.client ?? client).get({
|
|
2746
3266
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2747
3267
|
url: "/workspace-memberships",
|
|
@@ -2884,6 +3404,15 @@ var getPlans = (options) => (options.client ?? client).get({
|
|
|
2884
3404
|
url: "/plans",
|
|
2885
3405
|
...options
|
|
2886
3406
|
});
|
|
3407
|
+
var postCrmActivities = (options) => (options.client ?? client).post({
|
|
3408
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3409
|
+
url: "/crm/activities",
|
|
3410
|
+
...options,
|
|
3411
|
+
headers: {
|
|
3412
|
+
"Content-Type": "application/vnd.api+json",
|
|
3413
|
+
...options.headers
|
|
3414
|
+
}
|
|
3415
|
+
});
|
|
2887
3416
|
var getSchedulingEvents = (options) => (options.client ?? client).get({
|
|
2888
3417
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2889
3418
|
url: "/scheduling/events",
|
|
@@ -2926,6 +3455,11 @@ var getExtractionDocuments = (options) => (options.client ?? client).get({
|
|
|
2926
3455
|
url: "/extraction/documents",
|
|
2927
3456
|
...options
|
|
2928
3457
|
});
|
|
3458
|
+
var getCrmDealsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3459
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3460
|
+
url: "/crm/deals/workspace/{workspace_id}",
|
|
3461
|
+
...options
|
|
3462
|
+
});
|
|
2929
3463
|
var patchExtractionResultsByIdSaveCorrections = (options) => (options.client ?? client).patch({
|
|
2930
3464
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2931
3465
|
url: "/extraction/results/{id}/save-corrections",
|
|
@@ -2944,6 +3478,11 @@ var postUsersAuthResendConfirmation = (options) => (options.client ?? client).po
|
|
|
2944
3478
|
...options.headers
|
|
2945
3479
|
}
|
|
2946
3480
|
});
|
|
3481
|
+
var getCrawlerResultsById = (options) => (options.client ?? client).get({
|
|
3482
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3483
|
+
url: "/crawler/results/{id}",
|
|
3484
|
+
...options
|
|
3485
|
+
});
|
|
2947
3486
|
var getAiMessages = (options) => (options.client ?? client).get({
|
|
2948
3487
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2949
3488
|
url: "/ai/messages",
|
|
@@ -2972,6 +3511,15 @@ var postWatcherEvents = (options) => (options.client ?? client).post({
|
|
|
2972
3511
|
...options.headers
|
|
2973
3512
|
}
|
|
2974
3513
|
});
|
|
3514
|
+
var postConnectorsOauthCallback = (options) => (options.client ?? client).post({
|
|
3515
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3516
|
+
url: "/connectors/oauth/callback",
|
|
3517
|
+
...options,
|
|
3518
|
+
headers: {
|
|
3519
|
+
"Content-Type": "application/vnd.api+json",
|
|
3520
|
+
...options.headers
|
|
3521
|
+
}
|
|
3522
|
+
});
|
|
2975
3523
|
var postAgentVersionsByIdSetSystemFields = (options) => (options.client ?? client).post({
|
|
2976
3524
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2977
3525
|
url: "/agent-versions/{id}/set-system-fields",
|
|
@@ -3051,6 +3599,39 @@ var getWallet = (options) => (options.client ?? client).get({
|
|
|
3051
3599
|
url: "/wallet",
|
|
3052
3600
|
...options
|
|
3053
3601
|
});
|
|
3602
|
+
var deleteCrawlerSchedulesById = (options) => (options.client ?? client).delete({
|
|
3603
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3604
|
+
url: "/crawler/schedules/{id}",
|
|
3605
|
+
...options
|
|
3606
|
+
});
|
|
3607
|
+
var getCrawlerSchedulesById = (options) => (options.client ?? client).get({
|
|
3608
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3609
|
+
url: "/crawler/schedules/{id}",
|
|
3610
|
+
...options
|
|
3611
|
+
});
|
|
3612
|
+
var patchCrawlerSchedulesById = (options) => (options.client ?? client).patch({
|
|
3613
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3614
|
+
url: "/crawler/schedules/{id}",
|
|
3615
|
+
...options,
|
|
3616
|
+
headers: {
|
|
3617
|
+
"Content-Type": "application/vnd.api+json",
|
|
3618
|
+
...options.headers
|
|
3619
|
+
}
|
|
3620
|
+
});
|
|
3621
|
+
var postCrmDeals = (options) => (options.client ?? client).post({
|
|
3622
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3623
|
+
url: "/crm/deals",
|
|
3624
|
+
...options,
|
|
3625
|
+
headers: {
|
|
3626
|
+
"Content-Type": "application/vnd.api+json",
|
|
3627
|
+
...options.headers
|
|
3628
|
+
}
|
|
3629
|
+
});
|
|
3630
|
+
var getCrmActivitiesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3631
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3632
|
+
url: "/crm/activities/workspace/{workspace_id}",
|
|
3633
|
+
...options
|
|
3634
|
+
});
|
|
3054
3635
|
var getAgents = (options) => (options.client ?? client).get({
|
|
3055
3636
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3056
3637
|
url: "/agents",
|
|
@@ -3070,6 +3651,20 @@ var getApplicationsByApplicationIdEmailTemplatesBySlug = (options) => (options.c
|
|
|
3070
3651
|
url: "/applications/{application_id}/email-templates/{slug}",
|
|
3071
3652
|
...options
|
|
3072
3653
|
});
|
|
3654
|
+
var getConnectors = (options) => (options.client ?? client).get({
|
|
3655
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3656
|
+
url: "/connectors",
|
|
3657
|
+
...options
|
|
3658
|
+
});
|
|
3659
|
+
var postConnectors = (options) => (options.client ?? client).post({
|
|
3660
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3661
|
+
url: "/connectors",
|
|
3662
|
+
...options,
|
|
3663
|
+
headers: {
|
|
3664
|
+
"Content-Type": "application/vnd.api+json",
|
|
3665
|
+
...options.headers
|
|
3666
|
+
}
|
|
3667
|
+
});
|
|
3073
3668
|
var postAgentsByIdExport = (options) => (options.client ?? client).post({
|
|
3074
3669
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3075
3670
|
url: "/agents/{id}/export",
|
|
@@ -3122,16 +3717,44 @@ var postTrainingExamplesBulkDelete = (options) => (options.client ?? client).pos
|
|
|
3122
3717
|
...options.headers
|
|
3123
3718
|
}
|
|
3124
3719
|
});
|
|
3720
|
+
var getCrmRelationshipsWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3721
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3722
|
+
url: "/crm/relationships/workspace/{workspace_id}",
|
|
3723
|
+
...options
|
|
3724
|
+
});
|
|
3725
|
+
var getCrmCompaniesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
3726
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3727
|
+
url: "/crm/companies/workspace/{workspace_id}",
|
|
3728
|
+
...options
|
|
3729
|
+
});
|
|
3125
3730
|
var getCreditPackages = (options) => (options.client ?? client).get({
|
|
3126
3731
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3127
3732
|
url: "/credit-packages",
|
|
3128
3733
|
...options
|
|
3129
3734
|
});
|
|
3735
|
+
var postCrmPipelineStages = (options) => (options.client ?? client).post({
|
|
3736
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3737
|
+
url: "/crm/pipeline-stages",
|
|
3738
|
+
...options,
|
|
3739
|
+
headers: {
|
|
3740
|
+
"Content-Type": "application/vnd.api+json",
|
|
3741
|
+
...options.headers
|
|
3742
|
+
}
|
|
3743
|
+
});
|
|
3130
3744
|
var getUsers = (options) => (options.client ?? client).get({
|
|
3131
3745
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3132
3746
|
url: "/users",
|
|
3133
3747
|
...options
|
|
3134
3748
|
});
|
|
3749
|
+
var postCrmExports = (options) => (options.client ?? client).post({
|
|
3750
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3751
|
+
url: "/crm/exports",
|
|
3752
|
+
...options,
|
|
3753
|
+
headers: {
|
|
3754
|
+
"Content-Type": "application/vnd.api+json",
|
|
3755
|
+
...options.headers
|
|
3756
|
+
}
|
|
3757
|
+
});
|
|
3135
3758
|
|
|
3136
3759
|
// src/pagination.ts
|
|
3137
3760
|
var DEFAULT_MAX_PAGES = 500;
|
|
@@ -3585,219 +4208,1500 @@ function createBillingNamespace(rb) {
|
|
|
3585
4208
|
options
|
|
3586
4209
|
);
|
|
3587
4210
|
},
|
|
3588
|
-
listAll: async (options) => {
|
|
3589
|
-
return paginateToArray(
|
|
3590
|
-
rb.createPaginatedFetcher(
|
|
3591
|
-
getCreditPackages,
|
|
3592
|
-
(page, pageSize) => ({
|
|
3593
|
-
query: { page: { number: page, size: pageSize } }
|
|
3594
|
-
}),
|
|
3595
|
-
options
|
|
3596
|
-
)
|
|
4211
|
+
listAll: async (options) => {
|
|
4212
|
+
return paginateToArray(
|
|
4213
|
+
rb.createPaginatedFetcher(
|
|
4214
|
+
getCreditPackages,
|
|
4215
|
+
(page, pageSize) => ({
|
|
4216
|
+
query: { page: { number: page, size: pageSize } }
|
|
4217
|
+
}),
|
|
4218
|
+
options
|
|
4219
|
+
)
|
|
4220
|
+
);
|
|
4221
|
+
},
|
|
4222
|
+
get: async (id, options) => {
|
|
4223
|
+
return rb.execute(
|
|
4224
|
+
getCreditPackagesById,
|
|
4225
|
+
{ path: { id } },
|
|
4226
|
+
options
|
|
4227
|
+
);
|
|
4228
|
+
}
|
|
4229
|
+
},
|
|
4230
|
+
paymentMethods: {
|
|
4231
|
+
delete: async (id, options) => {
|
|
4232
|
+
return rb.executeDelete(
|
|
4233
|
+
deletePaymentMethodsById,
|
|
4234
|
+
{ path: { id } },
|
|
4235
|
+
options
|
|
4236
|
+
);
|
|
4237
|
+
},
|
|
4238
|
+
list: async (options) => {
|
|
4239
|
+
return rb.execute(
|
|
4240
|
+
getPaymentMethods,
|
|
4241
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4242
|
+
options
|
|
4243
|
+
);
|
|
4244
|
+
},
|
|
4245
|
+
listAll: async (options) => {
|
|
4246
|
+
return paginateToArray(
|
|
4247
|
+
rb.createPaginatedFetcher(
|
|
4248
|
+
getPaymentMethods,
|
|
4249
|
+
(page, pageSize) => ({
|
|
4250
|
+
query: { page: { number: page, size: pageSize } }
|
|
4251
|
+
}),
|
|
4252
|
+
options
|
|
4253
|
+
)
|
|
4254
|
+
);
|
|
4255
|
+
},
|
|
4256
|
+
create: async (attributes, options) => {
|
|
4257
|
+
return rb.execute(
|
|
4258
|
+
postPaymentMethods,
|
|
4259
|
+
{ body: { data: { type: "payment_method", attributes } } },
|
|
4260
|
+
options
|
|
4261
|
+
);
|
|
4262
|
+
},
|
|
4263
|
+
update: async (id, attributes, options) => {
|
|
4264
|
+
return rb.execute(
|
|
4265
|
+
patchPaymentMethodsById,
|
|
4266
|
+
{
|
|
4267
|
+
path: { id },
|
|
4268
|
+
body: { data: { id, type: "payment_method", attributes } }
|
|
4269
|
+
},
|
|
4270
|
+
options
|
|
4271
|
+
);
|
|
4272
|
+
},
|
|
4273
|
+
get: async (id, options) => {
|
|
4274
|
+
return rb.execute(
|
|
4275
|
+
getPaymentMethodsById,
|
|
4276
|
+
{ path: { id } },
|
|
4277
|
+
options
|
|
4278
|
+
);
|
|
4279
|
+
}
|
|
4280
|
+
}
|
|
4281
|
+
};
|
|
4282
|
+
}
|
|
4283
|
+
|
|
4284
|
+
// src/namespaces/catalog.ts
|
|
4285
|
+
function createCatalogNamespace(_rb) {
|
|
4286
|
+
return {
|
|
4287
|
+
/**
|
|
4288
|
+
* Products — product catalog management
|
|
4289
|
+
*/
|
|
4290
|
+
products: {
|
|
4291
|
+
/** List products with pagination */
|
|
4292
|
+
list: async (_options) => {
|
|
4293
|
+
throw new Error("Product list not yet implemented in SDK");
|
|
4294
|
+
},
|
|
4295
|
+
/** Get a product by ID */
|
|
4296
|
+
get: async (_id, _options) => {
|
|
4297
|
+
throw new Error("Product get not yet implemented in SDK");
|
|
4298
|
+
},
|
|
4299
|
+
/** Create a new product */
|
|
4300
|
+
create: async (_attributes, _options) => {
|
|
4301
|
+
throw new Error("Product create not yet implemented in SDK");
|
|
4302
|
+
},
|
|
4303
|
+
/** Update a product */
|
|
4304
|
+
update: async (_id, _attributes, _options) => {
|
|
4305
|
+
throw new Error("Product update not yet implemented in SDK");
|
|
4306
|
+
}
|
|
4307
|
+
},
|
|
4308
|
+
/**
|
|
4309
|
+
* Variants — product variants (SKUs)
|
|
4310
|
+
*/
|
|
4311
|
+
variants: {
|
|
4312
|
+
/** List variants for a product */
|
|
4313
|
+
listByProduct: async (_productId, _options) => {
|
|
4314
|
+
throw new Error("Variant list not yet implemented in SDK");
|
|
4315
|
+
}
|
|
4316
|
+
},
|
|
4317
|
+
/**
|
|
4318
|
+
* Taxonomy — product categories and classification
|
|
4319
|
+
*/
|
|
4320
|
+
taxonomies: {
|
|
4321
|
+
/** List taxonomies */
|
|
4322
|
+
list: async (_options) => {
|
|
4323
|
+
throw new Error("Taxonomy list not yet implemented in SDK");
|
|
4324
|
+
},
|
|
4325
|
+
/** Get taxonomy nodes */
|
|
4326
|
+
getNodes: async (_taxonomyId, _options) => {
|
|
4327
|
+
throw new Error("Taxonomy nodes not yet implemented in SDK");
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4330
|
+
};
|
|
4331
|
+
}
|
|
4332
|
+
|
|
4333
|
+
// src/namespaces/channels.ts
|
|
4334
|
+
function createChannelsNamespace(_rb) {
|
|
4335
|
+
return {
|
|
4336
|
+
/**
|
|
4337
|
+
* Channel Config — configuration for messaging channels
|
|
4338
|
+
*/
|
|
4339
|
+
configs: {
|
|
4340
|
+
/** List channel configurations */
|
|
4341
|
+
list: async (_options) => {
|
|
4342
|
+
throw new Error("Channel configs list not yet implemented in SDK");
|
|
4343
|
+
},
|
|
4344
|
+
/** Get a channel config by ID */
|
|
4345
|
+
get: async (_id, _options) => {
|
|
4346
|
+
throw new Error("Channel config get not yet implemented in SDK");
|
|
4347
|
+
}
|
|
4348
|
+
},
|
|
4349
|
+
/**
|
|
4350
|
+
* Messages — inbound and outbound message handling
|
|
4351
|
+
*/
|
|
4352
|
+
messages: {
|
|
4353
|
+
/** Send a message through a channel */
|
|
4354
|
+
send: async (_attributes, _options) => {
|
|
4355
|
+
throw new Error("Message send not yet implemented in SDK");
|
|
4356
|
+
},
|
|
4357
|
+
/** List inbound messages */
|
|
4358
|
+
listInbound: async (_options) => {
|
|
4359
|
+
throw new Error("Inbound messages list not yet implemented in SDK");
|
|
4360
|
+
}
|
|
4361
|
+
}
|
|
4362
|
+
};
|
|
4363
|
+
}
|
|
4364
|
+
|
|
4365
|
+
// src/namespaces/communication.ts
|
|
4366
|
+
function createCommunicationNamespace(rb) {
|
|
4367
|
+
return {
|
|
4368
|
+
notifications: {
|
|
4369
|
+
/** List notification logs (alias for list) */
|
|
4370
|
+
logs: async (options) => {
|
|
4371
|
+
return rb.execute(
|
|
4372
|
+
getNotificationLogs,
|
|
4373
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4374
|
+
options
|
|
4375
|
+
);
|
|
4376
|
+
},
|
|
4377
|
+
list: async (options) => {
|
|
4378
|
+
return rb.execute(
|
|
4379
|
+
getNotificationLogs,
|
|
4380
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4381
|
+
options
|
|
4382
|
+
);
|
|
4383
|
+
},
|
|
4384
|
+
listAll: async (options) => {
|
|
4385
|
+
return paginateToArray(
|
|
4386
|
+
rb.createPaginatedFetcher(
|
|
4387
|
+
getNotificationLogs,
|
|
4388
|
+
(page, pageSize) => ({
|
|
4389
|
+
query: { page: { number: page, size: pageSize } }
|
|
4390
|
+
}),
|
|
4391
|
+
options
|
|
4392
|
+
)
|
|
4393
|
+
);
|
|
4394
|
+
},
|
|
4395
|
+
get: async (id, options) => {
|
|
4396
|
+
return rb.execute(
|
|
4397
|
+
getNotificationLogsById,
|
|
4398
|
+
{ path: { id } },
|
|
4399
|
+
options
|
|
4400
|
+
);
|
|
4401
|
+
},
|
|
4402
|
+
methods: {
|
|
4403
|
+
delete: async (id, options) => {
|
|
4404
|
+
return rb.executeDelete(
|
|
4405
|
+
deleteNotificationMethodsById,
|
|
4406
|
+
{ path: { id } },
|
|
4407
|
+
options
|
|
4408
|
+
);
|
|
4409
|
+
},
|
|
4410
|
+
list: async (options) => {
|
|
4411
|
+
return rb.execute(
|
|
4412
|
+
getNotificationMethods,
|
|
4413
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4414
|
+
options
|
|
4415
|
+
);
|
|
4416
|
+
},
|
|
4417
|
+
listAll: async (options) => {
|
|
4418
|
+
return paginateToArray(
|
|
4419
|
+
rb.createPaginatedFetcher(
|
|
4420
|
+
getNotificationMethods,
|
|
4421
|
+
(page, pageSize) => ({
|
|
4422
|
+
query: { page: { number: page, size: pageSize } }
|
|
4423
|
+
}),
|
|
4424
|
+
options
|
|
4425
|
+
)
|
|
4426
|
+
);
|
|
4427
|
+
},
|
|
4428
|
+
create: async (attributes, options) => {
|
|
4429
|
+
return rb.execute(
|
|
4430
|
+
postNotificationMethods,
|
|
4431
|
+
{ body: { data: { type: "notification_method", attributes } } },
|
|
4432
|
+
options
|
|
4433
|
+
);
|
|
4434
|
+
},
|
|
4435
|
+
update: async (id, attributes, options) => {
|
|
4436
|
+
return rb.execute(
|
|
4437
|
+
patchNotificationMethodsById,
|
|
4438
|
+
{
|
|
4439
|
+
path: { id },
|
|
4440
|
+
body: { data: { id, type: "notification_method", attributes } }
|
|
4441
|
+
},
|
|
4442
|
+
options
|
|
4443
|
+
);
|
|
4444
|
+
},
|
|
4445
|
+
get: async (id, options) => {
|
|
4446
|
+
return rb.execute(
|
|
4447
|
+
getNotificationMethodsById,
|
|
4448
|
+
{ path: { id } },
|
|
4449
|
+
options
|
|
4450
|
+
);
|
|
4451
|
+
}
|
|
4452
|
+
},
|
|
4453
|
+
preferences: {
|
|
4454
|
+
delete: async (id, options) => {
|
|
4455
|
+
return rb.executeDelete(
|
|
4456
|
+
deleteNotificationPreferencesById,
|
|
4457
|
+
{ path: { id } },
|
|
4458
|
+
options
|
|
4459
|
+
);
|
|
4460
|
+
},
|
|
4461
|
+
list: async (options) => {
|
|
4462
|
+
return rb.execute(
|
|
4463
|
+
getNotificationPreferences,
|
|
4464
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4465
|
+
options
|
|
4466
|
+
);
|
|
4467
|
+
},
|
|
4468
|
+
listAll: async (options) => {
|
|
4469
|
+
return paginateToArray(
|
|
4470
|
+
rb.createPaginatedFetcher(
|
|
4471
|
+
getNotificationPreferences,
|
|
4472
|
+
(page, pageSize) => ({
|
|
4473
|
+
query: { page: { number: page, size: pageSize } }
|
|
4474
|
+
}),
|
|
4475
|
+
options
|
|
4476
|
+
)
|
|
4477
|
+
);
|
|
4478
|
+
},
|
|
4479
|
+
create: async (attributes, options) => {
|
|
4480
|
+
return rb.execute(
|
|
4481
|
+
postNotificationPreferences,
|
|
4482
|
+
{ body: { data: { type: "notification_preference", attributes } } },
|
|
4483
|
+
options
|
|
4484
|
+
);
|
|
4485
|
+
},
|
|
4486
|
+
update: async (id, attributes, options) => {
|
|
4487
|
+
return rb.execute(
|
|
4488
|
+
patchNotificationPreferencesById,
|
|
4489
|
+
{
|
|
4490
|
+
path: { id },
|
|
4491
|
+
body: {
|
|
4492
|
+
data: { id, type: "notification_preference", attributes }
|
|
4493
|
+
}
|
|
4494
|
+
},
|
|
4495
|
+
options
|
|
4496
|
+
);
|
|
4497
|
+
},
|
|
4498
|
+
get: async (id, options) => {
|
|
4499
|
+
return rb.execute(
|
|
4500
|
+
getNotificationPreferencesById,
|
|
4501
|
+
{ path: { id } },
|
|
4502
|
+
options
|
|
4503
|
+
);
|
|
4504
|
+
}
|
|
4505
|
+
}
|
|
4506
|
+
}
|
|
4507
|
+
};
|
|
4508
|
+
}
|
|
4509
|
+
|
|
4510
|
+
// src/namespaces/connectors.ts
|
|
4511
|
+
function createConnectorsNamespace(rb) {
|
|
4512
|
+
return {
|
|
4513
|
+
/**
|
|
4514
|
+
* Connector Instances — configured external system connections
|
|
4515
|
+
*/
|
|
4516
|
+
instances: {
|
|
4517
|
+
/** List connector instances for the current workspace */
|
|
4518
|
+
list: async (options) => rb.execute(getConnectors, {}, options),
|
|
4519
|
+
/** Get a connector instance by ID */
|
|
4520
|
+
get: async (id, options) => rb.execute(
|
|
4521
|
+
getConnectorsById,
|
|
4522
|
+
{ path: { id } },
|
|
4523
|
+
options
|
|
4524
|
+
),
|
|
4525
|
+
/** Create a new connector instance */
|
|
4526
|
+
create: async (attributes, options) => rb.execute(
|
|
4527
|
+
postConnectors,
|
|
4528
|
+
{ body: { data: { type: "connector_instance", attributes } } },
|
|
4529
|
+
options
|
|
4530
|
+
),
|
|
4531
|
+
/** Update a connector instance */
|
|
4532
|
+
update: async (id, attributes, options) => rb.execute(
|
|
4533
|
+
patchConnectorsById,
|
|
4534
|
+
{
|
|
4535
|
+
path: { id },
|
|
4536
|
+
body: { data: { type: "connector_instance", id, attributes } }
|
|
4537
|
+
},
|
|
4538
|
+
options
|
|
4539
|
+
),
|
|
4540
|
+
/** Delete a connector instance */
|
|
4541
|
+
delete: async (id, options) => rb.executeDelete(deleteConnectorsById, { path: { id } }, options)
|
|
4542
|
+
},
|
|
4543
|
+
/**
|
|
4544
|
+
* Credentials — OAuth tokens and API keys for external systems
|
|
4545
|
+
*/
|
|
4546
|
+
credentials: {
|
|
4547
|
+
/** List credentials for the current workspace */
|
|
4548
|
+
list: async (options) => rb.execute(getConnectorsCredentials, {}, options),
|
|
4549
|
+
/** Get a credential by ID */
|
|
4550
|
+
get: async (id, options) => rb.execute(
|
|
4551
|
+
getConnectorsCredentialsById,
|
|
4552
|
+
{ path: { id } },
|
|
4553
|
+
options
|
|
4554
|
+
),
|
|
4555
|
+
/** Refresh an OAuth credential */
|
|
4556
|
+
refresh: async (id, options) => rb.execute(
|
|
4557
|
+
postConnectorsCredentialsByIdRefresh,
|
|
4558
|
+
{ path: { id }, body: { data: {} } },
|
|
4559
|
+
options
|
|
4560
|
+
)
|
|
4561
|
+
},
|
|
4562
|
+
/**
|
|
4563
|
+
* OAuth — initiate and complete connector OAuth flows
|
|
4564
|
+
*/
|
|
4565
|
+
oauth: {
|
|
4566
|
+
/**
|
|
4567
|
+
* Get the OAuth authorization URL for a connector type.
|
|
4568
|
+
* Returns the URL to redirect the user to for authorization.
|
|
4569
|
+
*/
|
|
4570
|
+
connect: async (connectorType, workspaceId, options) => rb.execute(
|
|
4571
|
+
postConnectorsOauthInitiate,
|
|
4572
|
+
{
|
|
4573
|
+
body: {
|
|
4574
|
+
data: {
|
|
4575
|
+
type: "connector_instance",
|
|
4576
|
+
attributes: {
|
|
4577
|
+
connector_type: connectorType,
|
|
4578
|
+
workspace_id: workspaceId
|
|
4579
|
+
}
|
|
4580
|
+
}
|
|
4581
|
+
}
|
|
4582
|
+
},
|
|
4583
|
+
options
|
|
4584
|
+
),
|
|
4585
|
+
/**
|
|
4586
|
+
* Exchange OAuth authorization code for a credential.
|
|
4587
|
+
* Called from the redirect handler after the user authorizes in the provider.
|
|
4588
|
+
*/
|
|
4589
|
+
callback: async (connectorType, code, state, workspaceId, options) => rb.execute(
|
|
4590
|
+
postConnectorsOauthCallback,
|
|
4591
|
+
{
|
|
4592
|
+
body: {
|
|
4593
|
+
data: {
|
|
4594
|
+
type: "connector_instance",
|
|
4595
|
+
attributes: {
|
|
4596
|
+
connector_type: connectorType,
|
|
4597
|
+
code,
|
|
4598
|
+
state,
|
|
4599
|
+
workspace_id: workspaceId
|
|
4600
|
+
}
|
|
4601
|
+
}
|
|
4602
|
+
}
|
|
4603
|
+
},
|
|
4604
|
+
options
|
|
4605
|
+
)
|
|
4606
|
+
},
|
|
4607
|
+
/**
|
|
4608
|
+
* Supported Connectors — discover available integrations
|
|
4609
|
+
*/
|
|
4610
|
+
available: {
|
|
4611
|
+
/** List all supported connector types */
|
|
4612
|
+
list: () => [
|
|
4613
|
+
"salesforce",
|
|
4614
|
+
"sharepoint",
|
|
4615
|
+
"microsoft_365",
|
|
4616
|
+
"outlook",
|
|
4617
|
+
"gmail",
|
|
4618
|
+
"slack",
|
|
4619
|
+
"hubspot",
|
|
4620
|
+
"notion",
|
|
4621
|
+
"jira",
|
|
4622
|
+
"confluence",
|
|
4623
|
+
"fullscript",
|
|
4624
|
+
"github",
|
|
4625
|
+
"gitlab",
|
|
4626
|
+
"google_calendar",
|
|
4627
|
+
"google_chat",
|
|
4628
|
+
"custom"
|
|
4629
|
+
]
|
|
4630
|
+
},
|
|
4631
|
+
/**
|
|
4632
|
+
* Fullscript — supplement prescribing platform integration.
|
|
4633
|
+
*
|
|
4634
|
+
* Requires a Fullscript connector instance and OAuth credential.
|
|
4635
|
+
* Use `connectors.oauth.connect("fullscript", workspaceId)` to authorize.
|
|
4636
|
+
*/
|
|
4637
|
+
fullscript: {
|
|
4638
|
+
/**
|
|
4639
|
+
* Check if a patient exists in Fullscript by email address.
|
|
4640
|
+
* Returns the patient if found, or null if not found.
|
|
4641
|
+
*/
|
|
4642
|
+
checkPatient: async (connectorId, workspaceId, email, options) => rb.execute(
|
|
4643
|
+
postConnectorsFullscriptCheckPatient,
|
|
4644
|
+
{
|
|
4645
|
+
body: {
|
|
4646
|
+
data: {
|
|
4647
|
+
type: "connector_instance",
|
|
4648
|
+
attributes: {
|
|
4649
|
+
connector_id: connectorId,
|
|
4650
|
+
workspace_id: workspaceId,
|
|
4651
|
+
email
|
|
4652
|
+
}
|
|
4653
|
+
}
|
|
4654
|
+
}
|
|
4655
|
+
},
|
|
4656
|
+
options
|
|
4657
|
+
),
|
|
4658
|
+
/**
|
|
4659
|
+
* Create a patient record in Fullscript.
|
|
4660
|
+
*/
|
|
4661
|
+
createPatient: async (connectorId, workspaceId, attrs, options) => rb.execute(
|
|
4662
|
+
postConnectorsFullscriptCreatePatient,
|
|
4663
|
+
{
|
|
4664
|
+
body: {
|
|
4665
|
+
data: {
|
|
4666
|
+
type: "connector_instance",
|
|
4667
|
+
attributes: {
|
|
4668
|
+
connector_id: connectorId,
|
|
4669
|
+
workspace_id: workspaceId,
|
|
4670
|
+
...attrs
|
|
4671
|
+
}
|
|
4672
|
+
}
|
|
4673
|
+
}
|
|
4674
|
+
},
|
|
4675
|
+
options
|
|
4676
|
+
),
|
|
4677
|
+
/**
|
|
4678
|
+
* Get an embed session grant token for the Fullscript prescribing widget.
|
|
4679
|
+
* Token is short-lived (5-15 minutes). Cached server-side for 2 minutes.
|
|
4680
|
+
*/
|
|
4681
|
+
sessionGrant: async (connectorId, workspaceId, patientId, options) => rb.execute(
|
|
4682
|
+
postConnectorsFullscriptSessionGrant,
|
|
4683
|
+
{
|
|
4684
|
+
body: {
|
|
4685
|
+
data: {
|
|
4686
|
+
type: "connector_instance",
|
|
4687
|
+
attributes: {
|
|
4688
|
+
connector_id: connectorId,
|
|
4689
|
+
workspace_id: workspaceId,
|
|
4690
|
+
patient_id: patientId
|
|
4691
|
+
}
|
|
4692
|
+
}
|
|
4693
|
+
}
|
|
4694
|
+
},
|
|
4695
|
+
options
|
|
4696
|
+
),
|
|
4697
|
+
oauth: {
|
|
4698
|
+
/** Get the Fullscript OAuth authorization URL */
|
|
4699
|
+
connect: async (workspaceId, options) => rb.execute(
|
|
4700
|
+
postConnectorsOauthInitiate,
|
|
4701
|
+
{
|
|
4702
|
+
body: {
|
|
4703
|
+
data: {
|
|
4704
|
+
type: "connector_instance",
|
|
4705
|
+
attributes: {
|
|
4706
|
+
connector_type: "fullscript",
|
|
4707
|
+
workspace_id: workspaceId
|
|
4708
|
+
}
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4711
|
+
},
|
|
4712
|
+
options
|
|
4713
|
+
),
|
|
4714
|
+
/** Exchange OAuth authorization code for Fullscript credential */
|
|
4715
|
+
callback: async (code, state, workspaceId, options) => rb.execute(
|
|
4716
|
+
postConnectorsOauthCallback,
|
|
4717
|
+
{
|
|
4718
|
+
body: {
|
|
4719
|
+
data: {
|
|
4720
|
+
type: "connector_instance",
|
|
4721
|
+
attributes: {
|
|
4722
|
+
connector_type: "fullscript",
|
|
4723
|
+
code,
|
|
4724
|
+
state,
|
|
4725
|
+
workspace_id: workspaceId
|
|
4726
|
+
}
|
|
4727
|
+
}
|
|
4728
|
+
}
|
|
4729
|
+
},
|
|
4730
|
+
options
|
|
4731
|
+
)
|
|
4732
|
+
}
|
|
4733
|
+
}
|
|
4734
|
+
};
|
|
4735
|
+
}
|
|
4736
|
+
|
|
4737
|
+
// src/namespaces/crawler.ts
|
|
4738
|
+
function createCrawlerNamespace(rb) {
|
|
4739
|
+
return {
|
|
4740
|
+
/**
|
|
4741
|
+
* Jobs — crawl job management
|
|
4742
|
+
*/
|
|
4743
|
+
jobs: {
|
|
4744
|
+
/** List crawl jobs with pagination */
|
|
4745
|
+
list: async (options) => {
|
|
4746
|
+
return rb.execute(
|
|
4747
|
+
getCrawlerJobs,
|
|
4748
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4749
|
+
options
|
|
4750
|
+
);
|
|
4751
|
+
},
|
|
4752
|
+
/** Get a crawl job by ID */
|
|
4753
|
+
get: async (id, options) => {
|
|
4754
|
+
return rb.execute(
|
|
4755
|
+
getCrawlerJobsById,
|
|
4756
|
+
{ path: { id } },
|
|
4757
|
+
options
|
|
4758
|
+
);
|
|
4759
|
+
},
|
|
4760
|
+
/** Start a new crawl job */
|
|
4761
|
+
create: async (attributes, options) => {
|
|
4762
|
+
return rb.execute(
|
|
4763
|
+
postCrawlerJobs,
|
|
4764
|
+
{
|
|
4765
|
+
body: { data: { type: "crawler_crawl_job", attributes } }
|
|
4766
|
+
},
|
|
4767
|
+
options
|
|
4768
|
+
);
|
|
4769
|
+
},
|
|
4770
|
+
/** Cancel a crawl job */
|
|
4771
|
+
cancel: async (id, options) => {
|
|
4772
|
+
return rb.execute(
|
|
4773
|
+
patchCrawlerJobsByIdCancel,
|
|
4774
|
+
{ path: { id }, body: {} },
|
|
4775
|
+
options
|
|
4776
|
+
);
|
|
4777
|
+
},
|
|
4778
|
+
/** Delete a crawl job */
|
|
4779
|
+
delete: async (id, options) => {
|
|
4780
|
+
return rb.executeDelete(
|
|
4781
|
+
deleteCrawlerJobsById,
|
|
4782
|
+
{ path: { id } },
|
|
4783
|
+
options
|
|
4784
|
+
);
|
|
4785
|
+
}
|
|
4786
|
+
},
|
|
4787
|
+
/**
|
|
4788
|
+
* Schedules — recurring crawl configurations
|
|
4789
|
+
*/
|
|
4790
|
+
schedules: {
|
|
4791
|
+
/** List crawl schedules */
|
|
4792
|
+
list: async (options) => {
|
|
4793
|
+
return rb.execute(getCrawlerSchedules, {}, options);
|
|
4794
|
+
},
|
|
4795
|
+
/** Get a schedule by ID */
|
|
4796
|
+
get: async (id, options) => {
|
|
4797
|
+
return rb.execute(
|
|
4798
|
+
getCrawlerSchedulesById,
|
|
4799
|
+
{ path: { id } },
|
|
4800
|
+
options
|
|
4801
|
+
);
|
|
4802
|
+
},
|
|
4803
|
+
/** Create a new crawl schedule */
|
|
4804
|
+
create: async (attributes, options) => {
|
|
4805
|
+
return rb.execute(
|
|
4806
|
+
postCrawlerSchedules,
|
|
4807
|
+
{
|
|
4808
|
+
body: { data: { type: "crawler_crawl_schedule", attributes } }
|
|
4809
|
+
},
|
|
4810
|
+
options
|
|
4811
|
+
);
|
|
4812
|
+
},
|
|
4813
|
+
/** Update a schedule */
|
|
4814
|
+
update: async (id, attributes, options) => {
|
|
4815
|
+
return rb.execute(
|
|
4816
|
+
patchCrawlerSchedulesById,
|
|
4817
|
+
{
|
|
4818
|
+
path: { id },
|
|
4819
|
+
body: { data: { id, type: "crawler_crawl_schedule", attributes } }
|
|
4820
|
+
},
|
|
4821
|
+
options
|
|
4822
|
+
);
|
|
4823
|
+
},
|
|
4824
|
+
/** Delete a schedule */
|
|
4825
|
+
delete: async (id, options) => {
|
|
4826
|
+
return rb.executeDelete(
|
|
4827
|
+
deleteCrawlerSchedulesById,
|
|
4828
|
+
{ path: { id } },
|
|
4829
|
+
options
|
|
4830
|
+
);
|
|
4831
|
+
}
|
|
4832
|
+
},
|
|
4833
|
+
/**
|
|
4834
|
+
* Results — crawl results and extracted content
|
|
4835
|
+
*/
|
|
4836
|
+
results: {
|
|
4837
|
+
/** List crawl results */
|
|
4838
|
+
list: async (options) => {
|
|
4839
|
+
return rb.execute(
|
|
4840
|
+
getCrawlerResults,
|
|
4841
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
4842
|
+
options
|
|
4843
|
+
);
|
|
4844
|
+
},
|
|
4845
|
+
/** Get a crawl result by ID */
|
|
4846
|
+
get: async (id, options) => {
|
|
4847
|
+
return rb.execute(
|
|
4848
|
+
getCrawlerResultsById,
|
|
4849
|
+
{ path: { id } },
|
|
4850
|
+
options
|
|
4851
|
+
);
|
|
4852
|
+
}
|
|
4853
|
+
}
|
|
4854
|
+
};
|
|
4855
|
+
}
|
|
4856
|
+
|
|
4857
|
+
// src/namespaces/crm.ts
|
|
4858
|
+
function createCrmNamespace(rb) {
|
|
4859
|
+
return {
|
|
4860
|
+
/**
|
|
4861
|
+
* Contacts — people and leads
|
|
4862
|
+
*/
|
|
4863
|
+
contacts: {
|
|
4864
|
+
/** Get a contact by ID */
|
|
4865
|
+
get: async (id, options) => {
|
|
4866
|
+
return rb.execute(
|
|
4867
|
+
getCrmContactsById,
|
|
4868
|
+
{ path: { id } },
|
|
4869
|
+
options
|
|
4870
|
+
);
|
|
4871
|
+
},
|
|
4872
|
+
/** Create a new contact */
|
|
4873
|
+
create: async (attributes, options) => {
|
|
4874
|
+
return rb.execute(
|
|
4875
|
+
postCrmContacts,
|
|
4876
|
+
{
|
|
4877
|
+
body: { data: { type: "crm_contact", attributes } }
|
|
4878
|
+
},
|
|
4879
|
+
options
|
|
4880
|
+
);
|
|
4881
|
+
},
|
|
4882
|
+
/** Update a contact */
|
|
4883
|
+
update: async (id, attributes, options) => {
|
|
4884
|
+
return rb.execute(
|
|
4885
|
+
patchCrmContactsById,
|
|
4886
|
+
{
|
|
4887
|
+
path: { id },
|
|
4888
|
+
body: { data: { id, type: "crm_contact", attributes } }
|
|
4889
|
+
},
|
|
4890
|
+
options
|
|
4891
|
+
);
|
|
4892
|
+
},
|
|
4893
|
+
/** Delete a contact (soft delete) */
|
|
4894
|
+
delete: async (id, options) => {
|
|
4895
|
+
return rb.executeDelete(
|
|
4896
|
+
deleteCrmContactsById,
|
|
4897
|
+
{ path: { id } },
|
|
4898
|
+
options
|
|
4899
|
+
);
|
|
4900
|
+
},
|
|
4901
|
+
/** List contacts by workspace */
|
|
4902
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
4903
|
+
return rb.execute(
|
|
4904
|
+
getCrmContactsWorkspaceByWorkspaceId,
|
|
4905
|
+
{
|
|
4906
|
+
path: { workspace_id: workspaceId },
|
|
4907
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
4908
|
+
},
|
|
4909
|
+
options
|
|
4910
|
+
);
|
|
4911
|
+
}
|
|
4912
|
+
},
|
|
4913
|
+
/**
|
|
4914
|
+
* Companies — organizations
|
|
4915
|
+
*/
|
|
4916
|
+
companies: {
|
|
4917
|
+
/** Get a company by ID */
|
|
4918
|
+
get: async (id, options) => {
|
|
4919
|
+
return rb.execute(
|
|
4920
|
+
getCrmCompaniesById,
|
|
4921
|
+
{ path: { id } },
|
|
4922
|
+
options
|
|
4923
|
+
);
|
|
4924
|
+
},
|
|
4925
|
+
/** Create a new company */
|
|
4926
|
+
create: async (attributes, options) => {
|
|
4927
|
+
return rb.execute(
|
|
4928
|
+
postCrmCompanies,
|
|
4929
|
+
{
|
|
4930
|
+
body: { data: { type: "crm_company", attributes } }
|
|
4931
|
+
},
|
|
4932
|
+
options
|
|
4933
|
+
);
|
|
4934
|
+
},
|
|
4935
|
+
/** Update a company */
|
|
4936
|
+
update: async (id, attributes, options) => {
|
|
4937
|
+
return rb.execute(
|
|
4938
|
+
patchCrmCompaniesById,
|
|
4939
|
+
{
|
|
4940
|
+
path: { id },
|
|
4941
|
+
body: { data: { id, type: "crm_company", attributes } }
|
|
4942
|
+
},
|
|
4943
|
+
options
|
|
4944
|
+
);
|
|
4945
|
+
},
|
|
4946
|
+
/** Delete a company (soft delete) */
|
|
4947
|
+
delete: async (id, options) => {
|
|
4948
|
+
return rb.executeDelete(
|
|
4949
|
+
deleteCrmCompaniesById,
|
|
4950
|
+
{ path: { id } },
|
|
4951
|
+
options
|
|
4952
|
+
);
|
|
4953
|
+
},
|
|
4954
|
+
/** List companies by workspace */
|
|
4955
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
4956
|
+
return rb.execute(
|
|
4957
|
+
getCrmCompaniesWorkspaceByWorkspaceId,
|
|
4958
|
+
{
|
|
4959
|
+
path: { workspace_id: workspaceId },
|
|
4960
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
4961
|
+
},
|
|
4962
|
+
options
|
|
4963
|
+
);
|
|
4964
|
+
}
|
|
4965
|
+
},
|
|
4966
|
+
/**
|
|
4967
|
+
* Deals — opportunities and pipeline stages
|
|
4968
|
+
*/
|
|
4969
|
+
deals: {
|
|
4970
|
+
/** Get a deal by ID */
|
|
4971
|
+
get: async (id, options) => {
|
|
4972
|
+
return rb.execute(getCrmDealsById, { path: { id } }, options);
|
|
4973
|
+
},
|
|
4974
|
+
/** Create a new deal */
|
|
4975
|
+
create: async (attributes, options) => {
|
|
4976
|
+
return rb.execute(
|
|
4977
|
+
postCrmDeals,
|
|
4978
|
+
{
|
|
4979
|
+
body: { data: { type: "crm_deal", attributes } }
|
|
4980
|
+
},
|
|
4981
|
+
options
|
|
4982
|
+
);
|
|
4983
|
+
},
|
|
4984
|
+
/** Update a deal */
|
|
4985
|
+
update: async (id, attributes, options) => {
|
|
4986
|
+
return rb.execute(
|
|
4987
|
+
patchCrmDealsById,
|
|
4988
|
+
{
|
|
4989
|
+
path: { id },
|
|
4990
|
+
body: { data: { id, type: "crm_deal", attributes } }
|
|
4991
|
+
},
|
|
4992
|
+
options
|
|
4993
|
+
);
|
|
4994
|
+
},
|
|
4995
|
+
/** Delete a deal (soft delete) */
|
|
4996
|
+
delete: async (id, options) => {
|
|
4997
|
+
return rb.executeDelete(deleteCrmDealsById, { path: { id } }, options);
|
|
4998
|
+
},
|
|
4999
|
+
/** List deals by workspace */
|
|
5000
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5001
|
+
return rb.execute(
|
|
5002
|
+
getCrmDealsWorkspaceByWorkspaceId,
|
|
5003
|
+
{
|
|
5004
|
+
path: { workspace_id: workspaceId },
|
|
5005
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5006
|
+
},
|
|
5007
|
+
options
|
|
5008
|
+
);
|
|
5009
|
+
}
|
|
5010
|
+
},
|
|
5011
|
+
/**
|
|
5012
|
+
* Activities — interactions and notes
|
|
5013
|
+
*/
|
|
5014
|
+
activities: {
|
|
5015
|
+
/** Get an activity by ID */
|
|
5016
|
+
get: async (id, options) => {
|
|
5017
|
+
return rb.execute(
|
|
5018
|
+
getCrmActivitiesById,
|
|
5019
|
+
{ path: { id } },
|
|
5020
|
+
options
|
|
5021
|
+
);
|
|
5022
|
+
},
|
|
5023
|
+
/** Create a new activity */
|
|
5024
|
+
create: async (attributes, options) => {
|
|
5025
|
+
return rb.execute(
|
|
5026
|
+
postCrmActivities,
|
|
5027
|
+
{
|
|
5028
|
+
body: { data: { type: "crm_activity", attributes } }
|
|
5029
|
+
},
|
|
5030
|
+
options
|
|
5031
|
+
);
|
|
5032
|
+
},
|
|
5033
|
+
/** Update an activity (not available - activities are immutable after creation) */
|
|
5034
|
+
update: async (_id, _attributes, _options) => {
|
|
5035
|
+
throw new Error(
|
|
5036
|
+
"Activity update not available - activities are immutable"
|
|
5037
|
+
);
|
|
5038
|
+
},
|
|
5039
|
+
/** Delete an activity (soft delete) */
|
|
5040
|
+
delete: async (id, options) => {
|
|
5041
|
+
return rb.executeDelete(
|
|
5042
|
+
deleteCrmActivitiesById,
|
|
5043
|
+
{ path: { id } },
|
|
5044
|
+
options
|
|
5045
|
+
);
|
|
5046
|
+
},
|
|
5047
|
+
/** List activities by workspace */
|
|
5048
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5049
|
+
return rb.execute(
|
|
5050
|
+
getCrmActivitiesWorkspaceByWorkspaceId,
|
|
5051
|
+
{
|
|
5052
|
+
path: { workspace_id: workspaceId },
|
|
5053
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5054
|
+
},
|
|
5055
|
+
options
|
|
5056
|
+
);
|
|
5057
|
+
}
|
|
5058
|
+
},
|
|
5059
|
+
/**
|
|
5060
|
+
* Pipelines — deal workflow stages
|
|
5061
|
+
*/
|
|
5062
|
+
pipelines: {
|
|
5063
|
+
/** Get a pipeline by ID */
|
|
5064
|
+
get: async (id, options) => {
|
|
5065
|
+
return rb.execute(
|
|
5066
|
+
getCrmPipelinesById,
|
|
5067
|
+
{ path: { id } },
|
|
5068
|
+
options
|
|
5069
|
+
);
|
|
5070
|
+
},
|
|
5071
|
+
/** Create a new pipeline */
|
|
5072
|
+
create: async (attributes, options) => {
|
|
5073
|
+
return rb.execute(
|
|
5074
|
+
postCrmPipelines,
|
|
5075
|
+
{
|
|
5076
|
+
body: { data: { type: "crm_pipeline", attributes } }
|
|
5077
|
+
},
|
|
5078
|
+
options
|
|
5079
|
+
);
|
|
5080
|
+
},
|
|
5081
|
+
/** Update a pipeline */
|
|
5082
|
+
update: async (id, attributes, options) => {
|
|
5083
|
+
return rb.execute(
|
|
5084
|
+
patchCrmPipelinesById,
|
|
5085
|
+
{
|
|
5086
|
+
path: { id },
|
|
5087
|
+
body: { data: { id, type: "crm_pipeline", attributes } }
|
|
5088
|
+
},
|
|
5089
|
+
options
|
|
5090
|
+
);
|
|
5091
|
+
},
|
|
5092
|
+
/** Delete a pipeline */
|
|
5093
|
+
delete: async (id, options) => {
|
|
5094
|
+
return rb.executeDelete(
|
|
5095
|
+
deleteCrmPipelinesById,
|
|
5096
|
+
{ path: { id } },
|
|
5097
|
+
options
|
|
5098
|
+
);
|
|
5099
|
+
},
|
|
5100
|
+
/** List pipelines by workspace */
|
|
5101
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5102
|
+
return rb.execute(
|
|
5103
|
+
getCrmPipelinesWorkspaceByWorkspaceId,
|
|
5104
|
+
{
|
|
5105
|
+
path: { workspace_id: workspaceId }
|
|
5106
|
+
},
|
|
5107
|
+
options
|
|
5108
|
+
);
|
|
5109
|
+
}
|
|
5110
|
+
},
|
|
5111
|
+
/**
|
|
5112
|
+
* Pipeline Stages — stages within a pipeline
|
|
5113
|
+
*/
|
|
5114
|
+
pipelineStages: {
|
|
5115
|
+
/** Get a pipeline stage by ID */
|
|
5116
|
+
get: async (id, options) => {
|
|
5117
|
+
return rb.execute(
|
|
5118
|
+
getCrmPipelineStagesById,
|
|
5119
|
+
{ path: { id } },
|
|
5120
|
+
options
|
|
5121
|
+
);
|
|
5122
|
+
},
|
|
5123
|
+
/** Create a new pipeline stage */
|
|
5124
|
+
create: async (attributes, options) => {
|
|
5125
|
+
return rb.execute(
|
|
5126
|
+
postCrmPipelineStages,
|
|
5127
|
+
{
|
|
5128
|
+
body: { data: { type: "crm_pipeline_stage", attributes } }
|
|
5129
|
+
},
|
|
5130
|
+
options
|
|
5131
|
+
);
|
|
5132
|
+
},
|
|
5133
|
+
/** Update a pipeline stage */
|
|
5134
|
+
update: async (id, attributes, options) => {
|
|
5135
|
+
return rb.execute(
|
|
5136
|
+
patchCrmPipelineStagesById,
|
|
5137
|
+
{
|
|
5138
|
+
path: { id },
|
|
5139
|
+
body: { data: { id, type: "crm_pipeline_stage", attributes } }
|
|
5140
|
+
},
|
|
5141
|
+
options
|
|
5142
|
+
);
|
|
5143
|
+
},
|
|
5144
|
+
/** Delete a pipeline stage */
|
|
5145
|
+
delete: async (id, options) => {
|
|
5146
|
+
return rb.executeDelete(
|
|
5147
|
+
deleteCrmPipelineStagesById,
|
|
5148
|
+
{ path: { id } },
|
|
5149
|
+
options
|
|
5150
|
+
);
|
|
5151
|
+
}
|
|
5152
|
+
},
|
|
5153
|
+
/**
|
|
5154
|
+
* Relationship Types — custom relationship templates
|
|
5155
|
+
*/
|
|
5156
|
+
relationshipTypes: {
|
|
5157
|
+
/** Get a relationship type by ID */
|
|
5158
|
+
get: async (id, options) => {
|
|
5159
|
+
return rb.execute(
|
|
5160
|
+
getCrmRelationshipTypesById,
|
|
5161
|
+
{ path: { id } },
|
|
5162
|
+
options
|
|
5163
|
+
);
|
|
5164
|
+
},
|
|
5165
|
+
/** Create a new relationship type */
|
|
5166
|
+
create: async (attributes, options) => {
|
|
5167
|
+
return rb.execute(
|
|
5168
|
+
postCrmRelationshipTypes,
|
|
5169
|
+
{
|
|
5170
|
+
body: { data: { type: "crm_relationship_type", attributes } }
|
|
5171
|
+
},
|
|
5172
|
+
options
|
|
5173
|
+
);
|
|
5174
|
+
},
|
|
5175
|
+
/** Update a relationship type */
|
|
5176
|
+
update: async (id, attributes, options) => {
|
|
5177
|
+
return rb.execute(
|
|
5178
|
+
patchCrmRelationshipTypesById,
|
|
5179
|
+
{
|
|
5180
|
+
path: { id },
|
|
5181
|
+
body: { data: { id, type: "crm_relationship_type", attributes } }
|
|
5182
|
+
},
|
|
5183
|
+
options
|
|
5184
|
+
);
|
|
5185
|
+
},
|
|
5186
|
+
/** Delete a relationship type */
|
|
5187
|
+
delete: async (id, options) => {
|
|
5188
|
+
return rb.executeDelete(
|
|
5189
|
+
deleteCrmRelationshipTypesById,
|
|
5190
|
+
{ path: { id } },
|
|
5191
|
+
options
|
|
5192
|
+
);
|
|
5193
|
+
},
|
|
5194
|
+
/** List all relationship types */
|
|
5195
|
+
list: async (options) => {
|
|
5196
|
+
return rb.execute(
|
|
5197
|
+
getCrmRelationshipTypes,
|
|
5198
|
+
{},
|
|
5199
|
+
options
|
|
5200
|
+
);
|
|
5201
|
+
}
|
|
5202
|
+
},
|
|
5203
|
+
/**
|
|
5204
|
+
* Relationships — connections between entities
|
|
5205
|
+
*/
|
|
5206
|
+
relationships: {
|
|
5207
|
+
/** Get a relationship by ID */
|
|
5208
|
+
get: async (id, options) => {
|
|
5209
|
+
return rb.execute(
|
|
5210
|
+
getCrmRelationshipsById,
|
|
5211
|
+
{ path: { id } },
|
|
5212
|
+
options
|
|
5213
|
+
);
|
|
5214
|
+
},
|
|
5215
|
+
/** Create a new relationship */
|
|
5216
|
+
create: async (attributes, options) => {
|
|
5217
|
+
return rb.execute(
|
|
5218
|
+
postCrmRelationships,
|
|
5219
|
+
{
|
|
5220
|
+
body: { data: { type: "crm_relationship", attributes } }
|
|
5221
|
+
},
|
|
5222
|
+
options
|
|
5223
|
+
);
|
|
5224
|
+
},
|
|
5225
|
+
/** Delete a relationship */
|
|
5226
|
+
delete: async (id, options) => {
|
|
5227
|
+
return rb.executeDelete(
|
|
5228
|
+
deleteCrmRelationshipsById,
|
|
5229
|
+
{ path: { id } },
|
|
5230
|
+
options
|
|
5231
|
+
);
|
|
5232
|
+
},
|
|
5233
|
+
/** List relationships by workspace */
|
|
5234
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5235
|
+
return rb.execute(
|
|
5236
|
+
getCrmRelationshipsWorkspaceByWorkspaceId,
|
|
5237
|
+
{
|
|
5238
|
+
path: { workspace_id: workspaceId }
|
|
5239
|
+
},
|
|
5240
|
+
options
|
|
5241
|
+
);
|
|
5242
|
+
}
|
|
5243
|
+
},
|
|
5244
|
+
/**
|
|
5245
|
+
* Custom Entities — ISV-defined entity types
|
|
5246
|
+
*/
|
|
5247
|
+
customEntities: {
|
|
5248
|
+
/** Get a custom entity by ID */
|
|
5249
|
+
get: async (id, options) => {
|
|
5250
|
+
return rb.execute(
|
|
5251
|
+
getCrmCustomEntitiesById,
|
|
5252
|
+
{ path: { id } },
|
|
5253
|
+
options
|
|
5254
|
+
);
|
|
5255
|
+
},
|
|
5256
|
+
/** Create a new custom entity */
|
|
5257
|
+
create: async (attributes, options) => {
|
|
5258
|
+
return rb.execute(
|
|
5259
|
+
postCrmCustomEntities,
|
|
5260
|
+
{
|
|
5261
|
+
body: { data: { type: "crm_custom_entity", attributes } }
|
|
5262
|
+
},
|
|
5263
|
+
options
|
|
5264
|
+
);
|
|
5265
|
+
},
|
|
5266
|
+
/** Update a custom entity */
|
|
5267
|
+
update: async (id, attributes, options) => {
|
|
5268
|
+
return rb.execute(
|
|
5269
|
+
patchCrmCustomEntitiesById,
|
|
5270
|
+
{
|
|
5271
|
+
path: { id },
|
|
5272
|
+
body: { data: { id, type: "crm_custom_entity", attributes } }
|
|
5273
|
+
},
|
|
5274
|
+
options
|
|
5275
|
+
);
|
|
5276
|
+
},
|
|
5277
|
+
/** Delete a custom entity (soft delete) */
|
|
5278
|
+
delete: async (id, options) => {
|
|
5279
|
+
return rb.executeDelete(
|
|
5280
|
+
deleteCrmCustomEntitiesById,
|
|
5281
|
+
{ path: { id } },
|
|
5282
|
+
options
|
|
5283
|
+
);
|
|
5284
|
+
},
|
|
5285
|
+
/** List custom entities by workspace with optional type and attribute filters */
|
|
5286
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5287
|
+
const pageQuery = buildPageQuery(options?.page, options?.pageSize);
|
|
5288
|
+
return rb.execute(
|
|
5289
|
+
getCrmCustomEntitiesWorkspaceByWorkspaceId,
|
|
5290
|
+
{
|
|
5291
|
+
path: { workspace_id: workspaceId },
|
|
5292
|
+
query: {
|
|
5293
|
+
...options?.type ? { "filter[type]": options.type } : {},
|
|
5294
|
+
...options?.filters ? {
|
|
5295
|
+
"filter[filters]": JSON.stringify(options.filters)
|
|
5296
|
+
} : {},
|
|
5297
|
+
...pageQuery?.query
|
|
5298
|
+
}
|
|
5299
|
+
},
|
|
5300
|
+
options
|
|
5301
|
+
);
|
|
5302
|
+
},
|
|
5303
|
+
/** Batch update multiple custom entities in a single transaction */
|
|
5304
|
+
batchUpdate: async (workspaceId, updates, options) => {
|
|
5305
|
+
return rb.rawPost(
|
|
5306
|
+
"/crm/custom-entities/batch",
|
|
5307
|
+
{ workspace_id: workspaceId, updates },
|
|
5308
|
+
options
|
|
5309
|
+
);
|
|
5310
|
+
},
|
|
5311
|
+
/** Run aggregate queries (count/avg/sum) on custom entity properties */
|
|
5312
|
+
aggregate: async (workspaceId, params, options) => {
|
|
5313
|
+
return rb.rawPost(
|
|
5314
|
+
"/crm/custom-entities/aggregate",
|
|
5315
|
+
{ workspace_id: workspaceId, ...params },
|
|
5316
|
+
options
|
|
5317
|
+
);
|
|
5318
|
+
},
|
|
5319
|
+
/** Version history for this custom entity */
|
|
5320
|
+
versions: {
|
|
5321
|
+
/** List all versions of a custom entity (ordered by version_number desc) */
|
|
5322
|
+
list: async (entityId, options) => {
|
|
5323
|
+
const pageQuery = buildPageQuery(options?.page, options?.pageSize);
|
|
5324
|
+
const qs = pageQuery?.query && Object.keys(pageQuery.query).length > 0 ? "?" + new URLSearchParams(
|
|
5325
|
+
Object.entries(pageQuery.query).map(([k, v]) => [
|
|
5326
|
+
k,
|
|
5327
|
+
String(v)
|
|
5328
|
+
])
|
|
5329
|
+
).toString() : "";
|
|
5330
|
+
return rb.rawGet(
|
|
5331
|
+
`/crm/custom-entities/${entityId}/versions${qs}`,
|
|
5332
|
+
options
|
|
5333
|
+
);
|
|
5334
|
+
},
|
|
5335
|
+
/** Get a single version snapshot by ID */
|
|
5336
|
+
get: async (entityId, versionId, options) => rb.rawGet(
|
|
5337
|
+
`/crm/custom-entities/${entityId}/versions/${versionId}`,
|
|
5338
|
+
options
|
|
5339
|
+
),
|
|
5340
|
+
/** Restore a custom entity to a prior version */
|
|
5341
|
+
restore: async (entityId, versionId, options) => {
|
|
5342
|
+
return rb.rawPost(
|
|
5343
|
+
`/crm/custom-entities/${entityId}/versions/${versionId}/restore`,
|
|
5344
|
+
{},
|
|
5345
|
+
options
|
|
5346
|
+
);
|
|
5347
|
+
}
|
|
5348
|
+
}
|
|
5349
|
+
},
|
|
5350
|
+
/** CRM data export — create async export jobs and poll for completion. */
|
|
5351
|
+
export: {
|
|
5352
|
+
/**
|
|
5353
|
+
* Create a data export job. Returns immediately with a pending job.
|
|
5354
|
+
* Poll `get()` until `status === 'complete'`, then download from `file_url`.
|
|
5355
|
+
*/
|
|
5356
|
+
create: async (workspaceId, params, options) => {
|
|
5357
|
+
return rb.execute(
|
|
5358
|
+
postCrmExports,
|
|
5359
|
+
{
|
|
5360
|
+
body: {
|
|
5361
|
+
data: {
|
|
5362
|
+
type: "crm_data_export_job",
|
|
5363
|
+
attributes: {
|
|
5364
|
+
workspace_id: workspaceId,
|
|
5365
|
+
entity_type: params.entityType,
|
|
5366
|
+
entity_subtype: params.entitySubtype,
|
|
5367
|
+
format: params.format,
|
|
5368
|
+
include: params.include ?? [],
|
|
5369
|
+
filters: params.filters ?? []
|
|
5370
|
+
}
|
|
5371
|
+
}
|
|
5372
|
+
}
|
|
5373
|
+
},
|
|
5374
|
+
options
|
|
5375
|
+
);
|
|
5376
|
+
},
|
|
5377
|
+
/**
|
|
5378
|
+
* Get an export job by ID. When `status === 'complete'`, `file_url` is
|
|
5379
|
+
* populated and valid for 1 hour.
|
|
5380
|
+
*/
|
|
5381
|
+
get: async (jobId, options) => {
|
|
5382
|
+
return rb.execute(
|
|
5383
|
+
getCrmExportsById,
|
|
5384
|
+
{ path: { id: jobId } },
|
|
5385
|
+
options
|
|
5386
|
+
);
|
|
5387
|
+
},
|
|
5388
|
+
/** List all export jobs for a workspace, most recent first. */
|
|
5389
|
+
list: async (workspaceId, options) => {
|
|
5390
|
+
return rb.execute(
|
|
5391
|
+
getCrmExportsWorkspaceByWorkspaceId,
|
|
5392
|
+
{ path: { workspace_id: workspaceId } },
|
|
5393
|
+
options
|
|
5394
|
+
);
|
|
5395
|
+
}
|
|
5396
|
+
}
|
|
5397
|
+
};
|
|
5398
|
+
}
|
|
5399
|
+
|
|
5400
|
+
// src/namespaces/dataStore.ts
|
|
5401
|
+
function createDataStoreNamespace(_rb) {
|
|
5402
|
+
return {
|
|
5403
|
+
/**
|
|
5404
|
+
* Records — key-value storage with versioning
|
|
5405
|
+
*/
|
|
5406
|
+
records: {
|
|
5407
|
+
/** Get a value by namespace and key */
|
|
5408
|
+
get: async (_namespace, _key, _options) => {
|
|
5409
|
+
throw new Error("Record get not yet implemented in SDK");
|
|
5410
|
+
},
|
|
5411
|
+
/** Set a value (creates or updates) */
|
|
5412
|
+
set: async (_namespace, _key, _value, _options) => {
|
|
5413
|
+
throw new Error("Record set not yet implemented in SDK");
|
|
5414
|
+
},
|
|
5415
|
+
/** Delete a value */
|
|
5416
|
+
delete: async (_namespace, _key, _options) => {
|
|
5417
|
+
throw new Error("Record delete not yet implemented in SDK");
|
|
5418
|
+
},
|
|
5419
|
+
/** List all keys in a namespace */
|
|
5420
|
+
listKeys: async (_namespace, _options) => {
|
|
5421
|
+
throw new Error("List keys not yet implemented in SDK");
|
|
5422
|
+
},
|
|
5423
|
+
/** List all records in a namespace */
|
|
5424
|
+
list: async (_namespace, _options) => {
|
|
5425
|
+
throw new Error("List records not yet implemented in SDK");
|
|
5426
|
+
}
|
|
5427
|
+
},
|
|
5428
|
+
/**
|
|
5429
|
+
* Namespaces — namespace policies and access control
|
|
5430
|
+
*/
|
|
5431
|
+
namespaces: {
|
|
5432
|
+
/** Get namespace policy */
|
|
5433
|
+
getPolicy: async (_namespace, _options) => {
|
|
5434
|
+
throw new Error("Namespace policy get not yet implemented in SDK");
|
|
5435
|
+
},
|
|
5436
|
+
/** Create namespace policy */
|
|
5437
|
+
createPolicy: async (_attributes, _options) => {
|
|
5438
|
+
throw new Error("Namespace policy create not yet implemented in SDK");
|
|
5439
|
+
},
|
|
5440
|
+
/** Get namespace statistics */
|
|
5441
|
+
getStats: async (_namespace, _options) => {
|
|
5442
|
+
throw new Error("Namespace stats not yet implemented in SDK");
|
|
5443
|
+
}
|
|
5444
|
+
}
|
|
5445
|
+
};
|
|
5446
|
+
}
|
|
5447
|
+
|
|
5448
|
+
// src/namespaces/emailMarketing.ts
|
|
5449
|
+
function createEmailMarketingNamespace(rb) {
|
|
5450
|
+
return {
|
|
5451
|
+
/**
|
|
5452
|
+
* Campaigns — email campaign orchestration
|
|
5453
|
+
*/
|
|
5454
|
+
campaigns: {
|
|
5455
|
+
/** Get a campaign by ID */
|
|
5456
|
+
get: async (id, options) => {
|
|
5457
|
+
return rb.execute(
|
|
5458
|
+
getEmailMarketingCampaignsById,
|
|
5459
|
+
{ path: { id } },
|
|
5460
|
+
options
|
|
5461
|
+
);
|
|
5462
|
+
},
|
|
5463
|
+
/** Create a new campaign */
|
|
5464
|
+
create: async (attributes, options) => {
|
|
5465
|
+
return rb.execute(
|
|
5466
|
+
postEmailMarketingCampaigns,
|
|
5467
|
+
{
|
|
5468
|
+
body: { data: { type: "email_marketing_campaign", attributes } }
|
|
5469
|
+
},
|
|
5470
|
+
options
|
|
5471
|
+
);
|
|
5472
|
+
},
|
|
5473
|
+
/** Update a campaign */
|
|
5474
|
+
update: async (id, attributes, options) => {
|
|
5475
|
+
return rb.execute(
|
|
5476
|
+
patchEmailMarketingCampaignsById,
|
|
5477
|
+
{
|
|
5478
|
+
path: { id },
|
|
5479
|
+
body: {
|
|
5480
|
+
data: { id, type: "email_marketing_campaign", attributes }
|
|
5481
|
+
}
|
|
5482
|
+
},
|
|
5483
|
+
options
|
|
5484
|
+
);
|
|
5485
|
+
},
|
|
5486
|
+
/** Delete a campaign */
|
|
5487
|
+
delete: async (id, options) => {
|
|
5488
|
+
return rb.executeDelete(
|
|
5489
|
+
deleteEmailMarketingCampaignsById,
|
|
5490
|
+
{ path: { id } },
|
|
5491
|
+
options
|
|
5492
|
+
);
|
|
5493
|
+
},
|
|
5494
|
+
/** List campaigns by workspace */
|
|
5495
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5496
|
+
return rb.execute(
|
|
5497
|
+
getEmailMarketingCampaignsWorkspaceByWorkspaceId,
|
|
5498
|
+
{
|
|
5499
|
+
path: { workspace_id: workspaceId },
|
|
5500
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5501
|
+
},
|
|
5502
|
+
options
|
|
5503
|
+
);
|
|
5504
|
+
},
|
|
5505
|
+
/** Send the campaign */
|
|
5506
|
+
send: async (id, options) => {
|
|
5507
|
+
return rb.execute(
|
|
5508
|
+
postEmailMarketingCampaignsByIdSend,
|
|
5509
|
+
{ path: { id }, body: {} },
|
|
5510
|
+
options
|
|
5511
|
+
);
|
|
5512
|
+
},
|
|
5513
|
+
/** Analyze campaign performance with AI */
|
|
5514
|
+
analyze: async (id, options) => {
|
|
5515
|
+
return rb.execute(
|
|
5516
|
+
postEmailMarketingCampaignsByIdAnalyze,
|
|
5517
|
+
{ path: { id }, body: {} },
|
|
5518
|
+
options
|
|
5519
|
+
);
|
|
5520
|
+
},
|
|
5521
|
+
/** Optimize send times using AI */
|
|
5522
|
+
optimizeSendTimes: async (id, options) => {
|
|
5523
|
+
return rb.execute(
|
|
5524
|
+
postEmailMarketingCampaignsByIdOptimizeSendTimes,
|
|
5525
|
+
{ path: { id }, body: {} },
|
|
5526
|
+
options
|
|
3597
5527
|
);
|
|
3598
5528
|
},
|
|
3599
|
-
|
|
5529
|
+
/** Create a follow-up campaign */
|
|
5530
|
+
createFollowup: async (id, attributes, options) => {
|
|
3600
5531
|
return rb.execute(
|
|
3601
|
-
|
|
3602
|
-
{
|
|
5532
|
+
postEmailMarketingCampaignsByIdCreateFollowup,
|
|
5533
|
+
{
|
|
5534
|
+
path: { id },
|
|
5535
|
+
body: { data: { type: "email_marketing_campaign", attributes } }
|
|
5536
|
+
},
|
|
3603
5537
|
options
|
|
3604
5538
|
);
|
|
3605
5539
|
}
|
|
3606
5540
|
},
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
5541
|
+
/**
|
|
5542
|
+
* Templates — email template management
|
|
5543
|
+
*/
|
|
5544
|
+
templates: {
|
|
5545
|
+
/** List templates by workspace */
|
|
5546
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
5547
|
+
return rb.execute(
|
|
5548
|
+
getEmailMarketingTemplatesWorkspaceByWorkspaceId,
|
|
5549
|
+
{
|
|
5550
|
+
path: { workspace_id: workspaceId },
|
|
5551
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5552
|
+
},
|
|
5553
|
+
options
|
|
5554
|
+
);
|
|
5555
|
+
}
|
|
5556
|
+
},
|
|
5557
|
+
/**
|
|
5558
|
+
* Generated Emails — AI-personalized emails awaiting review
|
|
5559
|
+
*/
|
|
5560
|
+
generatedEmails: {
|
|
5561
|
+
/** Get a generated email by ID */
|
|
5562
|
+
get: async (id, options) => {
|
|
5563
|
+
return rb.execute(
|
|
5564
|
+
getEmailMarketingGeneratedEmailsById,
|
|
3611
5565
|
{ path: { id } },
|
|
3612
5566
|
options
|
|
3613
5567
|
);
|
|
3614
5568
|
},
|
|
3615
|
-
|
|
5569
|
+
/** Update a generated email */
|
|
5570
|
+
update: async (id, attributes, options) => {
|
|
3616
5571
|
return rb.execute(
|
|
3617
|
-
|
|
3618
|
-
|
|
5572
|
+
patchEmailMarketingGeneratedEmailsById,
|
|
5573
|
+
{
|
|
5574
|
+
path: { id },
|
|
5575
|
+
body: {
|
|
5576
|
+
data: { id, type: "email_marketing_generated_email", attributes }
|
|
5577
|
+
}
|
|
5578
|
+
},
|
|
3619
5579
|
options
|
|
3620
5580
|
);
|
|
3621
5581
|
},
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
}),
|
|
3629
|
-
options
|
|
3630
|
-
)
|
|
5582
|
+
/** Approve a generated email for sending */
|
|
5583
|
+
approve: async (id, options) => {
|
|
5584
|
+
return rb.execute(
|
|
5585
|
+
patchEmailMarketingGeneratedEmailsByIdApprove,
|
|
5586
|
+
{ path: { id }, body: {} },
|
|
5587
|
+
options
|
|
3631
5588
|
);
|
|
3632
|
-
}
|
|
3633
|
-
|
|
5589
|
+
}
|
|
5590
|
+
},
|
|
5591
|
+
/**
|
|
5592
|
+
* Sender Profiles — sender identities with DNS validation
|
|
5593
|
+
*/
|
|
5594
|
+
senderProfiles: {
|
|
5595
|
+
/** Get a sender profile by ID */
|
|
5596
|
+
get: async (id, options) => {
|
|
3634
5597
|
return rb.execute(
|
|
3635
|
-
|
|
3636
|
-
{
|
|
5598
|
+
getEmailMarketingSenderProfilesById,
|
|
5599
|
+
{ path: { id } },
|
|
3637
5600
|
options
|
|
3638
5601
|
);
|
|
3639
5602
|
},
|
|
5603
|
+
/** Update a sender profile */
|
|
3640
5604
|
update: async (id, attributes, options) => {
|
|
3641
5605
|
return rb.execute(
|
|
3642
|
-
|
|
5606
|
+
patchEmailMarketingSenderProfilesById,
|
|
3643
5607
|
{
|
|
3644
5608
|
path: { id },
|
|
3645
|
-
body: {
|
|
5609
|
+
body: {
|
|
5610
|
+
data: { id, type: "email_marketing_sender_profile", attributes }
|
|
5611
|
+
}
|
|
3646
5612
|
},
|
|
3647
5613
|
options
|
|
3648
5614
|
);
|
|
3649
5615
|
},
|
|
3650
|
-
|
|
5616
|
+
/** Validate DNS records for sender profile */
|
|
5617
|
+
validateDns: async (id, options) => {
|
|
3651
5618
|
return rb.execute(
|
|
3652
|
-
|
|
5619
|
+
patchEmailMarketingSenderProfilesByIdValidateDns,
|
|
5620
|
+
{ path: { id }, body: {} },
|
|
5621
|
+
options
|
|
5622
|
+
);
|
|
5623
|
+
},
|
|
5624
|
+
/** Delete a sender profile */
|
|
5625
|
+
delete: async (id, options) => {
|
|
5626
|
+
return rb.executeDelete(
|
|
5627
|
+
deleteEmailMarketingSenderProfilesById,
|
|
3653
5628
|
{ path: { id } },
|
|
3654
5629
|
options
|
|
3655
5630
|
);
|
|
3656
5631
|
}
|
|
3657
|
-
}
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
notifications: {
|
|
3665
|
-
/** List notification logs (alias for list) */
|
|
3666
|
-
logs: async (options) => {
|
|
5632
|
+
},
|
|
5633
|
+
/**
|
|
5634
|
+
* Sequences — drip campaign automation
|
|
5635
|
+
*/
|
|
5636
|
+
sequences: {
|
|
5637
|
+
/** Create a new sequence */
|
|
5638
|
+
create: async (attributes, options) => {
|
|
3667
5639
|
return rb.execute(
|
|
3668
|
-
|
|
3669
|
-
|
|
5640
|
+
postEmailMarketingSequences,
|
|
5641
|
+
{
|
|
5642
|
+
body: { data: { type: "email_marketing_sequence", attributes } }
|
|
5643
|
+
},
|
|
3670
5644
|
options
|
|
3671
5645
|
);
|
|
3672
5646
|
},
|
|
3673
|
-
|
|
5647
|
+
/** List sequences by workspace */
|
|
5648
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
3674
5649
|
return rb.execute(
|
|
3675
|
-
|
|
3676
|
-
|
|
5650
|
+
getEmailMarketingSequencesWorkspaceByWorkspaceId,
|
|
5651
|
+
{
|
|
5652
|
+
path: { workspace_id: workspaceId },
|
|
5653
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
5654
|
+
},
|
|
3677
5655
|
options
|
|
3678
5656
|
);
|
|
3679
5657
|
},
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
rb.createPaginatedFetcher(
|
|
3683
|
-
getNotificationLogs,
|
|
3684
|
-
(page, pageSize) => ({
|
|
3685
|
-
query: { page: { number: page, size: pageSize } }
|
|
3686
|
-
}),
|
|
3687
|
-
options
|
|
3688
|
-
)
|
|
3689
|
-
);
|
|
3690
|
-
},
|
|
3691
|
-
get: async (id, options) => {
|
|
5658
|
+
/** Resume a paused sequence */
|
|
5659
|
+
resume: async (id, options) => {
|
|
3692
5660
|
return rb.execute(
|
|
3693
|
-
|
|
3694
|
-
{ path: { id } },
|
|
5661
|
+
patchEmailMarketingSequencesByIdResume,
|
|
5662
|
+
{ path: { id }, body: {} },
|
|
3695
5663
|
options
|
|
3696
5664
|
);
|
|
3697
|
-
}
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
},
|
|
3738
|
-
options
|
|
3739
|
-
);
|
|
3740
|
-
},
|
|
3741
|
-
get: async (id, options) => {
|
|
3742
|
-
return rb.execute(
|
|
3743
|
-
getNotificationMethodsById,
|
|
3744
|
-
{ path: { id } },
|
|
3745
|
-
options
|
|
3746
|
-
);
|
|
3747
|
-
}
|
|
3748
|
-
},
|
|
3749
|
-
preferences: {
|
|
3750
|
-
delete: async (id, options) => {
|
|
3751
|
-
return rb.executeDelete(
|
|
3752
|
-
deleteNotificationPreferencesById,
|
|
3753
|
-
{ path: { id } },
|
|
3754
|
-
options
|
|
3755
|
-
);
|
|
3756
|
-
},
|
|
3757
|
-
list: async (options) => {
|
|
3758
|
-
return rb.execute(
|
|
3759
|
-
getNotificationPreferences,
|
|
3760
|
-
buildPageQuery(options?.page, options?.pageSize),
|
|
3761
|
-
options
|
|
3762
|
-
);
|
|
3763
|
-
},
|
|
3764
|
-
listAll: async (options) => {
|
|
3765
|
-
return paginateToArray(
|
|
3766
|
-
rb.createPaginatedFetcher(
|
|
3767
|
-
getNotificationPreferences,
|
|
3768
|
-
(page, pageSize) => ({
|
|
3769
|
-
query: { page: { number: page, size: pageSize } }
|
|
3770
|
-
}),
|
|
3771
|
-
options
|
|
3772
|
-
)
|
|
3773
|
-
);
|
|
3774
|
-
},
|
|
3775
|
-
create: async (attributes, options) => {
|
|
3776
|
-
return rb.execute(
|
|
3777
|
-
postNotificationPreferences,
|
|
3778
|
-
{ body: { data: { type: "notification_preference", attributes } } },
|
|
3779
|
-
options
|
|
3780
|
-
);
|
|
3781
|
-
},
|
|
3782
|
-
update: async (id, attributes, options) => {
|
|
3783
|
-
return rb.execute(
|
|
3784
|
-
patchNotificationPreferencesById,
|
|
3785
|
-
{
|
|
3786
|
-
path: { id },
|
|
3787
|
-
body: {
|
|
3788
|
-
data: { id, type: "notification_preference", attributes }
|
|
3789
|
-
}
|
|
3790
|
-
},
|
|
3791
|
-
options
|
|
3792
|
-
);
|
|
3793
|
-
},
|
|
3794
|
-
get: async (id, options) => {
|
|
3795
|
-
return rb.execute(
|
|
3796
|
-
getNotificationPreferencesById,
|
|
3797
|
-
{ path: { id } },
|
|
3798
|
-
options
|
|
3799
|
-
);
|
|
3800
|
-
}
|
|
5665
|
+
}
|
|
5666
|
+
}
|
|
5667
|
+
};
|
|
5668
|
+
}
|
|
5669
|
+
|
|
5670
|
+
// src/namespaces/support.ts
|
|
5671
|
+
function createSupportNamespace(_rb) {
|
|
5672
|
+
return {
|
|
5673
|
+
/**
|
|
5674
|
+
* Tickets — customer support tickets
|
|
5675
|
+
*/
|
|
5676
|
+
tickets: {
|
|
5677
|
+
/** List tickets with pagination */
|
|
5678
|
+
list: async (_options) => {
|
|
5679
|
+
throw new Error("Tickets list not yet implemented in SDK");
|
|
5680
|
+
},
|
|
5681
|
+
/** Get a ticket by ID */
|
|
5682
|
+
get: async (_id, _options) => {
|
|
5683
|
+
throw new Error("Ticket get not yet implemented in SDK");
|
|
5684
|
+
},
|
|
5685
|
+
/** Create a new ticket */
|
|
5686
|
+
create: async (_attributes, _options) => {
|
|
5687
|
+
throw new Error("Ticket create not yet implemented in SDK");
|
|
5688
|
+
},
|
|
5689
|
+
/** Update a ticket */
|
|
5690
|
+
update: async (_id, _attributes, _options) => {
|
|
5691
|
+
throw new Error("Ticket update not yet implemented in SDK");
|
|
5692
|
+
},
|
|
5693
|
+
/** Add a message to a ticket */
|
|
5694
|
+
addMessage: async (_ticketId, _attributes, _options) => {
|
|
5695
|
+
throw new Error("Ticket add message not yet implemented in SDK");
|
|
5696
|
+
}
|
|
5697
|
+
},
|
|
5698
|
+
/**
|
|
5699
|
+
* Queues — ticket routing containers
|
|
5700
|
+
*/
|
|
5701
|
+
queues: {
|
|
5702
|
+
/** List queues */
|
|
5703
|
+
list: async (_options) => {
|
|
5704
|
+
throw new Error("Queues list not yet implemented in SDK");
|
|
3801
5705
|
}
|
|
3802
5706
|
}
|
|
3803
5707
|
};
|
|
@@ -4096,11 +6000,11 @@ function createExtractionNamespace(rb) {
|
|
|
4096
6000
|
* });
|
|
4097
6001
|
* console.log(`${result.filtered} of ${result.total} rows match`);
|
|
4098
6002
|
*/
|
|
4099
|
-
query: async (resultId, params, options) => {
|
|
6003
|
+
query: async (resultId, params = {}, options) => {
|
|
4100
6004
|
return rb.rawPost(
|
|
4101
6005
|
`/extraction/results/${resultId}/query`,
|
|
4102
6006
|
{
|
|
4103
|
-
filters: params.filters,
|
|
6007
|
+
filters: params.filters ?? [],
|
|
4104
6008
|
limit: params.limit,
|
|
4105
6009
|
offset: params.offset
|
|
4106
6010
|
},
|
|
@@ -4976,9 +6880,17 @@ function createPlatformNamespace(rb) {
|
|
|
4976
6880
|
},
|
|
4977
6881
|
/** Update workspace member profile attributes (G9) */
|
|
4978
6882
|
updateProfile: async (workspaceId, memberId, profileAttrs, options) => {
|
|
4979
|
-
return rb.
|
|
4980
|
-
|
|
4981
|
-
{
|
|
6883
|
+
return rb.execute(
|
|
6884
|
+
patchWorkspaceMembershipsByWorkspaceIdByUserIdProfile,
|
|
6885
|
+
{
|
|
6886
|
+
path: { workspace_id: workspaceId, user_id: memberId },
|
|
6887
|
+
body: {
|
|
6888
|
+
data: {
|
|
6889
|
+
type: "workspace-membership",
|
|
6890
|
+
attributes: { profile_attributes: profileAttrs }
|
|
6891
|
+
}
|
|
6892
|
+
}
|
|
6893
|
+
},
|
|
4982
6894
|
options
|
|
4983
6895
|
);
|
|
4984
6896
|
},
|
|
@@ -5818,7 +7730,16 @@ function createVoiceNamespace(rb) {
|
|
|
5818
7730
|
options
|
|
5819
7731
|
);
|
|
5820
7732
|
},
|
|
5821
|
-
/**
|
|
7733
|
+
/**
|
|
7734
|
+
* End a voice session and release the LiveKit room.
|
|
7735
|
+
*
|
|
7736
|
+
* @param id - Voice session ID to end
|
|
7737
|
+
* @param options - Request options
|
|
7738
|
+
*
|
|
7739
|
+
* @note Session stop is fully server-controlled. No attributes are accepted
|
|
7740
|
+
* in the request body — `status` is set to `"ended"` and `ended_at` is set
|
|
7741
|
+
* automatically. Passing extra attributes will result in a 422 error.
|
|
7742
|
+
*/
|
|
5822
7743
|
stop: async (id, options) => {
|
|
5823
7744
|
return rb.execute(
|
|
5824
7745
|
patchVoiceSessionsByIdStop,
|
|
@@ -6341,7 +8262,7 @@ var RequestBuilder = class {
|
|
|
6341
8262
|
() => this.clientInstance.post({
|
|
6342
8263
|
url,
|
|
6343
8264
|
headers,
|
|
6344
|
-
...body !== void 0 && { body
|
|
8265
|
+
...body !== void 0 && { body },
|
|
6345
8266
|
...options?.signal && { signal: options.signal }
|
|
6346
8267
|
})
|
|
6347
8268
|
);
|
|
@@ -6485,7 +8406,15 @@ var GptClient = class extends BaseClient {
|
|
|
6485
8406
|
this.agents = createAgentsNamespace(rb);
|
|
6486
8407
|
this.ai = createAiNamespace(rb);
|
|
6487
8408
|
this.billing = createBillingNamespace(rb);
|
|
8409
|
+
this.catalog = createCatalogNamespace(rb);
|
|
8410
|
+
this.channels = createChannelsNamespace(rb);
|
|
6488
8411
|
this.communication = createCommunicationNamespace(rb);
|
|
8412
|
+
this.connectors = createConnectorsNamespace(rb);
|
|
8413
|
+
this.crawler = createCrawlerNamespace(rb);
|
|
8414
|
+
this.crm = createCrmNamespace(rb);
|
|
8415
|
+
this.dataStore = createDataStoreNamespace(rb);
|
|
8416
|
+
this.emailMarketing = createEmailMarketingNamespace(rb);
|
|
8417
|
+
this.support = createSupportNamespace(rb);
|
|
6489
8418
|
this.extraction = createExtractionNamespace(rb);
|
|
6490
8419
|
this.identity = createIdentityNamespace(rb, this.config?.baseUrl);
|
|
6491
8420
|
this.platform = createPlatformNamespace(rb);
|