@naturali/sdk 0.231.0 → 0.232.1

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.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
@@ -6059,6 +6174,8 @@ var Tools = class {
6059
6174
  *
6060
6175
  * A credential scoped to a project the tool is shared with, through an accepted share, calls it in that project: the calling project's guardrails adjudicate it, it is metered there with `publisher_project_id`, and the tool receives the calling project as the `calling_project_id` tool context key.
6061
6176
  *
6177
+ * `actor_id` runs the call for an actor without a session or a generation, such as a scheduled sync reading each user's own data through their OAuth connection.
6178
+ *
6062
6179
  */
6063
6180
  static callTool(options) {
6064
6181
  return (options.client ?? client).post({
@@ -6895,6 +7012,8 @@ var NaturaliClient = class {
6895
7012
  memoryStores;
6896
7013
  metadataSchemas;
6897
7014
  modelRoutes;
7015
+ oauthClients;
7016
+ oauthConnections;
6898
7017
  quotas;
6899
7018
  models;
6900
7019
  orchestrations;
@@ -6953,6 +7072,8 @@ var NaturaliClient = class {
6953
7072
  this.memoryStores = bindResource(MemoryStores, this.http);
6954
7073
  this.metadataSchemas = bindResource(MetadataSchemas, this.http);
6955
7074
  this.modelRoutes = bindResource(ModelRoutes, this.http);
7075
+ this.oauthClients = bindResource(OauthClients, this.http);
7076
+ this.oauthConnections = bindResource(OauthConnections, this.http);
6956
7077
  this.quotas = bindResource(Quotas, this.http);
6957
7078
  this.models = bindResource(Models, this.http);
6958
7079
  this.orchestrations = bindResource(Orchestrations, this.http);
@@ -6970,4 +7091,4 @@ var NaturaliClient = class {
6970
7091
  }
6971
7092
  };
6972
7093
  //#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 };
7094
+ 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.231.0",
3
+ "version": "0.232.1",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -38,8 +38,8 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hey-api/openapi-ts": "^0.99.0",
41
- "@naturali/api": "0.231.0",
42
- "@ttoss/openapi-codegen": "^0.10.0",
41
+ "@naturali/api": "0.232.1",
42
+ "@ttoss/openapi-codegen": "^0.10.1",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",
45
45
  "tsx": "^4.23.13",