@soat/sdk 0.103.0 → 0.104.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 +135 -3
- package/dist/index.d.cts +923 -139
- package/dist/index.d.mts +923 -139
- package/dist/index.mjs +134 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3598,6 +3598,132 @@ var ModelRoutes = class {
|
|
|
3598
3598
|
});
|
|
3599
3599
|
}
|
|
3600
3600
|
};
|
|
3601
|
+
var OauthClients = class {
|
|
3602
|
+
/**
|
|
3603
|
+
* List OAuth clients
|
|
3604
|
+
*
|
|
3605
|
+
* Returns the OAuth clients of a project.
|
|
3606
|
+
*/
|
|
3607
|
+
static listOauthClients(options) {
|
|
3608
|
+
return (options?.client ?? client).get({
|
|
3609
|
+
url: "/api/v1/oauth-clients",
|
|
3610
|
+
...options
|
|
3611
|
+
});
|
|
3612
|
+
}
|
|
3613
|
+
/**
|
|
3614
|
+
* Create an OAuth client
|
|
3615
|
+
*
|
|
3616
|
+
* Registers your app at a provider. `client_secret` is a `{{secret:sec_...}}` reference, and the caller needs `secrets:UseSecret` on it.
|
|
3617
|
+
*/
|
|
3618
|
+
static createOauthClient(options) {
|
|
3619
|
+
return (options.client ?? client).post({
|
|
3620
|
+
url: "/api/v1/oauth-clients",
|
|
3621
|
+
...options,
|
|
3622
|
+
headers: {
|
|
3623
|
+
"Content-Type": "application/json",
|
|
3624
|
+
...options.headers
|
|
3625
|
+
}
|
|
3626
|
+
});
|
|
3627
|
+
}
|
|
3628
|
+
/**
|
|
3629
|
+
* Delete an OAuth client
|
|
3630
|
+
*
|
|
3631
|
+
* Deletes the client and every connection made through it.
|
|
3632
|
+
*/
|
|
3633
|
+
static deleteOauthClient(options) {
|
|
3634
|
+
return (options.client ?? client).delete({
|
|
3635
|
+
url: "/api/v1/oauth-clients/{oauth_client_id}",
|
|
3636
|
+
...options
|
|
3637
|
+
});
|
|
3638
|
+
}
|
|
3639
|
+
/**
|
|
3640
|
+
* Get an OAuth client
|
|
3641
|
+
*
|
|
3642
|
+
* Returns the client; `client_secret` is its secret reference.
|
|
3643
|
+
*/
|
|
3644
|
+
static getOauthClient(options) {
|
|
3645
|
+
return (options.client ?? client).get({
|
|
3646
|
+
url: "/api/v1/oauth-clients/{oauth_client_id}",
|
|
3647
|
+
...options
|
|
3648
|
+
});
|
|
3649
|
+
}
|
|
3650
|
+
/**
|
|
3651
|
+
* Update an OAuth client
|
|
3652
|
+
*
|
|
3653
|
+
* Changes only the fields sent; `null` clears a nullable one.
|
|
3654
|
+
*/
|
|
3655
|
+
static updateOauthClient(options) {
|
|
3656
|
+
return (options.client ?? client).patch({
|
|
3657
|
+
url: "/api/v1/oauth-clients/{oauth_client_id}",
|
|
3658
|
+
...options,
|
|
3659
|
+
headers: {
|
|
3660
|
+
"Content-Type": "application/json",
|
|
3661
|
+
...options.headers
|
|
3662
|
+
}
|
|
3663
|
+
});
|
|
3664
|
+
}
|
|
3665
|
+
};
|
|
3666
|
+
var OauthConnections = class {
|
|
3667
|
+
/**
|
|
3668
|
+
* List OAuth connections
|
|
3669
|
+
*
|
|
3670
|
+
* Returns a project's OAuth connections, without tokens.
|
|
3671
|
+
*/
|
|
3672
|
+
static listOauthConnections(options) {
|
|
3673
|
+
return (options?.client ?? client).get({
|
|
3674
|
+
url: "/api/v1/oauth-connections",
|
|
3675
|
+
...options
|
|
3676
|
+
});
|
|
3677
|
+
}
|
|
3678
|
+
/**
|
|
3679
|
+
* Start an OAuth connection
|
|
3680
|
+
*
|
|
3681
|
+
* Starts the authorization of an actor through an OAuth client and returns the `authorize_url` to send the person to; it is single-use and expires after 10 minutes. Starting again for the same actor and client restarts the same connection (`200`), and a connected one keeps its tokens until the new authorization completes. Hand the `authorize_url` only to the person the actor is: whoever consents connects their account to that actor.
|
|
3682
|
+
*/
|
|
3683
|
+
static createOauthConnection(options) {
|
|
3684
|
+
return (options.client ?? client).post({
|
|
3685
|
+
url: "/api/v1/oauth-connections",
|
|
3686
|
+
...options,
|
|
3687
|
+
headers: {
|
|
3688
|
+
"Content-Type": "application/json",
|
|
3689
|
+
...options.headers
|
|
3690
|
+
}
|
|
3691
|
+
});
|
|
3692
|
+
}
|
|
3693
|
+
/**
|
|
3694
|
+
* Complete an OAuth connection
|
|
3695
|
+
*
|
|
3696
|
+
* The provider's redirect target. Not IAM-gated: the single-use `state` is the credential. Exchanges `code` for tokens and connects the connection; redirects to its `return_url` when one was given, else answers the connection. A front end that receives the provider's redirect itself forwards `code` and `state` here.
|
|
3697
|
+
*/
|
|
3698
|
+
static completeOauthConnection(options) {
|
|
3699
|
+
return (options?.client ?? client).get({
|
|
3700
|
+
url: "/api/v1/oauth-connections/callback",
|
|
3701
|
+
...options
|
|
3702
|
+
});
|
|
3703
|
+
}
|
|
3704
|
+
/**
|
|
3705
|
+
* Delete an OAuth connection
|
|
3706
|
+
*
|
|
3707
|
+
* Revokes the grant at the provider's `revocation_url`, when the client has one, and deletes the connection. A failed revocation does not stop the deletion.
|
|
3708
|
+
*/
|
|
3709
|
+
static deleteOauthConnection(options) {
|
|
3710
|
+
return (options.client ?? client).delete({
|
|
3711
|
+
url: "/api/v1/oauth-connections/{oauth_connection_id}",
|
|
3712
|
+
...options
|
|
3713
|
+
});
|
|
3714
|
+
}
|
|
3715
|
+
/**
|
|
3716
|
+
* Get an OAuth connection
|
|
3717
|
+
*
|
|
3718
|
+
* Returns the connection's status, without tokens.
|
|
3719
|
+
*/
|
|
3720
|
+
static getOauthConnection(options) {
|
|
3721
|
+
return (options.client ?? client).get({
|
|
3722
|
+
url: "/api/v1/oauth-connections/{oauth_connection_id}",
|
|
3723
|
+
...options
|
|
3724
|
+
});
|
|
3725
|
+
}
|
|
3726
|
+
};
|
|
3601
3727
|
var Orchestrations = class {
|
|
3602
3728
|
/**
|
|
3603
3729
|
* List orchestrations
|
|
@@ -4252,7 +4378,7 @@ var Policies = class {
|
|
|
4252
4378
|
/**
|
|
4253
4379
|
* Delete a policy
|
|
4254
4380
|
*
|
|
4255
|
-
* Deletes a global policy. Requires admin role. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger
|
|
4381
|
+
* Deletes a global policy. Requires admin role. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent or webhook names it in its `policy_ids`.
|
|
4256
4382
|
*/
|
|
4257
4383
|
static deletePolicy(options) {
|
|
4258
4384
|
return (options.client ?? client).delete({
|
|
@@ -5259,7 +5385,7 @@ var Triggers = class {
|
|
|
5259
5385
|
/**
|
|
5260
5386
|
* Update a trigger
|
|
5261
5387
|
*
|
|
5262
|
-
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks the target-start action (`orchestrations:StartRun`, `agents:CreateAgentGeneration` or `tools:CallTool`) against the resulting target, because a firing
|
|
5388
|
+
* Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks the target-start action (`orchestrations:StartRun`, `agents:CreateAgentGeneration` or `tools:CallTool`) against the resulting target, because a firing acts under the trigger's `policy_ids` rather than the updater's grant. A caller who could not start the new target is answered `403` and the trigger keeps the target it had. A `{{secret:...}}` reference in a written `tool_context`, or in the stored one when the target changes, also needs `secrets:UseSecret` on that secret, else `403`.
|
|
5263
5389
|
*
|
|
5264
5390
|
*/
|
|
5265
5391
|
static updateTrigger(options) {
|
|
@@ -5275,7 +5401,7 @@ var Triggers = class {
|
|
|
5275
5401
|
/**
|
|
5276
5402
|
* Fire a trigger
|
|
5277
5403
|
*
|
|
5278
|
-
* Fires a trigger synchronously and returns the terminal firing record. The firing itself always settles here; an `eval` target's run is queued rather than executed inline, so the record names a `queued` run to poll.
|
|
5404
|
+
* Fires a trigger synchronously and returns the terminal firing record. The firing acts as the caller ∩ the trigger's `policy_ids`, which must allow starting the target, else `403`. The firing itself always settles here; an `eval` target's run is queued rather than executed inline, so the record names a `queued` run to poll.
|
|
5279
5405
|
*/
|
|
5280
5406
|
static fireTrigger(options) {
|
|
5281
5407
|
return (options.client ?? client).post({
|
|
@@ -5881,6 +6007,8 @@ var SoatClient = class {
|
|
|
5881
6007
|
memoryStores;
|
|
5882
6008
|
metadataSchemas;
|
|
5883
6009
|
modelRoutes;
|
|
6010
|
+
oauthClients;
|
|
6011
|
+
oauthConnections;
|
|
5884
6012
|
orchestrations;
|
|
5885
6013
|
playbooks;
|
|
5886
6014
|
policies;
|
|
@@ -5934,6 +6062,8 @@ var SoatClient = class {
|
|
|
5934
6062
|
this.memoryStores = bindResource(MemoryStores, httpClient);
|
|
5935
6063
|
this.metadataSchemas = bindResource(MetadataSchemas, httpClient);
|
|
5936
6064
|
this.modelRoutes = bindResource(ModelRoutes, httpClient);
|
|
6065
|
+
this.oauthClients = bindResource(OauthClients, httpClient);
|
|
6066
|
+
this.oauthConnections = bindResource(OauthConnections, httpClient);
|
|
5937
6067
|
this.orchestrations = bindResource(Orchestrations, httpClient);
|
|
5938
6068
|
this.playbooks = bindResource(Playbooks, httpClient);
|
|
5939
6069
|
this.policies = bindResource(Policies, httpClient);
|
|
@@ -5953,4 +6083,4 @@ var SoatClient = class {
|
|
|
5953
6083
|
}
|
|
5954
6084
|
};
|
|
5955
6085
|
//#endregion
|
|
5956
|
-
export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chains, Chats, Collections, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, Orchestrations, Playbooks, Policies, Projects, Quotas, Secrets, Sessions, Shares, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
|
|
6086
|
+
export { Activity, Actors, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, AuditLog, Chains, Chats, Collections, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, OauthClients, OauthConnections, Orchestrations, Playbooks, Policies, Projects, Quotas, Secrets, Sessions, Shares, SoatClient, Tasks, Tools, Traces, Triggers, Usage, Users, Webhooks, Workflows, createClient, createConfig };
|