@naturali/sdk 0.230.0 → 0.232.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 +121 -0
- package/dist/index.d.cts +658 -1
- package/dist/index.d.mts +658 -1
- package/dist/index.mjs +120 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -4547,6 +4547,121 @@ var Models = class {
|
|
|
4547
4547
|
});
|
|
4548
4548
|
}
|
|
4549
4549
|
};
|
|
4550
|
+
var OauthClients = class {
|
|
4551
|
+
/**
|
|
4552
|
+
* List OAuth clients
|
|
4553
|
+
*
|
|
4554
|
+
* Returns the OAuth clients of a project.
|
|
4555
|
+
*/
|
|
4556
|
+
static listOauthClients(options) {
|
|
4557
|
+
return (options.client ?? client).get({
|
|
4558
|
+
url: "/v1/projects/{project_id}/oauth-clients",
|
|
4559
|
+
...options
|
|
4560
|
+
});
|
|
4561
|
+
}
|
|
4562
|
+
/**
|
|
4563
|
+
* Create an OAuth client
|
|
4564
|
+
*
|
|
4565
|
+
* Registers your app at a provider. `client_secret` is a `{{secret:sec_...}}` reference, and the caller needs `secrets:UseSecret` on it.
|
|
4566
|
+
*/
|
|
4567
|
+
static createOauthClient(options) {
|
|
4568
|
+
return (options.client ?? client).post({
|
|
4569
|
+
url: "/v1/projects/{project_id}/oauth-clients",
|
|
4570
|
+
...options,
|
|
4571
|
+
headers: {
|
|
4572
|
+
"Content-Type": "application/json",
|
|
4573
|
+
...options.headers
|
|
4574
|
+
}
|
|
4575
|
+
});
|
|
4576
|
+
}
|
|
4577
|
+
/**
|
|
4578
|
+
* Delete an OAuth client
|
|
4579
|
+
*
|
|
4580
|
+
* Deletes the client and every connection made through it.
|
|
4581
|
+
*/
|
|
4582
|
+
static deleteOauthClient(options) {
|
|
4583
|
+
return (options.client ?? client).delete({
|
|
4584
|
+
url: "/v1/projects/{project_id}/oauth-clients/{oauth_client_id}",
|
|
4585
|
+
...options
|
|
4586
|
+
});
|
|
4587
|
+
}
|
|
4588
|
+
/**
|
|
4589
|
+
* Get an OAuth client
|
|
4590
|
+
*
|
|
4591
|
+
* Returns the client; `client_secret` is its secret reference.
|
|
4592
|
+
*/
|
|
4593
|
+
static getOauthClient(options) {
|
|
4594
|
+
return (options.client ?? client).get({
|
|
4595
|
+
url: "/v1/projects/{project_id}/oauth-clients/{oauth_client_id}",
|
|
4596
|
+
...options
|
|
4597
|
+
});
|
|
4598
|
+
}
|
|
4599
|
+
/**
|
|
4600
|
+
* Update an OAuth client
|
|
4601
|
+
*
|
|
4602
|
+
* Changes only the fields sent; `null` clears a nullable one.
|
|
4603
|
+
*/
|
|
4604
|
+
static updateOauthClient(options) {
|
|
4605
|
+
return (options.client ?? client).patch({
|
|
4606
|
+
url: "/v1/projects/{project_id}/oauth-clients/{oauth_client_id}",
|
|
4607
|
+
...options,
|
|
4608
|
+
headers: {
|
|
4609
|
+
"Content-Type": "application/json",
|
|
4610
|
+
...options.headers
|
|
4611
|
+
}
|
|
4612
|
+
});
|
|
4613
|
+
}
|
|
4614
|
+
};
|
|
4615
|
+
var OauthConnections = class {
|
|
4616
|
+
/**
|
|
4617
|
+
* List OAuth connections
|
|
4618
|
+
*
|
|
4619
|
+
* Returns a project's OAuth connections, without tokens.
|
|
4620
|
+
*/
|
|
4621
|
+
static listOauthConnections(options) {
|
|
4622
|
+
return (options.client ?? client).get({
|
|
4623
|
+
url: "/v1/projects/{project_id}/oauth-connections",
|
|
4624
|
+
...options
|
|
4625
|
+
});
|
|
4626
|
+
}
|
|
4627
|
+
/**
|
|
4628
|
+
* Start an OAuth connection
|
|
4629
|
+
*
|
|
4630
|
+
* 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.
|
|
4631
|
+
*/
|
|
4632
|
+
static createOauthConnection(options) {
|
|
4633
|
+
return (options.client ?? client).post({
|
|
4634
|
+
url: "/v1/projects/{project_id}/oauth-connections",
|
|
4635
|
+
...options,
|
|
4636
|
+
headers: {
|
|
4637
|
+
"Content-Type": "application/json",
|
|
4638
|
+
...options.headers
|
|
4639
|
+
}
|
|
4640
|
+
});
|
|
4641
|
+
}
|
|
4642
|
+
/**
|
|
4643
|
+
* Delete an OAuth connection
|
|
4644
|
+
*
|
|
4645
|
+
* 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.
|
|
4646
|
+
*/
|
|
4647
|
+
static deleteOauthConnection(options) {
|
|
4648
|
+
return (options.client ?? client).delete({
|
|
4649
|
+
url: "/v1/projects/{project_id}/oauth-connections/{oauth_connection_id}",
|
|
4650
|
+
...options
|
|
4651
|
+
});
|
|
4652
|
+
}
|
|
4653
|
+
/**
|
|
4654
|
+
* Get an OAuth connection
|
|
4655
|
+
*
|
|
4656
|
+
* Returns the connection's status, without tokens.
|
|
4657
|
+
*/
|
|
4658
|
+
static getOauthConnection(options) {
|
|
4659
|
+
return (options.client ?? client).get({
|
|
4660
|
+
url: "/v1/projects/{project_id}/oauth-connections/{oauth_connection_id}",
|
|
4661
|
+
...options
|
|
4662
|
+
});
|
|
4663
|
+
}
|
|
4664
|
+
};
|
|
4550
4665
|
var Orchestrations = class {
|
|
4551
4666
|
/**
|
|
4552
4667
|
* List orchestrations
|
|
@@ -6895,6 +7010,8 @@ var NaturaliClient = class {
|
|
|
6895
7010
|
memoryStores;
|
|
6896
7011
|
metadataSchemas;
|
|
6897
7012
|
modelRoutes;
|
|
7013
|
+
oauthClients;
|
|
7014
|
+
oauthConnections;
|
|
6898
7015
|
quotas;
|
|
6899
7016
|
models;
|
|
6900
7017
|
orchestrations;
|
|
@@ -6953,6 +7070,8 @@ var NaturaliClient = class {
|
|
|
6953
7070
|
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
6954
7071
|
this.metadataSchemas = bindResource(MetadataSchemas, this.http);
|
|
6955
7072
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
7073
|
+
this.oauthClients = bindResource(OauthClients, this.http);
|
|
7074
|
+
this.oauthConnections = bindResource(OauthConnections, this.http);
|
|
6956
7075
|
this.quotas = bindResource(Quotas, this.http);
|
|
6957
7076
|
this.models = bindResource(Models, this.http);
|
|
6958
7077
|
this.orchestrations = bindResource(Orchestrations, this.http);
|
|
@@ -6970,4 +7089,4 @@ var NaturaliClient = class {
|
|
|
6970
7089
|
}
|
|
6971
7090
|
};
|
|
6972
7091
|
//#endregion
|
|
6973
|
-
export { Activity, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Collections, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Installs, Knowledge, Listings, McpServers, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, Models, NaturaliClient, Orchestrations, Playbooks, Projects, Quotas, Secrets, Sessions, Tasks, Tools, Traces, Triggers, Users, Webhooks, Workflows, createClient, createConfig };
|
|
7092
|
+
export { Activity, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Collections, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Installs, Knowledge, Listings, McpServers, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, Models, NaturaliClient, OauthClients, OauthConnections, Orchestrations, Playbooks, 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.232.0",
|
|
4
4
|
"description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
41
|
-
"@naturali/api": "0.
|
|
41
|
+
"@naturali/api": "0.232.0",
|
|
42
42
|
"@ttoss/openapi-codegen": "^0.10.0",
|
|
43
43
|
"@types/node": "^26.5.1",
|
|
44
44
|
"tsdown": "^0.23.0",
|