@vapi-ai/web 3.0.0 → 3.1.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 +11 -1
- package/api.ts +8610 -5557
- package/dist/api.d.ts +6568 -4374
- package/dist/api.js +345 -17
- package/dist/jest.config.js +3 -0
- package/dist/vapi.d.ts +46 -3
- package/dist/vapi.js +157 -95
- package/package.json +2 -2
- package/vapi.ts +224 -126
package/dist/api.js
CHANGED
|
@@ -218,6 +218,24 @@ class Api extends HttpClient {
|
|
|
218
218
|
format: "json",
|
|
219
219
|
...params,
|
|
220
220
|
}),
|
|
221
|
+
/**
|
|
222
|
+
* No description
|
|
223
|
+
*
|
|
224
|
+
* @tags Assistants
|
|
225
|
+
* @name AssistantControllerValidateBackgroundSoundUrl
|
|
226
|
+
* @summary Validate Background Sound URL
|
|
227
|
+
* @request POST:/assistant/background-sound/validate
|
|
228
|
+
* @secure
|
|
229
|
+
*/
|
|
230
|
+
assistantControllerValidateBackgroundSoundUrl: (data, params = {}) => this.request({
|
|
231
|
+
path: `/assistant/background-sound/validate`,
|
|
232
|
+
method: "POST",
|
|
233
|
+
body: data,
|
|
234
|
+
secure: true,
|
|
235
|
+
type: ContentType.Json,
|
|
236
|
+
format: "json",
|
|
237
|
+
...params,
|
|
238
|
+
}),
|
|
221
239
|
/**
|
|
222
240
|
* No description
|
|
223
241
|
*
|
|
@@ -441,6 +459,24 @@ class Api extends HttpClient {
|
|
|
441
459
|
format: "json",
|
|
442
460
|
...params,
|
|
443
461
|
}),
|
|
462
|
+
/**
|
|
463
|
+
* No description
|
|
464
|
+
*
|
|
465
|
+
* @tags Assistants
|
|
466
|
+
* @name AssistantControllerUpsertDraft
|
|
467
|
+
* @summary Upsert Assistant Draft
|
|
468
|
+
* @request PUT:/assistant/{id}/draft
|
|
469
|
+
* @secure
|
|
470
|
+
*/
|
|
471
|
+
assistantControllerUpsertDraft: (id, data, params = {}) => this.request({
|
|
472
|
+
path: `/assistant/${id}/draft`,
|
|
473
|
+
method: "PUT",
|
|
474
|
+
body: data,
|
|
475
|
+
secure: true,
|
|
476
|
+
type: ContentType.Json,
|
|
477
|
+
format: "json",
|
|
478
|
+
...params,
|
|
479
|
+
}),
|
|
444
480
|
/**
|
|
445
481
|
* No description
|
|
446
482
|
*
|
|
@@ -680,6 +716,23 @@ class Api extends HttpClient {
|
|
|
680
716
|
format: "json",
|
|
681
717
|
...params,
|
|
682
718
|
}),
|
|
719
|
+
/**
|
|
720
|
+
* No description
|
|
721
|
+
*
|
|
722
|
+
* @tags Files
|
|
723
|
+
* @name FileV2ControllerFindAllPaginated
|
|
724
|
+
* @summary List Files with pagination
|
|
725
|
+
* @request GET:/v2/file
|
|
726
|
+
* @secure
|
|
727
|
+
*/
|
|
728
|
+
fileV2ControllerFindAllPaginated: (query, params = {}) => this.request({
|
|
729
|
+
path: `/v2/file`,
|
|
730
|
+
method: "GET",
|
|
731
|
+
query: query,
|
|
732
|
+
secure: true,
|
|
733
|
+
format: "json",
|
|
734
|
+
...params,
|
|
735
|
+
}),
|
|
683
736
|
/**
|
|
684
737
|
* No description
|
|
685
738
|
*
|
|
@@ -918,6 +971,56 @@ class Api extends HttpClient {
|
|
|
918
971
|
format: "json",
|
|
919
972
|
...params,
|
|
920
973
|
}),
|
|
974
|
+
/**
|
|
975
|
+
* @description Returns the version history for the squad.
|
|
976
|
+
*
|
|
977
|
+
* @tags Squads
|
|
978
|
+
* @name SquadControllerFindAllVersions
|
|
979
|
+
* @summary List Squad Versions
|
|
980
|
+
* @request GET:/squad/{id}/versions
|
|
981
|
+
* @secure
|
|
982
|
+
*/
|
|
983
|
+
squadControllerFindAllVersions: (id, query, params = {}) => this.request({
|
|
984
|
+
path: `/squad/${id}/versions`,
|
|
985
|
+
method: "GET",
|
|
986
|
+
query: query,
|
|
987
|
+
secure: true,
|
|
988
|
+
format: "json",
|
|
989
|
+
...params,
|
|
990
|
+
}),
|
|
991
|
+
/**
|
|
992
|
+
* No description
|
|
993
|
+
*
|
|
994
|
+
* @tags Squads
|
|
995
|
+
* @name SquadControllerFindOneVersion
|
|
996
|
+
* @summary Get Squad Version
|
|
997
|
+
* @request GET:/squad/{id}/versions/{version}
|
|
998
|
+
* @secure
|
|
999
|
+
*/
|
|
1000
|
+
squadControllerFindOneVersion: (id, version, query, params = {}) => this.request({
|
|
1001
|
+
path: `/squad/${id}/versions/${version}`,
|
|
1002
|
+
method: "GET",
|
|
1003
|
+
query: query,
|
|
1004
|
+
secure: true,
|
|
1005
|
+
format: "json",
|
|
1006
|
+
...params,
|
|
1007
|
+
}),
|
|
1008
|
+
/**
|
|
1009
|
+
* @description Deletes the selected version and rolls the squad back to the highest remaining live version. Deleting a version that is already deleted returns 200 with that version.
|
|
1010
|
+
*
|
|
1011
|
+
* @tags Squads
|
|
1012
|
+
* @name SquadControllerSoftDeleteVersion
|
|
1013
|
+
* @summary Delete Squad Version
|
|
1014
|
+
* @request DELETE:/squad/{id}/versions/{version}
|
|
1015
|
+
* @secure
|
|
1016
|
+
*/
|
|
1017
|
+
squadControllerSoftDeleteVersion: (id, version, params = {}) => this.request({
|
|
1018
|
+
path: `/squad/${id}/versions/${version}`,
|
|
1019
|
+
method: "DELETE",
|
|
1020
|
+
secure: true,
|
|
1021
|
+
format: "json",
|
|
1022
|
+
...params,
|
|
1023
|
+
}),
|
|
921
1024
|
};
|
|
922
1025
|
workflow = {
|
|
923
1026
|
/**
|
|
@@ -1235,6 +1338,41 @@ class Api extends HttpClient {
|
|
|
1235
1338
|
secure: true,
|
|
1236
1339
|
...params,
|
|
1237
1340
|
}),
|
|
1341
|
+
/**
|
|
1342
|
+
* No description
|
|
1343
|
+
*
|
|
1344
|
+
* @tags Calls
|
|
1345
|
+
* @name GoalEvaluationCurrentControllerCurrentGet
|
|
1346
|
+
* @summary Get the current goal evaluation for a call
|
|
1347
|
+
* @request GET:/call/{id}/goal-evaluation
|
|
1348
|
+
* @secure
|
|
1349
|
+
*/
|
|
1350
|
+
goalEvaluationCurrentControllerCurrentGet: (id, query, params = {}) => this.request({
|
|
1351
|
+
path: `/call/${id}/goal-evaluation`,
|
|
1352
|
+
method: "GET",
|
|
1353
|
+
query: query,
|
|
1354
|
+
secure: true,
|
|
1355
|
+
format: "json",
|
|
1356
|
+
...params,
|
|
1357
|
+
}),
|
|
1358
|
+
/**
|
|
1359
|
+
* No description
|
|
1360
|
+
*
|
|
1361
|
+
* @tags Calls
|
|
1362
|
+
* @name GoalEvaluationCurrentControllerCurrentBatchGet
|
|
1363
|
+
* @summary Get current goal evaluations for up to 100 call/goal pairs
|
|
1364
|
+
* @request POST:/call/goal-evaluation/batch
|
|
1365
|
+
* @secure
|
|
1366
|
+
*/
|
|
1367
|
+
goalEvaluationCurrentControllerCurrentBatchGet: (data, params = {}) => this.request({
|
|
1368
|
+
path: `/call/goal-evaluation/batch`,
|
|
1369
|
+
method: "POST",
|
|
1370
|
+
body: data,
|
|
1371
|
+
secure: true,
|
|
1372
|
+
type: ContentType.Json,
|
|
1373
|
+
format: "json",
|
|
1374
|
+
...params,
|
|
1375
|
+
}),
|
|
1238
1376
|
};
|
|
1239
1377
|
chat = {
|
|
1240
1378
|
/**
|
|
@@ -1565,6 +1703,93 @@ class Api extends HttpClient {
|
|
|
1565
1703
|
...params,
|
|
1566
1704
|
}),
|
|
1567
1705
|
};
|
|
1706
|
+
trafficAllocations = {
|
|
1707
|
+
/**
|
|
1708
|
+
* @description Creates a new traffic allocation for an assistant, replacing the one currently in effect. To start or adjust a split, send targets naming published versions (such as "v7") with percentages totaling 100; allocationIntent is inferred as 'explicit'. To stop splitting and send every call to the newest published version, send allocationIntent 'follow-latest' with no targets field; stopping always names its intent, so a dropped targets field can never end a split by accident.
|
|
1709
|
+
*
|
|
1710
|
+
* @tags Traffic Allocations
|
|
1711
|
+
* @name TrafficAllocationControllerCreate
|
|
1712
|
+
* @summary Create traffic allocation
|
|
1713
|
+
* @request POST:/traffic-allocations
|
|
1714
|
+
* @secure
|
|
1715
|
+
*/
|
|
1716
|
+
trafficAllocationControllerCreate: (data, params = {}) => this.request({
|
|
1717
|
+
path: `/traffic-allocations`,
|
|
1718
|
+
method: "POST",
|
|
1719
|
+
body: data,
|
|
1720
|
+
secure: true,
|
|
1721
|
+
type: ContentType.Json,
|
|
1722
|
+
format: "json",
|
|
1723
|
+
...params,
|
|
1724
|
+
}),
|
|
1725
|
+
/**
|
|
1726
|
+
* @description The append-only history of an assistant's allocations, newest first.
|
|
1727
|
+
*
|
|
1728
|
+
* @tags Traffic Allocations
|
|
1729
|
+
* @name TrafficAllocationControllerFindAllPaginated
|
|
1730
|
+
* @summary List traffic allocations
|
|
1731
|
+
* @request GET:/traffic-allocations
|
|
1732
|
+
* @secure
|
|
1733
|
+
*/
|
|
1734
|
+
trafficAllocationControllerFindAllPaginated: (query, params = {}) => this.request({
|
|
1735
|
+
path: `/traffic-allocations`,
|
|
1736
|
+
method: "GET",
|
|
1737
|
+
query: query,
|
|
1738
|
+
secure: true,
|
|
1739
|
+
format: "json",
|
|
1740
|
+
...params,
|
|
1741
|
+
}),
|
|
1742
|
+
/**
|
|
1743
|
+
* @description The allocation currently in effect for the assistant, with its targets. The response carries no allocation field when traffic splitting has never been configured.
|
|
1744
|
+
*
|
|
1745
|
+
* @tags Traffic Allocations
|
|
1746
|
+
* @name TrafficAllocationControllerLatestGet
|
|
1747
|
+
* @summary Get latest traffic allocation
|
|
1748
|
+
* @request GET:/traffic-allocations/latest
|
|
1749
|
+
* @secure
|
|
1750
|
+
*/
|
|
1751
|
+
trafficAllocationControllerLatestGet: (query, params = {}) => this.request({
|
|
1752
|
+
path: `/traffic-allocations/latest`,
|
|
1753
|
+
method: "GET",
|
|
1754
|
+
query: query,
|
|
1755
|
+
secure: true,
|
|
1756
|
+
format: "json",
|
|
1757
|
+
...params,
|
|
1758
|
+
}),
|
|
1759
|
+
/**
|
|
1760
|
+
* @description Per-assistant-version call metrics over a time window: call counts, configured vs actual traffic share, duration, cost per minute, latency, ended reasons, a bucketed timeseries, and optional structured output aggregations. Calls with no assistant version are reported as an 'unversioned' row.
|
|
1761
|
+
*
|
|
1762
|
+
* @tags Traffic Allocations
|
|
1763
|
+
* @name TrafficAllocationControllerMetricsGet
|
|
1764
|
+
* @summary Get traffic split metrics
|
|
1765
|
+
* @request GET:/traffic-allocations/metrics
|
|
1766
|
+
* @secure
|
|
1767
|
+
*/
|
|
1768
|
+
trafficAllocationControllerMetricsGet: (query, params = {}) => this.request({
|
|
1769
|
+
path: `/traffic-allocations/metrics`,
|
|
1770
|
+
method: "GET",
|
|
1771
|
+
query: query,
|
|
1772
|
+
secure: true,
|
|
1773
|
+
format: "json",
|
|
1774
|
+
...params,
|
|
1775
|
+
}),
|
|
1776
|
+
/**
|
|
1777
|
+
* @description Returns a single allocation by id, including its targets and actor attribution.
|
|
1778
|
+
*
|
|
1779
|
+
* @tags Traffic Allocations
|
|
1780
|
+
* @name TrafficAllocationControllerFindOne
|
|
1781
|
+
* @summary Get traffic allocation
|
|
1782
|
+
* @request GET:/traffic-allocations/{id}
|
|
1783
|
+
* @secure
|
|
1784
|
+
*/
|
|
1785
|
+
trafficAllocationControllerFindOne: (id, params = {}) => this.request({
|
|
1786
|
+
path: `/traffic-allocations/${id}`,
|
|
1787
|
+
method: "GET",
|
|
1788
|
+
secure: true,
|
|
1789
|
+
format: "json",
|
|
1790
|
+
...params,
|
|
1791
|
+
}),
|
|
1792
|
+
};
|
|
1568
1793
|
phoneNumber = {
|
|
1569
1794
|
/**
|
|
1570
1795
|
* @description Use POST /phone-number instead.
|
|
@@ -1862,6 +2087,22 @@ class Api extends HttpClient {
|
|
|
1862
2087
|
format: "json",
|
|
1863
2088
|
...params,
|
|
1864
2089
|
}),
|
|
2090
|
+
/**
|
|
2091
|
+
* @description Restores the selected version as the current configuration and publishes it as a new version. Deletes any drafts for this tool.
|
|
2092
|
+
*
|
|
2093
|
+
* @tags Tools
|
|
2094
|
+
* @name ToolControllerToolVersionRestore
|
|
2095
|
+
* @summary Restore Tool Version
|
|
2096
|
+
* @request POST:/tool/{id}/restore/{version}
|
|
2097
|
+
* @secure
|
|
2098
|
+
*/
|
|
2099
|
+
toolControllerToolVersionRestore: (id, version, params = {}) => this.request({
|
|
2100
|
+
path: `/tool/${id}/restore/${version}`,
|
|
2101
|
+
method: "POST",
|
|
2102
|
+
secure: true,
|
|
2103
|
+
format: "json",
|
|
2104
|
+
...params,
|
|
2105
|
+
}),
|
|
1865
2106
|
/**
|
|
1866
2107
|
* No description
|
|
1867
2108
|
*
|
|
@@ -2826,7 +3067,7 @@ class Api extends HttpClient {
|
|
|
2826
3067
|
...params,
|
|
2827
3068
|
}),
|
|
2828
3069
|
/**
|
|
2829
|
-
*
|
|
3070
|
+
* @description Returns a pagination envelope when page, limit, name, assistantId, or squadId is supplied; otherwise returns the legacy array.
|
|
2830
3071
|
*
|
|
2831
3072
|
* @tags Simulation Suites
|
|
2832
3073
|
* @name SimulationSuiteControllerFindAll
|
|
@@ -2842,6 +3083,22 @@ class Api extends HttpClient {
|
|
|
2842
3083
|
format: "json",
|
|
2843
3084
|
...params,
|
|
2844
3085
|
}),
|
|
3086
|
+
/**
|
|
3087
|
+
* No description
|
|
3088
|
+
*
|
|
3089
|
+
* @tags Simulation Suites
|
|
3090
|
+
* @name SimulationSuiteControllerDuplicate
|
|
3091
|
+
* @summary Duplicate simulation suite
|
|
3092
|
+
* @request POST:/eval/simulation/suite/{id}/duplicate
|
|
3093
|
+
* @secure
|
|
3094
|
+
*/
|
|
3095
|
+
simulationSuiteControllerDuplicate: (id, params = {}) => this.request({
|
|
3096
|
+
path: `/eval/simulation/suite/${id}/duplicate`,
|
|
3097
|
+
method: "POST",
|
|
3098
|
+
secure: true,
|
|
3099
|
+
format: "json",
|
|
3100
|
+
...params,
|
|
3101
|
+
}),
|
|
2845
3102
|
/**
|
|
2846
3103
|
* No description
|
|
2847
3104
|
*
|
|
@@ -2910,6 +3167,60 @@ class Api extends HttpClient {
|
|
|
2910
3167
|
format: "json",
|
|
2911
3168
|
...params,
|
|
2912
3169
|
}),
|
|
3170
|
+
/**
|
|
3171
|
+
* @description Generate draft test requirements from an assistant's prompt, tools, and handoff configuration. The response includes numbered requirements describing expected behavior and open questions about behavior that needs clarification. Use this endpoint before generating a simulation suite. Review the requirements and resolve any open questions. To revise a draft, send it as `previousDraft` together with natural-language `feedback` describing the changes or answers. Once the requirements are ready, pass them to `POST /eval/simulation/onboarding/suite`. Requests can take up to 2 minutes. Each organization can draft requirements 60 times per UTC day, shared with the dashboard. A 429 `SIMULATION_ONBOARDING_QUOTA_EXCEEDED` response means the daily limit has been reached. Wait until the limit resets at 00:00 UTC before retrying.
|
|
3172
|
+
*
|
|
3173
|
+
* @tags Simulation Suites
|
|
3174
|
+
* @name SimulationOnboardingControllerRequirementsDraft
|
|
3175
|
+
* @summary Draft simulation requirements
|
|
3176
|
+
* @request POST:/eval/simulation/onboarding/requirements
|
|
3177
|
+
* @secure
|
|
3178
|
+
*/
|
|
3179
|
+
simulationOnboardingControllerRequirementsDraft: (data, params = {}) => this.request({
|
|
3180
|
+
path: `/eval/simulation/onboarding/requirements`,
|
|
3181
|
+
method: "POST",
|
|
3182
|
+
body: data,
|
|
3183
|
+
secure: true,
|
|
3184
|
+
type: ContentType.Json,
|
|
3185
|
+
format: "json",
|
|
3186
|
+
...params,
|
|
3187
|
+
}),
|
|
3188
|
+
/**
|
|
3189
|
+
* @description Generate and save a simulation suite from reviewed test requirements, and assign it to an assistant. First draft requirements with `POST /eval/simulation/onboarding/requirements`. The response includes the saved suite, its simulations, and requirement coverage, including any gaps. Requests can take up to 3 minutes. Set a client timeout of at least 200 seconds. Use a unique `idempotencyKey` for each suite generation request. Retrying with the same key does not create a duplicate suite: - On a timeout or a 5xx (502, 504, 524), retry with the same key. You get the saved suite, a 409 while it is still generating, or a fresh generation if the first one never saved. - On a 409 `SIMULATION_ONBOARDING_GENERATION_IN_PROGRESS`, the first request is still generating. Wait `Retry-After` seconds (15) and retry with the same key. - On a 409 `SIMULATION_ONBOARDING_IDEMPOTENCY_KEY_REUSED`, the key was used for a different assistant or requirements. Send a new key. Review the generated simulations and coverage gaps. Revise the suite with `PATCH /eval/simulation/onboarding/suite/{suiteId}`, then run it with `POST /eval/simulation/run`. Each organization can generate 20 suites per UTC day, shared with the dashboard, and 2 at a time. A retry that returns a saved suite does not count toward these limits. On a 429 `SIMULATION_ONBOARDING_CONCURRENCY_LIMITED`, wait `Retry-After` seconds (30) before retrying. On a 429 `SIMULATION_ONBOARDING_QUOTA_EXCEEDED`, wait until the daily limit resets at 00:00 UTC before retrying.
|
|
3190
|
+
*
|
|
3191
|
+
* @tags Simulation Suites
|
|
3192
|
+
* @name SimulationOnboardingControllerSuiteCreate
|
|
3193
|
+
* @summary Generate a simulation suite
|
|
3194
|
+
* @request POST:/eval/simulation/onboarding/suite
|
|
3195
|
+
* @secure
|
|
3196
|
+
*/
|
|
3197
|
+
simulationOnboardingControllerSuiteCreate: (data, params = {}) => this.request({
|
|
3198
|
+
path: `/eval/simulation/onboarding/suite`,
|
|
3199
|
+
method: "POST",
|
|
3200
|
+
body: data,
|
|
3201
|
+
secure: true,
|
|
3202
|
+
type: ContentType.Json,
|
|
3203
|
+
format: "json",
|
|
3204
|
+
...params,
|
|
3205
|
+
}),
|
|
3206
|
+
/**
|
|
3207
|
+
* @description Revise a suite created by `POST /eval/simulation/onboarding/suite`. Remove simulations, rewrite scenarios using natural-language instructions, or set `retryFailed` to regenerate scenarios that failed or exceeded generation limits. The response includes the updated suite and requirement coverage. Requests can take up to 2 minutes. Send a new `patchKey` for each edit. Replaying an applied key changes nothing and returns the current suite, with `failedEditSimulationIds` listing the simulations that edit could not rewrite, so retry a timeout or a 5xx with the same key. A suite remembers its last 50 keys, so never reuse one. Each organization can make 60 edits per UTC day, shared with the dashboard. Requests that only remove simulations and replays of applied edits do not count toward this limit. On a 429 `SIMULATION_ONBOARDING_QUOTA_EXCEEDED`, wait until the daily limit resets at 00:00 UTC before retrying.
|
|
3208
|
+
*
|
|
3209
|
+
* @tags Simulation Suites
|
|
3210
|
+
* @name SimulationOnboardingControllerSuiteUpdate
|
|
3211
|
+
* @summary Edit a generated simulation suite
|
|
3212
|
+
* @request PATCH:/eval/simulation/onboarding/suite/{suiteId}
|
|
3213
|
+
* @secure
|
|
3214
|
+
*/
|
|
3215
|
+
simulationOnboardingControllerSuiteUpdate: (suiteId, data, params = {}) => this.request({
|
|
3216
|
+
path: `/eval/simulation/onboarding/suite/${suiteId}`,
|
|
3217
|
+
method: "PATCH",
|
|
3218
|
+
body: data,
|
|
3219
|
+
secure: true,
|
|
3220
|
+
type: ContentType.Json,
|
|
3221
|
+
format: "json",
|
|
3222
|
+
...params,
|
|
3223
|
+
}),
|
|
2913
3224
|
/**
|
|
2914
3225
|
* No description
|
|
2915
3226
|
*
|
|
@@ -2945,6 +3256,22 @@ class Api extends HttpClient {
|
|
|
2945
3256
|
format: "json",
|
|
2946
3257
|
...params,
|
|
2947
3258
|
}),
|
|
3259
|
+
/**
|
|
3260
|
+
* No description
|
|
3261
|
+
*
|
|
3262
|
+
* @tags Simulations
|
|
3263
|
+
* @name SimulationControllerGetConcurrency
|
|
3264
|
+
* @summary Get Simulation Concurrency
|
|
3265
|
+
* @request GET:/eval/simulation/concurrency
|
|
3266
|
+
* @secure
|
|
3267
|
+
*/
|
|
3268
|
+
simulationControllerGetConcurrency: (params = {}) => this.request({
|
|
3269
|
+
path: `/eval/simulation/concurrency`,
|
|
3270
|
+
method: "GET",
|
|
3271
|
+
secure: true,
|
|
3272
|
+
format: "json",
|
|
3273
|
+
...params,
|
|
3274
|
+
}),
|
|
2948
3275
|
/**
|
|
2949
3276
|
* No description
|
|
2950
3277
|
*
|
|
@@ -2995,22 +3322,6 @@ class Api extends HttpClient {
|
|
|
2995
3322
|
format: "json",
|
|
2996
3323
|
...params,
|
|
2997
3324
|
}),
|
|
2998
|
-
/**
|
|
2999
|
-
* No description
|
|
3000
|
-
*
|
|
3001
|
-
* @tags Simulations
|
|
3002
|
-
* @name SimulationControllerGetConcurrency
|
|
3003
|
-
* @summary Get Simulation Concurrency
|
|
3004
|
-
* @request GET:/eval/simulation/concurrency
|
|
3005
|
-
* @secure
|
|
3006
|
-
*/
|
|
3007
|
-
simulationControllerGetConcurrency: (params = {}) => this.request({
|
|
3008
|
-
path: `/eval/simulation/concurrency`,
|
|
3009
|
-
method: "GET",
|
|
3010
|
-
secure: true,
|
|
3011
|
-
format: "json",
|
|
3012
|
-
...params,
|
|
3013
|
-
}),
|
|
3014
3325
|
/**
|
|
3015
3326
|
* No description
|
|
3016
3327
|
*
|
|
@@ -3143,6 +3454,7 @@ class Api extends HttpClient {
|
|
|
3143
3454
|
body: data,
|
|
3144
3455
|
secure: true,
|
|
3145
3456
|
type: ContentType.Json,
|
|
3457
|
+
format: "json",
|
|
3146
3458
|
...params,
|
|
3147
3459
|
}),
|
|
3148
3460
|
/**
|
|
@@ -3526,6 +3838,22 @@ class Api extends HttpClient {
|
|
|
3526
3838
|
format: "json",
|
|
3527
3839
|
...params,
|
|
3528
3840
|
}),
|
|
3841
|
+
/**
|
|
3842
|
+
* @description Returns the call concurrency limits and API rate limit usage for the authenticated org. Read-only and cheap enough to poll every few seconds. The X-RateLimit-* response headers describe this endpoint's own polling ceiling, not the API budget reported in apiLimits.
|
|
3843
|
+
*
|
|
3844
|
+
* @tags Orgs
|
|
3845
|
+
* @name OrgControllerLimitsGet
|
|
3846
|
+
* @summary Get org limits
|
|
3847
|
+
* @request GET:/org/limits
|
|
3848
|
+
* @secure
|
|
3849
|
+
*/
|
|
3850
|
+
orgControllerLimitsGet: (params = {}) => this.request({
|
|
3851
|
+
path: `/org/limits`,
|
|
3852
|
+
method: "GET",
|
|
3853
|
+
secure: true,
|
|
3854
|
+
format: "json",
|
|
3855
|
+
...params,
|
|
3856
|
+
}),
|
|
3529
3857
|
/**
|
|
3530
3858
|
* No description
|
|
3531
3859
|
*
|
package/dist/jest.config.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const config = {
|
|
4
4
|
preset: 'ts-jest',
|
|
5
|
+
transform: {
|
|
6
|
+
'^.+\\.tsx?$': ['ts-jest', { tsconfig: { types: ['jest', 'node'] } }],
|
|
7
|
+
},
|
|
5
8
|
testEnvironment: 'node',
|
|
6
9
|
// Your Jest configuration options here
|
|
7
10
|
// For example, to match test files:
|
package/dist/vapi.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChatCompletionMessageParam } from 'openai/resources';
|
|
2
2
|
import { DailyCall, DailyAdvancedConfig, DailyFactoryOptions, DailyEventObjectNoPayload, DailyEventObjectRecordingError, DailyEventObjectRecordingStarted, DailyEventObjectRecordingStopped, DailyParticipant, DailyVideoSendSettings } from '@daily-co/daily-js';
|
|
3
3
|
import EventEmitter from 'events';
|
|
4
|
-
import { Call, CreateSquadDTO, CreateAssistantDTO, AssistantOverrides, CreateWorkflowDTO, WorkflowOverrides } from './api';
|
|
4
|
+
import { Call, CreateSquadDTO, CreateAssistantDTO, AssistantOverrides, CreateWebCallDTO, CreateWorkflowDTO, WorkflowOverrides } from './api';
|
|
5
5
|
export interface EndCallMessage {
|
|
6
6
|
type: 'end-call';
|
|
7
7
|
}
|
|
@@ -69,7 +69,10 @@ type VapiEventListeners = {
|
|
|
69
69
|
'recording-error': (event: DailyEventObjectRecordingError) => void;
|
|
70
70
|
'recording-upload-completed': (event: DailyEventObjectNoPayload) => void;
|
|
71
71
|
};
|
|
72
|
+
type VideoRecordingStartMode = NonNullable<CreateWebCallDTO['videoRecordingStartMode']>;
|
|
72
73
|
type StartCallOptions = {
|
|
74
|
+
/** Acquire the microphone before creating a backend call. Defaults to true. */
|
|
75
|
+
microphonePreflightEnabled?: boolean;
|
|
73
76
|
/**
|
|
74
77
|
* This determines whether the daily room will be deleted and all participants will be kicked once the user leaves the room.
|
|
75
78
|
* If set to `false`, the room will be kept alive even after the user leaves, allowing clients to reconnect to the same room.
|
|
@@ -79,6 +82,25 @@ type StartCallOptions = {
|
|
|
79
82
|
* @example true
|
|
80
83
|
*/
|
|
81
84
|
roomDeleteOnUserLeaveEnabled?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* This determines who starts the video recording. Only applies when video
|
|
87
|
+
* recording is enabled (`artifactPlan.videoRecordingEnabled`).
|
|
88
|
+
*
|
|
89
|
+
* - `client`: the web client starts the recording when it joins.
|
|
90
|
+
* - `server`: Vapi starts the recording once the user has joined, so a weak
|
|
91
|
+
* client connection can't stop it from starting. If Vapi can't set up the
|
|
92
|
+
* server-side start, or the start itself fails, the SDK emits
|
|
93
|
+
* `recording-error`.
|
|
94
|
+
*
|
|
95
|
+
* In `server` mode the SDK never calls `startRecording()` itself. If the
|
|
96
|
+
* server-side start couldn't be set up, calling it yourself may still start
|
|
97
|
+
* the recording.
|
|
98
|
+
*
|
|
99
|
+
* Requires a Vapi API that supports this field; older servers reject the
|
|
100
|
+
* request. The server defaults to `client` when it is not set.
|
|
101
|
+
* @example "server"
|
|
102
|
+
*/
|
|
103
|
+
videoRecordingStartMode?: VideoRecordingStartMode;
|
|
82
104
|
};
|
|
83
105
|
type WebCall = {
|
|
84
106
|
/**
|
|
@@ -111,13 +133,21 @@ type WebCall = {
|
|
|
111
133
|
};
|
|
112
134
|
/**
|
|
113
135
|
* The Vapi WebCall transport. When video recording is enabled, the server
|
|
114
|
-
* sets `callToken` to
|
|
115
|
-
* recording on join
|
|
136
|
+
* sets `callToken` to the Daily meeting token to join with. In `client` mode
|
|
137
|
+
* the token auto-starts the cloud recording on join; in `server` mode it
|
|
138
|
+
* starts nothing and Vapi starts the recording. If there is no token, the
|
|
139
|
+
* SDK emits `recording-error` and starts nothing, though `startRecording()`
|
|
140
|
+
* may still start the recording from the client.
|
|
141
|
+
*
|
|
142
|
+
* `videoRecordingStartMode` is `server` when Vapi starts the recording, and
|
|
143
|
+
* is absent when video recording is off or the server-side start couldn't
|
|
144
|
+
* be set up.
|
|
116
145
|
*
|
|
117
146
|
* call.transport
|
|
118
147
|
*/
|
|
119
148
|
transport?: {
|
|
120
149
|
callToken?: string;
|
|
150
|
+
videoRecordingStartMode?: VideoRecordingStartMode;
|
|
121
151
|
};
|
|
122
152
|
};
|
|
123
153
|
declare class VapiEventEmitter extends EventEmitter {
|
|
@@ -138,6 +168,9 @@ export default class Vapi extends VapiEventEmitter {
|
|
|
138
168
|
private speakingTimeout;
|
|
139
169
|
private dailyCallConfig;
|
|
140
170
|
private dailyCallObject;
|
|
171
|
+
private microphoneTrack;
|
|
172
|
+
private cancelMicrophonePreflight;
|
|
173
|
+
private microphoneAcquire;
|
|
141
174
|
private hasEmittedCallEndedStatus;
|
|
142
175
|
constructor(apiToken: string, apiBaseUrl?: string, dailyCallConfig?: Pick<DailyAdvancedConfig, 'avoidEval' | 'alwaysIncludeMicInPermissionPrompt'>, dailyCallObject?: Pick<DailyFactoryOptions, 'audioSource' | 'startAudioOff'>);
|
|
143
176
|
private cleanup;
|
|
@@ -215,6 +248,16 @@ export default class Vapi extends VapiEventEmitter {
|
|
|
215
248
|
* which EventEmitter throws on when nothing is listening.
|
|
216
249
|
*/
|
|
217
250
|
private emitToConsumer;
|
|
251
|
+
/**
|
|
252
|
+
* Reported in a later task, like Daily's own recording-error: start() or
|
|
253
|
+
* reconnect() has resolved and the caller's await continuation has run, so a
|
|
254
|
+
* listener registered right after it still hears this, and one that calls
|
|
255
|
+
* stop() can't interrupt call setup. Skipped if that call was stopped or
|
|
256
|
+
* replaced.
|
|
257
|
+
*/
|
|
258
|
+
private recordingTokenMissingReportSchedule;
|
|
259
|
+
/** The fields are read defensively: the app message is untrusted JSON. */
|
|
260
|
+
private videoRecordingStartFailedReport;
|
|
218
261
|
/** Drops the reference before removing, so nothing hands out a detached element. */
|
|
219
262
|
private detachAudioPlayer;
|
|
220
263
|
/**
|