@naturali/sdk 0.164.1 → 0.166.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 +223 -0
- package/dist/index.d.cts +1039 -65
- package/dist/index.d.mts +1039 -65
- package/dist/index.mjs +222 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1166,6 +1166,34 @@ var Admin = class {
|
|
|
1166
1166
|
...options
|
|
1167
1167
|
});
|
|
1168
1168
|
}
|
|
1169
|
+
/**
|
|
1170
|
+
* List listings for review
|
|
1171
|
+
*
|
|
1172
|
+
* Every listing in one state, newest first — `in_review` by default, the queue an operator works through.
|
|
1173
|
+
*
|
|
1174
|
+
*/
|
|
1175
|
+
static listAdminListings(options) {
|
|
1176
|
+
return (options?.client ?? client).get({
|
|
1177
|
+
url: "/v1/admin/listings",
|
|
1178
|
+
...options
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* Review a listing
|
|
1183
|
+
*
|
|
1184
|
+
* List a listing in review or one that is suspended, send one in review back to `draft`, or suspend any listing. A listing an operator suspends cannot be resumed by its publisher. An invalid move answers `409 invalid_listing_state`.
|
|
1185
|
+
*
|
|
1186
|
+
*/
|
|
1187
|
+
static setAdminListingState(options) {
|
|
1188
|
+
return (options.client ?? client).put({
|
|
1189
|
+
url: "/v1/admin/listings/{listing_id}/state",
|
|
1190
|
+
...options,
|
|
1191
|
+
headers: {
|
|
1192
|
+
"Content-Type": "application/json",
|
|
1193
|
+
...options.headers
|
|
1194
|
+
}
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1169
1197
|
};
|
|
1170
1198
|
var Agents = class {
|
|
1171
1199
|
/**
|
|
@@ -3327,6 +3355,60 @@ var IngestionRules = class {
|
|
|
3327
3355
|
});
|
|
3328
3356
|
}
|
|
3329
3357
|
};
|
|
3358
|
+
var Installs = class {
|
|
3359
|
+
/**
|
|
3360
|
+
* List installs
|
|
3361
|
+
*
|
|
3362
|
+
* The listings the project installed, newest first.
|
|
3363
|
+
*/
|
|
3364
|
+
static listInstalls(options) {
|
|
3365
|
+
return (options.client ?? client).get({
|
|
3366
|
+
url: "/v1/projects/{project_id}/installs",
|
|
3367
|
+
...options
|
|
3368
|
+
});
|
|
3369
|
+
}
|
|
3370
|
+
/**
|
|
3371
|
+
* Install a listing
|
|
3372
|
+
*
|
|
3373
|
+
* Install a listing by its id. A listed entry, a draft and a listing in review all install; a suspended one answers `409 listing_suspended`. Installing again answers the existing install.
|
|
3374
|
+
* After the publisher removed this project's access, installing answers `403 install_blocked`.
|
|
3375
|
+
*
|
|
3376
|
+
*/
|
|
3377
|
+
static createInstall(options) {
|
|
3378
|
+
return (options.client ?? client).post({
|
|
3379
|
+
url: "/v1/projects/{project_id}/installs",
|
|
3380
|
+
...options,
|
|
3381
|
+
headers: {
|
|
3382
|
+
"Content-Type": "application/json",
|
|
3383
|
+
...options.headers
|
|
3384
|
+
}
|
|
3385
|
+
});
|
|
3386
|
+
}
|
|
3387
|
+
/**
|
|
3388
|
+
* Uninstall a listing
|
|
3389
|
+
*
|
|
3390
|
+
* Remove the install. While the project's agents, ingestion rules or other resources still name the installed resource, this answers `409 install_in_use` with them in `details.references`; `force=true` uninstalls anyway and those resources stop reaching it.
|
|
3391
|
+
* A `blocked` install, and the install managed conversion uses, answer `403`.
|
|
3392
|
+
*
|
|
3393
|
+
*/
|
|
3394
|
+
static deleteInstall(options) {
|
|
3395
|
+
return (options.client ?? client).delete({
|
|
3396
|
+
url: "/v1/projects/{project_id}/installs/{install_id}",
|
|
3397
|
+
...options
|
|
3398
|
+
});
|
|
3399
|
+
}
|
|
3400
|
+
/**
|
|
3401
|
+
* Get an install
|
|
3402
|
+
*
|
|
3403
|
+
* One of the project's installs.
|
|
3404
|
+
*/
|
|
3405
|
+
static getInstall(options) {
|
|
3406
|
+
return (options.client ?? client).get({
|
|
3407
|
+
url: "/v1/projects/{project_id}/installs/{install_id}",
|
|
3408
|
+
...options
|
|
3409
|
+
});
|
|
3410
|
+
}
|
|
3411
|
+
};
|
|
3330
3412
|
var Knowledge = class {
|
|
3331
3413
|
/**
|
|
3332
3414
|
* Search knowledge
|
|
@@ -3344,6 +3426,123 @@ var Knowledge = class {
|
|
|
3344
3426
|
});
|
|
3345
3427
|
}
|
|
3346
3428
|
};
|
|
3429
|
+
var Listings = class {
|
|
3430
|
+
/**
|
|
3431
|
+
* Browse the marketplace
|
|
3432
|
+
*
|
|
3433
|
+
* Every listed entry, newest first. `interface` is what an installing project sees of the resource, read live from the publisher.
|
|
3434
|
+
*
|
|
3435
|
+
*/
|
|
3436
|
+
static listPublicListings(options) {
|
|
3437
|
+
return (options?.client ?? client).get({
|
|
3438
|
+
url: "/v1/listings",
|
|
3439
|
+
...options
|
|
3440
|
+
});
|
|
3441
|
+
}
|
|
3442
|
+
/**
|
|
3443
|
+
* Get a public listing
|
|
3444
|
+
*
|
|
3445
|
+
* One listed entry. A listing that is not listed answers `404`.
|
|
3446
|
+
*/
|
|
3447
|
+
static getPublicListing(options) {
|
|
3448
|
+
return (options.client ?? client).get({
|
|
3449
|
+
url: "/v1/listings/{listing_id}",
|
|
3450
|
+
...options
|
|
3451
|
+
});
|
|
3452
|
+
}
|
|
3453
|
+
/**
|
|
3454
|
+
* List a project's listings
|
|
3455
|
+
*
|
|
3456
|
+
* The listings the project publishes, newest first.
|
|
3457
|
+
*/
|
|
3458
|
+
static listListings(options) {
|
|
3459
|
+
return (options.client ?? client).get({
|
|
3460
|
+
url: "/v1/projects/{project_id}/listings",
|
|
3461
|
+
...options
|
|
3462
|
+
});
|
|
3463
|
+
}
|
|
3464
|
+
/**
|
|
3465
|
+
* Create a listing
|
|
3466
|
+
*
|
|
3467
|
+
* Publish one of the project's tools or agents as a `draft`. Any project member may publish.
|
|
3468
|
+
* An agent on a naturali model whose model has no price answers `503 model_not_priced`. A resource that does not exist in the project answers `400 resource_not_found`, and one that already has a listing `409 listing_exists`.
|
|
3469
|
+
*
|
|
3470
|
+
*/
|
|
3471
|
+
static createListing(options) {
|
|
3472
|
+
return (options.client ?? client).post({
|
|
3473
|
+
url: "/v1/projects/{project_id}/listings",
|
|
3474
|
+
...options,
|
|
3475
|
+
headers: {
|
|
3476
|
+
"Content-Type": "application/json",
|
|
3477
|
+
...options.headers
|
|
3478
|
+
}
|
|
3479
|
+
});
|
|
3480
|
+
}
|
|
3481
|
+
/**
|
|
3482
|
+
* Get a listing
|
|
3483
|
+
*
|
|
3484
|
+
* One of the project's listings.
|
|
3485
|
+
*/
|
|
3486
|
+
static getListing(options) {
|
|
3487
|
+
return (options.client ?? client).get({
|
|
3488
|
+
url: "/v1/projects/{project_id}/listings/{listing_id}",
|
|
3489
|
+
...options
|
|
3490
|
+
});
|
|
3491
|
+
}
|
|
3492
|
+
/**
|
|
3493
|
+
* Update a listing
|
|
3494
|
+
*
|
|
3495
|
+
* Change the title or description, or pause and resume the listing.
|
|
3496
|
+
* `state: suspended` stops the listing for every installing project at once; their installs are kept. `state: listed` resumes a listing you suspended, provided naturali had listed it; nobody reinstalls. A listing naturali suspended cannot be resumed here, and an invalid move answers `409 invalid_listing_state`.
|
|
3497
|
+
*
|
|
3498
|
+
*/
|
|
3499
|
+
static updateListing(options) {
|
|
3500
|
+
return (options.client ?? client).patch({
|
|
3501
|
+
url: "/v1/projects/{project_id}/listings/{listing_id}",
|
|
3502
|
+
...options,
|
|
3503
|
+
headers: {
|
|
3504
|
+
"Content-Type": "application/json",
|
|
3505
|
+
...options.headers
|
|
3506
|
+
}
|
|
3507
|
+
});
|
|
3508
|
+
}
|
|
3509
|
+
/**
|
|
3510
|
+
* Submit a listing for review
|
|
3511
|
+
*
|
|
3512
|
+
* Move a `draft` listing to `in_review`. naturali lists it in the marketplace or sends it back to `draft`. Any other state answers `409 invalid_listing_state`.
|
|
3513
|
+
*
|
|
3514
|
+
*/
|
|
3515
|
+
static submitListing(options) {
|
|
3516
|
+
return (options.client ?? client).post({
|
|
3517
|
+
url: "/v1/projects/{project_id}/listings/{listing_id}:submit",
|
|
3518
|
+
...options
|
|
3519
|
+
});
|
|
3520
|
+
}
|
|
3521
|
+
/**
|
|
3522
|
+
* List a listing's installs
|
|
3523
|
+
*
|
|
3524
|
+
* Each project that installed the listing, with its usage this billing cycle as last sampled. Never the content of a call.
|
|
3525
|
+
*
|
|
3526
|
+
*/
|
|
3527
|
+
static listListingInstalls(options) {
|
|
3528
|
+
return (options.client ?? client).get({
|
|
3529
|
+
url: "/v1/projects/{project_id}/listings/{listing_id}/installs",
|
|
3530
|
+
...options
|
|
3531
|
+
});
|
|
3532
|
+
}
|
|
3533
|
+
/**
|
|
3534
|
+
* Remove a project's install
|
|
3535
|
+
*
|
|
3536
|
+
* Cut one installing project off. An `active` or `suspended` install becomes `blocked`, and that project cannot install the listing again. Deleting a `blocked` install removes it, which lets that project install again.
|
|
3537
|
+
*
|
|
3538
|
+
*/
|
|
3539
|
+
static deleteListingInstall(options) {
|
|
3540
|
+
return (options.client ?? client).delete({
|
|
3541
|
+
url: "/v1/projects/{project_id}/listings/{listing_id}/installs/{install_id}",
|
|
3542
|
+
...options
|
|
3543
|
+
});
|
|
3544
|
+
}
|
|
3545
|
+
};
|
|
3347
3546
|
var Memories = class {
|
|
3348
3547
|
/**
|
|
3349
3548
|
* List memories
|
|
@@ -5199,6 +5398,24 @@ var Users = class {
|
|
|
5199
5398
|
...options
|
|
5200
5399
|
});
|
|
5201
5400
|
}
|
|
5401
|
+
/**
|
|
5402
|
+
* Start a credit top-up
|
|
5403
|
+
*
|
|
5404
|
+
* A hosted card checkout that buys model credit for the caller's account. Send the caller to `checkout_url`; once the card is charged the full amount is added to `credit_balance_usd` as purchased credit, which never expires. The card fee is not deducted.
|
|
5405
|
+
*
|
|
5406
|
+
* Charged in US dollars. Creating a top-up charges nothing, and one left unpaid lapses at `expires_at`. After paying, the browser returns to the console's billing page.
|
|
5407
|
+
*
|
|
5408
|
+
*/
|
|
5409
|
+
static createCurrentUserTopUp(options) {
|
|
5410
|
+
return (options.client ?? client).post({
|
|
5411
|
+
url: "/v1/users/me/top-ups",
|
|
5412
|
+
...options,
|
|
5413
|
+
headers: {
|
|
5414
|
+
"Content-Type": "application/json",
|
|
5415
|
+
...options.headers
|
|
5416
|
+
}
|
|
5417
|
+
});
|
|
5418
|
+
}
|
|
5202
5419
|
};
|
|
5203
5420
|
var Webhooks = class {
|
|
5204
5421
|
/**
|
|
@@ -5503,7 +5720,9 @@ var NaturaliClient = class {
|
|
|
5503
5720
|
generations;
|
|
5504
5721
|
guardrails;
|
|
5505
5722
|
ingestionRules;
|
|
5723
|
+
installs;
|
|
5506
5724
|
knowledge;
|
|
5725
|
+
listings;
|
|
5507
5726
|
memories;
|
|
5508
5727
|
memoryRules;
|
|
5509
5728
|
memoryStores;
|
|
@@ -5556,7 +5775,9 @@ var NaturaliClient = class {
|
|
|
5556
5775
|
this.generations = bindResource(Generations, this.http);
|
|
5557
5776
|
this.guardrails = bindResource(Guardrails, this.http);
|
|
5558
5777
|
this.ingestionRules = bindResource(IngestionRules, this.http);
|
|
5778
|
+
this.installs = bindResource(Installs, this.http);
|
|
5559
5779
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
5780
|
+
this.listings = bindResource(Listings, this.http);
|
|
5560
5781
|
this.memories = bindResource(Memories, this.http);
|
|
5561
5782
|
this.memoryRules = bindResource(MemoryRules, this.http);
|
|
5562
5783
|
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
@@ -5578,4 +5799,4 @@ var NaturaliClient = class {
|
|
|
5578
5799
|
}
|
|
5579
5800
|
};
|
|
5580
5801
|
//#endregion
|
|
5581
|
-
export { Activity, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, Models, NaturaliClient, Orchestrations, Projects, Quotas, Secrets, Sessions, Tasks, Tools, Traces, Triggers, Users, Webhooks, Workflows, createClient, createConfig };
|
|
5802
|
+
export { Activity, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Installs, Knowledge, Listings, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, Models, NaturaliClient, Orchestrations, Projects, Quotas, Secrets, Sessions, Tasks, Tools, Traces, Triggers, Users, Webhooks, Workflows, createClient, createConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.166.0",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
34
|
-
"@naturali/api": "0.
|
|
34
|
+
"@naturali/api": "0.166.0",
|
|
35
35
|
"@ttoss/openapi-codegen": "^0.5.0",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|