@naturali/sdk 0.231.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 CHANGED
@@ -4548,6 +4548,121 @@ var Models = class {
4548
4548
  });
4549
4549
  }
4550
4550
  };
4551
+ var OauthClients = class {
4552
+ /**
4553
+ * List OAuth clients
4554
+ *
4555
+ * Returns the OAuth clients of a project.
4556
+ */
4557
+ static listOauthClients(options) {
4558
+ return (options.client ?? client).get({
4559
+ url: "/v1/projects/{project_id}/oauth-clients",
4560
+ ...options
4561
+ });
4562
+ }
4563
+ /**
4564
+ * Create an OAuth client
4565
+ *
4566
+ * Registers your app at a provider. `client_secret` is a `{{secret:sec_...}}` reference, and the caller needs `secrets:UseSecret` on it.
4567
+ */
4568
+ static createOauthClient(options) {
4569
+ return (options.client ?? client).post({
4570
+ url: "/v1/projects/{project_id}/oauth-clients",
4571
+ ...options,
4572
+ headers: {
4573
+ "Content-Type": "application/json",
4574
+ ...options.headers
4575
+ }
4576
+ });
4577
+ }
4578
+ /**
4579
+ * Delete an OAuth client
4580
+ *
4581
+ * Deletes the client and every connection made through it.
4582
+ */
4583
+ static deleteOauthClient(options) {
4584
+ return (options.client ?? client).delete({
4585
+ url: "/v1/projects/{project_id}/oauth-clients/{oauth_client_id}",
4586
+ ...options
4587
+ });
4588
+ }
4589
+ /**
4590
+ * Get an OAuth client
4591
+ *
4592
+ * Returns the client; `client_secret` is its secret reference.
4593
+ */
4594
+ static getOauthClient(options) {
4595
+ return (options.client ?? client).get({
4596
+ url: "/v1/projects/{project_id}/oauth-clients/{oauth_client_id}",
4597
+ ...options
4598
+ });
4599
+ }
4600
+ /**
4601
+ * Update an OAuth client
4602
+ *
4603
+ * Changes only the fields sent; `null` clears a nullable one.
4604
+ */
4605
+ static updateOauthClient(options) {
4606
+ return (options.client ?? client).patch({
4607
+ url: "/v1/projects/{project_id}/oauth-clients/{oauth_client_id}",
4608
+ ...options,
4609
+ headers: {
4610
+ "Content-Type": "application/json",
4611
+ ...options.headers
4612
+ }
4613
+ });
4614
+ }
4615
+ };
4616
+ var OauthConnections = class {
4617
+ /**
4618
+ * List OAuth connections
4619
+ *
4620
+ * Returns a project's OAuth connections, without tokens.
4621
+ */
4622
+ static listOauthConnections(options) {
4623
+ return (options.client ?? client).get({
4624
+ url: "/v1/projects/{project_id}/oauth-connections",
4625
+ ...options
4626
+ });
4627
+ }
4628
+ /**
4629
+ * Start an OAuth connection
4630
+ *
4631
+ * 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.
4632
+ */
4633
+ static createOauthConnection(options) {
4634
+ return (options.client ?? client).post({
4635
+ url: "/v1/projects/{project_id}/oauth-connections",
4636
+ ...options,
4637
+ headers: {
4638
+ "Content-Type": "application/json",
4639
+ ...options.headers
4640
+ }
4641
+ });
4642
+ }
4643
+ /**
4644
+ * Delete an OAuth connection
4645
+ *
4646
+ * 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.
4647
+ */
4648
+ static deleteOauthConnection(options) {
4649
+ return (options.client ?? client).delete({
4650
+ url: "/v1/projects/{project_id}/oauth-connections/{oauth_connection_id}",
4651
+ ...options
4652
+ });
4653
+ }
4654
+ /**
4655
+ * Get an OAuth connection
4656
+ *
4657
+ * Returns the connection's status, without tokens.
4658
+ */
4659
+ static getOauthConnection(options) {
4660
+ return (options.client ?? client).get({
4661
+ url: "/v1/projects/{project_id}/oauth-connections/{oauth_connection_id}",
4662
+ ...options
4663
+ });
4664
+ }
4665
+ };
4551
4666
  var Orchestrations = class {
4552
4667
  /**
4553
4668
  * List orchestrations
@@ -6896,6 +7011,8 @@ var NaturaliClient = class {
6896
7011
  memoryStores;
6897
7012
  metadataSchemas;
6898
7013
  modelRoutes;
7014
+ oauthClients;
7015
+ oauthConnections;
6899
7016
  quotas;
6900
7017
  models;
6901
7018
  orchestrations;
@@ -6954,6 +7071,8 @@ var NaturaliClient = class {
6954
7071
  this.memoryStores = bindResource(MemoryStores, this.http);
6955
7072
  this.metadataSchemas = bindResource(MetadataSchemas, this.http);
6956
7073
  this.modelRoutes = bindResource(ModelRoutes, this.http);
7074
+ this.oauthClients = bindResource(OauthClients, this.http);
7075
+ this.oauthConnections = bindResource(OauthConnections, this.http);
6957
7076
  this.quotas = bindResource(Quotas, this.http);
6958
7077
  this.models = bindResource(Models, this.http);
6959
7078
  this.orchestrations = bindResource(Orchestrations, this.http);
@@ -7007,6 +7126,8 @@ exports.MetadataSchemas = MetadataSchemas;
7007
7126
  exports.ModelRoutes = ModelRoutes;
7008
7127
  exports.Models = Models;
7009
7128
  exports.NaturaliClient = NaturaliClient;
7129
+ exports.OauthClients = OauthClients;
7130
+ exports.OauthConnections = OauthConnections;
7010
7131
  exports.Orchestrations = Orchestrations;
7011
7132
  exports.Playbooks = Playbooks;
7012
7133
  exports.Projects = Projects;