@naturali/sdk 0.309.4 → 0.310.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 CHANGED
@@ -636,6 +636,95 @@ var Activity = class {
636
636
  });
637
637
  }
638
638
  };
639
+ var ActorIssuer = class {
640
+ /**
641
+ * Get the project's actor issuer
642
+ *
643
+ * Returns the project's issuer URL (the `iss` of every actor token it signs), the JWKS a receiver verifies them against and the token lifetimes. The JWKS and an OpenID-style discovery document are served without a credential under the issuer URL.
644
+ */
645
+ static getActorIssuer(options) {
646
+ return (options.client ?? client).get({
647
+ url: "/v1/projects/{project_id}/actor-issuer",
648
+ ...options
649
+ });
650
+ }
651
+ /**
652
+ * Get the actor issuer's key set
653
+ *
654
+ * Returns the JSON Web Key Set actor tokens verify against, without a credential: a verifier holds none. Served with `Cache-Control: public, max-age=300`.
655
+ */
656
+ static getActorIssuerJwks(options) {
657
+ return (options.client ?? client).get({
658
+ url: "/v1/projects/{project_id}/actor-issuer/.well-known/jwks.json",
659
+ ...options
660
+ });
661
+ }
662
+ /**
663
+ * Get the actor issuer's discovery document
664
+ *
665
+ * Returns the OpenID-style discovery document of the project's issuer, for a JWT library that discovers keys from `iss`, without a credential. Served with `Cache-Control: public, max-age=300`.
666
+ */
667
+ static getActorIssuerConfiguration(options) {
668
+ return (options.client ?? client).get({
669
+ url: "/v1/projects/{project_id}/actor-issuer/.well-known/openid-configuration",
670
+ ...options
671
+ });
672
+ }
673
+ };
674
+ var ActorTokens = class {
675
+ /**
676
+ * List actor tokens
677
+ *
678
+ * Returns a project's active actor tokens, without tokens.
679
+ */
680
+ static listActorTokens(options) {
681
+ return (options.client ?? client).get({
682
+ url: "/v1/projects/{project_id}/actor-tokens",
683
+ ...options
684
+ });
685
+ }
686
+ /**
687
+ * Create an actor token
688
+ *
689
+ * Creates an actor token for an actor the caller has authenticated and returns its first access token and refresh token. The access token is signed by the project's actor issuer (`GET /v1/projects/{project_id}/actor-issuer`) and its `aud` is `audience`. Create one only for the person the actor is.
690
+ */
691
+ static createActorToken(options) {
692
+ return (options.client ?? client).post({
693
+ url: "/v1/projects/{project_id}/actor-tokens",
694
+ ...options,
695
+ headers: {
696
+ "Content-Type": "application/json",
697
+ ...options.headers
698
+ }
699
+ });
700
+ }
701
+ /**
702
+ * Refresh an actor token
703
+ *
704
+ * Exchanges a refresh token for a new access token and refresh token. The presented refresh token stops working; presenting it again revokes the actor token. An unknown, expired, spent or revoked refresh token is `401 ACTOR_TOKEN_INVALID`.
705
+ */
706
+ static refreshActorToken(options) {
707
+ return (options.client ?? client).post({
708
+ url: "/v1/projects/{project_id}/actor-tokens/refresh",
709
+ ...options,
710
+ headers: {
711
+ "Content-Type": "application/json",
712
+ ...options.headers
713
+ }
714
+ });
715
+ }
716
+ /**
717
+ * Revoke an actor token
718
+ *
719
+ * Revokes the actor token: its refresh token stops working. Access tokens already issued stay valid until they expire. Deleting the actor revokes all of its actor tokens.
720
+ */
721
+ static deleteActorToken(options) {
722
+ return (options.client ?? client).delete({
723
+ url: "/v1/projects/{project_id}/actor-tokens/{actor_token_id}",
724
+ ...options
725
+ });
726
+ }
727
+ };
639
728
  var Actors = class {
640
729
  /**
641
730
  * List actors
@@ -7231,6 +7320,8 @@ var NaturaliClient = class {
7231
7320
  activity;
7232
7321
  admin;
7233
7322
  actors;
7323
+ actorIssuer;
7324
+ actorTokens;
7234
7325
  agents;
7235
7326
  agentVersions;
7236
7327
  aiProviders;
@@ -7290,6 +7381,8 @@ var NaturaliClient = class {
7290
7381
  this.activity = bindResource(Activity, this.http);
7291
7382
  this.admin = bindResource(Admin, this.http);
7292
7383
  this.actors = bindResource(Actors, this.http);
7384
+ this.actorIssuer = bindResource(ActorIssuer, this.http);
7385
+ this.actorTokens = bindResource(ActorTokens, this.http);
7293
7386
  this.agents = bindResource(Agents, this.http);
7294
7387
  this.agentVersions = bindResource(AgentVersions, this.http);
7295
7388
  this.aiProviders = bindResource(AiProviders, this.http);
@@ -7339,4 +7432,4 @@ var NaturaliClient = class {
7339
7432
  }
7340
7433
  };
7341
7434
  //#endregion
7342
- 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, Knowledge, 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 };
7435
+ export { Activity, ActorIssuer as ActorIssuer2, ActorTokens, Actors, Admin, AgentVersions, Agents, AiProviders, ApiKeys, Approvals, Assistant, AuditLog, Auth, Chains, Channels, Collections, Conversations, Deciders, Documents, Embeddings, Evaluations, Exceptions, Files, Formations, Generations, Guardrails, IngestionRules, Knowledge, 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.309.4",
3
+ "version": "0.310.1",
4
4
  "description": "TypeScript SDK for the naturali.ai API, generated from its OpenAPI specs",
5
5
  "keywords": [
6
6
  "naturali",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@hey-api/openapi-ts": "^0.99.0",
41
- "@naturali/api": "0.309.4",
41
+ "@naturali/api": "0.310.1",
42
42
  "@ttoss/openapi-codegen": "^0.10.1",
43
43
  "@types/node": "^26.5.1",
44
44
  "tsdown": "^0.23.0",