@naturali/cli 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 +558 -3
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region package.json
|
|
20
|
-
var version = "0.
|
|
20
|
+
var version = "0.232.1";
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region ../sdk/src/generated/core/bodySerializer.gen.ts
|
|
23
23
|
const serializeFormDataPair = (data, key, value) => {
|
|
@@ -4568,6 +4568,121 @@ var Models = class {
|
|
|
4568
4568
|
});
|
|
4569
4569
|
}
|
|
4570
4570
|
};
|
|
4571
|
+
var OauthClients = class {
|
|
4572
|
+
/**
|
|
4573
|
+
* List OAuth clients
|
|
4574
|
+
*
|
|
4575
|
+
* Returns the OAuth clients of a project.
|
|
4576
|
+
*/
|
|
4577
|
+
static listOauthClients(options) {
|
|
4578
|
+
return (options.client ?? client).get({
|
|
4579
|
+
url: "/v1/projects/{project_id}/oauth-clients",
|
|
4580
|
+
...options
|
|
4581
|
+
});
|
|
4582
|
+
}
|
|
4583
|
+
/**
|
|
4584
|
+
* Create an OAuth client
|
|
4585
|
+
*
|
|
4586
|
+
* Registers your app at a provider. `client_secret` is a `{{secret:sec_...}}` reference, and the caller needs `secrets:UseSecret` on it.
|
|
4587
|
+
*/
|
|
4588
|
+
static createOauthClient(options) {
|
|
4589
|
+
return (options.client ?? client).post({
|
|
4590
|
+
url: "/v1/projects/{project_id}/oauth-clients",
|
|
4591
|
+
...options,
|
|
4592
|
+
headers: {
|
|
4593
|
+
"Content-Type": "application/json",
|
|
4594
|
+
...options.headers
|
|
4595
|
+
}
|
|
4596
|
+
});
|
|
4597
|
+
}
|
|
4598
|
+
/**
|
|
4599
|
+
* Delete an OAuth client
|
|
4600
|
+
*
|
|
4601
|
+
* Deletes the client and every connection made through it.
|
|
4602
|
+
*/
|
|
4603
|
+
static deleteOauthClient(options) {
|
|
4604
|
+
return (options.client ?? client).delete({
|
|
4605
|
+
url: "/v1/projects/{project_id}/oauth-clients/{oauth_client_id}",
|
|
4606
|
+
...options
|
|
4607
|
+
});
|
|
4608
|
+
}
|
|
4609
|
+
/**
|
|
4610
|
+
* Get an OAuth client
|
|
4611
|
+
*
|
|
4612
|
+
* Returns the client; `client_secret` is its secret reference.
|
|
4613
|
+
*/
|
|
4614
|
+
static getOauthClient(options) {
|
|
4615
|
+
return (options.client ?? client).get({
|
|
4616
|
+
url: "/v1/projects/{project_id}/oauth-clients/{oauth_client_id}",
|
|
4617
|
+
...options
|
|
4618
|
+
});
|
|
4619
|
+
}
|
|
4620
|
+
/**
|
|
4621
|
+
* Update an OAuth client
|
|
4622
|
+
*
|
|
4623
|
+
* Changes only the fields sent; `null` clears a nullable one.
|
|
4624
|
+
*/
|
|
4625
|
+
static updateOauthClient(options) {
|
|
4626
|
+
return (options.client ?? client).patch({
|
|
4627
|
+
url: "/v1/projects/{project_id}/oauth-clients/{oauth_client_id}",
|
|
4628
|
+
...options,
|
|
4629
|
+
headers: {
|
|
4630
|
+
"Content-Type": "application/json",
|
|
4631
|
+
...options.headers
|
|
4632
|
+
}
|
|
4633
|
+
});
|
|
4634
|
+
}
|
|
4635
|
+
};
|
|
4636
|
+
var OauthConnections = class {
|
|
4637
|
+
/**
|
|
4638
|
+
* List OAuth connections
|
|
4639
|
+
*
|
|
4640
|
+
* Returns a project's OAuth connections, without tokens.
|
|
4641
|
+
*/
|
|
4642
|
+
static listOauthConnections(options) {
|
|
4643
|
+
return (options.client ?? client).get({
|
|
4644
|
+
url: "/v1/projects/{project_id}/oauth-connections",
|
|
4645
|
+
...options
|
|
4646
|
+
});
|
|
4647
|
+
}
|
|
4648
|
+
/**
|
|
4649
|
+
* Start an OAuth connection
|
|
4650
|
+
*
|
|
4651
|
+
* 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.
|
|
4652
|
+
*/
|
|
4653
|
+
static createOauthConnection(options) {
|
|
4654
|
+
return (options.client ?? client).post({
|
|
4655
|
+
url: "/v1/projects/{project_id}/oauth-connections",
|
|
4656
|
+
...options,
|
|
4657
|
+
headers: {
|
|
4658
|
+
"Content-Type": "application/json",
|
|
4659
|
+
...options.headers
|
|
4660
|
+
}
|
|
4661
|
+
});
|
|
4662
|
+
}
|
|
4663
|
+
/**
|
|
4664
|
+
* Delete an OAuth connection
|
|
4665
|
+
*
|
|
4666
|
+
* 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.
|
|
4667
|
+
*/
|
|
4668
|
+
static deleteOauthConnection(options) {
|
|
4669
|
+
return (options.client ?? client).delete({
|
|
4670
|
+
url: "/v1/projects/{project_id}/oauth-connections/{oauth_connection_id}",
|
|
4671
|
+
...options
|
|
4672
|
+
});
|
|
4673
|
+
}
|
|
4674
|
+
/**
|
|
4675
|
+
* Get an OAuth connection
|
|
4676
|
+
*
|
|
4677
|
+
* Returns the connection's status, without tokens.
|
|
4678
|
+
*/
|
|
4679
|
+
static getOauthConnection(options) {
|
|
4680
|
+
return (options.client ?? client).get({
|
|
4681
|
+
url: "/v1/projects/{project_id}/oauth-connections/{oauth_connection_id}",
|
|
4682
|
+
...options
|
|
4683
|
+
});
|
|
4684
|
+
}
|
|
4685
|
+
};
|
|
4571
4686
|
var Orchestrations = class {
|
|
4572
4687
|
/**
|
|
4573
4688
|
* List orchestrations
|
|
@@ -6080,6 +6195,8 @@ var Tools = class {
|
|
|
6080
6195
|
*
|
|
6081
6196
|
* 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.
|
|
6082
6197
|
*
|
|
6198
|
+
* `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.
|
|
6199
|
+
*
|
|
6083
6200
|
*/
|
|
6084
6201
|
static callTool(options) {
|
|
6085
6202
|
return (options.client ?? client).post({
|
|
@@ -6916,6 +7033,8 @@ var NaturaliClient = class {
|
|
|
6916
7033
|
memoryStores;
|
|
6917
7034
|
metadataSchemas;
|
|
6918
7035
|
modelRoutes;
|
|
7036
|
+
oauthClients;
|
|
7037
|
+
oauthConnections;
|
|
6919
7038
|
quotas;
|
|
6920
7039
|
models;
|
|
6921
7040
|
orchestrations;
|
|
@@ -6974,6 +7093,8 @@ var NaturaliClient = class {
|
|
|
6974
7093
|
this.memoryStores = bindResource(MemoryStores, this.http);
|
|
6975
7094
|
this.metadataSchemas = bindResource(MetadataSchemas, this.http);
|
|
6976
7095
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
7096
|
+
this.oauthClients = bindResource(OauthClients, this.http);
|
|
7097
|
+
this.oauthConnections = bindResource(OauthConnections, this.http);
|
|
6977
7098
|
this.quotas = bindResource(Quotas, this.http);
|
|
6978
7099
|
this.models = bindResource(Models, this.http);
|
|
6979
7100
|
this.orchestrations = bindResource(Orchestrations, this.http);
|
|
@@ -7029,6 +7150,8 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
7029
7150
|
ModelRoutes: () => ModelRoutes,
|
|
7030
7151
|
Models: () => Models,
|
|
7031
7152
|
NaturaliClient: () => NaturaliClient,
|
|
7153
|
+
OauthClients: () => OauthClients,
|
|
7154
|
+
OauthConnections: () => OauthConnections,
|
|
7032
7155
|
Orchestrations: () => Orchestrations,
|
|
7033
7156
|
Playbooks: () => Playbooks,
|
|
7034
7157
|
Projects: () => Projects,
|
|
@@ -19956,6 +20079,431 @@ const routes = {
|
|
|
19956
20079
|
"in": "path"
|
|
19957
20080
|
}]
|
|
19958
20081
|
},
|
|
20082
|
+
"list-oauth-clients": {
|
|
20083
|
+
serviceClass: "OauthClients",
|
|
20084
|
+
operationId: "listOauthClients",
|
|
20085
|
+
description: "Returns the OAuth clients of a project.",
|
|
20086
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/oauth-clients",
|
|
20087
|
+
httpMethod: "get",
|
|
20088
|
+
pathParams: ["project_id"],
|
|
20089
|
+
queryParams: ["limit", "cursor"],
|
|
20090
|
+
headerParams: [],
|
|
20091
|
+
cookieParams: [],
|
|
20092
|
+
flags: [
|
|
20093
|
+
{
|
|
20094
|
+
"name": "project_id",
|
|
20095
|
+
"description": "Project public ID (proj_ prefix).",
|
|
20096
|
+
"required": true,
|
|
20097
|
+
"type": "string",
|
|
20098
|
+
"in": "path"
|
|
20099
|
+
},
|
|
20100
|
+
{
|
|
20101
|
+
"name": "limit",
|
|
20102
|
+
"description": "Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.",
|
|
20103
|
+
"required": false,
|
|
20104
|
+
"type": "integer",
|
|
20105
|
+
"in": "query"
|
|
20106
|
+
},
|
|
20107
|
+
{
|
|
20108
|
+
"name": "cursor",
|
|
20109
|
+
"description": "The previous page's `next_cursor`; omit it for the first page. A cursor this list did not issue is `400`.",
|
|
20110
|
+
"required": false,
|
|
20111
|
+
"type": "string",
|
|
20112
|
+
"in": "query"
|
|
20113
|
+
}
|
|
20114
|
+
]
|
|
20115
|
+
},
|
|
20116
|
+
"create-oauth-client": {
|
|
20117
|
+
serviceClass: "OauthClients",
|
|
20118
|
+
operationId: "createOauthClient",
|
|
20119
|
+
description: "Registers your app at a provider. `client_secret` is a `{{secret:sec_...}}` reference, and the caller needs `secrets:UseSecret` on it.",
|
|
20120
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/oauth-clients",
|
|
20121
|
+
httpMethod: "post",
|
|
20122
|
+
pathParams: ["project_id"],
|
|
20123
|
+
queryParams: [],
|
|
20124
|
+
headerParams: [],
|
|
20125
|
+
cookieParams: [],
|
|
20126
|
+
flags: [
|
|
20127
|
+
{
|
|
20128
|
+
"name": "project_id",
|
|
20129
|
+
"description": "Project public ID (proj_ prefix).",
|
|
20130
|
+
"required": true,
|
|
20131
|
+
"type": "string",
|
|
20132
|
+
"in": "path"
|
|
20133
|
+
},
|
|
20134
|
+
{
|
|
20135
|
+
"name": "name",
|
|
20136
|
+
"description": "A label for the client, such as the provider's name.",
|
|
20137
|
+
"required": true,
|
|
20138
|
+
"type": "string",
|
|
20139
|
+
"in": "body"
|
|
20140
|
+
},
|
|
20141
|
+
{
|
|
20142
|
+
"name": "authorize_url",
|
|
20143
|
+
"description": "The provider's authorization endpoint. Query parameters it already carries are kept.",
|
|
20144
|
+
"required": true,
|
|
20145
|
+
"type": "string",
|
|
20146
|
+
"in": "body"
|
|
20147
|
+
},
|
|
20148
|
+
{
|
|
20149
|
+
"name": "token_url",
|
|
20150
|
+
"description": "The provider's token endpoint.",
|
|
20151
|
+
"required": true,
|
|
20152
|
+
"type": "string",
|
|
20153
|
+
"in": "body"
|
|
20154
|
+
},
|
|
20155
|
+
{
|
|
20156
|
+
"name": "revocation_url",
|
|
20157
|
+
"description": "The provider's RFC 7009 revocation endpoint, called when a connection is deleted. `null` skips revocation.",
|
|
20158
|
+
"required": false,
|
|
20159
|
+
"type": "string",
|
|
20160
|
+
"in": "body"
|
|
20161
|
+
},
|
|
20162
|
+
{
|
|
20163
|
+
"name": "client_id",
|
|
20164
|
+
"description": "Your app's client ID at the provider.",
|
|
20165
|
+
"required": true,
|
|
20166
|
+
"type": "string",
|
|
20167
|
+
"in": "body"
|
|
20168
|
+
},
|
|
20169
|
+
{
|
|
20170
|
+
"name": "client_secret",
|
|
20171
|
+
"description": "A `{{secret:sec_...}}` reference to your app's client secret, never the value. `null` for a public client, which relies on PKCE.",
|
|
20172
|
+
"required": false,
|
|
20173
|
+
"type": "string",
|
|
20174
|
+
"in": "body"
|
|
20175
|
+
},
|
|
20176
|
+
{
|
|
20177
|
+
"name": "scopes",
|
|
20178
|
+
"description": "The scopes requested at authorization.",
|
|
20179
|
+
"required": true,
|
|
20180
|
+
"type": "array",
|
|
20181
|
+
"in": "body"
|
|
20182
|
+
},
|
|
20183
|
+
{
|
|
20184
|
+
"name": "pkce",
|
|
20185
|
+
"description": "Whether the authorization uses PKCE (`S256`).",
|
|
20186
|
+
"required": false,
|
|
20187
|
+
"type": "boolean",
|
|
20188
|
+
"in": "body"
|
|
20189
|
+
},
|
|
20190
|
+
{
|
|
20191
|
+
"name": "token_endpoint_auth_method",
|
|
20192
|
+
"description": "How the client authenticates at the token endpoint.",
|
|
20193
|
+
"required": false,
|
|
20194
|
+
"type": "string",
|
|
20195
|
+
"in": "body"
|
|
20196
|
+
},
|
|
20197
|
+
{
|
|
20198
|
+
"name": "redirect_uri",
|
|
20199
|
+
"description": "The callback the provider redirects to, as registered with the provider. Omitted or `null`, this API fills in its own `https://api.naturali.ai/v1/oauth/callback`, the URL to register with the provider; a front end that receives the redirect itself forwards `code` and `state` there.",
|
|
20200
|
+
"required": false,
|
|
20201
|
+
"type": "string",
|
|
20202
|
+
"in": "body"
|
|
20203
|
+
},
|
|
20204
|
+
{
|
|
20205
|
+
"name": "authorize_params",
|
|
20206
|
+
"description": "Extra query parameters for the authorize URL, such as Google's `access_type: offline` and `prompt: consent` for a refresh token.",
|
|
20207
|
+
"required": false,
|
|
20208
|
+
"type": "object",
|
|
20209
|
+
"in": "body"
|
|
20210
|
+
}
|
|
20211
|
+
]
|
|
20212
|
+
},
|
|
20213
|
+
"get-oauth-client": {
|
|
20214
|
+
serviceClass: "OauthClients",
|
|
20215
|
+
operationId: "getOauthClient",
|
|
20216
|
+
description: "Returns the client; `client_secret` is its secret reference.",
|
|
20217
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/oauth-clients",
|
|
20218
|
+
httpMethod: "get",
|
|
20219
|
+
pathParams: ["oauth_client_id", "project_id"],
|
|
20220
|
+
queryParams: [],
|
|
20221
|
+
headerParams: [],
|
|
20222
|
+
cookieParams: [],
|
|
20223
|
+
flags: [{
|
|
20224
|
+
"name": "oauth_client_id",
|
|
20225
|
+
"description": "OAuth client ID",
|
|
20226
|
+
"required": true,
|
|
20227
|
+
"type": "string",
|
|
20228
|
+
"in": "path"
|
|
20229
|
+
}, {
|
|
20230
|
+
"name": "project_id",
|
|
20231
|
+
"description": "Project public ID (proj_ prefix).",
|
|
20232
|
+
"required": true,
|
|
20233
|
+
"type": "string",
|
|
20234
|
+
"in": "path"
|
|
20235
|
+
}]
|
|
20236
|
+
},
|
|
20237
|
+
"update-oauth-client": {
|
|
20238
|
+
serviceClass: "OauthClients",
|
|
20239
|
+
operationId: "updateOauthClient",
|
|
20240
|
+
description: "Changes only the fields sent; `null` clears a nullable one.",
|
|
20241
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/oauth-clients",
|
|
20242
|
+
httpMethod: "patch",
|
|
20243
|
+
pathParams: ["oauth_client_id", "project_id"],
|
|
20244
|
+
queryParams: [],
|
|
20245
|
+
headerParams: [],
|
|
20246
|
+
cookieParams: [],
|
|
20247
|
+
flags: [
|
|
20248
|
+
{
|
|
20249
|
+
"name": "oauth_client_id",
|
|
20250
|
+
"description": "OAuth client ID",
|
|
20251
|
+
"required": true,
|
|
20252
|
+
"type": "string",
|
|
20253
|
+
"in": "path"
|
|
20254
|
+
},
|
|
20255
|
+
{
|
|
20256
|
+
"name": "project_id",
|
|
20257
|
+
"description": "Project public ID (proj_ prefix).",
|
|
20258
|
+
"required": true,
|
|
20259
|
+
"type": "string",
|
|
20260
|
+
"in": "path"
|
|
20261
|
+
},
|
|
20262
|
+
{
|
|
20263
|
+
"name": "name",
|
|
20264
|
+
"description": "A label for the client, such as the provider's name.",
|
|
20265
|
+
"required": false,
|
|
20266
|
+
"type": "string",
|
|
20267
|
+
"in": "body"
|
|
20268
|
+
},
|
|
20269
|
+
{
|
|
20270
|
+
"name": "authorize_url",
|
|
20271
|
+
"description": "The provider's authorization endpoint. Query parameters it already carries are kept.",
|
|
20272
|
+
"required": false,
|
|
20273
|
+
"type": "string",
|
|
20274
|
+
"in": "body"
|
|
20275
|
+
},
|
|
20276
|
+
{
|
|
20277
|
+
"name": "token_url",
|
|
20278
|
+
"description": "The provider's token endpoint.",
|
|
20279
|
+
"required": false,
|
|
20280
|
+
"type": "string",
|
|
20281
|
+
"in": "body"
|
|
20282
|
+
},
|
|
20283
|
+
{
|
|
20284
|
+
"name": "revocation_url",
|
|
20285
|
+
"description": "The provider's RFC 7009 revocation endpoint, called when a connection is deleted. `null` skips revocation.",
|
|
20286
|
+
"required": false,
|
|
20287
|
+
"type": "string",
|
|
20288
|
+
"in": "body"
|
|
20289
|
+
},
|
|
20290
|
+
{
|
|
20291
|
+
"name": "client_id",
|
|
20292
|
+
"description": "Your app's client ID at the provider.",
|
|
20293
|
+
"required": false,
|
|
20294
|
+
"type": "string",
|
|
20295
|
+
"in": "body"
|
|
20296
|
+
},
|
|
20297
|
+
{
|
|
20298
|
+
"name": "client_secret",
|
|
20299
|
+
"description": "A `{{secret:sec_...}}` reference to your app's client secret, never the value. `null` for a public client, which relies on PKCE.",
|
|
20300
|
+
"required": false,
|
|
20301
|
+
"type": "string",
|
|
20302
|
+
"in": "body"
|
|
20303
|
+
},
|
|
20304
|
+
{
|
|
20305
|
+
"name": "scopes",
|
|
20306
|
+
"description": "The scopes requested at authorization.",
|
|
20307
|
+
"required": false,
|
|
20308
|
+
"type": "array",
|
|
20309
|
+
"in": "body"
|
|
20310
|
+
},
|
|
20311
|
+
{
|
|
20312
|
+
"name": "pkce",
|
|
20313
|
+
"description": "Whether the authorization uses PKCE (`S256`).",
|
|
20314
|
+
"required": false,
|
|
20315
|
+
"type": "boolean",
|
|
20316
|
+
"in": "body"
|
|
20317
|
+
},
|
|
20318
|
+
{
|
|
20319
|
+
"name": "token_endpoint_auth_method",
|
|
20320
|
+
"description": "How the client authenticates at the token endpoint.",
|
|
20321
|
+
"required": false,
|
|
20322
|
+
"type": "string",
|
|
20323
|
+
"in": "body"
|
|
20324
|
+
},
|
|
20325
|
+
{
|
|
20326
|
+
"name": "redirect_uri",
|
|
20327
|
+
"description": "The callback the provider redirects to, as registered with the provider. Omitted or `null`, this API fills in its own `https://api.naturali.ai/v1/oauth/callback`, the URL to register with the provider; a front end that receives the redirect itself forwards `code` and `state` there.",
|
|
20328
|
+
"required": false,
|
|
20329
|
+
"type": "string",
|
|
20330
|
+
"in": "body"
|
|
20331
|
+
},
|
|
20332
|
+
{
|
|
20333
|
+
"name": "authorize_params",
|
|
20334
|
+
"description": "Extra query parameters for the authorize URL, such as Google's `access_type: offline` and `prompt: consent` for a refresh token.",
|
|
20335
|
+
"required": false,
|
|
20336
|
+
"type": "object",
|
|
20337
|
+
"in": "body"
|
|
20338
|
+
}
|
|
20339
|
+
]
|
|
20340
|
+
},
|
|
20341
|
+
"delete-oauth-client": {
|
|
20342
|
+
serviceClass: "OauthClients",
|
|
20343
|
+
operationId: "deleteOauthClient",
|
|
20344
|
+
description: "Deletes the client and every connection made through it.",
|
|
20345
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/oauth-clients",
|
|
20346
|
+
httpMethod: "delete",
|
|
20347
|
+
pathParams: ["oauth_client_id", "project_id"],
|
|
20348
|
+
queryParams: [],
|
|
20349
|
+
headerParams: [],
|
|
20350
|
+
cookieParams: [],
|
|
20351
|
+
flags: [{
|
|
20352
|
+
"name": "oauth_client_id",
|
|
20353
|
+
"description": "OAuth client ID",
|
|
20354
|
+
"required": true,
|
|
20355
|
+
"type": "string",
|
|
20356
|
+
"in": "path"
|
|
20357
|
+
}, {
|
|
20358
|
+
"name": "project_id",
|
|
20359
|
+
"description": "Project public ID (proj_ prefix).",
|
|
20360
|
+
"required": true,
|
|
20361
|
+
"type": "string",
|
|
20362
|
+
"in": "path"
|
|
20363
|
+
}]
|
|
20364
|
+
},
|
|
20365
|
+
"list-oauth-connections": {
|
|
20366
|
+
serviceClass: "OauthConnections",
|
|
20367
|
+
operationId: "listOauthConnections",
|
|
20368
|
+
description: "Returns a project's OAuth connections, without tokens.",
|
|
20369
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/oauth-connections",
|
|
20370
|
+
httpMethod: "get",
|
|
20371
|
+
pathParams: ["project_id"],
|
|
20372
|
+
queryParams: [
|
|
20373
|
+
"actor_id",
|
|
20374
|
+
"oauth_client_id",
|
|
20375
|
+
"limit",
|
|
20376
|
+
"cursor"
|
|
20377
|
+
],
|
|
20378
|
+
headerParams: [],
|
|
20379
|
+
cookieParams: [],
|
|
20380
|
+
flags: [
|
|
20381
|
+
{
|
|
20382
|
+
"name": "project_id",
|
|
20383
|
+
"description": "Project public ID (proj_ prefix).",
|
|
20384
|
+
"required": true,
|
|
20385
|
+
"type": "string",
|
|
20386
|
+
"in": "path"
|
|
20387
|
+
},
|
|
20388
|
+
{
|
|
20389
|
+
"name": "actor_id",
|
|
20390
|
+
"description": "Only this actor's connections",
|
|
20391
|
+
"required": false,
|
|
20392
|
+
"type": "string",
|
|
20393
|
+
"in": "query"
|
|
20394
|
+
},
|
|
20395
|
+
{
|
|
20396
|
+
"name": "oauth_client_id",
|
|
20397
|
+
"description": "Only connections through this OAuth client",
|
|
20398
|
+
"required": false,
|
|
20399
|
+
"type": "string",
|
|
20400
|
+
"in": "query"
|
|
20401
|
+
},
|
|
20402
|
+
{
|
|
20403
|
+
"name": "limit",
|
|
20404
|
+
"description": "Results per page, 1 to 100 (default 50). Above 100 it is clamped; below 1 or not an integer it is `400`.",
|
|
20405
|
+
"required": false,
|
|
20406
|
+
"type": "integer",
|
|
20407
|
+
"in": "query"
|
|
20408
|
+
},
|
|
20409
|
+
{
|
|
20410
|
+
"name": "cursor",
|
|
20411
|
+
"description": "The previous page's `next_cursor`; omit it for the first page. A cursor this list did not issue is `400`.",
|
|
20412
|
+
"required": false,
|
|
20413
|
+
"type": "string",
|
|
20414
|
+
"in": "query"
|
|
20415
|
+
}
|
|
20416
|
+
]
|
|
20417
|
+
},
|
|
20418
|
+
"create-oauth-connection": {
|
|
20419
|
+
serviceClass: "OauthConnections",
|
|
20420
|
+
operationId: "createOauthConnection",
|
|
20421
|
+
description: "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.",
|
|
20422
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/oauth-connections",
|
|
20423
|
+
httpMethod: "post",
|
|
20424
|
+
pathParams: ["project_id"],
|
|
20425
|
+
queryParams: [],
|
|
20426
|
+
headerParams: [],
|
|
20427
|
+
cookieParams: [],
|
|
20428
|
+
flags: [
|
|
20429
|
+
{
|
|
20430
|
+
"name": "project_id",
|
|
20431
|
+
"description": "Project public ID (proj_ prefix).",
|
|
20432
|
+
"required": true,
|
|
20433
|
+
"type": "string",
|
|
20434
|
+
"in": "path"
|
|
20435
|
+
},
|
|
20436
|
+
{
|
|
20437
|
+
"name": "oauth_client_id",
|
|
20438
|
+
"description": "The OAuth client to connect through.",
|
|
20439
|
+
"required": true,
|
|
20440
|
+
"type": "string",
|
|
20441
|
+
"in": "body"
|
|
20442
|
+
},
|
|
20443
|
+
{
|
|
20444
|
+
"name": "actor_id",
|
|
20445
|
+
"description": "The actor the grant is for.",
|
|
20446
|
+
"required": true,
|
|
20447
|
+
"type": "string",
|
|
20448
|
+
"in": "body"
|
|
20449
|
+
},
|
|
20450
|
+
{
|
|
20451
|
+
"name": "return_url",
|
|
20452
|
+
"description": "Where the callback redirects the person's browser when it completes, with `oauth_connection_id` and `status` (`connected` or `failed`) added to its query.",
|
|
20453
|
+
"required": false,
|
|
20454
|
+
"type": "string",
|
|
20455
|
+
"in": "body"
|
|
20456
|
+
}
|
|
20457
|
+
]
|
|
20458
|
+
},
|
|
20459
|
+
"get-oauth-connection": {
|
|
20460
|
+
serviceClass: "OauthConnections",
|
|
20461
|
+
operationId: "getOauthConnection",
|
|
20462
|
+
description: "Returns the connection's status, without tokens.",
|
|
20463
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/oauth-connections",
|
|
20464
|
+
httpMethod: "get",
|
|
20465
|
+
pathParams: ["oauth_connection_id", "project_id"],
|
|
20466
|
+
queryParams: [],
|
|
20467
|
+
headerParams: [],
|
|
20468
|
+
cookieParams: [],
|
|
20469
|
+
flags: [{
|
|
20470
|
+
"name": "oauth_connection_id",
|
|
20471
|
+
"description": "OAuth connection ID",
|
|
20472
|
+
"required": true,
|
|
20473
|
+
"type": "string",
|
|
20474
|
+
"in": "path"
|
|
20475
|
+
}, {
|
|
20476
|
+
"name": "project_id",
|
|
20477
|
+
"description": "Project public ID (proj_ prefix).",
|
|
20478
|
+
"required": true,
|
|
20479
|
+
"type": "string",
|
|
20480
|
+
"in": "path"
|
|
20481
|
+
}]
|
|
20482
|
+
},
|
|
20483
|
+
"delete-oauth-connection": {
|
|
20484
|
+
serviceClass: "OauthConnections",
|
|
20485
|
+
operationId: "deleteOauthConnection",
|
|
20486
|
+
description: "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.",
|
|
20487
|
+
moduleDocsUrl: "https://naturali.ai/docs/modules/oauth-connections",
|
|
20488
|
+
httpMethod: "delete",
|
|
20489
|
+
pathParams: ["oauth_connection_id", "project_id"],
|
|
20490
|
+
queryParams: [],
|
|
20491
|
+
headerParams: [],
|
|
20492
|
+
cookieParams: [],
|
|
20493
|
+
flags: [{
|
|
20494
|
+
"name": "oauth_connection_id",
|
|
20495
|
+
"description": "OAuth connection ID",
|
|
20496
|
+
"required": true,
|
|
20497
|
+
"type": "string",
|
|
20498
|
+
"in": "path"
|
|
20499
|
+
}, {
|
|
20500
|
+
"name": "project_id",
|
|
20501
|
+
"description": "Project public ID (proj_ prefix).",
|
|
20502
|
+
"required": true,
|
|
20503
|
+
"type": "string",
|
|
20504
|
+
"in": "path"
|
|
20505
|
+
}]
|
|
20506
|
+
},
|
|
19959
20507
|
"list-orchestrations": {
|
|
19960
20508
|
serviceClass: "Orchestrations",
|
|
19961
20509
|
operationId: "listOrchestrations",
|
|
@@ -24703,7 +25251,7 @@ const routes = {
|
|
|
24703
25251
|
"call-tool": {
|
|
24704
25252
|
serviceClass: "Tools",
|
|
24705
25253
|
operationId: "callTool",
|
|
24706
|
-
description: "Directly invokes a tool and returns its output. Supported for `http`, `mcp`, and `pipeline` tools. `client` tools cannot be invoked server-side and will return 422. A `pipeline` tool runs its declared steps in order and returns the mapped `output` (or the last step's output); `action` is ignored and `input` is the pipeline input. For `mcp` tools the `action` field is required and identifies which tool name to invoke. For `http` tools `action` is ignored. When an `mcp` tool declares an `actions` allowlist, an action outside it is rejected with `400 VALIDATION_FAILED` (\"not available on this tool\") before any outbound request is made. `preset_parameters` stored on the tool are pinned over the caller-supplied `input` before execution: a key the tool presets keeps its preset value even when `input` sets it. Keys the presets do not name are taken from `input` as sent. Guardrails attached to the tool or to its project adjudicate the call before dispatch, composing project + tool scope. A call this route cannot await a decision on — class C (human sign-off), class D, or a class-B tripwire — is refused with `422 TOOL_DISPATCH_FAILED`, whose `meta` carries the `tool_id` and the `outcome`. A `pipeline` tool is adjudicated before its first step runs, and every step is adjudicated as the call of that tool it is. 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.",
|
|
25254
|
+
description: "Directly invokes a tool and returns its output. Supported for `http`, `mcp`, and `pipeline` tools. `client` tools cannot be invoked server-side and will return 422. A `pipeline` tool runs its declared steps in order and returns the mapped `output` (or the last step's output); `action` is ignored and `input` is the pipeline input. For `mcp` tools the `action` field is required and identifies which tool name to invoke. For `http` tools `action` is ignored. When an `mcp` tool declares an `actions` allowlist, an action outside it is rejected with `400 VALIDATION_FAILED` (\"not available on this tool\") before any outbound request is made. `preset_parameters` stored on the tool are pinned over the caller-supplied `input` before execution: a key the tool presets keeps its preset value even when `input` sets it. Keys the presets do not name are taken from `input` as sent. Guardrails attached to the tool or to its project adjudicate the call before dispatch, composing project + tool scope. A call this route cannot await a decision on — class C (human sign-off), class D, or a class-B tripwire — is refused with `422 TOOL_DISPATCH_FAILED`, whose `meta` carries the `tool_id` and the `outcome`. A `pipeline` tool is adjudicated before its first step runs, and every step is adjudicated as the call of that tool it is. 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. `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.",
|
|
24707
25255
|
moduleDocsUrl: "https://naturali.ai/docs/modules/tools",
|
|
24708
25256
|
httpMethod: "post",
|
|
24709
25257
|
pathParams: ["project_id", "tool_id"],
|
|
@@ -24741,10 +25289,17 @@ const routes = {
|
|
|
24741
25289
|
},
|
|
24742
25290
|
{
|
|
24743
25291
|
"name": "tool_context",
|
|
24744
|
-
"description": "Key/value context for this call, forwarded to the tool as `X-Naturali-Context-<key>` request headers and resolving any `{{context:<key>}}` token in the tool's `execute.headers`, `mcp.headers` or `preset_parameters`. Narrowed by the tool's `context_keys` allowlist when it sets one.\
|
|
25292
|
+
"description": "Key/value context for this call, forwarded to the tool as `X-Naturali-Context-<key>` request headers and resolving any `{{context:<key>}}` token in the tool's `execute.headers`, `mcp.headers` or `preset_parameters`. Narrowed by the tool's `context_keys` allowlist when it sets one.\nThe reserved keys `session_id`, `actor_id` and `actor_external_id` are dropped from this bag (in any casing) rather than forwarded, so a downstream tool can still trust that a context header naming one is server-derived; `actor_id` and `actor_external_id` are stamped only from the `actor_id` field. Every other key becomes an HTTP header name and must match that grammar, or the call fails with `INVALID_TOOL_CONTEXT_KEY`.\n",
|
|
24745
25293
|
"required": false,
|
|
24746
25294
|
"type": "object",
|
|
24747
25295
|
"in": "body"
|
|
25296
|
+
},
|
|
25297
|
+
{
|
|
25298
|
+
"name": "actor_id",
|
|
25299
|
+
"description": "Runs the call for this actor, as a session for the actor would: an `http` tool with `auth.type: oauth_connection` sends the actor's connection token, and the tool receives `actor_id` and `actor_external_id` as tool context keys. The actor must belong to the calling project, or the call fails with `400 ACTOR_NOT_FOUND`; using its connection still needs `oauth-connections:UseOauthConnection`.\n",
|
|
25300
|
+
"required": false,
|
|
25301
|
+
"type": "string",
|
|
25302
|
+
"in": "body"
|
|
24748
25303
|
}
|
|
24749
25304
|
]
|
|
24750
25305
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturali/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.232.1",
|
|
4
4
|
"description": "Command-line interface for the naturali.ai API, generated from its OpenAPI specs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"naturali",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"yaml": "^2.9.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@naturali/sdk": "0.
|
|
35
|
-
"@ttoss/openapi-codegen": "^0.10.
|
|
34
|
+
"@naturali/sdk": "0.232.1",
|
|
35
|
+
"@ttoss/openapi-codegen": "^0.10.1",
|
|
36
36
|
"@types/node": "^26.5.1",
|
|
37
37
|
"tsdown": "^0.23.0",
|
|
38
38
|
"tsx": "^4.23.13",
|