@naturali/sdk 0.75.0 → 0.76.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 +122 -0
- package/dist/index.d.cts +621 -1
- package/dist/index.d.mts +621 -1
- package/dist/index.mjs +120 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -617,6 +617,19 @@ const createClient = (config = {}) => {
|
|
|
617
617
|
const client = createClient(createConfig());
|
|
618
618
|
//#endregion
|
|
619
619
|
//#region src/generated/sdk.gen.ts
|
|
620
|
+
var Activity = class {
|
|
621
|
+
/**
|
|
622
|
+
* List activity feed entries
|
|
623
|
+
*
|
|
624
|
+
* Returns activity entries for a project, newest first, filterable by kind and severity. Paginated with an opaque cursor rather than offset/limit — pass the previous page's `next_cursor` to fetch the next one; a `null` `next_cursor` means there is no more data.
|
|
625
|
+
*/
|
|
626
|
+
static listActivity(options) {
|
|
627
|
+
return (options.client ?? client).get({
|
|
628
|
+
url: "/v1/projects/{project_id}/activity",
|
|
629
|
+
...options
|
|
630
|
+
});
|
|
631
|
+
}
|
|
632
|
+
};
|
|
620
633
|
var Actors = class {
|
|
621
634
|
/**
|
|
622
635
|
* List actors
|
|
@@ -1506,6 +1519,41 @@ var Assistant = class {
|
|
|
1506
1519
|
});
|
|
1507
1520
|
}
|
|
1508
1521
|
};
|
|
1522
|
+
var AuditLog = class {
|
|
1523
|
+
/**
|
|
1524
|
+
* List audit entries
|
|
1525
|
+
*
|
|
1526
|
+
* Returns audit-log entries visible to the caller, newest first. All filters are optional and combine with AND. `resource_srn` is a prefix match (e.g. `srn:{project}:secret:` matches every secret action); every other filter is exact.
|
|
1527
|
+
*/
|
|
1528
|
+
static listAuditEntries(options) {
|
|
1529
|
+
return (options.client ?? client).get({
|
|
1530
|
+
url: "/v1/projects/{project_id}/audit-log",
|
|
1531
|
+
...options
|
|
1532
|
+
});
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* Export audit entries as NDJSON
|
|
1536
|
+
*
|
|
1537
|
+
* Streams a project's audit-log entries as newline-delimited JSON — one entry object per line, oldest first — for archival before the retention window expires, or for shipping into an external system. `project_id` is required: the export is per-project by design. Filters behave exactly as they do on the list endpoint.
|
|
1538
|
+
*/
|
|
1539
|
+
static exportAuditEntries(options) {
|
|
1540
|
+
return (options.client ?? client).get({
|
|
1541
|
+
url: "/v1/projects/{project_id}/audit-log/export",
|
|
1542
|
+
...options
|
|
1543
|
+
});
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Get an audit entry
|
|
1547
|
+
*
|
|
1548
|
+
* Returns a single audit-log entry, including its `detail` payload
|
|
1549
|
+
*/
|
|
1550
|
+
static getAuditEntry(options) {
|
|
1551
|
+
return (options.client ?? client).get({
|
|
1552
|
+
url: "/v1/projects/{project_id}/audit-log/{entry_id}",
|
|
1553
|
+
...options
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1556
|
+
};
|
|
1509
1557
|
var Auth = class {
|
|
1510
1558
|
/**
|
|
1511
1559
|
* Email a sign-in code
|
|
@@ -3244,6 +3292,71 @@ var Projects = class {
|
|
|
3244
3292
|
});
|
|
3245
3293
|
}
|
|
3246
3294
|
};
|
|
3295
|
+
var Quotas = class {
|
|
3296
|
+
/**
|
|
3297
|
+
* List quotas
|
|
3298
|
+
*
|
|
3299
|
+
* Returns the quotas defined in a project
|
|
3300
|
+
*/
|
|
3301
|
+
static listQuotas(options) {
|
|
3302
|
+
return (options.client ?? client).get({
|
|
3303
|
+
url: "/v1/projects/{project_id}/quotas",
|
|
3304
|
+
...options
|
|
3305
|
+
});
|
|
3306
|
+
}
|
|
3307
|
+
/**
|
|
3308
|
+
* Create a quota
|
|
3309
|
+
*
|
|
3310
|
+
* Creates a project-scoped quota. `requests` is valid for `scope: project`/`api_key`; `tokens` and `cost_usd` are valid for `scope: project`/`agent`/`actor`. Any other scope/metric pair is rejected with 400 (no attribution exists to enforce it). An `actor` quota caps one end user's spend, matched from the generation's session; a null `scope_ref` means one budget *per* actor rather than a pooled project total. A duplicate quota (same project, scope, scope_ref, metric, window) is rejected with 409.
|
|
3311
|
+
*/
|
|
3312
|
+
static createQuota(options) {
|
|
3313
|
+
return (options.client ?? client).post({
|
|
3314
|
+
url: "/v1/projects/{project_id}/quotas",
|
|
3315
|
+
...options,
|
|
3316
|
+
headers: {
|
|
3317
|
+
"Content-Type": "application/json",
|
|
3318
|
+
...options.headers
|
|
3319
|
+
}
|
|
3320
|
+
});
|
|
3321
|
+
}
|
|
3322
|
+
/**
|
|
3323
|
+
* Delete a quota
|
|
3324
|
+
*
|
|
3325
|
+
* Deletes a quota and drops its window counters
|
|
3326
|
+
*/
|
|
3327
|
+
static deleteQuota(options) {
|
|
3328
|
+
return (options.client ?? client).delete({
|
|
3329
|
+
url: "/v1/projects/{project_id}/quotas/{quota_id}",
|
|
3330
|
+
...options
|
|
3331
|
+
});
|
|
3332
|
+
}
|
|
3333
|
+
/**
|
|
3334
|
+
* Get a quota
|
|
3335
|
+
*
|
|
3336
|
+
* Returns a specific quota, including current window usage
|
|
3337
|
+
*/
|
|
3338
|
+
static getQuota(options) {
|
|
3339
|
+
return (options.client ?? client).get({
|
|
3340
|
+
url: "/v1/projects/{project_id}/quotas/{quota_id}",
|
|
3341
|
+
...options
|
|
3342
|
+
});
|
|
3343
|
+
}
|
|
3344
|
+
/**
|
|
3345
|
+
* Update a quota
|
|
3346
|
+
*
|
|
3347
|
+
* Updates a quota's limit and/or mode. Other fields are immutable.
|
|
3348
|
+
*/
|
|
3349
|
+
static updateQuota(options) {
|
|
3350
|
+
return (options.client ?? client).patch({
|
|
3351
|
+
url: "/v1/projects/{project_id}/quotas/{quota_id}",
|
|
3352
|
+
...options,
|
|
3353
|
+
headers: {
|
|
3354
|
+
"Content-Type": "application/json",
|
|
3355
|
+
...options.headers
|
|
3356
|
+
}
|
|
3357
|
+
});
|
|
3358
|
+
}
|
|
3359
|
+
};
|
|
3247
3360
|
var Secrets = class {
|
|
3248
3361
|
/**
|
|
3249
3362
|
* List secrets
|
|
@@ -4150,12 +4263,14 @@ const API_BASE_URL = "https://api.naturali.ai";
|
|
|
4150
4263
|
* is available as typed data.
|
|
4151
4264
|
*/
|
|
4152
4265
|
var NaturaliClient = class {
|
|
4266
|
+
activity;
|
|
4153
4267
|
actors;
|
|
4154
4268
|
agents;
|
|
4155
4269
|
agentVersions;
|
|
4156
4270
|
aiProviders;
|
|
4157
4271
|
apiKeys;
|
|
4158
4272
|
approvals;
|
|
4273
|
+
auditLog;
|
|
4159
4274
|
assistant;
|
|
4160
4275
|
channels;
|
|
4161
4276
|
auth;
|
|
@@ -4172,6 +4287,7 @@ var NaturaliClient = class {
|
|
|
4172
4287
|
memories;
|
|
4173
4288
|
memoryEntries;
|
|
4174
4289
|
modelRoutes;
|
|
4290
|
+
quotas;
|
|
4175
4291
|
models;
|
|
4176
4292
|
orchestrations;
|
|
4177
4293
|
projects;
|
|
@@ -4194,12 +4310,14 @@ var NaturaliClient = class {
|
|
|
4194
4310
|
...headers
|
|
4195
4311
|
}
|
|
4196
4312
|
}));
|
|
4313
|
+
this.activity = bindResource(Activity, this.http);
|
|
4197
4314
|
this.actors = bindResource(Actors, this.http);
|
|
4198
4315
|
this.agents = bindResource(Agents, this.http);
|
|
4199
4316
|
this.agentVersions = bindResource(AgentVersions, this.http);
|
|
4200
4317
|
this.aiProviders = bindResource(AiProviders, this.http);
|
|
4201
4318
|
this.apiKeys = bindResource(ApiKeys, this.http);
|
|
4202
4319
|
this.approvals = bindResource(Approvals, this.http);
|
|
4320
|
+
this.auditLog = bindResource(AuditLog, this.http);
|
|
4203
4321
|
this.assistant = bindResource(Assistant, this.http);
|
|
4204
4322
|
this.channels = bindResource(Channels, this.http);
|
|
4205
4323
|
this.auth = bindResource(Auth, this.http);
|
|
@@ -4216,6 +4334,7 @@ var NaturaliClient = class {
|
|
|
4216
4334
|
this.memories = bindResource(Memories, this.http);
|
|
4217
4335
|
this.memoryEntries = bindResource(MemoryEntries, this.http);
|
|
4218
4336
|
this.modelRoutes = bindResource(ModelRoutes, this.http);
|
|
4337
|
+
this.quotas = bindResource(Quotas, this.http);
|
|
4219
4338
|
this.models = bindResource(Models, this.http);
|
|
4220
4339
|
this.orchestrations = bindResource(Orchestrations, this.http);
|
|
4221
4340
|
this.projects = bindResource(Projects, this.http);
|
|
@@ -4231,6 +4350,7 @@ var NaturaliClient = class {
|
|
|
4231
4350
|
}
|
|
4232
4351
|
};
|
|
4233
4352
|
//#endregion
|
|
4353
|
+
exports.Activity = Activity;
|
|
4234
4354
|
exports.Actors = Actors;
|
|
4235
4355
|
exports.AgentVersions = AgentVersions;
|
|
4236
4356
|
exports.Agents = Agents;
|
|
@@ -4238,6 +4358,7 @@ exports.AiProviders = AiProviders;
|
|
|
4238
4358
|
exports.ApiKeys = ApiKeys;
|
|
4239
4359
|
exports.Approvals = Approvals;
|
|
4240
4360
|
exports.Assistant = Assistant;
|
|
4361
|
+
exports.AuditLog = AuditLog;
|
|
4241
4362
|
exports.Auth = Auth;
|
|
4242
4363
|
exports.Channels = Channels;
|
|
4243
4364
|
exports.Conversations = Conversations;
|
|
@@ -4257,6 +4378,7 @@ exports.Models = Models;
|
|
|
4257
4378
|
exports.NaturaliClient = NaturaliClient;
|
|
4258
4379
|
exports.Orchestrations = Orchestrations;
|
|
4259
4380
|
exports.Projects = Projects;
|
|
4381
|
+
exports.Quotas = Quotas;
|
|
4260
4382
|
exports.Secrets = Secrets;
|
|
4261
4383
|
exports.Sessions = Sessions;
|
|
4262
4384
|
exports.Tasks = Tasks;
|