@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.cjs +123 -0
- package/dist/index.d.cts +666 -2
- package/dist/index.d.mts +666 -2
- package/dist/index.mjs +122 -1
- package/package.json +3 -3
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
|
|
@@ -6060,6 +6175,8 @@ var Tools = class {
|
|
|
6060
6175
|
*
|
|
6061
6176
|
* 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.
|
|
6062
6177
|
*
|
|
6178
|
+
* `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.
|
|
6179
|
+
*
|
|
6063
6180
|
*/
|
|
6064
6181
|
static callTool(options) {
|
|
6065
6182
|
return (options.client ?? client).post({
|
|
@@ -6896,6 +7013,8 @@ var NaturaliClient = class {
|
|
|
6896
7013
|
memoryStores;
|
|
6897
7014
|
metadataSchemas;
|
|
6898
7015
|
modelRoutes;
|
|
7016
|
+
oauthClients;
|
|
7017
|
+
oauthConnections;
|
|
6899
7018
|
quotas;
|
|
6900
7019
|
models;
|
|
6901
7020
|
orchestrations;
|
|
@@ -6954,6 +7073,8 @@ var NaturaliClient = class {
|
|
|
6954
7073
|
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
6955
7074
|
this.metadataSchemas = bindResource(MetadataSchemas, this.http);
|
|
6956
7075
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
7076
|
+
this.oauthClients = bindResource(OauthClients, this.http);
|
|
7077
|
+
this.oauthConnections = bindResource(OauthConnections, this.http);
|
|
6957
7078
|
this.quotas = bindResource(Quotas, this.http);
|
|
6958
7079
|
this.models = bindResource(Models, this.http);
|
|
6959
7080
|
this.orchestrations = bindResource(Orchestrations, this.http);
|
|
@@ -7007,6 +7128,8 @@ exports.MetadataSchemas = MetadataSchemas;
|
|
|
7007
7128
|
exports.ModelRoutes = ModelRoutes;
|
|
7008
7129
|
exports.Models = Models;
|
|
7009
7130
|
exports.NaturaliClient = NaturaliClient;
|
|
7131
|
+
exports.OauthClients = OauthClients;
|
|
7132
|
+
exports.OauthConnections = OauthConnections;
|
|
7010
7133
|
exports.Orchestrations = Orchestrations;
|
|
7011
7134
|
exports.Playbooks = Playbooks;
|
|
7012
7135
|
exports.Projects = Projects;
|