@naturali/sdk 0.124.0 → 0.125.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 +31 -2
- package/dist/index.d.cts +59 -2
- package/dist/index.d.mts +59 -2
- package/dist/index.mjs +31 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -739,6 +739,9 @@ var Actors = class {
|
|
|
739
739
|
var Channels = class {
|
|
740
740
|
/**
|
|
741
741
|
* List addresses
|
|
742
|
+
*
|
|
743
|
+
* Every identifier this project has seen. An address appears the first time a message arrives from it, so this is what naturali has observed rather than a roster you maintain — most rows carry no `action` of their own and defer to the route table.
|
|
744
|
+
*
|
|
742
745
|
*/
|
|
743
746
|
static listAddresses(options) {
|
|
744
747
|
return (options.client ?? client).get({
|
|
@@ -760,6 +763,9 @@ var Channels = class {
|
|
|
760
763
|
}
|
|
761
764
|
/**
|
|
762
765
|
* Get an address
|
|
766
|
+
*
|
|
767
|
+
* Reads one identifier's own action, if it has one. An identifier naturali has never seen is a `404`; to set an action without knowing whether it exists, use [`PUT /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/set-address-action), which upserts.
|
|
768
|
+
*
|
|
763
769
|
*/
|
|
764
770
|
static getAddress(options) {
|
|
765
771
|
return (options.client ?? client).get({
|
|
@@ -809,6 +815,9 @@ var Channels = class {
|
|
|
809
815
|
}
|
|
810
816
|
/**
|
|
811
817
|
* List a channel's routes
|
|
818
|
+
*
|
|
819
|
+
* One channel's routes, newest first, `disabled` ones included — only `active` routes take part in resolution. For every route in the project in one read, use [`GET /v1/projects/{project_id}/channel-routes`](/docs/api/channel-routes/list-project-channel-routes).
|
|
820
|
+
*
|
|
812
821
|
*/
|
|
813
822
|
static listChannelRoutes(options) {
|
|
814
823
|
return (options.client ?? client).get({
|
|
@@ -834,6 +843,9 @@ var Channels = class {
|
|
|
834
843
|
}
|
|
835
844
|
/**
|
|
836
845
|
* Delete a route
|
|
846
|
+
*
|
|
847
|
+
* Conversations opened under this route keep its id and stay where they are; the next inbound resolves to the next most specific route, or the channel default, and opens a new conversation there. To stop a route from matching while keeping it readable, `PATCH` it to `status: disabled` instead.
|
|
848
|
+
*
|
|
837
849
|
*/
|
|
838
850
|
static deleteChannelRoute(options) {
|
|
839
851
|
return (options.client ?? client).delete({
|
|
@@ -843,6 +855,9 @@ var Channels = class {
|
|
|
843
855
|
}
|
|
844
856
|
/**
|
|
845
857
|
* Get a route
|
|
858
|
+
*
|
|
859
|
+
* A route id is only meaningful inside its own channel: the same id under another `channel_id` is a `404`. A conversation's `route_id` may instead be one of the two sentinels for the address's own action and the channel default — those name no route and are not readable here.
|
|
860
|
+
*
|
|
846
861
|
*/
|
|
847
862
|
static getChannelRoute(options) {
|
|
848
863
|
return (options.client ?? client).get({
|
|
@@ -931,6 +946,9 @@ var Channels = class {
|
|
|
931
946
|
}
|
|
932
947
|
/**
|
|
933
948
|
* Get a channel
|
|
949
|
+
*
|
|
950
|
+
* The channel's state, its transport modes and its default action. The access token is never returned — `has_credential` is all a read says about it.
|
|
951
|
+
*
|
|
934
952
|
*/
|
|
935
953
|
static getChannel(options) {
|
|
936
954
|
return (options.client ?? client).get({
|
|
@@ -985,6 +1003,9 @@ var Channels = class {
|
|
|
985
1003
|
}
|
|
986
1004
|
/**
|
|
987
1005
|
* Get a conversation
|
|
1006
|
+
*
|
|
1007
|
+
* Where the conversation points: the address it belongs to, the route (or sentinel) whose action opened it, and the runtime session it maps 1:1 to. The messages are not here — read them with [`GET /v1/projects/{project_id}/channels/{channel_id}/conversations/{conversation_id}/messages`](/docs/api/channels/list-channel-conversation-messages).
|
|
1008
|
+
*
|
|
988
1009
|
*/
|
|
989
1010
|
static getChannelConversation(options) {
|
|
990
1011
|
return (options.client ?? client).get({
|
|
@@ -3217,6 +3238,9 @@ var Models = class {
|
|
|
3217
3238
|
}
|
|
3218
3239
|
/**
|
|
3219
3240
|
* Get a model
|
|
3241
|
+
*
|
|
3242
|
+
* `{model}` is naturali's own name for the model, the same value [`GET /v1/models`](/docs/api/models/list-models) returns — a vendor's invocation string is a `404`. A `deprecated` model still reads here, so a project already generating on one can see what happened to it.
|
|
3243
|
+
*
|
|
3220
3244
|
*/
|
|
3221
3245
|
static getModel(options) {
|
|
3222
3246
|
return (options.client ?? client).get({
|
|
@@ -4358,9 +4382,11 @@ var Users = class {
|
|
|
4358
4382
|
/**
|
|
4359
4383
|
* Get the current account's billing standing
|
|
4360
4384
|
*
|
|
4361
|
-
* The plan the account is on, how long its projects may keep content, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
4385
|
+
* The plan the account is on, how long its projects may keep content, how much indexed storage it is holding, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
4386
|
+
*
|
|
4387
|
+
* A managed-model generation is refused with `402 insufficient_credit` while `credit_balance_usd` is negative, and a feature or a resource count outside the plan is refused with `403`, as is a retention window wider than `retention_days` or an ingest past `storage_limit_gb`. Every refusal names what is missing; this is where the numbers behind them are read.
|
|
4362
4388
|
*
|
|
4363
|
-
*
|
|
4389
|
+
* Every figure here is a local read, which is what keeps this route cheap enough to poll — unlike `GET /v1/users/me/usage`, which asks the meter once per project.
|
|
4364
4390
|
*
|
|
4365
4391
|
* Answers for the caller's own account only, and always the account the credential resolves to — an API key answers for the user that minted it. The plan gating a *project* is that project's billing owner's, so a member of someone else's project reads their own rung here, not that project's.
|
|
4366
4392
|
*
|
|
@@ -4438,6 +4464,9 @@ var Webhooks = class {
|
|
|
4438
4464
|
}
|
|
4439
4465
|
/**
|
|
4440
4466
|
* Get a webhook
|
|
4467
|
+
*
|
|
4468
|
+
* The endpoint, the events it is subscribed to and whether deliveries are attempted. The signing secret is not returned: it is shown once by [`POST /v1/projects/{project_id}/webhooks`](/docs/api/webhooks/create-webhook) and again by [`POST /v1/projects/{project_id}/webhooks/{webhook_id}:rotate-secret`](/docs/api/webhooks/rotate-webhook-secret).
|
|
4469
|
+
*
|
|
4441
4470
|
*/
|
|
4442
4471
|
static getWebhook(options) {
|
|
4443
4472
|
return (options.client ?? client).get({
|
package/dist/index.d.cts
CHANGED
|
@@ -499,6 +499,18 @@ type AdminUser = User & {
|
|
|
499
499
|
* When this account's spend was last read off the meter, which is how current `credit_balance_usd` is. `null` when it has never been read for at least one of the account's projects, or the account has none. The same figure the account reads about itself at `GET /v1/users/me/billing`.
|
|
500
500
|
*/
|
|
501
501
|
spend_reconciled_at: Date | null;
|
|
502
|
+
/**
|
|
503
|
+
* Indexed storage the account is holding, in the metered gigabytes the ceiling is enforced in — the account's pooled total across every project it pays for, not any one project's. The figure behind a `403 plan_limit_reached` on `resource: "storage"`, and the same one the account reads at `GET /v1/users/me/billing`.
|
|
504
|
+
*/
|
|
505
|
+
storage_gb: number;
|
|
506
|
+
/**
|
|
507
|
+
* The pool the account's plan allows. `null` where a contract sets the ceiling, or where the plan sets none.
|
|
508
|
+
*/
|
|
509
|
+
storage_limit_gb: number | null;
|
|
510
|
+
/**
|
|
511
|
+
* When the oldest sample behind `storage_gb` was taken — a total is only as current as its stalest part. `null` when a project the account pays for has never been sampled, or it has none.
|
|
512
|
+
*/
|
|
513
|
+
storage_sampled_at: Date | null;
|
|
502
514
|
};
|
|
503
515
|
type AdminUserPage = {
|
|
504
516
|
data: Array<AdminUser>;
|
|
@@ -6485,6 +6497,22 @@ type UserBilling = {
|
|
|
6485
6497
|
* When spend was last read off the meter and written to the ledger. `null` when it has never been read for at least one of the account's projects, or the account has none — a balance whose spend has never been read is not current as of anything.
|
|
6486
6498
|
*/
|
|
6487
6499
|
spend_reconciled_at: Date | null;
|
|
6500
|
+
/**
|
|
6501
|
+
* Indexed storage the account is holding, in the metered gigabytes the ceiling is enforced in — the raw file plus every chunk's text and its embedding vector, so not the size of what you uploaded.
|
|
6502
|
+
*
|
|
6503
|
+
* **The account's total, not a project's.** The ceiling is pooled across every project the account pays for, so one project may hold all of it. Per project, read the `gb_day` component of `GET /v1/projects/{project_id}/usage`.
|
|
6504
|
+
*/
|
|
6505
|
+
storage_gb: number;
|
|
6506
|
+
/**
|
|
6507
|
+
* The pool the account's plan allows. An ingest past it is refused with `403 plan_limit_reached` and `resource: "storage"`, whose `details` carry this figure as `limit` and what you are holding as `storage_gb`. Null where a contract sets the ceiling, or where the plan sets none.
|
|
6508
|
+
*/
|
|
6509
|
+
storage_limit_gb: number | null;
|
|
6510
|
+
/**
|
|
6511
|
+
* When the **oldest** of the samples behind `storage_gb` was taken — the total is only as current as its stalest part. Measured every few minutes per project rather than on this request, so read the two together, exactly as with the balance and `spend_reconciled_at`.
|
|
6512
|
+
*
|
|
6513
|
+
* Null when a project the account pays for has never been sampled, or it has no projects: a total missing a component is not current as of anything. The figure itself still reports what the samples that do exist add up to.
|
|
6514
|
+
*/
|
|
6515
|
+
storage_sampled_at: Date | null;
|
|
6488
6516
|
};
|
|
6489
6517
|
type UserUsage = {
|
|
6490
6518
|
/**
|
|
@@ -19445,6 +19473,9 @@ declare class Actors {
|
|
|
19445
19473
|
declare class Channels {
|
|
19446
19474
|
/**
|
|
19447
19475
|
* List addresses
|
|
19476
|
+
*
|
|
19477
|
+
* Every identifier this project has seen. An address appears the first time a message arrives from it, so this is what naturali has observed rather than a roster you maintain — most rows carry no `action` of their own and defer to the route table.
|
|
19478
|
+
*
|
|
19448
19479
|
*/
|
|
19449
19480
|
static listAddresses<ThrowOnError extends boolean = false>(options: Options<ListAddressesData, ThrowOnError>): RequestResult<ListAddressesResponses, ListAddressesErrors, ThrowOnError>;
|
|
19450
19481
|
/**
|
|
@@ -19456,6 +19487,9 @@ declare class Channels {
|
|
|
19456
19487
|
static deleteAddress<ThrowOnError extends boolean = false>(options: Options<DeleteAddressData, ThrowOnError>): RequestResult<DeleteAddressResponses, DeleteAddressErrors, ThrowOnError>;
|
|
19457
19488
|
/**
|
|
19458
19489
|
* Get an address
|
|
19490
|
+
*
|
|
19491
|
+
* Reads one identifier's own action, if it has one. An identifier naturali has never seen is a `404`; to set an action without knowing whether it exists, use [`PUT /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/set-address-action), which upserts.
|
|
19492
|
+
*
|
|
19459
19493
|
*/
|
|
19460
19494
|
static getAddress<ThrowOnError extends boolean = false>(options: Options<GetAddressData, ThrowOnError>): RequestResult<GetAddressResponses, GetAddressErrors, ThrowOnError>;
|
|
19461
19495
|
/**
|
|
@@ -19481,6 +19515,9 @@ declare class Channels {
|
|
|
19481
19515
|
static listChannelKinds<ThrowOnError extends boolean = false>(options?: Options<ListChannelKindsData, ThrowOnError>): RequestResult<ListChannelKindsResponses, ListChannelKindsErrors, ThrowOnError>;
|
|
19482
19516
|
/**
|
|
19483
19517
|
* List a channel's routes
|
|
19518
|
+
*
|
|
19519
|
+
* One channel's routes, newest first, `disabled` ones included — only `active` routes take part in resolution. For every route in the project in one read, use [`GET /v1/projects/{project_id}/channel-routes`](/docs/api/channel-routes/list-project-channel-routes).
|
|
19520
|
+
*
|
|
19484
19521
|
*/
|
|
19485
19522
|
static listChannelRoutes<ThrowOnError extends boolean = false>(options: Options<ListChannelRoutesData, ThrowOnError>): RequestResult<ListChannelRoutesResponses, ListChannelRoutesErrors, ThrowOnError>;
|
|
19486
19523
|
/**
|
|
@@ -19492,10 +19529,16 @@ declare class Channels {
|
|
|
19492
19529
|
static createChannelRoute<ThrowOnError extends boolean = false>(options: Options<CreateChannelRouteData, ThrowOnError>): RequestResult<CreateChannelRouteResponses, CreateChannelRouteErrors, ThrowOnError>;
|
|
19493
19530
|
/**
|
|
19494
19531
|
* Delete a route
|
|
19532
|
+
*
|
|
19533
|
+
* Conversations opened under this route keep its id and stay where they are; the next inbound resolves to the next most specific route, or the channel default, and opens a new conversation there. To stop a route from matching while keeping it readable, `PATCH` it to `status: disabled` instead.
|
|
19534
|
+
*
|
|
19495
19535
|
*/
|
|
19496
19536
|
static deleteChannelRoute<ThrowOnError extends boolean = false>(options: Options<DeleteChannelRouteData, ThrowOnError>): RequestResult<DeleteChannelRouteResponses, DeleteChannelRouteErrors, ThrowOnError>;
|
|
19497
19537
|
/**
|
|
19498
19538
|
* Get a route
|
|
19539
|
+
*
|
|
19540
|
+
* A route id is only meaningful inside its own channel: the same id under another `channel_id` is a `404`. A conversation's `route_id` may instead be one of the two sentinels for the address's own action and the channel default — those name no route and are not readable here.
|
|
19541
|
+
*
|
|
19499
19542
|
*/
|
|
19500
19543
|
static getChannelRoute<ThrowOnError extends boolean = false>(options: Options<GetChannelRouteData, ThrowOnError>): RequestResult<GetChannelRouteResponses, GetChannelRouteErrors, ThrowOnError>;
|
|
19501
19544
|
/**
|
|
@@ -19546,6 +19589,9 @@ declare class Channels {
|
|
|
19546
19589
|
static deleteChannel<ThrowOnError extends boolean = false>(options: Options<DeleteChannelData, ThrowOnError>): RequestResult<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError>;
|
|
19547
19590
|
/**
|
|
19548
19591
|
* Get a channel
|
|
19592
|
+
*
|
|
19593
|
+
* The channel's state, its transport modes and its default action. The access token is never returned — `has_credential` is all a read says about it.
|
|
19594
|
+
*
|
|
19549
19595
|
*/
|
|
19550
19596
|
static getChannel<ThrowOnError extends boolean = false>(options: Options<GetChannelData, ThrowOnError>): RequestResult<GetChannelResponses, GetChannelErrors, ThrowOnError>;
|
|
19551
19597
|
/**
|
|
@@ -19572,6 +19618,9 @@ declare class Channels {
|
|
|
19572
19618
|
static openChannelConversation<ThrowOnError extends boolean = false>(options: Options<OpenChannelConversationData, ThrowOnError>): RequestResult<OpenChannelConversationResponses, OpenChannelConversationErrors, ThrowOnError>;
|
|
19573
19619
|
/**
|
|
19574
19620
|
* Get a conversation
|
|
19621
|
+
*
|
|
19622
|
+
* Where the conversation points: the address it belongs to, the route (or sentinel) whose action opened it, and the runtime session it maps 1:1 to. The messages are not here — read them with [`GET /v1/projects/{project_id}/channels/{channel_id}/conversations/{conversation_id}/messages`](/docs/api/channels/list-channel-conversation-messages).
|
|
19623
|
+
*
|
|
19575
19624
|
*/
|
|
19576
19625
|
static getChannelConversation<ThrowOnError extends boolean = false>(options: Options<GetChannelConversationData, ThrowOnError>): RequestResult<GetChannelConversationResponses, GetChannelConversationErrors, ThrowOnError>;
|
|
19577
19626
|
/**
|
|
@@ -20741,6 +20790,9 @@ declare class Models {
|
|
|
20741
20790
|
static listModels<ThrowOnError extends boolean = false>(options?: Options<ListModelsData, ThrowOnError>): RequestResult<ListModelsResponses, ListModelsErrors, ThrowOnError>;
|
|
20742
20791
|
/**
|
|
20743
20792
|
* Get a model
|
|
20793
|
+
*
|
|
20794
|
+
* `{model}` is naturali's own name for the model, the same value [`GET /v1/models`](/docs/api/models/list-models) returns — a vendor's invocation string is a `404`. A `deprecated` model still reads here, so a project already generating on one can see what happened to it.
|
|
20795
|
+
*
|
|
20744
20796
|
*/
|
|
20745
20797
|
static getModel<ThrowOnError extends boolean = false>(options: Options<GetModelData, ThrowOnError>): RequestResult<GetModelResponses, GetModelErrors, ThrowOnError>;
|
|
20746
20798
|
}
|
|
@@ -21332,9 +21384,11 @@ declare class Users {
|
|
|
21332
21384
|
/**
|
|
21333
21385
|
* Get the current account's billing standing
|
|
21334
21386
|
*
|
|
21335
|
-
* The plan the account is on, how long its projects may keep content, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
21387
|
+
* The plan the account is on, how long its projects may keep content, how much indexed storage it is holding, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
21388
|
+
*
|
|
21389
|
+
* A managed-model generation is refused with `402 insufficient_credit` while `credit_balance_usd` is negative, and a feature or a resource count outside the plan is refused with `403`, as is a retention window wider than `retention_days` or an ingest past `storage_limit_gb`. Every refusal names what is missing; this is where the numbers behind them are read.
|
|
21336
21390
|
*
|
|
21337
|
-
*
|
|
21391
|
+
* Every figure here is a local read, which is what keeps this route cheap enough to poll — unlike `GET /v1/users/me/usage`, which asks the meter once per project.
|
|
21338
21392
|
*
|
|
21339
21393
|
* Answers for the caller's own account only, and always the account the credential resolves to — an API key answers for the user that minted it. The plan gating a *project* is that project's billing owner's, so a member of someone else's project reads their own rung here, not that project's.
|
|
21340
21394
|
*
|
|
@@ -21383,6 +21437,9 @@ declare class Webhooks {
|
|
|
21383
21437
|
static deleteWebhook<ThrowOnError extends boolean = false>(options: Options<DeleteWebhookData, ThrowOnError>): RequestResult<DeleteWebhookResponses, DeleteWebhookErrors, ThrowOnError>;
|
|
21384
21438
|
/**
|
|
21385
21439
|
* Get a webhook
|
|
21440
|
+
*
|
|
21441
|
+
* The endpoint, the events it is subscribed to and whether deliveries are attempted. The signing secret is not returned: it is shown once by [`POST /v1/projects/{project_id}/webhooks`](/docs/api/webhooks/create-webhook) and again by [`POST /v1/projects/{project_id}/webhooks/{webhook_id}:rotate-secret`](/docs/api/webhooks/rotate-webhook-secret).
|
|
21442
|
+
*
|
|
21386
21443
|
*/
|
|
21387
21444
|
static getWebhook<ThrowOnError extends boolean = false>(options: Options<GetWebhookData, ThrowOnError>): RequestResult<GetWebhookResponses, GetWebhookErrors, ThrowOnError>;
|
|
21388
21445
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -499,6 +499,18 @@ type AdminUser = User & {
|
|
|
499
499
|
* When this account's spend was last read off the meter, which is how current `credit_balance_usd` is. `null` when it has never been read for at least one of the account's projects, or the account has none. The same figure the account reads about itself at `GET /v1/users/me/billing`.
|
|
500
500
|
*/
|
|
501
501
|
spend_reconciled_at: Date | null;
|
|
502
|
+
/**
|
|
503
|
+
* Indexed storage the account is holding, in the metered gigabytes the ceiling is enforced in — the account's pooled total across every project it pays for, not any one project's. The figure behind a `403 plan_limit_reached` on `resource: "storage"`, and the same one the account reads at `GET /v1/users/me/billing`.
|
|
504
|
+
*/
|
|
505
|
+
storage_gb: number;
|
|
506
|
+
/**
|
|
507
|
+
* The pool the account's plan allows. `null` where a contract sets the ceiling, or where the plan sets none.
|
|
508
|
+
*/
|
|
509
|
+
storage_limit_gb: number | null;
|
|
510
|
+
/**
|
|
511
|
+
* When the oldest sample behind `storage_gb` was taken — a total is only as current as its stalest part. `null` when a project the account pays for has never been sampled, or it has none.
|
|
512
|
+
*/
|
|
513
|
+
storage_sampled_at: Date | null;
|
|
502
514
|
};
|
|
503
515
|
type AdminUserPage = {
|
|
504
516
|
data: Array<AdminUser>;
|
|
@@ -6485,6 +6497,22 @@ type UserBilling = {
|
|
|
6485
6497
|
* When spend was last read off the meter and written to the ledger. `null` when it has never been read for at least one of the account's projects, or the account has none — a balance whose spend has never been read is not current as of anything.
|
|
6486
6498
|
*/
|
|
6487
6499
|
spend_reconciled_at: Date | null;
|
|
6500
|
+
/**
|
|
6501
|
+
* Indexed storage the account is holding, in the metered gigabytes the ceiling is enforced in — the raw file plus every chunk's text and its embedding vector, so not the size of what you uploaded.
|
|
6502
|
+
*
|
|
6503
|
+
* **The account's total, not a project's.** The ceiling is pooled across every project the account pays for, so one project may hold all of it. Per project, read the `gb_day` component of `GET /v1/projects/{project_id}/usage`.
|
|
6504
|
+
*/
|
|
6505
|
+
storage_gb: number;
|
|
6506
|
+
/**
|
|
6507
|
+
* The pool the account's plan allows. An ingest past it is refused with `403 plan_limit_reached` and `resource: "storage"`, whose `details` carry this figure as `limit` and what you are holding as `storage_gb`. Null where a contract sets the ceiling, or where the plan sets none.
|
|
6508
|
+
*/
|
|
6509
|
+
storage_limit_gb: number | null;
|
|
6510
|
+
/**
|
|
6511
|
+
* When the **oldest** of the samples behind `storage_gb` was taken — the total is only as current as its stalest part. Measured every few minutes per project rather than on this request, so read the two together, exactly as with the balance and `spend_reconciled_at`.
|
|
6512
|
+
*
|
|
6513
|
+
* Null when a project the account pays for has never been sampled, or it has no projects: a total missing a component is not current as of anything. The figure itself still reports what the samples that do exist add up to.
|
|
6514
|
+
*/
|
|
6515
|
+
storage_sampled_at: Date | null;
|
|
6488
6516
|
};
|
|
6489
6517
|
type UserUsage = {
|
|
6490
6518
|
/**
|
|
@@ -19445,6 +19473,9 @@ declare class Actors {
|
|
|
19445
19473
|
declare class Channels {
|
|
19446
19474
|
/**
|
|
19447
19475
|
* List addresses
|
|
19476
|
+
*
|
|
19477
|
+
* Every identifier this project has seen. An address appears the first time a message arrives from it, so this is what naturali has observed rather than a roster you maintain — most rows carry no `action` of their own and defer to the route table.
|
|
19478
|
+
*
|
|
19448
19479
|
*/
|
|
19449
19480
|
static listAddresses<ThrowOnError extends boolean = false>(options: Options<ListAddressesData, ThrowOnError>): RequestResult<ListAddressesResponses, ListAddressesErrors, ThrowOnError>;
|
|
19450
19481
|
/**
|
|
@@ -19456,6 +19487,9 @@ declare class Channels {
|
|
|
19456
19487
|
static deleteAddress<ThrowOnError extends boolean = false>(options: Options<DeleteAddressData, ThrowOnError>): RequestResult<DeleteAddressResponses, DeleteAddressErrors, ThrowOnError>;
|
|
19457
19488
|
/**
|
|
19458
19489
|
* Get an address
|
|
19490
|
+
*
|
|
19491
|
+
* Reads one identifier's own action, if it has one. An identifier naturali has never seen is a `404`; to set an action without knowing whether it exists, use [`PUT /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/set-address-action), which upserts.
|
|
19492
|
+
*
|
|
19459
19493
|
*/
|
|
19460
19494
|
static getAddress<ThrowOnError extends boolean = false>(options: Options<GetAddressData, ThrowOnError>): RequestResult<GetAddressResponses, GetAddressErrors, ThrowOnError>;
|
|
19461
19495
|
/**
|
|
@@ -19481,6 +19515,9 @@ declare class Channels {
|
|
|
19481
19515
|
static listChannelKinds<ThrowOnError extends boolean = false>(options?: Options<ListChannelKindsData, ThrowOnError>): RequestResult<ListChannelKindsResponses, ListChannelKindsErrors, ThrowOnError>;
|
|
19482
19516
|
/**
|
|
19483
19517
|
* List a channel's routes
|
|
19518
|
+
*
|
|
19519
|
+
* One channel's routes, newest first, `disabled` ones included — only `active` routes take part in resolution. For every route in the project in one read, use [`GET /v1/projects/{project_id}/channel-routes`](/docs/api/channel-routes/list-project-channel-routes).
|
|
19520
|
+
*
|
|
19484
19521
|
*/
|
|
19485
19522
|
static listChannelRoutes<ThrowOnError extends boolean = false>(options: Options<ListChannelRoutesData, ThrowOnError>): RequestResult<ListChannelRoutesResponses, ListChannelRoutesErrors, ThrowOnError>;
|
|
19486
19523
|
/**
|
|
@@ -19492,10 +19529,16 @@ declare class Channels {
|
|
|
19492
19529
|
static createChannelRoute<ThrowOnError extends boolean = false>(options: Options<CreateChannelRouteData, ThrowOnError>): RequestResult<CreateChannelRouteResponses, CreateChannelRouteErrors, ThrowOnError>;
|
|
19493
19530
|
/**
|
|
19494
19531
|
* Delete a route
|
|
19532
|
+
*
|
|
19533
|
+
* Conversations opened under this route keep its id and stay where they are; the next inbound resolves to the next most specific route, or the channel default, and opens a new conversation there. To stop a route from matching while keeping it readable, `PATCH` it to `status: disabled` instead.
|
|
19534
|
+
*
|
|
19495
19535
|
*/
|
|
19496
19536
|
static deleteChannelRoute<ThrowOnError extends boolean = false>(options: Options<DeleteChannelRouteData, ThrowOnError>): RequestResult<DeleteChannelRouteResponses, DeleteChannelRouteErrors, ThrowOnError>;
|
|
19497
19537
|
/**
|
|
19498
19538
|
* Get a route
|
|
19539
|
+
*
|
|
19540
|
+
* A route id is only meaningful inside its own channel: the same id under another `channel_id` is a `404`. A conversation's `route_id` may instead be one of the two sentinels for the address's own action and the channel default — those name no route and are not readable here.
|
|
19541
|
+
*
|
|
19499
19542
|
*/
|
|
19500
19543
|
static getChannelRoute<ThrowOnError extends boolean = false>(options: Options<GetChannelRouteData, ThrowOnError>): RequestResult<GetChannelRouteResponses, GetChannelRouteErrors, ThrowOnError>;
|
|
19501
19544
|
/**
|
|
@@ -19546,6 +19589,9 @@ declare class Channels {
|
|
|
19546
19589
|
static deleteChannel<ThrowOnError extends boolean = false>(options: Options<DeleteChannelData, ThrowOnError>): RequestResult<DeleteChannelResponses, DeleteChannelErrors, ThrowOnError>;
|
|
19547
19590
|
/**
|
|
19548
19591
|
* Get a channel
|
|
19592
|
+
*
|
|
19593
|
+
* The channel's state, its transport modes and its default action. The access token is never returned — `has_credential` is all a read says about it.
|
|
19594
|
+
*
|
|
19549
19595
|
*/
|
|
19550
19596
|
static getChannel<ThrowOnError extends boolean = false>(options: Options<GetChannelData, ThrowOnError>): RequestResult<GetChannelResponses, GetChannelErrors, ThrowOnError>;
|
|
19551
19597
|
/**
|
|
@@ -19572,6 +19618,9 @@ declare class Channels {
|
|
|
19572
19618
|
static openChannelConversation<ThrowOnError extends boolean = false>(options: Options<OpenChannelConversationData, ThrowOnError>): RequestResult<OpenChannelConversationResponses, OpenChannelConversationErrors, ThrowOnError>;
|
|
19573
19619
|
/**
|
|
19574
19620
|
* Get a conversation
|
|
19621
|
+
*
|
|
19622
|
+
* Where the conversation points: the address it belongs to, the route (or sentinel) whose action opened it, and the runtime session it maps 1:1 to. The messages are not here — read them with [`GET /v1/projects/{project_id}/channels/{channel_id}/conversations/{conversation_id}/messages`](/docs/api/channels/list-channel-conversation-messages).
|
|
19623
|
+
*
|
|
19575
19624
|
*/
|
|
19576
19625
|
static getChannelConversation<ThrowOnError extends boolean = false>(options: Options<GetChannelConversationData, ThrowOnError>): RequestResult<GetChannelConversationResponses, GetChannelConversationErrors, ThrowOnError>;
|
|
19577
19626
|
/**
|
|
@@ -20741,6 +20790,9 @@ declare class Models {
|
|
|
20741
20790
|
static listModels<ThrowOnError extends boolean = false>(options?: Options<ListModelsData, ThrowOnError>): RequestResult<ListModelsResponses, ListModelsErrors, ThrowOnError>;
|
|
20742
20791
|
/**
|
|
20743
20792
|
* Get a model
|
|
20793
|
+
*
|
|
20794
|
+
* `{model}` is naturali's own name for the model, the same value [`GET /v1/models`](/docs/api/models/list-models) returns — a vendor's invocation string is a `404`. A `deprecated` model still reads here, so a project already generating on one can see what happened to it.
|
|
20795
|
+
*
|
|
20744
20796
|
*/
|
|
20745
20797
|
static getModel<ThrowOnError extends boolean = false>(options: Options<GetModelData, ThrowOnError>): RequestResult<GetModelResponses, GetModelErrors, ThrowOnError>;
|
|
20746
20798
|
}
|
|
@@ -21332,9 +21384,11 @@ declare class Users {
|
|
|
21332
21384
|
/**
|
|
21333
21385
|
* Get the current account's billing standing
|
|
21334
21386
|
*
|
|
21335
|
-
* The plan the account is on, how long its projects may keep content, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
21387
|
+
* The plan the account is on, how long its projects may keep content, how much indexed storage it is holding, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
21388
|
+
*
|
|
21389
|
+
* A managed-model generation is refused with `402 insufficient_credit` while `credit_balance_usd` is negative, and a feature or a resource count outside the plan is refused with `403`, as is a retention window wider than `retention_days` or an ingest past `storage_limit_gb`. Every refusal names what is missing; this is where the numbers behind them are read.
|
|
21336
21390
|
*
|
|
21337
|
-
*
|
|
21391
|
+
* Every figure here is a local read, which is what keeps this route cheap enough to poll — unlike `GET /v1/users/me/usage`, which asks the meter once per project.
|
|
21338
21392
|
*
|
|
21339
21393
|
* Answers for the caller's own account only, and always the account the credential resolves to — an API key answers for the user that minted it. The plan gating a *project* is that project's billing owner's, so a member of someone else's project reads their own rung here, not that project's.
|
|
21340
21394
|
*
|
|
@@ -21383,6 +21437,9 @@ declare class Webhooks {
|
|
|
21383
21437
|
static deleteWebhook<ThrowOnError extends boolean = false>(options: Options<DeleteWebhookData, ThrowOnError>): RequestResult<DeleteWebhookResponses, DeleteWebhookErrors, ThrowOnError>;
|
|
21384
21438
|
/**
|
|
21385
21439
|
* Get a webhook
|
|
21440
|
+
*
|
|
21441
|
+
* The endpoint, the events it is subscribed to and whether deliveries are attempted. The signing secret is not returned: it is shown once by [`POST /v1/projects/{project_id}/webhooks`](/docs/api/webhooks/create-webhook) and again by [`POST /v1/projects/{project_id}/webhooks/{webhook_id}:rotate-secret`](/docs/api/webhooks/rotate-webhook-secret).
|
|
21442
|
+
*
|
|
21386
21443
|
*/
|
|
21387
21444
|
static getWebhook<ThrowOnError extends boolean = false>(options: Options<GetWebhookData, ThrowOnError>): RequestResult<GetWebhookResponses, GetWebhookErrors, ThrowOnError>;
|
|
21388
21445
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -738,6 +738,9 @@ var Actors = class {
|
|
|
738
738
|
var Channels = class {
|
|
739
739
|
/**
|
|
740
740
|
* List addresses
|
|
741
|
+
*
|
|
742
|
+
* Every identifier this project has seen. An address appears the first time a message arrives from it, so this is what naturali has observed rather than a roster you maintain — most rows carry no `action` of their own and defer to the route table.
|
|
743
|
+
*
|
|
741
744
|
*/
|
|
742
745
|
static listAddresses(options) {
|
|
743
746
|
return (options.client ?? client).get({
|
|
@@ -759,6 +762,9 @@ var Channels = class {
|
|
|
759
762
|
}
|
|
760
763
|
/**
|
|
761
764
|
* Get an address
|
|
765
|
+
*
|
|
766
|
+
* Reads one identifier's own action, if it has one. An identifier naturali has never seen is a `404`; to set an action without knowing whether it exists, use [`PUT /v1/projects/{project_id}/addresses/{identifier}`](/docs/api/addresses/set-address-action), which upserts.
|
|
767
|
+
*
|
|
762
768
|
*/
|
|
763
769
|
static getAddress(options) {
|
|
764
770
|
return (options.client ?? client).get({
|
|
@@ -808,6 +814,9 @@ var Channels = class {
|
|
|
808
814
|
}
|
|
809
815
|
/**
|
|
810
816
|
* List a channel's routes
|
|
817
|
+
*
|
|
818
|
+
* One channel's routes, newest first, `disabled` ones included — only `active` routes take part in resolution. For every route in the project in one read, use [`GET /v1/projects/{project_id}/channel-routes`](/docs/api/channel-routes/list-project-channel-routes).
|
|
819
|
+
*
|
|
811
820
|
*/
|
|
812
821
|
static listChannelRoutes(options) {
|
|
813
822
|
return (options.client ?? client).get({
|
|
@@ -833,6 +842,9 @@ var Channels = class {
|
|
|
833
842
|
}
|
|
834
843
|
/**
|
|
835
844
|
* Delete a route
|
|
845
|
+
*
|
|
846
|
+
* Conversations opened under this route keep its id and stay where they are; the next inbound resolves to the next most specific route, or the channel default, and opens a new conversation there. To stop a route from matching while keeping it readable, `PATCH` it to `status: disabled` instead.
|
|
847
|
+
*
|
|
836
848
|
*/
|
|
837
849
|
static deleteChannelRoute(options) {
|
|
838
850
|
return (options.client ?? client).delete({
|
|
@@ -842,6 +854,9 @@ var Channels = class {
|
|
|
842
854
|
}
|
|
843
855
|
/**
|
|
844
856
|
* Get a route
|
|
857
|
+
*
|
|
858
|
+
* A route id is only meaningful inside its own channel: the same id under another `channel_id` is a `404`. A conversation's `route_id` may instead be one of the two sentinels for the address's own action and the channel default — those name no route and are not readable here.
|
|
859
|
+
*
|
|
845
860
|
*/
|
|
846
861
|
static getChannelRoute(options) {
|
|
847
862
|
return (options.client ?? client).get({
|
|
@@ -930,6 +945,9 @@ var Channels = class {
|
|
|
930
945
|
}
|
|
931
946
|
/**
|
|
932
947
|
* Get a channel
|
|
948
|
+
*
|
|
949
|
+
* The channel's state, its transport modes and its default action. The access token is never returned — `has_credential` is all a read says about it.
|
|
950
|
+
*
|
|
933
951
|
*/
|
|
934
952
|
static getChannel(options) {
|
|
935
953
|
return (options.client ?? client).get({
|
|
@@ -984,6 +1002,9 @@ var Channels = class {
|
|
|
984
1002
|
}
|
|
985
1003
|
/**
|
|
986
1004
|
* Get a conversation
|
|
1005
|
+
*
|
|
1006
|
+
* Where the conversation points: the address it belongs to, the route (or sentinel) whose action opened it, and the runtime session it maps 1:1 to. The messages are not here — read them with [`GET /v1/projects/{project_id}/channels/{channel_id}/conversations/{conversation_id}/messages`](/docs/api/channels/list-channel-conversation-messages).
|
|
1007
|
+
*
|
|
987
1008
|
*/
|
|
988
1009
|
static getChannelConversation(options) {
|
|
989
1010
|
return (options.client ?? client).get({
|
|
@@ -3216,6 +3237,9 @@ var Models = class {
|
|
|
3216
3237
|
}
|
|
3217
3238
|
/**
|
|
3218
3239
|
* Get a model
|
|
3240
|
+
*
|
|
3241
|
+
* `{model}` is naturali's own name for the model, the same value [`GET /v1/models`](/docs/api/models/list-models) returns — a vendor's invocation string is a `404`. A `deprecated` model still reads here, so a project already generating on one can see what happened to it.
|
|
3242
|
+
*
|
|
3219
3243
|
*/
|
|
3220
3244
|
static getModel(options) {
|
|
3221
3245
|
return (options.client ?? client).get({
|
|
@@ -4357,9 +4381,11 @@ var Users = class {
|
|
|
4357
4381
|
/**
|
|
4358
4382
|
* Get the current account's billing standing
|
|
4359
4383
|
*
|
|
4360
|
-
* The plan the account is on, how long its projects may keep content, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
4384
|
+
* The plan the account is on, how long its projects may keep content, how much indexed storage it is holding, and the credit it has left — the figures the platform already enforces against, readable by the account they are enforced against.
|
|
4385
|
+
*
|
|
4386
|
+
* A managed-model generation is refused with `402 insufficient_credit` while `credit_balance_usd` is negative, and a feature or a resource count outside the plan is refused with `403`, as is a retention window wider than `retention_days` or an ingest past `storage_limit_gb`. Every refusal names what is missing; this is where the numbers behind them are read.
|
|
4361
4387
|
*
|
|
4362
|
-
*
|
|
4388
|
+
* Every figure here is a local read, which is what keeps this route cheap enough to poll — unlike `GET /v1/users/me/usage`, which asks the meter once per project.
|
|
4363
4389
|
*
|
|
4364
4390
|
* Answers for the caller's own account only, and always the account the credential resolves to — an API key answers for the user that minted it. The plan gating a *project* is that project's billing owner's, so a member of someone else's project reads their own rung here, not that project's.
|
|
4365
4391
|
*
|
|
@@ -4437,6 +4463,9 @@ var Webhooks = class {
|
|
|
4437
4463
|
}
|
|
4438
4464
|
/**
|
|
4439
4465
|
* Get a webhook
|
|
4466
|
+
*
|
|
4467
|
+
* The endpoint, the events it is subscribed to and whether deliveries are attempted. The signing secret is not returned: it is shown once by [`POST /v1/projects/{project_id}/webhooks`](/docs/api/webhooks/create-webhook) and again by [`POST /v1/projects/{project_id}/webhooks/{webhook_id}:rotate-secret`](/docs/api/webhooks/rotate-webhook-secret).
|
|
4468
|
+
*
|
|
4440
4469
|
*/
|
|
4441
4470
|
static getWebhook(options) {
|
|
4442
4471
|
return (options.client ?? client).get({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.125.0",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"tsx": "^4.23.1",
|
|
38
38
|
"typescript": "~6.0.3",
|
|
39
39
|
"vitest": "^4.1.10",
|
|
40
|
-
"@naturali/api": "0.
|
|
40
|
+
"@naturali/api": "0.125.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"generate": "tsx scripts/generate.ts",
|