@soat/sdk 0.4.3 → 0.4.4
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/esm/index.js +120 -49
- package/dist/index.d.cts +179 -115
- package/dist/index.d.ts +179 -115
- package/dist/index.js +121 -48
- package/package.json +3 -1
package/dist/esm/index.js
CHANGED
|
@@ -1022,7 +1022,7 @@ var AgentTools = class {
|
|
|
1022
1022
|
scheme: "bearer",
|
|
1023
1023
|
type: "http"
|
|
1024
1024
|
}],
|
|
1025
|
-
url: "/agents/tools/{
|
|
1025
|
+
url: "/agents/tools/{tool_id}",
|
|
1026
1026
|
...options
|
|
1027
1027
|
});
|
|
1028
1028
|
}
|
|
@@ -1037,7 +1037,7 @@ var AgentTools = class {
|
|
|
1037
1037
|
scheme: "bearer",
|
|
1038
1038
|
type: "http"
|
|
1039
1039
|
}],
|
|
1040
|
-
url: "/agents/tools/{
|
|
1040
|
+
url: "/agents/tools/{tool_id}",
|
|
1041
1041
|
...options
|
|
1042
1042
|
});
|
|
1043
1043
|
}
|
|
@@ -1052,7 +1052,7 @@ var AgentTools = class {
|
|
|
1052
1052
|
scheme: "bearer",
|
|
1053
1053
|
type: "http"
|
|
1054
1054
|
}],
|
|
1055
|
-
url: "/agents/tools/{
|
|
1055
|
+
url: "/agents/tools/{tool_id}",
|
|
1056
1056
|
...options,
|
|
1057
1057
|
headers: {
|
|
1058
1058
|
"Content-Type": "application/json",
|
|
@@ -1091,7 +1091,7 @@ var AgentTraces = class {
|
|
|
1091
1091
|
scheme: "bearer",
|
|
1092
1092
|
type: "http"
|
|
1093
1093
|
}],
|
|
1094
|
-
url: "/agents/traces/{
|
|
1094
|
+
url: "/agents/traces/{trace_id}",
|
|
1095
1095
|
...options
|
|
1096
1096
|
});
|
|
1097
1097
|
}
|
|
@@ -1145,7 +1145,7 @@ var Agents = class {
|
|
|
1145
1145
|
scheme: "bearer",
|
|
1146
1146
|
type: "http"
|
|
1147
1147
|
}],
|
|
1148
|
-
url: "/agents/{
|
|
1148
|
+
url: "/agents/{agent_id}",
|
|
1149
1149
|
...options
|
|
1150
1150
|
});
|
|
1151
1151
|
}
|
|
@@ -1160,7 +1160,7 @@ var Agents = class {
|
|
|
1160
1160
|
scheme: "bearer",
|
|
1161
1161
|
type: "http"
|
|
1162
1162
|
}],
|
|
1163
|
-
url: "/agents/{
|
|
1163
|
+
url: "/agents/{agent_id}",
|
|
1164
1164
|
...options
|
|
1165
1165
|
});
|
|
1166
1166
|
}
|
|
@@ -1175,7 +1175,7 @@ var Agents = class {
|
|
|
1175
1175
|
scheme: "bearer",
|
|
1176
1176
|
type: "http"
|
|
1177
1177
|
}],
|
|
1178
|
-
url: "/agents/{
|
|
1178
|
+
url: "/agents/{agent_id}",
|
|
1179
1179
|
...options,
|
|
1180
1180
|
headers: {
|
|
1181
1181
|
"Content-Type": "application/json",
|
|
@@ -1195,7 +1195,7 @@ var Agents = class {
|
|
|
1195
1195
|
scheme: "bearer",
|
|
1196
1196
|
type: "http"
|
|
1197
1197
|
}],
|
|
1198
|
-
url: "/agents/{
|
|
1198
|
+
url: "/agents/{agent_id}/generate",
|
|
1199
1199
|
...options,
|
|
1200
1200
|
headers: {
|
|
1201
1201
|
"Content-Type": "application/json",
|
|
@@ -1215,7 +1215,7 @@ var Agents = class {
|
|
|
1215
1215
|
scheme: "bearer",
|
|
1216
1216
|
type: "http"
|
|
1217
1217
|
}],
|
|
1218
|
-
url: "/agents/{
|
|
1218
|
+
url: "/agents/{agent_id}/generate/{generation_id}/tool-outputs",
|
|
1219
1219
|
...options,
|
|
1220
1220
|
headers: {
|
|
1221
1221
|
"Content-Type": "application/json",
|
|
@@ -1230,7 +1230,7 @@ var Agents = class {
|
|
|
1230
1230
|
*/
|
|
1231
1231
|
static createAgentActor(options) {
|
|
1232
1232
|
return (options.client ?? client).post({
|
|
1233
|
-
url: "/agents/{
|
|
1233
|
+
url: "/agents/{agent_id}/actors",
|
|
1234
1234
|
...options,
|
|
1235
1235
|
headers: {
|
|
1236
1236
|
"Content-Type": "application/json",
|
|
@@ -1276,7 +1276,7 @@ var AiProviders = class {
|
|
|
1276
1276
|
*/
|
|
1277
1277
|
static deleteAiProvider(options) {
|
|
1278
1278
|
return (options.client ?? client).delete({
|
|
1279
|
-
url: "/ai-providers/{
|
|
1279
|
+
url: "/ai-providers/{ai_provider_id}",
|
|
1280
1280
|
...options
|
|
1281
1281
|
});
|
|
1282
1282
|
}
|
|
@@ -1287,7 +1287,7 @@ var AiProviders = class {
|
|
|
1287
1287
|
*/
|
|
1288
1288
|
static getAiProvider(options) {
|
|
1289
1289
|
return (options.client ?? client).get({
|
|
1290
|
-
url: "/ai-providers/{
|
|
1290
|
+
url: "/ai-providers/{ai_provider_id}",
|
|
1291
1291
|
...options
|
|
1292
1292
|
});
|
|
1293
1293
|
}
|
|
@@ -1298,7 +1298,7 @@ var AiProviders = class {
|
|
|
1298
1298
|
*/
|
|
1299
1299
|
static updateAiProvider(options) {
|
|
1300
1300
|
return (options.client ?? client).patch({
|
|
1301
|
-
url: "/ai-providers/{
|
|
1301
|
+
url: "/ai-providers/{ai_provider_id}",
|
|
1302
1302
|
...options,
|
|
1303
1303
|
headers: {
|
|
1304
1304
|
"Content-Type": "application/json",
|
|
@@ -1430,7 +1430,7 @@ var Chats = class {
|
|
|
1430
1430
|
scheme: "bearer",
|
|
1431
1431
|
type: "http"
|
|
1432
1432
|
}],
|
|
1433
|
-
url: "/chats/{
|
|
1433
|
+
url: "/chats/{chat_id}",
|
|
1434
1434
|
...options
|
|
1435
1435
|
});
|
|
1436
1436
|
}
|
|
@@ -1445,7 +1445,7 @@ var Chats = class {
|
|
|
1445
1445
|
scheme: "bearer",
|
|
1446
1446
|
type: "http"
|
|
1447
1447
|
}],
|
|
1448
|
-
url: "/chats/{
|
|
1448
|
+
url: "/chats/{chat_id}",
|
|
1449
1449
|
...options
|
|
1450
1450
|
});
|
|
1451
1451
|
}
|
|
@@ -1461,7 +1461,7 @@ var Chats = class {
|
|
|
1461
1461
|
scheme: "bearer",
|
|
1462
1462
|
type: "http"
|
|
1463
1463
|
}],
|
|
1464
|
-
url: "/chats/{
|
|
1464
|
+
url: "/chats/{chat_id}/completions",
|
|
1465
1465
|
...options,
|
|
1466
1466
|
headers: {
|
|
1467
1467
|
"Content-Type": "application/json",
|
|
@@ -1496,7 +1496,7 @@ var Chats = class {
|
|
|
1496
1496
|
*/
|
|
1497
1497
|
static createChatActor(options) {
|
|
1498
1498
|
return (options.client ?? client).post({
|
|
1499
|
-
url: "/chats/{
|
|
1499
|
+
url: "/chats/{chat_id}/actors",
|
|
1500
1500
|
...options,
|
|
1501
1501
|
headers: {
|
|
1502
1502
|
"Content-Type": "application/json",
|
|
@@ -1635,7 +1635,7 @@ var Conversations = class {
|
|
|
1635
1635
|
*/
|
|
1636
1636
|
static removeConversationMessage(options) {
|
|
1637
1637
|
return (options.client ?? client).delete({
|
|
1638
|
-
url: "/conversations/{id}/messages/{
|
|
1638
|
+
url: "/conversations/{id}/messages/{document_id}",
|
|
1639
1639
|
...options
|
|
1640
1640
|
});
|
|
1641
1641
|
}
|
|
@@ -2016,7 +2016,7 @@ var Policies = class {
|
|
|
2016
2016
|
scheme: "bearer",
|
|
2017
2017
|
type: "http"
|
|
2018
2018
|
}],
|
|
2019
|
-
url: "/policies/{
|
|
2019
|
+
url: "/policies/{policy_id}",
|
|
2020
2020
|
...options
|
|
2021
2021
|
});
|
|
2022
2022
|
}
|
|
@@ -2031,7 +2031,7 @@ var Policies = class {
|
|
|
2031
2031
|
scheme: "bearer",
|
|
2032
2032
|
type: "http"
|
|
2033
2033
|
}],
|
|
2034
|
-
url: "/policies/{
|
|
2034
|
+
url: "/policies/{policy_id}",
|
|
2035
2035
|
...options
|
|
2036
2036
|
});
|
|
2037
2037
|
}
|
|
@@ -2046,7 +2046,7 @@ var Policies = class {
|
|
|
2046
2046
|
scheme: "bearer",
|
|
2047
2047
|
type: "http"
|
|
2048
2048
|
}],
|
|
2049
|
-
url: "/policies/{
|
|
2049
|
+
url: "/policies/{policy_id}",
|
|
2050
2050
|
...options,
|
|
2051
2051
|
headers: {
|
|
2052
2052
|
"Content-Type": "application/json",
|
|
@@ -2085,7 +2085,7 @@ var Projects = class {
|
|
|
2085
2085
|
scheme: "bearer",
|
|
2086
2086
|
type: "http"
|
|
2087
2087
|
}],
|
|
2088
|
-
url: "/projects/{
|
|
2088
|
+
url: "/projects/{project_id}",
|
|
2089
2089
|
...options
|
|
2090
2090
|
});
|
|
2091
2091
|
}
|
|
@@ -2100,7 +2100,7 @@ var Projects = class {
|
|
|
2100
2100
|
scheme: "bearer",
|
|
2101
2101
|
type: "http"
|
|
2102
2102
|
}],
|
|
2103
|
-
url: "/projects/{
|
|
2103
|
+
url: "/projects/{project_id}",
|
|
2104
2104
|
...options
|
|
2105
2105
|
});
|
|
2106
2106
|
}
|
|
@@ -2142,7 +2142,7 @@ var Secrets = class {
|
|
|
2142
2142
|
*/
|
|
2143
2143
|
static deleteSecret(options) {
|
|
2144
2144
|
return (options.client ?? client).delete({
|
|
2145
|
-
url: "/secrets/{
|
|
2145
|
+
url: "/secrets/{secret_id}",
|
|
2146
2146
|
...options
|
|
2147
2147
|
});
|
|
2148
2148
|
}
|
|
@@ -2153,7 +2153,7 @@ var Secrets = class {
|
|
|
2153
2153
|
*/
|
|
2154
2154
|
static getSecret(options) {
|
|
2155
2155
|
return (options.client ?? client).get({
|
|
2156
|
-
url: "/secrets/{
|
|
2156
|
+
url: "/secrets/{secret_id}",
|
|
2157
2157
|
...options
|
|
2158
2158
|
});
|
|
2159
2159
|
}
|
|
@@ -2164,7 +2164,7 @@ var Secrets = class {
|
|
|
2164
2164
|
*/
|
|
2165
2165
|
static updateSecret(options) {
|
|
2166
2166
|
return (options.client ?? client).patch({
|
|
2167
|
-
url: "/secrets/{
|
|
2167
|
+
url: "/secrets/{secret_id}",
|
|
2168
2168
|
...options,
|
|
2169
2169
|
headers: {
|
|
2170
2170
|
"Content-Type": "application/json",
|
|
@@ -2188,7 +2188,7 @@ var Sessions = class {
|
|
|
2188
2188
|
scheme: "bearer",
|
|
2189
2189
|
type: "http"
|
|
2190
2190
|
}],
|
|
2191
|
-
url: "/agents/{
|
|
2191
|
+
url: "/agents/{agent_id}/sessions",
|
|
2192
2192
|
...options
|
|
2193
2193
|
});
|
|
2194
2194
|
}
|
|
@@ -2204,7 +2204,7 @@ var Sessions = class {
|
|
|
2204
2204
|
scheme: "bearer",
|
|
2205
2205
|
type: "http"
|
|
2206
2206
|
}],
|
|
2207
|
-
url: "/agents/{
|
|
2207
|
+
url: "/agents/{agent_id}/sessions",
|
|
2208
2208
|
...options,
|
|
2209
2209
|
headers: {
|
|
2210
2210
|
"Content-Type": "application/json",
|
|
@@ -2223,7 +2223,7 @@ var Sessions = class {
|
|
|
2223
2223
|
scheme: "bearer",
|
|
2224
2224
|
type: "http"
|
|
2225
2225
|
}],
|
|
2226
|
-
url: "/agents/{
|
|
2226
|
+
url: "/agents/{agent_id}/sessions/{session_id}",
|
|
2227
2227
|
...options
|
|
2228
2228
|
});
|
|
2229
2229
|
}
|
|
@@ -2238,7 +2238,7 @@ var Sessions = class {
|
|
|
2238
2238
|
scheme: "bearer",
|
|
2239
2239
|
type: "http"
|
|
2240
2240
|
}],
|
|
2241
|
-
url: "/agents/{
|
|
2241
|
+
url: "/agents/{agent_id}/sessions/{session_id}",
|
|
2242
2242
|
...options
|
|
2243
2243
|
});
|
|
2244
2244
|
}
|
|
@@ -2253,7 +2253,7 @@ var Sessions = class {
|
|
|
2253
2253
|
scheme: "bearer",
|
|
2254
2254
|
type: "http"
|
|
2255
2255
|
}],
|
|
2256
|
-
url: "/agents/{
|
|
2256
|
+
url: "/agents/{agent_id}/sessions/{session_id}",
|
|
2257
2257
|
...options,
|
|
2258
2258
|
headers: {
|
|
2259
2259
|
"Content-Type": "application/json",
|
|
@@ -2273,7 +2273,7 @@ var Sessions = class {
|
|
|
2273
2273
|
scheme: "bearer",
|
|
2274
2274
|
type: "http"
|
|
2275
2275
|
}],
|
|
2276
|
-
url: "/agents/{
|
|
2276
|
+
url: "/agents/{agent_id}/sessions/{session_id}/messages",
|
|
2277
2277
|
...options
|
|
2278
2278
|
});
|
|
2279
2279
|
}
|
|
@@ -2289,7 +2289,7 @@ var Sessions = class {
|
|
|
2289
2289
|
scheme: "bearer",
|
|
2290
2290
|
type: "http"
|
|
2291
2291
|
}],
|
|
2292
|
-
url: "/agents/{
|
|
2292
|
+
url: "/agents/{agent_id}/sessions/{session_id}/messages",
|
|
2293
2293
|
...options,
|
|
2294
2294
|
headers: {
|
|
2295
2295
|
"Content-Type": "application/json",
|
|
@@ -2309,7 +2309,7 @@ var Sessions = class {
|
|
|
2309
2309
|
scheme: "bearer",
|
|
2310
2310
|
type: "http"
|
|
2311
2311
|
}],
|
|
2312
|
-
url: "/agents/{
|
|
2312
|
+
url: "/agents/{agent_id}/sessions/{session_id}/generate",
|
|
2313
2313
|
...options,
|
|
2314
2314
|
headers: {
|
|
2315
2315
|
"Content-Type": "application/json",
|
|
@@ -2329,7 +2329,7 @@ var Sessions = class {
|
|
|
2329
2329
|
scheme: "bearer",
|
|
2330
2330
|
type: "http"
|
|
2331
2331
|
}],
|
|
2332
|
-
url: "/agents/{
|
|
2332
|
+
url: "/agents/{agent_id}/sessions/{session_id}/tool-outputs",
|
|
2333
2333
|
...options,
|
|
2334
2334
|
headers: {
|
|
2335
2335
|
"Content-Type": "application/json",
|
|
@@ -2348,7 +2348,7 @@ var Sessions = class {
|
|
|
2348
2348
|
scheme: "bearer",
|
|
2349
2349
|
type: "http"
|
|
2350
2350
|
}],
|
|
2351
|
-
url: "/agents/{
|
|
2351
|
+
url: "/agents/{agent_id}/sessions/{session_id}/tags",
|
|
2352
2352
|
...options
|
|
2353
2353
|
});
|
|
2354
2354
|
}
|
|
@@ -2363,7 +2363,7 @@ var Sessions = class {
|
|
|
2363
2363
|
scheme: "bearer",
|
|
2364
2364
|
type: "http"
|
|
2365
2365
|
}],
|
|
2366
|
-
url: "/agents/{
|
|
2366
|
+
url: "/agents/{agent_id}/sessions/{session_id}/tags",
|
|
2367
2367
|
...options,
|
|
2368
2368
|
headers: {
|
|
2369
2369
|
"Content-Type": "application/json",
|
|
@@ -2382,7 +2382,7 @@ var Sessions = class {
|
|
|
2382
2382
|
scheme: "bearer",
|
|
2383
2383
|
type: "http"
|
|
2384
2384
|
}],
|
|
2385
|
-
url: "/agents/{
|
|
2385
|
+
url: "/agents/{agent_id}/sessions/{session_id}/tags",
|
|
2386
2386
|
...options,
|
|
2387
2387
|
headers: {
|
|
2388
2388
|
"Content-Type": "application/json",
|
|
@@ -2484,7 +2484,7 @@ var Users = class {
|
|
|
2484
2484
|
scheme: "bearer",
|
|
2485
2485
|
type: "http"
|
|
2486
2486
|
}],
|
|
2487
|
-
url: "/users/{
|
|
2487
|
+
url: "/users/{user_id}/policies",
|
|
2488
2488
|
...options
|
|
2489
2489
|
});
|
|
2490
2490
|
}
|
|
@@ -2499,7 +2499,7 @@ var Users = class {
|
|
|
2499
2499
|
scheme: "bearer",
|
|
2500
2500
|
type: "http"
|
|
2501
2501
|
}],
|
|
2502
|
-
url: "/users/{
|
|
2502
|
+
url: "/users/{user_id}/policies",
|
|
2503
2503
|
...options,
|
|
2504
2504
|
headers: {
|
|
2505
2505
|
"Content-Type": "application/json",
|
|
@@ -2519,7 +2519,7 @@ var Webhooks = class {
|
|
|
2519
2519
|
*/
|
|
2520
2520
|
static listWebhooks(options) {
|
|
2521
2521
|
return (options.client ?? client).get({
|
|
2522
|
-
url: "/projects/{
|
|
2522
|
+
url: "/projects/{project_id}/webhooks",
|
|
2523
2523
|
...options
|
|
2524
2524
|
});
|
|
2525
2525
|
}
|
|
@@ -2530,7 +2530,7 @@ var Webhooks = class {
|
|
|
2530
2530
|
*/
|
|
2531
2531
|
static createWebhook(options) {
|
|
2532
2532
|
return (options.client ?? client).post({
|
|
2533
|
-
url: "/projects/{
|
|
2533
|
+
url: "/projects/{project_id}/webhooks",
|
|
2534
2534
|
...options,
|
|
2535
2535
|
headers: {
|
|
2536
2536
|
"Content-Type": "application/json",
|
|
@@ -2545,7 +2545,7 @@ var Webhooks = class {
|
|
|
2545
2545
|
*/
|
|
2546
2546
|
static deleteWebhook(options) {
|
|
2547
2547
|
return (options.client ?? client).delete({
|
|
2548
|
-
url: "/projects/{
|
|
2548
|
+
url: "/projects/{project_id}/webhooks/{webhook_id}",
|
|
2549
2549
|
...options
|
|
2550
2550
|
});
|
|
2551
2551
|
}
|
|
@@ -2556,7 +2556,7 @@ var Webhooks = class {
|
|
|
2556
2556
|
*/
|
|
2557
2557
|
static getWebhook(options) {
|
|
2558
2558
|
return (options.client ?? client).get({
|
|
2559
|
-
url: "/projects/{
|
|
2559
|
+
url: "/projects/{project_id}/webhooks/{webhook_id}",
|
|
2560
2560
|
...options
|
|
2561
2561
|
});
|
|
2562
2562
|
}
|
|
@@ -2567,7 +2567,7 @@ var Webhooks = class {
|
|
|
2567
2567
|
*/
|
|
2568
2568
|
static updateWebhook(options) {
|
|
2569
2569
|
return (options.client ?? client).put({
|
|
2570
|
-
url: "/projects/{
|
|
2570
|
+
url: "/projects/{project_id}/webhooks/{webhook_id}",
|
|
2571
2571
|
...options,
|
|
2572
2572
|
headers: {
|
|
2573
2573
|
"Content-Type": "application/json",
|
|
@@ -2582,7 +2582,7 @@ var Webhooks = class {
|
|
|
2582
2582
|
*/
|
|
2583
2583
|
static listWebhookDeliveries(options) {
|
|
2584
2584
|
return (options.client ?? client).get({
|
|
2585
|
-
url: "/projects/{
|
|
2585
|
+
url: "/projects/{project_id}/webhooks/{webhook_id}/deliveries",
|
|
2586
2586
|
...options
|
|
2587
2587
|
});
|
|
2588
2588
|
}
|
|
@@ -2593,7 +2593,7 @@ var Webhooks = class {
|
|
|
2593
2593
|
*/
|
|
2594
2594
|
static getWebhookDelivery(options) {
|
|
2595
2595
|
return (options.client ?? client).get({
|
|
2596
|
-
url: "/projects/{
|
|
2596
|
+
url: "/projects/{project_id}/webhooks/{webhook_id}/deliveries/{delivery_id}",
|
|
2597
2597
|
...options
|
|
2598
2598
|
});
|
|
2599
2599
|
}
|
|
@@ -2604,9 +2604,80 @@ var Webhooks = class {
|
|
|
2604
2604
|
*/
|
|
2605
2605
|
static rotateWebhookSecret(options) {
|
|
2606
2606
|
return (options.client ?? client).post({
|
|
2607
|
-
url: "/projects/{
|
|
2607
|
+
url: "/projects/{project_id}/webhooks/{webhook_id}/rotate-secret",
|
|
2608
2608
|
...options
|
|
2609
2609
|
});
|
|
2610
2610
|
}
|
|
2611
2611
|
};
|
|
2612
|
-
|
|
2612
|
+
|
|
2613
|
+
// src/soatClient.ts
|
|
2614
|
+
var bindResource = /* @__PURE__ */__name((SdkClass, client2) => {
|
|
2615
|
+
return new Proxy(SdkClass, {
|
|
2616
|
+
get: /* @__PURE__ */__name((target, prop) => {
|
|
2617
|
+
const value = target[prop];
|
|
2618
|
+
if (typeof value === "function") {
|
|
2619
|
+
return options => {
|
|
2620
|
+
return value({
|
|
2621
|
+
...options,
|
|
2622
|
+
client: client2
|
|
2623
|
+
});
|
|
2624
|
+
};
|
|
2625
|
+
}
|
|
2626
|
+
return value;
|
|
2627
|
+
}, "get")
|
|
2628
|
+
});
|
|
2629
|
+
}, "bindResource");
|
|
2630
|
+
var SoatClient = class {
|
|
2631
|
+
static {
|
|
2632
|
+
__name(this, "SoatClient");
|
|
2633
|
+
}
|
|
2634
|
+
actors;
|
|
2635
|
+
agentTools;
|
|
2636
|
+
agentTraces;
|
|
2637
|
+
agents;
|
|
2638
|
+
aiProviders;
|
|
2639
|
+
apiKeys;
|
|
2640
|
+
chats;
|
|
2641
|
+
conversations;
|
|
2642
|
+
documents;
|
|
2643
|
+
files;
|
|
2644
|
+
policies;
|
|
2645
|
+
projects;
|
|
2646
|
+
secrets;
|
|
2647
|
+
sessions;
|
|
2648
|
+
users;
|
|
2649
|
+
webhooks;
|
|
2650
|
+
constructor({
|
|
2651
|
+
baseUrl,
|
|
2652
|
+
token,
|
|
2653
|
+
headers
|
|
2654
|
+
} = {}) {
|
|
2655
|
+
const authHeaders = token ? {
|
|
2656
|
+
Authorization: `Bearer ${token}`
|
|
2657
|
+
} : {};
|
|
2658
|
+
const httpClient = createClient(createConfig({
|
|
2659
|
+
baseUrl: baseUrl ?? "/api/v1",
|
|
2660
|
+
headers: {
|
|
2661
|
+
...authHeaders,
|
|
2662
|
+
...headers
|
|
2663
|
+
}
|
|
2664
|
+
}));
|
|
2665
|
+
this.actors = bindResource(Actors, httpClient);
|
|
2666
|
+
this.agentTools = bindResource(AgentTools, httpClient);
|
|
2667
|
+
this.agentTraces = bindResource(AgentTraces, httpClient);
|
|
2668
|
+
this.agents = bindResource(Agents, httpClient);
|
|
2669
|
+
this.aiProviders = bindResource(AiProviders, httpClient);
|
|
2670
|
+
this.apiKeys = bindResource(ApiKeys, httpClient);
|
|
2671
|
+
this.chats = bindResource(Chats, httpClient);
|
|
2672
|
+
this.conversations = bindResource(Conversations, httpClient);
|
|
2673
|
+
this.documents = bindResource(Documents, httpClient);
|
|
2674
|
+
this.files = bindResource(Files, httpClient);
|
|
2675
|
+
this.policies = bindResource(Policies, httpClient);
|
|
2676
|
+
this.projects = bindResource(Projects, httpClient);
|
|
2677
|
+
this.secrets = bindResource(Secrets, httpClient);
|
|
2678
|
+
this.sessions = bindResource(Sessions, httpClient);
|
|
2679
|
+
this.users = bindResource(Users, httpClient);
|
|
2680
|
+
this.webhooks = bindResource(Webhooks, httpClient);
|
|
2681
|
+
}
|
|
2682
|
+
};
|
|
2683
|
+
export { Actors, AgentTools, AgentTraces, Agents, AiProviders, ApiKeys, Chats, Conversations, Documents, Files, Policies, Projects, Secrets, Sessions, SoatClient, Users, Webhooks, createClient, createConfig };
|