@naturali/sdk 0.232.0 → 0.233.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 +71 -0
- package/dist/index.d.cts +388 -4
- package/dist/index.d.mts +388 -4
- package/dist/index.mjs +71 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -5295,6 +5295,72 @@ var Playbooks = class {
|
|
|
5295
5295
|
});
|
|
5296
5296
|
}
|
|
5297
5297
|
};
|
|
5298
|
+
var Policies = class {
|
|
5299
|
+
/**
|
|
5300
|
+
* List policies
|
|
5301
|
+
*
|
|
5302
|
+
* Returns the policies of the project `project_id` names, or of the project a project-scoped credential is bound to. Without either, the unrestricted admin lists every policy, global and project ones. Pass `user_id` (unrestricted admin only) to list only the policies attached to that user.
|
|
5303
|
+
*
|
|
5304
|
+
*/
|
|
5305
|
+
static listPolicies(options) {
|
|
5306
|
+
return (options.client ?? client).get({
|
|
5307
|
+
url: "/v1/projects/{project_id}/policies",
|
|
5308
|
+
...options
|
|
5309
|
+
});
|
|
5310
|
+
}
|
|
5311
|
+
/**
|
|
5312
|
+
* Create a policy
|
|
5313
|
+
*
|
|
5314
|
+
* Creates a project policy when `project_id` is given or the credential is bound to a project: its `Allow` statements may name only that project's resources (`srn:<project_id>:<type>:<id>`), else `400`. Without a project, creates a global policy, which only the unrestricted admin may.
|
|
5315
|
+
*/
|
|
5316
|
+
static createPolicy(options) {
|
|
5317
|
+
return (options.client ?? client).post({
|
|
5318
|
+
url: "/v1/projects/{project_id}/policies",
|
|
5319
|
+
...options,
|
|
5320
|
+
headers: {
|
|
5321
|
+
"Content-Type": "application/json",
|
|
5322
|
+
...options.headers
|
|
5323
|
+
}
|
|
5324
|
+
});
|
|
5325
|
+
}
|
|
5326
|
+
/**
|
|
5327
|
+
* Delete a policy
|
|
5328
|
+
*
|
|
5329
|
+
* Deletes a policy. A project policy needs `policies:DeletePolicy` in its project; a global one, the unrestricted admin. Refused with `409 POLICY_HAS_DEPENDENTS` while a trigger, agent or webhook names it in its `policy_ids`.
|
|
5330
|
+
*/
|
|
5331
|
+
static deletePolicy(options) {
|
|
5332
|
+
return (options.client ?? client).delete({
|
|
5333
|
+
url: "/v1/projects/{project_id}/policies/{policy_id}",
|
|
5334
|
+
...options
|
|
5335
|
+
});
|
|
5336
|
+
}
|
|
5337
|
+
/**
|
|
5338
|
+
* Get a policy
|
|
5339
|
+
*
|
|
5340
|
+
* Returns a policy. A project policy needs `policies:GetPolicy` in its project; a global one, the unrestricted admin.
|
|
5341
|
+
*/
|
|
5342
|
+
static getPolicy(options) {
|
|
5343
|
+
return (options.client ?? client).get({
|
|
5344
|
+
url: "/v1/projects/{project_id}/policies/{policy_id}",
|
|
5345
|
+
...options
|
|
5346
|
+
});
|
|
5347
|
+
}
|
|
5348
|
+
/**
|
|
5349
|
+
* Update a policy
|
|
5350
|
+
*
|
|
5351
|
+
* Updates a policy. A project policy needs `policies:UpdatePolicy` in its project and its `Allow` statements stay within that project; a global one, the unrestricted admin. The project never changes.
|
|
5352
|
+
*/
|
|
5353
|
+
static updatePolicy(options) {
|
|
5354
|
+
return (options.client ?? client).put({
|
|
5355
|
+
url: "/v1/projects/{project_id}/policies/{policy_id}",
|
|
5356
|
+
...options,
|
|
5357
|
+
headers: {
|
|
5358
|
+
"Content-Type": "application/json",
|
|
5359
|
+
...options.headers
|
|
5360
|
+
}
|
|
5361
|
+
});
|
|
5362
|
+
}
|
|
5363
|
+
};
|
|
5298
5364
|
var Projects = class {
|
|
5299
5365
|
/**
|
|
5300
5366
|
* List projects
|
|
@@ -6174,6 +6240,8 @@ var Tools = class {
|
|
|
6174
6240
|
*
|
|
6175
6241
|
* 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.
|
|
6176
6242
|
*
|
|
6243
|
+
* `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.
|
|
6244
|
+
*
|
|
6177
6245
|
*/
|
|
6178
6246
|
static callTool(options) {
|
|
6179
6247
|
return (options.client ?? client).post({
|
|
@@ -7016,6 +7084,7 @@ var NaturaliClient = class {
|
|
|
7016
7084
|
models;
|
|
7017
7085
|
orchestrations;
|
|
7018
7086
|
playbooks;
|
|
7087
|
+
policies;
|
|
7019
7088
|
projects;
|
|
7020
7089
|
secrets;
|
|
7021
7090
|
sessions;
|
|
@@ -7076,6 +7145,7 @@ var NaturaliClient = class {
|
|
|
7076
7145
|
this.models = bindResource(Models, this.http);
|
|
7077
7146
|
this.orchestrations = bindResource(Orchestrations, this.http);
|
|
7078
7147
|
this.playbooks = bindResource(Playbooks, this.http);
|
|
7148
|
+
this.policies = bindResource(Policies, this.http);
|
|
7079
7149
|
this.projects = bindResource(Projects, this.http);
|
|
7080
7150
|
this.secrets = bindResource(Secrets, this.http);
|
|
7081
7151
|
this.sessions = bindResource(Sessions, this.http);
|
|
@@ -7089,4 +7159,4 @@ var NaturaliClient = class {
|
|
|
7089
7159
|
}
|
|
7090
7160
|
};
|
|
7091
7161
|
//#endregion
|
|
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 };
|
|
7162
|
+
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, Policies, 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.233.0",
|
|
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.
|
|
42
|
-
"@ttoss/openapi-codegen": "^0.10.
|
|
41
|
+
"@naturali/api": "0.233.0",
|
|
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",
|