@naturali/sdk 0.314.2 → 0.316.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/dist/index.cjs +83 -0
- package/dist/index.d.cts +434 -1
- package/dist/index.d.mts +434 -1
- package/dist/index.mjs +83 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3427,6 +3427,86 @@ var Exceptions = class {
|
|
|
3427
3427
|
});
|
|
3428
3428
|
}
|
|
3429
3429
|
};
|
|
3430
|
+
var Experts = class {
|
|
3431
|
+
/**
|
|
3432
|
+
* List experts
|
|
3433
|
+
*
|
|
3434
|
+
* The project's Experts. A page may hold fewer than `limit` Experts while `next_cursor` is set; follow it to the end.
|
|
3435
|
+
*/
|
|
3436
|
+
static listExperts(options) {
|
|
3437
|
+
return (options.client ?? client).get({
|
|
3438
|
+
url: "/v1/projects/{project_id}/experts",
|
|
3439
|
+
...options
|
|
3440
|
+
});
|
|
3441
|
+
}
|
|
3442
|
+
/**
|
|
3443
|
+
* Create an expert
|
|
3444
|
+
*
|
|
3445
|
+
* Creates the Expert and its generated agent, case tool and policy, with the caller's own permissions: the caller must be able to create each of them and to grant what the policy grants. A deploy that fails still answers `201`, with `status: failed` and `error` saying why; nothing it created is kept. Check a body with [`POST /v1/projects/{project_id}/experts/validate`](/docs/api/experts/validate-expert) first.
|
|
3446
|
+
*/
|
|
3447
|
+
static createExpert(options) {
|
|
3448
|
+
return (options.client ?? client).post({
|
|
3449
|
+
url: "/v1/projects/{project_id}/experts",
|
|
3450
|
+
...options,
|
|
3451
|
+
headers: {
|
|
3452
|
+
"Content-Type": "application/json",
|
|
3453
|
+
...options.headers
|
|
3454
|
+
}
|
|
3455
|
+
});
|
|
3456
|
+
}
|
|
3457
|
+
/**
|
|
3458
|
+
* Validate an expert
|
|
3459
|
+
*
|
|
3460
|
+
* Answers what creating this Expert would be told about its resources, without writing: `valid`, and every problem found. A body this API cannot read is `400`, as on create.
|
|
3461
|
+
*/
|
|
3462
|
+
static validateExpert(options) {
|
|
3463
|
+
return (options.client ?? client).post({
|
|
3464
|
+
url: "/v1/projects/{project_id}/experts/validate",
|
|
3465
|
+
...options,
|
|
3466
|
+
headers: {
|
|
3467
|
+
"Content-Type": "application/json",
|
|
3468
|
+
...options.headers
|
|
3469
|
+
}
|
|
3470
|
+
});
|
|
3471
|
+
}
|
|
3472
|
+
/**
|
|
3473
|
+
* Delete an expert
|
|
3474
|
+
*
|
|
3475
|
+
* Deletes the Expert and its generated resources. While the agent has sessions or the case tool has calls on record, it is `409 FORMATION_DELETE_FAILED` and the Expert is kept.
|
|
3476
|
+
*/
|
|
3477
|
+
static deleteExpert(options) {
|
|
3478
|
+
return (options.client ?? client).delete({
|
|
3479
|
+
url: "/v1/projects/{project_id}/experts/{expert_id}",
|
|
3480
|
+
...options
|
|
3481
|
+
});
|
|
3482
|
+
}
|
|
3483
|
+
/**
|
|
3484
|
+
* Get an expert
|
|
3485
|
+
*
|
|
3486
|
+
* The Expert, its fields and the resources it generated.
|
|
3487
|
+
*/
|
|
3488
|
+
static getExpert(options) {
|
|
3489
|
+
return (options.client ?? client).get({
|
|
3490
|
+
url: "/v1/projects/{project_id}/experts/{expert_id}",
|
|
3491
|
+
...options
|
|
3492
|
+
});
|
|
3493
|
+
}
|
|
3494
|
+
/**
|
|
3495
|
+
* Update an expert
|
|
3496
|
+
*
|
|
3497
|
+
* A field sent replaces the stored one, an array whole; `null` clears an optional field. `name` cannot change. The generated resources are written back as the Expert declares them, with the caller's own permissions; a deploy that fails answers `200` with `status: failed`.
|
|
3498
|
+
*/
|
|
3499
|
+
static updateExpert(options) {
|
|
3500
|
+
return (options.client ?? client).patch({
|
|
3501
|
+
url: "/v1/projects/{project_id}/experts/{expert_id}",
|
|
3502
|
+
...options,
|
|
3503
|
+
headers: {
|
|
3504
|
+
"Content-Type": "application/json",
|
|
3505
|
+
...options.headers
|
|
3506
|
+
}
|
|
3507
|
+
});
|
|
3508
|
+
}
|
|
3509
|
+
};
|
|
3430
3510
|
var Files = class {
|
|
3431
3511
|
/**
|
|
3432
3512
|
* List all files
|
|
@@ -7412,6 +7492,7 @@ var NaturaliClient = class {
|
|
|
7412
7492
|
embeddings;
|
|
7413
7493
|
evaluations;
|
|
7414
7494
|
exceptions;
|
|
7495
|
+
experts;
|
|
7415
7496
|
files;
|
|
7416
7497
|
formations;
|
|
7417
7498
|
generations;
|
|
@@ -7474,6 +7555,7 @@ var NaturaliClient = class {
|
|
|
7474
7555
|
this.embeddings = bindResource(Embeddings, this.http);
|
|
7475
7556
|
this.evaluations = bindResource(Evaluations, this.http);
|
|
7476
7557
|
this.exceptions = bindResource(Exceptions, this.http);
|
|
7558
|
+
this.experts = bindResource(Experts, this.http);
|
|
7477
7559
|
this.files = bindResource(Files, this.http);
|
|
7478
7560
|
this.formations = bindResource(Formations, this.http);
|
|
7479
7561
|
this.generations = bindResource(Generations, this.http);
|
|
@@ -7529,6 +7611,7 @@ exports.Documents = Documents;
|
|
|
7529
7611
|
exports.Embeddings = Embeddings;
|
|
7530
7612
|
exports.Evaluations = Evaluations;
|
|
7531
7613
|
exports.Exceptions = Exceptions;
|
|
7614
|
+
exports.Experts = Experts;
|
|
7532
7615
|
exports.Files = Files;
|
|
7533
7616
|
exports.Formations = Formations;
|
|
7534
7617
|
exports.Generations = Generations;
|