@amigo-ai/platform-sdk 0.15.1 → 0.17.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/README.md +41 -1
- package/dist/index.cjs +8 -9
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +8 -9
- package/dist/index.mjs.map +2 -2
- package/dist/resources/conversations.js +3 -1
- package/dist/resources/conversations.js.map +1 -1
- package/dist/types/generated/api.d.ts +245 -12
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/resources/calls.d.ts +6 -0
- package/dist/types/resources/calls.d.ts.map +1 -1
- package/dist/types/resources/conversations.d.ts +6 -0
- package/dist/types/resources/conversations.d.ts.map +1 -1
- package/dist/types/resources/functions.d.ts.map +1 -1
- package/dist/types/resources/metrics.d.ts.map +1 -1
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1877,15 +1877,12 @@ var ConversationsResource = class extends WorkspaceScopedResource {
|
|
|
1877
1877
|
}
|
|
1878
1878
|
async createTurn(conversationId, request) {
|
|
1879
1879
|
return extractData(
|
|
1880
|
-
await this.client.POST(
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
body: request
|
|
1887
|
-
}
|
|
1888
|
-
)
|
|
1880
|
+
await this.client.POST("/v1/{workspace_id}/conversations/{conversation_id}/turns", {
|
|
1881
|
+
params: {
|
|
1882
|
+
path: { workspace_id: this.workspaceId, conversation_id: conversationId }
|
|
1883
|
+
},
|
|
1884
|
+
body: request
|
|
1885
|
+
})
|
|
1889
1886
|
);
|
|
1890
1887
|
}
|
|
1891
1888
|
/** Build the real-time text WebSocket URL for browser or custom clients. */
|
|
@@ -1914,6 +1911,7 @@ function buildTextStreamUrl({
|
|
|
1914
1911
|
serviceId: serviceId2,
|
|
1915
1912
|
conversationId,
|
|
1916
1913
|
entityId: entityId2,
|
|
1914
|
+
toolEvents,
|
|
1917
1915
|
token,
|
|
1918
1916
|
textStreamUrl: textStreamUrlOverride
|
|
1919
1917
|
}) {
|
|
@@ -1922,6 +1920,7 @@ function buildTextStreamUrl({
|
|
|
1922
1920
|
url.searchParams.set("service_id", serviceId2);
|
|
1923
1921
|
if (conversationId) url.searchParams.set("conversation_id", conversationId);
|
|
1924
1922
|
if (entityId2) url.searchParams.set("entity_id", entityId2);
|
|
1923
|
+
if (toolEvents) url.searchParams.set("tool_events", "true");
|
|
1925
1924
|
if (token !== void 0)
|
|
1926
1925
|
url.searchParams.set("token", validateTextStreamAuthToken(token, "token"));
|
|
1927
1926
|
return url;
|