@amigo-ai/platform-sdk 0.81.0 → 0.83.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/api.md +1 -9
- package/dist/index.cjs +22 -73
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +0 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -73
- package/dist/index.mjs.map +4 -4
- package/dist/resources/sessions.js +18 -1
- package/dist/resources/sessions.js.map +1 -1
- package/dist/types/generated/api.d.ts +538 -958
- package/dist/types/generated/api.d.ts.map +1 -1
- package/dist/types/index.d.cts +0 -4
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.ts +0 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resources/external-integrations.d.ts.map +1 -1
- package/dist/types/resources/intake.d.ts.map +1 -1
- package/dist/types/resources/integrations.d.ts.map +1 -1
- package/dist/types/resources/metrics.d.ts.map +1 -1
- package/dist/types/resources/operators.d.ts.map +1 -1
- package/dist/types/resources/services.d.ts.map +1 -1
- package/dist/types/resources/sessions.d.ts +26 -0
- package/dist/types/resources/sessions.d.ts.map +1 -1
- package/dist/types/resources/settings.d.ts.map +1 -1
- package/dist/types/resources/surfaces.d.ts.map +1 -1
- package/dist/types/resources/triggers.d.ts +36 -12
- package/dist/types/resources/triggers.d.ts.map +1 -1
- package/dist/types/resources/world.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/resources/channels/index.js +0 -27
- package/dist/resources/channels/index.js.map +0 -1
- package/dist/resources/channels/ses-setup.js +0 -62
- package/dist/resources/channels/ses-setup.js.map +0 -1
- package/dist/types/resources/channels/index.d.ts +0 -26
- package/dist/types/resources/channels/index.d.ts.map +0 -1
- package/dist/types/resources/channels/ses-setup.d.ts +0 -49
- package/dist/types/resources/channels/ses-setup.d.ts.map +0 -1
package/api.md
CHANGED
|
@@ -261,15 +261,6 @@ All workspace-scoped resources also expose `withOptions(options)`.
|
|
|
261
261
|
- `textStreamUrl`
|
|
262
262
|
- `sessionConnectUrl`
|
|
263
263
|
|
|
264
|
-
### `channels`
|
|
265
|
-
|
|
266
|
-
**`channels.sesSetup`**
|
|
267
|
-
|
|
268
|
-
- `create`
|
|
269
|
-
- `get`
|
|
270
|
-
- `verify`
|
|
271
|
-
- `delete`
|
|
272
|
-
|
|
273
264
|
### `integrations`
|
|
274
265
|
|
|
275
266
|
- `create`
|
|
@@ -550,6 +541,7 @@ All workspace-scoped resources also expose `withOptions(options)`.
|
|
|
550
541
|
### `sessions`
|
|
551
542
|
|
|
552
543
|
- `listActive`
|
|
544
|
+
- `getFleetStatus`
|
|
553
545
|
- `inject`
|
|
554
546
|
|
|
555
547
|
### `workspaceDatabase`
|
package/dist/index.cjs
CHANGED
|
@@ -34,7 +34,6 @@ __export(index_exports, {
|
|
|
34
34
|
AmigoError: () => AmigoError,
|
|
35
35
|
AuthenticationError: () => AuthenticationError,
|
|
36
36
|
BadRequestError: () => BadRequestError,
|
|
37
|
-
ChannelsResource: () => ChannelsResource,
|
|
38
37
|
ConfigurationError: () => ConfigurationError,
|
|
39
38
|
ConflictError: () => ConflictError,
|
|
40
39
|
DEFAULT_BASE_URL: () => DEFAULT_BASE_URL,
|
|
@@ -58,7 +57,6 @@ __export(index_exports, {
|
|
|
58
57
|
STT_PROVIDERS: () => STT_PROVIDERS,
|
|
59
58
|
ServerError: () => ServerError,
|
|
60
59
|
ServiceUnavailableError: () => ServiceUnavailableError,
|
|
61
|
-
SesSetupResource: () => SesSetupResource,
|
|
62
60
|
TTS_PROVIDERS: () => TTS_PROVIDERS,
|
|
63
61
|
TokenManager: () => TokenManager,
|
|
64
62
|
TokensResource: () => TokensResource,
|
|
@@ -2688,75 +2686,6 @@ function parseTurnStreamFrame(eventName, dataJson) {
|
|
|
2688
2686
|
return { ...payload, event: eventName };
|
|
2689
2687
|
}
|
|
2690
2688
|
|
|
2691
|
-
// src/resources/channels/ses-setup.ts
|
|
2692
|
-
var SesSetupResource = class extends WorkspaceScopedResource {
|
|
2693
|
-
/**
|
|
2694
|
-
* Create an SES tenant + verified domain identity for this workspace.
|
|
2695
|
-
*
|
|
2696
|
-
* Returns the DNS records the customer must publish at their DNS provider.
|
|
2697
|
-
* The setup is unusable for sending until every record's ``verified`` flag
|
|
2698
|
-
* flips to ``true`` (call ``verify`` after publishing DNS to refresh).
|
|
2699
|
-
*/
|
|
2700
|
-
async create(body) {
|
|
2701
|
-
return extractData(
|
|
2702
|
-
await this.client.POST("/v1/{workspace_id}/channels/ses-setup", {
|
|
2703
|
-
params: { path: { workspace_id: this.workspaceId } },
|
|
2704
|
-
body
|
|
2705
|
-
})
|
|
2706
|
-
);
|
|
2707
|
-
}
|
|
2708
|
-
/**
|
|
2709
|
-
* Get an SES setup with a live DNS verification refresh.
|
|
2710
|
-
*
|
|
2711
|
-
* Channel-manager re-runs ``GetEmailIdentity`` + DMARC/MX resolvers on
|
|
2712
|
-
* every call, so each ``get`` is a live check rather than a cache read.
|
|
2713
|
-
*/
|
|
2714
|
-
async get(setupId) {
|
|
2715
|
-
return extractData(
|
|
2716
|
-
await this.client.GET("/v1/{workspace_id}/channels/ses-setup/{setup_id}", {
|
|
2717
|
-
params: { path: { workspace_id: this.workspaceId, setup_id: setupId } }
|
|
2718
|
-
})
|
|
2719
|
-
);
|
|
2720
|
-
}
|
|
2721
|
-
/**
|
|
2722
|
-
* Explicit DNS refresh — equivalent to ``get`` but exposed as a POST so UI
|
|
2723
|
-
* "Verify now" actions read as actions rather than reads.
|
|
2724
|
-
*/
|
|
2725
|
-
async verify(setupId) {
|
|
2726
|
-
return extractData(
|
|
2727
|
-
await this.client.POST("/v1/{workspace_id}/channels/ses-setup/{setup_id}/verify", {
|
|
2728
|
-
params: { path: { workspace_id: this.workspaceId, setup_id: setupId } }
|
|
2729
|
-
})
|
|
2730
|
-
);
|
|
2731
|
-
}
|
|
2732
|
-
/**
|
|
2733
|
-
* Tear down the upstream SES tenant + identity and soft-delete the
|
|
2734
|
-
* workspace binding. Throws ``ConflictError`` (HTTP 409) if any use case
|
|
2735
|
-
* still references the setup — delete those use cases first.
|
|
2736
|
-
*
|
|
2737
|
-
* Routed through ``extractData`` so 4xx/5xx responses surface as typed
|
|
2738
|
-
* SDK errors (matching every other resource's ``delete``); the
|
|
2739
|
-
* ``ConflictError`` mapping fires here instead of relying on the
|
|
2740
|
-
* underlying client's accidental throw.
|
|
2741
|
-
*/
|
|
2742
|
-
async delete(setupId) {
|
|
2743
|
-
return extractData(
|
|
2744
|
-
await this.client.DELETE("/v1/{workspace_id}/channels/ses-setup/{setup_id}", {
|
|
2745
|
-
params: { path: { workspace_id: this.workspaceId, setup_id: setupId } }
|
|
2746
|
-
})
|
|
2747
|
-
);
|
|
2748
|
-
}
|
|
2749
|
-
};
|
|
2750
|
-
|
|
2751
|
-
// src/resources/channels/index.ts
|
|
2752
|
-
var ChannelsResource = class extends WorkspaceScopedResource {
|
|
2753
|
-
sesSetup;
|
|
2754
|
-
constructor(client, workspaceId2) {
|
|
2755
|
-
super(client, workspaceId2);
|
|
2756
|
-
this.sesSetup = new SesSetupResource(client, workspaceId2);
|
|
2757
|
-
}
|
|
2758
|
-
};
|
|
2759
|
-
|
|
2760
2689
|
// src/resources/integrations.ts
|
|
2761
2690
|
var IntegrationsResource = class extends WorkspaceScopedResource {
|
|
2762
2691
|
// ─── Integrations ─────────────────────────────────────────────────────────
|
|
@@ -5352,6 +5281,28 @@ var SessionsResource = class extends WorkspaceScopedResource {
|
|
|
5352
5281
|
})
|
|
5353
5282
|
);
|
|
5354
5283
|
}
|
|
5284
|
+
/**
|
|
5285
|
+
* Live Agones fleet capacity (workspace-global) — Ready/Allocated/total
|
|
5286
|
+
* GameServers plus headroom against the maxReplicas ceiling. `fleet`
|
|
5287
|
+
* selects the voice fleet (default) or the isolated `tool-runner` fleet;
|
|
5288
|
+
* omitted, the server defaults to voice. Operator-only.
|
|
5289
|
+
*
|
|
5290
|
+
* The `fleet` query param is typed locally until the generated spec picks
|
|
5291
|
+
* it up via sdk-sync; the response schema is already generated.
|
|
5292
|
+
*/
|
|
5293
|
+
async getFleetStatus(opts) {
|
|
5294
|
+
return extractData(
|
|
5295
|
+
await untypedClient(this.client).GET(
|
|
5296
|
+
"/v1/{workspace_id}/sessions/fleet-status",
|
|
5297
|
+
{
|
|
5298
|
+
params: {
|
|
5299
|
+
path: { workspace_id: this.workspaceId },
|
|
5300
|
+
query: opts?.fleet === void 0 ? void 0 : { fleet: opts.fleet }
|
|
5301
|
+
}
|
|
5302
|
+
}
|
|
5303
|
+
)
|
|
5304
|
+
);
|
|
5305
|
+
}
|
|
5355
5306
|
/** Inject a one-shot directive (text/audio) into a live call session */
|
|
5356
5307
|
async inject(callSid, body) {
|
|
5357
5308
|
return extractData(
|
|
@@ -6171,7 +6122,6 @@ var AmigoClient = class _AmigoClient {
|
|
|
6171
6122
|
world;
|
|
6172
6123
|
calls;
|
|
6173
6124
|
conversations;
|
|
6174
|
-
channels;
|
|
6175
6125
|
integrations;
|
|
6176
6126
|
externalIntegrations;
|
|
6177
6127
|
analytics;
|
|
@@ -6309,7 +6259,6 @@ var AmigoClient = class _AmigoClient {
|
|
|
6309
6259
|
mutable.world = new WorldResource(client, workspaceId2);
|
|
6310
6260
|
mutable.calls = new CallsResource(client, workspaceId2);
|
|
6311
6261
|
mutable.conversations = new ConversationsResource(client, workspaceId2, agentBaseUrl);
|
|
6312
|
-
mutable.channels = new ChannelsResource(client, workspaceId2);
|
|
6313
6262
|
mutable.integrations = new IntegrationsResource(client, workspaceId2);
|
|
6314
6263
|
mutable.externalIntegrations = new ExternalIntegrationsResource(client, workspaceId2);
|
|
6315
6264
|
mutable.analytics = new AnalyticsResource(client, workspaceId2);
|