@getsupervisor/agents-studio-sdk 1.41.1-beta.166 → 1.41.1-beta.167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -71
- package/dist/index.d.ts +10 -71
- package/dist/index.js +7 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -51,7 +51,6 @@ __export(index_exports, {
|
|
|
51
51
|
createClient: () => createClient,
|
|
52
52
|
createDocumentsApi: () => createDocumentsApi,
|
|
53
53
|
createHttp: () => createHttp,
|
|
54
|
-
createMessageTemplatesApi: () => createMessageTemplatesApi,
|
|
55
54
|
createSipTrunksApi: () => createSipTrunksApi,
|
|
56
55
|
createToolsApi: () => createToolsApi,
|
|
57
56
|
createUsageApi: () => createUsageApi,
|
|
@@ -1843,39 +1842,6 @@ function createDocumentsApi(cfg) {
|
|
|
1843
1842
|
};
|
|
1844
1843
|
}
|
|
1845
1844
|
|
|
1846
|
-
// src/api/message-templates.ts
|
|
1847
|
-
function createMessageTemplatesApi(cfg) {
|
|
1848
|
-
const { base, doFetch } = createHttp(cfg);
|
|
1849
|
-
const jsonHeaders = { "content-type": "application/json" };
|
|
1850
|
-
return {
|
|
1851
|
-
async getConnection() {
|
|
1852
|
-
const res = await doFetch(`${base}/message-templates/connection`, {
|
|
1853
|
-
method: "GET"
|
|
1854
|
-
});
|
|
1855
|
-
return res.json();
|
|
1856
|
-
},
|
|
1857
|
-
async list(channel) {
|
|
1858
|
-
const query = buildSearchParams([["channel", channel]]);
|
|
1859
|
-
const res = await doFetch(`${base}/message-templates`, {
|
|
1860
|
-
method: "GET",
|
|
1861
|
-
query
|
|
1862
|
-
});
|
|
1863
|
-
return res.json();
|
|
1864
|
-
},
|
|
1865
|
-
async create(payload) {
|
|
1866
|
-
const res = await doFetch(`${base}/message-templates`, {
|
|
1867
|
-
method: "POST",
|
|
1868
|
-
body: JSON.stringify(payload),
|
|
1869
|
-
headers: jsonHeaders
|
|
1870
|
-
});
|
|
1871
|
-
return res.json();
|
|
1872
|
-
},
|
|
1873
|
-
async remove(id) {
|
|
1874
|
-
await doFetch(`${base}/message-templates/${id}`, { method: "DELETE" });
|
|
1875
|
-
}
|
|
1876
|
-
};
|
|
1877
|
-
}
|
|
1878
|
-
|
|
1879
1845
|
// src/api/sip-trunks.ts
|
|
1880
1846
|
function createSipTrunksApi(cfg) {
|
|
1881
1847
|
const { base, doFetch } = createHttp(cfg);
|
|
@@ -2085,14 +2051,21 @@ function createToolsApi(cfg) {
|
|
|
2085
2051
|
}
|
|
2086
2052
|
);
|
|
2087
2053
|
return res.json();
|
|
2054
|
+
},
|
|
2055
|
+
async deleteConnection(toolAgentConnectionId) {
|
|
2056
|
+
await doFetch(`${base}/tools/connections/${toolAgentConnectionId}`, {
|
|
2057
|
+
method: "DELETE"
|
|
2058
|
+
});
|
|
2088
2059
|
}
|
|
2089
2060
|
};
|
|
2090
2061
|
const connections = {
|
|
2091
2062
|
connect: api.connect,
|
|
2092
2063
|
create: api.createConnection,
|
|
2064
|
+
delete: api.deleteConnection,
|
|
2093
2065
|
execute: api.executeConnection,
|
|
2094
2066
|
list: api.listConnections,
|
|
2095
2067
|
createConnection: api.createConnection,
|
|
2068
|
+
deleteConnection: api.deleteConnection,
|
|
2096
2069
|
executeConnection: api.executeConnection
|
|
2097
2070
|
};
|
|
2098
2071
|
return {
|
|
@@ -2688,7 +2661,6 @@ function createClient(initialCfg) {
|
|
|
2688
2661
|
templates: catalogTemplatesApi
|
|
2689
2662
|
},
|
|
2690
2663
|
documents: createDocumentsApi(runtimeCfg),
|
|
2691
|
-
messageTemplates: createMessageTemplatesApi(runtimeCfg),
|
|
2692
2664
|
campaigns: createCampaignsApi(runtimeCfg),
|
|
2693
2665
|
voices: voicesApi,
|
|
2694
2666
|
apiKeys: apiKeysApi,
|
|
@@ -2787,7 +2759,6 @@ function createClient(initialCfg) {
|
|
|
2787
2759
|
createClient,
|
|
2788
2760
|
createDocumentsApi,
|
|
2789
2761
|
createHttp,
|
|
2790
|
-
createMessageTemplatesApi,
|
|
2791
2762
|
createSipTrunksApi,
|
|
2792
2763
|
createToolsApi,
|
|
2793
2764
|
createUsageApi,
|