@naturali/sdk 0.248.5 → 0.250.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 +2 -221
- package/dist/index.d.cts +796 -1044
- package/dist/index.d.mts +796 -1044
- package/dist/index.mjs +3 -220
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1223,34 +1223,6 @@ var Admin = class {
|
|
|
1223
1223
|
...options
|
|
1224
1224
|
});
|
|
1225
1225
|
}
|
|
1226
|
-
/**
|
|
1227
|
-
* List listings for review
|
|
1228
|
-
*
|
|
1229
|
-
* Every listing in one state, newest first — `in_review` by default, the queue an operator works through.
|
|
1230
|
-
*
|
|
1231
|
-
*/
|
|
1232
|
-
static listAdminListings(options) {
|
|
1233
|
-
return (options?.client ?? client).get({
|
|
1234
|
-
url: "/v1/admin/listings",
|
|
1235
|
-
...options
|
|
1236
|
-
});
|
|
1237
|
-
}
|
|
1238
|
-
/**
|
|
1239
|
-
* Review a listing
|
|
1240
|
-
*
|
|
1241
|
-
* 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`.
|
|
1242
|
-
*
|
|
1243
|
-
*/
|
|
1244
|
-
static setAdminListingState(options) {
|
|
1245
|
-
return (options.client ?? client).put({
|
|
1246
|
-
url: "/v1/admin/listings/{listing_id}/state",
|
|
1247
|
-
...options,
|
|
1248
|
-
headers: {
|
|
1249
|
-
"Content-Type": "application/json",
|
|
1250
|
-
...options.headers
|
|
1251
|
-
}
|
|
1252
|
-
});
|
|
1253
|
-
}
|
|
1254
1226
|
};
|
|
1255
1227
|
var Agents = class {
|
|
1256
1228
|
/**
|
|
@@ -3724,60 +3696,6 @@ var IngestionRules = class {
|
|
|
3724
3696
|
});
|
|
3725
3697
|
}
|
|
3726
3698
|
};
|
|
3727
|
-
var Installs = class {
|
|
3728
|
-
/**
|
|
3729
|
-
* List installs
|
|
3730
|
-
*
|
|
3731
|
-
* The listings the project installed, newest first.
|
|
3732
|
-
*/
|
|
3733
|
-
static listInstalls(options) {
|
|
3734
|
-
return (options.client ?? client).get({
|
|
3735
|
-
url: "/v1/projects/{project_id}/installs",
|
|
3736
|
-
...options
|
|
3737
|
-
});
|
|
3738
|
-
}
|
|
3739
|
-
/**
|
|
3740
|
-
* Install a listing
|
|
3741
|
-
*
|
|
3742
|
-
* 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.
|
|
3743
|
-
* After the publisher removed this project's access, installing answers `403 install_blocked`.
|
|
3744
|
-
*
|
|
3745
|
-
*/
|
|
3746
|
-
static createInstall(options) {
|
|
3747
|
-
return (options.client ?? client).post({
|
|
3748
|
-
url: "/v1/projects/{project_id}/installs",
|
|
3749
|
-
...options,
|
|
3750
|
-
headers: {
|
|
3751
|
-
"Content-Type": "application/json",
|
|
3752
|
-
...options.headers
|
|
3753
|
-
}
|
|
3754
|
-
});
|
|
3755
|
-
}
|
|
3756
|
-
/**
|
|
3757
|
-
* Uninstall a listing
|
|
3758
|
-
*
|
|
3759
|
-
* 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.
|
|
3760
|
-
* A `blocked` install, and the install managed conversion uses, answer `403`.
|
|
3761
|
-
*
|
|
3762
|
-
*/
|
|
3763
|
-
static deleteInstall(options) {
|
|
3764
|
-
return (options.client ?? client).delete({
|
|
3765
|
-
url: "/v1/projects/{project_id}/installs/{install_id}",
|
|
3766
|
-
...options
|
|
3767
|
-
});
|
|
3768
|
-
}
|
|
3769
|
-
/**
|
|
3770
|
-
* Get an install
|
|
3771
|
-
*
|
|
3772
|
-
* One of the project's installs.
|
|
3773
|
-
*/
|
|
3774
|
-
static getInstall(options) {
|
|
3775
|
-
return (options.client ?? client).get({
|
|
3776
|
-
url: "/v1/projects/{project_id}/installs/{install_id}",
|
|
3777
|
-
...options
|
|
3778
|
-
});
|
|
3779
|
-
}
|
|
3780
|
-
};
|
|
3781
3699
|
var Knowledge = class {
|
|
3782
3700
|
/**
|
|
3783
3701
|
* Search knowledge
|
|
@@ -3795,135 +3713,6 @@ var Knowledge = class {
|
|
|
3795
3713
|
});
|
|
3796
3714
|
}
|
|
3797
3715
|
};
|
|
3798
|
-
var Listings = class {
|
|
3799
|
-
/**
|
|
3800
|
-
* Browse the marketplace
|
|
3801
|
-
*
|
|
3802
|
-
* Every listed entry, newest first. `interface` is what an installing project sees of the resource, read live from the publisher.
|
|
3803
|
-
*
|
|
3804
|
-
*/
|
|
3805
|
-
static listPublicListings(options) {
|
|
3806
|
-
return (options?.client ?? client).get({
|
|
3807
|
-
url: "/v1/listings",
|
|
3808
|
-
...options
|
|
3809
|
-
});
|
|
3810
|
-
}
|
|
3811
|
-
/**
|
|
3812
|
-
* Get a public listing
|
|
3813
|
-
*
|
|
3814
|
-
* One listed entry. A listing that is not listed answers `404`.
|
|
3815
|
-
*/
|
|
3816
|
-
static getPublicListing(options) {
|
|
3817
|
-
return (options.client ?? client).get({
|
|
3818
|
-
url: "/v1/listings/{listing_id}",
|
|
3819
|
-
...options
|
|
3820
|
-
});
|
|
3821
|
-
}
|
|
3822
|
-
/**
|
|
3823
|
-
* List a project's listings
|
|
3824
|
-
*
|
|
3825
|
-
* The listings the project publishes, newest first.
|
|
3826
|
-
*/
|
|
3827
|
-
static listListings(options) {
|
|
3828
|
-
return (options.client ?? client).get({
|
|
3829
|
-
url: "/v1/projects/{project_id}/listings",
|
|
3830
|
-
...options
|
|
3831
|
-
});
|
|
3832
|
-
}
|
|
3833
|
-
/**
|
|
3834
|
-
* Create a listing
|
|
3835
|
-
*
|
|
3836
|
-
* Publish one of the project's tools or agents as a `draft`. Any project member may publish.
|
|
3837
|
-
* 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`.
|
|
3838
|
-
*
|
|
3839
|
-
*/
|
|
3840
|
-
static createListing(options) {
|
|
3841
|
-
return (options.client ?? client).post({
|
|
3842
|
-
url: "/v1/projects/{project_id}/listings",
|
|
3843
|
-
...options,
|
|
3844
|
-
headers: {
|
|
3845
|
-
"Content-Type": "application/json",
|
|
3846
|
-
...options.headers
|
|
3847
|
-
}
|
|
3848
|
-
});
|
|
3849
|
-
}
|
|
3850
|
-
/**
|
|
3851
|
-
* Delete a listing
|
|
3852
|
-
*
|
|
3853
|
-
* Remove a listing and stop sharing its resource. Refused with `409 listing_has_installs` while any project holds an install, in any state: remove each one first, which takes two deletes of `/installs/{install_id}` for an `active` or `suspended` install. The listing's price stops applying from the next minute, and a later listing of the same resource starts from no price. The tool or agent itself is not touched.
|
|
3854
|
-
*
|
|
3855
|
-
*/
|
|
3856
|
-
static deleteListing(options) {
|
|
3857
|
-
return (options.client ?? client).delete({
|
|
3858
|
-
url: "/v1/projects/{project_id}/listings/{listing_id}",
|
|
3859
|
-
...options
|
|
3860
|
-
});
|
|
3861
|
-
}
|
|
3862
|
-
/**
|
|
3863
|
-
* Get a listing
|
|
3864
|
-
*
|
|
3865
|
-
* One of the project's listings.
|
|
3866
|
-
*/
|
|
3867
|
-
static getListing(options) {
|
|
3868
|
-
return (options.client ?? client).get({
|
|
3869
|
-
url: "/v1/projects/{project_id}/listings/{listing_id}",
|
|
3870
|
-
...options
|
|
3871
|
-
});
|
|
3872
|
-
}
|
|
3873
|
-
/**
|
|
3874
|
-
* Update a listing
|
|
3875
|
-
*
|
|
3876
|
-
* Change the title or description, or pause and resume the listing.
|
|
3877
|
-
* `state: suspended` stops a `listed` 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`.
|
|
3878
|
-
*
|
|
3879
|
-
*/
|
|
3880
|
-
static updateListing(options) {
|
|
3881
|
-
return (options.client ?? client).patch({
|
|
3882
|
-
url: "/v1/projects/{project_id}/listings/{listing_id}",
|
|
3883
|
-
...options,
|
|
3884
|
-
headers: {
|
|
3885
|
-
"Content-Type": "application/json",
|
|
3886
|
-
...options.headers
|
|
3887
|
-
}
|
|
3888
|
-
});
|
|
3889
|
-
}
|
|
3890
|
-
/**
|
|
3891
|
-
* Submit a listing for review
|
|
3892
|
-
*
|
|
3893
|
-
* 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`.
|
|
3894
|
-
*
|
|
3895
|
-
*/
|
|
3896
|
-
static submitListing(options) {
|
|
3897
|
-
return (options.client ?? client).post({
|
|
3898
|
-
url: "/v1/projects/{project_id}/listings/{listing_id}:submit",
|
|
3899
|
-
...options
|
|
3900
|
-
});
|
|
3901
|
-
}
|
|
3902
|
-
/**
|
|
3903
|
-
* List a listing's installs
|
|
3904
|
-
*
|
|
3905
|
-
* Each project that installed the listing, with its usage this billing cycle as last sampled. Never the content of a call.
|
|
3906
|
-
*
|
|
3907
|
-
*/
|
|
3908
|
-
static listListingInstalls(options) {
|
|
3909
|
-
return (options.client ?? client).get({
|
|
3910
|
-
url: "/v1/projects/{project_id}/listings/{listing_id}/installs",
|
|
3911
|
-
...options
|
|
3912
|
-
});
|
|
3913
|
-
}
|
|
3914
|
-
/**
|
|
3915
|
-
* Remove a project's install
|
|
3916
|
-
*
|
|
3917
|
-
* 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.
|
|
3918
|
-
*
|
|
3919
|
-
*/
|
|
3920
|
-
static deleteListingInstall(options) {
|
|
3921
|
-
return (options.client ?? client).delete({
|
|
3922
|
-
url: "/v1/projects/{project_id}/listings/{listing_id}/installs/{install_id}",
|
|
3923
|
-
...options
|
|
3924
|
-
});
|
|
3925
|
-
}
|
|
3926
|
-
};
|
|
3927
3716
|
var McpServers = class {
|
|
3928
3717
|
/**
|
|
3929
3718
|
* List MCP servers
|
|
@@ -3939,7 +3728,7 @@ var McpServers = class {
|
|
|
3939
3728
|
/**
|
|
3940
3729
|
* Create an MCP server
|
|
3941
3730
|
*
|
|
3942
|
-
* Each item of `tools` is checked against the tool it names: the project's
|
|
3731
|
+
* Each item of `tools` is checked against the tool it names: one of the project's, else `400`. `action` is required, and must be one of the tool's available actions, when the tool declares `actions`; otherwise it is ignored and stored as `null`. A tool whose definition reads `{{context:naturali_caller_…}}` is refused unless `auth.type` is `oauth`.
|
|
3943
3732
|
* `daily_call_limit` is required when `auth` is `none`.
|
|
3944
3733
|
*
|
|
3945
3734
|
*/
|
|
@@ -6536,8 +6325,6 @@ var Users = class {
|
|
|
6536
6325
|
*
|
|
6537
6326
|
* A `usage` line is managed model spend, written as the meter is reconciled every 15 minutes per project, so the ledger grows by a line per project per window that spent anything. Filter with `kind`.
|
|
6538
6327
|
*
|
|
6539
|
-
* The other side of a marketplace line is another account's project, so a `fee` or `earned` line names the cycle it settles, not that project.
|
|
6540
|
-
*
|
|
6541
6328
|
*/
|
|
6542
6329
|
static listCurrentUserCredits(options) {
|
|
6543
6330
|
return (options?.client ?? client).get({
|
|
@@ -6550,7 +6337,7 @@ var Users = class {
|
|
|
6550
6337
|
*
|
|
6551
6338
|
* Schedule triggers, eval runs, orchestration runs and workflow tasks the platform stopped on this account's projects because the credit balance went below zero or a Free plan's runs ran out, and that have not been restored or dismissed yet. Newest first.
|
|
6552
6339
|
*
|
|
6553
|
-
* `blocked_by` names the ceiling still closed: while it is set, nothing can be restored. Top up for `debt`; upgrade or wait for the month to turn for `run_allowance`. A
|
|
6340
|
+
* `blocked_by` names the ceiling still closed: while it is set, nothing can be restored. Top up for `debt`; upgrade or wait for the month to turn for `run_allowance`. A project-confined key sees its own project's stops only.
|
|
6554
6341
|
*
|
|
6555
6342
|
*/
|
|
6556
6343
|
static listCurrentUserStops(options) {
|
|
@@ -7071,9 +6858,7 @@ var NaturaliClient = class {
|
|
|
7071
6858
|
generations;
|
|
7072
6859
|
guardrails;
|
|
7073
6860
|
ingestionRules;
|
|
7074
|
-
installs;
|
|
7075
6861
|
knowledge;
|
|
7076
|
-
listings;
|
|
7077
6862
|
mcpServers;
|
|
7078
6863
|
memories;
|
|
7079
6864
|
memoryRules;
|
|
@@ -7132,9 +6917,7 @@ var NaturaliClient = class {
|
|
|
7132
6917
|
this.generations = bindResource(Generations, this.http);
|
|
7133
6918
|
this.guardrails = bindResource(Guardrails, this.http);
|
|
7134
6919
|
this.ingestionRules = bindResource(IngestionRules, this.http);
|
|
7135
|
-
this.installs = bindResource(Installs, this.http);
|
|
7136
6920
|
this.knowledge = bindResource(Knowledge, this.http);
|
|
7137
|
-
this.listings = bindResource(Listings, this.http);
|
|
7138
6921
|
this.mcpServers = bindResource(McpServers, this.http);
|
|
7139
6922
|
this.memories = bindResource(Memories, this.http);
|
|
7140
6923
|
this.memoryRules = bindResource(MemoryRules, this.http);
|
|
@@ -7186,9 +6969,7 @@ exports.Formations = Formations;
|
|
|
7186
6969
|
exports.Generations = Generations;
|
|
7187
6970
|
exports.Guardrails = Guardrails;
|
|
7188
6971
|
exports.IngestionRules = IngestionRules;
|
|
7189
|
-
exports.Installs = Installs;
|
|
7190
6972
|
exports.Knowledge = Knowledge;
|
|
7191
|
-
exports.Listings = Listings;
|
|
7192
6973
|
exports.McpServers = McpServers;
|
|
7193
6974
|
exports.Memories = Memories;
|
|
7194
6975
|
exports.MemoryRules = MemoryRules;
|