@naturali/sdk 0.164.0 → 0.165.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.mjs CHANGED
@@ -1166,6 +1166,34 @@ var Admin = class {
1166
1166
  ...options
1167
1167
  });
1168
1168
  }
1169
+ /**
1170
+ * List listings for review
1171
+ *
1172
+ * Every listing in one state, newest first — `in_review` by default, the queue an operator works through.
1173
+ *
1174
+ */
1175
+ static listAdminListings(options) {
1176
+ return (options?.client ?? client).get({
1177
+ url: "/v1/admin/listings",
1178
+ ...options
1179
+ });
1180
+ }
1181
+ /**
1182
+ * Review a listing
1183
+ *
1184
+ * List a listing in review or one that is suspended, send one in review back to `draft`, or suspend any listing. A listing an operator suspends cannot be resumed by its publisher. An invalid move answers `409 invalid_listing_state`.
1185
+ *
1186
+ */
1187
+ static setAdminListingState(options) {
1188
+ return (options.client ?? client).put({
1189
+ url: "/v1/admin/listings/{listing_id}/state",
1190
+ ...options,
1191
+ headers: {
1192
+ "Content-Type": "application/json",
1193
+ ...options.headers
1194
+ }
1195
+ });
1196
+ }
1169
1197
  };
1170
1198
  var Agents = class {
1171
1199
  /**
@@ -3327,6 +3355,60 @@ var IngestionRules = class {
3327
3355
  });
3328
3356
  }
3329
3357
  };
3358
+ var Installs = class {
3359
+ /**
3360
+ * List installs
3361
+ *
3362
+ * The listings the project installed, newest first.
3363
+ */
3364
+ static listInstalls(options) {
3365
+ return (options.client ?? client).get({
3366
+ url: "/v1/projects/{project_id}/installs",
3367
+ ...options
3368
+ });
3369
+ }
3370
+ /**
3371
+ * Install a listing
3372
+ *
3373
+ * Install a listing by its id. A listed entry, a draft and a listing in review all install; a suspended one answers `409 listing_suspended`. Installing again answers the existing install.
3374
+ * After the publisher removed this project's access, installing answers `403 install_blocked`.
3375
+ *
3376
+ */
3377
+ static createInstall(options) {
3378
+ return (options.client ?? client).post({
3379
+ url: "/v1/projects/{project_id}/installs",
3380
+ ...options,
3381
+ headers: {
3382
+ "Content-Type": "application/json",
3383
+ ...options.headers
3384
+ }
3385
+ });
3386
+ }
3387
+ /**
3388
+ * Uninstall a listing
3389
+ *
3390
+ * Remove the install. While the project's agents, ingestion rules or other resources still name the installed resource, this answers `409 install_in_use` with them in `details.references`; `force=true` uninstalls anyway and those resources stop reaching it.
3391
+ * A `blocked` install, and the install managed conversion uses, answer `403`.
3392
+ *
3393
+ */
3394
+ static deleteInstall(options) {
3395
+ return (options.client ?? client).delete({
3396
+ url: "/v1/projects/{project_id}/installs/{install_id}",
3397
+ ...options
3398
+ });
3399
+ }
3400
+ /**
3401
+ * Get an install
3402
+ *
3403
+ * One of the project's installs.
3404
+ */
3405
+ static getInstall(options) {
3406
+ return (options.client ?? client).get({
3407
+ url: "/v1/projects/{project_id}/installs/{install_id}",
3408
+ ...options
3409
+ });
3410
+ }
3411
+ };
3330
3412
  var Knowledge = class {
3331
3413
  /**
3332
3414
  * Search knowledge
@@ -3344,6 +3426,123 @@ var Knowledge = class {
3344
3426
  });
3345
3427
  }
3346
3428
  };
3429
+ var Listings = class {
3430
+ /**
3431
+ * Browse the marketplace
3432
+ *
3433
+ * Every listed entry, newest first. `interface` is what an installing project sees of the resource, read live from the publisher.
3434
+ *
3435
+ */
3436
+ static listPublicListings(options) {
3437
+ return (options?.client ?? client).get({
3438
+ url: "/v1/listings",
3439
+ ...options
3440
+ });
3441
+ }
3442
+ /**
3443
+ * Get a public listing
3444
+ *
3445
+ * One listed entry. A listing that is not listed answers `404`.
3446
+ */
3447
+ static getPublicListing(options) {
3448
+ return (options.client ?? client).get({
3449
+ url: "/v1/listings/{listing_id}",
3450
+ ...options
3451
+ });
3452
+ }
3453
+ /**
3454
+ * List a project's listings
3455
+ *
3456
+ * The listings the project publishes, newest first.
3457
+ */
3458
+ static listListings(options) {
3459
+ return (options.client ?? client).get({
3460
+ url: "/v1/projects/{project_id}/listings",
3461
+ ...options
3462
+ });
3463
+ }
3464
+ /**
3465
+ * Create a listing
3466
+ *
3467
+ * Publish one of the project's tools or agents as a `draft`. Any project member may publish.
3468
+ * An agent on a naturali model whose model has no price answers `503 model_not_priced`. A resource that does not exist in the project answers `400 resource_not_found`, and one that already has a listing `409 listing_exists`.
3469
+ *
3470
+ */
3471
+ static createListing(options) {
3472
+ return (options.client ?? client).post({
3473
+ url: "/v1/projects/{project_id}/listings",
3474
+ ...options,
3475
+ headers: {
3476
+ "Content-Type": "application/json",
3477
+ ...options.headers
3478
+ }
3479
+ });
3480
+ }
3481
+ /**
3482
+ * Get a listing
3483
+ *
3484
+ * One of the project's listings.
3485
+ */
3486
+ static getListing(options) {
3487
+ return (options.client ?? client).get({
3488
+ url: "/v1/projects/{project_id}/listings/{listing_id}",
3489
+ ...options
3490
+ });
3491
+ }
3492
+ /**
3493
+ * Update a listing
3494
+ *
3495
+ * Change the title or description, or pause and resume the listing.
3496
+ * `state: suspended` stops the listing for every installing project at once; their installs are kept. `state: listed` resumes a listing you suspended, provided naturali had listed it; nobody reinstalls. A listing naturali suspended cannot be resumed here, and an invalid move answers `409 invalid_listing_state`.
3497
+ *
3498
+ */
3499
+ static updateListing(options) {
3500
+ return (options.client ?? client).patch({
3501
+ url: "/v1/projects/{project_id}/listings/{listing_id}",
3502
+ ...options,
3503
+ headers: {
3504
+ "Content-Type": "application/json",
3505
+ ...options.headers
3506
+ }
3507
+ });
3508
+ }
3509
+ /**
3510
+ * Submit a listing for review
3511
+ *
3512
+ * Move a `draft` listing to `in_review`. naturali lists it in the marketplace or sends it back to `draft`. Any other state answers `409 invalid_listing_state`.
3513
+ *
3514
+ */
3515
+ static submitListing(options) {
3516
+ return (options.client ?? client).post({
3517
+ url: "/v1/projects/{project_id}/listings/{listing_id}:submit",
3518
+ ...options
3519
+ });
3520
+ }
3521
+ /**
3522
+ * List a listing's installs
3523
+ *
3524
+ * Each project that installed the listing, with its usage this billing cycle as last sampled. Never the content of a call.
3525
+ *
3526
+ */
3527
+ static listListingInstalls(options) {
3528
+ return (options.client ?? client).get({
3529
+ url: "/v1/projects/{project_id}/listings/{listing_id}/installs",
3530
+ ...options
3531
+ });
3532
+ }
3533
+ /**
3534
+ * Remove a project's install
3535
+ *
3536
+ * Cut one installing project off. An `active` or `suspended` install becomes `blocked`, and that project cannot install the listing again. Deleting a `blocked` install removes it, which lets that project install again.
3537
+ *
3538
+ */
3539
+ static deleteListingInstall(options) {
3540
+ return (options.client ?? client).delete({
3541
+ url: "/v1/projects/{project_id}/listings/{listing_id}/installs/{install_id}",
3542
+ ...options
3543
+ });
3544
+ }
3545
+ };
3347
3546
  var Memories = class {
3348
3547
  /**
3349
3548
  * List memories
@@ -5503,7 +5702,9 @@ var NaturaliClient = class {
5503
5702
  generations;
5504
5703
  guardrails;
5505
5704
  ingestionRules;
5705
+ installs;
5506
5706
  knowledge;
5707
+ listings;
5507
5708
  memories;
5508
5709
  memoryRules;
5509
5710
  memoryStores;
@@ -5556,7 +5757,9 @@ var NaturaliClient = class {
5556
5757
  this.generations = bindResource(Generations, this.http);
5557
5758
  this.guardrails = bindResource(Guardrails, this.http);
5558
5759
  this.ingestionRules = bindResource(IngestionRules, this.http);
5760
+ this.installs = bindResource(Installs, this.http);
5559
5761
  this.knowledge = bindResource(Knowledge, this.http);
5762
+ this.listings = bindResource(Listings, this.http);
5560
5763
  this.memories = bindResource(Memories, this.http);
5561
5764
  this.memoryRules = bindResource(MemoryRules, this.http);
5562
5765
  this.memoryStores = bindResource(MemoryStores, this.http);
@@ -5578,4 +5781,4 @@ var NaturaliClient = class {
5578
5781
  }
5579
5782
  };
5580
5783
  //#endregion
5581
- export { Activity, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, Models, NaturaliClient, Orchestrations, Projects, Quotas, Secrets, Sessions, Tasks, Tools, Traces, Triggers, Users, Webhooks, Workflows, createClient, createConfig };
5784
+ export { Activity, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Installs, Knowledge, Listings, Memories, MemoryRules, MemoryStores, MetadataSchemas, ModelRoutes, Models, NaturaliClient, Orchestrations, 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.164.0",
3
+ "version": "0.165.0",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hey-api/openapi-ts": "^0.99.0",
34
- "@naturali/api": "0.164.0",
34
+ "@naturali/api": "0.165.0",
35
35
  "@ttoss/openapi-codegen": "^0.5.0",
36
36
  "@types/node": "^26.5.1",
37
37
  "tsdown": "^0.23.0",