@agents24/node 0.5.19 → 0.5.20

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 CHANGED
@@ -151,6 +151,7 @@ var Agents24HttpClient = class {
151
151
  ...config.body === void 0 ? {} : { body: JSON.stringify(config.body) }
152
152
  }, "Failed to connect to the Agents24 API.");
153
153
  await assertOk(response);
154
+ if (response.status === 204) return void 0;
154
155
  return await response.json();
155
156
  }
156
157
  async fetchOrThrow(url, init, message) {
@@ -1300,8 +1301,155 @@ var CustomerProfilesNamespace = class {
1300
1301
  }
1301
1302
  };
1302
1303
 
1304
+ // src/generated/pipelines.ts
1305
+ var PipelinesNamespace = class {
1306
+ constructor(http) {
1307
+ this.http = http;
1308
+ }
1309
+ http;
1310
+ list(options = {}) {
1311
+ return this.http.requestJson("/admin/pipelines/visual-pipelines", {
1312
+ query: {
1313
+ skip: options.skip ?? 0,
1314
+ limit: options.limit ?? 20
1315
+ }
1316
+ });
1317
+ }
1318
+ get(pipelineId) {
1319
+ return this.http.requestJson(`/admin/pipelines/visual-pipelines/${encodeURIComponent(pipelineId)}`);
1320
+ }
1321
+ getPublishedExecutable(pipelineId) {
1322
+ return this.http.requestJson(`/admin/pipelines/visual-pipelines/${encodeURIComponent(pipelineId)}/current-executable`);
1323
+ }
1324
+ getInputSchema(executableId) {
1325
+ return this.http.requestJson(`/admin/pipelines/executable-pipelines/${encodeURIComponent(executableId)}/input-schema`);
1326
+ }
1327
+ };
1328
+
1329
+ // src/generated/ingestionJobs.ts
1330
+ var IngestionJobsNamespace = class {
1331
+ constructor(http) {
1332
+ this.http = http;
1333
+ }
1334
+ http;
1335
+ async uploadInput(file, filename) {
1336
+ const formData = new FormData();
1337
+ formData.append("file", file, filename);
1338
+ const response = await this.http.fetchOrThrow(
1339
+ this.http.url("/admin/pipelines/pipeline-inputs/upload"),
1340
+ { method: "POST", headers: this.http.multipartHeaders(), body: formData },
1341
+ "Failed to upload pipeline input."
1342
+ );
1343
+ await assertOk(response);
1344
+ return await response.json();
1345
+ }
1346
+ start(request, options) {
1347
+ return this.http.requestJson("/admin/pipelines/jobs", {
1348
+ method: "POST",
1349
+ body: request,
1350
+ options,
1351
+ mutation: true
1352
+ });
1353
+ }
1354
+ list(options = {}) {
1355
+ return this.http.requestJson("/admin/pipelines/jobs", {
1356
+ query: {
1357
+ skip: options.skip ?? 0,
1358
+ limit: options.limit ?? 20,
1359
+ executable_pipeline_id: options.executablePipelineId,
1360
+ visual_pipeline_id: options.visualPipelineId,
1361
+ status: options.status,
1362
+ pipeline_type: options.pipelineType,
1363
+ q: options.q
1364
+ }
1365
+ });
1366
+ }
1367
+ get(jobId, options = {}) {
1368
+ return this.http.requestJson(`/admin/pipelines/jobs/${encodeURIComponent(jobId)}`, {
1369
+ query: {
1370
+ lite: options.lite ?? false,
1371
+ include_batches: options.includeBatches ?? true
1372
+ }
1373
+ });
1374
+ }
1375
+ listBatches(jobId, options = {}) {
1376
+ return this.http.requestJson(`/admin/pipelines/jobs/${encodeURIComponent(jobId)}/batches`, {
1377
+ query: {
1378
+ skip: options.skip ?? 0,
1379
+ limit: options.limit ?? 100
1380
+ }
1381
+ });
1382
+ }
1383
+ resume(jobId, options) {
1384
+ return this.http.requestJson(`/admin/pipelines/jobs/${encodeURIComponent(jobId)}/resume`, {
1385
+ method: "POST",
1386
+ options,
1387
+ mutation: true
1388
+ });
1389
+ }
1390
+ cancel(jobId, options) {
1391
+ return this.http.requestJson(`/admin/pipelines/jobs/${encodeURIComponent(jobId)}/cancel`, {
1392
+ method: "POST",
1393
+ options,
1394
+ mutation: true
1395
+ });
1396
+ }
1397
+ };
1398
+
1399
+ // src/generated/knowledgeStores.ts
1400
+ var KnowledgeStoresNamespace = class {
1401
+ constructor(http) {
1402
+ this.http = http;
1403
+ }
1404
+ http;
1405
+ list(options = {}) {
1406
+ return this.http.requestJson("/admin/knowledge-stores", {
1407
+ query: {
1408
+ skip: options.skip ?? 0,
1409
+ limit: options.limit ?? 20,
1410
+ view: options.view ?? "summary"
1411
+ }
1412
+ });
1413
+ }
1414
+ create(request) {
1415
+ return this.http.requestJson("/admin/knowledge-stores", {
1416
+ method: "POST",
1417
+ body: request
1418
+ });
1419
+ }
1420
+ get(storeId) {
1421
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}`);
1422
+ }
1423
+ update(storeId, request) {
1424
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}`, {
1425
+ method: "PATCH",
1426
+ body: request
1427
+ });
1428
+ }
1429
+ stats(storeId) {
1430
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}/stats`);
1431
+ }
1432
+ archive(storeId) {
1433
+ return this.http.requestJson(`/admin/knowledge-stores/${encodeURIComponent(storeId)}`, {
1434
+ method: "DELETE"
1435
+ });
1436
+ }
1437
+ };
1438
+
1439
+ // src/generated/integration-namespaces.ts
1440
+ var GeneratedIntegrationNamespaces = class {
1441
+ pipelines;
1442
+ ingestionJobs;
1443
+ knowledgeStores;
1444
+ constructor(http) {
1445
+ this.pipelines = new PipelinesNamespace(http);
1446
+ this.ingestionJobs = new IngestionJobsNamespace(http);
1447
+ this.knowledgeStores = new KnowledgeStoresNamespace(http);
1448
+ }
1449
+ };
1450
+
1303
1451
  // src/client.ts
1304
- var Agents24 = class {
1452
+ var Agents24 = class extends GeneratedIntegrationNamespaces {
1305
1453
  agents;
1306
1454
  embed;
1307
1455
  runs;
@@ -1316,6 +1464,7 @@ var Agents24 = class {
1316
1464
  customerProfiles;
1317
1465
  constructor(options) {
1318
1466
  const http = new Agents24HttpClient(options);
1467
+ super(http);
1319
1468
  this.agents = new AgentsNamespace(http);
1320
1469
  this.embed = new EmbedNamespace(http);
1321
1470
  this.runs = new RunsNamespace(http);
@@ -1440,7 +1589,24 @@ var SDK_OPERATION_IDS = [
1440
1589
  "embed.thread_messages.resume_queue",
1441
1590
  "embed.thread_messages.submit",
1442
1591
  "embed.upload_agent_attachments",
1592
+ "ingestionJobs.cancel",
1593
+ "ingestionJobs.get",
1594
+ "ingestionJobs.list",
1595
+ "ingestionJobs.list_batches",
1596
+ "ingestionJobs.resume",
1597
+ "ingestionJobs.start",
1598
+ "ingestionJobs.upload_input",
1443
1599
  "instructions.publish",
1600
+ "knowledgeStores.archive",
1601
+ "knowledgeStores.create",
1602
+ "knowledgeStores.get",
1603
+ "knowledgeStores.list",
1604
+ "knowledgeStores.stats",
1605
+ "knowledgeStores.update",
1606
+ "pipelines.get",
1607
+ "pipelines.get_input_schema",
1608
+ "pipelines.get_published_executable",
1609
+ "pipelines.list",
1444
1610
  "resource_installations.accept_pull",
1445
1611
  "resource_installations.apply",
1446
1612
  "resource_installations.bind_deployment",